chore: добавить frontend правила и шаблоны SLM

- добавлены frontend инструкции AGENTS и локальный style guide
- актуализированы SLM templates под Vite React и слой infra
- добавлены шаблоны component, infra и factory-based business
- нормализованы примеры документации под alias infra
This commit is contained in:
2026-05-05 14:05:43 +03:00
parent 56d551b43b
commit 2c88cc3eca
88 changed files with 5768 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
export { {{name.pascalCase}}Layout } from './{{name.kebabCase}}.layout'
export type { {{name.pascalCase}}LayoutProps } from './types/{{name.kebabCase}}.type'

View File

@@ -0,0 +1,2 @@
.root {
}

View File

@@ -0,0 +1,14 @@
import type { ComponentPropsWithoutRef, ReactNode } from 'react'
/**
* Параметры {{name.pascalCase}}Layout.
*/
export type {{name.pascalCase}}LayoutParams = {
/** Содержимое layout. */
children?: ReactNode
}
/** Атрибуты корневого элемента без children. */
type RootAttrs = Omit<ComponentPropsWithoutRef<'div'>, 'children'>
export type {{name.pascalCase}}LayoutProps = RootAttrs & {{name.pascalCase}}LayoutParams

View File

@@ -0,0 +1,20 @@
import cl from 'clsx'
import type { {{name.pascalCase}}LayoutProps } from './types/{{name.kebabCase}}.type'
import styles from './styles/{{name.kebabCase}}.module.css'
/**
* <Назначение layout {{name.pascalCase}} в 1 строке>.
*
* Используется для:
* - <сценарий 1>
* - <сценарий 2>
*/
export const {{name.pascalCase}}Layout = (props: {{name.pascalCase}}LayoutProps) => {
const { children, className, ...rootAttrs } = props
return (
<div {...rootAttrs} className={cl(styles.root, className)}>
{children}
</div>
)
}