@dxtmisha/scripts 0.11.8 → 1.0.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.
- package/CHANGELOG.md +57 -0
- package/ai-resources/componentMaterials.md +19 -0
- package/ai-resources/componentPrompt.md +381 -0
- package/ai-resources/componentWiki.md +13 -0
- package/bin/arguments.ts +168 -0
- package/bin/build-packages.ts +12 -2
- package/bin/build-publish-packages.ts +12 -2
- package/bin/design-component.ts +7 -1
- package/bin/design-constructor.ts +22 -3
- package/bin/design-figma.ts +26 -4
- package/bin/design-flags.ts +14 -2
- package/bin/design-library.ts +7 -1
- package/bin/design-package.ts +29 -5
- package/bin/design-prompt.ts +22 -3
- package/bin/design-screenshot.ts +12 -2
- package/bin/design-types-save.ts +32 -5
- package/bin/design-types.ts +32 -6
- package/bin/design-ui.ts +21 -3
- package/bin/design-wiki-storm.ts +11 -3
- package/dist/AiZAi-x3CInynJ.js +232 -0
- package/dist/PropertiesConfig-ChizwW5y.js +250 -0
- package/{src/config.ts → dist/config.d.ts} +179 -158
- package/dist/config.js +20 -0
- package/dist/figmaApiTypes-CArSsNW8.js +6 -0
- package/dist/library-ai.d.ts +482 -0
- package/dist/library-ai.js +2 -0
- package/dist/library-figma.d.ts +462 -0
- package/dist/library-figma.js +75 -0
- package/dist/library-ui.d.ts +586 -0
- package/dist/library-ui.js +3760 -0
- package/dist/library.d.ts +4677 -0
- package/dist/library.js +1436 -0
- package/dist/propertyTypes-DflziKuR.js +236 -0
- package/package.json +69 -20
- package/bin/ai-doc.ts +0 -7
- package/bin/build-functional.ts +0 -5
- package/bin/design-component-wiki.ts +0 -11
- package/src/classes/Ai/AiAbstract.ts +0 -242
- package/src/classes/Ai/AiClaude.ts +0 -26
- package/src/classes/Ai/AiClaudeAgent.ts +0 -16
- package/src/classes/Ai/AiClaudeAgentLite.ts +0 -86
- package/src/classes/Ai/AiClaudeCli.ts +0 -24
- package/src/classes/Ai/AiClaudeCliLite.ts +0 -108
- package/src/classes/Ai/AiClaudeLite.ts +0 -112
- package/src/classes/Ai/AiDoc.ts +0 -81
- package/src/classes/Ai/AiDocItem.ts +0 -27
- package/src/classes/Ai/AiDocItemAbstract.ts +0 -209
- package/src/classes/Ai/AiDocItemClasses.ts +0 -27
- package/src/classes/Ai/AiDocItemComposables.ts +0 -20
- package/src/classes/Ai/AiDocType.ts +0 -45
- package/src/classes/Ai/AiGoogle.ts +0 -26
- package/src/classes/Ai/AiGoogleCli.ts +0 -24
- package/src/classes/Ai/AiGoogleCliLite.ts +0 -108
- package/src/classes/Ai/AiGoogleLite.ts +0 -78
- package/src/classes/Ai/AiOpenAi.ts +0 -26
- package/src/classes/Ai/AiOpenAiLite.ts +0 -107
- package/src/classes/Ai/AiZAi.ts +0 -17
- package/src/classes/Ai/AiZAiLite.ts +0 -77
- package/src/classes/Ai/ApiTmp.ts +0 -43
- package/src/classes/BrowserItem.ts +0 -408
- package/src/classes/Build/BuildFunctional.ts +0 -54
- package/src/classes/Build/BuildPackages.ts +0 -137
- package/src/classes/Build/BuildPublishPackages.ts +0 -105
- package/src/classes/BuildItem.ts +0 -187
- package/src/classes/Component/ComponentCreator.ts +0 -45
- package/src/classes/Component/ComponentItem.ts +0 -161
- package/src/classes/Component/ComponentWiki.ts +0 -258
- package/src/classes/Component/ComponentWikiFile.ts +0 -138
- package/src/classes/Design/DesignCommand.ts +0 -243
- package/src/classes/Design/DesignComponent.ts +0 -824
- package/src/classes/Design/DesignConstructor.ts +0 -222
- package/src/classes/Design/DesignConstructors.ts +0 -101
- package/src/classes/Design/DesignFigma.ts +0 -61
- package/src/classes/Design/DesignFlags.ts +0 -215
- package/src/classes/Design/DesignReplace.ts +0 -672
- package/src/classes/Design/DesignScreenshot.ts +0 -140
- package/src/classes/Design/DesignStructure.ts +0 -201
- package/src/classes/Design/DesignStructureClasses.ts +0 -105
- package/src/classes/Design/DesignStructureItemAbstract.ts +0 -52
- package/src/classes/Design/DesignStructureRead.ts +0 -349
- package/src/classes/Design/DesignStructureStyles.ts +0 -45
- package/src/classes/Design/DesignTypes.ts +0 -94
- package/src/classes/Design/DesignTypesAi.ts +0 -135
- package/src/classes/Design/DesignTypesDescription.ts +0 -121
- package/src/classes/Design/DesignTypesMake.ts +0 -460
- package/src/classes/Design/DesignTypesMcp.ts +0 -90
- package/src/classes/Design/DesignTypesPrompts.ts +0 -332
- package/src/classes/Design/DesignTypescript.ts +0 -244
- package/src/classes/Design/DesignUi.ts +0 -143
- package/src/classes/Design/DesignWiki.ts +0 -52
- package/src/classes/Design/DesignWikiStorm.ts +0 -95
- package/src/classes/Design/DesignWikiStormItem.ts +0 -316
- package/src/classes/FigmaApi.ts +0 -190
- package/src/classes/Git/GitRead.ts +0 -261
- package/src/classes/Library/LibraryAiMcpItem.ts +0 -67
- package/src/classes/Library/LibraryAiPrompt.ts +0 -268
- package/src/classes/Library/LibraryAiPromptItem.ts +0 -331
- package/src/classes/Library/LibraryAiWiki.ts +0 -127
- package/src/classes/Library/LibraryAiWikiItem.ts +0 -79
- package/src/classes/Library/LibraryExport.ts +0 -167
- package/src/classes/Library/LibraryFlags.ts +0 -62
- package/src/classes/Library/LibraryItems.ts +0 -138
- package/src/classes/Library/LibraryList.ts +0 -189
- package/src/classes/Library/LibraryMedia.ts +0 -139
- package/src/classes/Library/LibraryPlugin.ts +0 -73
- package/src/classes/Library/LibraryTypes.ts +0 -130
- package/src/classes/Package/PackageFile.ts +0 -154
- package/src/classes/Package/PackageInit.ts +0 -54
- package/src/classes/Package/PackageItem.ts +0 -329
- package/src/classes/Properties/Properties.ts +0 -175
- package/src/classes/Properties/PropertiesCache.ts +0 -248
- package/src/classes/Properties/PropertiesConfig.ts +0 -213
- package/src/classes/Properties/PropertiesConvector.ts +0 -52
- package/src/classes/Properties/PropertiesFile.ts +0 -522
- package/src/classes/Properties/PropertiesImport.ts +0 -182
- package/src/classes/Properties/PropertiesItems.ts +0 -605
- package/src/classes/Properties/PropertiesKeys.ts +0 -121
- package/src/classes/Properties/PropertiesMain.ts +0 -138
- package/src/classes/Properties/PropertiesPalette.ts +0 -149
- package/src/classes/Properties/PropertiesPath.ts +0 -193
- package/src/classes/Properties/PropertiesScss.ts +0 -261
- package/src/classes/Properties/PropertiesSeparator.ts +0 -118
- package/src/classes/Properties/PropertiesSettings.ts +0 -104
- package/src/classes/Properties/PropertiesStandard.ts +0 -180
- package/src/classes/Properties/PropertiesTool.ts +0 -80
- package/src/classes/Properties/PropertiesTypes.ts +0 -147
- package/src/classes/Properties/PropertiesValues.ts +0 -75
- package/src/classes/Properties/PropertiesWrap.ts +0 -187
- package/src/classes/Properties/convector/convectorColor.ts +0 -27
- package/src/classes/Properties/convector/convectorFontFamilies.ts +0 -18
- package/src/classes/Properties/convector/convectorShadow.ts +0 -61
- package/src/classes/Properties/convector/convectorTypography.ts +0 -19
- package/src/classes/Properties/to/PropertiesToAbstract.ts +0 -51
- package/src/classes/Properties/to/PropertiesToAnimate.ts +0 -59
- package/src/classes/Properties/to/PropertiesToClass.ts +0 -49
- package/src/classes/Properties/to/PropertiesToClone.ts +0 -114
- package/src/classes/Properties/to/PropertiesToComponent.ts +0 -52
- package/src/classes/Properties/to/PropertiesToDrag.ts +0 -231
- package/src/classes/Properties/to/PropertiesToDuplicate.ts +0 -165
- package/src/classes/Properties/to/PropertiesToFull.ts +0 -36
- package/src/classes/Properties/to/PropertiesToLink.ts +0 -259
- package/src/classes/Properties/to/PropertiesToMedia.ts +0 -187
- package/src/classes/Properties/to/PropertiesToMulti.ts +0 -101
- package/src/classes/Properties/to/PropertiesToNone.ts +0 -46
- package/src/classes/Properties/to/PropertiesToPalette.ts +0 -241
- package/src/classes/Properties/to/PropertiesToProperty.ts +0 -31
- package/src/classes/Properties/to/PropertiesToRemove.ts +0 -33
- package/src/classes/Properties/to/PropertiesToReplace.ts +0 -77
- package/src/classes/Properties/to/PropertiesToRoot.ts +0 -40
- package/src/classes/Properties/to/PropertiesToSimilar.ts +0 -128
- package/src/classes/Properties/to/PropertiesToSort.ts +0 -146
- package/src/classes/Properties/to/PropertiesToState.ts +0 -65
- package/src/classes/Properties/to/PropertiesToStyle.ts +0 -52
- package/src/classes/Properties/to/PropertiesToSub.ts +0 -95
- package/src/classes/Properties/to/PropertiesToSubclass.ts +0 -76
- package/src/classes/Properties/to/PropertiesToVar.ts +0 -194
- package/src/classes/Properties/to/PropertiesToVariable.ts +0 -176
- package/src/classes/Styles/Styles.ts +0 -247
- package/src/classes/Styles/StylesClasses.ts +0 -86
- package/src/classes/Styles/StylesProperties.ts +0 -197
- package/src/classes/Styles/StylesRoot.ts +0 -103
- package/src/classes/Styles/StylesTool.ts +0 -112
- package/src/classes/Styles/to/StylesToAbstract.ts +0 -93
- package/src/classes/Styles/to/StylesToAnimate.ts +0 -19
- package/src/classes/Styles/to/StylesToClass.ts +0 -25
- package/src/classes/Styles/to/StylesToClassFull.ts +0 -19
- package/src/classes/Styles/to/StylesToContainer.ts +0 -24
- package/src/classes/Styles/to/StylesToMedia.ts +0 -19
- package/src/classes/Styles/to/StylesToProperty.ts +0 -123
- package/src/classes/Styles/to/StylesToRoot.ts +0 -14
- package/src/classes/Styles/to/StylesToSelector.ts +0 -71
- package/src/classes/Styles/to/StylesToVar.ts +0 -105
- package/src/classes/Styles/to/StylesToVirtual.ts +0 -33
- package/src/composables/useAi.ts +0 -38
- package/src/demo/ai.ts +0 -10
- package/src/functions/getComponentPaths.ts +0 -13
- package/src/functions/getConfigAi.ts +0 -14
- package/src/functions/getConstructorProperties.ts +0 -54
- package/src/functions/getDirname.ts +0 -17
- package/src/functions/getNameDirByPaths.ts +0 -16
- package/src/functions/getPackageJson.ts +0 -19
- package/src/functions/hasNativeDirname.ts +0 -8
- package/src/functions/run.ts +0 -47
- package/src/functions/toPathStandardSep.ts +0 -14
- package/src/library-ai.ts +0 -10
- package/src/library.ts +0 -73
- package/src/media/ai/ai-doc-types.ts +0 -21
- package/src/media/properties/css.ts +0 -634
- package/src/media/properties/cssSelector.ts +0 -74
- package/src/media/properties/cssVirtual.ts +0 -12
- package/src/media/properties/listSort.ts +0 -113
- package/src/media/properties/style.ts +0 -81
- package/src/media/templates/component/DesignComponent.mdx +0 -30
- package/src/media/templates/component/DesignComponent.stories.ts +0 -34
- package/src/media/templates/component/DesignComponent.vue +0 -54
- package/src/media/templates/component/DesignComponentAiWiki.vue +0 -25
- package/src/media/templates/component/index.ts +0 -13
- package/src/media/templates/component/props.ts +0 -27
- package/src/media/templates/component/styleToken.scss +0 -17
- package/src/media/templates/component/wiki.ts +0 -13
- package/src/media/templates/component/wikiData.ts +0 -28
- package/src/media/templates/componentDoc/ComponentDoc.vue +0 -26
- package/src/media/templates/componentDoc/index.ts +0 -12
- package/src/media/templates/componentDoc/materials/README.md +0 -8
- package/src/media/templates/componentDoc/materials/prompt.md +0 -38
- package/src/media/templates/componentDoc/subcomponents/_.gitignore.txt +0 -0
- package/src/media/templates/componentDoc/types.ts +0 -15
- package/src/media/templates/componentDoc/wiki/ComponentDoc.mdx +0 -13
- package/src/media/templates/componentDoc/wiki/ComponentDoc.stories.ts +0 -24
- package/src/media/templates/componentDoc/wiki/prompt.md +0 -41
- package/src/media/templates/constructors/Constructors.ts +0 -33
- package/src/media/templates/constructors/ConstructorsDesign.tsx +0 -129
- package/src/media/templates/constructors/basicTypes.ts +0 -0
- package/src/media/templates/constructors/index.ts +0 -5
- package/src/media/templates/constructors/props.ts +0 -28
- package/src/media/templates/constructors/style.scss +0 -5
- package/src/media/templates/constructors/types.ts +0 -47
- package/src/media/templates/packages/figma/README.md +0 -1
- package/src/media/templates/packages/figma/_.gitignore.txt +0 -29
- package/src/media/templates/packages/figma/ai.sample.config.ts +0 -2
- package/src/media/templates/packages/figma/design.config.json +0 -3
- package/src/media/templates/packages/figma/index.html +0 -12
- package/src/media/templates/packages/figma/manifest.json +0 -25
- package/src/media/templates/packages/figma/package.json +0 -37
- package/src/media/templates/packages/figma/src/App.vue +0 -9
- package/src/media/templates/packages/figma/src/classes/_.gitignore.txt +0 -1
- package/src/media/templates/packages/figma/src/code.ts +0 -16
- package/src/media/templates/packages/figma/src/components/_.gitignore.txt +0 -1
- package/src/media/templates/packages/figma/src/composables/_.gitignore.txt +0 -1
- package/src/media/templates/packages/figma/src/config.ts +0 -0
- package/src/media/templates/packages/figma/src/functions/_.gitignore.txt +0 -1
- package/src/media/templates/packages/figma/src/library.ts +0 -0
- package/src/media/templates/packages/figma/src/main.ts +0 -4
- package/src/media/templates/packages/figma/src/media/_.gitignore.txt +0 -1
- package/src/media/templates/packages/figma/src/storybook/_.gitignore.txt +0 -1
- package/src/media/templates/packages/figma/src/types/_.gitignore.txt +0 -1
- package/src/media/templates/packages/figma/src/vite-env.d.ts +0 -1
- package/src/media/templates/packages/figma/tsconfig.app.json +0 -12
- package/src/media/templates/packages/figma/tsconfig.json +0 -7
- package/src/media/templates/packages/figma/tsconfig.node.json +0 -8
- package/src/media/templates/packages/figma/vite.config.ts +0 -7
- package/src/media/templates/packages/library/README.md +0 -1
- package/src/media/templates/packages/library/_.gitignore.txt +0 -27
- package/src/media/templates/packages/library/ai-description.md +0 -15
- package/src/media/templates/packages/library/design.config.json +0 -3
- package/src/media/templates/packages/library/index.html +0 -12
- package/src/media/templates/packages/library/materials/README.md +0 -8
- package/src/media/templates/packages/library/materials/prompt.md +0 -45
- package/src/media/templates/packages/library/package.json +0 -46
- package/src/media/templates/packages/library/src/App.vue +0 -8
- package/src/media/templates/packages/library/src/classes/_.gitignore.txt +0 -1
- package/src/media/templates/packages/library/src/components/_.gitignore.txt +0 -1
- package/src/media/templates/packages/library/src/composables/_.gitignore.txt +0 -1
- package/src/media/templates/packages/library/src/functions/_.gitignore.txt +0 -1
- package/src/media/templates/packages/library/src/library.ts +0 -0
- package/src/media/templates/packages/library/src/main.ts +0 -6
- package/src/media/templates/packages/library/src/style.scss +0 -0
- package/src/media/templates/packages/library/src/types/_.gitignore.txt +0 -1
- package/src/media/templates/packages/library/src/vite-env.d.ts +0 -1
- package/src/media/templates/packages/library/tsconfig.app.json +0 -11
- package/src/media/templates/packages/library/tsconfig.json +0 -7
- package/src/media/templates/packages/library/tsconfig.node.json +0 -7
- package/src/media/templates/packages/library/vite.config.ts +0 -14
- package/src/media/templates/packages/nitro/README.md +0 -1
- package/src/media/templates/packages/nitro/_.gitignore.txt +0 -28
- package/src/media/templates/packages/nitro/index.html +0 -2
- package/src/media/templates/packages/nitro/package.json +0 -25
- package/src/media/templates/packages/nitro/server/plugins/ui-plugin.ts +0 -7
- package/src/media/templates/packages/nitro/server/routes/api/hello.ts +0 -13
- package/src/media/templates/packages/nitro/src/App.vue +0 -10
- package/src/media/templates/packages/nitro/src/assets/_.gitignore.txt +0 -0
- package/src/media/templates/packages/nitro/src/components/_.gitignore.txt +0 -0
- package/src/media/templates/packages/nitro/src/composables/_.gitignore.txt +0 -0
- package/src/media/templates/packages/nitro/src/entry-client.ts +0 -13
- package/src/media/templates/packages/nitro/src/entry-server.ts +0 -29
- package/src/media/templates/packages/nitro/src/main.ts +0 -14
- package/src/media/templates/packages/nitro/src/pages/HomePage.vue +0 -8
- package/src/media/templates/packages/nitro/src/router.ts +0 -11
- package/src/media/templates/packages/nitro/src/style.scss +0 -0
- package/src/media/templates/packages/nitro/src/templates/main.html +0 -21
- package/src/media/templates/packages/nitro/src/vite-env.d.ts +0 -11
- package/src/media/templates/packages/nitro/tsconfig.app.json +0 -14
- package/src/media/templates/packages/nitro/tsconfig.json +0 -7
- package/src/media/templates/packages/nitro/tsconfig.node.json +0 -12
- package/src/media/templates/packages/nitro/vite.config.ts +0 -17
- package/src/media/templates/packages/project/README.md +0 -1
- package/src/media/templates/packages/project/_.gitignore.txt +0 -28
- package/src/media/templates/packages/project/design.config.json +0 -3
- package/src/media/templates/packages/project/index.html +0 -12
- package/src/media/templates/packages/project/materials/README.md +0 -8
- package/src/media/templates/packages/project/materials/prompt.md +0 -41
- package/src/media/templates/packages/project/package.json +0 -13
- package/src/media/templates/packages/project/public/_.gitignore.txt +0 -0
- package/src/media/templates/packages/project/src/App.vue +0 -12
- package/src/media/templates/packages/project/src/assets/_.gitignore.txt +0 -0
- package/src/media/templates/packages/project/src/components/_.gitignore.txt +0 -0
- package/src/media/templates/packages/project/src/composables/_.gitignore.txt +0 -0
- package/src/media/templates/packages/project/src/main.ts +0 -6
- package/src/media/templates/packages/project/src/style.scss +0 -0
- package/src/media/templates/packages/project/src/vite-env.d.ts +0 -1
- package/src/media/templates/packages/project/tsconfig.app.json +0 -11
- package/src/media/templates/packages/project/tsconfig.json +0 -7
- package/src/media/templates/packages/project/tsconfig.node.json +0 -7
- package/src/media/templates/packages/project/vite.config.ts +0 -7
- package/src/media/templates/prompts/aiCodeGlobalPrompt.en.md +0 -22
- package/src/media/templates/prompts/aiCodeGlobalPrompt.ru.md +0 -21
- package/src/media/templates/prompts/aiCodeVuePrompt.en.md +0 -17
- package/src/media/templates/prompts/aiCodeVuePrompt.ru.md +0 -17
- package/src/media/templates/prompts/aiDocClassPrompt.en.txt +0 -63
- package/src/media/templates/prompts/aiDocClassPrompt.ru.txt +0 -63
- package/src/media/templates/prompts/aiDocComposablePrompt.en.txt +0 -67
- package/src/media/templates/prompts/aiDocComposablePrompt.ru.txt +0 -67
- package/src/media/templates/prompts/aiDocFunctionPrompt.en.txt +0 -57
- package/src/media/templates/prompts/aiDocFunctionPrompt.ru.txt +0 -57
- package/src/media/templates/prompts/componentPrompt.en.txt +0 -182
- package/src/media/templates/prompts/componentPrompt.ru.txt +0 -182
- package/src/media/templates/prompts/demoClassEn.mdx +0 -111
- package/src/media/templates/prompts/demoClassRu.mdx +0 -111
- package/src/media/templates/prompts/demoComponentEn.mdx +0 -282
- package/src/media/templates/prompts/demoComponentRu.mdx +0 -282
- package/src/media/templates/prompts/demoComposableEn.mdx +0 -103
- package/src/media/templates/prompts/demoComposableRu.mdx +0 -103
- package/src/media/templates/prompts/demoDocEn.mdx +0 -30
- package/src/media/templates/prompts/demoDocRu.mdx +0 -30
- package/src/media/templates/viteComponentTemplateConfig.ts +0 -14
- package/src/types/aiTypes.ts +0 -19
- package/src/types/configTypes.ts +0 -69
- package/src/types/designTypes.ts +0 -167
- package/src/types/figmaApiTypes.ts +0 -337
- package/src/types/gitTypes.ts +0 -59
- package/src/types/libraryTypes.ts +0 -49
- package/src/types/propertyTypes.ts +0 -586
- package/src/types/screenshotTypes.ts +0 -55
- package/src/types/webTypes.ts +0 -134
- package/src/vite-env.d.ts +0 -1
|
@@ -0,0 +1,4677 @@
|
|
|
1
|
+
import { Anthropic } from '@anthropic-ai/sdk';
|
|
2
|
+
import { Browser } from 'puppeteer';
|
|
3
|
+
import { default as default_2 } from 'typescript';
|
|
4
|
+
import { default as default_3 } from 'node:path';
|
|
5
|
+
import { default as default_4 } from 'node:fs';
|
|
6
|
+
import { EvaluateFunc } from 'puppeteer';
|
|
7
|
+
import { GoogleGenAI } from '@google/genai';
|
|
8
|
+
import { HTTPResponse } from 'puppeteer';
|
|
9
|
+
import { OpenAI } from 'openai';
|
|
10
|
+
import { Page } from 'puppeteer';
|
|
11
|
+
import { PuppeteerLifeCycleEvent } from 'puppeteer';
|
|
12
|
+
import { XaiProvider } from '@ai-sdk/xai';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Abstract AI base class providing common mechanics for AI integrations.
|
|
16
|
+
* Handles prompt accumulation, model selection and unified response workflow.
|
|
17
|
+
*
|
|
18
|
+
* Абстрактный базовый класс AI, обеспечивающий общую механику интеграций:
|
|
19
|
+
* накопление prompt, выбор модели и унифицированный цикл получения ответа.
|
|
20
|
+
*
|
|
21
|
+
* Responsibilities / Ответственности:
|
|
22
|
+
* - Accumulate and compose prompt context / Накопление и компоновка контекста
|
|
23
|
+
* - Select active model / Выбор активной модели
|
|
24
|
+
* - Normalize generation call flow / Нормализация вызова генерации
|
|
25
|
+
*
|
|
26
|
+
* Extension points / Точки расширения:
|
|
27
|
+
* - init(): client / auth / transport setup
|
|
28
|
+
* - response(): concrete model invocation
|
|
29
|
+
*
|
|
30
|
+
* Расширение через методы:
|
|
31
|
+
* - init(): инициализация клиента / авторизация / транспорт
|
|
32
|
+
* - response(): конкретный вызов модели
|
|
33
|
+
*/
|
|
34
|
+
export declare abstract class AiAbstract<AI = any> {
|
|
35
|
+
protected key: string;
|
|
36
|
+
protected model: string;
|
|
37
|
+
protected config: Record<string, any>;
|
|
38
|
+
/** AI client instance / Экземпляр AI-клиента */
|
|
39
|
+
protected ai?: AI;
|
|
40
|
+
/** Prompt prefix / Префикс prompt */
|
|
41
|
+
protected prompt: string;
|
|
42
|
+
/** Accumulated image list / Накопленный список изображений */
|
|
43
|
+
protected images: AiImageList;
|
|
44
|
+
/** Accumulated contents / Накопленное содержимое */
|
|
45
|
+
protected contents: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Constructor initializes implementation specific resources.
|
|
48
|
+
*
|
|
49
|
+
* Конструктор инициализирует ресурсы конкретной реализации.
|
|
50
|
+
* @param key API key / API ключ
|
|
51
|
+
* @param model initial model id / начальный идентификатор модели
|
|
52
|
+
* @param config configuration object / объект конфигурации
|
|
53
|
+
*/
|
|
54
|
+
constructor(key: string, model: string, config?: Record<string, any>);
|
|
55
|
+
/**
|
|
56
|
+
* Returns accumulated image list.
|
|
57
|
+
*
|
|
58
|
+
* Возвращает накопленный список изображений.
|
|
59
|
+
* @returns accumulated image list / накопленный список изображений
|
|
60
|
+
*/
|
|
61
|
+
getImages(): AiImageList;
|
|
62
|
+
/**
|
|
63
|
+
* Returns accumulated contents.
|
|
64
|
+
*
|
|
65
|
+
* Возвращает накопленное содержимое.
|
|
66
|
+
* @returns accumulated contents / накопленное содержимое
|
|
67
|
+
*/
|
|
68
|
+
getContents(): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Appends an image to the accumulated image list.
|
|
71
|
+
*
|
|
72
|
+
* Добавляет изображение к накопленному списку изображений.
|
|
73
|
+
* @param image image item / элемент изображения
|
|
74
|
+
* @returns current instance / текущий экземпляр
|
|
75
|
+
*/
|
|
76
|
+
addImage(image: AiImageItem): this;
|
|
77
|
+
/**
|
|
78
|
+
* Appends content to the accumulated contents.
|
|
79
|
+
*
|
|
80
|
+
* Добавляет содержимое к накопленному содержимому.
|
|
81
|
+
* @param content content string / строка содержимого
|
|
82
|
+
* @returns current instance / текущий экземпляр
|
|
83
|
+
*/
|
|
84
|
+
addContent(content: string): this;
|
|
85
|
+
/**
|
|
86
|
+
* Appends a new line to the accumulated prompt block.
|
|
87
|
+
*
|
|
88
|
+
* Добавляет новую строку к накопленному блоку prompt.
|
|
89
|
+
* @param prompt prompt string to append / строка prompt для добавления
|
|
90
|
+
*/
|
|
91
|
+
addPrompt(prompt: string): void;
|
|
92
|
+
/**
|
|
93
|
+
* Clears entire accumulated image list.
|
|
94
|
+
*
|
|
95
|
+
* Очищает весь накопленный список изображений.
|
|
96
|
+
* @returns current instance / текущий экземпляр
|
|
97
|
+
*/
|
|
98
|
+
resetImages(): this;
|
|
99
|
+
/**
|
|
100
|
+
* Clears entire accumulated contents.
|
|
101
|
+
*
|
|
102
|
+
* Очищает все накопленное содержимое.
|
|
103
|
+
* @returns current instance / текущий экземпляр
|
|
104
|
+
*/
|
|
105
|
+
resetContents(): this;
|
|
106
|
+
/**
|
|
107
|
+
* Clears entire accumulated prompt.
|
|
108
|
+
*
|
|
109
|
+
* Полностью очищает накопленный prompt.
|
|
110
|
+
*/
|
|
111
|
+
resetPrompt(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Sets / switches API key for authentication.
|
|
114
|
+
*
|
|
115
|
+
* Устанавливает / переключает API ключ для аутентификации.
|
|
116
|
+
* @param key new API key / новый API ключ
|
|
117
|
+
* @returns current instance / текущий экземпляр
|
|
118
|
+
*/
|
|
119
|
+
setKey(key: string): this;
|
|
120
|
+
/**
|
|
121
|
+
* Sets / switches current model for generation.
|
|
122
|
+
*
|
|
123
|
+
* Устанавливает / переключает текущую модель для генерации.
|
|
124
|
+
* @param model model identifier / идентификатор модели
|
|
125
|
+
* @returns current instance / текущий экземпляр
|
|
126
|
+
*/
|
|
127
|
+
setModel(model: string): this;
|
|
128
|
+
/**
|
|
129
|
+
* Sets / switches configuration object.
|
|
130
|
+
*
|
|
131
|
+
* Устанавливает / переключает объект конфигурации.
|
|
132
|
+
* @param config configuration object / объект конфигурации
|
|
133
|
+
* @returns current instance / текущий экземпляр
|
|
134
|
+
*/
|
|
135
|
+
setConfig(config: Record<string, any>): this;
|
|
136
|
+
/**
|
|
137
|
+
* Generates AI response using active model and composed contents.
|
|
138
|
+
* Supports retry with random delay and configurable error handling.
|
|
139
|
+
*
|
|
140
|
+
* Генерирует отклик ИИ, используя активную модель и собранный контент.
|
|
141
|
+
* Поддерживает повторные попытки со случайной задержкой и настраиваемой обработкой ошибок.
|
|
142
|
+
* @param contents input contents for generation / входное содержимое для генерации
|
|
143
|
+
* @param exitOnError whether to terminate the process on unrecoverable failure / завершать ли процесс при неустранимой ошибке
|
|
144
|
+
* @param maxRetries number of retry attempts before giving up / количество повторных попыток перед отказом
|
|
145
|
+
* @returns generated response text / сгенерированный текст ответа
|
|
146
|
+
*/
|
|
147
|
+
generate(contents: string, exitOnError?: boolean, maxRetries?: number): Promise<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Combines persistent prompt prefix with provided contents.
|
|
150
|
+
*
|
|
151
|
+
* Объединяет постоянный префикс prompt с переданным содержимым.
|
|
152
|
+
* @param contents input contents / входное содержимое
|
|
153
|
+
* @returns combined prompt content / объединенное содержимое prompt
|
|
154
|
+
*/
|
|
155
|
+
protected getMainContents(contents: string): string;
|
|
156
|
+
/**
|
|
157
|
+
* Implementation hook: initialize client / transport / auth.
|
|
158
|
+
*
|
|
159
|
+
* Хук реализации: инициализация клиента / транспорта / авторизации.
|
|
160
|
+
*/
|
|
161
|
+
protected abstract init(): Promise<void> | void;
|
|
162
|
+
/**
|
|
163
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
164
|
+
*
|
|
165
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
166
|
+
*/
|
|
167
|
+
protected abstract toImages(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
170
|
+
*
|
|
171
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
172
|
+
*/
|
|
173
|
+
protected abstract toContents(): void;
|
|
174
|
+
/**
|
|
175
|
+
* Implementation hook: perform model call and return textual result.
|
|
176
|
+
*
|
|
177
|
+
* Хук реализации: выполнить вызов модели и вернуть текстовый результат.
|
|
178
|
+
* @param model active model id / идентификатор активной модели
|
|
179
|
+
* @param contents composed prompt + contents / собранный prompt + содержимое
|
|
180
|
+
* @returns generated response string / сгенерированная строка ответа
|
|
181
|
+
*/
|
|
182
|
+
protected abstract response(model: string, contents: string): Promise<string>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Claude AI implementation of AiAbstract.
|
|
187
|
+
* Initializes Anthropic client and performs text generation requests.
|
|
188
|
+
*
|
|
189
|
+
* Реализация Claude AI поверх AiAbstract.
|
|
190
|
+
* Инициализирует клиент Anthropic и выполняет запросы генерации текста.
|
|
191
|
+
*
|
|
192
|
+
* Responsibilities / Ответственности:
|
|
193
|
+
* - Provide API key / Предоставить API ключ
|
|
194
|
+
* - Initialize low-level client / Инициализировать низкоуровневый клиент
|
|
195
|
+
* - Call messages.create and extract plain text / Вызвать messages.create и извлечь текст
|
|
196
|
+
*
|
|
197
|
+
* Notes / Примечания:
|
|
198
|
+
* - Model must be set via setModel() before generate() / Модель нужно задать через setModel()
|
|
199
|
+
* - Returns empty string if response is missing / Возвращает пустую строку при отсутствии результата
|
|
200
|
+
*/
|
|
201
|
+
export declare class AiClaude extends AiClaudeLite {
|
|
202
|
+
/**
|
|
203
|
+
* Constructor initializes Claude AI with project configuration.
|
|
204
|
+
*
|
|
205
|
+
* Конструктор инициализирует Claude AI с конфигурацией проекта.
|
|
206
|
+
*/
|
|
207
|
+
constructor();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Claude AI implementation via Agent SDK.
|
|
212
|
+
* Automatically configured using project environment settings.
|
|
213
|
+
*
|
|
214
|
+
* Реализация Claude AI через Agent SDK.
|
|
215
|
+
* Автоматически настраивается с использованием настроек окружения проекта.
|
|
216
|
+
*/
|
|
217
|
+
export declare class AiClaudeAgent extends AiClaudeAgentLite {
|
|
218
|
+
/**
|
|
219
|
+
* Constructor initializes Claude Agent AI with project configuration.
|
|
220
|
+
*
|
|
221
|
+
* Конструктор инициализирует Claude Agent AI с конфигурацией проекта.
|
|
222
|
+
*/
|
|
223
|
+
constructor();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Claude AI implementation via Agent SDK.
|
|
228
|
+
* Uses @anthropic-ai/claude-agent-sdk to interact with Claude as an agent.
|
|
229
|
+
*
|
|
230
|
+
* Реализация Claude AI через Agent SDK.
|
|
231
|
+
* Использует @anthropic-ai/claude-agent-sdk для взаимодействия с Claude в режиме агента.
|
|
232
|
+
*
|
|
233
|
+
* Responsibilities / Ответственности:
|
|
234
|
+
* - Initialize Agent SDK client / Инициализировать Agent SDK клиент
|
|
235
|
+
* - Execute query via Agent SDK / Выполнить запрос через Agent SDK
|
|
236
|
+
* - Extract and return textual result / Извлечь и вернуть текстовый результат
|
|
237
|
+
*/
|
|
238
|
+
export declare class AiClaudeAgentLite extends AiAbstract<{}> {
|
|
239
|
+
/**
|
|
240
|
+
* Initializes the Agent SDK client instance.
|
|
241
|
+
*
|
|
242
|
+
* Инициализирует экземпляр клиента Agent SDK.
|
|
243
|
+
*/
|
|
244
|
+
protected init(): Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
247
|
+
* Agent SDK implementation logic for images can be added if supported by the SDK.
|
|
248
|
+
*
|
|
249
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
250
|
+
* Логика изображений может быть добавлена при поддержке SDK.
|
|
251
|
+
* @returns array of converted images / массив преобразованных изображений
|
|
252
|
+
*/
|
|
253
|
+
protected toImages(): any;
|
|
254
|
+
/**
|
|
255
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
256
|
+
*
|
|
257
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
258
|
+
* @returns formatted content string / отформатированная строка содержимого
|
|
259
|
+
*/
|
|
260
|
+
protected toContents(): any;
|
|
261
|
+
/**
|
|
262
|
+
* Performs content generation request via Agent SDK and returns textual result.
|
|
263
|
+
*
|
|
264
|
+
* Выполняет запрос генерации контента через Agent SDK и возвращает текстовый результат.
|
|
265
|
+
* @param model model identifier / идентификатор модели
|
|
266
|
+
* @param contents composed contents for generation / собранный контент для генерации
|
|
267
|
+
* @returns generated text response / сгенерированный текстовый ответ
|
|
268
|
+
*/
|
|
269
|
+
protected response(model: string, contents: string): Promise<string>;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Claude AI implementation via CLI.
|
|
274
|
+
* Extends AiClaudeCliLite and provides configuration from the project environment.
|
|
275
|
+
*
|
|
276
|
+
* Реализация Claude AI через CLI.
|
|
277
|
+
* Расширяет AiClaudeCliLite и предоставляет конфигурацию из окружения проекта.
|
|
278
|
+
*
|
|
279
|
+
* Responsibilities / Ответственности:
|
|
280
|
+
* - Provide API key and model from config / Предоставить API ключ и модель из конфигурации
|
|
281
|
+
* - Initialize CLI wrapper / Инициализировать обертку CLI
|
|
282
|
+
*
|
|
283
|
+
* Notes / Примечания:
|
|
284
|
+
* - Uses getConfigAi() to retrieve credentials / Использует getConfigAi() для получения учетных данных
|
|
285
|
+
*/
|
|
286
|
+
export declare class AiClaudeCli extends AiClaudeCliLite {
|
|
287
|
+
/**
|
|
288
|
+
* Constructor initializes Claude CLI AI with project configuration.
|
|
289
|
+
*
|
|
290
|
+
* Конструктор инициализирует Claude CLI AI с конфигурацией проекта.
|
|
291
|
+
*/
|
|
292
|
+
constructor();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Claude AI implementation via CLI.
|
|
297
|
+
* Executes Claude CLI commands directly without a system shell.
|
|
298
|
+
*
|
|
299
|
+
* Реализация Claude AI через CLI.
|
|
300
|
+
* Выполняет команды Claude CLI напрямую, без системной оболочки.
|
|
301
|
+
*
|
|
302
|
+
* Responsibilities / Ответственности:
|
|
303
|
+
* - Construct CLI command / Сформировать CLI команду
|
|
304
|
+
* - Execute command without shell / Выполнить команду без оболочки
|
|
305
|
+
* - Return stdout as result / Вернуть stdout как результат
|
|
306
|
+
*
|
|
307
|
+
* Notes / Примечания:
|
|
308
|
+
* - Requires 'claude' CLI tool installed / Требует установленной утилиты 'claude'
|
|
309
|
+
* - API key is passed via environment variable or config / API ключ передается через переменную окружения или конфиг
|
|
310
|
+
*/
|
|
311
|
+
export declare class AiClaudeCliLite extends AiAbstract<{}> {
|
|
312
|
+
/** Temporary prompt file manager / Менеджер временных файлов промпта */
|
|
313
|
+
protected readonly tmp: ApiTmp;
|
|
314
|
+
/**
|
|
315
|
+
* Initializes the client instance.
|
|
316
|
+
*
|
|
317
|
+
* Инициализирует экземпляр клиента.
|
|
318
|
+
*/
|
|
319
|
+
protected init(): Promise<void>;
|
|
320
|
+
/**
|
|
321
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
322
|
+
* CLI implementation currently ignores images.
|
|
323
|
+
*
|
|
324
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
325
|
+
* Реализация CLI в настоящее время игнорирует изображения.
|
|
326
|
+
* @returns array of converted images / массив преобразованных изображений
|
|
327
|
+
*/
|
|
328
|
+
protected toImages(): any;
|
|
329
|
+
/**
|
|
330
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
331
|
+
*
|
|
332
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
333
|
+
* @returns array of formatted prompt strings / массив отформатированных строк промпта
|
|
334
|
+
*/
|
|
335
|
+
protected toContents(): any;
|
|
336
|
+
/**
|
|
337
|
+
* Performs content generation request via CLI and returns textual result.
|
|
338
|
+
*
|
|
339
|
+
* Выполняет запрос генерации контента через CLI и возвращает текстовый результат.
|
|
340
|
+
* @param model model identifier / идентификатор модели
|
|
341
|
+
* @param contents composed contents for generation / собранный контент для генерации
|
|
342
|
+
* @returns generated text response / сгенерированный текстовый ответ
|
|
343
|
+
*/
|
|
344
|
+
protected response(model: string, contents: string): Promise<string>;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Claude AI implementation of AiAbstract.
|
|
349
|
+
* Initializes Anthropic client and performs text generation requests.
|
|
350
|
+
*
|
|
351
|
+
* Реализация Claude AI поверх AiAbstract.
|
|
352
|
+
* Инициализирует клиент Anthropic и выполняет запросы генерации текста.
|
|
353
|
+
*
|
|
354
|
+
* Responsibilities / Ответственности:
|
|
355
|
+
* - Provide API key / Предоставить API ключ
|
|
356
|
+
* - Initialize Anthropic client / Инициализировать клиент Anthropic
|
|
357
|
+
* - Call messages.create and extract text content / Вызвать messages.create и извлечь текст
|
|
358
|
+
*
|
|
359
|
+
* Notes / Примечания:
|
|
360
|
+
* - Model must be set via setModel() before generate() / Модель нужно задать через setModel()
|
|
361
|
+
* - Returns empty string if response is missing / Возвращает пустую строку при отсутствии результата
|
|
362
|
+
*/
|
|
363
|
+
export declare class AiClaudeLite extends AiAbstract<Anthropic> {
|
|
364
|
+
/**
|
|
365
|
+
* Initializes Anthropic client instance.
|
|
366
|
+
*
|
|
367
|
+
* Инициализирует экземпляр клиента Anthropic.
|
|
368
|
+
*/
|
|
369
|
+
protected init(): Promise<void>;
|
|
370
|
+
/**
|
|
371
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
372
|
+
* Claude expects images as content blocks with type 'image'.
|
|
373
|
+
*
|
|
374
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
375
|
+
* Claude ожидает изображения как блоки контента с типом 'image'.
|
|
376
|
+
* @returns array of converted image blocks / массив преобразованных блоков изображений
|
|
377
|
+
*/
|
|
378
|
+
protected toImages(): any;
|
|
379
|
+
/**
|
|
380
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
381
|
+
* Claude expects text as content blocks with type 'text'.
|
|
382
|
+
*
|
|
383
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
384
|
+
* Claude ожидает текст как блоки контента с типом 'text'.
|
|
385
|
+
* @returns array of converted text blocks / массив преобразованных текстовых блоков
|
|
386
|
+
*/
|
|
387
|
+
protected toContents(): any;
|
|
388
|
+
/**
|
|
389
|
+
* Performs content generation request and returns textual result.
|
|
390
|
+
*
|
|
391
|
+
* Выполняет запрос генерации контента и возвращает текстовый результат.
|
|
392
|
+
* @param model model identifier (e.g., 'claude-3-5-sonnet-20241022') / идентификатор модели
|
|
393
|
+
* @param contents composed contents for generation / собранный контент для генерации
|
|
394
|
+
* @returns generated text response / сгенерированный текстовый ответ
|
|
395
|
+
*/
|
|
396
|
+
protected response(model: string, contents: string): Promise<string>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Google AI (Gemini) implementation of AiAbstract.
|
|
401
|
+
* Initializes GoogleGenAI client and performs text generation requests.
|
|
402
|
+
*
|
|
403
|
+
* Реализация Google AI (Gemini) поверх AiAbstract.
|
|
404
|
+
* Инициализирует клиент GoogleGenAI и выполняет запросы генерации текста.
|
|
405
|
+
*
|
|
406
|
+
* Responsibilities / Ответственности:
|
|
407
|
+
* - Provide API key / Предоставить API ключ
|
|
408
|
+
* - Initialize low-level client / Инициализировать низкоуровневый клиент
|
|
409
|
+
* - Call generateContent and extract plain text / Вызвать generateContent и извлечь текст
|
|
410
|
+
*
|
|
411
|
+
* Notes / Примечания:
|
|
412
|
+
* - Model must be set via setModel() before generate() / Модель нужно задать через setModel()
|
|
413
|
+
* - Returns empty string if response is missing / Возвращает пустую строку при отсутствии результата
|
|
414
|
+
*/
|
|
415
|
+
export declare class AiGoogle extends AiGoogleLite {
|
|
416
|
+
/**
|
|
417
|
+
* Constructor initializes Google AI with project configuration.
|
|
418
|
+
*
|
|
419
|
+
* Конструктор инициализирует Google AI с конфигурацией проекта.
|
|
420
|
+
*/
|
|
421
|
+
constructor();
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Google AI (Gemini) implementation via CLI.
|
|
426
|
+
* Extends AiGoogleCliLite and provides configuration from the project environment.
|
|
427
|
+
*
|
|
428
|
+
* Реализация Google AI (Gemini) через CLI.
|
|
429
|
+
* Расширяет AiGoogleCliLite и предоставляет конфигурацию из окружения проекта.
|
|
430
|
+
*
|
|
431
|
+
* Responsibilities / Ответственности:
|
|
432
|
+
* - Provide API key and model from config / Предоставить API ключ и модель из конфигурации
|
|
433
|
+
* - Initialize CLI wrapper / Инициализировать обертку CLI
|
|
434
|
+
*
|
|
435
|
+
* Notes / Примечания:
|
|
436
|
+
* - Uses getConfigAi() to retrieve credentials / Использует getConfigAi() для получения учетных данных
|
|
437
|
+
*/
|
|
438
|
+
export declare class AiGoogleCli extends AiGoogleCliLite {
|
|
439
|
+
/**
|
|
440
|
+
* Constructor initializes Google CLI AI with project configuration.
|
|
441
|
+
*
|
|
442
|
+
* Конструктор инициализирует Google CLI AI с конфигурацией проекта.
|
|
443
|
+
*/
|
|
444
|
+
constructor();
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Google AI (Gemini) implementation via CLI.
|
|
449
|
+
* Executes Gemini CLI commands directly without a system shell.
|
|
450
|
+
*
|
|
451
|
+
* Реализация Google AI (Gemini) через CLI.
|
|
452
|
+
* Выполняет команды Gemini CLI напрямую, без системной оболочки.
|
|
453
|
+
*
|
|
454
|
+
* Responsibilities / Ответственности:
|
|
455
|
+
* - Construct CLI command / Сформировать CLI команду
|
|
456
|
+
* - Execute command without shell / Выполнить команду без оболочки
|
|
457
|
+
* - Return stdout as result / Вернуть stdout как результат
|
|
458
|
+
*
|
|
459
|
+
* Notes / Примечания:
|
|
460
|
+
* - Requires 'gemini' CLI tool installed / Требует установленной утилиты 'gemini'
|
|
461
|
+
* - API key is passed via environment variable or config / API ключ передается через переменную окружения или конфиг
|
|
462
|
+
*/
|
|
463
|
+
export declare class AiGoogleCliLite extends AiAbstract<{}> {
|
|
464
|
+
/** Temporary prompt file manager / Менеджер временных файлов промпта */
|
|
465
|
+
protected readonly tmp: ApiTmp;
|
|
466
|
+
/**
|
|
467
|
+
* Initializes the client instance.
|
|
468
|
+
*
|
|
469
|
+
* Инициализирует экземпляр клиента.
|
|
470
|
+
*/
|
|
471
|
+
protected init(): Promise<void>;
|
|
472
|
+
/**
|
|
473
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
474
|
+
* CLI implementation currently ignores images.
|
|
475
|
+
*
|
|
476
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
477
|
+
* Реализация CLI в настоящее время игнорирует изображения.
|
|
478
|
+
* @returns array of converted images / массив преобразованных изображений
|
|
479
|
+
*/
|
|
480
|
+
protected toImages(): any;
|
|
481
|
+
/**
|
|
482
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
483
|
+
*
|
|
484
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
485
|
+
* @returns array of formatted prompt strings / массив отформатированных строк промпта
|
|
486
|
+
*/
|
|
487
|
+
protected toContents(): any;
|
|
488
|
+
/**
|
|
489
|
+
* Performs content generation request via CLI and returns textual result.
|
|
490
|
+
*
|
|
491
|
+
* Выполняет запрос генерации контента через CLI и возвращает текстовый результат.
|
|
492
|
+
* @param model model identifier / идентификатор модели
|
|
493
|
+
* @param contents composed contents for generation / собранный контент для генерации
|
|
494
|
+
* @returns generated text response / сгенерированный текстовый ответ
|
|
495
|
+
*/
|
|
496
|
+
protected response(model: string, contents: string): Promise<string>;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Google AI (Gemini) implementation of AiAbstract.
|
|
501
|
+
* Initializes GoogleGenAI client and performs text generation requests.
|
|
502
|
+
*
|
|
503
|
+
* Реализация Google AI (Gemini) поверх AiAbstract.
|
|
504
|
+
* Инициализирует клиент GoogleGenAI и выполняет запросы генерации текста.
|
|
505
|
+
*
|
|
506
|
+
* Responsibilities / Ответственности:
|
|
507
|
+
* - Provide API key / Предоставить API ключ
|
|
508
|
+
* - Initialize low-level client / Инициализировать низкоуровневый клиент
|
|
509
|
+
* - Call generateContent and extract plain text / Вызвать generateContent и извлечь текст
|
|
510
|
+
*
|
|
511
|
+
* Notes / Примечания:
|
|
512
|
+
* - Model must be set via setModel() before generate() / Модель нужно задать через setModel()
|
|
513
|
+
* - Returns empty string if response is missing / Возвращает пустую строку при отсутствии результата
|
|
514
|
+
*/
|
|
515
|
+
export declare class AiGoogleLite extends AiAbstract<GoogleGenAI> {
|
|
516
|
+
/**
|
|
517
|
+
* Initializes GoogleGenAI client instance.
|
|
518
|
+
*
|
|
519
|
+
* Инициализирует экземпляр клиента GoogleGenAI.
|
|
520
|
+
*/
|
|
521
|
+
protected init(): Promise<void>;
|
|
522
|
+
/**
|
|
523
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
524
|
+
*
|
|
525
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
526
|
+
* @returns array of converted inline data images / массив преобразованных встроенных данных изображений
|
|
527
|
+
*/
|
|
528
|
+
protected toImages(): any;
|
|
529
|
+
/**
|
|
530
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
531
|
+
*
|
|
532
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
533
|
+
* @returns array of converted text parts / массив преобразованных текстовых частей
|
|
534
|
+
*/
|
|
535
|
+
protected toContents(): any;
|
|
536
|
+
/**
|
|
537
|
+
* Performs content generation request and returns textual result.
|
|
538
|
+
*
|
|
539
|
+
* Выполняет запрос генерации контента и возвращает текстовый результат.
|
|
540
|
+
* @param model model identifier / идентификатор модели
|
|
541
|
+
* @param contents composed contents for generation / собранный контент для генерации
|
|
542
|
+
* @returns generated text response / сгенерированный текстовый ответ
|
|
543
|
+
*/
|
|
544
|
+
protected response(model: string, contents: string): Promise<string>;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* AI image item representing a base64 encoded image with MIME type.
|
|
549
|
+
*
|
|
550
|
+
* Элемент изображения AI, представляющий base64-кодированное изображение с MIME-типом.
|
|
551
|
+
*/
|
|
552
|
+
export declare type AiImageItem = {
|
|
553
|
+
/** Image MIME type / MIME-тип изображения */
|
|
554
|
+
mime: string;
|
|
555
|
+
/** Base64 encoded image string / Строка изображения в кодировке base64 */
|
|
556
|
+
base64: string;
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* List of AI image items.
|
|
561
|
+
*
|
|
562
|
+
* Список элементов изображений AI.
|
|
563
|
+
*/
|
|
564
|
+
export declare type AiImageList = AiImageItem[];
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* OpenAI implementation of AiAbstract.
|
|
568
|
+
* Initializes OpenAI client and performs text generation requests.
|
|
569
|
+
*
|
|
570
|
+
* Реализация OpenAI поверх AiAbstract.
|
|
571
|
+
* Инициализирует клиент OpenAI и выполняет запросы генерации текста.
|
|
572
|
+
*
|
|
573
|
+
* Responsibilities / Ответственности:
|
|
574
|
+
* - Provide API key / Предоставить API ключ
|
|
575
|
+
* - Initialize low-level client / Инициализировать низкоуровневый клиент
|
|
576
|
+
* - Call chat.completions.create and extract plain text / Вызвать chat.completions.create и извлечь текст
|
|
577
|
+
*
|
|
578
|
+
* Notes / Примечания:
|
|
579
|
+
* - Model must be set via setModel() before generate() / Модель нужно задать через setModel()
|
|
580
|
+
* - Returns empty string if response is missing / Возвращает пустую строку при отсутствии результата
|
|
581
|
+
*/
|
|
582
|
+
export declare class AiOpenAi extends AiOpenAiLite {
|
|
583
|
+
/**
|
|
584
|
+
* Constructor initializes OpenAI with project configuration.
|
|
585
|
+
*
|
|
586
|
+
* Конструктор инициализирует OpenAI с конфигурацией проекта.
|
|
587
|
+
*/
|
|
588
|
+
constructor();
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* OpenAI implementation of AiAbstract.
|
|
593
|
+
* Initializes OpenAI client and performs text generation requests.
|
|
594
|
+
*
|
|
595
|
+
* Реализация OpenAI поверх AiAbstract.
|
|
596
|
+
* Инициализирует клиент OpenAI и выполняет запросы генерации текста.
|
|
597
|
+
*
|
|
598
|
+
* Responsibilities / Ответственности:
|
|
599
|
+
* - Provide API key / Предоставить API ключ
|
|
600
|
+
* - Initialize OpenAI client / Инициализировать клиент OpenAI
|
|
601
|
+
* - Call chat.completions.create and extract text content / Вызвать chat.completions.create и извлечь текст
|
|
602
|
+
*
|
|
603
|
+
* Notes / Примечания:
|
|
604
|
+
* - Model must be set via setModel() before generate() / Модель нужно задать через setModel()
|
|
605
|
+
* - Returns empty string if response is missing / Возвращает пустую строку при отсутствии результата
|
|
606
|
+
*/
|
|
607
|
+
export declare class AiOpenAiLite extends AiAbstract<OpenAI> {
|
|
608
|
+
/**
|
|
609
|
+
* Initializes OpenAI client instance.
|
|
610
|
+
*
|
|
611
|
+
* Инициализирует экземпляр клиента OpenAI.
|
|
612
|
+
*/
|
|
613
|
+
protected init(): Promise<void>;
|
|
614
|
+
/**
|
|
615
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
616
|
+
* OpenAI expects images as content blocks with type 'image_url'.
|
|
617
|
+
*
|
|
618
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
619
|
+
* OpenAI ожидает изображения как блоки контента с типом 'image_url'.
|
|
620
|
+
* @returns array of converted image blocks / массив преобразованных блоков изображений
|
|
621
|
+
*/
|
|
622
|
+
protected toImages(): any;
|
|
623
|
+
/**
|
|
624
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
625
|
+
* OpenAI expects text as content blocks with type 'text'.
|
|
626
|
+
*
|
|
627
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
628
|
+
* OpenAI ожидает текст как блоки контента с типом 'text'.
|
|
629
|
+
* @returns array of converted text blocks / массив преобразованных текстовых блоков
|
|
630
|
+
*/
|
|
631
|
+
protected toContents(): any;
|
|
632
|
+
/**
|
|
633
|
+
* Performs content generation request and returns textual result.
|
|
634
|
+
*
|
|
635
|
+
* Выполняет запрос генерации контента и возвращает текстовый результат.
|
|
636
|
+
* @param model model identifier (e.g., 'gpt-4o') / идентификатор модели
|
|
637
|
+
* @param contents composed contents for generation / собранный контент для генерации
|
|
638
|
+
* @returns generated text response / сгенерированный текстовый ответ
|
|
639
|
+
*/
|
|
640
|
+
protected response(model: string, contents: string): Promise<string>;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* AI provider type for code and content generation.
|
|
645
|
+
*
|
|
646
|
+
* Тип ИИ-провайдера для генерации кода и контента.
|
|
647
|
+
*/
|
|
648
|
+
export declare type AiType = 'claude' | 'claude-cli' | 'claude-agent' | 'gemini' | 'gemini-cli' | 'openai' | 'zai';
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Z.ai (Zhipu AI) implementation extending AiZAiLite.
|
|
652
|
+
* Automatically configured using project environment settings.
|
|
653
|
+
*
|
|
654
|
+
* Реализация Z.ai (Zhipu AI) расширяющая AiZAiLite.
|
|
655
|
+
* Автоматически настраивается с использованием настроек окружения проекта.
|
|
656
|
+
*/
|
|
657
|
+
export declare class AiZAi extends AiZAiLite {
|
|
658
|
+
/**
|
|
659
|
+
* Constructor initializes Z.ai / xAI with project configuration.
|
|
660
|
+
*
|
|
661
|
+
* Конструктор инициализирует Z.ai / xAI с конфигурацией проекта.
|
|
662
|
+
*/
|
|
663
|
+
constructor();
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* xAI (Grok) implementation of AiAbstract using @ai-sdk/xai and ai SDK.
|
|
668
|
+
* Performs text generation requests via Grok models (e.g. grok-4.5).
|
|
669
|
+
*
|
|
670
|
+
* Реализация xAI (Grok) поверх AiAbstract с использованием @ai-sdk/xai и ai SDK.
|
|
671
|
+
* Выполняет запросы генерации текста через модели Grok (например, grok-4.5).
|
|
672
|
+
*
|
|
673
|
+
* Responsibilities / Ответственности:
|
|
674
|
+
* - Initialize xAI client provider / Инициализировать провайдер клиента xAI
|
|
675
|
+
* - Execute generateText via Grok responses model / Выполнять generateText через модель ответов Grok
|
|
676
|
+
*/
|
|
677
|
+
export declare class AiZAiLite extends AiAbstract<XaiProvider> {
|
|
678
|
+
/**
|
|
679
|
+
* Initializes xAI client provider instance.
|
|
680
|
+
*
|
|
681
|
+
* Инициализирует экземпляр провайдера клиента xAI.
|
|
682
|
+
*/
|
|
683
|
+
protected init(): Promise<void>;
|
|
684
|
+
/**
|
|
685
|
+
* Implementation hook: convert accumulated images to model-specific format.
|
|
686
|
+
*
|
|
687
|
+
* Хук реализации: преобразовать накопленные изображения в формат, специфичный для модели.
|
|
688
|
+
* @returns array of converted image blocks / массив преобразованных блоков изображений
|
|
689
|
+
*/
|
|
690
|
+
protected toImages(): any[];
|
|
691
|
+
/**
|
|
692
|
+
* Implementation hook: convert accumulated contents to model-specific format.
|
|
693
|
+
*
|
|
694
|
+
* Хук реализации: преобразовать накопленное содержимое в формат, специфичный для модели.
|
|
695
|
+
* @returns array of converted text blocks / массив преобразованных текстовых блоков
|
|
696
|
+
*/
|
|
697
|
+
protected toContents(): any[];
|
|
698
|
+
/**
|
|
699
|
+
* Performs content generation request using xAI responses model and returns textual result.
|
|
700
|
+
*
|
|
701
|
+
* Выполняет запрос генерации контента с использованием модели ответов xAI и возвращает текстовый результат.
|
|
702
|
+
* @param model Model identifier (e.g., 'grok-4.5') / Идентификатор модели
|
|
703
|
+
* @param contents Composed contents for generation / Собранный контент для генерации
|
|
704
|
+
* @returns Generated text response / Сгенерированный текстовый ответ
|
|
705
|
+
*/
|
|
706
|
+
protected response(model: string, contents: string): Promise<string>;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Manager for temporary prompt files used during CLI AI executions.
|
|
711
|
+
* Handles unique file creation and cleanup of files created by the instance.
|
|
712
|
+
*
|
|
713
|
+
* Менеджер временных файлов промптов, используемых при выполнении CLI ИИ.
|
|
714
|
+
* Обеспечивает создание уникальных файлов и очистку файлов, созданных экземпляром.
|
|
715
|
+
*/
|
|
716
|
+
export declare class ApiTmp {
|
|
717
|
+
/** Global file counter for generating unique temporary filenames across all instances / Глобальный счетчик файлов для генерации уникальных временных имен файлов во всех экземплярах */
|
|
718
|
+
protected static idFileGlobal: number;
|
|
719
|
+
/** List of temporary file paths created by this instance / Список путей временных файлов, созданных этим экземпляром */
|
|
720
|
+
protected readonly createdFiles: string[];
|
|
721
|
+
/**
|
|
722
|
+
* Generates a unique file path for the temporary prompt.
|
|
723
|
+
*
|
|
724
|
+
* Генерирует уникальный путь к временному файлу для промпта.
|
|
725
|
+
* @returns unique temporary file path / уникальный путь к временному файлу
|
|
726
|
+
*/
|
|
727
|
+
protected getFileName(): string;
|
|
728
|
+
/**
|
|
729
|
+
* Creates a temporary file with the prompt content and returns the path formatted for the CLI.
|
|
730
|
+
*
|
|
731
|
+
* Создает временный файл с содержимым промпта и возвращает путь, отформатированный для CLI.
|
|
732
|
+
* @param content prompt content / содержимое промпта
|
|
733
|
+
* @returns formatted file path (e.g., @./ai-tmp/Prompt-1.txt) / отформатированный путь к файлу (например, @./ai-tmp/Prompt-1.txt)
|
|
734
|
+
*/
|
|
735
|
+
createFile(content: string): string;
|
|
736
|
+
/**
|
|
737
|
+
* Cleans up temporary files created by this instance without touching files of concurrent instances.
|
|
738
|
+
*
|
|
739
|
+
* Очищает временные файлы, созданные этим экземпляром, не затрагивая файлы параллельных экземпляров.
|
|
740
|
+
*/
|
|
741
|
+
removeFile(): void;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Class for managing browser instances and taking screenshots using Puppeteer.
|
|
746
|
+
*
|
|
747
|
+
* Класс для управления экземплярами браузера и создания скриншотов с помощью Puppeteer.
|
|
748
|
+
*/
|
|
749
|
+
export declare class BrowserItem {
|
|
750
|
+
protected url: string;
|
|
751
|
+
protected readonly options: ScreenshotOptions;
|
|
752
|
+
/** Browser instance / Экземпляр браузера */
|
|
753
|
+
protected browser?: Browser;
|
|
754
|
+
/** Page instance / Экземпляр страницы */
|
|
755
|
+
protected page?: Page;
|
|
756
|
+
/** HTTP Response from page loading / HTTP-ответ при загрузке страницы */
|
|
757
|
+
protected response?: HTTPResponse;
|
|
758
|
+
/** Total scrollable width of the loaded page / Полная прокручиваемая ширина загруженной страницы */
|
|
759
|
+
protected pageWidth: number;
|
|
760
|
+
/** Total scrollable height of the loaded page / Полная прокручиваемая высота загруженной страницы */
|
|
761
|
+
protected pageHeight: number;
|
|
762
|
+
/**
|
|
763
|
+
* Constructor for BrowserItem.
|
|
764
|
+
*
|
|
765
|
+
* Конструктор для BrowserItem.
|
|
766
|
+
* @param url component or page URL / URL компонента или страницы
|
|
767
|
+
* @param options additional options for capture / дополнительные опции захвата
|
|
768
|
+
*/
|
|
769
|
+
constructor(url: string, options?: ScreenshotOptions);
|
|
770
|
+
/** Additional arguments for browser launch / Дополнительные аргументы для запуска браузера */
|
|
771
|
+
get args(): string[];
|
|
772
|
+
/** Condition to wait for when navigating to the page / Условие, которое нужно дождаться при переходе на страницу */
|
|
773
|
+
get waitUntil(): PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
|
774
|
+
/** Timeout for navigating to the page / Таймаут для перехода на страницу */
|
|
775
|
+
get timeout(): number;
|
|
776
|
+
/** Image format for screenshots / Формат изображения для скриншотов */
|
|
777
|
+
get format(): ScreenshotOptions['format'];
|
|
778
|
+
/** Viewport width for the initial capture / Ширина порта просмотра для начального захвата */
|
|
779
|
+
get width(): number;
|
|
780
|
+
/** Viewport height for the initial capture and page-by-page slicing / Высота порта просмотра для начального захвата и постраничной нарезки */
|
|
781
|
+
get height(): number;
|
|
782
|
+
/** Quality for JPEG/WebP formats (0-100) / Качество для форматов JPEG/WebP (0-100) */
|
|
783
|
+
get quality(): number;
|
|
784
|
+
/** Whether to capture the whole scrollable page at once or in slices / Захватывать ли всю прокручиваемую страницу сразу или по частям */
|
|
785
|
+
get fullPage(): boolean;
|
|
786
|
+
/** File extension based on the selected format / Расширение файла на основе выбранного формата */
|
|
787
|
+
get extension(): string;
|
|
788
|
+
/**
|
|
789
|
+
* launches or returns the browser instance.
|
|
790
|
+
*
|
|
791
|
+
* Запускает или возвращает экземпляр браузера.
|
|
792
|
+
* @returns browser instance / экземпляр браузера
|
|
793
|
+
*/
|
|
794
|
+
getBrowser(): Promise<Browser>;
|
|
795
|
+
/**
|
|
796
|
+
* Creates or returns the page instance.
|
|
797
|
+
*
|
|
798
|
+
* Создает или возвращает экземпляр страницы.
|
|
799
|
+
* @returns page instance / экземпляр страницы
|
|
800
|
+
*/
|
|
801
|
+
getPage(): Promise<Page>;
|
|
802
|
+
/**
|
|
803
|
+
* Navigates to the URL and returns the HTTP response.
|
|
804
|
+
*
|
|
805
|
+
* Переходит по URL и возвращает HTTP-ответ.
|
|
806
|
+
* @returns HTTP response or undefined / HTTP-ответ или undefined
|
|
807
|
+
*/
|
|
808
|
+
getResponse(): Promise<HTTPResponse | undefined>;
|
|
809
|
+
/**
|
|
810
|
+
* Retrieves the HTML content of the page.
|
|
811
|
+
*
|
|
812
|
+
* Извлекает HTML-содержимое страницы.
|
|
813
|
+
* @returns html content string / HTML-содержимое
|
|
814
|
+
*/
|
|
815
|
+
getDom(): Promise<string>;
|
|
816
|
+
/**
|
|
817
|
+
* Retrieves the HTML content of the body.
|
|
818
|
+
*
|
|
819
|
+
* Извлекает HTML-содержимое тела (body) страницы.
|
|
820
|
+
* @returns body html content string / HTML-содержимое body
|
|
821
|
+
*/
|
|
822
|
+
getBody(): Promise<string>;
|
|
823
|
+
/**
|
|
824
|
+
* Retrieves all CSS styles from the page.
|
|
825
|
+
*
|
|
826
|
+
* Извлекает все CSS-стили со страницы.
|
|
827
|
+
* @returns CSS content string / CSS-содержимое
|
|
828
|
+
*/
|
|
829
|
+
getStyles(): Promise<string>;
|
|
830
|
+
/**
|
|
831
|
+
* Extracts scrollable dimensions of the page.
|
|
832
|
+
*
|
|
833
|
+
* Извлекает прокручиваемые размеры страницы.
|
|
834
|
+
* @returns object with width and height / объект с шириной и высотой
|
|
835
|
+
*/
|
|
836
|
+
getMetrics(): Promise<ScreenshotMetrics>;
|
|
837
|
+
/**
|
|
838
|
+
* Evaluates a function in the browser context.
|
|
839
|
+
*
|
|
840
|
+
* Выполняет функцию в контексте браузера.
|
|
841
|
+
* @param pageFunction function to evaluate / функция для выполнения
|
|
842
|
+
* @param args arguments for the function / аргументы для функции
|
|
843
|
+
* @returns result of evaluation / результат выполнения
|
|
844
|
+
*/
|
|
845
|
+
evaluate<Params extends unknown[], Func extends EvaluateFunc<Params> = EvaluateFunc<Params>>(pageFunction: Func | string, ...args: Params): Promise<Awaited<ReturnType<Func>> | undefined>;
|
|
846
|
+
/**
|
|
847
|
+
* Captures screenshots based on the fullPage option.
|
|
848
|
+
*
|
|
849
|
+
* Создает скриншоты в зависимости от опции fullPage.
|
|
850
|
+
* @param outputPath base path for saving / базовый путь для сохранения
|
|
851
|
+
* @returns this instance / этот экземпляр
|
|
852
|
+
*/
|
|
853
|
+
screenshot(outputPath: string): Promise<this>;
|
|
854
|
+
/**
|
|
855
|
+
* Resets internal page and response states.
|
|
856
|
+
*
|
|
857
|
+
* Сбрасывает состояние страницы и ответа.
|
|
858
|
+
* @returns this instance / этот экземпляр
|
|
859
|
+
*/
|
|
860
|
+
reset(): Promise<this>;
|
|
861
|
+
/**
|
|
862
|
+
* Formats the final file path based on current state and index.
|
|
863
|
+
*
|
|
864
|
+
* Форматирует итоговый путь к файлу на основе состояния и индекса.
|
|
865
|
+
* @param outputPath original output path / исходный путь сохранения
|
|
866
|
+
* @param index current page index / текущий индекс страницы
|
|
867
|
+
* @param max total pages count / общее количество страниц
|
|
868
|
+
* @returns formatted path string / отформатированная строка пути
|
|
869
|
+
*/
|
|
870
|
+
protected getOutputPath(outputPath: string, index?: number, max?: number): string;
|
|
871
|
+
/**
|
|
872
|
+
* Internal wrapper for Puppeteer's screenshot method.
|
|
873
|
+
*
|
|
874
|
+
* Внутренняя обертка для метода скриншота Puppeteer.
|
|
875
|
+
* @param path specific file path / путь к конкретному файлу
|
|
876
|
+
* @returns this instance / этот экземпляр
|
|
877
|
+
*/
|
|
878
|
+
protected saveScreenshot(path: string): Promise<this>;
|
|
879
|
+
/**
|
|
880
|
+
* Iterates through page slices and saves multiple screenshots.
|
|
881
|
+
*
|
|
882
|
+
* Проходит по частям страницы и сохраняет несколько скриншотов.
|
|
883
|
+
* @param outputPath base output path / базовый путь сохранения
|
|
884
|
+
* @returns this instance / этот экземпляр
|
|
885
|
+
*/
|
|
886
|
+
protected screenshotPages(outputPath: string): Promise<this>;
|
|
887
|
+
/**
|
|
888
|
+
* Captures a single full page screenshot.
|
|
889
|
+
*
|
|
890
|
+
* Создает один скриншот всей страницы.
|
|
891
|
+
* @param outputPath output path / путь сохранения
|
|
892
|
+
* @returns this instance / этот экземпляр
|
|
893
|
+
*/
|
|
894
|
+
protected screenshotFull(outputPath: string): Promise<this>;
|
|
895
|
+
/**
|
|
896
|
+
* Logs text with a "Browser" prefix.
|
|
897
|
+
*
|
|
898
|
+
* Выводит текст в консоль с префиксом "Browser".
|
|
899
|
+
* @param text text to log / текст для вывода
|
|
900
|
+
*/
|
|
901
|
+
protected toConsole(text: string): void;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Orchestrator for scanning, sorting, and building monorepo packages.
|
|
906
|
+
* Manages build order based on package priorities and tracks build versions via log cache.
|
|
907
|
+
*
|
|
908
|
+
* Оркестратор для сканирования, сортировки и сборки пакетов монорепозитория.
|
|
909
|
+
* Управляет порядком сборки на основе приоритетов пакетов и отслеживает версии сборки через лог-кэш.
|
|
910
|
+
*/
|
|
911
|
+
export declare class BuildPackages {
|
|
912
|
+
protected readonly path: string;
|
|
913
|
+
/** Map of cached package build versions / Карта кэшированных версий сборки пакетов */
|
|
914
|
+
protected log: Record<string, string>;
|
|
915
|
+
/**
|
|
916
|
+
* Constructor initializes packages path and loads build log.
|
|
917
|
+
*
|
|
918
|
+
* Конструктор инициализирует путь к пакетам и загружает лог сборки.
|
|
919
|
+
* @param path packages directory path / путь к директории пакетов
|
|
920
|
+
*/
|
|
921
|
+
constructor(path?: string);
|
|
922
|
+
/**
|
|
923
|
+
* Scans the packages directory and builds each package that contains a package.json.
|
|
924
|
+
*
|
|
925
|
+
* Сканирует директорию пакетов и собирает каждый пакет, содержащий package.json.
|
|
926
|
+
*/
|
|
927
|
+
make(): Promise<void>;
|
|
928
|
+
/**
|
|
929
|
+
* Executes the build script command for the package.
|
|
930
|
+
*
|
|
931
|
+
* Выполняет команду скрипта сборки для пакета.
|
|
932
|
+
* @param packageFile package file instance / экземпляр файла пакета
|
|
933
|
+
* @returns boolean indicating build success / флаг успешности сборки
|
|
934
|
+
*/
|
|
935
|
+
protected build(packageFile: PackageFile): Promise<boolean>;
|
|
936
|
+
/**
|
|
937
|
+
* Checks if the package needs to be updated.
|
|
938
|
+
*
|
|
939
|
+
* Проверяет, нужно ли обновлять пакет.
|
|
940
|
+
* @param packageFile package file object / объект файла пакета
|
|
941
|
+
* @returns true if version differs from log cache / true, если версия отличается от кэша лога
|
|
942
|
+
*/
|
|
943
|
+
protected isUpdate(packageFile: PackageFile): boolean;
|
|
944
|
+
/**
|
|
945
|
+
* Scans the packages directory and returns a list of packages sorted by the ui-priority property in package.json.
|
|
946
|
+
* If a package does not have a priority, it defaults to 500.
|
|
947
|
+
*
|
|
948
|
+
* Сканирует директорию пакетов и возвращает список пакетов, отсортированный по свойству ui-priority в package.json.
|
|
949
|
+
* Если у пакета нет приоритета, по умолчанию устанавливается значение 500.
|
|
950
|
+
* @returns sorted list of package files / отсортированный список файлов пакетов
|
|
951
|
+
*/
|
|
952
|
+
private getList;
|
|
953
|
+
/**
|
|
954
|
+
* Returns the cached version of the package from the build log.
|
|
955
|
+
*
|
|
956
|
+
* Возвращает кэшированную версию пакета из лога сборки.
|
|
957
|
+
* @param name package name / имя пакета
|
|
958
|
+
* @returns cached version string / строка кэшированной версии
|
|
959
|
+
*/
|
|
960
|
+
protected getVersionLog(name: string): string;
|
|
961
|
+
/**
|
|
962
|
+
* Updates the build log with the current package version in memory.
|
|
963
|
+
*
|
|
964
|
+
* Обновляет лог сборки текущей версией пакета в памяти.
|
|
965
|
+
* @param packageFile package file object / объект файла пакета
|
|
966
|
+
*/
|
|
967
|
+
protected updateLog(packageFile: PackageFile): void;
|
|
968
|
+
/**
|
|
969
|
+
* Saves the build log to a file.
|
|
970
|
+
*
|
|
971
|
+
* Сохраняет лог сборки в файл.
|
|
972
|
+
*/
|
|
973
|
+
protected saveLog(): void;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Orchestrator for scanning and publishing changed packages to the npm registry.
|
|
978
|
+
* Compares current package versions against published versions in npm and publishes updated packages.
|
|
979
|
+
*
|
|
980
|
+
* Оркестратор для сканирования и публикации измененных пакетов в реестр npm.
|
|
981
|
+
* Сравнивает текущие версии пакетов с опубликованными версиями в npm и публикует обновленные пакеты.
|
|
982
|
+
*/
|
|
983
|
+
export declare class BuildPublishPackages {
|
|
984
|
+
protected readonly path: string;
|
|
985
|
+
/**
|
|
986
|
+
* Constructor initializes packages directory path.
|
|
987
|
+
*
|
|
988
|
+
* Конструктор инициализирует путь к директории пакетов.
|
|
989
|
+
* @param path packages directory path / путь к директории пакетов
|
|
990
|
+
*/
|
|
991
|
+
constructor(path?: string);
|
|
992
|
+
/**
|
|
993
|
+
* Scans the packages directory and publishes each package that has a new version.
|
|
994
|
+
*
|
|
995
|
+
* Сканирует директорию пакетов и публикует каждый пакет с новой версией.
|
|
996
|
+
*/
|
|
997
|
+
make(): Promise<void>;
|
|
998
|
+
/**
|
|
999
|
+
* Checks if the package needs to be published.
|
|
1000
|
+
*
|
|
1001
|
+
* Проверяет, нужно ли публиковать пакет.
|
|
1002
|
+
* @param packageFile package file object / объект файла пакета
|
|
1003
|
+
* @returns promise resolving to true if package is new or has a newer version / промис, возвращающий true, если пакет новый или имеет более новую версию
|
|
1004
|
+
*/
|
|
1005
|
+
protected isUpdate(packageFile: PackageFile): Promise<boolean>;
|
|
1006
|
+
/**
|
|
1007
|
+
* Returns the latest published version of the package from the npm registry.
|
|
1008
|
+
*
|
|
1009
|
+
* Возвращает последнюю опубликованную версию пакета из реестра npm.
|
|
1010
|
+
* @param name package name / имя пакета
|
|
1011
|
+
* @returns promise resolving to published version string or undefined if not published / промис, возвращающий строку опубликованной версии или undefined, если не опубликован
|
|
1012
|
+
*/
|
|
1013
|
+
protected getNpmVersion(name: string): Promise<string | undefined>;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Design flag item containing flag name and 2D canvas coordinates.
|
|
1018
|
+
*
|
|
1019
|
+
* Элемент флага дизайна, содержащий имя флага и 2D-координаты на холсте.
|
|
1020
|
+
*/
|
|
1021
|
+
export declare type DesignFlagsItem = {
|
|
1022
|
+
/** Flag name / Название флага */
|
|
1023
|
+
name: string;
|
|
1024
|
+
/** X coordinate on the canvas / Координата X на холсте */
|
|
1025
|
+
x: number;
|
|
1026
|
+
/** Y coordinate on the canvas / Координата Y на холсте */
|
|
1027
|
+
y: number;
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* List of design flag items.
|
|
1032
|
+
*
|
|
1033
|
+
* Список элементов флагов дизайна.
|
|
1034
|
+
*/
|
|
1035
|
+
export declare type DesignFlagsList = DesignFlagsItem[];
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Design MCP resource item descriptor for Model Context Protocol servers.
|
|
1039
|
+
*
|
|
1040
|
+
* Дескриптор ресурса MCP дизайна для серверов Model Context Protocol.
|
|
1041
|
+
*/
|
|
1042
|
+
export declare type DesignMcpResourceItem = {
|
|
1043
|
+
/** Resource URI / URI ресурса */
|
|
1044
|
+
uri: string;
|
|
1045
|
+
/** Resource name / Название ресурса */
|
|
1046
|
+
name: string;
|
|
1047
|
+
/** Resource MIME type / MIME-тип ресурса */
|
|
1048
|
+
mimeType: string;
|
|
1049
|
+
/** Resource description / Описание ресурса */
|
|
1050
|
+
description: string;
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* List of design MCP resource items.
|
|
1055
|
+
*
|
|
1056
|
+
* Список элементов ресурсов MCP дизайна.
|
|
1057
|
+
*/
|
|
1058
|
+
export declare type DesignMcpResources = DesignMcpResourceItem[];
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Automates the capturing of full-page component screenshots and extraction of DOM/CSS styles.
|
|
1062
|
+
* Spawns a local development server, navigates headless browser, captures screenshots, and dumps HTML and CSS artifacts.
|
|
1063
|
+
*
|
|
1064
|
+
* Автоматизирует создание полностраничных скриншотов компонентов и извлечение DOM/CSS стилей.
|
|
1065
|
+
* Запускает локальный сервер разработки, открывает headless-браузер, делает скриншоты и сохраняет HTML и CSS артефакты.
|
|
1066
|
+
*/
|
|
1067
|
+
export declare class DesignScreenshot {
|
|
1068
|
+
protected readonly file: string;
|
|
1069
|
+
/** Indicates if screenshot process is running / Указывает, запущен ли процесс создания скриншота */
|
|
1070
|
+
protected isReading: boolean;
|
|
1071
|
+
/** Server URL / URL сервера */
|
|
1072
|
+
protected url?: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* Constructor initializes output screenshot file path.
|
|
1075
|
+
*
|
|
1076
|
+
* Конструктор инициализирует путь к выходному файлу скриншота.
|
|
1077
|
+
* @param file output path / путь к файлу
|
|
1078
|
+
*/
|
|
1079
|
+
constructor(file?: string);
|
|
1080
|
+
/**
|
|
1081
|
+
* Starts the screenshot process.
|
|
1082
|
+
*
|
|
1083
|
+
* Запускает процесс создания скриншота.
|
|
1084
|
+
* @returns this instance / этот экземпляр
|
|
1085
|
+
*/
|
|
1086
|
+
make(): Promise<this>;
|
|
1087
|
+
/**
|
|
1088
|
+
* screenshot trigger listener.
|
|
1089
|
+
*
|
|
1090
|
+
* Слушатель триггера для создания скриншота.
|
|
1091
|
+
* @returns capture success status / статус успешного захвата
|
|
1092
|
+
*/
|
|
1093
|
+
protected readonly listener: () => Promise<boolean>;
|
|
1094
|
+
/**
|
|
1095
|
+
* spawns development server.
|
|
1096
|
+
*
|
|
1097
|
+
* Запускает сервер разработки.
|
|
1098
|
+
* @returns this instance / этот экземпляр
|
|
1099
|
+
*/
|
|
1100
|
+
protected makeServer(): this;
|
|
1101
|
+
/**
|
|
1102
|
+
* extracts server url from console output.
|
|
1103
|
+
*
|
|
1104
|
+
* Извлекает URL сервера из консольного вывода.
|
|
1105
|
+
* @param data command output / вывод команды
|
|
1106
|
+
* @returns this instance / этот экземпляр
|
|
1107
|
+
*/
|
|
1108
|
+
makeUrl(data: string): this;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Design structure class item containing class index, CSS class name, and completeness flag.
|
|
1113
|
+
*
|
|
1114
|
+
* Элемент класса структуры дизайна, содержащий индекс класса, CSS-класс и флаг полноты.
|
|
1115
|
+
*/
|
|
1116
|
+
export declare type DesignStructureClassesItem = {
|
|
1117
|
+
/** Class index identifier / Идентификатор индекса класса */
|
|
1118
|
+
index: string;
|
|
1119
|
+
/** CSS class name / Название CSS-класса */
|
|
1120
|
+
className: string;
|
|
1121
|
+
/** Full class selector flag / Флаг полного селектора класса */
|
|
1122
|
+
full: boolean;
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* List of design structure class items.
|
|
1127
|
+
*
|
|
1128
|
+
* Список элементов классов структуры дизайна.
|
|
1129
|
+
*/
|
|
1130
|
+
export declare type DesignStructureClassesList = DesignStructureClassesItem[];
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* Main design structure descriptor with complete property, styling, and variation information.
|
|
1134
|
+
*
|
|
1135
|
+
* Основной дескриптор структуры дизайна с полной информацией о свойствах, стилизации и вариациях.
|
|
1136
|
+
*/
|
|
1137
|
+
export declare type DesignStructureItem = {
|
|
1138
|
+
/** Item name / Название элемента */
|
|
1139
|
+
name: string;
|
|
1140
|
+
/** Item index identifier / Идентификатор индекса элемента */
|
|
1141
|
+
index: string;
|
|
1142
|
+
/** Item type / Тип элемента */
|
|
1143
|
+
type: string;
|
|
1144
|
+
/** CSS class name / Название CSS-класса */
|
|
1145
|
+
className?: string;
|
|
1146
|
+
/** Current active values array / Массив текущих активных значений */
|
|
1147
|
+
value: (string | boolean)[];
|
|
1148
|
+
/** All possible values array / Массив всех возможных значений */
|
|
1149
|
+
valueAll: (string | boolean)[];
|
|
1150
|
+
/** Nested sub-items / Вложенные подэлементы */
|
|
1151
|
+
state: DesignStructureItemSub[];
|
|
1152
|
+
/** Style generation flag / Флаг генерации стилей */
|
|
1153
|
+
style?: boolean;
|
|
1154
|
+
/** Default property value / Значение свойства по умолчанию */
|
|
1155
|
+
default?: string | number | boolean;
|
|
1156
|
+
/** Item category / Категория элемента */
|
|
1157
|
+
category?: string;
|
|
1158
|
+
};
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Design structure sub-item representing a branch with nested states.
|
|
1162
|
+
*
|
|
1163
|
+
* Подэлемент структуры дизайна, представляющий ветвь с вложенными состояниями.
|
|
1164
|
+
*/
|
|
1165
|
+
export declare type DesignStructureItemSub = {
|
|
1166
|
+
/** Sub-item name / Название подэлемента */
|
|
1167
|
+
name: string;
|
|
1168
|
+
/** Sub-item index / Индекс подэлемента */
|
|
1169
|
+
index: string;
|
|
1170
|
+
/** Array of values / Массив значений */
|
|
1171
|
+
value: (string | boolean)[];
|
|
1172
|
+
/** Nested sub-items / Вложенные подэлементы */
|
|
1173
|
+
state: DesignStructureItemSub[];
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Dictionary of design structure items keyed by property path.
|
|
1178
|
+
*
|
|
1179
|
+
* Словарь элементов структуры дизайна, индексированный по пути свойства.
|
|
1180
|
+
*/
|
|
1181
|
+
export declare type DesignStructureList = Record<string, DesignStructureItem>;
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Design structure state node with hierarchy, CSS class name, and property data.
|
|
1185
|
+
*
|
|
1186
|
+
* Узел состояния структуры дизайна с иерархией, CSS-классом и данными свойства.
|
|
1187
|
+
*/
|
|
1188
|
+
export declare type DesignStructureState = {
|
|
1189
|
+
/** Element index identifier / Идентификатор индекса элемента */
|
|
1190
|
+
index: string;
|
|
1191
|
+
/** Element type / Тип элемента */
|
|
1192
|
+
type: string;
|
|
1193
|
+
/** Property item data / Данные элемента свойства */
|
|
1194
|
+
item: PropertyItem;
|
|
1195
|
+
/** CSS class name / Название CSS-класса */
|
|
1196
|
+
className?: string;
|
|
1197
|
+
/** Nested state array / Массив вложенных состояний */
|
|
1198
|
+
state: DesignStructureState[];
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* List of design structure state nodes.
|
|
1203
|
+
*
|
|
1204
|
+
* Список узлов состояния структуры дизайна.
|
|
1205
|
+
*/
|
|
1206
|
+
export declare type DesignStructureStateList = DesignStructureState['state'];
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* Engine for compiling TypeScript declarations into a temporary directory and generating AI-optimized type definitions.
|
|
1210
|
+
* It compiles TypeScript sources, cleanses declaration files, uses AI to produce a minimal, context-rich type library, and removes temporary artifacts upon completion.
|
|
1211
|
+
*
|
|
1212
|
+
* Движок для компиляции деклараций TypeScript во временную директорию и генерации оптимизированных ИИ определений типов.
|
|
1213
|
+
* Компилирует исходники TypeScript, очищает файлы деклараций, использует ИИ для создания минимальной, насыщенной контекстом библиотеки типов и удаляет временные артефакты после завершения.
|
|
1214
|
+
*/
|
|
1215
|
+
export declare class DesignTypes {
|
|
1216
|
+
protected readonly promptsDir: string;
|
|
1217
|
+
protected readonly dir: string;
|
|
1218
|
+
protected readonly dirDist: string;
|
|
1219
|
+
/** Instance of DesignTypesAi for AI interactions / Экземпляр DesignTypesAi для ИИ взаимодействия */
|
|
1220
|
+
protected readonly ai: DesignTypesAi;
|
|
1221
|
+
/** Instance of DesignTypesBuildAbstract for compiling TypeScript declarations / Экземпляр DesignTypesBuildAbstract для компиляции деклараций TypeScript */
|
|
1222
|
+
protected readonly buildTypes: DesignTypesBuildAbstract;
|
|
1223
|
+
/** Instance of DesignTypesDescription for description generation / Экземпляр DesignTypesDescription для генерации описания */
|
|
1224
|
+
protected readonly description: DesignTypesDescription;
|
|
1225
|
+
/** Instance of DesignTypesMakeAbstract for declaration file processing / Экземпляр DesignTypesMakeAbstract для обработки файлов деклараций */
|
|
1226
|
+
protected readonly makeTypes: DesignTypesMakeAbstract;
|
|
1227
|
+
/** Instance of DesignTypesMcp for MCP server resources processing / Экземпляр DesignTypesMcp для обработки ресурсов MCP-сервера */
|
|
1228
|
+
protected readonly mcp: DesignTypesMcp;
|
|
1229
|
+
/** Instance of DesignTypesPromptsAbstract for prompt file processing / Экземпляр DesignTypesPromptsAbstract для обработки файлов промптов */
|
|
1230
|
+
protected readonly prompts: DesignTypesPromptsAbstract;
|
|
1231
|
+
/**
|
|
1232
|
+
* Constructor for DesignTypes.
|
|
1233
|
+
*
|
|
1234
|
+
* Конструктор для DesignTypes.
|
|
1235
|
+
* @param promptsDir input directory path containing prompt files / входной путь к директории, содержащей файлы промптов
|
|
1236
|
+
* @param dir input directory path containing declaration files / входной путь к директории, содержащей файлы деклараций
|
|
1237
|
+
* @param dirDist output directory path containing compiled JavaScript files / выходной путь к директории скомпилированных JavaScript файлов
|
|
1238
|
+
* @param constructors optional constructors map for custom subsystem implementations / опциональный объект конструкторов для кастомных реализаций подсистем
|
|
1239
|
+
*/
|
|
1240
|
+
constructor(promptsDir?: string, dir?: string, dirDist?: string, constructors?: {
|
|
1241
|
+
DesignTypesBuildConstructor?: typeof DesignTypesBuildAbstract;
|
|
1242
|
+
DesignTypesMakeConstructor?: typeof DesignTypesMakeAbstract;
|
|
1243
|
+
DesignTypesPromptsConstructor?: typeof DesignTypesPromptsAbstract;
|
|
1244
|
+
});
|
|
1245
|
+
/**
|
|
1246
|
+
* Main method to execute the type generation process.
|
|
1247
|
+
*
|
|
1248
|
+
* Основной метод для выполнения процесса генерации типов.
|
|
1249
|
+
* @returns current instance / текущий экземпляр
|
|
1250
|
+
*/
|
|
1251
|
+
make(): Promise<this>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Generates type definitions by combining processed files from ai-types-list directory without running AI.
|
|
1254
|
+
*
|
|
1255
|
+
* Генерирует определения типов путем объединения обработанных файлов из директории ai-types-list без запуска ИИ.
|
|
1256
|
+
* @returns current instance / текущий экземпляр
|
|
1257
|
+
*/
|
|
1258
|
+
makeSave(): Promise<this>;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Class for handling low-level AI interactions, directory configuration, and prompt execution.
|
|
1263
|
+
*
|
|
1264
|
+
* Класс для низкоуровневого взаимодействия с ИИ, конфигурации директории и выполнения промптов.
|
|
1265
|
+
*/
|
|
1266
|
+
export declare class DesignTypesAi {
|
|
1267
|
+
protected readonly dir: string;
|
|
1268
|
+
/** Cached project name / Кэшированное название проекта */
|
|
1269
|
+
protected projectName: string;
|
|
1270
|
+
/** Array of directory path segments / Массив сегментов пути директории */
|
|
1271
|
+
protected readonly dirArray: string[];
|
|
1272
|
+
/**
|
|
1273
|
+
* Constructor for DesignTypesAi.
|
|
1274
|
+
*
|
|
1275
|
+
* Конструктор для DesignTypesAi.
|
|
1276
|
+
* @param dir input directory path containing declaration files / входной путь к директории, содержащей файлы деклараций
|
|
1277
|
+
*/
|
|
1278
|
+
constructor(dir?: string);
|
|
1279
|
+
/**
|
|
1280
|
+
* Checks if the file is a valid declaration file (.d.ts).
|
|
1281
|
+
*
|
|
1282
|
+
* Проверяет, является ли файл валидным файлом декларации (.d.ts).
|
|
1283
|
+
* @param file file name or path / имя или путь к файлу
|
|
1284
|
+
* @returns true if file is a declaration file / true, если файл является файлом деклараций
|
|
1285
|
+
*/
|
|
1286
|
+
isFile(file: string): boolean;
|
|
1287
|
+
/**
|
|
1288
|
+
* Checks if the file is a valid JavaScript file (.js).
|
|
1289
|
+
*
|
|
1290
|
+
* Проверяет, является ли файл валидным JavaScript файлом (.js).
|
|
1291
|
+
* @param file file name or path / имя или путь к файлу
|
|
1292
|
+
* @returns true if file is JavaScript / true, если файл является JavaScript
|
|
1293
|
+
*/
|
|
1294
|
+
isFileJs(file: string): boolean;
|
|
1295
|
+
/**
|
|
1296
|
+
* Returns the array of directory path segments.
|
|
1297
|
+
*
|
|
1298
|
+
* Возвращает массив сегментов пути директории.
|
|
1299
|
+
* @returns directory path segments / сегменты пути директории
|
|
1300
|
+
*/
|
|
1301
|
+
getDirArray(): string[];
|
|
1302
|
+
/**
|
|
1303
|
+
* Generates MD5 hash for the given content.
|
|
1304
|
+
*
|
|
1305
|
+
* Генерирует MD5 хэш для переданного содержимого.
|
|
1306
|
+
* @param content file or text content / содержимое файла или текста
|
|
1307
|
+
* @returns MD5 hash string / MD5 хэш строка
|
|
1308
|
+
*/
|
|
1309
|
+
getMd5(content: string): string;
|
|
1310
|
+
/**
|
|
1311
|
+
* Returns the project name from package.json.
|
|
1312
|
+
*
|
|
1313
|
+
* Возвращает название проекта из package.json.
|
|
1314
|
+
* @returns project name or 'none' / название проекта или 'none'
|
|
1315
|
+
*/
|
|
1316
|
+
getProjectName(): string;
|
|
1317
|
+
/**
|
|
1318
|
+
* Sends content and a prompt to the AI for processing.
|
|
1319
|
+
*
|
|
1320
|
+
* Отправляет контент и промпт ИИ для обработки.
|
|
1321
|
+
* @param content content for processing / контент для обработки
|
|
1322
|
+
* @param prompt instructions for the AI / инструкции для ИИ
|
|
1323
|
+
* @param code code to optimize / код для оптимизации
|
|
1324
|
+
* @returns AI generated content or undefined / сгенерированный ИИ контент или undefined
|
|
1325
|
+
*/
|
|
1326
|
+
toAi(content: string, prompt: string, code?: string): Promise<string | undefined>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Sends content and a prompt to the AI for processing and parses the resulting JSON response.
|
|
1329
|
+
*
|
|
1330
|
+
* Отправляет контент и промпт ИИ для обработки и парсит полученный JSON-ответ.
|
|
1331
|
+
* @param content content for processing / контент для обработки
|
|
1332
|
+
* @param prompt instructions for the AI / инструкции для ИИ
|
|
1333
|
+
* @param code code to optimize / код для оптимизации
|
|
1334
|
+
* @returns parsed JSON object or undefined / распарсенный JSON объект или undefined
|
|
1335
|
+
*/
|
|
1336
|
+
toAiJson<T>(content: string, prompt: string, code?: string): Promise<T | undefined>;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* Engine for compiling TypeScript and Vue source files into declaration (.d.ts) files within a temporary directory.
|
|
1341
|
+
*
|
|
1342
|
+
* Движок для компиляции исходных файлов TypeScript и Vue в файлы деклараций (.d.ts) во временной директории.
|
|
1343
|
+
*/
|
|
1344
|
+
export declare class DesignTypesBuild extends DesignTypesBuildAbstract {
|
|
1345
|
+
/** Cached parsed TypeScript configuration / Кэшированная распарсенная конфигурация TypeScript */
|
|
1346
|
+
protected configuration?: default_2.ParsedCommandLine;
|
|
1347
|
+
/**
|
|
1348
|
+
* Constructor for DesignTypesBuild.
|
|
1349
|
+
*
|
|
1350
|
+
* Конструктор для DesignTypesBuild.
|
|
1351
|
+
* @param temporaryDirectory directory path for storing temporary declaration files / путь к директории для хранения временных файлов деклараций
|
|
1352
|
+
*/
|
|
1353
|
+
constructor(temporaryDirectory?: string);
|
|
1354
|
+
/**
|
|
1355
|
+
* Checks if the temporary compilation directory exists.
|
|
1356
|
+
*
|
|
1357
|
+
* Проверяет, существует ли временная директория компиляции.
|
|
1358
|
+
* @returns true if temporary directory exists / true, если временная директория существует
|
|
1359
|
+
*/
|
|
1360
|
+
is(): boolean;
|
|
1361
|
+
/**
|
|
1362
|
+
* Checks if the project contains Vue Single File Components (.vue).
|
|
1363
|
+
*
|
|
1364
|
+
* Проверяет, содержит ли проект компоненты Vue (.vue).
|
|
1365
|
+
* @returns true if project contains Vue files / true, если проект содержит файлы Vue
|
|
1366
|
+
*/
|
|
1367
|
+
isVue(): boolean;
|
|
1368
|
+
/**
|
|
1369
|
+
* Compiles declarations into the temporary directory. Automatically selects vue-tsc for Vue projects, or TypeScript compiler otherwise.
|
|
1370
|
+
*
|
|
1371
|
+
* Компилирует декларации во временную директорию. Автоматически выбирает vue-tsc для Vue проектов или компилятор TypeScript в противном случае.
|
|
1372
|
+
* @returns current instance / текущий экземпляр
|
|
1373
|
+
*/
|
|
1374
|
+
build(): this;
|
|
1375
|
+
/**
|
|
1376
|
+
* Removes the temporary compilation directory and all its contents.
|
|
1377
|
+
*
|
|
1378
|
+
* Удаляет временную директорию компиляции и все ее содержимое.
|
|
1379
|
+
* @returns current instance / текущий экземпляр
|
|
1380
|
+
*/
|
|
1381
|
+
clean(): this;
|
|
1382
|
+
/**
|
|
1383
|
+
* Checks if the file matches all configured type scanning filters (extension, paths, match, exclude).
|
|
1384
|
+
*
|
|
1385
|
+
* Проверяет, соответствует ли файл всем настроенным фильтрам сканирования типов (расширение, пути, соответствие, исключение).
|
|
1386
|
+
* @param file file path / путь к файлу
|
|
1387
|
+
* @returns true if file is allowed for compilation / true, если файл разрешен для компиляции
|
|
1388
|
+
*/
|
|
1389
|
+
protected isAllowed(file: string): boolean;
|
|
1390
|
+
/**
|
|
1391
|
+
* Checks if the emitted declaration file is valid and should be retained in the temporary directory.
|
|
1392
|
+
*
|
|
1393
|
+
* Проверяет, является ли сгенерированный файл декларации валидным и должен ли быть сохранен во временной директории.
|
|
1394
|
+
* @param file relative file path within temporary directory / относительный путь к файлу во временной директории
|
|
1395
|
+
* @returns true if file is allowed / true, если файл разрешен
|
|
1396
|
+
*/
|
|
1397
|
+
protected isAllowedDeclaration(file: string): boolean;
|
|
1398
|
+
/**
|
|
1399
|
+
* Checks if the file path matches the exclusion pattern configured in design-ui.json.
|
|
1400
|
+
*
|
|
1401
|
+
* Проверяет, соответствует ли путь к файлу шаблону исключения, настроенному в design-ui.json.
|
|
1402
|
+
* @param file file path / путь к файлу
|
|
1403
|
+
* @returns true if matched and should be excluded / true, если путь соответствует и должен быть исключен
|
|
1404
|
+
*/
|
|
1405
|
+
protected isExclude(file: string): boolean;
|
|
1406
|
+
/**
|
|
1407
|
+
* Checks if the file is a TypeScript declaration file (.d.ts).
|
|
1408
|
+
*
|
|
1409
|
+
* Проверяет, является ли файл файлом деклараций TypeScript (.d.ts).
|
|
1410
|
+
* @param file file name or path / имя или путь к файлу
|
|
1411
|
+
* @returns true if file is a declaration file / true, если файл является файлом деклараций
|
|
1412
|
+
*/
|
|
1413
|
+
protected isFileDts(file: string): boolean;
|
|
1414
|
+
/**
|
|
1415
|
+
* Checks if the file is a test, spec, or storybook file.
|
|
1416
|
+
*
|
|
1417
|
+
* Проверяет, является ли файл тестом, спецификацией или файлом storybook.
|
|
1418
|
+
* @param file file name or path / имя или путь к файлу
|
|
1419
|
+
* @returns true if file is a test or story / true, если файл является тестом или storybook
|
|
1420
|
+
*/
|
|
1421
|
+
protected isFileTest(file: string): boolean;
|
|
1422
|
+
/**
|
|
1423
|
+
* Checks if the file is a valid TypeScript, JavaScript, or Vue source file for compilation.
|
|
1424
|
+
*
|
|
1425
|
+
* Проверяет, является ли файл валидным исходным файлом TypeScript, JavaScript или Vue для компиляции.
|
|
1426
|
+
* @param file file name or path / имя или путь к файлу
|
|
1427
|
+
* @returns true if file is a source file / true, если файл является исходным файлом
|
|
1428
|
+
*/
|
|
1429
|
+
protected isFileTs(file: string): boolean;
|
|
1430
|
+
/**
|
|
1431
|
+
* Checks if the file path matches the inclusion pattern configured in design-ui.json.
|
|
1432
|
+
*
|
|
1433
|
+
* Проверяет, соответствует ли путь к файлу шаблону включения, настроенному в design-ui.json.
|
|
1434
|
+
* @param file file path / путь к файлу
|
|
1435
|
+
* @returns true if matched or if pattern is not specified / true, если путь соответствует или шаблон не указан
|
|
1436
|
+
*/
|
|
1437
|
+
protected isMatch(file: string): boolean;
|
|
1438
|
+
/**
|
|
1439
|
+
* Checks if the file path starts with or is contained within any of the directory paths configured in design-ui.json.
|
|
1440
|
+
*
|
|
1441
|
+
* Проверяет, начинается ли путь к файлу с одного из путей директорий, настроенных в design-ui.json, или содержится ли в них.
|
|
1442
|
+
* @param file file path / путь к файлу
|
|
1443
|
+
* @returns true if path is allowed or if paths list is not specified / true, если путь разрешен или список путей не указан
|
|
1444
|
+
*/
|
|
1445
|
+
protected isPath(file: string): boolean;
|
|
1446
|
+
/**
|
|
1447
|
+
* Checks if the file path matches a given string or regular expression pattern.
|
|
1448
|
+
*
|
|
1449
|
+
* Проверяет, соответствует ли путь к файлу заданной строке или шаблону регулярного выражения.
|
|
1450
|
+
* @param file file path / путь к файлу
|
|
1451
|
+
* @param pattern pattern or list of patterns / шаблон или список шаблонов
|
|
1452
|
+
* @returns true if file matches the pattern / true, если файл соответствует шаблону
|
|
1453
|
+
*/
|
|
1454
|
+
protected isPattern(file: string, pattern?: string | string[]): boolean;
|
|
1455
|
+
/**
|
|
1456
|
+
* Returns the path to the temporary compilation directory.
|
|
1457
|
+
*
|
|
1458
|
+
* Возвращает путь к временной директории компиляции.
|
|
1459
|
+
* @returns temporary compilation directory path / путь к временной директории компиляции
|
|
1460
|
+
*/
|
|
1461
|
+
protected getTemporaryDirectory(): string;
|
|
1462
|
+
/**
|
|
1463
|
+
* Returns the TypeScript configuration file name if present in the project.
|
|
1464
|
+
*
|
|
1465
|
+
* Возвращает имя файла конфигурации TypeScript, если он присутствует в проекте.
|
|
1466
|
+
* @returns configuration file name or undefined / имя файла конфигурации или undefined
|
|
1467
|
+
*/
|
|
1468
|
+
protected getTsConfigName(): string | undefined;
|
|
1469
|
+
/**
|
|
1470
|
+
* Retrieves parsed TypeScript configuration for the current package.
|
|
1471
|
+
*
|
|
1472
|
+
* Получает распарсенную конфигурацию TypeScript для текущего пакета.
|
|
1473
|
+
* @returns parsed command line configuration or undefined / распарсенная конфигурация командной строки или undefined
|
|
1474
|
+
*/
|
|
1475
|
+
protected getTsConfiguration(): default_2.ParsedCommandLine | undefined;
|
|
1476
|
+
/**
|
|
1477
|
+
* Gets the list of TypeScript and Vue source files to compile, filtered by config rules.
|
|
1478
|
+
*
|
|
1479
|
+
* Получает список исходных файлов TypeScript и Vue для компиляции, отфильтрованный по правилам конфигурации.
|
|
1480
|
+
* @returns array of source file paths / массив путей к исходным файлам
|
|
1481
|
+
*/
|
|
1482
|
+
protected getTsSourceFiles(): string[];
|
|
1483
|
+
/**
|
|
1484
|
+
* Compiles TypeScript declarations using TypeScript Compiler API.
|
|
1485
|
+
*
|
|
1486
|
+
* Компилирует декларации TypeScript с помощью TypeScript Compiler API.
|
|
1487
|
+
* @returns current instance / текущий экземпляр
|
|
1488
|
+
*/
|
|
1489
|
+
protected buildTs(): this;
|
|
1490
|
+
/**
|
|
1491
|
+
* Compiles Vue and TypeScript declarations using vue-tsc.
|
|
1492
|
+
*
|
|
1493
|
+
* Компилирует декларации Vue и TypeScript с помощью vue-tsc.
|
|
1494
|
+
* @returns current instance / текущий экземпляр
|
|
1495
|
+
*/
|
|
1496
|
+
protected buildVue(): this;
|
|
1497
|
+
/**
|
|
1498
|
+
* Cleans excess declaration files in the temporary directory after Vue compilation.
|
|
1499
|
+
*
|
|
1500
|
+
* Очищает лишние файлы деклараций во временной директории после компиляции Vue.
|
|
1501
|
+
* @returns current instance / текущий экземпляр
|
|
1502
|
+
*/
|
|
1503
|
+
protected cleanExcess(): this;
|
|
1504
|
+
/**
|
|
1505
|
+
* Resolves a configured directory path to an existing filesystem path.
|
|
1506
|
+
*
|
|
1507
|
+
* Разрешает путь к настроенной директории в существующий путь в файловой системе.
|
|
1508
|
+
* @param directory directory path to resolve / путь к директории для разрешения
|
|
1509
|
+
* @returns resolved directory path / разрешенный путь к директории
|
|
1510
|
+
*/
|
|
1511
|
+
protected resolveDirectory(directory: string): string;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* Abstract class for compiling TypeScript declarations into a temporary directory.
|
|
1516
|
+
* Allows custom implementations of TypeScript declaration compilation for DesignTypes.
|
|
1517
|
+
*
|
|
1518
|
+
* Абстрактный класс для компиляции деклараций TypeScript во временную директорию.
|
|
1519
|
+
* Позволяет реализовывать собственную компиляцию деклараций TypeScript для DesignTypes.
|
|
1520
|
+
*/
|
|
1521
|
+
export declare abstract class DesignTypesBuildAbstract {
|
|
1522
|
+
protected readonly temporaryDirectory: string;
|
|
1523
|
+
/**
|
|
1524
|
+
* Constructor for DesignTypesBuildAbstract.
|
|
1525
|
+
*
|
|
1526
|
+
* Конструктор для DesignTypesBuildAbstract.
|
|
1527
|
+
* @param temporaryDirectory directory path for storing temporary declaration files / путь к директории для хранения временных файлов деклараций
|
|
1528
|
+
*/
|
|
1529
|
+
constructor(temporaryDirectory?: string);
|
|
1530
|
+
/**
|
|
1531
|
+
* Checks if the temporary compilation directory exists.
|
|
1532
|
+
*
|
|
1533
|
+
* Проверяет, существует ли временная директория компиляции.
|
|
1534
|
+
* @returns true if temporary directory exists / true, если временная директория существует
|
|
1535
|
+
*/
|
|
1536
|
+
abstract is(): boolean;
|
|
1537
|
+
/**
|
|
1538
|
+
* Cleans the temporary compilation directory.
|
|
1539
|
+
*
|
|
1540
|
+
* Очищает временную директорию компиляции.
|
|
1541
|
+
* @returns current instance / текущий экземпляр
|
|
1542
|
+
*/
|
|
1543
|
+
abstract clean(): this;
|
|
1544
|
+
/**
|
|
1545
|
+
* Compiles TypeScript declarations into the temporary directory.
|
|
1546
|
+
*
|
|
1547
|
+
* Компилирует декларации TypeScript во временную директорию.
|
|
1548
|
+
* @returns current instance / текущий экземпляр
|
|
1549
|
+
*/
|
|
1550
|
+
abstract build(): this;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* TypeScript module item containing type name and property definitions.
|
|
1555
|
+
*
|
|
1556
|
+
* Элемент модуля TypeScript, содержащий имя типа и определения свойств.
|
|
1557
|
+
*/
|
|
1558
|
+
export declare type DesignTypescriptItem = {
|
|
1559
|
+
/** TypeScript item or interface name / Имя элемента или интерфейса TypeScript */
|
|
1560
|
+
name: string;
|
|
1561
|
+
/** Array of properties / Массив свойств */
|
|
1562
|
+
props: DesignTypescriptProps;
|
|
1563
|
+
};
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* List of TypeScript module items.
|
|
1567
|
+
*
|
|
1568
|
+
* Список элементов модулей TypeScript.
|
|
1569
|
+
*/
|
|
1570
|
+
export declare type DesignTypescriptList = DesignTypescriptItem[];
|
|
1571
|
+
|
|
1572
|
+
/**
|
|
1573
|
+
* TypeScript property descriptor with type definition, options, and documentation.
|
|
1574
|
+
*
|
|
1575
|
+
* Дескриптор свойства TypeScript с определением типа, опциями и документацией.
|
|
1576
|
+
*/
|
|
1577
|
+
export declare type DesignTypescriptProp = {
|
|
1578
|
+
/** Property name / Название свойства */
|
|
1579
|
+
name: string;
|
|
1580
|
+
/** TypeScript property type string / Строка TypeScript-типа свойства */
|
|
1581
|
+
type: string;
|
|
1582
|
+
/** Array of possible option values / Массив возможных вариантов значений */
|
|
1583
|
+
option?: string[];
|
|
1584
|
+
/** Property description / Описание свойства */
|
|
1585
|
+
description?: string;
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* List of TypeScript property descriptors.
|
|
1590
|
+
*
|
|
1591
|
+
* Список дескрипторов свойств TypeScript.
|
|
1592
|
+
*/
|
|
1593
|
+
export declare type DesignTypescriptProps = DesignTypescriptProp[];
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Class for generating, processing, and saving AI project descriptions.
|
|
1597
|
+
*
|
|
1598
|
+
* Класс для генерации, обработки и сохранения описания проекта ИИ.
|
|
1599
|
+
*/
|
|
1600
|
+
export declare class DesignTypesDescription {
|
|
1601
|
+
protected readonly ai: DesignTypesAi;
|
|
1602
|
+
protected readonly makeTypes: DesignTypesMakeAbstract;
|
|
1603
|
+
protected readonly prompts: DesignTypesPromptsAbstract;
|
|
1604
|
+
/** Cached full description content / Кэшированный полный контент описания */
|
|
1605
|
+
protected fullDescription?: string;
|
|
1606
|
+
/**
|
|
1607
|
+
* Constructor for DesignTypesDescription.
|
|
1608
|
+
*
|
|
1609
|
+
* Конструктор для DesignTypesDescription.
|
|
1610
|
+
* @param ai instance of DesignTypesAi for AI interactions / экземпляр DesignTypesAi для ИИ взаимодействия
|
|
1611
|
+
* @param makeTypes instance of DesignTypesMakeAbstract for type definitions content access / экземпляр DesignTypesMakeAbstract для доступа к контенту определений типов
|
|
1612
|
+
* @param prompts instance of DesignTypesPromptsAbstract for prompt list management / экземпляр DesignTypesPromptsAbstract для управления списком промптов
|
|
1613
|
+
*/
|
|
1614
|
+
constructor(ai: DesignTypesAi, makeTypes: DesignTypesMakeAbstract, prompts: DesignTypesPromptsAbstract);
|
|
1615
|
+
/**
|
|
1616
|
+
* Checks if the AI description file exists.
|
|
1617
|
+
*
|
|
1618
|
+
* Проверяет, существует ли файл описания ИИ.
|
|
1619
|
+
* @returns true if description file exists / true, если файл описания существует
|
|
1620
|
+
*/
|
|
1621
|
+
is(): boolean;
|
|
1622
|
+
/**
|
|
1623
|
+
* Returns the generated full description content.
|
|
1624
|
+
*
|
|
1625
|
+
* Возвращает сгенерированный полный контент описания.
|
|
1626
|
+
* @returns full description string / строка полного описания
|
|
1627
|
+
*/
|
|
1628
|
+
getFullDescription(): string;
|
|
1629
|
+
/**
|
|
1630
|
+
* Generates and saves AI description file.
|
|
1631
|
+
*
|
|
1632
|
+
* Генерирует и сохраняет файл описания ИИ.
|
|
1633
|
+
* @returns current instance / текущий экземпляр
|
|
1634
|
+
*/
|
|
1635
|
+
make(): Promise<this>;
|
|
1636
|
+
/**
|
|
1637
|
+
* Saves the AI-generated project description to a file.
|
|
1638
|
+
*
|
|
1639
|
+
* Сохраняет сгенерированное ИИ описание проекта в файл.
|
|
1640
|
+
* @param content content to save / контент для сохранения
|
|
1641
|
+
*/
|
|
1642
|
+
protected saveDescription(content: string): void;
|
|
1643
|
+
/**
|
|
1644
|
+
* Generates a project description and usage guidelines using AI.
|
|
1645
|
+
*
|
|
1646
|
+
* Генерирует описание проекта и рекомендации по использованию с помощью ИИ.
|
|
1647
|
+
* @param content cleaned type definitions / очищенные определения типов
|
|
1648
|
+
* @param code JS code for analysis / JS код для анализа
|
|
1649
|
+
* @returns project description string / строка описания проекта
|
|
1650
|
+
*/
|
|
1651
|
+
protected toAiDescription(content: string, code?: string): Promise<string>;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Design types cache file entry with path, code content, and MD5 hash.
|
|
1656
|
+
*
|
|
1657
|
+
* Запись файла кэша типов дизайна с путем, содержимым кода и хэшем MD5.
|
|
1658
|
+
*/
|
|
1659
|
+
export declare type DesignTypesItem = {
|
|
1660
|
+
/** Relative file path / Относительный путь к файлу */
|
|
1661
|
+
path: string;
|
|
1662
|
+
/** File content string / Строка содержимого файла */
|
|
1663
|
+
content: string;
|
|
1664
|
+
/** MD5 hash checksum / Контрольная сумма хэша MD5 */
|
|
1665
|
+
md5?: string;
|
|
1666
|
+
};
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* List of design types file entries.
|
|
1670
|
+
*
|
|
1671
|
+
* Список записей файлов типов дизайна.
|
|
1672
|
+
*/
|
|
1673
|
+
export declare type DesignTypesList = DesignTypesItem[];
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* Engine for scanning declaration files, MD5 change tracking, and generating AI-optimized TypeScript type definitions.
|
|
1677
|
+
*
|
|
1678
|
+
* Движок для сканирования файлов деклараций, отслеживания изменений по MD5 и генерации оптимизированных ИИ определений типов TypeScript.
|
|
1679
|
+
*/
|
|
1680
|
+
export declare class DesignTypesMake extends DesignTypesMakeAbstract {
|
|
1681
|
+
/** Cached combined full type definitions content / Кэшированный объединенный полный контент определений типов */
|
|
1682
|
+
protected fullContent?: string;
|
|
1683
|
+
/** Cached combined JS content / Кэшированный объединенный JS контент */
|
|
1684
|
+
protected fullJsContent?: string;
|
|
1685
|
+
/** Maximum number of type definition files processed by AI concurrently / Максимальное количество файлов определений типов, обрабатываемых ИИ одновременно */
|
|
1686
|
+
protected readonly AI_TYPES_CONCURRENCY: number;
|
|
1687
|
+
/** TypeScript AST transformer for cleaning declaration file content / TypeScript AST трансформер для очистки содержимого файлов деклараций */
|
|
1688
|
+
protected readonly tsTransformer: DesignTypesMakeTsTransformer;
|
|
1689
|
+
/** Instance of DesignTypesMakeFile for file operations / Экземпляр DesignTypesMakeFile для файловых операций */
|
|
1690
|
+
protected readonly files: DesignTypesMakeFile;
|
|
1691
|
+
/**
|
|
1692
|
+
* Constructor for DesignTypesMake.
|
|
1693
|
+
*
|
|
1694
|
+
* Конструктор для DesignTypesMake.
|
|
1695
|
+
* @param ai instance of DesignTypesAi for AI optimization and directory configuration / экземпляр DesignTypesAi для ИИ оптимизации и конфигурации директории
|
|
1696
|
+
* @param dir input directory path containing declaration files / входной путь к директории, содержащей файлы деклараций
|
|
1697
|
+
* @param dirDist input directory path containing compiled JavaScript files / входной путь к директории, содержащей скомпилированные файлы JavaScript
|
|
1698
|
+
*/
|
|
1699
|
+
constructor(ai: DesignTypesAi, dir?: string, dirDist?: string);
|
|
1700
|
+
/**
|
|
1701
|
+
* Reads processed type definition files, combines them into a single string, and cleans the content.
|
|
1702
|
+
*
|
|
1703
|
+
* Читает обработанные файлы определений типов, объединяет их в одну строку и очищает контент.
|
|
1704
|
+
* @returns combined and cleaned full type definitions content / объединенное и очищенное содержимое полных определений типов
|
|
1705
|
+
*/
|
|
1706
|
+
getFullContent(): string;
|
|
1707
|
+
/**
|
|
1708
|
+
* Gets the combined JS content for all filtered JavaScript files.
|
|
1709
|
+
*
|
|
1710
|
+
* Получает объединенный JS контент для всех отфильтрованных JavaScript файлов.
|
|
1711
|
+
* @returns combined JS content string / строка объединенного JS контента
|
|
1712
|
+
*/
|
|
1713
|
+
getFullJsContent(): string;
|
|
1714
|
+
/**
|
|
1715
|
+
* Main method to execute the type definition generation process and save ai-types.md.
|
|
1716
|
+
*
|
|
1717
|
+
* Основной метод для выполнения процесса генерации определений типов и сохранения ai-types.md.
|
|
1718
|
+
* @returns current instance / текущий экземпляр
|
|
1719
|
+
*/
|
|
1720
|
+
make(): Promise<this>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Generates full types content and saves it to ai-types.md.
|
|
1723
|
+
*
|
|
1724
|
+
* Генерирует полный контент типов и сохраняет его в ai-types.md.
|
|
1725
|
+
* @returns current instance / текущий экземпляр
|
|
1726
|
+
*/
|
|
1727
|
+
makeSave(): this;
|
|
1728
|
+
/**
|
|
1729
|
+
* Checks if the content contains JSDoc comments.
|
|
1730
|
+
*
|
|
1731
|
+
* Проверяет, содержит ли контент JSDoc комментарии.
|
|
1732
|
+
* @param content file content / содержимое файла
|
|
1733
|
+
* @returns true if content contains JSDoc block / true, если контент содержит блок JSDoc
|
|
1734
|
+
*/
|
|
1735
|
+
protected hasJSDoc(content: string): boolean;
|
|
1736
|
+
/**
|
|
1737
|
+
* Cleans up the declaration content via TypeScript AST transformation by removing relative imports, relative re-exports, non-public members, and empty lines.
|
|
1738
|
+
*
|
|
1739
|
+
* Очищает контент деклараций через AST-трансформацию TypeScript, удаляя относительные импорты, относительные реэкспорты, непубличные члены и пустые строки.
|
|
1740
|
+
* @param content content to clean / контент для очистки
|
|
1741
|
+
* @returns cleaned content string / очищенная строка контента
|
|
1742
|
+
*/
|
|
1743
|
+
protected cleanContent(content: string): string;
|
|
1744
|
+
/**
|
|
1745
|
+
* Processes a list of updated type definition files through AI concurrently (with limited parallelism) and saves them with an AI-processed header.
|
|
1746
|
+
*
|
|
1747
|
+
* Обрабатывает список обновленных файлов определений типов через ИИ параллельно (с ограниченным параллелизмом) и сохраняет их с заголовком ИИ-обработки.
|
|
1748
|
+
* @param files list of updated type definition files / список обновленных файлов определений типов
|
|
1749
|
+
* @param fullJsContent combined JS content for context / объединенный JS контент для контекста
|
|
1750
|
+
*/
|
|
1751
|
+
protected saveListAi(files: DesignTypesList, fullJsContent: string): Promise<void>;
|
|
1752
|
+
/**
|
|
1753
|
+
* Sends content to AI for optimization.
|
|
1754
|
+
*
|
|
1755
|
+
* Отправляет контент ИИ для оптимизации.
|
|
1756
|
+
* @param content content to optimize / контент для оптимизации
|
|
1757
|
+
* @param code code to optimize / код для оптимизации
|
|
1758
|
+
* @returns optimized content string / строка оптимизированного контента
|
|
1759
|
+
*/
|
|
1760
|
+
protected toAiEdit(content: string, code: string): Promise<string>;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* Abstract class for declaration file processing, MD5 tracking, and generating AI-optimized TypeScript type definitions.
|
|
1765
|
+
* Allows custom implementations of type definition scanning, processing, and generation for DesignTypes.
|
|
1766
|
+
*
|
|
1767
|
+
* Абстрактный класс для обработки файлов деклараций, отслеживания изменений по MD5 и генерации оптимизированных ИИ определений типов TypeScript.
|
|
1768
|
+
* Позволяет реализовывать собственную логику сканирования, обработки и генерации определений типов для DesignTypes.
|
|
1769
|
+
*/
|
|
1770
|
+
export declare abstract class DesignTypesMakeAbstract {
|
|
1771
|
+
protected readonly ai: DesignTypesAi;
|
|
1772
|
+
protected readonly dir: string;
|
|
1773
|
+
protected readonly dirDist: string;
|
|
1774
|
+
/**
|
|
1775
|
+
* Constructor for DesignTypesMakeAbstract.
|
|
1776
|
+
*
|
|
1777
|
+
* Конструктор для DesignTypesMakeAbstract.
|
|
1778
|
+
* @param ai instance of DesignTypesAi for AI optimization and directory configuration / экземпляр DesignTypesAi для ИИ оптимизации и конфигурации директории
|
|
1779
|
+
* @param dir input directory path containing declaration files / входной путь к директории, содержащей файлы деклараций
|
|
1780
|
+
* @param dirDist input directory path containing compiled JavaScript files / входной путь к директории, содержащей скомпилированные файлы JavaScript
|
|
1781
|
+
*/
|
|
1782
|
+
constructor(ai: DesignTypesAi, dir?: string, dirDist?: string);
|
|
1783
|
+
/**
|
|
1784
|
+
* Reads processed type definition files, combines them into a single string, and cleans the content.
|
|
1785
|
+
*
|
|
1786
|
+
* Читает обработанные файлы определений типов, объединяет их в одну строку и очищает контент.
|
|
1787
|
+
* @returns combined and cleaned full type definitions content / объединенное и очищенное содержимое полных определений типов
|
|
1788
|
+
*/
|
|
1789
|
+
abstract getFullContent(): string;
|
|
1790
|
+
/**
|
|
1791
|
+
* Gets the combined JS content for all filtered JavaScript files.
|
|
1792
|
+
*
|
|
1793
|
+
* Получает объединенный JS контент для всех отфильтрованных JavaScript файлов.
|
|
1794
|
+
* @returns combined JS content string / строка объединенного JS контента
|
|
1795
|
+
*/
|
|
1796
|
+
abstract getFullJsContent(): string;
|
|
1797
|
+
/**
|
|
1798
|
+
* Main method to execute the type definition generation process and save ai-types.md.
|
|
1799
|
+
*
|
|
1800
|
+
* Основной метод для выполнения процесса генерации определений типов и сохранения ai-types.md.
|
|
1801
|
+
* @returns current instance / текущий экземпляр
|
|
1802
|
+
*/
|
|
1803
|
+
abstract make(): Promise<this>;
|
|
1804
|
+
/**
|
|
1805
|
+
* Generates full types content and saves it to ai-types.md.
|
|
1806
|
+
*
|
|
1807
|
+
* Генерирует полный контент типов и сохраняет его в ai-types.md.
|
|
1808
|
+
* @returns current instance / текущий экземпляр
|
|
1809
|
+
*/
|
|
1810
|
+
abstract makeSave(): this;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* Handles file reading, directory scanning, caching, MD5 tracking, and file writing for DesignTypesMake.
|
|
1815
|
+
*
|
|
1816
|
+
* Обрабатывает чтение файлов, сканирование директорий, кэширование, отслеживание MD5 и запись файлов для DesignTypesMake.
|
|
1817
|
+
*/
|
|
1818
|
+
export declare class DesignTypesMakeFile {
|
|
1819
|
+
protected readonly ai: DesignTypesAi;
|
|
1820
|
+
protected readonly dir: string;
|
|
1821
|
+
protected readonly dirDist: string;
|
|
1822
|
+
/** Cached list of filtered type definition files / Кэшированный список отфильтрованных файлов определений типов */
|
|
1823
|
+
protected listByFilter?: DesignTypesList;
|
|
1824
|
+
/** Cached list of filtered JavaScript files / Кэшированный список отфильтрованных JavaScript файлов */
|
|
1825
|
+
protected listByFilterJs?: DesignTypesList;
|
|
1826
|
+
/** Cached list of filtered type definition files from cache directory / Кэшированный список отфильтрованных файлов определений типов из директории кэша */
|
|
1827
|
+
protected listCache?: DesignTypesList;
|
|
1828
|
+
/**
|
|
1829
|
+
* Constructor for DesignTypesMakeFile.
|
|
1830
|
+
*
|
|
1831
|
+
* Конструктор для DesignTypesMakeFile.
|
|
1832
|
+
* @param ai instance of DesignTypesAi for AI optimization and directory configuration / экземпляр DesignTypesAi для ИИ оптимизации и конфигурации директории
|
|
1833
|
+
* @param dir input directory path containing declaration files / входной путь к директории, содержащей файлы деклараций
|
|
1834
|
+
* @param dirDist input directory path containing compiled JavaScript files / входной путь к директории, содержащей скомпилированные файлы JavaScript
|
|
1835
|
+
*/
|
|
1836
|
+
constructor(ai: DesignTypesAi, dir?: string, dirDist?: string);
|
|
1837
|
+
/**
|
|
1838
|
+
* Gets a list of files filtered by criteria (.d.ts).
|
|
1839
|
+
*
|
|
1840
|
+
* Получает список файлов, отфильтрованный по критериям (.d.ts).
|
|
1841
|
+
* @returns list of filtered type definition files / список отфильтрованных файлов определений типов
|
|
1842
|
+
*/
|
|
1843
|
+
getListByFilter(): DesignTypesList;
|
|
1844
|
+
/**
|
|
1845
|
+
* Gets a list of JS files filtered by criteria (.js).
|
|
1846
|
+
*
|
|
1847
|
+
* Получает список JS файлов, отфильтрованный по критериям (.js).
|
|
1848
|
+
* @returns list of filtered JavaScript files / список отфильтрованных JavaScript файлов
|
|
1849
|
+
*/
|
|
1850
|
+
getListByFilterJs(): DesignTypesList;
|
|
1851
|
+
/**
|
|
1852
|
+
* Gets a list of type definition files from the AI types list cache directory (.d.ts).
|
|
1853
|
+
*
|
|
1854
|
+
* Получает список файлов определений типов из директории кэша списка ИИ типов (.d.ts).
|
|
1855
|
+
* @returns list of filtered type definition files from cache / список отфильтрованных файлов определений типов из кэша
|
|
1856
|
+
*/
|
|
1857
|
+
getListCache(): DesignTypesList;
|
|
1858
|
+
/**
|
|
1859
|
+
* Gets a list of type definition files with cleaned content read from the AI types list directory.
|
|
1860
|
+
*
|
|
1861
|
+
* Получает список файлов определений типов с очищенным содержимым, прочитанным из директории списка ИИ типов.
|
|
1862
|
+
* @param files list of type definition files / список файлов определений типов
|
|
1863
|
+
* @returns list of type definition files with cleaned AI content / список файлов определений типов с очищенным ИИ содержимым
|
|
1864
|
+
*/
|
|
1865
|
+
getListAi(files: DesignTypesList): DesignTypesList;
|
|
1866
|
+
/**
|
|
1867
|
+
* Combines a list of files into a single string.
|
|
1868
|
+
*
|
|
1869
|
+
* Объединяет список файлов в одну строку.
|
|
1870
|
+
* @param list list of files / список файлов
|
|
1871
|
+
* @returns combined content string / объединенная строка контента
|
|
1872
|
+
*/
|
|
1873
|
+
toOneFile(list: DesignTypesList): string;
|
|
1874
|
+
/**
|
|
1875
|
+
* Reads the content of a file.
|
|
1876
|
+
*
|
|
1877
|
+
* Читает содержимое файла.
|
|
1878
|
+
* @param path file path / путь к файлу
|
|
1879
|
+
* @param directory directory containing the file / директория, содержащая файл
|
|
1880
|
+
* @returns file content or undefined / содержимое файла или undefined
|
|
1881
|
+
*/
|
|
1882
|
+
readFile(path: string, directory?: string): string | undefined;
|
|
1883
|
+
/**
|
|
1884
|
+
* Saves the generated content to a file.
|
|
1885
|
+
*
|
|
1886
|
+
* Сохраняет сгенерированный контент в файл.
|
|
1887
|
+
* @param content content to save / контент для сохранения
|
|
1888
|
+
*/
|
|
1889
|
+
save(content: string): void;
|
|
1890
|
+
/**
|
|
1891
|
+
* Saves a type definition file to the ai-types-list directory with an MD5 header.
|
|
1892
|
+
*
|
|
1893
|
+
* Сохраняет файл определений типов в директорию ai-types-list с заголовком MD5.
|
|
1894
|
+
* @param item type definition file item / элемент файла определений типов
|
|
1895
|
+
* @param isProcessed flag indicating if file is AI-processed / флаг, указывающий, обработан ли файл ИИ
|
|
1896
|
+
*/
|
|
1897
|
+
saveFile(item: DesignTypesItem, isProcessed?: boolean): void;
|
|
1898
|
+
/**
|
|
1899
|
+
* Saves copies of type definition files to the ai-types-list directory with an MD5 header.
|
|
1900
|
+
* Returns files that are new, modified, or not yet marked as AI-processed.
|
|
1901
|
+
*
|
|
1902
|
+
* Сохраняет копии файлов определений типов в директорию ai-types-list с заголовком MD5.
|
|
1903
|
+
* Возвращает файлы, которые являются новыми, измененными или еще не отмеченными как обработанные ИИ.
|
|
1904
|
+
* @param files list of type definition files / список файлов определений типов
|
|
1905
|
+
* @returns list of updated or unprocessed files / список обновленных или необработанных файлов
|
|
1906
|
+
*/
|
|
1907
|
+
saveList(files: DesignTypesList): DesignTypesList;
|
|
1908
|
+
/**
|
|
1909
|
+
* Checks if the content contains type definitions.
|
|
1910
|
+
*
|
|
1911
|
+
* Проверяет, содержит ли контент определения типов.
|
|
1912
|
+
* @param content file content / содержимое файла
|
|
1913
|
+
* @returns true if content contains exports / true, если контент содержит экспорты
|
|
1914
|
+
*/
|
|
1915
|
+
protected isContent(content?: string): content is string;
|
|
1916
|
+
/**
|
|
1917
|
+
* Reads a directory recursively.
|
|
1918
|
+
*
|
|
1919
|
+
* Читает директорию рекурсивно.
|
|
1920
|
+
* @param directory directory path to read / путь к директории для чтения
|
|
1921
|
+
* @returns array of relative file paths / массив относительных путей к файлам
|
|
1922
|
+
*/
|
|
1923
|
+
protected getList(directory?: string): string[];
|
|
1924
|
+
/**
|
|
1925
|
+
* Gets a list of files filtered by a provided checker function from a specific directory.
|
|
1926
|
+
*
|
|
1927
|
+
* Получает список файлов, отфильтрованный переданной функцией проверки из указанной директории.
|
|
1928
|
+
* @param checkFile function to check if the file matches criteria / функция проверки соответствия файла критериям
|
|
1929
|
+
* @param directory source directory path / путь к исходной директории
|
|
1930
|
+
* @returns filtered list of design type items / отфильтрованный список элементов типов
|
|
1931
|
+
*/
|
|
1932
|
+
protected getListBy(checkFile: (file: string) => boolean, directory?: string): DesignTypesList;
|
|
1933
|
+
/**
|
|
1934
|
+
* Generates the MD5 header string for a type definition file.
|
|
1935
|
+
*
|
|
1936
|
+
* Генерирует строку заголовка MD5 для файла определений типов.
|
|
1937
|
+
* @param md5 MD5 hash string / строка MD5 хэша
|
|
1938
|
+
* @param isProcessed flag indicating if file is AI-processed / флаг, указывающий, обработан ли файл ИИ
|
|
1939
|
+
* @returns formatted MD5 header string / отформатированная строка заголовка MD5
|
|
1940
|
+
*/
|
|
1941
|
+
protected getMd5Header(md5?: string, isProcessed?: boolean): string;
|
|
1942
|
+
/**
|
|
1943
|
+
* Returns the full path segments for a file.
|
|
1944
|
+
*
|
|
1945
|
+
* Возвращает сегменты полного пути для файла.
|
|
1946
|
+
* @param file file name / имя файла
|
|
1947
|
+
* @param directory directory containing the file / директория, содержащая файл
|
|
1948
|
+
* @returns array of path segments / массив сегментов пути
|
|
1949
|
+
*/
|
|
1950
|
+
protected getPath(file: string, directory?: string): string[];
|
|
1951
|
+
/**
|
|
1952
|
+
* Returns the path to the temporary compilation directory.
|
|
1953
|
+
*
|
|
1954
|
+
* Возвращает путь к временной директории компиляции.
|
|
1955
|
+
* @returns temporary compilation directory path / путь к временной директории компиляции
|
|
1956
|
+
*/
|
|
1957
|
+
protected getTemporaryDirectory(): string;
|
|
1958
|
+
/**
|
|
1959
|
+
* Returns the path to the compiled distribution directory.
|
|
1960
|
+
*
|
|
1961
|
+
* Возвращает путь к директории собранных файлов.
|
|
1962
|
+
* @returns compiled distribution directory path / путь к директории собранных файлов
|
|
1963
|
+
*/
|
|
1964
|
+
protected getDistDirectory(): string;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* Handles TypeScript AST-based transformations for cleaning declaration file content.
|
|
1969
|
+
* Provides methods for removing relative imports, relative re-exports, and non-public members.
|
|
1970
|
+
*
|
|
1971
|
+
* Обрабатывает AST-трансформации TypeScript для очистки содержимого файлов деклараций.
|
|
1972
|
+
* Предоставляет методы для удаления относительных импортов, относительных реэкспортов и непубличных членов.
|
|
1973
|
+
*/
|
|
1974
|
+
export declare class DesignTypesMakeTsTransformer {
|
|
1975
|
+
/**
|
|
1976
|
+
* Cleans up the declaration content via TypeScript AST transformation by removing relative imports, relative re-exports, non-public members, and empty lines.
|
|
1977
|
+
*
|
|
1978
|
+
* Очищает контент деклараций через AST-трансформацию TypeScript, удаляя относительные импорты, относительные реэкспорты, непубличные члены и пустые строки.
|
|
1979
|
+
* @param content content to clean / контент для очистки
|
|
1980
|
+
* @returns cleaned content string / очищенная строка контента
|
|
1981
|
+
*/
|
|
1982
|
+
cleanContent(content: string): string;
|
|
1983
|
+
/**
|
|
1984
|
+
* Creates a transformer factory that removes relative imports, relative re-exports, and non-public members from declaration files.
|
|
1985
|
+
*
|
|
1986
|
+
* Создает фабрику трансформеров, удаляющую относительные импорты, относительные реэкспорты и непубличные члены из файлов деклараций.
|
|
1987
|
+
* @returns transformer factory for declaration cleaning / фабрика трансформеров для очистки деклараций
|
|
1988
|
+
*/
|
|
1989
|
+
protected getCleanTransformer(): default_2.TransformerFactory<default_2.SourceFile>;
|
|
1990
|
+
/**
|
|
1991
|
+
* Checks if the node is a non-public (private or protected) class member.
|
|
1992
|
+
*
|
|
1993
|
+
* Проверяет, является ли узел непубличным (private или protected) членом класса.
|
|
1994
|
+
* @param node AST node to check / узел AST для проверки
|
|
1995
|
+
* @returns true if node has private or protected modifier / true, если узел имеет модификатор private или protected
|
|
1996
|
+
*/
|
|
1997
|
+
protected isNonPublicMember(node: default_2.Node): boolean;
|
|
1998
|
+
/**
|
|
1999
|
+
* Checks if the node is an import declaration with a relative module specifier.
|
|
2000
|
+
*
|
|
2001
|
+
* Проверяет, является ли узел импортом с относительным спецификатором модуля.
|
|
2002
|
+
* @param node AST node to check / узел AST для проверки
|
|
2003
|
+
* @returns true if node is a relative import / true, если узел является относительным импортом
|
|
2004
|
+
*/
|
|
2005
|
+
protected isRelativeImport(node: default_2.Node): boolean;
|
|
2006
|
+
/**
|
|
2007
|
+
* Checks if the node is an export declaration with a relative module specifier.
|
|
2008
|
+
*
|
|
2009
|
+
* Проверяет, является ли узел реэкспортом с относительным спецификатором модуля.
|
|
2010
|
+
* @param node AST node to check / узел AST для проверки
|
|
2011
|
+
* @returns true if node is a relative re-export / true, если узел является относительным реэкспортом
|
|
2012
|
+
*/
|
|
2013
|
+
protected isRelativeExport(node: default_2.Node): boolean;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* Class for generating, processing, and saving MCP server resources for AI documentation.
|
|
2018
|
+
*
|
|
2019
|
+
* Класс для генерации, обработки и сохранения ресурсов MCP-сервера для ИИ документации.
|
|
2020
|
+
*/
|
|
2021
|
+
export declare class DesignTypesMcp {
|
|
2022
|
+
protected readonly ai: DesignTypesAi;
|
|
2023
|
+
protected readonly prompts: DesignTypesPromptsAbstract;
|
|
2024
|
+
/**
|
|
2025
|
+
* Constructor for DesignTypesMcp.
|
|
2026
|
+
*
|
|
2027
|
+
* Конструктор для DesignTypesMcp.
|
|
2028
|
+
* @param ai instance of DesignTypesAi for AI interactions / экземпляр DesignTypesAi для ИИ взаимодействия
|
|
2029
|
+
* @param prompts instance of DesignTypesPromptsAbstract for prompt list management / экземпляр DesignTypesPromptsAbstract для управления списком промптов
|
|
2030
|
+
*/
|
|
2031
|
+
constructor(ai: DesignTypesAi, prompts: DesignTypesPromptsAbstract);
|
|
2032
|
+
/**
|
|
2033
|
+
* Checks if the MCP server resources file exists.
|
|
2034
|
+
*
|
|
2035
|
+
* Проверяет, существует ли файл ресурсов MCP-сервера.
|
|
2036
|
+
* @returns true if MCP resources file exists / true, если файл ресурсов MCP-сервера существует
|
|
2037
|
+
*/
|
|
2038
|
+
is(): boolean;
|
|
2039
|
+
/**
|
|
2040
|
+
* Generates and saves MCP server resources file.
|
|
2041
|
+
*
|
|
2042
|
+
* Генерирует и сохраняет файл ресурсов MCP-сервера.
|
|
2043
|
+
* @returns current instance / текущий экземпляр
|
|
2044
|
+
*/
|
|
2045
|
+
make(): Promise<this>;
|
|
2046
|
+
/**
|
|
2047
|
+
* Returns MIME type based on file extension.
|
|
2048
|
+
*
|
|
2049
|
+
* Возвращает MIME-тип на основе расширения файла.
|
|
2050
|
+
* @param file filename or path / имя файла или путь
|
|
2051
|
+
* @returns MIME type string / строка MIME-типа
|
|
2052
|
+
* @protected
|
|
2053
|
+
*/
|
|
2054
|
+
protected getMimeType(file: string): string;
|
|
2055
|
+
/**
|
|
2056
|
+
* Retrieves and formats the list of MCP screenshot resources.
|
|
2057
|
+
*
|
|
2058
|
+
* Получает и форматирует список ресурсов скриншотов MCP.
|
|
2059
|
+
* @param projectName project name / название проекта
|
|
2060
|
+
* @returns list of screenshot MCP resource items / список элементов MCP-ресурсов скриншотов
|
|
2061
|
+
* @protected
|
|
2062
|
+
*/
|
|
2063
|
+
protected getScreenshotList(projectName: string): DesignMcpResourceItem[];
|
|
2064
|
+
/**
|
|
2065
|
+
* Saves the MCP server resources to a JSON file.
|
|
2066
|
+
*
|
|
2067
|
+
* Сохраняет ресурсы MCP-сервера в JSON файл.
|
|
2068
|
+
* @param data data to save / данные для сохранения
|
|
2069
|
+
*/
|
|
2070
|
+
protected saveMcp(data: object): void;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
/**
|
|
2074
|
+
* Design types prompt cache item for AI document generation.
|
|
2075
|
+
*
|
|
2076
|
+
* Элемент кэша промптов типов дизайна для генерации AI-документации.
|
|
2077
|
+
*/
|
|
2078
|
+
export declare type DesignTypesPromptCacheItem = {
|
|
2079
|
+
/** Relative file path / Относительный путь к файлу */
|
|
2080
|
+
path: string;
|
|
2081
|
+
/** MD5 hash checksum / Контрольная сумма хэша MD5 */
|
|
2082
|
+
md5: string;
|
|
2083
|
+
/** Document title / Название документа */
|
|
2084
|
+
name: string;
|
|
2085
|
+
/** Document description / Описание документа */
|
|
2086
|
+
description: string;
|
|
2087
|
+
};
|
|
2088
|
+
|
|
2089
|
+
/**
|
|
2090
|
+
* List of design types prompt cache items.
|
|
2091
|
+
*
|
|
2092
|
+
* Список элементов кэша промптов типов дизайна.
|
|
2093
|
+
*/
|
|
2094
|
+
export declare type DesignTypesPromptCacheList = DesignTypesPromptCacheItem[];
|
|
2095
|
+
|
|
2096
|
+
/**
|
|
2097
|
+
* Prompt data payload containing document title and description.
|
|
2098
|
+
*
|
|
2099
|
+
* Объект данных промпта, содержащий заголовок и описание документа.
|
|
2100
|
+
*/
|
|
2101
|
+
export declare type DesignTypesPromptData = {
|
|
2102
|
+
/** Document title / Название документа */
|
|
2103
|
+
name?: string;
|
|
2104
|
+
/** Document description / Описание документа */
|
|
2105
|
+
description?: string;
|
|
2106
|
+
};
|
|
2107
|
+
|
|
2108
|
+
/**
|
|
2109
|
+
* Result of design types prompt generation with prompt string and cache status.
|
|
2110
|
+
*
|
|
2111
|
+
* Результат генерации промпта типов дизайна со строкой промпта и статусом кэша.
|
|
2112
|
+
*/
|
|
2113
|
+
export declare type DesignTypesPromptResult = {
|
|
2114
|
+
/** Formatted prompt rule string / Отформатированная строка правила промпта */
|
|
2115
|
+
prompt?: string;
|
|
2116
|
+
/** Flag indicating whether the cache was modified / Флаг, указывающий, был ли изменен кэш */
|
|
2117
|
+
isChanged: boolean;
|
|
2118
|
+
};
|
|
2119
|
+
|
|
2120
|
+
/**
|
|
2121
|
+
* Class for reading prompt files, managing individual prompt metadata files, and generating AI project rules and prompt triggers description.
|
|
2122
|
+
*
|
|
2123
|
+
* Класс для чтения файлов промптов, управления отдельными файлами метаданных промптов и генерации описания правил проекта ИИ и триггеров промптов.
|
|
2124
|
+
*/
|
|
2125
|
+
export declare class DesignTypesPrompts extends DesignTypesPromptsAbstract {
|
|
2126
|
+
/** Cached list of prompt files / Кэшированный список файлов с промптами */
|
|
2127
|
+
protected listPrompts?: DesignTypesList;
|
|
2128
|
+
/** Cached prompt AI metadata list / Кэшированный список метаданных промптов ИИ */
|
|
2129
|
+
protected cacheList?: DesignTypesPromptCacheList;
|
|
2130
|
+
/**
|
|
2131
|
+
* Reads and returns the prompt cache list from individual JSON files in the resources directory.
|
|
2132
|
+
*
|
|
2133
|
+
* Читает и возвращает список кэша промптов из отдельных JSON файлов в директории ресурсов.
|
|
2134
|
+
* @returns prompt cache list / список кэша промптов
|
|
2135
|
+
*/
|
|
2136
|
+
getCacheList(): DesignTypesPromptCacheList;
|
|
2137
|
+
/**
|
|
2138
|
+
* Gets a list of prompt files.
|
|
2139
|
+
*
|
|
2140
|
+
* Получает список файлов с промптами.
|
|
2141
|
+
* @returns list of prompt files / список файлов с промптами
|
|
2142
|
+
*/
|
|
2143
|
+
getListPrompts(): DesignTypesList;
|
|
2144
|
+
/**
|
|
2145
|
+
* Initializes prompt rules by executing cache processing and returning formatted prompt rule strings.
|
|
2146
|
+
*
|
|
2147
|
+
* Инициализирует правила промптов, выполняя обработку кэша и возвращая список отформатированных строк правил промптов.
|
|
2148
|
+
* @returns array of formatted prompt rule strings / массив отформатированных строк правил промптов
|
|
2149
|
+
*/
|
|
2150
|
+
init(): Promise<string[]>;
|
|
2151
|
+
/**
|
|
2152
|
+
* Processes prompt files using AI and updates individual JSON cache files if changes are detected.
|
|
2153
|
+
*
|
|
2154
|
+
* Обрабатывает файлы промптов с помощью ИИ и обновляет отдельные JSON файлы кэша при обнаружении изменений.
|
|
2155
|
+
* @returns current instance / текущий экземпляр
|
|
2156
|
+
*/
|
|
2157
|
+
make(): Promise<this>;
|
|
2158
|
+
/**
|
|
2159
|
+
* Generates project rules and prompt triggers description using AI.
|
|
2160
|
+
*
|
|
2161
|
+
* Генерирует описание правил проекта и триггеров промптов с помощью ИИ.
|
|
2162
|
+
* @returns prompt rules description / описание правил промптов
|
|
2163
|
+
*/
|
|
2164
|
+
toAiPrompts(): Promise<string>;
|
|
2165
|
+
/**
|
|
2166
|
+
* Gets the cache directory path for individual prompt JSON files.
|
|
2167
|
+
*
|
|
2168
|
+
* Получает путь к директории кэша для отдельных JSON файлов промптов.
|
|
2169
|
+
* @returns cache directory path / путь к директории кэша
|
|
2170
|
+
*/
|
|
2171
|
+
protected getCacheDir(): string;
|
|
2172
|
+
/**
|
|
2173
|
+
* Gets the cache JSON file path for a specific prompt file path.
|
|
2174
|
+
*
|
|
2175
|
+
* Получает путь к JSON файлу кэша для конкретного пути к файлу промпта.
|
|
2176
|
+
* @param path relative file path of the prompt / относительный путь к файлу промпта
|
|
2177
|
+
* @returns cache JSON file path / путь к JSON файлу кэша
|
|
2178
|
+
*/
|
|
2179
|
+
protected getCachePath(path: string): string;
|
|
2180
|
+
/**
|
|
2181
|
+
* Generates MD5 hash for the given content.
|
|
2182
|
+
*
|
|
2183
|
+
* Генерирует MD5 хэш для переданного содержимого.
|
|
2184
|
+
* @param content file or text content / содержимое файла или текста
|
|
2185
|
+
* @returns MD5 hash string / MD5 хэш строка
|
|
2186
|
+
*/
|
|
2187
|
+
protected getMd5(content: string): string;
|
|
2188
|
+
/**
|
|
2189
|
+
* Formats a prompt rule entry line for a file and description.
|
|
2190
|
+
*
|
|
2191
|
+
* Форматирует строку элемента правила промпта для файла и описания.
|
|
2192
|
+
* @param path relative file path / относительный путь к файлу
|
|
2193
|
+
* @param description rule description / описание правила
|
|
2194
|
+
* @returns formatted prompt rule line / отформатированная строка правила промпта
|
|
2195
|
+
*/
|
|
2196
|
+
protected getPromptLine(path: string, description: string): string;
|
|
2197
|
+
/**
|
|
2198
|
+
* Saves an individual prompt cache item to its JSON cache file.
|
|
2199
|
+
*
|
|
2200
|
+
* Сохраняет отдельный элемент кэша промпта в его JSON файл кэша.
|
|
2201
|
+
* @param item prompt cache item to save / элемент кэша промпта для сохранения
|
|
2202
|
+
*/
|
|
2203
|
+
protected saveCacheItem(item: DesignTypesPromptCacheItem): void;
|
|
2204
|
+
/**
|
|
2205
|
+
* Saves the prompt cache list to individual JSON cache files.
|
|
2206
|
+
*
|
|
2207
|
+
* Сохраняет список кэша промптов в отдельные JSON файлы кэша.
|
|
2208
|
+
* @param cache cache list to save / список кэша для сохранения
|
|
2209
|
+
*/
|
|
2210
|
+
protected saveCacheList(cache: DesignTypesPromptCacheList): void;
|
|
2211
|
+
/**
|
|
2212
|
+
* Generates document metadata (title and description) for studying a prompt file using AI.
|
|
2213
|
+
*
|
|
2214
|
+
* Генерирует метаданные документа (название и описание) для изучения файла промпта с помощью ИИ.
|
|
2215
|
+
* @param content prompt file content / содержимое файла промпта
|
|
2216
|
+
* @returns object with document title and description or undefined / объект с названием и описанием документа или undefined
|
|
2217
|
+
*/
|
|
2218
|
+
protected toAiPromptData(content: string): Promise<DesignTypesPromptData | undefined>;
|
|
2219
|
+
/**
|
|
2220
|
+
* Processes a single prompt file item using cache or AI into a formatted rule entry string and updates individual cache file if changed.
|
|
2221
|
+
*
|
|
2222
|
+
* Обрабатывает один элемент файла промпта с использованием кэша или ИИ в отформатированную строку правила и обновляет отдельный файл кэша при изменениях.
|
|
2223
|
+
* @param item prompt file item / элемент файла промпта
|
|
2224
|
+
* @returns object with formatted rule string and changed flag / объект с отформатированной строкой правила и флагом изменений
|
|
2225
|
+
*/
|
|
2226
|
+
protected toAiPromptItem(item: DesignTypesItem): Promise<DesignTypesPromptResult>;
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* Abstract class for reading, managing, and compiling AI prompts and rule metadata.
|
|
2231
|
+
* Allows custom implementations of prompt scanning and cache management for DesignTypes.
|
|
2232
|
+
*
|
|
2233
|
+
* Абстрактный класс для чтения, управления и компиляции метаданных промптов и правил ИИ.
|
|
2234
|
+
* Позволяет реализовывать собственную механику сканирования и кэширования для DesignTypes.
|
|
2235
|
+
*/
|
|
2236
|
+
export declare abstract class DesignTypesPromptsAbstract {
|
|
2237
|
+
protected readonly promptsDir: string;
|
|
2238
|
+
protected readonly ai: DesignTypesAi;
|
|
2239
|
+
/**
|
|
2240
|
+
* Constructor for DesignTypesPromptsAbstract.
|
|
2241
|
+
*
|
|
2242
|
+
* Конструктор для DesignTypesPromptsAbstract.
|
|
2243
|
+
* @param promptsDir input directory path containing prompt files / входной путь к директории, содержащей файлы промптов
|
|
2244
|
+
* @param ai instance of DesignTypesAi for AI interactions / экземпляр DesignTypesAi для ИИ взаимодействия
|
|
2245
|
+
*/
|
|
2246
|
+
constructor(promptsDir: string | undefined, ai: DesignTypesAi);
|
|
2247
|
+
/**
|
|
2248
|
+
* Reads and returns the prompt metadata list for MCP server resources.
|
|
2249
|
+
*
|
|
2250
|
+
* Читает и возвращает список метаданных промптов для ресурсов MCP-сервера.
|
|
2251
|
+
* @returns prompt metadata cache list / список метаданных промптов
|
|
2252
|
+
*/
|
|
2253
|
+
abstract getCacheList(): DesignTypesPromptCacheList;
|
|
2254
|
+
/**
|
|
2255
|
+
* Executes the prompt scanning and metadata generation process.
|
|
2256
|
+
*
|
|
2257
|
+
* Выполняет процесс сканирования промптов и генерации метаданных.
|
|
2258
|
+
* @returns current instance / текущий экземпляр
|
|
2259
|
+
*/
|
|
2260
|
+
abstract make(): Promise<this>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Generates formatted mandatory project rules and prompt triggers for ai-description.md.
|
|
2263
|
+
*
|
|
2264
|
+
* Генерирует форматированные обязательные правила проекта и триггеры промптов для ai-description.md.
|
|
2265
|
+
* @returns prompt rules markdown string / строка правил промптов в формате markdown
|
|
2266
|
+
*/
|
|
2267
|
+
abstract toAiPrompts(): Promise<string>;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* Configuration structure for the design system UI project (`d-ui.json`).
|
|
2272
|
+
*
|
|
2273
|
+
* Структура конфигурации для проекта дизайн-системы UI (`d-ui.json`).
|
|
2274
|
+
*/
|
|
2275
|
+
export declare type DesignUiConfig = {
|
|
2276
|
+
/** Extends another configuration file / Расширяет другой файл конфигурации */
|
|
2277
|
+
extends?: string;
|
|
2278
|
+
/** Project name / Название проекта */
|
|
2279
|
+
project?: string;
|
|
2280
|
+
/** Design system name / Название дизайн-системы */
|
|
2281
|
+
name?: string;
|
|
2282
|
+
/** Alternative design system names / Альтернативные названия дизайн-системы */
|
|
2283
|
+
alternativeName?: string[];
|
|
2284
|
+
/** Package prefix for generating package names / Префикс пакета для генерации названий пакетов */
|
|
2285
|
+
packagePrefix?: string;
|
|
2286
|
+
/**
|
|
2287
|
+
* Directory path for temporary TypeScript type definitions compilation /
|
|
2288
|
+
* Путь к временной директории для компиляции определений типов TypeScript
|
|
2289
|
+
*/
|
|
2290
|
+
typesDir?: string;
|
|
2291
|
+
/**
|
|
2292
|
+
* Specific directory paths to scan for types; if specified, only these directories will be scanned /
|
|
2293
|
+
* Определенные пути к директориям для сканирования типов; если указано, сканируются только эти папки
|
|
2294
|
+
*/
|
|
2295
|
+
typesPaths?: string[];
|
|
2296
|
+
/**
|
|
2297
|
+
* Pattern or regular expression to match paths for inclusion during type scanning; if matched, path is scanned, otherwise ignored /
|
|
2298
|
+
* Шаблон или регулярное выражение для проверки соответствия пути на включение при сканировании типов; если путь соответствует, он сканируется, иначе игнорируется
|
|
2299
|
+
*/
|
|
2300
|
+
typesMatch?: string | string[];
|
|
2301
|
+
/**
|
|
2302
|
+
* Pattern or regular expression to match paths for exclusion during type scanning; if matched, path is ignored /
|
|
2303
|
+
* Шаблон или регулярное выражение для исключения путей при сканировании типов; если путь соответствует, он игнорируется
|
|
2304
|
+
*/
|
|
2305
|
+
typesExclude?: string | string[];
|
|
2306
|
+
/**
|
|
2307
|
+
* Flag indicating that Vue Single File Components (.vue) should not be processed during type scanning; if true, Vue compilation is skipped /
|
|
2308
|
+
* Флаг, указывающий, что файлы компонентов Vue (.vue) не должны обрабатываться при сканировании типов; если true, компиляция Vue пропускается
|
|
2309
|
+
*/
|
|
2310
|
+
typesWithoutVue?: boolean;
|
|
2311
|
+
/**
|
|
2312
|
+
* Distribution output directory path containing compiled JavaScript files /
|
|
2313
|
+
* Путь к директории сборки, содержащей скомпилированные файлы JavaScript
|
|
2314
|
+
*/
|
|
2315
|
+
distDir?: string;
|
|
2316
|
+
/**
|
|
2317
|
+
* Abbreviation symbol; this key will be used to separate into sub-branches /
|
|
2318
|
+
* Символ сокращения, такой ключ будет разделять на под-ветки
|
|
2319
|
+
*/
|
|
2320
|
+
separator?: string;
|
|
2321
|
+
/**
|
|
2322
|
+
* Name that will be removed when splitting into branches /
|
|
2323
|
+
* Название, которое будет удаляться при разделении на ветки
|
|
2324
|
+
*/
|
|
2325
|
+
separatorBasicName?: string;
|
|
2326
|
+
/**
|
|
2327
|
+
* Limit of key splitting into sub-branches /
|
|
2328
|
+
* Лимит разделения ключа на под-ветки
|
|
2329
|
+
*/
|
|
2330
|
+
separatorLimit?: number;
|
|
2331
|
+
/** Target language code for wiki generation / Код целевого языка для генерации wiki */
|
|
2332
|
+
wikiLanguage?: string;
|
|
2333
|
+
/**
|
|
2334
|
+
* Directory path containing AI resource and prompt files /
|
|
2335
|
+
* Путь к директории, содержащей файлы ресурсов и промптов ИИ
|
|
2336
|
+
*/
|
|
2337
|
+
aiResourcesDir?: string;
|
|
2338
|
+
/**
|
|
2339
|
+
* Maximum directory scan depth for collecting AI prompt packages; deeper nesting is skipped /
|
|
2340
|
+
* Максимальная глубина сканирования директорий для сбора пакетов промпта ИИ; более глубокая вложенность пропускается
|
|
2341
|
+
*/
|
|
2342
|
+
promptScanDepth?: number;
|
|
2343
|
+
/** AI provider type for generating content / Тип ИИ-провайдера для генерации контента */
|
|
2344
|
+
aiType?: AiType;
|
|
2345
|
+
/** AI model name for generating content / Название модели ИИ для генерации контента */
|
|
2346
|
+
aiModel?: string;
|
|
2347
|
+
/** Google AI / Gemini API key / Ключ Google AI / Gemini API */
|
|
2348
|
+
aiKey?: string;
|
|
2349
|
+
/** Additional AI provider configuration parameters / Дополнительные параметры конфигурации ИИ-провайдера */
|
|
2350
|
+
aiConfig?: Record<string, any>;
|
|
2351
|
+
/**
|
|
2352
|
+
* Maximum number of type definition files processed by AI concurrently /
|
|
2353
|
+
* Максимальное количество файлов определений типов, обрабатываемых ИИ одновременно
|
|
2354
|
+
*/
|
|
2355
|
+
aiTypesConcurrency?: number;
|
|
2356
|
+
/** Figma personal access token for REST API authentication / Персональный токен доступа Figma для аутентификации REST API */
|
|
2357
|
+
figmaToken?: string;
|
|
2358
|
+
};
|
|
2359
|
+
|
|
2360
|
+
/** Base URL for Figma REST API / Базовый URL для Figma REST API */
|
|
2361
|
+
export declare const FIGMA_API_URL: string;
|
|
2362
|
+
|
|
2363
|
+
/**
|
|
2364
|
+
* Figma REST API endpoints enum.
|
|
2365
|
+
*
|
|
2366
|
+
* Перечисление эндпоинтов Figma REST API.
|
|
2367
|
+
*/
|
|
2368
|
+
export declare enum FigmaApiEndpoint {
|
|
2369
|
+
/** Get file content / Получить содержимое файла */
|
|
2370
|
+
files = "files/:file_key",
|
|
2371
|
+
/** Get specific nodes from a file / Получить конкретные узлы из файла */
|
|
2372
|
+
fileNodes = "files/:file_key/nodes",
|
|
2373
|
+
/** Get specific images from a file / Получить конкретные изображения из файла */
|
|
2374
|
+
fileImages = "images/:file_key",
|
|
2375
|
+
/** Get image fills from a file / Получить заливки изображений из файла */
|
|
2376
|
+
fileImageFills = "files/:file_key/images",
|
|
2377
|
+
/** Get file versions / Получить версии файла */
|
|
2378
|
+
fileVersions = "files/:file_key/versions",
|
|
2379
|
+
/** Get file comments / Получить комментарии файла */
|
|
2380
|
+
fileComments = "files/:file_key/comments",
|
|
2381
|
+
/** Get user information / Получить информацию о пользователе */
|
|
2382
|
+
me = "me",
|
|
2383
|
+
/** Get team projects / Получить проекты команды */
|
|
2384
|
+
teamProjects = "teams/:team_id/projects",
|
|
2385
|
+
/** Get project files / Получить файлы проекта */
|
|
2386
|
+
projectFiles = "projects/:project_id/files",
|
|
2387
|
+
/** Get component information / Получить информацию о компоненте */
|
|
2388
|
+
components = "components/:key",
|
|
2389
|
+
/** Get file components / Получить компоненты файла */
|
|
2390
|
+
fileComponents = "files/:file_key/components",
|
|
2391
|
+
/** Get team components / Получить компоненты команды */
|
|
2392
|
+
teamComponents = "teams/:team_id/components",
|
|
2393
|
+
/** Get component set information / Получить информацию о наборе компонентов */
|
|
2394
|
+
componentSets = "component_sets/:key",
|
|
2395
|
+
/** Get file component sets / Получить наборы компонентов файла */
|
|
2396
|
+
fileComponentSets = "files/:file_key/component_sets",
|
|
2397
|
+
/** Get team component sets / Получить наборы компонентов команды */
|
|
2398
|
+
teamComponentSets = "teams/:team_id/component_sets",
|
|
2399
|
+
/** Get style information / Получить информацию о стиле */
|
|
2400
|
+
styles = "styles/:key",
|
|
2401
|
+
/** Get file styles / Получить стили файла */
|
|
2402
|
+
fileStyles = "files/:file_key/styles",
|
|
2403
|
+
/** Get team styles / Получить стили команды */
|
|
2404
|
+
teamStyles = "teams/:team_id/styles"
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
/**
|
|
2408
|
+
* Parameters for the fileImages endpoint.
|
|
2409
|
+
*
|
|
2410
|
+
* Параметры для эндпоинта fileImages.
|
|
2411
|
+
*/
|
|
2412
|
+
export declare type FigmaFileImagesParams = {
|
|
2413
|
+
/** A comma separated list of node IDs to render / Список ID узлов через запятую для рендеринга */
|
|
2414
|
+
ids: string;
|
|
2415
|
+
/** A number between 0.01 and 4, the image scaling factor / Число от 0.01 до 4, коэффициент масштабирования изображения */
|
|
2416
|
+
scale?: number;
|
|
2417
|
+
/** The image output format, as a string enum / Формат вывода изображения в виде строки enum */
|
|
2418
|
+
format?: 'jpg' | 'png' | 'svg' | 'pdf';
|
|
2419
|
+
/**
|
|
2420
|
+
* Whether text elements are rendered as outlines (vector paths) or as <text> elements in SVGs /
|
|
2421
|
+
* Визуализируются ли текстовые элементы как контуры (векторные контуры) или как элементы <text> в SVG
|
|
2422
|
+
* @default true
|
|
2423
|
+
*/
|
|
2424
|
+
svg_outline_text?: boolean;
|
|
2425
|
+
/**
|
|
2426
|
+
* Whether to include id attributes for all SVG elements. Adds the layer name to the id attribute of an svg element /
|
|
2427
|
+
* Включать ли атрибуты id для всех элементов SVG. Добавляет имя слоя в атрибут id элемента svg
|
|
2428
|
+
* @default false
|
|
2429
|
+
*/
|
|
2430
|
+
svg_include_id?: boolean;
|
|
2431
|
+
/**
|
|
2432
|
+
* Whether to include node id attributes for all SVG elements. Adds the node id to a data-node-id attribute of an svg element /
|
|
2433
|
+
* Включать ли атрибуты id узла для всех элементов SVG. Добавляет id узла в атрибут data-node-id элемента svg
|
|
2434
|
+
* @default false
|
|
2435
|
+
*/
|
|
2436
|
+
svg_include_node_id?: boolean;
|
|
2437
|
+
/**
|
|
2438
|
+
* Whether to simplify inside/outside strokes and use stroke attribute if possible instead of <mask> /
|
|
2439
|
+
* Упрощать ли внутренние/внешние обводки и использовать атрибут stroke, если это возможно, вместо <mask>
|
|
2440
|
+
* @default true
|
|
2441
|
+
*/
|
|
2442
|
+
svg_simplify_stroke?: boolean;
|
|
2443
|
+
/**
|
|
2444
|
+
* Whether content that overlaps the node should be excluded from rendering /
|
|
2445
|
+
* Должен ли контент, перекрывающий узел, быть исключен из рендеринга
|
|
2446
|
+
* @default true
|
|
2447
|
+
*/
|
|
2448
|
+
contents_only?: boolean;
|
|
2449
|
+
/**
|
|
2450
|
+
* Use the full dimensions of the node regardless of whether or not it is cropped or the space around it is empty /
|
|
2451
|
+
* Использовать полные размеры узла независимо от того, обрезан он или пространство вокруг него пустое
|
|
2452
|
+
* @default false
|
|
2453
|
+
*/
|
|
2454
|
+
use_absolute_bounds?: boolean;
|
|
2455
|
+
/** A specific version ID to use / Идентификатор конкретной версии для использования */
|
|
2456
|
+
version?: string;
|
|
2457
|
+
};
|
|
2458
|
+
|
|
2459
|
+
/**
|
|
2460
|
+
* Result returned by the fileImages endpoint.
|
|
2461
|
+
*
|
|
2462
|
+
* Результат, возвращаемый эндпоинтом fileImages.
|
|
2463
|
+
*/
|
|
2464
|
+
export declare type FigmaFileImagesResult = {
|
|
2465
|
+
/** Error message if the request failed / Сообщение об ошибке, если запрос не удался */
|
|
2466
|
+
err: string | null;
|
|
2467
|
+
/** A mapping from node IDs to URLs of the rendered images / Сопоставление ID узлов с URL-адресами отрендеренных изображений */
|
|
2468
|
+
images: Record<string, string>;
|
|
2469
|
+
/** Status code of the response / Код статуса ответа */
|
|
2470
|
+
status: number;
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* Parameters for the fileNodes endpoint.
|
|
2475
|
+
*
|
|
2476
|
+
* Параметры для эндпоинта fileNodes.
|
|
2477
|
+
*/
|
|
2478
|
+
export declare type FigmaFileNodesParams = {
|
|
2479
|
+
/** A comma separated list of node IDs to retrieve and convert / Список ID узлов через запятую для получения и преобразования */
|
|
2480
|
+
ids: string;
|
|
2481
|
+
/** A specific version ID to get / Идентификатор конкретной версии для получения */
|
|
2482
|
+
version?: string;
|
|
2483
|
+
/** How deep into the node tree to traverse / Насколько глубоко по дереву узлов нужно пройтись */
|
|
2484
|
+
depth?: number;
|
|
2485
|
+
/** Set to "paths" to export vector data / Установите "paths" для экспорта векторных данных */
|
|
2486
|
+
geometry?: 'paths';
|
|
2487
|
+
/** A comma separated list of plugin IDs to include their data / Список ID плагинов через запятую для включения их данных */
|
|
2488
|
+
plugin_data?: string;
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
/**
|
|
2492
|
+
* Result returned by the fileNodes endpoint.
|
|
2493
|
+
*
|
|
2494
|
+
* Результат, возвращаемый эндпоинтом fileNodes.
|
|
2495
|
+
*/
|
|
2496
|
+
export declare type FigmaFileNodesResult = {
|
|
2497
|
+
/** File name / Название файла */
|
|
2498
|
+
name: string;
|
|
2499
|
+
/** User's role in the file / Роль пользователя в файле */
|
|
2500
|
+
role: string;
|
|
2501
|
+
/** Last modified date / Дата последнего изменения */
|
|
2502
|
+
lastModified: string;
|
|
2503
|
+
/** Editor type (figma or figjam) / Тип редактора (figma или figjam) */
|
|
2504
|
+
editorType: string;
|
|
2505
|
+
/** URL to the file thumbnail / URL миниатюры файла */
|
|
2506
|
+
thumbnailUrl: string;
|
|
2507
|
+
/** Error message if any / Сообщение об ошибке, если есть */
|
|
2508
|
+
err?: string;
|
|
2509
|
+
/** Map of node IDs to node data / Карта ID узлов и данных узлов */
|
|
2510
|
+
nodes: Record<string, {
|
|
2511
|
+
/** The root node of the requested subtree / Корневой узел запрошенного поддерева */
|
|
2512
|
+
document: any;
|
|
2513
|
+
/** Map of components used in the subtree / Карта компонентов, используемых в поддереве */
|
|
2514
|
+
components: Record<string, any>;
|
|
2515
|
+
/** Map of component sets used in the subtree / Карта наборов компонентов, используемых в поддереве */
|
|
2516
|
+
componentSets: Record<string, any>;
|
|
2517
|
+
/** Schema version / Версия схемы */
|
|
2518
|
+
schemaVersion: number;
|
|
2519
|
+
/** Map of styles used in the subtree / Карта стилей, используемых в поддереве */
|
|
2520
|
+
styles: Record<string, any>;
|
|
2521
|
+
}>;
|
|
2522
|
+
};
|
|
2523
|
+
|
|
2524
|
+
/**
|
|
2525
|
+
* Parameters for the files endpoint.
|
|
2526
|
+
*
|
|
2527
|
+
* Параметры для эндпоинта files.
|
|
2528
|
+
*/
|
|
2529
|
+
export declare type FigmaFilesParams = {
|
|
2530
|
+
/** A specific version ID to get / Идентификатор конкретной версии для получения */
|
|
2531
|
+
version?: string;
|
|
2532
|
+
/** Comma separated list of nodes that you care about in the document / Список узлов через запятую, которые вас интересуют в документе */
|
|
2533
|
+
ids?: string;
|
|
2534
|
+
/** How deep into the document tree to traverse / Насколько глубоко по дереву документа нужно пройтись */
|
|
2535
|
+
depth?: number;
|
|
2536
|
+
/** Set to "paths" to export vector data / Установите "paths" для экспорта векторных данных */
|
|
2537
|
+
geometry?: 'paths';
|
|
2538
|
+
/** A comma separated list of plugin IDs to include their data / Список ID плагинов через запятую для включения их данных */
|
|
2539
|
+
plugin_data?: string;
|
|
2540
|
+
/**
|
|
2541
|
+
* Returns branch metadata for the requested file /
|
|
2542
|
+
* Возвращает метаданные ветки для запрошенного файла
|
|
2543
|
+
* @default false
|
|
2544
|
+
*/
|
|
2545
|
+
branch_data?: boolean;
|
|
2546
|
+
};
|
|
2547
|
+
|
|
2548
|
+
/**
|
|
2549
|
+
* Result returned by the files endpoint.
|
|
2550
|
+
*
|
|
2551
|
+
* Результат, возвращаемый эндпоинтом files.
|
|
2552
|
+
*/
|
|
2553
|
+
export declare type FigmaFilesResult = {
|
|
2554
|
+
/** File name / Название файла */
|
|
2555
|
+
name: string;
|
|
2556
|
+
/** User's role in the file / Роль пользователя в файле */
|
|
2557
|
+
role: string;
|
|
2558
|
+
/** Last modified date / Дата последнего изменения */
|
|
2559
|
+
lastModified: string;
|
|
2560
|
+
/** Editor type (figma or figjam) / Тип редактора (figma или figjam) */
|
|
2561
|
+
editorType: string;
|
|
2562
|
+
/** URL to the file thumbnail / URL миниатюры файла */
|
|
2563
|
+
thumbnailUrl: string;
|
|
2564
|
+
/** Version ID / Идентификатор версии */
|
|
2565
|
+
version: string;
|
|
2566
|
+
/** The root node of the document / Корневой узел документа */
|
|
2567
|
+
document: any;
|
|
2568
|
+
/** Map of components used in the file / Карта компонентов, используемых в файле */
|
|
2569
|
+
components: Record<string, any>;
|
|
2570
|
+
/** Map of component sets used in the file / Карта наборов компонентов, используемых в файле */
|
|
2571
|
+
componentSets: Record<string, any>;
|
|
2572
|
+
/** Schema version / Версия схемы */
|
|
2573
|
+
schemaVersion: number;
|
|
2574
|
+
/** Map of styles used in the file / Карта стилей, используемых в файле */
|
|
2575
|
+
styles: Record<string, any>;
|
|
2576
|
+
/** Main file key if this is a branch / Ключ основного файла, если это ветка */
|
|
2577
|
+
mainFileKey?: string;
|
|
2578
|
+
/** List of branches for the file / Список веток для файла */
|
|
2579
|
+
branches?: {
|
|
2580
|
+
/** Branch key / Ключ ветки */
|
|
2581
|
+
key: string;
|
|
2582
|
+
/** Branch name / Название ветки */
|
|
2583
|
+
name: string;
|
|
2584
|
+
/** URL to the branch thumbnail / URL миниатюры ветки */
|
|
2585
|
+
thumbnail_url: string;
|
|
2586
|
+
/** Last modified date of the branch / Дата последнего изменения ветки */
|
|
2587
|
+
last_modified: string;
|
|
2588
|
+
/** Link access level / Уровень доступа по ссылке */
|
|
2589
|
+
link_access: string;
|
|
2590
|
+
}[];
|
|
2591
|
+
};
|
|
2592
|
+
|
|
2593
|
+
/**
|
|
2594
|
+
* Result returned by the fileStyles endpoint.
|
|
2595
|
+
*
|
|
2596
|
+
* Результат, возвращаемый эндпоинтом fileStyles.
|
|
2597
|
+
*/
|
|
2598
|
+
export declare type FigmaFileStylesResult = {
|
|
2599
|
+
/** Status code of the response / Код статуса ответа */
|
|
2600
|
+
status: number;
|
|
2601
|
+
/** Whether an error occurred / Произошла ли ошибка */
|
|
2602
|
+
error: boolean;
|
|
2603
|
+
/** Metadata container / Контейнер метаданных */
|
|
2604
|
+
meta: {
|
|
2605
|
+
/** List of styles in the file / Список стилей в файле */
|
|
2606
|
+
styles: {
|
|
2607
|
+
/** The unique identifier of the style / Уникальный идентификатор стиля */
|
|
2608
|
+
key: string;
|
|
2609
|
+
/** The key of the file the style lives in / Ключ файла, в котором находится стиль */
|
|
2610
|
+
file_key: string;
|
|
2611
|
+
/** The node ID that corresponds to the style / ID узла, соответствующий стилю */
|
|
2612
|
+
node_id: string;
|
|
2613
|
+
/** The type of style (FILL, TEXT, EFFECT, or GRID) / Тип стиля (FILL, TEXT, EFFECT или GRID) */
|
|
2614
|
+
style_type: 'FILL' | 'TEXT' | 'EFFECT' | 'GRID';
|
|
2615
|
+
/** URL to a thumbnail image of the style / URL-адрес миниатюры стиля */
|
|
2616
|
+
thumbnail_url: string;
|
|
2617
|
+
/** Name of the style / Название стиля */
|
|
2618
|
+
name: string;
|
|
2619
|
+
/** Description of the style / Описание стиля */
|
|
2620
|
+
description: string;
|
|
2621
|
+
/** Date the style was last updated / Дата последнего обновления стиля */
|
|
2622
|
+
updated_at: string;
|
|
2623
|
+
/** Date the style was created / Дата создания стиля */
|
|
2624
|
+
created_at: string;
|
|
2625
|
+
/** A sortable string for the style's position / Строка для сортировки позиции стиля */
|
|
2626
|
+
sort_position: string;
|
|
2627
|
+
/** The user who created the style / Пользователь, создавший стиль */
|
|
2628
|
+
user: {
|
|
2629
|
+
/** User's ID / ID пользователя */
|
|
2630
|
+
id: string;
|
|
2631
|
+
/** User's handle / Никнейм пользователя */
|
|
2632
|
+
handle: string;
|
|
2633
|
+
/** URL to the user's avatar / URL-адрес аватара пользователя */
|
|
2634
|
+
img_url: string;
|
|
2635
|
+
};
|
|
2636
|
+
}[];
|
|
2637
|
+
};
|
|
2638
|
+
};
|
|
2639
|
+
|
|
2640
|
+
/**
|
|
2641
|
+
* Result returned by the styles endpoint.
|
|
2642
|
+
*
|
|
2643
|
+
* Результат, возвращаемый эндпоинтом styles.
|
|
2644
|
+
*/
|
|
2645
|
+
export declare type FigmaStylesResult = {
|
|
2646
|
+
/** Status code of the response / Код статуса ответа */
|
|
2647
|
+
status: number;
|
|
2648
|
+
/** Whether an error occurred / Произошла ли ошибка */
|
|
2649
|
+
error: boolean;
|
|
2650
|
+
/** Metadata about the style / Метаданные о стиле */
|
|
2651
|
+
meta: {
|
|
2652
|
+
/** The unique identifier of the style / Уникальный идентификатор стиля */
|
|
2653
|
+
key: string;
|
|
2654
|
+
/** The key of the file the style lives in / Ключ файла, в котором находится стиль */
|
|
2655
|
+
file_key: string;
|
|
2656
|
+
/** The node ID that corresponds to the style / ID узла, соответствующий стилю */
|
|
2657
|
+
node_id: string;
|
|
2658
|
+
/** The type of style (FILL, TEXT, EFFECT, or GRID) / Тип стиля (FILL, TEXT, EFFECT или GRID) */
|
|
2659
|
+
style_type: 'FILL' | 'TEXT' | 'EFFECT' | 'GRID';
|
|
2660
|
+
/** URL to a thumbnail image of the style / URL-адрес миниатюры стиля */
|
|
2661
|
+
thumbnail_url: string;
|
|
2662
|
+
/** Name of the style / Название стиля */
|
|
2663
|
+
name: string;
|
|
2664
|
+
/** Description of the style / Описание стиля */
|
|
2665
|
+
description: string;
|
|
2666
|
+
/** Date the style was last updated / Дата последнего обновления стиля */
|
|
2667
|
+
updated_at: string;
|
|
2668
|
+
/** Date the style was created / Дата создания стиля */
|
|
2669
|
+
created_at: string;
|
|
2670
|
+
/** A sortable string for the style's position / Строка для сортировки позиции стиля */
|
|
2671
|
+
sort_position: string;
|
|
2672
|
+
/** The user who created the style / Пользователь, создавший стиль */
|
|
2673
|
+
user: {
|
|
2674
|
+
/** User's ID / ID пользователя */
|
|
2675
|
+
id: string;
|
|
2676
|
+
/** User's handle / Никнейм пользователя */
|
|
2677
|
+
handle: string;
|
|
2678
|
+
/** URL to the user's avatar / URL-адрес аватара пользователя */
|
|
2679
|
+
img_url: string;
|
|
2680
|
+
};
|
|
2681
|
+
};
|
|
2682
|
+
};
|
|
2683
|
+
|
|
2684
|
+
/**
|
|
2685
|
+
* Reads and parses `package.json` file content for the specified path or project root.
|
|
2686
|
+
*
|
|
2687
|
+
* Считывает и парсит содержимое файла `package.json` для указанного пути или корня проекта.
|
|
2688
|
+
* @param path optional path to directory or package.json file / опциональный путь к директории или файлу package.json
|
|
2689
|
+
* @returns parsed package.json data object or undefined if not found / распарсенный объект данных package.json или undefined, если файл не найден
|
|
2690
|
+
*/
|
|
2691
|
+
export declare function getPackageJson(path?: PropertiesFilePath): Record<string, any> | undefined;
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* Git file item containing paths, modification date, and status.
|
|
2695
|
+
*
|
|
2696
|
+
* Элемент файла Git, содержащий пути, дату изменения и статус.
|
|
2697
|
+
*/
|
|
2698
|
+
export declare type GitFileItem = {
|
|
2699
|
+
/** Relative repository path / Относительный путь в репозитории */
|
|
2700
|
+
path: string;
|
|
2701
|
+
/** Array of path segments formatted for the current OS / Массив сегментов пути, отформатированный для текущей ОС */
|
|
2702
|
+
pathByOS: string[];
|
|
2703
|
+
/** Full absolute filesystem path / Полный абсолютный путь в файловой системе */
|
|
2704
|
+
pathFull: string;
|
|
2705
|
+
/** Last modification date or commit timestamp / Дата последнего изменения или временная метка коммита */
|
|
2706
|
+
date: string;
|
|
2707
|
+
/** Git status code / Код статуса Git */
|
|
2708
|
+
status?: GitStatus;
|
|
2709
|
+
};
|
|
2710
|
+
|
|
2711
|
+
/**
|
|
2712
|
+
* List of Git file items.
|
|
2713
|
+
*
|
|
2714
|
+
* Список элементов файлов Git.
|
|
2715
|
+
*/
|
|
2716
|
+
export declare type GitFileList = GitFileItem[];
|
|
2717
|
+
|
|
2718
|
+
/**
|
|
2719
|
+
* Class for reading information from Git repository.
|
|
2720
|
+
*
|
|
2721
|
+
* Класс для чтения информации из Git репозитория.
|
|
2722
|
+
*/
|
|
2723
|
+
export declare class GitRead {
|
|
2724
|
+
/**
|
|
2725
|
+
* Gets list of files with their metadata.
|
|
2726
|
+
*
|
|
2727
|
+
* Получает список файлов с их метаданными.
|
|
2728
|
+
* @param filter - file filter function / функция фильтрации файлов
|
|
2729
|
+
* @returns list of git files / список файлов git
|
|
2730
|
+
*/
|
|
2731
|
+
static getList(filter?: (file: string) => boolean): GitFileList;
|
|
2732
|
+
/**
|
|
2733
|
+
* Gets list of files in porcelain format with their metadata.
|
|
2734
|
+
*
|
|
2735
|
+
* Получает список файлов в формате porcelain с их метаданными.
|
|
2736
|
+
* @param filter - file filter function / функция фильтрации файлов
|
|
2737
|
+
* @returns list of git files with porcelain status / список файлов git со статусом porcelain
|
|
2738
|
+
*/
|
|
2739
|
+
static getListPorcelain(filter?: (file: string) => boolean): GitFileList;
|
|
2740
|
+
/**
|
|
2741
|
+
* Gets unique list of files from both standard and porcelain lists.
|
|
2742
|
+
*
|
|
2743
|
+
* Получает уникальный список файлов из обоих стандартных и porcelain списков.
|
|
2744
|
+
* @param filter - file filter function / функция фильтрации файлов
|
|
2745
|
+
* @returns merged unique list of git files / объединенный уникальный список файлов git
|
|
2746
|
+
*/
|
|
2747
|
+
static getListUnique(filter: (file: string) => boolean): GitFileList;
|
|
2748
|
+
/**
|
|
2749
|
+
* Gets list of files by directory with .ts extension, excluding test files.
|
|
2750
|
+
*
|
|
2751
|
+
* Получает список файлов по директории с расширением .ts, исключая тестовые файлы.
|
|
2752
|
+
* @param directory - directory path or regex / путь к директории или регулярное выражение
|
|
2753
|
+
* @returns list of matching git files / список подходящих файлов git
|
|
2754
|
+
*/
|
|
2755
|
+
static getListByDirectory(directory: string | RegExp): GitFileList;
|
|
2756
|
+
/**
|
|
2757
|
+
* Gets list of class files (*.ts in /classes/ directory).
|
|
2758
|
+
*
|
|
2759
|
+
* Получает список файлов классов (*.ts в директории /classes/).
|
|
2760
|
+
* @returns list of class git files / список файлов классов git
|
|
2761
|
+
*/
|
|
2762
|
+
static getClassesList(): GitFileList;
|
|
2763
|
+
/**
|
|
2764
|
+
* Gets list of function files (*.ts in /functions/ directory).
|
|
2765
|
+
*
|
|
2766
|
+
* Получает список файлов функций (*.ts в директории /functions/).
|
|
2767
|
+
* @returns list of function git files / список файлов функций git
|
|
2768
|
+
*/
|
|
2769
|
+
static getFunctionsList(): GitFileList;
|
|
2770
|
+
/**
|
|
2771
|
+
* Gets list of all file paths in repository.
|
|
2772
|
+
*
|
|
2773
|
+
* Получает список всех путей файлов в репозитории.
|
|
2774
|
+
* @returns array of file paths / массив путей к файлам
|
|
2775
|
+
*/
|
|
2776
|
+
static getFilesPath(): string[];
|
|
2777
|
+
/**
|
|
2778
|
+
* Gets list of files in porcelain format.
|
|
2779
|
+
*
|
|
2780
|
+
* Получает список файлов в формате porcelain.
|
|
2781
|
+
* @returns array of porcelain status lines / массив строк статуса porcelain
|
|
2782
|
+
*/
|
|
2783
|
+
static getFilesPorcelain(): string[];
|
|
2784
|
+
/**
|
|
2785
|
+
* Gets the date of the last commit for a file.
|
|
2786
|
+
*
|
|
2787
|
+
* Получает дату последнего коммита для файла.
|
|
2788
|
+
* @param filePath - path to file / путь к файлу
|
|
2789
|
+
* @returns commit date string / строка даты коммита
|
|
2790
|
+
*/
|
|
2791
|
+
static getFileDate(filePath: string): string;
|
|
2792
|
+
/**
|
|
2793
|
+
* Gets the directory prefix of the current Git repository.
|
|
2794
|
+
*
|
|
2795
|
+
* Получает префикс директории текущего Git репозитория.
|
|
2796
|
+
* @returns directory prefix string / строка префикса директории
|
|
2797
|
+
*/
|
|
2798
|
+
static getDirPrefix(): string;
|
|
2799
|
+
/**
|
|
2800
|
+
* Formats a date string to standard full format.
|
|
2801
|
+
*
|
|
2802
|
+
* Форматирует строку даты в стандартный полный формат.
|
|
2803
|
+
* @param date - date string / строка даты
|
|
2804
|
+
* @returns formatted date string / отформатированная строка даты
|
|
2805
|
+
*/
|
|
2806
|
+
static getDate(date?: string): string;
|
|
2807
|
+
/**
|
|
2808
|
+
* Filters a list of Git files by the current directory prefix.
|
|
2809
|
+
*
|
|
2810
|
+
* Фильтрует список файлов Git по префиксу текущей директории.
|
|
2811
|
+
* @param list - list of Git files / список файлов Git
|
|
2812
|
+
* @returns filtered list of git files / отфильтрованный список файлов git
|
|
2813
|
+
*/
|
|
2814
|
+
static filterByDirectory(list: GitFileList): GitFileList;
|
|
2815
|
+
/**
|
|
2816
|
+
* Merges two lists of Git files, ensuring uniqueness by file path.
|
|
2817
|
+
*
|
|
2818
|
+
* Объединяет два списка файлов Git, обеспечивая уникальность по пути файла.
|
|
2819
|
+
* @param listA - first list to merge / первый список для объединения
|
|
2820
|
+
* @param listB - lists to merge / списки для объединения
|
|
2821
|
+
* @returns merged unique list of git files / объединенный уникальный список файлов git
|
|
2822
|
+
*/
|
|
2823
|
+
static mergeUnique(listA: GitFileList, listB: GitFileList): GitFileList;
|
|
2824
|
+
/**
|
|
2825
|
+
* Splits a file path into its components.
|
|
2826
|
+
*
|
|
2827
|
+
* Разбивает путь файла на его компоненты.
|
|
2828
|
+
* @param path - file path / путь к файлу
|
|
2829
|
+
* @returns array of path components / массив компонентов пути
|
|
2830
|
+
*/
|
|
2831
|
+
static splitPath(path: string): string[];
|
|
2832
|
+
/**
|
|
2833
|
+
* Executes Git command and returns result.
|
|
2834
|
+
*
|
|
2835
|
+
* Выполняет Git команду и возвращает результат.
|
|
2836
|
+
* @param command - command to execute / команда для выполнения
|
|
2837
|
+
* @protected
|
|
2838
|
+
*/
|
|
2839
|
+
protected static exec(command: string): string;
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
/**
|
|
2843
|
+
* Git file status codes.
|
|
2844
|
+
*
|
|
2845
|
+
* Коды статусов файлов Git.
|
|
2846
|
+
*/
|
|
2847
|
+
export declare enum GitStatus {
|
|
2848
|
+
/** File has been modified / Файл был изменен */
|
|
2849
|
+
MODIFIED = "M",
|
|
2850
|
+
/** File has been added / Файл был добавлен */
|
|
2851
|
+
ADDED = "A",
|
|
2852
|
+
/** File has been deleted / Файл был удален */
|
|
2853
|
+
DELETED = "D",
|
|
2854
|
+
/** File has been renamed / Файл был переименован */
|
|
2855
|
+
RENAMED = "R",
|
|
2856
|
+
/** File has been copied / Файл был скопирован */
|
|
2857
|
+
COPIED = "C",
|
|
2858
|
+
/** File has been updated / Файл был обновлен */
|
|
2859
|
+
UPDATED = "U",
|
|
2860
|
+
/** File is untracked / Файл не отслеживается */
|
|
2861
|
+
UNTRACKED = "??",
|
|
2862
|
+
/** File is ignored / Файл игнорируется */
|
|
2863
|
+
IGNORED = "!!",
|
|
2864
|
+
/** File modified by both sides / Файл изменен с обеих сторон */
|
|
2865
|
+
BOTH_MODIFIED = "UU",
|
|
2866
|
+
/** File added by us / Файл добавлен нами */
|
|
2867
|
+
ADDED_BY_US = "AU",
|
|
2868
|
+
/** File deleted by us / Файл удален нами */
|
|
2869
|
+
DELETED_BY_US = "DU",
|
|
2870
|
+
/** File added by them / Файл добавлен ими */
|
|
2871
|
+
ADDED_BY_THEM = "UA",
|
|
2872
|
+
/** File deleted by them / Файл удален ими */
|
|
2873
|
+
DELETED_BY_THEM = "UD",
|
|
2874
|
+
/** File added by both sides / Файл добавлен с обеих сторон */
|
|
2875
|
+
BOTH_ADDED = "AA",
|
|
2876
|
+
/** File deleted by both sides / Файл удален с обеих сторон */
|
|
2877
|
+
BOTH_DELETED = "DD",
|
|
2878
|
+
/** File modified in index / Файл изменен в индексе */
|
|
2879
|
+
MODIFIED_IN_INDEX = "MM",
|
|
2880
|
+
/** File added in index / Файл добавлен в индексе */
|
|
2881
|
+
ADDED_IN_INDEX = "AM",
|
|
2882
|
+
/** File deleted in index / Файл удален в индексе */
|
|
2883
|
+
DELETED_IN_INDEX = "DM",
|
|
2884
|
+
/** File renamed in index / Файл переименован в индексе */
|
|
2885
|
+
RENAMED_IN_INDEX = "RM",
|
|
2886
|
+
/** File copied in index / Файл скопирован в индексе */
|
|
2887
|
+
COPIED_IN_INDEX = "CM"
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
|
+
/**
|
|
2891
|
+
* Class for generating a TypeScript file with structured and formatted MCP resources from `ai-mcp-all-resources.json`.
|
|
2892
|
+
* Formats resource lists by package with dynamic import handlers for direct consumption by `McpResource`.
|
|
2893
|
+
*
|
|
2894
|
+
* Класс для генерации TypeScript файла со структурированными и отформатированными ресурсами MCP из `ai-mcp-all-resources.json`.
|
|
2895
|
+
* Форматирует списки ресурсов по пакетам с обработчиками динамического импорта для прямого использования в `McpResource`.
|
|
2896
|
+
*/
|
|
2897
|
+
export declare class LibraryAiMcp {
|
|
2898
|
+
/** Source data array or path to JSON file. / Массив исходных данных или путь к JSON файлу. */
|
|
2899
|
+
protected readonly source: PropertiesFilePath | Record<string, unknown>[];
|
|
2900
|
+
/** Path to the target TypeScript file. / Путь к целевому TypeScript файлу. */
|
|
2901
|
+
protected readonly fileTs: PropertiesFilePath;
|
|
2902
|
+
/**
|
|
2903
|
+
* Constructor for LibraryAiMcp.
|
|
2904
|
+
*
|
|
2905
|
+
* Конструктор для LibraryAiMcp.
|
|
2906
|
+
* @param source Path to JSON resources file or resource records array / Путь к JSON файлу ресурсов или массив записей ресурсов
|
|
2907
|
+
* @param fileTs Path to output TypeScript file / Путь к выходному TypeScript файлу
|
|
2908
|
+
*/
|
|
2909
|
+
constructor(source?: PropertiesFilePath | Record<string, unknown>[], fileTs?: PropertiesFilePath);
|
|
2910
|
+
/**
|
|
2911
|
+
* Checks if the main AI prompt file exists.
|
|
2912
|
+
*
|
|
2913
|
+
* Проверяет, существует ли главный файл промпта ИИ.
|
|
2914
|
+
* @returns true if ai-prompt.md exists / true, если ai-prompt.md существует
|
|
2915
|
+
*/
|
|
2916
|
+
isPrompt(): boolean;
|
|
2917
|
+
/**
|
|
2918
|
+
* Reads and parses resources from the source JSON file or returns provided data array,
|
|
2919
|
+
* automatically including the root `ai-prompt.md` if it exists.
|
|
2920
|
+
*
|
|
2921
|
+
* Читает и парсит ресурсы из исходного JSON файла или возвращает переданный массив данных,
|
|
2922
|
+
* автоматически включая корневой `ai-prompt.md`, если он существует.
|
|
2923
|
+
* @returns list of raw resource records / список сырых записей ресурсов
|
|
2924
|
+
*/
|
|
2925
|
+
getResources(): Record<string, unknown>[];
|
|
2926
|
+
/**
|
|
2927
|
+
* Generates the TypeScript file with formatted MCP resources for McpResource.
|
|
2928
|
+
*
|
|
2929
|
+
* Генерирует TypeScript файл с отформатированными ресурсами MCP для McpResource.
|
|
2930
|
+
* @returns current instance / текущий экземпляр
|
|
2931
|
+
*/
|
|
2932
|
+
make(): this;
|
|
2933
|
+
/**
|
|
2934
|
+
* Generates the import path and query parameters for dynamic resource import.
|
|
2935
|
+
*
|
|
2936
|
+
* Генерирует путь импорта и параметры запроса для динамического импорта ресурса.
|
|
2937
|
+
* @param uri Resource URI / URI ресурса
|
|
2938
|
+
* @returns formatted import path with raw query when appropriate / отформатированный путь импорта с raw-запросом при необходимости
|
|
2939
|
+
* @protected
|
|
2940
|
+
*/
|
|
2941
|
+
protected getImportPath(uri: string): string;
|
|
2942
|
+
/**
|
|
2943
|
+
* Generates a unique camelCase constant name for a package.
|
|
2944
|
+
*
|
|
2945
|
+
* Генерирует уникальное имя константы в camelCase для пакета.
|
|
2946
|
+
* @param packageName Target package name / Целевое имя пакета
|
|
2947
|
+
* @param existingNames Set of already used constant names / Набор уже использованных имен констант
|
|
2948
|
+
* @returns constant name string / строка имени константы
|
|
2949
|
+
* @protected
|
|
2950
|
+
*/
|
|
2951
|
+
protected getPackageConstName(packageName: string, existingNames: Set<string>): string;
|
|
2952
|
+
/**
|
|
2953
|
+
* Groups raw resource items by package name.
|
|
2954
|
+
*
|
|
2955
|
+
* Группирует сырые элементы ресурсов по имени пакета.
|
|
2956
|
+
* @param resources List of raw resource records / Список сырых записей ресурсов
|
|
2957
|
+
* @returns map of package names to resource items / карта имен пакетов к элементам ресурсов
|
|
2958
|
+
* @protected
|
|
2959
|
+
*/
|
|
2960
|
+
protected getPackages(resources: Record<string, unknown>[]): Map<string, Record<string, unknown>[]>;
|
|
2961
|
+
/**
|
|
2962
|
+
* Returns the resource descriptor for the main AI prompt file.
|
|
2963
|
+
*
|
|
2964
|
+
* Возвращает дескриптор ресурса для главного файла промпта ИИ.
|
|
2965
|
+
* @returns resource item descriptor / дескриптор элемента ресурса
|
|
2966
|
+
* @protected
|
|
2967
|
+
*/
|
|
2968
|
+
protected getPromptResource(): Record<string, unknown>;
|
|
2969
|
+
/**
|
|
2970
|
+
* Escapes a string for safe inclusion in a single-quoted TypeScript literal.
|
|
2971
|
+
*
|
|
2972
|
+
* Экранирует строку для безопасного включения в одинарные кавычки литерала TypeScript.
|
|
2973
|
+
* @param value Raw string value / Сырое строковое значение
|
|
2974
|
+
* @returns escaped single-quoted string / экранированная строка в одинарных кавычках
|
|
2975
|
+
* @protected
|
|
2976
|
+
*/
|
|
2977
|
+
protected escapeString(value: string): string;
|
|
2978
|
+
/**
|
|
2979
|
+
* Extracts the package name from a resource URI.
|
|
2980
|
+
*
|
|
2981
|
+
* Извлекает имя пакета из URI ресурса.
|
|
2982
|
+
* @param uri Resource URI / URI ресурса
|
|
2983
|
+
* @returns extracted package name / извлеченное имя пакета
|
|
2984
|
+
* @protected
|
|
2985
|
+
*/
|
|
2986
|
+
protected extractPackageName(uri: string): string;
|
|
2987
|
+
/**
|
|
2988
|
+
* Formats a single resource item into a clean TypeScript object literal string with dynamic import handler.
|
|
2989
|
+
*
|
|
2990
|
+
* Форматирует один элемент ресурса в чистую строку литерала объекта TypeScript с обработчиком динамического импорта.
|
|
2991
|
+
* @param item Raw resource item / Сырой элемент ресурса
|
|
2992
|
+
* @returns formatted TS object string / отформатированная строка TS объекта
|
|
2993
|
+
* @protected
|
|
2994
|
+
*/
|
|
2995
|
+
protected formatItem(item: Record<string, unknown>): string;
|
|
2996
|
+
/**
|
|
2997
|
+
* Builds the entire TypeScript file code for MCP resources grouped by package.
|
|
2998
|
+
*
|
|
2999
|
+
* Создает полный код TypeScript файла для ресурсов MCP, сгруппированных по пакетам.
|
|
3000
|
+
* @param resources List of all raw resource items / Список всех сырых элементов ресурсов
|
|
3001
|
+
* @returns complete TypeScript code string / полная строка TypeScript кода
|
|
3002
|
+
* @protected
|
|
3003
|
+
*/
|
|
3004
|
+
protected initFile(resources: Record<string, unknown>[]): string;
|
|
3005
|
+
/**
|
|
3006
|
+
* Writes the generated content to the target file.
|
|
3007
|
+
*
|
|
3008
|
+
* Записывает сгенерированное содержимое в целевой файл.
|
|
3009
|
+
* @param content Generated TypeScript code / Сгенерированный TypeScript код
|
|
3010
|
+
* @returns current instance / текущий экземпляр
|
|
3011
|
+
* @protected
|
|
3012
|
+
*/
|
|
3013
|
+
protected write(content: string): this;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
/**
|
|
3017
|
+
* Class representing an MCP item in the AI prompt generation process.
|
|
3018
|
+
* Handles reading `ai-mcp-resources.json` configuration files for a package directory.
|
|
3019
|
+
*
|
|
3020
|
+
* Класс, представляющий элемент MCP в процессе создания промпта для ИИ.
|
|
3021
|
+
* Управляет чтением конфигурационных файлов `ai-mcp-resources.json` для директории пакета.
|
|
3022
|
+
*/
|
|
3023
|
+
export declare class LibraryAiMcpItem {
|
|
3024
|
+
protected readonly dir: string[];
|
|
3025
|
+
/**
|
|
3026
|
+
* Constructor for LibraryAiMcpItem.
|
|
3027
|
+
*
|
|
3028
|
+
* Конструктор для LibraryAiMcpItem.
|
|
3029
|
+
* @param dir Path segments to the directory / Сегменты пути к директории
|
|
3030
|
+
*/
|
|
3031
|
+
constructor(dir?: string[]);
|
|
3032
|
+
/**
|
|
3033
|
+
* Checks if the ai-mcp-resources.json file exists in the directory.
|
|
3034
|
+
*
|
|
3035
|
+
* Проверяет, существует ли файл ai-mcp-resources.json в директории.
|
|
3036
|
+
* @returns true if ai-mcp-resources.json file exists / true, если файл ai-mcp-resources.json существует
|
|
3037
|
+
*/
|
|
3038
|
+
isMcp(): boolean;
|
|
3039
|
+
/**
|
|
3040
|
+
* Reads and returns the list of MCP resource definitions from ai-mcp-resources.json.
|
|
3041
|
+
*
|
|
3042
|
+
* Читает и возвращает список определений ресурсов MCP из ai-mcp-resources.json.
|
|
3043
|
+
* @returns list of MCP resource items or undefined / список элементов ресурсов MCP или undefined
|
|
3044
|
+
*/
|
|
3045
|
+
make(): Record<string, any>[] | undefined;
|
|
3046
|
+
/**
|
|
3047
|
+
* Constructs a full path for a file within the item's directory.
|
|
3048
|
+
*
|
|
3049
|
+
* Создает полный путь к файлу внутри директории элемента.
|
|
3050
|
+
* @param dirFile File name / Имя файла
|
|
3051
|
+
* @returns path segments / сегменты пути
|
|
3052
|
+
* @protected
|
|
3053
|
+
*/
|
|
3054
|
+
protected getPath(dirFile: string): string[];
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* Class for generating a consolidated AI prompt for the library.
|
|
3059
|
+
* It scans directories for prompt items and instructions to create a final prompt file.
|
|
3060
|
+
*
|
|
3061
|
+
* Класс для генерации консолидированного промпта ИИ для библиотеки.
|
|
3062
|
+
* Сканирует директории на наличие элементов промпта и инструкций для создания итогового файла промпта.
|
|
3063
|
+
*/
|
|
3064
|
+
export declare class LibraryAiPrompt {
|
|
3065
|
+
protected readonly isMcp: boolean;
|
|
3066
|
+
/** List of directories to scan. / Список директорий для сканирования. */
|
|
3067
|
+
protected readonly dirs: string[];
|
|
3068
|
+
/** Regular expression to identify files in directories. / Регулярное выражение для идентификации файлов в директориях. */
|
|
3069
|
+
protected readonly exFileOnDirs: RegExp;
|
|
3070
|
+
/** Regular expression to exclude hidden files/directories. / Регулярное выражение для исключения скрытых файлов/директорий. */
|
|
3071
|
+
protected readonly exNotRead: RegExp;
|
|
3072
|
+
/**
|
|
3073
|
+
* Constructor for LibraryAiPrompt.
|
|
3074
|
+
*
|
|
3075
|
+
* Конструктор для LibraryAiPrompt.
|
|
3076
|
+
* @param dirs Additional directories to scan / Дополнительные директории для сканирования
|
|
3077
|
+
* @param isMcp Flag indicating whether to generate MCP configuration file / Флаг, указывающий, нужно ли генерировать конфигурационный файл MCP
|
|
3078
|
+
*/
|
|
3079
|
+
constructor(dirs?: string[], isMcp?: boolean);
|
|
3080
|
+
/**
|
|
3081
|
+
* Main method to generate the AI prompt file.
|
|
3082
|
+
*
|
|
3083
|
+
* Основной метод для генерации файла промпта ИИ.
|
|
3084
|
+
*/
|
|
3085
|
+
make(): void;
|
|
3086
|
+
/**
|
|
3087
|
+
* Checks if there are any files in the provided list.
|
|
3088
|
+
*
|
|
3089
|
+
* Проверяет, есть ли файлы в предоставленном списке.
|
|
3090
|
+
* @param dirs list of file/directory names / список имен файлов/директорий
|
|
3091
|
+
* @returns true if any file is found / true, если найден хотя бы один файл
|
|
3092
|
+
* @protected
|
|
3093
|
+
*/
|
|
3094
|
+
protected isFileOnDirs(dirs: string[]): boolean;
|
|
3095
|
+
/**
|
|
3096
|
+
* Retrieves the final self-audit prompt for AI code verification.
|
|
3097
|
+
*
|
|
3098
|
+
* Получает итоговый промпт самоаудита для проверки кода ИИ.
|
|
3099
|
+
* @returns formatted audit prompt / отформатированный промпт аудита
|
|
3100
|
+
* @protected
|
|
3101
|
+
*/
|
|
3102
|
+
protected getAuditPrompt(): string;
|
|
3103
|
+
/**
|
|
3104
|
+
* Retrieves high-priority instructions from a specific file.
|
|
3105
|
+
*
|
|
3106
|
+
* Получает высокоприоритетные инструкции из специального файла.
|
|
3107
|
+
* @returns formatted instructions or undefined / отформатированные инструкции или undefined
|
|
3108
|
+
* @protected
|
|
3109
|
+
*/
|
|
3110
|
+
protected getInstruction(): string | undefined;
|
|
3111
|
+
/**
|
|
3112
|
+
* Retrieves the Vue component implementation prompt.
|
|
3113
|
+
*
|
|
3114
|
+
* Получает промпт по реализации Vue-компонентов.
|
|
3115
|
+
* @returns formatted Vue prompt or undefined / отформатированный промпт Vue или undefined
|
|
3116
|
+
* @protected
|
|
3117
|
+
*/
|
|
3118
|
+
protected getVuePrompt(): string;
|
|
3119
|
+
/**
|
|
3120
|
+
* Retrieves the global code implementation prompt.
|
|
3121
|
+
*
|
|
3122
|
+
* Получает глобальный промпт по реализации кода.
|
|
3123
|
+
* @returns formatted global prompt or undefined / отформатированный глобальный промпт или undefined
|
|
3124
|
+
* @protected
|
|
3125
|
+
*/
|
|
3126
|
+
protected getGlobalPrompt(): string;
|
|
3127
|
+
/**
|
|
3128
|
+
* Recursively scans directories to collect LibraryAiPromptItem instances.
|
|
3129
|
+
*
|
|
3130
|
+
* Рекурсивно сканирует директории для сбора экземпляров LibraryAiPromptItem.
|
|
3131
|
+
* @param dirs directories to scan / директории для сканирования
|
|
3132
|
+
* @param path current path segments / текущие сегменты пути
|
|
3133
|
+
* @param limit recursion depth limit (defaults to promptScanDepth config) / лимит глубины рекурсии (по умолчанию из конфигурации promptScanDepth)
|
|
3134
|
+
* @returns list of prompt items / список элементов промпта
|
|
3135
|
+
* @protected
|
|
3136
|
+
*/
|
|
3137
|
+
protected getList(dirs?: string[], path?: string[], limit?: number): LibraryAiPromptItem[];
|
|
3138
|
+
/**
|
|
3139
|
+
* Retrieves the prompt item for the current repository root if it contains prompt data.
|
|
3140
|
+
*
|
|
3141
|
+
* Получает элемент промпта для корня текущего репозитория, если он содержит данные промпта.
|
|
3142
|
+
* @returns root prompt item or undefined / элемент промпта корня или undefined
|
|
3143
|
+
* @protected
|
|
3144
|
+
*/
|
|
3145
|
+
protected getRootItem(): LibraryAiPromptItem | undefined;
|
|
3146
|
+
/**
|
|
3147
|
+
* Writes the collected prompts to a file.
|
|
3148
|
+
*
|
|
3149
|
+
* Записывает собранные промпты в файл.
|
|
3150
|
+
* @param prompts list of prompt strings / список строк промптов
|
|
3151
|
+
* @returns this instance / этот экземпляр
|
|
3152
|
+
* @protected
|
|
3153
|
+
*/
|
|
3154
|
+
protected write(prompts: string[]): this;
|
|
3155
|
+
/**
|
|
3156
|
+
* Writes the collected MCP definitions to a file.
|
|
3157
|
+
*
|
|
3158
|
+
* Записывает собранные определения MCP в файл.
|
|
3159
|
+
* @param mcpData list of MCP resource definitions / список определений ресурсов MCP
|
|
3160
|
+
* @returns this instance / этот экземпляр
|
|
3161
|
+
* @protected
|
|
3162
|
+
*/
|
|
3163
|
+
protected writeMcp(mcpData: Record<string, any>[]): this;
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
/**
|
|
3167
|
+
* Class representing an item in the AI prompt generation process.
|
|
3168
|
+
* Handles reading and aggregating various project-related files (descriptions, info, types, screenshots)
|
|
3169
|
+
* to build a context-rich prompt for AI.
|
|
3170
|
+
*
|
|
3171
|
+
* Класс, представляющий элемент в процессе создания промпта для ИИ.
|
|
3172
|
+
* Управляет чтением и агрегацией различных файлов проекта (описания, информация, типы, скриншоты)
|
|
3173
|
+
* для создания насыщенного контекстом промпта для ИИ.
|
|
3174
|
+
*/
|
|
3175
|
+
export declare class LibraryAiPromptItem {
|
|
3176
|
+
protected readonly dir: string[];
|
|
3177
|
+
/** Item instance for working with MCP files. / Экземпляр элемента для работы с файлами MCP. */
|
|
3178
|
+
protected readonly itemMcp: LibraryAiMcpItem;
|
|
3179
|
+
/**
|
|
3180
|
+
* Constructor for LibraryAiPromptItem.
|
|
3181
|
+
*
|
|
3182
|
+
* Конструктор для LibraryAiPromptItem.
|
|
3183
|
+
* @param dir Path segments to the directory / Сегменты пути к директории
|
|
3184
|
+
*/
|
|
3185
|
+
constructor(dir?: string[]);
|
|
3186
|
+
/**
|
|
3187
|
+
* Returns directory path segments.
|
|
3188
|
+
*
|
|
3189
|
+
* Возвращает сегменты пути к директории.
|
|
3190
|
+
* @returns path segments / сегменты пути
|
|
3191
|
+
*/
|
|
3192
|
+
getDir(): string[];
|
|
3193
|
+
/**
|
|
3194
|
+
* Reads and returns the list of MCP resource definitions from ai-mcp-resources.json.
|
|
3195
|
+
*
|
|
3196
|
+
* Читает и возвращает список определений ресурсов MCP из ai-mcp-resources.json.
|
|
3197
|
+
* @returns list of MCP resource items or undefined / список элементов ресурсов MCP или undefined
|
|
3198
|
+
*/
|
|
3199
|
+
getMcp(): Record<string, any>[] | undefined;
|
|
3200
|
+
/**
|
|
3201
|
+
* Returns the project name from package.json.
|
|
3202
|
+
*
|
|
3203
|
+
* Возвращает название проекта из package.json.
|
|
3204
|
+
* @returns project name or 'none' / название проекта или 'none'
|
|
3205
|
+
*/
|
|
3206
|
+
getProjectName(): string;
|
|
3207
|
+
/**
|
|
3208
|
+
* Checks if any prompt-related files or directories exist.
|
|
3209
|
+
*
|
|
3210
|
+
* Проверяет, существуют ли какие-либо файлы или директории, связанные с промптами.
|
|
3211
|
+
* @returns true if any prompt content is found / true, если найден какой-либо контент для промпта
|
|
3212
|
+
*/
|
|
3213
|
+
isPrompt(): boolean;
|
|
3214
|
+
/**
|
|
3215
|
+
* Checks if the description file exists.
|
|
3216
|
+
*
|
|
3217
|
+
* Проверяет, существует ли файл описания.
|
|
3218
|
+
* @returns true if description file exists / true, если файл описания существует
|
|
3219
|
+
*/
|
|
3220
|
+
isDescription(): boolean;
|
|
3221
|
+
/**
|
|
3222
|
+
* Checks if the developer prompt file exists.
|
|
3223
|
+
*
|
|
3224
|
+
* Проверяет, существует ли файл промпта разработчика.
|
|
3225
|
+
* @returns true if developer prompt file exists / true, если файл промпта разработчика существует
|
|
3226
|
+
*/
|
|
3227
|
+
isDeveloper(): boolean;
|
|
3228
|
+
/**
|
|
3229
|
+
* Checks if the information file exists.
|
|
3230
|
+
*
|
|
3231
|
+
* Проверяет, существует ли файл с информацией.
|
|
3232
|
+
* @returns true if info file exists / true, если файл информации существует
|
|
3233
|
+
*/
|
|
3234
|
+
isInfo(): boolean;
|
|
3235
|
+
/**
|
|
3236
|
+
* Checks if the ai-mcp-resources.json file exists.
|
|
3237
|
+
*
|
|
3238
|
+
* Проверяет, существует ли файл ai-mcp-resources.json.
|
|
3239
|
+
* @returns true if ai-mcp-resources.json file exists / true, если файл ai-mcp-resources.json существует
|
|
3240
|
+
*/
|
|
3241
|
+
isMcp(): boolean;
|
|
3242
|
+
/**
|
|
3243
|
+
* Checks if the screenshot directory exists.
|
|
3244
|
+
*
|
|
3245
|
+
* Проверяет, существует ли директория со скриншотами.
|
|
3246
|
+
* @returns true if screenshot directory exists / true, если директория скриншотов существует
|
|
3247
|
+
*/
|
|
3248
|
+
isScreenshot(): boolean;
|
|
3249
|
+
/**
|
|
3250
|
+
* Checks if the types file exists.
|
|
3251
|
+
*
|
|
3252
|
+
* Проверяет, существует ли файл с типами.
|
|
3253
|
+
* @returns true if types file exists / true, если файл типов существует
|
|
3254
|
+
*/
|
|
3255
|
+
isTypes(): boolean;
|
|
3256
|
+
/**
|
|
3257
|
+
* Gathers all available prompt content and formats it as a single string.
|
|
3258
|
+
*
|
|
3259
|
+
* Собирает весь доступный контент промпта и форматирует его в виде одной строки.
|
|
3260
|
+
* @returns formatted prompt content or undefined / отформатированный контент промпта или undefined
|
|
3261
|
+
*/
|
|
3262
|
+
make(): string | undefined;
|
|
3263
|
+
/**
|
|
3264
|
+
* Formats and returns the description section for the prompt.
|
|
3265
|
+
*
|
|
3266
|
+
* Форматирует и возвращает секцию описания для промпта.
|
|
3267
|
+
* @returns formatted description or undefined / отформатированное описание или undefined
|
|
3268
|
+
* @protected
|
|
3269
|
+
*/
|
|
3270
|
+
protected getDescription(): string | undefined;
|
|
3271
|
+
/**
|
|
3272
|
+
* Formats and returns the developer prompt section.
|
|
3273
|
+
*
|
|
3274
|
+
* Форматирует и возвращает секцию промпта для разработчика.
|
|
3275
|
+
* @returns formatted developer prompt or undefined / отформатированный промпт разработчика или undefined
|
|
3276
|
+
* @protected
|
|
3277
|
+
*/
|
|
3278
|
+
protected getDeveloper(): string | undefined;
|
|
3279
|
+
/**
|
|
3280
|
+
* Formats and returns the info section for the prompt.
|
|
3281
|
+
*
|
|
3282
|
+
* Форматирует и возвращает секцию информации для промпта.
|
|
3283
|
+
* @returns formatted info or undefined / отформатированная информация или undefined
|
|
3284
|
+
* @protected
|
|
3285
|
+
*/
|
|
3286
|
+
protected getInfo(): string | undefined;
|
|
3287
|
+
/**
|
|
3288
|
+
* Constructs a full path for a file within the item's directory.
|
|
3289
|
+
*
|
|
3290
|
+
* Создает полный путь к файлу внутри директории элемента.
|
|
3291
|
+
* @param dirFile File name / Имя файла
|
|
3292
|
+
* @returns path segments / сегменты пути
|
|
3293
|
+
* @protected
|
|
3294
|
+
*/
|
|
3295
|
+
protected getPath(dirFile: string): string[];
|
|
3296
|
+
/**
|
|
3297
|
+
* Returns the directory path or file path within the directory as a string.
|
|
3298
|
+
*
|
|
3299
|
+
* Возвращает путь к директории или путь к файлу внутри директории в виде строки.
|
|
3300
|
+
* @param dirFile optional file name or subpath / опциональное имя файла или подпуть
|
|
3301
|
+
* @returns formatted path string / отформатированная строка пути
|
|
3302
|
+
* @protected
|
|
3303
|
+
*/
|
|
3304
|
+
protected getPathString(dirFile?: string): string;
|
|
3305
|
+
/**
|
|
3306
|
+
* Formats and returns the screenshot section for the prompt.
|
|
3307
|
+
*
|
|
3308
|
+
* Форматирует и возвращает секцию скриншотов для промпта.
|
|
3309
|
+
* @returns formatted screenshot list or undefined / отформатированный список скриншотов или undefined
|
|
3310
|
+
* @protected
|
|
3311
|
+
*/
|
|
3312
|
+
protected getScreenshot(): string | undefined;
|
|
3313
|
+
/**
|
|
3314
|
+
* Retrieves the list of files in the screenshot directory.
|
|
3315
|
+
*
|
|
3316
|
+
* Получает список файлов в директории скриншотов.
|
|
3317
|
+
* @returns list of screenshot file names or undefined / список имен файлов скриншотов или undefined
|
|
3318
|
+
* @protected
|
|
3319
|
+
*/
|
|
3320
|
+
protected getScreenshotList(): string[] | undefined;
|
|
3321
|
+
/**
|
|
3322
|
+
* Formats and returns the types section for the prompt.
|
|
3323
|
+
*
|
|
3324
|
+
* Форматирует и возвращает секцию типов для промпта.
|
|
3325
|
+
* @returns formatted types reference or undefined / отформатированная ссылка на типы или undefined
|
|
3326
|
+
* @protected
|
|
3327
|
+
*/
|
|
3328
|
+
protected getTypes(): string | undefined;
|
|
3329
|
+
/**
|
|
3330
|
+
* Reads content of a file by its name relative to the item's directory.
|
|
3331
|
+
*
|
|
3332
|
+
* Читает содержимое файла по его имени относительно директории элемента.
|
|
3333
|
+
* @param dirFile File name / Имя файла
|
|
3334
|
+
* @returns file content / содержимое файла
|
|
3335
|
+
* @protected
|
|
3336
|
+
*/
|
|
3337
|
+
protected readFile(dirFile: string): string;
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
/**
|
|
3341
|
+
* List of all library items across the design system.
|
|
3342
|
+
*
|
|
3343
|
+
* Список всех элементов библиотек дизайн-системы.
|
|
3344
|
+
*/
|
|
3345
|
+
export declare type LibraryAll = LibraryItem[];
|
|
3346
|
+
|
|
3347
|
+
/**
|
|
3348
|
+
* Library component data with design and path information.
|
|
3349
|
+
*
|
|
3350
|
+
* Данные компонента библиотеки с информацией о дизайне и путях.
|
|
3351
|
+
*/
|
|
3352
|
+
export declare type LibraryData = {
|
|
3353
|
+
/** Design system name / Название дизайн-системы */
|
|
3354
|
+
design: string;
|
|
3355
|
+
/** Component name / Название компонента */
|
|
3356
|
+
name: string;
|
|
3357
|
+
/** Component alias / Псевдоним компонента */
|
|
3358
|
+
alias: string;
|
|
3359
|
+
/** Full component code or identifier / Полный код или идентификатор компонента */
|
|
3360
|
+
codeFull: string;
|
|
3361
|
+
/** Component directory / Директория компонента */
|
|
3362
|
+
dir: string;
|
|
3363
|
+
};
|
|
3364
|
+
|
|
3365
|
+
/**
|
|
3366
|
+
* Class for generating exportable data and aggregate module entries.
|
|
3367
|
+
*
|
|
3368
|
+
* Класс для генерации экспортируемых данных и агрегации точек входа модулей.
|
|
3369
|
+
*/
|
|
3370
|
+
export declare class LibraryExport {
|
|
3371
|
+
/**
|
|
3372
|
+
* Start of data generation.
|
|
3373
|
+
*
|
|
3374
|
+
* Начало генерации данных.
|
|
3375
|
+
*/
|
|
3376
|
+
make(): void;
|
|
3377
|
+
/**
|
|
3378
|
+
* Returns the path to the directory.
|
|
3379
|
+
*
|
|
3380
|
+
* Возвращает путь к директории.
|
|
3381
|
+
* @param directory selected directory / выбранная директория
|
|
3382
|
+
* @returns path segments array / массив сегментов пути
|
|
3383
|
+
*/
|
|
3384
|
+
protected getPath(directory: string): string[];
|
|
3385
|
+
/**
|
|
3386
|
+
* Checks whether this file needs to be exported.
|
|
3387
|
+
*
|
|
3388
|
+
* Проверяет, нужно ли экспортировать этот файл.
|
|
3389
|
+
* @param path filename or path segments / имя файла или сегменты пути
|
|
3390
|
+
* @returns true if file is eligible for export / true, если файл подлежит экспорту
|
|
3391
|
+
*/
|
|
3392
|
+
protected isExport(path: string | string[]): boolean;
|
|
3393
|
+
/**
|
|
3394
|
+
* Returns a list of all files for export.
|
|
3395
|
+
*
|
|
3396
|
+
* Возвращает список всех файлов для экспорта.
|
|
3397
|
+
* @returns list of export file groups / список групп файлов для экспорта
|
|
3398
|
+
*/
|
|
3399
|
+
protected getDirectory(): LibraryFiles;
|
|
3400
|
+
/**
|
|
3401
|
+
* Returns the folder name with capitalized first letter.
|
|
3402
|
+
*
|
|
3403
|
+
* Возвращает название папки с заглавной буквы.
|
|
3404
|
+
* @param name folder name / название папки
|
|
3405
|
+
* @returns capitalized folder name / название папки с заглавной буквы
|
|
3406
|
+
*/
|
|
3407
|
+
protected getName(name: string): string;
|
|
3408
|
+
/**
|
|
3409
|
+
* Returns the content of the file.
|
|
3410
|
+
*
|
|
3411
|
+
* Возвращает содержимое файла.
|
|
3412
|
+
* @param path filename or path segments / имя файла или сегменты пути
|
|
3413
|
+
* @returns file content string / строка содержимого файла
|
|
3414
|
+
*/
|
|
3415
|
+
protected getFile(path: string | string[]): string;
|
|
3416
|
+
/**
|
|
3417
|
+
* File generation for saving.
|
|
3418
|
+
*
|
|
3419
|
+
* Генерация файла для сохранения.
|
|
3420
|
+
* @returns generated export code / сгенерированный код экспорта
|
|
3421
|
+
*/
|
|
3422
|
+
protected initFile(): string;
|
|
3423
|
+
/**
|
|
3424
|
+
* Generates imports for global styles.
|
|
3425
|
+
*
|
|
3426
|
+
* Генерация импортов для глобальных стилей.
|
|
3427
|
+
* @returns generated style import statements / сгенерированные инструкции импорта стилей
|
|
3428
|
+
*/
|
|
3429
|
+
protected initStyles(): string;
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
/**
|
|
3433
|
+
* Collection of library file groups.
|
|
3434
|
+
*
|
|
3435
|
+
* Коллекция групп файлов библиотеки.
|
|
3436
|
+
*/
|
|
3437
|
+
export declare type LibraryFiles = LibraryFilesItem[];
|
|
3438
|
+
|
|
3439
|
+
/**
|
|
3440
|
+
* Library files group containing name, directory path, and list of files.
|
|
3441
|
+
*
|
|
3442
|
+
* Группа файлов библиотеки, содержащая имя, путь к директории и список файлов.
|
|
3443
|
+
*/
|
|
3444
|
+
export declare type LibraryFilesItem = {
|
|
3445
|
+
/** File group name / Название группы файлов */
|
|
3446
|
+
name: string;
|
|
3447
|
+
/** File directory path / Путь к директории файлов */
|
|
3448
|
+
path: PropertiesFilePath;
|
|
3449
|
+
/** Array of file names / Массив имён файлов */
|
|
3450
|
+
files: string[];
|
|
3451
|
+
};
|
|
3452
|
+
|
|
3453
|
+
/**
|
|
3454
|
+
* Library icon item containing name, filesystem path, and SVG value/content.
|
|
3455
|
+
*
|
|
3456
|
+
* Элемент иконки библиотеки, содержащий имя, путь к файлу и SVG-содержимое/значение.
|
|
3457
|
+
*/
|
|
3458
|
+
export declare type LibraryIconItem = {
|
|
3459
|
+
/** Icon name / Название иконки */
|
|
3460
|
+
name: string;
|
|
3461
|
+
/** Icon file path / Путь к файлу иконки */
|
|
3462
|
+
path: string;
|
|
3463
|
+
/** Icon value or SVG content / Значение или SVG-содержимое иконки */
|
|
3464
|
+
value: string;
|
|
3465
|
+
};
|
|
3466
|
+
|
|
3467
|
+
/**
|
|
3468
|
+
* Library item containing library name and its associated component collection.
|
|
3469
|
+
*
|
|
3470
|
+
* Элемент библиотеки, содержащий имя библиотеки и связанную коллекцию компонентов.
|
|
3471
|
+
*/
|
|
3472
|
+
export declare type LibraryItem = {
|
|
3473
|
+
/** Library name / Название библиотеки */
|
|
3474
|
+
name: string;
|
|
3475
|
+
/** Array of components / Массив компонентов */
|
|
3476
|
+
components: LibraryData[];
|
|
3477
|
+
};
|
|
3478
|
+
|
|
3479
|
+
/**
|
|
3480
|
+
* Class for working with the package.json file.
|
|
3481
|
+
*
|
|
3482
|
+
* Класс для работы с файлом package.json.
|
|
3483
|
+
*/
|
|
3484
|
+
export declare class PackageFile {
|
|
3485
|
+
protected readonly path: string | string[];
|
|
3486
|
+
/** Parsed package.json data cache / Кэш распарсенных данных package.json */
|
|
3487
|
+
protected readonly data: PackageJsonData;
|
|
3488
|
+
/**
|
|
3489
|
+
* Constructor for PackageFile.
|
|
3490
|
+
*
|
|
3491
|
+
* Конструктор для PackageFile.
|
|
3492
|
+
* @param path path to the directory containing package.json / путь к директории, содержащей package.json
|
|
3493
|
+
*/
|
|
3494
|
+
constructor(path: string | string[]);
|
|
3495
|
+
/**
|
|
3496
|
+
* Checks if the directory is a package (contains package.json).
|
|
3497
|
+
*
|
|
3498
|
+
* Проверяет, является ли директория пакетом (содержит package.json).
|
|
3499
|
+
* @returns true if package.json exists in directory / true, если package.json существует в директории
|
|
3500
|
+
*/
|
|
3501
|
+
is(): boolean;
|
|
3502
|
+
/**
|
|
3503
|
+
* Checks if the package version matches the specified version.
|
|
3504
|
+
*
|
|
3505
|
+
* Проверяет, соответствует ли версия пакета указанной версии.
|
|
3506
|
+
* @param version version to compare with / версия для сравнения
|
|
3507
|
+
* @returns true if versions match / true, если версии совпадают
|
|
3508
|
+
*/
|
|
3509
|
+
isVersionConsistency(version?: string): boolean;
|
|
3510
|
+
/**
|
|
3511
|
+
* Checks if the package is a test package.
|
|
3512
|
+
*
|
|
3513
|
+
* Проверяет, является ли пакет тестовым.
|
|
3514
|
+
* @returns true if package has ui-test flag / true, если пакет имеет флаг ui-test
|
|
3515
|
+
*/
|
|
3516
|
+
isTest(): boolean;
|
|
3517
|
+
/**
|
|
3518
|
+
* Checks if the package should not be published.
|
|
3519
|
+
*
|
|
3520
|
+
* Проверяет, не должен ли пакет публиковаться.
|
|
3521
|
+
* @returns true if package is marked as private or ui-no-publish / true, если пакет приватный или не подлежит публикации
|
|
3522
|
+
*/
|
|
3523
|
+
isNoPublish(): boolean;
|
|
3524
|
+
/**
|
|
3525
|
+
* Returns the package data.
|
|
3526
|
+
*
|
|
3527
|
+
* Возвращает данные пакета.
|
|
3528
|
+
* @returns raw package.json object / сырой объект данных package.json
|
|
3529
|
+
*/
|
|
3530
|
+
get(): PackageJsonData;
|
|
3531
|
+
/**
|
|
3532
|
+
* Returns the package name.
|
|
3533
|
+
*
|
|
3534
|
+
* Возвращает имя пакета.
|
|
3535
|
+
* @returns package name from package.json or directory path / имя пакета из package.json или путь директории
|
|
3536
|
+
*/
|
|
3537
|
+
getName(): string;
|
|
3538
|
+
/**
|
|
3539
|
+
* Returns the package version.
|
|
3540
|
+
*
|
|
3541
|
+
* Возвращает версию пакета.
|
|
3542
|
+
* @returns package version string (default '0.0.0') / строка версии пакета (по умолчанию '0.0.0')
|
|
3543
|
+
*/
|
|
3544
|
+
getVersion(): string;
|
|
3545
|
+
/**
|
|
3546
|
+
* Returns the package scripts.
|
|
3547
|
+
*
|
|
3548
|
+
* Возвращает скрипты пакета.
|
|
3549
|
+
* @returns record of package scripts / объект скриптов пакета
|
|
3550
|
+
*/
|
|
3551
|
+
getScripts(): Record<string, string>;
|
|
3552
|
+
/**
|
|
3553
|
+
* Returns the package directory path segments.
|
|
3554
|
+
*
|
|
3555
|
+
* Возвращает сегменты пути к директории пакета.
|
|
3556
|
+
* @returns array of directory path segments / массив сегментов пути к директории
|
|
3557
|
+
*/
|
|
3558
|
+
getDir(): string[];
|
|
3559
|
+
/**
|
|
3560
|
+
* Returns the full path segments to package.json.
|
|
3561
|
+
*
|
|
3562
|
+
* Возвращает полные сегменты пути к файлу package.json.
|
|
3563
|
+
* @returns path segments to package.json / сегменты пути к package.json
|
|
3564
|
+
*/
|
|
3565
|
+
getPath(): string[];
|
|
3566
|
+
/**
|
|
3567
|
+
* Returns the command name for build or build-recovery.
|
|
3568
|
+
*
|
|
3569
|
+
* Возвращает название команды для build или build-recovery.
|
|
3570
|
+
* @returns script name or undefined if none found / имя скрипта или undefined, если не найден
|
|
3571
|
+
*/
|
|
3572
|
+
getCodeBuildOrRecovery(): string | undefined;
|
|
3573
|
+
/**
|
|
3574
|
+
* Returns the command name for publish or publish-to-npm.
|
|
3575
|
+
*
|
|
3576
|
+
* Возвращает название команды для publish или publish-to-npm.
|
|
3577
|
+
* @returns command string to publish package / строка команды для публикации пакета
|
|
3578
|
+
*/
|
|
3579
|
+
getCodePublish(): string;
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
/**
|
|
3583
|
+
* Class for initializing the package structure and development environment based on templates.
|
|
3584
|
+
*
|
|
3585
|
+
* Класс для инициализации структуры пакета и среды разработки на основе шаблонов.
|
|
3586
|
+
*/
|
|
3587
|
+
export declare class PackageInit {
|
|
3588
|
+
protected readonly type: string;
|
|
3589
|
+
protected readonly templates?: string | undefined;
|
|
3590
|
+
protected readonly dir: string;
|
|
3591
|
+
/**
|
|
3592
|
+
* Constructor for PackageInit.
|
|
3593
|
+
*
|
|
3594
|
+
* Конструктор для PackageInit.
|
|
3595
|
+
* @param type package type identifier / идентификатор типа пакета
|
|
3596
|
+
* @param templates optional list of templates to apply / необязательный список шаблонов для применения
|
|
3597
|
+
* @param dir base directory for packages / базовая директория для пакетов
|
|
3598
|
+
*/
|
|
3599
|
+
constructor(type: string, templates?: string | undefined, dir?: string);
|
|
3600
|
+
/**
|
|
3601
|
+
* Triggers the package creation process and initializes required files.
|
|
3602
|
+
*
|
|
3603
|
+
* Запускает процесс создания пакета и инициализирует необходимые файлы.
|
|
3604
|
+
*/
|
|
3605
|
+
make(): void;
|
|
3606
|
+
/**
|
|
3607
|
+
* Returns an array of directory names for package initialization.
|
|
3608
|
+
*
|
|
3609
|
+
* Возвращает массив имен директорий для инициализации пакета.
|
|
3610
|
+
* @returns array of empty package directory names / массив имен пустых директорий пакетов
|
|
3611
|
+
*/
|
|
3612
|
+
protected getDirs(): string[];
|
|
3613
|
+
}
|
|
3614
|
+
|
|
3615
|
+
/** Parsed package.json data / Данные package.json */
|
|
3616
|
+
declare interface PackageJsonData {
|
|
3617
|
+
'name'?: string;
|
|
3618
|
+
'version'?: string;
|
|
3619
|
+
'private'?: boolean;
|
|
3620
|
+
'scripts'?: Record<string, string>;
|
|
3621
|
+
'ui-priority'?: number;
|
|
3622
|
+
'ui-test'?: boolean;
|
|
3623
|
+
'ui-no-publish'?: boolean;
|
|
3624
|
+
[key: string]: unknown;
|
|
3625
|
+
}
|
|
3626
|
+
|
|
3627
|
+
/**
|
|
3628
|
+
* Universal static utility for filesystem orchestration.
|
|
3629
|
+
* This class provides a standardized interface for all IO operations within the design system, including path normalization, recursive directory traversal, synchronized file reading/writing, and metadata retrieval. It abstracts platform-specific path differences and ensures consistent data handling across the toolchain.
|
|
3630
|
+
*
|
|
3631
|
+
* Универсальная статическая утилита для оркестрации файловой системы.
|
|
3632
|
+
* Этот класс предоставляет стандартизированный интерфейс для всех операций ввода-вывода в рамках дизайн-системы, включая нормализацию путей, рекурсивный обход директорий, синхронное чтение/запись файлов и получение метаданных. Он абстрагирует различия путей в разных ОС и обеспечивает согласованную обработку данных во всей цепочке инструментов.
|
|
3633
|
+
*/
|
|
3634
|
+
export declare class PropertiesFile {
|
|
3635
|
+
protected static root: string;
|
|
3636
|
+
protected static module: boolean;
|
|
3637
|
+
/**
|
|
3638
|
+
* Synchronously checks for the existence of a file or directory at the specified path.
|
|
3639
|
+
*
|
|
3640
|
+
* Синхронно проверяет существование файла или директории по указанному пути.
|
|
3641
|
+
* @param path target filesystem path to verify / целевой путь в файловой системе для проверки
|
|
3642
|
+
*/
|
|
3643
|
+
static is(path: PropertiesFilePath): boolean;
|
|
3644
|
+
/**
|
|
3645
|
+
* Determines if the specified path points to a directory.
|
|
3646
|
+
*
|
|
3647
|
+
* Определяет, указывает ли указанный путь на директорию.
|
|
3648
|
+
* @param path path to the filesystem element / путь к элементу файловой системы
|
|
3649
|
+
*/
|
|
3650
|
+
static isDir(path: PropertiesFilePath): boolean;
|
|
3651
|
+
/**
|
|
3652
|
+
* Determines whether the package is connected as a module.
|
|
3653
|
+
*
|
|
3654
|
+
* Определяет, является ли пакет подключенным как модуль.
|
|
3655
|
+
*/
|
|
3656
|
+
static isModule(): boolean;
|
|
3657
|
+
/**
|
|
3658
|
+
* Joins multiple path segments into a single normalized path string using the OS separator.
|
|
3659
|
+
*
|
|
3660
|
+
* Объединяет несколько сегментов пути в одну нормализованную строку пути, используя разделитель ОС.
|
|
3661
|
+
* @param path array or string of path segments / массив или строка сегментов пути
|
|
3662
|
+
*/
|
|
3663
|
+
static joinPath(path: PropertiesFilePath): string;
|
|
3664
|
+
/**
|
|
3665
|
+
* Getting the path to the file by its name and the path to the directory.
|
|
3666
|
+
*
|
|
3667
|
+
* Получение пути к файлу по его названию и пути к директории.
|
|
3668
|
+
* @param path path to the file/ путь к файлу
|
|
3669
|
+
* @param name file name/ название файла
|
|
3670
|
+
* @param extension file extension by default is json/ расширение файла по умолчанию - json
|
|
3671
|
+
*/
|
|
3672
|
+
static joinPathByName(path: PropertiesFilePath, name: string, extension?: string): string;
|
|
3673
|
+
/**
|
|
3674
|
+
* Returns the root path.
|
|
3675
|
+
*
|
|
3676
|
+
* Возвращает корневой путь.
|
|
3677
|
+
*/
|
|
3678
|
+
static getRoot(): string;
|
|
3679
|
+
/**
|
|
3680
|
+
* Returns the root project path
|
|
3681
|
+
*
|
|
3682
|
+
* Возвращает корневой путь проекта
|
|
3683
|
+
* @param rootProject root project path/ путь к корневому проекту
|
|
3684
|
+
* @param maxDepth maximum depth of search for the root project/ максимальная глубина поиска корневого проекта
|
|
3685
|
+
*/
|
|
3686
|
+
static getRootProject(rootProject?: string, maxDepth?: number): string | undefined;
|
|
3687
|
+
/**
|
|
3688
|
+
* Returns the file name.
|
|
3689
|
+
*
|
|
3690
|
+
* Возвращает имя файла.
|
|
3691
|
+
* @param name element name/ название элемента
|
|
3692
|
+
* @param extension file extension by default is json/ расширение файла по умолчанию - json
|
|
3693
|
+
*/
|
|
3694
|
+
static getFileName(name: string, extension?: string): string;
|
|
3695
|
+
/**
|
|
3696
|
+
* Returns the path to the directory, removing the file name from the path.
|
|
3697
|
+
*
|
|
3698
|
+
* Возвращает путь к директории, убрав название файла из пути.
|
|
3699
|
+
* @param path path to the file/ путь к файлу
|
|
3700
|
+
*/
|
|
3701
|
+
static getPathDir(path: PropertiesFilePath): string;
|
|
3702
|
+
/**
|
|
3703
|
+
* Returns the path to the file.
|
|
3704
|
+
*
|
|
3705
|
+
* Возвращает путь к файлу.
|
|
3706
|
+
* @param path path to the file/ путь к файлу
|
|
3707
|
+
* @param name element name/ название элемента
|
|
3708
|
+
* @param extension file extension by default is json/ расширение файла по умолчанию - json
|
|
3709
|
+
*/
|
|
3710
|
+
static getPathFile(path: PropertiesFilePath, name: string, extension?: string): string[];
|
|
3711
|
+
/**
|
|
3712
|
+
* The method splits the path into an array of components.
|
|
3713
|
+
*
|
|
3714
|
+
* Метод разбивает путь на массив компонентов.
|
|
3715
|
+
* @param path path to the directory/ путь к директории
|
|
3716
|
+
*/
|
|
3717
|
+
static splitForDir(path: PropertiesFilePath): string[];
|
|
3718
|
+
/**
|
|
3719
|
+
* Method returns an object whose properties represent significant elements of the path.
|
|
3720
|
+
*
|
|
3721
|
+
* Метод возвращает объект, свойства которого представляют существенные элементы пути.
|
|
3722
|
+
* @param path filename/ имя файла
|
|
3723
|
+
*/
|
|
3724
|
+
static parse(path: PropertiesFilePath): default_3.ParsedPath;
|
|
3725
|
+
/**
|
|
3726
|
+
* Returns the directory separator symbol.
|
|
3727
|
+
*
|
|
3728
|
+
* Возвращает символ разделителя директории.
|
|
3729
|
+
*/
|
|
3730
|
+
static sep(): string;
|
|
3731
|
+
/**
|
|
3732
|
+
* Getting information about the file.
|
|
3733
|
+
*
|
|
3734
|
+
* Получение информации о файле.
|
|
3735
|
+
* @param path path to the file/ путь к файлу
|
|
3736
|
+
*/
|
|
3737
|
+
static stat(path: PropertiesFilePath): default_4.Stats | undefined;
|
|
3738
|
+
/**
|
|
3739
|
+
* Returns the time the file was last modified.
|
|
3740
|
+
*
|
|
3741
|
+
* Возвращает время последнего изменения файла.
|
|
3742
|
+
* @param path path to the file/ путь к файлу
|
|
3743
|
+
*/
|
|
3744
|
+
static getTime(path: PropertiesFilePath): string | undefined;
|
|
3745
|
+
/**
|
|
3746
|
+
* Converts the path to use the current OS separator.
|
|
3747
|
+
*
|
|
3748
|
+
* Преобразует путь для использования текущего разделителя ОС.
|
|
3749
|
+
* @param path path to the directory/ путь к директории
|
|
3750
|
+
*/
|
|
3751
|
+
static toSep(path: string): PropertiesFilePath;
|
|
3752
|
+
/**
|
|
3753
|
+
* Reads the contents of the directory.
|
|
3754
|
+
*
|
|
3755
|
+
* Читает содержимое директории.
|
|
3756
|
+
* @param path path to the directory/ путь к директории
|
|
3757
|
+
*/
|
|
3758
|
+
static readDir(path: PropertiesFilePath): string[];
|
|
3759
|
+
/**
|
|
3760
|
+
* Reads the contents of the directory recursively.
|
|
3761
|
+
*
|
|
3762
|
+
* Читает содержимое директории рекурсивно.
|
|
3763
|
+
* @param path path to the directory/ путь к директории
|
|
3764
|
+
*/
|
|
3765
|
+
static readDirRecursive(path: PropertiesFilePath): string[];
|
|
3766
|
+
/**
|
|
3767
|
+
* Reads the contents of the directory recursively.
|
|
3768
|
+
*
|
|
3769
|
+
* Читает содержимое директории рекурсивно.
|
|
3770
|
+
* @param path path to the directory/ путь к директории
|
|
3771
|
+
*/
|
|
3772
|
+
static readDirRecursiveWithIndex(path: PropertiesFilePath): string[];
|
|
3773
|
+
/**
|
|
3774
|
+
* Reads only directories recursively.
|
|
3775
|
+
*
|
|
3776
|
+
* Читает только директории рекурсивно.
|
|
3777
|
+
* @param path path to the directory/ путь к директории
|
|
3778
|
+
*/
|
|
3779
|
+
static readDirOnlyRecursive(path: PropertiesFilePath): string[];
|
|
3780
|
+
/**
|
|
3781
|
+
* Reads the contents of the directory and files recursively.
|
|
3782
|
+
*
|
|
3783
|
+
* Читает содержимое директории и файлы рекурсивно.
|
|
3784
|
+
* @param path path to the directory/ путь к директории
|
|
3785
|
+
* @param fullPath full path for recursion/ полный путь для рекурсии
|
|
3786
|
+
* @param isIndex whether to include the root directory in the list/ включать ли корневую директорию в список
|
|
3787
|
+
*/
|
|
3788
|
+
static readDirAndFileRecursive(path: PropertiesFilePath, fullPath?: PropertiesFilePath, isIndex?: boolean): string[];
|
|
3789
|
+
/**
|
|
3790
|
+
* Synchronously reads and parses the contents of a file (JSON or raw text).
|
|
3791
|
+
*
|
|
3792
|
+
* Синхронно читает и парсит содержимое файла (JSON или обычный текст).
|
|
3793
|
+
* @param path path to the target file / путь к целевому файлу
|
|
3794
|
+
*/
|
|
3795
|
+
static readFile<R>(path: PropertiesFilePath): R | undefined;
|
|
3796
|
+
/**
|
|
3797
|
+
* Returns the content of the file, without converting the value.
|
|
3798
|
+
*
|
|
3799
|
+
* Возвращает содержимое файла, без преобразования значения.
|
|
3800
|
+
* @param path filename/ имя файла
|
|
3801
|
+
*/
|
|
3802
|
+
static readFileOnly(path: PropertiesFilePath): string | undefined;
|
|
3803
|
+
/**
|
|
3804
|
+
* Synchronously creates a directory.
|
|
3805
|
+
*
|
|
3806
|
+
* Синхронно создает директорию.
|
|
3807
|
+
* @param path path to the directory/ путь к директории
|
|
3808
|
+
*/
|
|
3809
|
+
static createDir(path: PropertiesFilePath): void;
|
|
3810
|
+
/**
|
|
3811
|
+
* Writes data to a file at the specified location, automatically creating directories and formatting objects as JSON by default.
|
|
3812
|
+
*
|
|
3813
|
+
* Записывает данные в файл по указанному адресу, автоматически создавая директории и форматируя объекты в JSON по умолчанию.
|
|
3814
|
+
* @param path base directory path / путь к базовой директории
|
|
3815
|
+
* @param name target filename (without extension if extension provided) / имя целевого файла
|
|
3816
|
+
* @param value data to be stored / данные для хранения
|
|
3817
|
+
* @param extension file extension (defaults to 'json') / расширение файла (по умолчанию 'json')
|
|
3818
|
+
*/
|
|
3819
|
+
static write<T extends PropertiesFileValue>(path: PropertiesFilePath, name: string, value: T, extension?: string): void;
|
|
3820
|
+
/**
|
|
3821
|
+
* Writes to the selected path.
|
|
3822
|
+
*
|
|
3823
|
+
* Записывает по выбранному пути.
|
|
3824
|
+
* @param path path to the file/ путь к файлу
|
|
3825
|
+
* @param value values for storage/ значения для хранения
|
|
3826
|
+
* @param transform whether to transform the value/ преобразовывать ли значение
|
|
3827
|
+
*/
|
|
3828
|
+
static writeByPath<T extends PropertiesFileValue>(path: PropertiesFilePath, value: T, transform?: boolean): void;
|
|
3829
|
+
/**
|
|
3830
|
+
* Copy a file from the source path to the destination path.
|
|
3831
|
+
*
|
|
3832
|
+
* Копирования файла из исходного пути в целевой путь.
|
|
3833
|
+
* @param path path to the file/ путь к файлу
|
|
3834
|
+
* @param pathsSrc source filename to copy/ исходное имя файла для копирования
|
|
3835
|
+
*/
|
|
3836
|
+
static copy(path: PropertiesFilePath, pathsSrc: PropertiesFilePath): void;
|
|
3837
|
+
/**
|
|
3838
|
+
* Directory deletion.
|
|
3839
|
+
*
|
|
3840
|
+
* Удаление директории.
|
|
3841
|
+
* @param path path to the directory/ путь к директории
|
|
3842
|
+
*/
|
|
3843
|
+
static removeDir(path: PropertiesFilePath): void;
|
|
3844
|
+
/**
|
|
3845
|
+
* File deletion.
|
|
3846
|
+
*
|
|
3847
|
+
* Удаление файла.
|
|
3848
|
+
* @param path path to the file/ путь к файлу
|
|
3849
|
+
*/
|
|
3850
|
+
static removeFile(path: PropertiesFilePath): void;
|
|
3851
|
+
static rename(path: PropertiesFilePath, newPath: PropertiesFilePath): void;
|
|
3852
|
+
/**
|
|
3853
|
+
* Changing file permissions.
|
|
3854
|
+
*
|
|
3855
|
+
* Изменение прав доступа к файлу.
|
|
3856
|
+
* @param path path to the file/ путь к файлу
|
|
3857
|
+
* @param mode file permissions/ права доступа к файлу
|
|
3858
|
+
*/
|
|
3859
|
+
static chmod(path: PropertiesFilePath, mode?: string | number): void;
|
|
3860
|
+
/**
|
|
3861
|
+
* Removing root from the path.
|
|
3862
|
+
*
|
|
3863
|
+
* Удаление root из пути.
|
|
3864
|
+
* @param path path to the directory/ путь к директории
|
|
3865
|
+
*/
|
|
3866
|
+
private static removeRootInPath;
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
export declare type PropertiesFilePath = string | string[];
|
|
3870
|
+
|
|
3871
|
+
export declare type PropertiesFileValue<T = any> = string | Record<string, T> | Buffer;
|
|
3872
|
+
|
|
3873
|
+
/**
|
|
3874
|
+
* Property category enum for explicit grouping and routing during token processing.
|
|
3875
|
+
*
|
|
3876
|
+
* Перечисление категорий свойств для явной группировки и маршрутизации при обработке токенов.
|
|
3877
|
+
*/
|
|
3878
|
+
export declare enum PropertyCategory {
|
|
3879
|
+
/**
|
|
3880
|
+
* Indicates that for this branch, paths need to be regenerated /
|
|
3881
|
+
* Указывает, что для этой ветви нужно заново формировать пути
|
|
3882
|
+
*/
|
|
3883
|
+
root = "root",
|
|
3884
|
+
/**
|
|
3885
|
+
* Indicates that this is a class. It will generate a new class /
|
|
3886
|
+
* Указывает, что это класс. Будет генерировать новый класс
|
|
3887
|
+
*/
|
|
3888
|
+
class = "class",
|
|
3889
|
+
/**
|
|
3890
|
+
* Indicates that this is a media type for generating adapted properties /
|
|
3891
|
+
* Указывает, что это тип медиа для формирования адаптированных свойств
|
|
3892
|
+
*/
|
|
3893
|
+
media = "media",
|
|
3894
|
+
/**
|
|
3895
|
+
* Indicates that this is the starting point for generating a class based on the theme /
|
|
3896
|
+
* Указывает, что это начальная точка для формирования класса под тему
|
|
3897
|
+
*/
|
|
3898
|
+
theme = "theme",
|
|
3899
|
+
/**
|
|
3900
|
+
* Indicates that the current property is a palette for generating custom colors /
|
|
3901
|
+
* Указывает, что текущее свойство — это палитра для формирования пользовательских цветов
|
|
3902
|
+
*/
|
|
3903
|
+
shade = "shade",
|
|
3904
|
+
/**
|
|
3905
|
+
* Indicates that this is the starting point for generating classes for the palette /
|
|
3906
|
+
* Указывает, что это начальная точка для формирования классов для палитры
|
|
3907
|
+
*/
|
|
3908
|
+
palette = "palette",
|
|
3909
|
+
/**
|
|
3910
|
+
* Indicates that this branch is not intended for generating the palette /
|
|
3911
|
+
* Указывает, что эта ветка не предназначена для формирования палитры
|
|
3912
|
+
*/
|
|
3913
|
+
paletteNone = "palette-none",
|
|
3914
|
+
/** Indicates that this property is a color / Указывает, что это свойство является цветом */
|
|
3915
|
+
color = "color",
|
|
3916
|
+
/**
|
|
3917
|
+
* Indicates that this branch is an enumeration of colors /
|
|
3918
|
+
* Указывает, что эта ветка представляет собой перечисление цветов
|
|
3919
|
+
*/
|
|
3920
|
+
colors = "colors",
|
|
3921
|
+
/**
|
|
3922
|
+
* Indicates that this branch represents styles for element variations /
|
|
3923
|
+
* Указывает, что эта ветка представляет собой стили для вариаций элемента
|
|
3924
|
+
*/
|
|
3925
|
+
style = "style"
|
|
3926
|
+
}
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* Main property item structure representing a design token with its configuration, modifiers, and child values.
|
|
3930
|
+
*
|
|
3931
|
+
* Основная структура элемента свойства, представляющая токен дизайна с конфигурацией, модификаторами и дочерними значениями.
|
|
3932
|
+
*/
|
|
3933
|
+
export declare type PropertyItem = {
|
|
3934
|
+
/**
|
|
3935
|
+
* Property value, can be string, number, array or object /
|
|
3936
|
+
* Значение свойства, может быть строкой, числом, массивом или объектом
|
|
3937
|
+
*/
|
|
3938
|
+
value: PropertyValue<PropertyItem>;
|
|
3939
|
+
/** Optional type description / Опциональное описание типа */
|
|
3940
|
+
type?: string;
|
|
3941
|
+
/** Optional property description / Опциональное описание свойства */
|
|
3942
|
+
description?: string;
|
|
3943
|
+
/** Property type, values are taken from `PropertyType` / Тип свойства, значения берутся из `PropertyType` */
|
|
3944
|
+
_type?: PropertyType | null;
|
|
3945
|
+
/**
|
|
3946
|
+
* Category is a property used for explicit grouping of /
|
|
3947
|
+
* the property type for selecting the processing mechanism /
|
|
3948
|
+
* Категория — это свойство, используемое для явной группировки
|
|
3949
|
+
* принадлежности типа свойства для выбора механизма обработки
|
|
3950
|
+
*/
|
|
3951
|
+
_category?: PropertyCategory | string;
|
|
3952
|
+
/**
|
|
3953
|
+
* Indicates that this is an element variation, and a class for /
|
|
3954
|
+
* the variation needs to be generated. It is used as an additional /
|
|
3955
|
+
* property to ensure the script generates the variation class along with the subclass /
|
|
3956
|
+
* Указывает, что это вариация элемента, и необходимо
|
|
3957
|
+
* формировать класс для этой вариации. Используется как дополнительное
|
|
3958
|
+
* свойство, чтобы скрипт формировал класс вариации вместе с подклассом
|
|
3959
|
+
*/
|
|
3960
|
+
_state?: boolean;
|
|
3961
|
+
/**
|
|
3962
|
+
* Indicates that this is a subclass of the element. It is used as an additional /
|
|
3963
|
+
* property to ensure the script generates the element's subclass /
|
|
3964
|
+
* Указывает, что это подкласс элемента. Используется как дополнительное свойство,
|
|
3965
|
+
* чтобы скрипт формировал подкласс элемента
|
|
3966
|
+
*/
|
|
3967
|
+
_subclass?: boolean;
|
|
3968
|
+
/**
|
|
3969
|
+
* Indicates that this is a custom property. /
|
|
3970
|
+
* It is used as an additional property so that the script additionally /
|
|
3971
|
+
* generates a custom property /
|
|
3972
|
+
* Указывает, что это пользовательское свойство.
|
|
3973
|
+
* Используется как дополнительное свойство, чтобы скрипт дополнительно
|
|
3974
|
+
* формировал и пользовательское свойство
|
|
3975
|
+
*/
|
|
3976
|
+
_var?: boolean;
|
|
3977
|
+
/**
|
|
3978
|
+
* Indicates that this property is a component property with the specified name /
|
|
3979
|
+
* Указывает, что это свойство является свойством компонента с указанным названием
|
|
3980
|
+
*/
|
|
3981
|
+
_prop?: string | boolean;
|
|
3982
|
+
/** Theme property name / Название свойства темы */
|
|
3983
|
+
_theme?: string;
|
|
3984
|
+
/**
|
|
3985
|
+
* Indicates that the property should be renamed to the specified one /
|
|
3986
|
+
* Указывает, что необходимо переименовать свойство на указанное
|
|
3987
|
+
*/
|
|
3988
|
+
_rename?: string;
|
|
3989
|
+
/**
|
|
3990
|
+
* Sets a regular expression for transforming the property's value /
|
|
3991
|
+
* Задает регулярное выражение для преобразования значения свойства
|
|
3992
|
+
*/
|
|
3993
|
+
_replace?: string | PropertyReplace;
|
|
3994
|
+
/**
|
|
3995
|
+
* Default values, if no value is specified in the property /
|
|
3996
|
+
* Значения по умолчанию, если в свойстве не указано значение
|
|
3997
|
+
*/
|
|
3998
|
+
_default?: string | number | boolean;
|
|
3999
|
+
/** Indicates that the property is a priority / Указывает, что свойство в приоритете */
|
|
4000
|
+
_important?: boolean;
|
|
4001
|
+
/**
|
|
4002
|
+
* Indicates whether to use the standard modification for the property (default: true) /
|
|
4003
|
+
* Указывает, нужно ли использовать стандартную модификацию для свойства (по умолчанию: true)
|
|
4004
|
+
*/
|
|
4005
|
+
_modification?: boolean;
|
|
4006
|
+
/**
|
|
4007
|
+
* Indicates that the branch should be moved to another branch of the tree /
|
|
4008
|
+
* Указывает, что необходимо перевести ветку на другую ветку дерева
|
|
4009
|
+
*/
|
|
4010
|
+
_drag?: string;
|
|
4011
|
+
/**
|
|
4012
|
+
* Additional data for modifying the branch after relocation /
|
|
4013
|
+
* Дополнительные данные для модификации ветки после перемещения
|
|
4014
|
+
*/
|
|
4015
|
+
_dragSetting?: string;
|
|
4016
|
+
/**
|
|
4017
|
+
* Indicates that the element should be cloned along with its additional properties /
|
|
4018
|
+
* Указывает, что элемент нужно клонировать вместе с его дополнительными свойствами
|
|
4019
|
+
*/
|
|
4020
|
+
_settingClone?: boolean;
|
|
4021
|
+
/**
|
|
4022
|
+
* Indicates whether the property name is complete and does not require modification /
|
|
4023
|
+
* Указывает, является ли название свойства полным и не требует модификации
|
|
4024
|
+
*/
|
|
4025
|
+
_fullName?: boolean;
|
|
4026
|
+
/**
|
|
4027
|
+
* Indicates whether the property value is complete and does not require modification /
|
|
4028
|
+
* Указывает, является ли значение свойства полным и не требует модификации
|
|
4029
|
+
*/
|
|
4030
|
+
_fullValue?: boolean;
|
|
4031
|
+
/**
|
|
4032
|
+
* Indicates whether the property value is for styling (default: true) /
|
|
4033
|
+
* Указывает, является ли значение свойства стилевым (по умолчанию: true)
|
|
4034
|
+
*/
|
|
4035
|
+
_style?: boolean;
|
|
4036
|
+
/**
|
|
4037
|
+
* Indicates that the branch is deprecated and needs to be removed /
|
|
4038
|
+
* Указывает, что ветка устарела и ее необходимо удалить
|
|
4039
|
+
*/
|
|
4040
|
+
_remove?: boolean;
|
|
4041
|
+
/** Internal index identifier / Внутренний идентификатор индекса */
|
|
4042
|
+
__i?: string;
|
|
4043
|
+
/** Internal name identifier / Внутренний идентификатор имени */
|
|
4044
|
+
__n?: string;
|
|
4045
|
+
/** Internal name index identifier / Внутренний идентификатор индекса имени */
|
|
4046
|
+
__ni?: string;
|
|
4047
|
+
/** Internal variable type / Внутренний тип переменной */
|
|
4048
|
+
__v?: PropertyType;
|
|
4049
|
+
/** Internal CSS identifier / Внутренний идентификатор CSS */
|
|
4050
|
+
__c?: string;
|
|
4051
|
+
/** Internal CSS color opacity / Внутренняя непрозрачность цвета CSS */
|
|
4052
|
+
__cco?: boolean | string;
|
|
4053
|
+
/** Internal code or function identifier / Внутренний идентификатор кода или функции */
|
|
4054
|
+
__f?: string | string[];
|
|
4055
|
+
/** Internal sort identifier / Внутренний идентификатор сортировки */
|
|
4056
|
+
__s?: string;
|
|
4057
|
+
/** Internal order number / Внутренний номер порядка */
|
|
4058
|
+
__o?: number;
|
|
4059
|
+
/** Internal main state flag / Внутренний флаг основного состояния */
|
|
4060
|
+
__m?: boolean;
|
|
4061
|
+
/** Internal duplicate identifier / Внутренний идентификатор дубликата */
|
|
4062
|
+
__d?: string;
|
|
4063
|
+
/** Internal file path / Внутренний путь к файлу */
|
|
4064
|
+
__file?: string;
|
|
4065
|
+
/** Internal wrap flag / Внутренний флаг обертки */
|
|
4066
|
+
__wrap?: boolean;
|
|
4067
|
+
};
|
|
4068
|
+
|
|
4069
|
+
/** Input type for property data with flexible structure / Входной тип для данных свойств с гибкой структурой */
|
|
4070
|
+
export declare type PropertyItemInput = Record<string, any> & (PropertyItemPartial | {
|
|
4071
|
+
[K in string]: PropertyItemInput;
|
|
4072
|
+
});
|
|
4073
|
+
|
|
4074
|
+
/** Partial version of PropertyItem with optional value / Частичная версия PropertyItem с опциональным значением */
|
|
4075
|
+
export declare type PropertyItemPartial = Partial<Omit<PropertyItem, 'value'>> & {
|
|
4076
|
+
value?: PropertyValue<PropertyItemPartial>;
|
|
4077
|
+
};
|
|
4078
|
+
|
|
4079
|
+
/** Callback function for processing property items / Функция обратного вызова для обработки элементов свойств */
|
|
4080
|
+
export declare type PropertyItemsCallback<T> = (item: PropertyItemsItem) => T;
|
|
4081
|
+
|
|
4082
|
+
/** Complete property item with context and hierarchy / Полный элемент свойства с контекстом и иерархией */
|
|
4083
|
+
export declare type PropertyItemsItem = {
|
|
4084
|
+
/** Design name / Название дизайна */
|
|
4085
|
+
design: string;
|
|
4086
|
+
/** Component name / Название компонента */
|
|
4087
|
+
component?: string;
|
|
4088
|
+
/** Property name / Название свойства */
|
|
4089
|
+
name: string;
|
|
4090
|
+
/** Property index / Индекс свойства */
|
|
4091
|
+
index: string;
|
|
4092
|
+
/** Property value / Значение свойства */
|
|
4093
|
+
value: PropertyItem['value'];
|
|
4094
|
+
/** Property item data / Данные элемента свойства */
|
|
4095
|
+
item: PropertyItem;
|
|
4096
|
+
/** Previous property item / Предыдущий элемент свойства */
|
|
4097
|
+
previous?: PropertyItem;
|
|
4098
|
+
/** Parent property item / Родительский элемент свойства */
|
|
4099
|
+
parent?: PropertyItem;
|
|
4100
|
+
/** Array of parent items / Массив родительских элементов */
|
|
4101
|
+
parents: PropertyItemsParent[];
|
|
4102
|
+
};
|
|
4103
|
+
|
|
4104
|
+
/** Media queries organized property lists / Организованные по медиа-запросам списки свойств */
|
|
4105
|
+
export declare type PropertyItemsMedia = Record<string, PropertyList>;
|
|
4106
|
+
|
|
4107
|
+
/** Parent property item information / Информация о родительском элементе свойства */
|
|
4108
|
+
export declare type PropertyItemsParent = {
|
|
4109
|
+
/** Property name / Название свойства */
|
|
4110
|
+
name: string;
|
|
4111
|
+
/** Property item data / Данные элемента свойства */
|
|
4112
|
+
item: PropertyItem;
|
|
4113
|
+
};
|
|
4114
|
+
|
|
4115
|
+
/**
|
|
4116
|
+
* Property meta key enum defining special configuration and internal processing flags.
|
|
4117
|
+
*
|
|
4118
|
+
* Перечисление специальных мета-ключей свойств для конфигурации и внутренних служебных флагов.
|
|
4119
|
+
*/
|
|
4120
|
+
declare enum PropertyKey_2 {
|
|
4121
|
+
/** Main property value / Основное значение свойства */
|
|
4122
|
+
value = "value",
|
|
4123
|
+
/** Property type identifier / Идентификатор типа свойства */
|
|
4124
|
+
type = "_type",
|
|
4125
|
+
/** Property category identifier / Идентификатор категории свойства */
|
|
4126
|
+
category = "_category",
|
|
4127
|
+
/** State property identifier / Идентификатор свойства состояния */
|
|
4128
|
+
state = "_state",
|
|
4129
|
+
/** Subclass property identifier / Идентификатор свойства подкласса */
|
|
4130
|
+
subclass = "_subclass",
|
|
4131
|
+
/** Variable property key / Ключ свойства переменной */
|
|
4132
|
+
varKey = "_var",
|
|
4133
|
+
/** Component property identifier / Идентификатор свойства компонента */
|
|
4134
|
+
prop = "_prop",
|
|
4135
|
+
/** Theme property identifier / Идентификатор свойства темы */
|
|
4136
|
+
theme = "_theme",
|
|
4137
|
+
/** Rename property key / Ключ свойства переименования */
|
|
4138
|
+
rename = "_rename",
|
|
4139
|
+
/** Replace property key / Ключ свойства замены */
|
|
4140
|
+
replace = "_replace",
|
|
4141
|
+
/** Default value property key / Ключ свойства значения по умолчанию */
|
|
4142
|
+
default = "_default",
|
|
4143
|
+
/** Important property key / Ключ свойства важности */
|
|
4144
|
+
important = "_important",
|
|
4145
|
+
/** Modification property key / Ключ свойства модификации */
|
|
4146
|
+
modification = "_modification",
|
|
4147
|
+
/** Drag property key / Ключ свойства перетаскивания */
|
|
4148
|
+
drag = "_drag",
|
|
4149
|
+
/** Drag setting property key / Ключ свойства настройки перетаскивания */
|
|
4150
|
+
dragSetting = "_dragSetting",
|
|
4151
|
+
/** Setting clone property key / Ключ свойства клонирования настроек */
|
|
4152
|
+
settingClone = "_settingClone",
|
|
4153
|
+
/** Full name property key / Ключ свойства полного имени */
|
|
4154
|
+
fullName = "_fullName",
|
|
4155
|
+
/** Full value property key / Ключ свойства полного значения */
|
|
4156
|
+
fullValue = "_fullValue",
|
|
4157
|
+
/** Style property key / Ключ свойства стиля */
|
|
4158
|
+
style = "_style",
|
|
4159
|
+
/** Remove property key / Ключ свойства удаления */
|
|
4160
|
+
remove = "_remove",
|
|
4161
|
+
/** Internal name key / Внутренний ключ имени */
|
|
4162
|
+
name = "__n",
|
|
4163
|
+
/** Internal name index key / Внутренний ключ индекса имени */
|
|
4164
|
+
nameIndex = "__ni",
|
|
4165
|
+
/** Internal variable key / Внутренний ключ переменной */
|
|
4166
|
+
variable = "__v",
|
|
4167
|
+
/** Internal CSS key / Внутренний ключ CSS */
|
|
4168
|
+
css = "__c",
|
|
4169
|
+
/** Internal CSS color opacity key / Внутренний ключ непрозрачности цвета CSS */
|
|
4170
|
+
cssColorOpacity = "__cco",
|
|
4171
|
+
/** Internal code key / Внутренний ключ кода */
|
|
4172
|
+
code = "__f",
|
|
4173
|
+
/** Internal sort key / Внутренний ключ сортировки */
|
|
4174
|
+
sort = "__s",
|
|
4175
|
+
/** Internal order key / Внутренний ключ порядка */
|
|
4176
|
+
order = "__o",
|
|
4177
|
+
/** Internal index key / Внутренний ключ индекса */
|
|
4178
|
+
index = "__i",
|
|
4179
|
+
/** Internal main state key / Внутренний ключ основного состояния */
|
|
4180
|
+
stateMain = "__m",
|
|
4181
|
+
/** Internal duplicate key / Внутренний ключ дубликата */
|
|
4182
|
+
duplicate = "__d",
|
|
4183
|
+
/** Internal file key / Внутренний ключ файла */
|
|
4184
|
+
file = "__file",
|
|
4185
|
+
/** Internal wrap key / Внутренний ключ обертки */
|
|
4186
|
+
wrap = "__wrap"
|
|
4187
|
+
}
|
|
4188
|
+
export { PropertyKey_2 as PropertyKey }
|
|
4189
|
+
|
|
4190
|
+
/** Linked property item with data and properties / Связанный элемент свойства с данными и свойствами */
|
|
4191
|
+
export declare type PropertyLinkItem = {
|
|
4192
|
+
/** Link name / Название ссылки */
|
|
4193
|
+
name: string;
|
|
4194
|
+
/** Link data / Данные ссылки */
|
|
4195
|
+
data: PropertyList;
|
|
4196
|
+
/** Link properties / Свойства ссылки */
|
|
4197
|
+
properties: PropertyList;
|
|
4198
|
+
};
|
|
4199
|
+
|
|
4200
|
+
/** Record of property items by name / Запись элементов свойств по имени */
|
|
4201
|
+
export declare type PropertyList = Record<string, PropertyItem>;
|
|
4202
|
+
|
|
4203
|
+
/** Property list or flexible input data / Список свойств или гибкие входные данные */
|
|
4204
|
+
export declare type PropertyListOrData = Record<string, PropertyItemInput>;
|
|
4205
|
+
|
|
4206
|
+
/** Palette item with design and values / Элемент палитры с дизайном и значениями */
|
|
4207
|
+
export declare type PropertyPaletteItem = {
|
|
4208
|
+
/** Design name / Название дизайна */
|
|
4209
|
+
design: string;
|
|
4210
|
+
/** Array of property values / Массив значений свойств */
|
|
4211
|
+
value: PropertyItem['value'][];
|
|
4212
|
+
};
|
|
4213
|
+
|
|
4214
|
+
/** List of palette items / Список элементов палитры */
|
|
4215
|
+
export declare type PropertyPaletteList = PropertyPaletteItem[];
|
|
4216
|
+
|
|
4217
|
+
/** Used palette information with name and values / Информация об используемой палитре с именем и значениями */
|
|
4218
|
+
export declare type PropertyPaletteUsed = {
|
|
4219
|
+
/** Palette name / Название палитры */
|
|
4220
|
+
name: string;
|
|
4221
|
+
/** Array of values / Массив значений */
|
|
4222
|
+
value: string[];
|
|
4223
|
+
};
|
|
4224
|
+
|
|
4225
|
+
/** Regular expression replacement configuration / Конфигурация замены регулярным выражением */
|
|
4226
|
+
export declare type PropertyReplace = {
|
|
4227
|
+
/** Regular expression pattern / Шаблон регулярного выражения */
|
|
4228
|
+
pattern?: string;
|
|
4229
|
+
/** Regular expression flags / Флаги регулярного выражения */
|
|
4230
|
+
flags: string;
|
|
4231
|
+
/** Replacement string / Строка замены */
|
|
4232
|
+
replace: string;
|
|
4233
|
+
};
|
|
4234
|
+
|
|
4235
|
+
/**
|
|
4236
|
+
* Property types enum defining token behavior, scope, and target generation pipeline.
|
|
4237
|
+
*
|
|
4238
|
+
* Перечисление типов свойств, определяющее поведение токена, область видимости и целевой конвейер генерации.
|
|
4239
|
+
*/
|
|
4240
|
+
export declare enum PropertyType {
|
|
4241
|
+
/**
|
|
4242
|
+
* Design name, it forms the first group of names /
|
|
4243
|
+
* Название дизайна, по нему формируется первая группа названий
|
|
4244
|
+
*/
|
|
4245
|
+
design = "design",
|
|
4246
|
+
/**
|
|
4247
|
+
* Component name, it forms the second group of names /
|
|
4248
|
+
* Название компонента, по нему формируется вторая группа названий
|
|
4249
|
+
*/
|
|
4250
|
+
component = "component",
|
|
4251
|
+
/**
|
|
4252
|
+
* Class name, it forms the second group of names /
|
|
4253
|
+
* Название класса, по нему формируется вторая группа названий
|
|
4254
|
+
*/
|
|
4255
|
+
classType = "class",
|
|
4256
|
+
/**
|
|
4257
|
+
* Defines a property as a theme for generating classes for the selected theme /
|
|
4258
|
+
* Определяет свойство как тему для формирования классов под выбранную тему
|
|
4259
|
+
*/
|
|
4260
|
+
theme = "theme",
|
|
4261
|
+
/** Defines a custom property for CSS / Определяет пользовательское свойство для CSS */
|
|
4262
|
+
var = "var",
|
|
4263
|
+
/** Defines the component's style / Определяет стиль компонента */
|
|
4264
|
+
property = "property",
|
|
4265
|
+
/**
|
|
4266
|
+
* Defines the sub-properties of an element, such as `hover`, `focus`, etc. /
|
|
4267
|
+
* Определяет под-свойства элемента, такие как `hover`, `focus` и т. д.
|
|
4268
|
+
*/
|
|
4269
|
+
selector = "selector",
|
|
4270
|
+
/**
|
|
4271
|
+
* Defines a pseudo-element of an element, such as `::after`, for example /
|
|
4272
|
+
* Определяет виртуальный элемент элемента, такие как `::after` например
|
|
4273
|
+
*/
|
|
4274
|
+
virtual = "virtual",
|
|
4275
|
+
/**
|
|
4276
|
+
* Defines variations of an element, additional states of the element /
|
|
4277
|
+
* Определяет вариации элемента, дополнительные состояния элемента
|
|
4278
|
+
*/
|
|
4279
|
+
state = "state",
|
|
4280
|
+
/**
|
|
4281
|
+
* Defines the subclass name for elements that are inside the main element /
|
|
4282
|
+
* Определяет название подкласса у элементов для тех элементов,
|
|
4283
|
+
* которые находятся внутри основного элемента
|
|
4284
|
+
*/
|
|
4285
|
+
subclass = "subclass",
|
|
4286
|
+
/** Defines media data for adaptation / Определяет медиа-данные для адаптации */
|
|
4287
|
+
media = "media",
|
|
4288
|
+
/**
|
|
4289
|
+
* Defines media data for adapting the maximum width /
|
|
4290
|
+
* Определяет медиа-данные для адаптации максимальной ширины
|
|
4291
|
+
*/
|
|
4292
|
+
mediaMax = "media-max",
|
|
4293
|
+
/** Defines properties for a media group / Определяет свойства для группы медиа */
|
|
4294
|
+
mediaGroup = "media-group",
|
|
4295
|
+
/**
|
|
4296
|
+
* Defines properties for a media group with a maximum width /
|
|
4297
|
+
* Определяет свойства для группы медиа с максимальной шириной
|
|
4298
|
+
*/
|
|
4299
|
+
mediaMaxGroup = "media-max-group",
|
|
4300
|
+
/**
|
|
4301
|
+
* Defines container properties for responsive layout /
|
|
4302
|
+
* Определяет свойства контейнера для адаптивной верстки
|
|
4303
|
+
*/
|
|
4304
|
+
container = "container",
|
|
4305
|
+
/**
|
|
4306
|
+
* Defines container properties with maximum width constraints /
|
|
4307
|
+
* Определяет свойства контейнера с ограничениями максимальной ширины
|
|
4308
|
+
*/
|
|
4309
|
+
containerMax = "container-max",
|
|
4310
|
+
/** Defines properties for a container group / Определяет свойства для группы контейнеров */
|
|
4311
|
+
containerGroup = "container-group",
|
|
4312
|
+
/**
|
|
4313
|
+
* Defines properties for a container group with maximum width constraints /
|
|
4314
|
+
* Определяет свойства для группы контейнеров с ограничениями максимальной ширины
|
|
4315
|
+
*/
|
|
4316
|
+
containerMaxGroup = "container-max-group",
|
|
4317
|
+
/** Defines properties for animation / Определяет свойства для анимации */
|
|
4318
|
+
animate = "animate",
|
|
4319
|
+
/**
|
|
4320
|
+
* Defines properties for a specific frame of the animation /
|
|
4321
|
+
* Определяет свойства для определённого кадра анимации
|
|
4322
|
+
*/
|
|
4323
|
+
animateFrame = "animate-frame",
|
|
4324
|
+
/**
|
|
4325
|
+
* Defines a link to another tree element for merging properties /
|
|
4326
|
+
* Определяет ссылку на другой элемент дерева для слияния свойств
|
|
4327
|
+
*/
|
|
4328
|
+
link = "link",
|
|
4329
|
+
/**
|
|
4330
|
+
* Defines a link to another tree element for forming a class /
|
|
4331
|
+
* Определяет ссылку на другой элемент дерева для формирования класса
|
|
4332
|
+
*/
|
|
4333
|
+
linkClass = "link-class",
|
|
4334
|
+
/**
|
|
4335
|
+
* Defines a property as a variable for generating styles for SCSS /
|
|
4336
|
+
* Определяет свойство как переменную для формирования стилей для SCSS
|
|
4337
|
+
*/
|
|
4338
|
+
scss = "scss",
|
|
4339
|
+
/**
|
|
4340
|
+
* The property is global, all types are re-generated relative to the current property /
|
|
4341
|
+
* Свойство является глобальным, все типы формируются заново относительно текущего свойства
|
|
4342
|
+
*/
|
|
4343
|
+
root = "root",
|
|
4344
|
+
/**
|
|
4345
|
+
* The property is only a mixin. Such properties are not included in styles or anything else /
|
|
4346
|
+
* Свойство является лишь миксовым. Такие свойства не включаются в стили или что-то ещё
|
|
4347
|
+
*/
|
|
4348
|
+
mixin = "mixin",
|
|
4349
|
+
/**
|
|
4350
|
+
* The property is excluded from the generation of any data. /
|
|
4351
|
+
* Such properties are ignored and not added to the list /
|
|
4352
|
+
* Свойство исключено из формирования каких-либо данных.
|
|
4353
|
+
* Такие свойства игнорируются и не добавляются в список
|
|
4354
|
+
*/
|
|
4355
|
+
none = "none",
|
|
4356
|
+
/**
|
|
4357
|
+
* The property is a link to an external file for merging /
|
|
4358
|
+
* Свойство является ссылкой на внешний файл для слияния
|
|
4359
|
+
*/
|
|
4360
|
+
file = "file",
|
|
4361
|
+
/**
|
|
4362
|
+
* A system property for generating undefined properties. /
|
|
4363
|
+
* The behavior of the property is similar to that of `none` /
|
|
4364
|
+
* Системное свойство для формирования неопределённых свойств.
|
|
4365
|
+
* Поведение свойства аналогично как у `none`
|
|
4366
|
+
*/
|
|
4367
|
+
other = "other"
|
|
4368
|
+
}
|
|
4369
|
+
|
|
4370
|
+
/**
|
|
4371
|
+
* Property value type with support for strings, numbers, arrays, objects and null.
|
|
4372
|
+
*
|
|
4373
|
+
* Тип значения свойства с поддержкой строк, чисел, массивов, объектов и null.
|
|
4374
|
+
*/
|
|
4375
|
+
export declare type PropertyValue<T> = string | string[] | number | Record<string, T> | null;
|
|
4376
|
+
|
|
4377
|
+
/**
|
|
4378
|
+
* Wrapped property focus item with value and items /
|
|
4379
|
+
* Элемент фокуса обернутого свойства со значением и элементами
|
|
4380
|
+
*/
|
|
4381
|
+
export declare type PropertyWrapFocus = {
|
|
4382
|
+
/** Focus value / Значение фокуса */
|
|
4383
|
+
value: string;
|
|
4384
|
+
/** Array of property lists / Массив списков свойств */
|
|
4385
|
+
item: PropertyList[];
|
|
4386
|
+
};
|
|
4387
|
+
|
|
4388
|
+
/** Wrapped property item with values and quantity / Обернутый элемент свойства с значениями и количеством */
|
|
4389
|
+
export declare type PropertyWrapItem = {
|
|
4390
|
+
/** Values mapped by keys / Значения сопоставленные по ключам */
|
|
4391
|
+
values: Record<string, PropertyList[]>;
|
|
4392
|
+
/** Total quantity / Общее количество */
|
|
4393
|
+
quantity: number;
|
|
4394
|
+
};
|
|
4395
|
+
|
|
4396
|
+
/** Wrapped property list with properties and quantity / Обернутый список свойств с свойствами и количеством */
|
|
4397
|
+
export declare type PropertyWrapList = {
|
|
4398
|
+
/** Properties mapped by keys / Свойства сопоставленные по ключам */
|
|
4399
|
+
properties: Record<string, PropertyWrapItem>;
|
|
4400
|
+
/** Total quantity / Общее количество */
|
|
4401
|
+
quantity: number;
|
|
4402
|
+
};
|
|
4403
|
+
|
|
4404
|
+
/**
|
|
4405
|
+
* Executes a shell command inside the directory of a specific package and logs output.
|
|
4406
|
+
*
|
|
4407
|
+
* Выполняет команду оболочки внутри директории конкретного пакета и логирует вывод.
|
|
4408
|
+
* @param packageFile target package file wrapper instance / экземпляр обертки файла целевого пакета
|
|
4409
|
+
* @param command shell command string to execute / строка команды оболочки для выполнения
|
|
4410
|
+
* @param showStdout whether to output stdout to the console / выводить ли стандартный вывод в консоль
|
|
4411
|
+
* @param showStderr whether to output stderr to the console / выводить ли стандартный поток ошибок в консоль
|
|
4412
|
+
* @returns promise resolving to true if command succeeded, false otherwise / промис, возвращающий true при успешном выполнении, иначе false
|
|
4413
|
+
*/
|
|
4414
|
+
export declare function run(packageFile: PackageFile, command: string, showStdout?: boolean, showStderr?: boolean): Promise<boolean>;
|
|
4415
|
+
|
|
4416
|
+
/** Default Chromium launch arguments / Стандартные аргументы запуска Chromium */
|
|
4417
|
+
export declare const SCREENSHOT_ARGS: string[];
|
|
4418
|
+
|
|
4419
|
+
/** Default image output format / Стандартный формат вывода скриншотов */
|
|
4420
|
+
export declare const SCREENSHOT_FORMAT = "webp";
|
|
4421
|
+
|
|
4422
|
+
/** Default viewport height in pixels / Стандартная высота области просмотра в пикселях */
|
|
4423
|
+
export declare const SCREENSHOT_HEIGHTS = 1080;
|
|
4424
|
+
|
|
4425
|
+
/** Default image compression quality / Стандартное качество сжатия изображений */
|
|
4426
|
+
export declare const SCREENSHOT_QUALITY = 80;
|
|
4427
|
+
|
|
4428
|
+
/** Default page load timeout in milliseconds / Стандартный таймаут загрузки страницы в миллисекундах */
|
|
4429
|
+
export declare const SCREENSHOT_TIMEOUT = 320000;
|
|
4430
|
+
|
|
4431
|
+
/** Default page navigation readiness conditions / Стандартные условия готовности страницы при навигации */
|
|
4432
|
+
export declare const SCREENSHOT_WAIT_UNTIL: PuppeteerLifeCycleEvent[];
|
|
4433
|
+
|
|
4434
|
+
/** Default viewport width in pixels / Стандартная ширина области просмотра в пикселях */
|
|
4435
|
+
export declare const SCREENSHOT_WIDTHS = 1920;
|
|
4436
|
+
|
|
4437
|
+
/**
|
|
4438
|
+
* Viewport dimension metrics for taking screenshots.
|
|
4439
|
+
*
|
|
4440
|
+
* Метрики размеров области просмотра (viewport) для создания скриншотов.
|
|
4441
|
+
*/
|
|
4442
|
+
export declare interface ScreenshotMetrics {
|
|
4443
|
+
/** Width of the page in pixels / Ширина страницы в пикселях */
|
|
4444
|
+
width: number;
|
|
4445
|
+
/** Height of the page in pixels / Высота страницы в пикселях */
|
|
4446
|
+
height: number;
|
|
4447
|
+
}
|
|
4448
|
+
|
|
4449
|
+
/**
|
|
4450
|
+
* Configuration options for capturing screenshots via Puppeteer.
|
|
4451
|
+
*
|
|
4452
|
+
* Опции конфигурации для создания скриншотов через Puppeteer.
|
|
4453
|
+
*/
|
|
4454
|
+
export declare interface ScreenshotOptions {
|
|
4455
|
+
/** Additional CLI flags for browser launch / Дополнительные CLI-флаги для запуска браузера */
|
|
4456
|
+
args?: string[];
|
|
4457
|
+
/** Navigation lifecycle event conditions to consider page loaded / Условия событий жизненного цикла навигации для завершения загрузки */
|
|
4458
|
+
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
|
4459
|
+
/** Maximum timeout in milliseconds for loading the page / Максимальный таймаут в миллисекундах для загрузки страницы */
|
|
4460
|
+
timeout?: number;
|
|
4461
|
+
/** Width of the screenshot viewport in pixels / Ширина области просмотра скриншота в пикселях */
|
|
4462
|
+
width?: number;
|
|
4463
|
+
/** Height of the screenshot viewport in pixels / Высота области просмотра скриншота в пикселях */
|
|
4464
|
+
height?: number;
|
|
4465
|
+
/** Image output format / Формат сохранения изображения */
|
|
4466
|
+
format?: 'png' | 'jpeg' | 'webp';
|
|
4467
|
+
/** Image compression quality (1-100) / Качество сжатия изображения (1-100) */
|
|
4468
|
+
quality?: number;
|
|
4469
|
+
/** Whether to capture full scrollable page height / Делать ли снимок всей прокручиваемой страницы */
|
|
4470
|
+
fullPage?: boolean;
|
|
4471
|
+
}
|
|
4472
|
+
|
|
4473
|
+
/**
|
|
4474
|
+
* Composable to resolve and instantiate the configured AI client provider.
|
|
4475
|
+
* Uses a registry-based lookup (Open-Closed Principle) to map provider type to its factory.
|
|
4476
|
+
*
|
|
4477
|
+
* Композабл для определения и инициализации настроенного провайдера клиента AI.
|
|
4478
|
+
* Использует реестр (принцип открытости-закрытости) для сопоставления типа провайдера с его фабрикой.
|
|
4479
|
+
* @returns initialized AI client instance or undefined if unrecognized / инициализированный экземпляр клиента AI или undefined, если тип не распознан
|
|
4480
|
+
*/
|
|
4481
|
+
export declare function useAi(): AiAbstract | undefined;
|
|
4482
|
+
|
|
4483
|
+
/**
|
|
4484
|
+
* HTML/Vue attribute definition for a Web-Types tag.
|
|
4485
|
+
*
|
|
4486
|
+
* Определение HTML/Vue атрибута для тега Web-Types.
|
|
4487
|
+
*/
|
|
4488
|
+
export declare type WebTypesAttributeItem = WebTypesInfo & {
|
|
4489
|
+
/** Default attribute value / Значение атрибута по умолчанию */
|
|
4490
|
+
default?: string;
|
|
4491
|
+
/** Attribute value kind and type / Вид и тип значения атрибута */
|
|
4492
|
+
value?: {
|
|
4493
|
+
/** Value kind / Вид значения */
|
|
4494
|
+
kind?: WebTypesAttributeKind;
|
|
4495
|
+
/** Value type / Тип значения */
|
|
4496
|
+
type?: string;
|
|
4497
|
+
};
|
|
4498
|
+
};
|
|
4499
|
+
|
|
4500
|
+
/**
|
|
4501
|
+
* Kind of the attribute value in Web-Types.
|
|
4502
|
+
*
|
|
4503
|
+
* Вид значения атрибута в Web-Types.
|
|
4504
|
+
*/
|
|
4505
|
+
export declare type WebTypesAttributeKind = 'expression' | 'plainText' | 'string';
|
|
4506
|
+
|
|
4507
|
+
/**
|
|
4508
|
+
* List of Web-Types attribute definitions.
|
|
4509
|
+
*
|
|
4510
|
+
* Список определений атрибутов Web-Types.
|
|
4511
|
+
*/
|
|
4512
|
+
export declare type WebTypesAttributes = WebTypesAttributeItem[];
|
|
4513
|
+
|
|
4514
|
+
/**
|
|
4515
|
+
* Event definition for a Web-Types component tag.
|
|
4516
|
+
*
|
|
4517
|
+
* Определение события для тега компонента Web-Types.
|
|
4518
|
+
*/
|
|
4519
|
+
export declare type WebTypesEventItem = WebTypesInfo & {
|
|
4520
|
+
/** List of event arguments / Список аргументов события */
|
|
4521
|
+
arguments?: WebTypesProperties;
|
|
4522
|
+
/** Event type string / Строка типа события */
|
|
4523
|
+
type?: string;
|
|
4524
|
+
};
|
|
4525
|
+
|
|
4526
|
+
/**
|
|
4527
|
+
* List of Web-Types event definitions.
|
|
4528
|
+
*
|
|
4529
|
+
* Список определений событий Web-Types.
|
|
4530
|
+
*/
|
|
4531
|
+
export declare type WebTypesEvents = WebTypesEventItem[];
|
|
4532
|
+
|
|
4533
|
+
/**
|
|
4534
|
+
* Basic metadata for a Web-Types item (name, description, and documentation URL).
|
|
4535
|
+
*
|
|
4536
|
+
* Базовая метаинформация для элемента Web-Types (имя, описание и URL документации).
|
|
4537
|
+
*/
|
|
4538
|
+
export declare type WebTypesInfo = {
|
|
4539
|
+
/** Item name / Имя элемента */
|
|
4540
|
+
'name': string;
|
|
4541
|
+
/** Item description / Описание элемента */
|
|
4542
|
+
'description'?: string;
|
|
4543
|
+
/** Documentation URL / URL документации */
|
|
4544
|
+
'doc-url'?: string;
|
|
4545
|
+
};
|
|
4546
|
+
|
|
4547
|
+
/**
|
|
4548
|
+
* List of Web-Types property definitions.
|
|
4549
|
+
*
|
|
4550
|
+
* Список определений свойств Web-Types.
|
|
4551
|
+
*/
|
|
4552
|
+
export declare type WebTypesProperties = WebTypesProperty[];
|
|
4553
|
+
|
|
4554
|
+
/**
|
|
4555
|
+
* Property definition for Web-Types (e.g. event arguments or slot scope).
|
|
4556
|
+
*
|
|
4557
|
+
* Определение свойства для Web-Types (например, аргументы событий или область видимости слота).
|
|
4558
|
+
*/
|
|
4559
|
+
export declare type WebTypesProperty = {
|
|
4560
|
+
/** Property name / Имя свойства */
|
|
4561
|
+
name: string;
|
|
4562
|
+
/** Property type expression / Выражение типа свойства */
|
|
4563
|
+
type?: string;
|
|
4564
|
+
/** Property description / Описание свойства */
|
|
4565
|
+
description?: string;
|
|
4566
|
+
};
|
|
4567
|
+
|
|
4568
|
+
/**
|
|
4569
|
+
* Prop definition for a Vue component in Web-Types.
|
|
4570
|
+
*
|
|
4571
|
+
* Определение входного свойства (prop) для Vue-компонента в Web-Types.
|
|
4572
|
+
*/
|
|
4573
|
+
export declare type WebTypesPropItem = WebTypesInfo & {
|
|
4574
|
+
/** Default prop value / Значение свойства по умолчанию */
|
|
4575
|
+
default?: string;
|
|
4576
|
+
/** TypeScript prop type / TypeScript тип свойства */
|
|
4577
|
+
type?: string;
|
|
4578
|
+
};
|
|
4579
|
+
|
|
4580
|
+
/**
|
|
4581
|
+
* Slot definition for a Web-Types component tag.
|
|
4582
|
+
*
|
|
4583
|
+
* Определение слота для тега компонента Web-Types.
|
|
4584
|
+
*/
|
|
4585
|
+
export declare type WebTypesSlotItem = WebTypesInfo & {
|
|
4586
|
+
/** Scoped slot properties / Свойства слота с ограниченной областью видимости (scoped) */
|
|
4587
|
+
'vue-properties'?: WebTypesProperties;
|
|
4588
|
+
};
|
|
4589
|
+
|
|
4590
|
+
/**
|
|
4591
|
+
* List of Web-Types slot definitions.
|
|
4592
|
+
*
|
|
4593
|
+
* Список определений слотов Web-Types.
|
|
4594
|
+
*/
|
|
4595
|
+
export declare type WebTypesSlots = WebTypesSlotItem[];
|
|
4596
|
+
|
|
4597
|
+
/**
|
|
4598
|
+
* Tag (component) definition for Web-Types.
|
|
4599
|
+
*
|
|
4600
|
+
* Определение тега (компонента) для Web-Types.
|
|
4601
|
+
*/
|
|
4602
|
+
export declare type WebTypesTagItem = WebTypesInfo & {
|
|
4603
|
+
/** Source module and export symbol / Исходный модуль и экспортируемый символ */
|
|
4604
|
+
source?: {
|
|
4605
|
+
/** Module specifier / Спецификатор модуля */
|
|
4606
|
+
module?: string;
|
|
4607
|
+
/** Exported symbol name / Имя экспортируемого символа */
|
|
4608
|
+
symbol?: string;
|
|
4609
|
+
};
|
|
4610
|
+
/** Component attributes / Атрибуты компонента */
|
|
4611
|
+
attributes?: WebTypesAttributes;
|
|
4612
|
+
/** Component events / События компонента */
|
|
4613
|
+
events?: WebTypesEvents;
|
|
4614
|
+
/** Component slots / Слоты компонента */
|
|
4615
|
+
slots?: WebTypesSlots;
|
|
4616
|
+
};
|
|
4617
|
+
|
|
4618
|
+
/**
|
|
4619
|
+
* List of Web-Types tag definitions.
|
|
4620
|
+
*
|
|
4621
|
+
* Список определений тегов Web-Types.
|
|
4622
|
+
*/
|
|
4623
|
+
export declare type WebTypesTags = WebTypesTagItem[];
|
|
4624
|
+
|
|
4625
|
+
/**
|
|
4626
|
+
* Vue component definition for Web-Types format.
|
|
4627
|
+
*
|
|
4628
|
+
* Определение Vue-компонента для формата Web-Types.
|
|
4629
|
+
*/
|
|
4630
|
+
export declare type WebTypesVueComponentItem = WebTypesInfo & {
|
|
4631
|
+
/** Source module and symbol / Исходный модуль и символ */
|
|
4632
|
+
source?: {
|
|
4633
|
+
/** Module path / Путь к модулю */
|
|
4634
|
+
module?: string;
|
|
4635
|
+
/** Exported symbol name / Имя экспортируемого символа */
|
|
4636
|
+
symbol?: string;
|
|
4637
|
+
};
|
|
4638
|
+
/** Component props list / Список входных свойств (props) компонента */
|
|
4639
|
+
props?: WebTypesPropItem[];
|
|
4640
|
+
/** Component slots list / Список слотов компонента */
|
|
4641
|
+
slots?: WebTypesSlots;
|
|
4642
|
+
/** JavaScript / events metadata / Метаданные JavaScript и событий */
|
|
4643
|
+
js?: {
|
|
4644
|
+
/** Component emitted events / Эмитируемые события компонента */
|
|
4645
|
+
events?: WebTypesEventItem[];
|
|
4646
|
+
};
|
|
4647
|
+
};
|
|
4648
|
+
|
|
4649
|
+
/**
|
|
4650
|
+
* Root schema structure for Web-Types JSON document.
|
|
4651
|
+
*
|
|
4652
|
+
* Корневая структура схемы для JSON-документа Web-Types.
|
|
4653
|
+
*/
|
|
4654
|
+
export declare type WebTypesVueJson = {
|
|
4655
|
+
/** JSON schema URI / URI JSON-схемы */
|
|
4656
|
+
'$schema': string;
|
|
4657
|
+
/** Target framework name / Название целевого фреймворка */
|
|
4658
|
+
'framework': 'vue';
|
|
4659
|
+
/** Package name / Название пакета */
|
|
4660
|
+
'name': string;
|
|
4661
|
+
/** Package version / Версия пакета */
|
|
4662
|
+
'version': string;
|
|
4663
|
+
/** JavaScript types syntax / Синтаксис типов JavaScript */
|
|
4664
|
+
'js-types-syntax'?: 'typescript';
|
|
4665
|
+
/** HTML / Vue component contributions container / Контейнер компонентов HTML / Vue */
|
|
4666
|
+
'contributions': {
|
|
4667
|
+
/** HTML contributions / Вклады HTML */
|
|
4668
|
+
html: {
|
|
4669
|
+
/** Description markup format / Формат разметки описаний */
|
|
4670
|
+
'description-markup': 'markdown';
|
|
4671
|
+
/** List of Vue components / Список Vue-компонентов */
|
|
4672
|
+
'vue-components': WebTypesVueComponentItem[];
|
|
4673
|
+
};
|
|
4674
|
+
};
|
|
4675
|
+
};
|
|
4676
|
+
|
|
4677
|
+
export { }
|