@dxtmisha/scripts 0.10.4 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.10.6] - 2026-07-05
6
+
7
+ ### Changed
8
+ - **Library Template prompt**: Updated `prompt.md` in the library template `materials/` folder to describe library/package architecture, entrypoints, and file structures instead of web application/landing page layouts.
9
+ - **Library Template description**: Updated `ai-description.md` in the library template folder to include mandatory development guidelines for auto-generating exports (forbidding manual edits of `src/library.ts` and enforcing `npm run library`).
10
+
11
+ ## [0.10.5] - 2026-07-05
12
+
13
+ ### Added
14
+ - **PackageFile utility**: Support for `'prepublishOnly'` script fallback in the `getCodeBuildOrRecovery()` utility method.
15
+ - **AI Prompt Templates**: Updated global code generation guidelines (`aiCodeGlobalPrompt.en.md`, `aiCodeGlobalPrompt.ru.md`) and component prompt templates to enforce comprehensive type analysis, ban absolute file paths in `ai-memory.md` configurations, and standardize documentation formatting structures.
16
+
17
+ ### Changed
18
+ - **Package Types Output**: Simplified package types export configurations in `DesignComponent`, `DesignConstructor`, `DesignUi`, and library package templates by mapping type output paths directly to the root `dist` folder rather than nested `dist/src` sub-directories.
19
+ - **AI Prompt Generation**: Overhauled automated prompt and type definition instructions to strongly direct AI assistants to perform thorough pre-analyses on type structures before modifying the codebase.
20
+
5
21
  ## [0.10.4] - 2026-06-29
6
22
 
7
23
  ### Added
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/scripts",
3
3
  "private": false,
4
- "version": "0.10.4",
4
+ "version": "0.10.6",
5
5
  "type": "module",
6
6
  "description": "Development scripts and CLI tools for DXT UI projects - automated component generation, library building and project management tools",
