feat: Добавлен слой entities с типами для событий, установлены библиотеки gsap и swiper
This commit is contained in:
12
package.json
12
package.json
@@ -17,15 +17,17 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"gsap": "^3.13.0",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0"
|
"react-dom": "^19.0.0",
|
||||||
|
"swiper": "^12.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.26.0",
|
"@babel/core": "^7.26.0",
|
||||||
"husky": "^9.1.0",
|
|
||||||
"@babel/preset-env": "^7.26.0",
|
"@babel/preset-env": "^7.26.0",
|
||||||
"@babel/preset-react": "^7.26.0",
|
"@babel/preset-react": "^7.26.0",
|
||||||
"@babel/preset-typescript": "^7.26.0",
|
"@babel/preset-typescript": "^7.26.0",
|
||||||
|
"@eslint/js": "^9.15.0",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
||||||
"@svgr/webpack": "^8.1.0",
|
"@svgr/webpack": "^8.1.0",
|
||||||
"@types/node": "^22.0.0",
|
"@types/node": "^22.0.0",
|
||||||
@@ -46,11 +48,10 @@
|
|||||||
"eslint-plugin-prettier": "^5.2.0",
|
"eslint-plugin-prettier": "^5.2.0",
|
||||||
"eslint-plugin-react": "^7.37.0",
|
"eslint-plugin-react": "^7.37.0",
|
||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
"@eslint/js": "^9.15.0",
|
|
||||||
"typescript-eslint": "^8.16.0",
|
|
||||||
"globals": "^15.12.0",
|
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
|
"globals": "^15.12.0",
|
||||||
"html-webpack-plugin": "^5.6.0",
|
"html-webpack-plugin": "^5.6.0",
|
||||||
|
"husky": "^9.1.0",
|
||||||
"mini-css-extract-plugin": "^2.9.0",
|
"mini-css-extract-plugin": "^2.9.0",
|
||||||
"prettier": "^3.4.0",
|
"prettier": "^3.4.0",
|
||||||
"react-refresh": "^0.14.2",
|
"react-refresh": "^0.14.2",
|
||||||
@@ -64,6 +65,7 @@
|
|||||||
"ts-loader": "^9.5.0",
|
"ts-loader": "^9.5.0",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.7.0",
|
"typescript": "^5.7.0",
|
||||||
|
"typescript-eslint": "^8.16.0",
|
||||||
"webpack": "^5.96.0",
|
"webpack": "^5.96.0",
|
||||||
"webpack-bundle-analyzer": "^4.10.0",
|
"webpack-bundle-analyzer": "^4.10.0",
|
||||||
"webpack-cli": "^5.1.0",
|
"webpack-cli": "^5.1.0",
|
||||||
|
|||||||
17
pnpm-lock.yaml
generated
17
pnpm-lock.yaml
generated
@@ -8,12 +8,18 @@ importers:
|
|||||||
|
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
gsap:
|
||||||
|
specifier: ^3.13.0
|
||||||
|
version: 3.13.0
|
||||||
react:
|
react:
|
||||||
specifier: ^19.0.0
|
specifier: ^19.0.0
|
||||||
version: 19.2.0
|
version: 19.2.0
|
||||||
react-dom:
|
react-dom:
|
||||||
specifier: ^19.0.0
|
specifier: ^19.0.0
|
||||||
version: 19.2.0(react@19.2.0)
|
version: 19.2.0(react@19.2.0)
|
||||||
|
swiper:
|
||||||
|
specifier: ^12.0.3
|
||||||
|
version: 12.0.3
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@babel/core':
|
'@babel/core':
|
||||||
specifier: ^7.26.0
|
specifier: ^7.26.0
|
||||||
@@ -2464,6 +2470,9 @@ packages:
|
|||||||
graphemer@1.4.0:
|
graphemer@1.4.0:
|
||||||
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
|
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
|
||||||
|
|
||||||
|
gsap@3.13.0:
|
||||||
|
resolution: {integrity: sha512-QL7MJ2WMjm1PHWsoFrAQH/J8wUeqZvMtHO58qdekHpCfhvhSL4gSiz6vJf5EeMP0LOn3ZCprL2ki/gjED8ghVw==}
|
||||||
|
|
||||||
gzip-size@6.0.0:
|
gzip-size@6.0.0:
|
||||||
resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==}
|
resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
@@ -3775,6 +3784,10 @@ packages:
|
|||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
swiper@12.0.3:
|
||||||
|
resolution: {integrity: sha512-BHd6U1VPEIksrXlyXjMmRWO0onmdNPaTAFduzqR3pgjvi7KfmUCAm/0cj49u2D7B0zNjMw02TSeXfinC1hDCXg==}
|
||||||
|
engines: {node: '>= 4.7.0'}
|
||||||
|
|
||||||
synckit@0.11.11:
|
synckit@0.11.11:
|
||||||
resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==}
|
resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==}
|
||||||
engines: {node: ^14.18.0 || >=16.0.0}
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
@@ -6818,6 +6831,8 @@ snapshots:
|
|||||||
|
|
||||||
graphemer@1.4.0: {}
|
graphemer@1.4.0: {}
|
||||||
|
|
||||||
|
gsap@3.13.0: {}
|
||||||
|
|
||||||
gzip-size@6.0.0:
|
gzip-size@6.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
duplexer: 0.1.2
|
duplexer: 0.1.2
|
||||||
@@ -8186,6 +8201,8 @@ snapshots:
|
|||||||
csso: 5.0.5
|
csso: 5.0.5
|
||||||
picocolors: 1.1.1
|
picocolors: 1.1.1
|
||||||
|
|
||||||
|
swiper@12.0.3: {}
|
||||||
|
|
||||||
synckit@0.11.11:
|
synckit@0.11.11:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@pkgr/core': 0.2.9
|
'@pkgr/core': 0.2.9
|
||||||
|
|||||||
7
src/entities/TimePeriod/index.ts
Normal file
7
src/entities/TimePeriod/index.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* Entity: TimePeriod
|
||||||
|
* Public API
|
||||||
|
*/
|
||||||
|
|
||||||
|
export { HISTORICAL_PERIODS } from './model/mockData'
|
||||||
|
export type { TimePeriod, HistoricalEvent } from './model/types'
|
||||||
80
src/entities/TimePeriod/model/mockData.ts
Normal file
80
src/entities/TimePeriod/model/mockData.ts
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/**
|
||||||
|
* Entity: TimePeriod
|
||||||
|
* Мок-данные исторических периодов
|
||||||
|
*/
|
||||||
|
|
||||||
|
import type { TimePeriod } from './types'
|
||||||
|
|
||||||
|
export const HISTORICAL_PERIODS: readonly TimePeriod[] = [
|
||||||
|
{
|
||||||
|
yearFrom: 1980,
|
||||||
|
yearTo: 1986,
|
||||||
|
label: 'Science',
|
||||||
|
events: [
|
||||||
|
{
|
||||||
|
year: 1980,
|
||||||
|
description: 'The first detection of gravitational waves.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 1982,
|
||||||
|
description: 'New Horizons probe performs flyby of Pluto.',
|
||||||
|
},
|
||||||
|
{ year: 1984, description: 'SpaceX lands Falcon 9 rocket.' },
|
||||||
|
{ year: 1985, description: 'Discovery of Homo naledi.' },
|
||||||
|
{
|
||||||
|
year: 1986,
|
||||||
|
description: 'Mars Reconnaissance Orbiter confirms water on Mars.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
yearFrom: 1987,
|
||||||
|
yearTo: 1991,
|
||||||
|
label: 'Cinema',
|
||||||
|
events: [
|
||||||
|
{
|
||||||
|
year: 1987,
|
||||||
|
description: 'Leonardo DiCaprio wins Oscar for The Revenant.',
|
||||||
|
},
|
||||||
|
{ year: 1989, description: 'Arrival movie released.' },
|
||||||
|
{ year: 1991, description: 'La La Land released.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
yearFrom: 1992,
|
||||||
|
yearTo: 1997,
|
||||||
|
label: 'Tech',
|
||||||
|
events: [
|
||||||
|
{ year: 1992, description: 'Nintendo Switch released.' },
|
||||||
|
{ year: 1995, description: 'iPhone X released.' },
|
||||||
|
{ year: 1997, description: 'AlphaGo Zero beats AlphaGo.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
yearFrom: 1999,
|
||||||
|
yearTo: 2004,
|
||||||
|
label: 'Music',
|
||||||
|
events: [
|
||||||
|
{ year: 1999, description: 'Childish Gambino releases This Is America.' },
|
||||||
|
{ year: 2004, description: 'Drake releases Scorpion.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
yearFrom: 2005,
|
||||||
|
yearTo: 2014,
|
||||||
|
label: 'World',
|
||||||
|
events: [
|
||||||
|
{ year: 2005, description: 'First image of a black hole.' },
|
||||||
|
{ year: 2014, description: 'Notre-Dame de Paris fire.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
yearFrom: 2015,
|
||||||
|
yearTo: 2022,
|
||||||
|
label: 'Pandemic',
|
||||||
|
events: [
|
||||||
|
{ year: 2015, description: 'COVID-19 pandemic declared.' },
|
||||||
|
{ year: 2022, description: 'SpaceX launches first crewed mission.' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
] as const
|
||||||
34
src/entities/TimePeriod/model/types.ts
Normal file
34
src/entities/TimePeriod/model/types.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* Entity: TimePeriod
|
||||||
|
* Типы данных для временных периодов и событий
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface HistoricalEvent {
|
||||||
|
/**
|
||||||
|
* Год события
|
||||||
|
*/
|
||||||
|
readonly year: number
|
||||||
|
/**
|
||||||
|
* Описание события
|
||||||
|
*/
|
||||||
|
readonly description: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TimePeriod {
|
||||||
|
/**
|
||||||
|
* Год начала периода
|
||||||
|
*/
|
||||||
|
readonly yearFrom: number
|
||||||
|
/**
|
||||||
|
* Год конца периода
|
||||||
|
*/
|
||||||
|
readonly yearTo: number
|
||||||
|
/**
|
||||||
|
* Название категории
|
||||||
|
*/
|
||||||
|
readonly label: string
|
||||||
|
/**
|
||||||
|
* События, связанные с этим периодом
|
||||||
|
*/
|
||||||
|
readonly events: readonly HistoricalEvent[]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user