@dxtmisha/scripts 0.11.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -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 +34 -3
- 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 +27 -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-BiLAcdFy.js +232 -0
- package/dist/PropertiesConfig-BKZz_FWW.js +262 -0
- package/{src/config.ts → dist/config.d.ts} +185 -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 +4910 -0
- package/dist/library.js +1568 -0
- package/dist/propertyTypes-C64u6rT3.js +236 -0
- package/package.json +76 -27
- 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
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { strFill } from '@dxtmisha/functional-basic'
|
|
4
|
-
|
|
5
|
-
import { PropertiesConfig } from '../Properties/PropertiesConfig'
|
|
6
|
-
|
|
7
|
-
import { UI_DIRS_STYLES } from '../../config'
|
|
8
|
-
|
|
9
|
-
const SPACE = ' '
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* CSS style processing class.
|
|
13
|
-
*
|
|
14
|
-
* Класс с базовыми функциями для обработки стилей.
|
|
15
|
-
*/
|
|
16
|
-
export class StylesTool {
|
|
17
|
-
/**
|
|
18
|
-
* Getting a directory to store a file.
|
|
19
|
-
*
|
|
20
|
-
* Получение директории для хранения файла.
|
|
21
|
-
*/
|
|
22
|
-
static getDir(): string[] {
|
|
23
|
-
return [...UI_DIRS_STYLES, PropertiesConfig.getProjectName()]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Returns a space.
|
|
28
|
-
*
|
|
29
|
-
* Возвращает пробел
|
|
30
|
-
*/
|
|
31
|
-
static getSpace(): string {
|
|
32
|
-
return SPACE
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Getting an indent.
|
|
37
|
-
*
|
|
38
|
-
* Получение отступа.
|
|
39
|
-
* @param level level/ уровень
|
|
40
|
-
*/
|
|
41
|
-
static addSpace(level: number): string {
|
|
42
|
-
return strFill(SPACE, level)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Код строки для импорта файла.
|
|
47
|
-
*
|
|
48
|
-
* Code line for file import.
|
|
49
|
-
* @param path path to the file/ путь к файлу
|
|
50
|
-
*/
|
|
51
|
-
static addImport(path: string): string {
|
|
52
|
-
return `@import "${path}";`
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Код строки для импорта файла.
|
|
57
|
-
*
|
|
58
|
-
* Code line for file import.
|
|
59
|
-
* @param path path to the file/ путь к файлу
|
|
60
|
-
*/
|
|
61
|
-
static addUse(path: string): string {
|
|
62
|
-
return `@use "${path}";`
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Код строки для импорта файла.
|
|
67
|
-
*
|
|
68
|
-
* Code line for file import.
|
|
69
|
-
* @param path path to the file/ путь к файлу
|
|
70
|
-
*/
|
|
71
|
-
static addForward(path: string): string {
|
|
72
|
-
return `@forward "${path}";`
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Getting a reference to a base function.
|
|
77
|
-
*
|
|
78
|
-
* Получение ссылки на базовую функцию.
|
|
79
|
-
*/
|
|
80
|
-
static addImportProperties(): string {
|
|
81
|
-
return '@use "@dxtmisha/styles" as ui;'
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Combines the elements of an array into one string.
|
|
86
|
-
*
|
|
87
|
-
* Объединяет элементы массива в одну строку.
|
|
88
|
-
* @param data array containing records/ массив, содержащий записи
|
|
89
|
-
*/
|
|
90
|
-
static join(data: string[]): string {
|
|
91
|
-
return data.join('\r\n')
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Adding an access level.
|
|
96
|
-
*
|
|
97
|
-
* Добавление уровня доступа.
|
|
98
|
-
* @param space space/ пробел
|
|
99
|
-
*/
|
|
100
|
-
static increaseSpace(space: string): string {
|
|
101
|
-
return `${space}${SPACE}`
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
static toFunctionCss(value: string): string {
|
|
105
|
-
if (value.match(/@[a-zA-Z0-9.]+\(.*?\)( |,|$)/)) {
|
|
106
|
-
return value
|
|
107
|
-
.replace(/@([a-zA-Z0-9.]+\(.*?\))( |,|$)/g, '#{$1}$2')
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return value
|
|
111
|
-
}
|
|
112
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { forEach } from '@dxtmisha/functional-basic'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
type PropertyItem,
|
|
7
|
-
type PropertyItemsItem,
|
|
8
|
-
PropertyKey
|
|
9
|
-
} from '../../../types/propertyTypes'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Base class for conversion.
|
|
13
|
-
*
|
|
14
|
-
* Базовый класс для преобразования.
|
|
15
|
-
*/
|
|
16
|
-
export abstract class StylesToAbstract {
|
|
17
|
-
protected item: PropertyItem
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Constructor
|
|
21
|
-
* @param property current branch/ текущая ветка
|
|
22
|
-
* @param space space/ пробел
|
|
23
|
-
* @param content callable function for sub property/ вызываемая функция для под свойства
|
|
24
|
-
* @param first the first element in the list/ первый элемент в списке
|
|
25
|
-
*/
|
|
26
|
-
constructor(
|
|
27
|
-
protected property: PropertyItemsItem,
|
|
28
|
-
protected space: string,
|
|
29
|
-
protected content: () => string[] = () => [],
|
|
30
|
-
protected first: boolean = true
|
|
31
|
-
) {
|
|
32
|
-
this.item = property.item
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Getting processed data.
|
|
37
|
-
*
|
|
38
|
-
* Получение обработанных данных.
|
|
39
|
-
*/
|
|
40
|
-
make(): string[] {
|
|
41
|
-
return this.addSpace(this.treatment())
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Getting the name of a property.
|
|
46
|
-
*
|
|
47
|
-
* Получение названия свойства.
|
|
48
|
-
*/
|
|
49
|
-
protected getName(): string {
|
|
50
|
-
return this.item?.[PropertyKey.name] ?? ''
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Gets the value of a property.
|
|
55
|
-
*
|
|
56
|
-
* Получает значение свойства.
|
|
57
|
-
*/
|
|
58
|
-
protected getValue(): string | undefined {
|
|
59
|
-
const value = this.item?.[PropertyKey.css]
|
|
60
|
-
|
|
61
|
-
if (value) {
|
|
62
|
-
return value.replace(/\\#/g, '#')
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return undefined
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Method for converting data into a style structure.
|
|
70
|
-
*
|
|
71
|
-
* Метод преобразования данных в структуру стиля.
|
|
72
|
-
*/
|
|
73
|
-
protected abstract treatment(): string[]
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Adding a space in each line.
|
|
77
|
-
*
|
|
78
|
-
* Добавление пробела в каждую строку.
|
|
79
|
-
* @param data data for processing/ данные для обработки
|
|
80
|
-
*/
|
|
81
|
-
protected addSpace(data: string[]): string[] {
|
|
82
|
-
return forEach(data, item => `${this.space}${item}`)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Adds an empty line if the element is not the first in the tree.
|
|
87
|
-
*
|
|
88
|
-
* Добавляет пустую строку, если элемент не является первым в дереве.
|
|
89
|
-
*/
|
|
90
|
-
protected addEmptyString(): string[] {
|
|
91
|
-
return (this.first ? [''] : [])
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Class for creating animation.
|
|
7
|
-
*
|
|
8
|
-
* Класс для создания анимации.
|
|
9
|
-
*/
|
|
10
|
-
export class StylesToAnimate extends StylesToAbstract {
|
|
11
|
-
protected treatment(): string[] {
|
|
12
|
-
return [
|
|
13
|
-
...this.addEmptyString(),
|
|
14
|
-
`@keyframes ${this.getName()} {`,
|
|
15
|
-
...this.content(),
|
|
16
|
-
'}'
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Class for adding a class or subclass to a property.
|
|
7
|
-
*
|
|
8
|
-
* Класс для добавления класса или подкласса к свойству.
|
|
9
|
-
*/
|
|
10
|
-
export class StylesToClass extends StylesToAbstract {
|
|
11
|
-
protected treatment(): string[] {
|
|
12
|
-
const content = this.content()
|
|
13
|
-
|
|
14
|
-
if (content.length > 0) {
|
|
15
|
-
return [
|
|
16
|
-
...this.addEmptyString(),
|
|
17
|
-
`${this.getName()} {`,
|
|
18
|
-
...this.content(),
|
|
19
|
-
'}'
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return []
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Class for displaying a class with a full class name.
|
|
7
|
-
*
|
|
8
|
-
* Класс для вывода класса с полной строкой названия.
|
|
9
|
-
*/
|
|
10
|
-
export class StylesToClassFull extends StylesToAbstract {
|
|
11
|
-
protected treatment(): string[] {
|
|
12
|
-
return [
|
|
13
|
-
...this.addEmptyString(),
|
|
14
|
-
`${this.getName()} {`,
|
|
15
|
-
...this.content(),
|
|
16
|
-
'}'
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Class for generating CSS container queries.
|
|
7
|
-
*
|
|
8
|
-
* Класс для генерации CSS container queries.
|
|
9
|
-
*/
|
|
10
|
-
export class StylesToContainer extends StylesToAbstract {
|
|
11
|
-
/**
|
|
12
|
-
* Processes the container query and wraps content in @container rule.
|
|
13
|
-
*
|
|
14
|
-
* Обрабатывает container query и оборачивает содержимое в правило @container.
|
|
15
|
-
*/
|
|
16
|
-
protected treatment(): string[] {
|
|
17
|
-
return [
|
|
18
|
-
...this.addEmptyString(),
|
|
19
|
-
`@container ${this.getName()} {`,
|
|
20
|
-
...this.content(),
|
|
21
|
-
'}'
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Class for processing media queries.
|
|
7
|
-
*
|
|
8
|
-
* Класс для обработки медиа-запросов.
|
|
9
|
-
*/
|
|
10
|
-
export class StylesToMedia extends StylesToAbstract {
|
|
11
|
-
protected treatment(): string[] {
|
|
12
|
-
return [
|
|
13
|
-
...this.addEmptyString(),
|
|
14
|
-
`@media screen and ${this.getName()} {`,
|
|
15
|
-
...this.content(),
|
|
16
|
-
'}'
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { isObjectNotArray, toCamelCase } from '@dxtmisha/functional-basic'
|
|
4
|
-
|
|
5
|
-
import { PropertiesTool } from '../../Properties/PropertiesTool'
|
|
6
|
-
|
|
7
|
-
import { StylesTool } from '../StylesTool'
|
|
8
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
9
|
-
|
|
10
|
-
import { PropertyKey } from '../../../types/propertyTypes'
|
|
11
|
-
|
|
12
|
-
import { styleTypes } from '../../../media/properties/style'
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* CSS class for converting to CSS property.
|
|
16
|
-
*
|
|
17
|
-
* Класс для преобразования в свойство CSS.
|
|
18
|
-
*/
|
|
19
|
-
export class StylesToProperty extends StylesToAbstract {
|
|
20
|
-
/**
|
|
21
|
-
* Acquiring full ownership.
|
|
22
|
-
*
|
|
23
|
-
* Получения полного свойства.
|
|
24
|
-
*/
|
|
25
|
-
protected treatment(): string[] {
|
|
26
|
-
const data: string[] = []
|
|
27
|
-
|
|
28
|
-
if (
|
|
29
|
-
this.property?.previous
|
|
30
|
-
&& this.property.previous?.[PropertyKey.sort] !== this.item?.[PropertyKey.sort]
|
|
31
|
-
) {
|
|
32
|
-
data.push('')
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (this.item?.[PropertyKey.varKey]) {
|
|
36
|
-
data.push(this.getVar())
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
data.push(this.getPropertyValue())
|
|
40
|
-
|
|
41
|
-
return data
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Generating values for variables.
|
|
46
|
-
* Генерация значений для переменных.
|
|
47
|
-
*/
|
|
48
|
-
private getVar() {
|
|
49
|
-
const {
|
|
50
|
-
design,
|
|
51
|
-
component
|
|
52
|
-
} = this.property
|
|
53
|
-
const name = this.getName()
|
|
54
|
-
const value = this.getValue()
|
|
55
|
-
|
|
56
|
-
return `--${PropertiesTool.getComponentName(design, component)}-${name}: ${value};`
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Generating value for property.
|
|
61
|
-
*
|
|
62
|
-
* Генерация значения для свойства.
|
|
63
|
-
*/
|
|
64
|
-
private getPropertyValue(): string {
|
|
65
|
-
const name = this.getName()
|
|
66
|
-
const value = this.getValue() ?? 'unset'
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
this.item?.[PropertyKey.modification] !== false
|
|
70
|
-
&& styleTypes.indexOf(name) !== -1
|
|
71
|
-
) {
|
|
72
|
-
return `@include ui.${toCamelCase(name)}(#{${value}});${this.initAuxiliaryValue()}`
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const property = `${name}: ${StylesTool.toFunctionCss(value)}`
|
|
76
|
-
|
|
77
|
-
if (name === 'font-family') {
|
|
78
|
-
return `${property}, sans-serif;`
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return `${property};`
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Initialization of auxiliary values.
|
|
86
|
-
*
|
|
87
|
-
* Инициализация вспомогательных значений.
|
|
88
|
-
*/
|
|
89
|
-
private initAuxiliaryValue(): string {
|
|
90
|
-
const name = this.getName()
|
|
91
|
-
const properties = this.property.parent?.value
|
|
92
|
-
|
|
93
|
-
if (isObjectNotArray(properties)) {
|
|
94
|
-
switch (name) {
|
|
95
|
-
case 'color-opacity':
|
|
96
|
-
if (!('color' in properties)) {
|
|
97
|
-
return ` @include ui.color('init');`
|
|
98
|
-
}
|
|
99
|
-
break
|
|
100
|
-
|
|
101
|
-
case 'background-opacity':
|
|
102
|
-
if (!('backgroundColor' in properties)) {
|
|
103
|
-
return ` @include ui.backgroundColor('init');`
|
|
104
|
-
}
|
|
105
|
-
break
|
|
106
|
-
|
|
107
|
-
case 'gradient-opacity':
|
|
108
|
-
if (!('gradient' in properties)) {
|
|
109
|
-
return ` @include ui.gradient('init');`
|
|
110
|
-
}
|
|
111
|
-
break
|
|
112
|
-
|
|
113
|
-
case 'border-opacity':
|
|
114
|
-
if (!('borderColor' in properties)) {
|
|
115
|
-
return ` @include ui.borderColor('init');`
|
|
116
|
-
}
|
|
117
|
-
break
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return ''
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
4
|
-
|
|
5
|
-
export class StylesToRoot extends StylesToAbstract {
|
|
6
|
-
protected treatment(): string[] {
|
|
7
|
-
return [
|
|
8
|
-
...this.addEmptyString(),
|
|
9
|
-
`@at-root ${this.getName()} {`,
|
|
10
|
-
...this.content(),
|
|
11
|
-
'}'
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { toKebabCase } from '@dxtmisha/functional-basic'
|
|
4
|
-
|
|
5
|
-
import { PropertiesTool } from '../../Properties/PropertiesTool'
|
|
6
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
7
|
-
|
|
8
|
-
import { PropertyKey } from '../../../types/propertyTypes'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Class for generating data for sub property styles.
|
|
12
|
-
*
|
|
13
|
-
* Класс для генерация данный для под свойство стили.
|
|
14
|
-
*/
|
|
15
|
-
export class StylesToSelector extends StylesToAbstract {
|
|
16
|
-
/**
|
|
17
|
-
* Method for converting data into a style structure.
|
|
18
|
-
*
|
|
19
|
-
* Метод преобразования данных в структуру стиля.
|
|
20
|
-
*/
|
|
21
|
-
protected treatment(): string[] {
|
|
22
|
-
const content = this.content()
|
|
23
|
-
|
|
24
|
-
if (content.length > 0) {
|
|
25
|
-
return [
|
|
26
|
-
...this.addEmptyString(),
|
|
27
|
-
`${this.getSelector()} {`,
|
|
28
|
-
...this.content(),
|
|
29
|
-
'}'
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return []
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Getting the name of the class of a component.
|
|
38
|
-
*
|
|
39
|
-
* Получение названия класса у компонента.
|
|
40
|
-
*/
|
|
41
|
-
private getClassName(): string {
|
|
42
|
-
const {
|
|
43
|
-
design,
|
|
44
|
-
component
|
|
45
|
-
} = this.property
|
|
46
|
-
|
|
47
|
-
return `'${PropertiesTool.getClassName(design, component)}'`
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Returns a string for a selector.
|
|
52
|
-
*
|
|
53
|
-
* Возвращает строку для селектора.
|
|
54
|
-
*/
|
|
55
|
-
private getSelector(): string {
|
|
56
|
-
const name = this.getName()
|
|
57
|
-
const className = this.getClassName()
|
|
58
|
-
const isClassMain = className === `'.${this.property.parent?.[PropertyKey.name]}'`
|
|
59
|
-
|
|
60
|
-
switch (name) {
|
|
61
|
-
case 'hover':
|
|
62
|
-
case 'active':
|
|
63
|
-
case 'focus':
|
|
64
|
-
case 'disabled':
|
|
65
|
-
case 'readonly':
|
|
66
|
-
return `@include ui.${name}${isClassMain ? '' : `(${className})`}`
|
|
67
|
-
default:
|
|
68
|
-
return `&:${toKebabCase(name)}`
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { isObjectNotArray } from '@dxtmisha/functional-basic'
|
|
4
|
-
|
|
5
|
-
import { PropertiesItems } from '../../Properties/PropertiesItems'
|
|
6
|
-
import { PropertiesValues } from '../../Properties/PropertiesValues'
|
|
7
|
-
|
|
8
|
-
import { StylesTool } from '../StylesTool'
|
|
9
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
type PropertyItem,
|
|
13
|
-
PropertyKey,
|
|
14
|
-
PropertyType
|
|
15
|
-
} from '../../../types/propertyTypes'
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* CSS variable converter class.
|
|
19
|
-
*
|
|
20
|
-
* Класс для преобразования в переменные CSS.
|
|
21
|
-
*/
|
|
22
|
-
export class StylesToVar extends StylesToAbstract {
|
|
23
|
-
/**
|
|
24
|
-
* Getting all variables in the current branch.
|
|
25
|
-
*
|
|
26
|
-
* Получение всех переменных в текущей ветке.
|
|
27
|
-
*/
|
|
28
|
-
protected treatment(): string[] {
|
|
29
|
-
const { value } = this.property
|
|
30
|
-
|
|
31
|
-
if (isObjectNotArray(value)) {
|
|
32
|
-
const data: string[] = []
|
|
33
|
-
|
|
34
|
-
new PropertiesItems(value).each(({ item }) => {
|
|
35
|
-
if (
|
|
36
|
-
item?.[PropertyKey.variable] === PropertyType.var
|
|
37
|
-
&& item?.[PropertyKey.css]
|
|
38
|
-
) {
|
|
39
|
-
data.push(this.getCode(item))
|
|
40
|
-
|
|
41
|
-
if (item?.[PropertyKey.cssColorOpacity]) {
|
|
42
|
-
data.push(this.getCodeColorOpacity(item))
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
return data
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const { item } = this.property
|
|
51
|
-
|
|
52
|
-
if (item?.[PropertyKey.cssColorOpacity]) {
|
|
53
|
-
return [
|
|
54
|
-
this.getCode(),
|
|
55
|
-
this.getCodeColorOpacity()
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return [this.getCode()]
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Acquiring full ownership.
|
|
64
|
-
*
|
|
65
|
-
* Получения полного свойства.
|
|
66
|
-
* @param item current element/ текущий элемент
|
|
67
|
-
*/
|
|
68
|
-
private getCode(
|
|
69
|
-
item: PropertyItem = this.item
|
|
70
|
-
): string {
|
|
71
|
-
let value = item?.[PropertyKey.css]
|
|
72
|
-
|
|
73
|
-
if (typeof value !== 'string' || value === '') {
|
|
74
|
-
value = 'unset'
|
|
75
|
-
} else if (PropertiesValues.isColor(value)) {
|
|
76
|
-
value = `#{ui.toColorRbg(${value})}`
|
|
77
|
-
} else {
|
|
78
|
-
value = value.replace(/\\#/g, '#')
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return `${item?.[PropertyKey.name]}: ${StylesTool.toFunctionCss(value)};`
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Adds a property responsible for transparency.
|
|
86
|
-
*
|
|
87
|
-
* Добавляет свойство, отвечающее за прозрачность.
|
|
88
|
-
* @param item current element/ текущий элемент
|
|
89
|
-
*/
|
|
90
|
-
private getCodeColorOpacity(
|
|
91
|
-
item: PropertyItem = this.item
|
|
92
|
-
): string {
|
|
93
|
-
const value = item?.[PropertyKey.css]
|
|
94
|
-
const opacity = item?.[PropertyKey.cssColorOpacity]
|
|
95
|
-
|
|
96
|
-
if (
|
|
97
|
-
opacity
|
|
98
|
-
&& typeof opacity !== 'boolean'
|
|
99
|
-
) {
|
|
100
|
-
return `${item?.[PropertyKey.name]}-opacity: ${opacity};`
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return `${item?.[PropertyKey.name]}-opacity: #{ui.toColorOpacity(${value})};`
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// export:none
|
|
2
|
-
|
|
3
|
-
import { StylesTool } from '../StylesTool'
|
|
4
|
-
import { StylesToAbstract } from './StylesToAbstract'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Class for processing data by property.
|
|
8
|
-
*
|
|
9
|
-
* Класс для обработки данных по свойству.
|
|
10
|
-
*/
|
|
11
|
-
export class StylesToVirtual extends StylesToAbstract {
|
|
12
|
-
protected contentType = [
|
|
13
|
-
'after',
|
|
14
|
-
'before'
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
protected treatment(): string[] {
|
|
18
|
-
const name = this.getName()
|
|
19
|
-
const data = [
|
|
20
|
-
...this.addEmptyString(),
|
|
21
|
-
`&::${name} {`
|
|
22
|
-
]
|
|
23
|
-
|
|
24
|
-
if (this.contentType.indexOf(name) !== -1) {
|
|
25
|
-
data.push(`${StylesTool.getSpace()}content: ' ';`)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
data.push(...this.content())
|
|
29
|
-
data.push('}')
|
|
30
|
-
|
|
31
|
-
return data
|
|
32
|
-
}
|
|
33
|
-
}
|
package/src/composables/useAi.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { PropertiesConfig } from '../classes/Properties/PropertiesConfig'
|
|
2
|
-
|
|
3
|
-
import { AiAbstract } from '../classes/Ai/AiAbstract'
|
|
4
|
-
import { AiClaude } from '../classes/Ai/AiClaude'
|
|
5
|
-
import { AiClaudeAgent } from '../classes/Ai/AiClaudeAgent'
|
|
6
|
-
import { AiClaudeCli } from '../classes/Ai/AiClaudeCli'
|
|
7
|
-
import { AiGoogle } from '../classes/Ai/AiGoogle'
|
|
8
|
-
import { AiGoogleCli } from '../classes/Ai/AiGoogleCli'
|
|
9
|
-
import { AiOpenAi } from '../classes/Ai/AiOpenAi'
|
|
10
|
-
import { AiZAi } from '../classes/Ai/AiZAi'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Composable to obtain an AI instance based on configuration.
|
|
14
|
-
*
|
|
15
|
-
* Композабл для получения экземпляра AI на основе конфигурации.
|
|
16
|
-
*/
|
|
17
|
-
export function useAi(): AiAbstract | undefined {
|
|
18
|
-
const type = PropertiesConfig.getAiType()
|
|
19
|
-
|
|
20
|
-
switch (type) {
|
|
21
|
-
case 'claude':
|
|
22
|
-
return new AiClaude()
|
|
23
|
-
case 'claude-agent':
|
|
24
|
-
return new AiClaudeAgent()
|
|
25
|
-
case 'claude-cli':
|
|
26
|
-
return new AiClaudeCli()
|
|
27
|
-
case 'gemini':
|
|
28
|
-
return new AiGoogle()
|
|
29
|
-
case 'gemini-cli':
|
|
30
|
-
return new AiGoogleCli()
|
|
31
|
-
case 'openai':
|
|
32
|
-
return new AiOpenAi()
|
|
33
|
-
case 'zai':
|
|
34
|
-
return new AiZAi()
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return undefined
|
|
38
|
-
}
|