7
7
  "keywords": [
@@ -1,7 +1,17 @@
1
- Task Goal:
1
+ # AI Prompt: Component Implementation & Development (Materials)
2
+
3
+ **Role Persona:**
4
+ You are a distinguished, world-class Senior Frontend Web Developer and Technical Architect. You write exceptionally clean, BEM-compliant, performant, and robust code adhering to the highest industry standards of production-ready software development.
5
+
6
+ **Task Goal:**
2
7
  Based on the design assets, specifications, and other work materials located in this "materials" folder, you must implement a fully working, production-ready, and robust component.
3
8
 
4
- Component Location & Resolution:
9
+ **Work Materials & Assets ("materials" folder):**
10
+ This directory (the `materials` folder) contains all relevant design assets, technical specifications, screenshots, and other reference materials for implementing the component.
11
+ - **Mandatory Study**: You MUST locate, open, and deeply analyze all files and assets present inside this `materials` folder before beginning any implementation or modifying any code.
12
+ - Ensure the final component implementation perfectly matches the design layout, interactive states, and features specified in these materials.
13
+
14
+ **Component Location & Resolution:**
5
15
  The component source files (including the main Vue component, styles, typings, and auxiliary code) are located one level up from this "materials" directory (in the parent folder containing this directory). You must locate, edit, or create them directly in that parent directory.
6
16
 
7
17
  Template Structure & Explanations:
@@ -1,20 +1,34 @@
1
- Task Goal:
2
- The primary goal is to write comprehensive, high-quality documentation for the Vue 3 component.
1
+ # AI Prompt: Component Documentation & Development
3
2
 
4
- Component Resolution & Analysis:
5
- If the component source files are not directly attached, they are located in the parent directory (one folder above this "wiki" folder). Locate and study the main Vue file, types/props, styles, and dependencies until you fully understand how the component works. Once you have a complete understanding of its behavior and interface, further deep-dive study of outer dependencies is not required.
3
+ This instruction defines the rules for analyzing, documenting, and modifying components inside the workspace.
6
4
 
7
- Mandatory Instruction:
8
- You must read and deeply study the detailed descriptions, rules, coding standards, and templates specified in:
9
- node_modules/@dxtmisha/scripts/src/media/templates/prompts/componentPrompt.en.txt
5
+ ## 1. Component Resolution & Analysis
10
6
 
11
- You must strictly follow those instructions. However, make sure you save your outputs in the correct target locations:
12
- - Documentation & playground changes (including MDX files and `stories.ts` playground configurations) must be saved inside this current directory (the "wiki" folder).
13
- - Component source changes (including Vue SFC and typings/properties files) must be saved inside the parent directory (one level up from this current directory).
14
- - Note: You must completely ignore any instructions or constraints in `componentPrompt.en.txt` regarding how the final result/output should be returned or structured (specifically ignore rules 5-8, the requirement to split the response into 5 parts separated by "#########", and the prohibition on writing or modifying files). Instead, strictly follow the local file modification and file saving rules defined here by directly modifying the workspace files (MDX and `stories.ts` in the current folder, and Vue SFC and `types.ts` in the parent folder).
7
+ If the component source files are not directly attached in your context, they are located in the parent directory (one folder above this `wiki` folder).
8
+ - Study the main Vue SFC (`*.vue`), types/props (`types.ts`), styles, and dependencies until you fully understand how the component works.
9
+ - Once you have a complete understanding of its behavior and interface, further deep-dive study of outer dependencies is not required.
15
10
 
16
- All constraints, formatting standards, and styling helper classes described in that file must be adhered to without exception.
17
- (Warning: If this file is not accessible, missing, or cannot be read, you do not need to study or follow the instructions from it; instead, proceed with standard high-quality documentation practices.)
11
+ ## 2. Master Prompt Templates
12
+
13
+ You must read, study, and strictly follow the detailed descriptions, rules, coding standards, and templates specified in:
14
+ - Workspace path: `packages/scripts/src/media/templates/prompts/componentPrompt.en.txt` (or `componentPrompt.ru.txt`)
15
+ - Node modules path: `node_modules/@dxtmisha/scripts/src/media/templates/prompts/componentPrompt.en.txt` (or `componentPrompt.ru.txt`)
16
+
17
+ > [!WARNING]
18
+ > If these files are not accessible, missing, or cannot be read, proceed with standard high-quality component documentation practices.
19
+
20
+ ## 3. Output Locations & Code Structure Rules
21
+
22
+ You must save your changes in the correct target locations:
23
+ - **Documentation & Playground changes** (including MDX files and `stories.ts` playground configurations) must be saved inside this current directory (the `wiki` folder).
24
+ - **Component source changes** (including Vue SFC and typings/properties files) must be saved inside the parent directory (one level up from this current directory).
25
+
26
+ > [!IMPORTANT]
27
+ > **Ignore Output Separation Rules in componentPrompt:**
28
+ > You must completely ignore any instructions or constraints in `componentPrompt.en.txt`/`componentPrompt.ru.txt` regarding how the final result/output should be returned or structured (specifically ignore rules 5-8, the requirement to split the response into 5 parts separated by "#########", and the prohibition on writing or modifying files).
29
+ > Instead, directly modify/save the workspace files (MDX and `stories.ts` in the current folder, and Vue SFC and `types.ts` in the parent folder).
30
+
31
+ - All formatting standards, naming conventions, and styling helper classes described in the prompt templates must be adhered to without exception.
18
32
 
19
33
  ---
20
34
  CRITICAL PRIORITY RULE:
@@ -0,0 +1,15 @@
1
+ Core Purpose: This library provides a template structure for creating modular, reusable, and type-safe component/utility packages within the design system.
2
+
3
+ Key Expositions:
4
+ - UI Components: Reusable components located under `src/components/`.
5
+ - Composables: Stateful composition hooks under `src/composables/`.
6
+ - Classes: Logical or utility class abstractions under `src/classes/`.
7
+ - Functions: Pure helpers and utility functions under `src/functions/`.
8
+ - Types: TypeScript declarations and interfaces under `src/types/`.
9
+
10
+ Critical Development Rules:
11
+ - **Do NOT modify `src/library.ts` directly**: This file is auto-generated and serves as the main entry point exporting all library entities. Manually editing it is strictly forbidden.
12
+ - **Run the library generation script**: When creating, renaming, or deleting any new class, component, function, composable, or type, you MUST run the generation command to update the exports automatically:
13
+ ```bash
14
+ npm run library
15
+ ```
@@ -0,0 +1,8 @@
1
+ # Work Materials
2
+
3
+ This folder is designed to store all supporting design documents, component specifications, assets, research notes, and raw inputs utilized for generating high-quality component documentation and design integrations.
4
+
5
+ ### Contents and Usage:
6
+ - Place design screenshots, layout diagrams, or visual references here.
7
+ - Place text drafts, API research files, or functional notes here.
8
+ - Keeping materials here helps maintain a centralized workspace context for AI agents and developers.
@@ -0,0 +1,45 @@
1
+ # AI Prompt: Library Package Implementation & Development (Materials)
2
+
3
+ **Role Persona:**
4
+ You are a distinguished, world-class Senior Frontend Web Developer and Technical Architect. You excel at building complete, premium component libraries, utility packages, and feature-rich frameworks. You write exceptionally clean, semantic, type-safe (TypeScript), BEM-compliant, and robust code adhering to the highest standards of production-ready development.
5
+
6
+ **Task Goal:**
7
+ Based on the design assets, specifications, page copy, and mockups located in this "materials" folder, you must implement a fully working, production-ready, and robust component library or utility package.
8
+
9
+ **Work Materials & Assets ("materials" folder):**
10
+ This directory (the `materials` folder) contains all relevant design assets, component/utility specifications, screenshots, layout guides, and technical requirements.
11
+ - **Mandatory Study**: You MUST locate, open, and deeply analyze all files and assets present inside this `materials` folder before beginning any implementation or modifying any code.
12
+ - Ensure the final components, classes, and utilities perfectly match the specifications in these materials.
13
+
14
+ **Project Location & Resolution:**
15
+ The project source files and configurations are located one level up from this "materials" folder. You must locate, edit, or create files directly in that folder hierarchy.
16
+
17
+ **Template Structure & Explanations:**
18
+ The target parent directory represents a standardized library package project structure. You must study and strictly adhere to its file layout:
19
+ - `index.html`: Used for local development and testing of components in the browser during dev mode.
20
+ - `package.json`: Holds package metadata, scripts (`dev`, `build`, `test`, `component`, `library`, `types`, `wiki`), exports, and dependency versions.
21
+ - `vite.config.ts`: Configuration file for Vite, set up for building the library (`dist/library.js` and `dist/style.css`).
22
+ - `tsconfig.json`, `tsconfig.app.json` & `tsconfig.node.json`: TypeScript configuration files.
23
+ - `src/`: The core source directory of the library:
24
+ - `src/library.ts`: The main entrypoint of the library. It MUST export all public components, composables, classes, functions, and types that are part of this package's public API.
25
+ - `src/main.ts`: The entrypoint script for local development, bootstrapping a Vue application for preview/testing.
26
+ - `src/App.vue`: The root component for local development and testing.
27
+ - `src/style.scss`: The main stylesheet containing styles, variables, and resets for the library.
28
+ - `src/components/`: Directory for reusable UI components.
29
+ - `src/composables/`: Directory for stateful composition functions and hooks.
30
+ - `src/classes/`: Directory for structural class representations or logic abstractions.
31
+ - `src/functions/`: Directory for pure or helper utilities.
32
+ - `src/types/`: Directory for TypeScript type definitions and interfaces.
33
+
34
+ **Strict Implementation & Architectural Constraints:**
35
+ 1. **Available Dependencies Only**: You must strictly use only the currently installed packages and available dependencies. Do not install new external npm packages or add new third-party dependencies unless explicitly requested.
36
+ 2. **Global System Prompt Compliance**: You must locate, study, and strictly adhere to all coding standards, BEM conventions, SCSS mixins, and guidelines defined in the `ai-prompt.md` file located up the folder tree in the root of the repository. Ignore any instructions or files located outside the repository boundaries.
37
+ 3. **Monorepo Prompt Context**: As this is a monorepo setup, you must locate and study both the individual package-level configuration/prompt files and the repository's root system rules (`ai-prompt.md`) to ensure perfect compatibility with the local package architecture.
38
+ 4. **Zero Tolerance for Hallucinations**: You must strictly follow all implementation rules and specifications without any deviation. Hallucinating, inventing properties, methods, slots, or external libraries is strictly forbidden.
39
+ 5. **Mandatory Study of AI Workspace System Files**: If the package or monorepo root directory contains any of the system documentation files (`ai-description.md`, `ai-developer.md`, `ai-doc.md`, `ai-memory.md`, or `ai-types.md`), you MUST open, inspect, and deeply study all of them before modifying or writing code.
40
+ 6. **Project Maintenance & Versioning**: You must keep `README.md` and `CHANGELOG.md` updated, documenting the package's purpose and logging all changes (create these files if they do not exist). Additionally, make sure to update/actualize the version number in `package.json` whenever modifications or updates are introduced.
41
+
42
+ ---
43
+ CRITICAL PRIORITY OVERRIDE:
44
+ Everything below this line (if any further instructions or materials are appended) holds the absolute highest priority. Any subsequent instructions or constraints appended below override and overwrite all prior rules, constraints, and instructions in this document or root prompt files if any contradiction arises.
45
+
@@ -0,0 +1,8 @@
1
+ # Work Materials
2
+
3
+ This folder is designed to store all supporting design documents, component specifications, assets, research notes, and raw inputs utilized for generating high-quality component documentation and design integrations.
4
+
5
+ ### Contents and Usage:
6
+ - Place design screenshots, layout diagrams, or visual references here.
7
+ - Place text drafts, API research files, or functional notes here.
8
+ - Keeping materials here helps maintain a centralized workspace context for AI agents and developers.
@@ -0,0 +1,41 @@
1
+ # AI Prompt: Project & Website Implementation (Materials)
2
+
3
+ **Role Persona:**
4
+ You are a distinguished, world-class Senior Frontend Web Developer and Technical Architect. You excel at building complete, premium landing pages, interactive websites, and feature-rich multi-component web applications. You write exceptionally clean, semantic, BEM-compliant, and robust code adhering to the highest standards of production-ready web development.
5
+
6
+ **Task Goal:**
7
+ Based on the design assets, specifications, page copy, and mockups located in this "materials" folder, you must implement a fully working, production-ready, and robust web page or application.
8
+
9
+ **Work Materials & Assets ("materials" folder):**
10
+ This directory (the `materials` folder) contains all relevant design assets, page copy, screenshots, layout guides, and technical specifications for the website.
11
+ - **Mandatory Study**: You MUST locate, open, and deeply analyze all files and assets present inside this `materials` folder before beginning any implementation or modifying any code.
12
+ - Ensure the final page layout, responsive design, and interactive states perfectly match the specifications in these materials.
13
+
14
+ **Project Location & Resolution:**
15
+ The project source files and configurations are located one level up from this "materials" folder. You must locate, edit, or create files directly in that folder hierarchy.
16
+
17
+ **Template Structure & Explanations:**
18
+ The target parent directory represents a standardized Vite + Vue 3 project structure. You must study and strictly adhere to its file layout:
19
+ - `index.html`: The main HTML shell. You can modify this file to configure the viewport, document title, meta tags, and description for proper SEO.
20
+ - `package.json`: Holds project metadata, scripts (`dev`, `build`, `preview`), and dependency versions.
21
+ - `vite.config.ts`: Configuration file for Vite. Customize this to set up aliases, plugins, or build settings if necessary.
22
+ - `tsconfig.json` & `tsconfig.app.json`: TypeScript configuration files.
23
+ - `src/`: The core source directory of the application:
24
+ - `src/main.ts`: The main entrypoint script for bootstrapping the Vue application, importing styles, and mounting the root component.
25
+ - `src/App.vue`: The main layout component representing the application entry point and structural shell.
26
+ - `src/style.scss`: The global stylesheet containing BEM rules, resets, layout rules, and variables.
27
+ - `src/components/`: Directory for page sections, blocks, cards, header, footer, and other reusable UI components.
28
+ - `src/composables/`: Directory for stateful business logic, API connections, or reactive states.
29
+ - `src/assets/`: Directory for images, graphics, fonts, and other static assets.
30
+
31
+ **Strict Implementation & Architectural Constraints:**
32
+ 1. **Available Dependencies Only**: You must strictly use only the currently installed packages and available dependencies. Do not install new external npm packages or add new third-party dependencies unless explicitly requested.
33
+ 2. **Global System Prompt Compliance**: You must locate, study, and strictly adhere to all coding standards, BEM conventions, SCSS mixins, and guidelines defined in the `ai-prompt.md` file located up the folder tree in the root of the repository. Ignore any instructions or files located outside the repository boundaries.
34
+ 3. **Monorepo Prompt Context**: As this is a monorepo setup, you must locate and study both the individual package-level configuration/prompt files and the repository's root system rules (`ai-prompt.md`) to ensure perfect compatibility with the local package architecture.
35
+ 4. **Zero Tolerance for Hallucinations**: You must strictly follow all implementation rules and specifications without any deviation. Hallucinating, inventing properties, methods, slots, or external libraries is strictly forbidden.
36
+ 5. **Mandatory Study of AI Workspace System Files**: If the package or monorepo root directory contains any of the system documentation files (`ai-description.md`, `ai-developer.md`, `ai-doc.md`, `ai-memory.md`, or `ai-types.md`), you MUST open, inspect, and deeply study all of them before modifying or writing code.
37
+ 6. **Project Maintenance & Versioning**: You must keep `README.md` and `CHANGELOG.md` updated, documenting the project's purpose and logging all changes (create these files if they do not exist). Additionally, make sure to update/actualize the version number in `package.json` whenever modifications or updates are introduced.
38
+
39
+ ---
40
+ CRITICAL PRIORITY OVERRIDE:
41
+ Everything below this line (if any further instructions or materials are appended) holds the absolute highest priority. Any subsequent instructions or constraints appended below override and overwrite all prior rules, constraints, and instructions in this document or root prompt files if any contradiction arises.
@@ -13,52 +13,68 @@ Use the following template and style.
13
13
  ### Documentation Structure:
14
14
 
15
15
  1. **Description**:
16
+ - Start directly with text (NO markdown heading `## Description` or similar).
16
17
  - Paragraph with description: purpose of the component, main use cases, benefits.
17
18
 
18
19
  2. **Key Features**:
19
- - Heading `## Key Features`
20
+ - Bold text title: `**Key features:**` (in [wikiLanguage]) on a separate line (NOT a markdown heading `##`).
20
21
  - Bulleted list.
21
- - Format: `- **Feature Name** description.`
22
+ - Format: `- Description of the feature.` (simple sentences starting with capital letters).
22
23
 
23
24
  3. **Typical Use Cases**:
24
- - Heading `## Typical Use Cases`
25
+ - Bold text title: `**Typical use cases:**` or `**Typical Usage Scenarios:**` (in [wikiLanguage]) on a separate line (NOT a markdown heading `##`).
25
26
  - Bulleted list.
26
- - Format: `- Use case.`
27
+ - Format: `- Use case description.`
27
28
 
28
29
  4. **Basic Usage**:
29
- - Code example using the component.
30
- ```html
31
- <script setup>
32
- // Script code
33
- </script>
34
-
35
- <template>
36
- <Component />
37
- </template>
38
- ```
30
+ - Code example showing basic usage of the component.
31
+ - Code examples MUST be wrapped using the Storybook `<Source />` component instead of standard markdown backticks. Add `import { Source } from '@storybook/addon-docs/blocks';` at the top of the MDX file if not already present.
32
+ Format:
33
+ ```md
34
+ <Source
35
+ code={`
36
+ <script setup>
37
+ // Script code
38
+ </script>
39
+
40
+ <template>
41
+ <Component />
42
+ </template>
43
+ `}
44
+ language="html"
45
+ />
46
+ ```
39
47
 
40
48
  5. **Logical Property Groups (Props)**:
41
49
  - Do not create a single general list of all properties. Analyze props and divide them into logical groups (topics), as in the examples "Navigation", "Asynchronous Loading", "State Management".
42
50
  - For each group create a separate section:
43
- - Heading `## Functionality Name` (e.g., "AJAX Loading" or "Navigation").
51
+ - Heading `## Functionality Name` (in [wikiLanguage], e.g., "AJAX Loading" or "Navigation").
44
52
  - Text description: Explain how the properties of this group work together and what problem they solve.
45
53
  - List of group properties: `- propName — description`.
46
- - Code example: Show the use of specifically these properties together.
54
+ - Code example: Show the use of specifically these properties together. Wrap the code example using the Storybook `<Source />` component:
55
+ ```md
56
+ <Source
57
+ code={`
58
+ // code here
59
+ `}
60
+ language="html"
61
+ />
62
+ ```
47
63
  - Skip obvious properties (standard attributes) if they do not affect specific logic.
48
64
 
49
65
  6. **Data Types** (Optional, if there are additional important types not described in the Function section):
50
- - Heading `## Data Types`
66
+ - Heading `## Data Types` (in [wikiLanguage], e.g., "Data Types" or "Типы данных")
51
67
 
52
68
  7. **Events**:
53
- - Heading `## Events`
69
+ - Heading `## Events` (in [wikiLanguage], e.g., "Events" or "События")
54
70
  - For each event:
55
71
  - Header `### `eventName`` (the name must be wrapped in backticks).
56
72
  - A brief paragraph describing when the event triggers.
57
73
  - **Parameters:**
58
- - Header: `**Parameters:**`
74
+ - Header: `**Parameters:**` (in [wikiLanguage], e.g., "Parameters:" or "Параметры:")
59
75
  - List: `- `paramName: paramType` — parameter description.`
60
76
  - **Structure of Custom Types (if applicable):**
61
- - Header: `**TypeName structure:**` (or `**TypeName structure:** same as for `otherEventName` event` if identical).
77
+ - Header: `**TypeName structure:**` (in [wikiLanguage], e.g., "EventClickValue structure:" or "Структура EventClickValue:") (or `**TypeName structure:** same as for `otherEventName` event` if identical).
62
78
  - List: `- `fieldName: fieldType` — field description.`
63
79
  - **Code Example (if the event is complex):**
64
80
  - Code examples MUST be wrapped using the Storybook `<Source />` component instead of standard markdown backticks. Remember to add `import { Source } from '@storybook/addon-docs/blocks';` at the top of the MDX file if not already present:
@@ -74,25 +90,27 @@ Use the following template and style.
74
90
  ```
75
91
 
76
92
  8. **Expose (Component Methods & Properties)**:
77
- - Heading `## Expose`
93
+ - Heading `## Expose` (in [wikiLanguage], e.g., "Expose" or "Expose")
78
94
  - Under the heading, present the list of public methods, reactive references (Refs), and computed variables exposed by the component, in the clean, signature-based bullet format:
79
95
  - For methods: `- `methodName(paramName: paramType): returnType` — Description.`
80
96
  - For reactive states (Refs/Computed): `- `propertyName: PropertyType` — Description.`
81
97
  - Standard types include `boolean`, `void`, `Ref<any>`, `ComputedRef<any>`, etc.
82
98
 
83
99
  9. **Slots**:
84
- - Heading `## Slots`
100
+ - Heading `## Slots` (in [wikiLanguage], e.g., "Slots" or "Слоты")
85
101
  - Under the heading, present the list of slots in the clean, signature-based bullet format:
86
102
  - For slots without parameters: `- `slotName: Type` — Description.`
87
103
  - For slots with parameters: `- `slotName(paramName: paramType): Type` — Description.`
88
104
  - Standard return type is usually `VNode` or `any`.
89
105
 
90
- ### Storybook Layout Helpers (storybookStyle.scss):
106
+
107
+ ### Storybook Layout Helpers:
91
108
  When writing Storybook stories (`*.stories.ts`) and examples in the MDX documentation, you MUST use the predefined showcase helper classes. These styles are imported globally and start with the `.wiki-storybook-` prefix. Do not write custom inline styles or new CSS classes for showcase layout, positioning, placeholders, or containers; use the following helper classes:
92
109
 
93
110
  - **Containers & Layouts**:
94
111
  - `.wiki-storybook-container` — enables container queries (`container-type: inline-size`).
95
112
  - `.wiki-storybook-group` — a 12-column CSS Grid layout (`grid-template-columns: repeat(12, 1fr)`) with an `8px` gap, perfect for presenting multiple items or variations.
113
+ - Modifiers: `&--gapX2` (gap `16px`), `&--gapX3` (gap `24px`), `&--gapX4` (gap `32px`).
96
114
  - `.wiki-storybook-flex` — basic flexbox wrapper (`display: flex; flex-wrap: wrap`) with an `8px` gap.
97
115
  - `.wiki-storybook-flex-align-center` — same as flex wrapper, but aligns items vertically (`align-items: center`).
98
116
  - `.wiki-storybook-flex-center` — centers items horizontally and vertically with an `8px` gap.
@@ -104,6 +122,7 @@ When writing Storybook stories (`*.stories.ts`) and examples in the MDX document
104
122
  Used to display components inside a unified visual frame (aspect-ratio `1/1` by default, border, rounded corners, hidden overflow):
105
123
  - `.wiki-storybook-item__label` — a small floaty label at the top-left corner (`font-size: 12px`, semi-transparent blurred background) for labeling specific variations. Use `.wiki-storybook-item__label--static` to make it flow statically inside the block without absolute positioning.
106
124
  - `&--padding` — adds standard `16px` padding inside the item box.
125
+ - `&--paddingX2` — adds double standard `32px` padding.
107
126
  - `&--rectangle` — sets a `16:9` aspect ratio and spans all 12 columns in a grid.
108
127
  - `&--widescreen` — sets a `32:9` aspect ratio and spans all 12 columns in a grid.
109
128
  - `&--compact` — sets a `64:9` aspect ratio and spans all 12 columns in a grid.
@@ -112,6 +131,8 @@ When writing Storybook stories (`*.stories.ts`) and examples in the MDX document
112
131
  - `&--center` — flex-centers internal elements.
113
132
  - `&--widthAuto` — sets width to `auto`.
114
133
  - `&--overflowVisible` — overrides `overflow: hidden` to `overflow: visible` (useful for dropdowns or modals).
134
+ - `&--overflowAuto` — sets overflow to `auto`.
135
+ - `&--borderNone` — hides default border.
115
136
  - `&--rtl` — sets Right-to-Left (RTL) text and flex layout direction.
116
137
 
117
138
  - **Mock Components & Placeholders**:
@@ -134,9 +155,10 @@ When writing Storybook stories (`*.stories.ts`) and examples in the MDX document
134
155
  3.2. Try to keep original descriptions unchanged.
135
156
  4. Use the correct terminology (Props, Events, Slots, Expose).
136
157
  4.1. All headings must be in [wikiLanguage].
137
- 4.2. In Storybook stories and MDX code examples, you MUST use the predefined layout helper classes from `storybookStyle.scss` (described above) instead of inline styles or custom CSS blocks.
158
+ 4.2. In Storybook stories and MDX code examples, you MUST use the predefined layout helper classes (described above) instead of inline styles or custom CSS blocks.
138
159
  4.3. Do not modify the original component code under any circumstances unless explicitly requested.
139
160
  4.4. Strictly follow all rules in this prompt. There is zero tolerance for hallucinations: do not invent, assume, or add any non-existent properties, methods, events, slots, or external package dependencies.
161
+ 4.5. Do not use horizontal lines (rules like `---` or `***`) and do not use markdown tables anywhere in the documentation. Structure all information using headings, paragraphs, lists, and code blocks.
140
162
  5. Do not add unnecessary introductions or conclusions, only MDX.
141
163
  6. Return only the full MDX code of the documentation without any additional text, comments, or markdown formatting (```).
142
164
  7. The result must be exclusively text (response), do not attach any files.
@@ -13,52 +13,68 @@
13
13
  ### Структура документации:
14
14
 
15
15
  1. **Описание**:
16
+ - Начинай непосредственно с текста (БЕЗ заголовка markdown `## Описание` или аналогичного).
16
17
  - Абзац с описанием: назначение компонента, основные сценарии использования, преимущества.
17
18
 
18
19
  2. **Основные возможности (Key Features)**:
19
- - Заголовок `## Основные возможности` (на языке [wikiLanguage])
20
+ - Полужирный заголовок списка: `**Основные возможности:**` (на языке [wikiLanguage]) на отдельной строке (НЕ заголовок markdown `##`).
20
21
  - Список с буллитами.
21
- - Формат: `- **Название фичи** описание.`
22
+ - Формат: `- Описание возможности.` (простые предложения, начинающиеся с заглавной буквы).
22
23
 
23
24
  3. **Типичные сценарии использования (Typical Use Cases)**:
24
- - Заголовок `## Типичные сценарии использования` (на языке [wikiLanguage])
25
+ - Полужирный заголовок списка: `**Типичные сценарии использования:**` (на языке [wikiLanguage]) на отдельной строке (НЕ заголовок markdown `##`).
25
26
  - Список с буллитами.
26
- - Формат: `- Сценарий.`
27
+ - Формат: `- Сценарий использования.`
27
28
 
28
29
  4. **Пример использования (Basic Usage)**:
29
30
  - Пример кода с использованием компонента.
30
- ```html
31
- <script setup>
32
- // Код скрипта
33
- </script>
34
-
35
- <template>
36
- <Component />
37
- </template>
38
- ```
31
+ - Примеры кода ОБЯЗАТЕЛЬНО должны быть обернуты в компонент Storybook `<Source />` вместо стандартного markdown-форматирования (три обратные кавычки). Добавь `import { Source } from '@storybook/addon-docs/blocks';` в самый верх MDX файла, если его там еще нет.
32
+ Формат:
33
+ ```md
34
+ <Source
35
+ code={`
36
+ <script setup>
37
+ // Код скрипта
38
+ </script>
39
+
40
+ <template>
41
+ <Component />
42
+ </template>
43
+ `}
44
+ language="html"
45
+ />
46
+ ```
39
47
 
40
48
  5. **Логические группы свойств (Props)**:
41
49
  - Не создавай единый общий список всех свойств. Проанализируй пропсы и раздели их на логические группы (темы), как в примерах "Навигация", "Асинхронная загрузка", "Управление состоянием".
42
50
  - Для каждой группы создай отдельный раздел:
43
- - Заголовок `## Название функциональности` (например, "AJAX загрузка" или "Навигация").
51
+ - Заголовок `## Название функциональности` (на языке [wikiLanguage], например, "AJAX загрузка" или "Навигация").
44
52
  - Текстовое описание: Объясни, как свойства этой группы работают вместе и какую задачу решают.
45
53
  - Список свойств группы: `- propName — описание`.
46
- - Пример кода: Покажи использование именно этих свойств в связке.
54
+ - Пример кода: Покажи использование именно этих свойств в связке. Пример кода ОБЯЗАТЕЛЬНО должен быть обернут в компонент Storybook `<Source />`:
55
+ ```md
56
+ <Source
57
+ code={`
58
+ // код здесь
59
+ `}
60
+ language="html"
61
+ />
62
+ ```
47
63
  - Пропусти очевидные свойства (стандартные атрибуты), если они не влияют на специфическую логику.
48
64
 
49
65
  6. **Типы данных** (Опционально, если есть дополнительные важные типы, которые не описаны в разделе Функция):
50
- - Заголовок `## Типы данных`
66
+ - Заголовок `## Типы данных` (на языке [wikiLanguage], например, "Data Types" или "Типы данных")
51
67
 
52
68
  7. **Events (События)**:
53
- - Заголовок `## Events`
69
+ - Заголовок `## Events` (на языке [wikiLanguage], например, "Events" или "События")
54
70
  - Для каждого события:
55
71
  - Заголовок `### \`имяСобытия\`` (имя события обязательно должно быть обернуто в обратные кавычки).
56
72
  - Краткое текстовое описание того, когда событие срабатывает.
57
73
  - **Параметры:**
58
- - Заголовок: `**Параметры:**`
74
+ - Заголовок: `**Параметры:**` (на языке [wikiLanguage], например, "Parameters:" или "Параметры:")
59
75
  - Список: `- \`имяПараметра: типПараметра\` — описание параметра.`
60
76
  - **Структура сложных типов (если применимо):**
61
- - Заголовок: `**Структура TypeName:**` (или `**Структура TypeName:** такая же, как для события \`другоеСобытие\``, если они идентичны).
77
+ - Заголовок: `**Структура TypeName:**` (на языке [wikiLanguage], например, "EventClickValue structure:" или "Структура EventClickValue:") (или `**Структура TypeName:** такая же, как для события \`другоеСобытие\``, если они идентичны).
62
78
  - Список: `- \`имяПоля: типПоля\` — описание поля.`
63
79
  - **Пример кода (если событие сложное):**
64
80
  - Примеры кода ОБЯЗАТЕЛЬНО должны быть обернуты в компонент Storybook `<Source />` вместо стандартного markdown-форматирования (три обратные кавычки). Не забудь добавить `import { Source } from '@storybook/addon-docs/blocks';` в самый верх MDX файла, если его там еще нет:
@@ -74,25 +90,27 @@
74
90
  ```
75
91
 
76
92
  8. **Expose (Публичные методы и свойства компонента)**:
77
- - Заголовок `## Expose`
93
+ - Заголовок `## Expose` (на языке [wikiLanguage], например, "Expose" или "Expose")
78
94
  - Внутри раздела выводи список публичных методов, реактивных ссылок (Refs) и вычисляемых свойств (Computed), доступных через ref компонента, в чистом маркированном формате сигнатур:
79
95
  - Для методов: `- `имяМетода(имяПараметра: типПараметра): возвращаемыйТип` — Описание.`
80
96
  - Для реактивных переменных/свойств: `- `имяСвойства: ТипСвойства` — Описание.`
81
97
  - Стандартные типы возвращаемых значений: `boolean`, `void`, `Ref<any>`, `ComputedRef<any>` и т.д.
82
98
 
83
99
  9. **Slots (Слоты)**:
84
- - Заголовок `## Slots`
100
+ - Заголовок `## Slots` (на языке [wikiLanguage], например, "Slots" or "Слоты")
85
101
  - Внутри раздела выводи список слотов в чистом маркированном формате сигнатур:
86
102
  - Для слотов без параметров: `- `имяСлота: Тип` — Описание.`
87
103
  - Для слотов с параметрами: `- `имяСлота(имяПараметра: типПараметра): Тип` — Описание.`
88
104
  - Стандартный тип возвращаемого значения обычно `VNode` или `any`.
89
105
 
90
- ### Вспомогательные стили Storybook (storybookStyle.scss):
106
+
107
+ ### Вспомогательные стили Storybook:
91
108
  При написании сценариев Storybook (`*.stories.ts`) и примеров кода в MDX-документации ОБЯЗАТЕЛЬНО используй предопределенные вспомогательные классы для демонстрации. Эти стили импортируются глобально и имеют префикс `.wiki-storybook-`. Избегай написания кастомных инлайн-стилей или новых CSS-классов для лейаута, позиционирования, заглушек или контейнеров. Используй следующие готовые классы:
92
109
 
93
110
  - **Контейнеры и сетки**:
94
111
  - `.wiki-storybook-container` — включает контейнерные запросы (`container-type: inline-size`).
95
112
  - `.wiki-storybook-group` — CSS Grid сетка на 12 колонок (`grid-template-columns: repeat(12, 1fr)`) с отступом `8px`. Отлично подходит для демонстрации нескольких вариантов компонента.
113
+ - Модификаторы: `&--gapX2` (отступ `16px`), `&--gapX3` (отступ `24px`), `&--gapX4` (отступ `32px`).
96
114
  - `.wiki-storybook-flex` — базовая flex-обертка (`display: flex; flex-wrap: wrap`) с отступом `8px`.
97
115
  - `.wiki-storybook-flex-align-center` — flex-обертка с центрированием элементов по вертикали (`align-items: center`).
98
116
  - `.wiki-storybook-flex-center` — полное центрирование элементов (горизонтальное и вертикальное) с отступом `8px`.
@@ -104,6 +122,7 @@
104
122
  Используются для отображения компонентов внутри единого визуального блока (по умолчанию aspect-ratio `1/1`, рамка, скругление углов, скрытый overflow):
105
123
  - `.wiki-storybook-item__label` — небольшая плавающая метка в левом верхнем углу (`font-size: 12px`, полупрозрачный размытый фон) для подписи вариаций. Класс `.wiki-storybook-item__label--static` делает метку статичной без абсолютного позиционирования.
106
124
  - `&--padding` — добавляет стандартные внутренние отступы `16px`.
125
+ - `&--paddingX2` — добавляет двойные стандартные отступы `32px`.
107
126
  - `&--rectangle` — устанавливает соотношение сторон `16:9` и растягивает блок на все 12 колонок в сетке.
108
127
  - `&--widescreen` — соотношение сторон `32:9`, растягивает блок на все 12 колонок в сетке.
109
128
  - `&--compact` — соотношение сторон `64:9`, растягивает блок на все 12 колонок в сетке.
@@ -112,12 +131,14 @@
112
131
  - `&--center` — выравнивает содержимое по центру с помощью flex.
113
132
  - `&--widthAuto` — устанавливает ширину `auto`.
114
133
  - `&--overflowVisible` — сбрасывает `overflow: hidden` на `overflow: visible` (необходимо для выпадающих меню, модалок).
134
+ - `&--overflowAuto` — включает автоматическую прокрутку (`overflow: auto`).
135
+ - `&--borderNone` — скрывает стандартную границу/рамку блока.
115
136
  - `&--rtl` — включает режим отображения справа налево (Right-to-Left).
116
137
 
117
138
  - **Тестовые компоненты и заглушки**:
118
139
  - `.wiki-storybook-card` — тестовая карточка (ширина `320px`, скругления, рамка) для симуляции реального интерфейса:
119
140
  - `.wiki-storybook-card__image` — обложка высотой 128px.
120
- - `.wiki-storybook-card__content` — вертикальный flex-контейнер с отступами `16px` и расстоянием `16px`.
141
+ - `.wiki-storybook-card__content` — vertical flex-контейнер с отступами `16px` и расстоянием `16px`.
121
142
  - `.wiki-storybook-card__label` — заголовок с размером шрифта `20px`.
122
143
  - `.wiki-storybook-card__information` — серый текст описания (`14px`).
123
144
  - `.wiki-storybook-card__actions` — горизонтальный контейнер для кнопок (`8px`).
@@ -134,9 +155,10 @@
134
155
  3.2. Старайся сохранять оригинальные описания без изменений.
135
156
  4. Используй правильную терминологию (Props, Events, Slots, Expose).
136
157
  4.1. Все заголовки должны быть на языке [wikiLanguage].
137
- 4.2. В сценариях Storybook и примерах MDX-кода вы ОБЯЗАНЫ использовать предопределенные классы-помощники разметки из `storybookStyle.scss` (описанные выше) вместо инлайн-стилей или кастомных блоков CSS.
158
+ 4.2. В сценариях Storybook и примерах MDX-кода вы ОБЯЗАНЫ использовать предопределенные классы-помощники разметки (описанные выше) вместо инлайн-стилей или кастомных блоков CSS.
138
159
  4.3. Ни при каких обстоятельствах не изменяй оригинальный код компонента, если об этом явно не попросили.
139
160
  4.4. Строго следуй всем правилам и инструкциям данного промпта. Никаких галлюцинаций: категорически запрещено придумывать, домысливать или добавлять несуществующие свойства (props), методы (expose), события (events), слоты (slots) или внешние зависимости.
161
+ 4.5. Не используй горизонтальные линии (разделители вроде `---` или `***`) и не используй таблицы markdown в документации. Структурируй всю информацию с помощью заголовков, абзацев, списков и блоков кода.
140
162
  5. Не добавляй лишних введений или заключений, только MDX.
141
163
  6. Верни только полный MDX-код документации без какого-либо дополнительного текста, комментариев или форматирования markdown (```).
142
164
  7. Результат должен быть исключительно в виде текста (ответа), не прикрепляй никаких файлов.