Skip to content

Commit 39300bb

Browse files
chore: wip
1 parent bac2f6d commit 39300bb

File tree

8 files changed

+61
-63
lines changed

8 files changed

+61
-63
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
import type { Metadata } from "next";
2-
import { Geist, Geist_Mono } from "next/font/google";
3-
import "./globals.css";
1+
import type { Metadata } from 'next'
2+
import { Geist, Geist_Mono } from 'next/font/google'
3+
import './globals.css'
44

55
const geistSans = Geist({
6-
variable: "--font-geist-sans",
7-
subsets: ["latin"],
8-
});
6+
variable: '--font-geist-sans',
7+
subsets: ['latin'],
8+
})
99

1010
const geistMono = Geist_Mono({
11-
variable: "--font-geist-mono",
12-
subsets: ["latin"],
13-
});
11+
variable: '--font-geist-mono',
12+
subsets: ['latin'],
13+
})
1414

1515
export const metadata: Metadata = {
16-
title: "Create Next App",
17-
description: "Generated by create next app",
18-
};
16+
title: 'Create Next App',
17+
description: 'Generated by create next app',
18+
}
1919

2020
export default function RootLayout({
2121
children,
2222
}: Readonly<{
23-
children: React.ReactNode;
23+
children: React.ReactNode
2424
}>) {
2525
return (
2626
<html lang="en">
@@ -30,5 +30,5 @@ export default function RootLayout({
3030
{children}
3131
</body>
3232
</html>
33-
);
33+
)
3434
}

playground/react-samples/app/page.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client'
22

33
import type { MapOptions } from 'ts-maps'
4+
import { useCallback, useMemo, useState } from 'react'
45
import { VectorMap } from 'ts-maps-react'
5-
import { useState, useCallback, useMemo } from 'react'
66
import styles from './page.module.css'
77

88
type MapName = 'world' | 'world-merc' | 'us-merc' | 'us-mill' | 'us-lcc' | 'us-aea' | 'spain' | 'italy' | 'canada' | 'russia' | 'iraq' | 'brasil'
@@ -88,7 +88,7 @@ export default function IndexPage() {
8888
const toggleTheme = useCallback(() => {
8989
const newIsDarkTheme = !isDarkTheme
9090
setIsDarkTheme(newIsDarkTheme)
91-
91+
9292
setOptions(prev => ({
9393
...prev,
9494
backgroundColor: newIsDarkTheme ? '#2c3e50' : '#ffffff',
@@ -115,7 +115,7 @@ export default function IndexPage() {
115115
r: 5,
116116
},
117117
}
118-
118+
119119
setOptions(prev => ({
120120
...prev,
121121
markers: [...(prev.markers || []), marker],
@@ -166,21 +166,27 @@ export default function IndexPage() {
166166
<div className={styles.controls}>
167167
<div className={styles.controlGroup}>
168168
<label htmlFor="map-select">Select Map:</label>
169-
<select
170-
id="map-select"
169+
<select
170+
id="map-select"
171171
value={currentMap}
172-
onChange={(e) => setCurrentMap(e.target.value as MapName)}
172+
onChange={e => setCurrentMap(e.target.value as MapName)}
173173
>
174174
{mapOptions.map(map => (
175175
<option key={map.value} value={map.value}>
176-
{map.label} ({map.projection})
176+
{map.label}
177+
{' '}
178+
(
179+
{map.projection}
180+
)
177181
</option>
178182
))}
179183
</select>
180184
</div>
181185

182186
<div className={styles.controlInfo}>
183-
Current Projection: <strong>{currentProjection}</strong>
187+
Current Projection:
188+
{' '}
189+
<strong>{currentProjection}</strong>
184190
</div>
185191

186192
<button onClick={toggleTheme}>
@@ -190,7 +196,9 @@ export default function IndexPage() {
190196
Add Random Marker
191197
</button>
192198
<button onClick={toggleZoom}>
193-
{options.zoomOnScroll ? 'Disable' : 'Enable'} Zoom
199+
{options.zoomOnScroll ? 'Disable' : 'Enable'}
200+
{' '}
201+
Zoom
194202
</button>
195203
</div>
196204

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { defineConfig, globalIgnores } from "eslint/config";
2-
import nextVitals from "eslint-config-next/core-web-vitals";
3-
import nextTs from "eslint-config-next/typescript";
1+
import nextVitals from 'eslint-config-next/core-web-vitals'
2+
import nextTs from 'eslint-config-next/typescript'
3+
import { defineConfig, globalIgnores } from 'eslint/config'
44

55
const eslintConfig = defineConfig([
66
...nextVitals,
77
...nextTs,
88
// Override default ignores of eslint-config-next.
99
globalIgnores([
1010
// Default ignores of eslint-config-next:
11-
".next/**",
12-
"out/**",
13-
"build/**",
14-
"next-env.d.ts",
11+
'.next/**',
12+
'out/**',
13+
'build/**',
14+
'next-env.d.ts',
1515
]),
16-
]);
16+
])
1717

18-
export default eslintConfig;
18+
export default eslintConfig
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { NextConfig } from "next";
1+
import type { NextConfig } from 'next'
22

33
const nextConfig: NextConfig = {
44
/* config options here */
5-
};
5+
}
66

7-
export default nextConfig;
7+
export default nextConfig

playground/react-samples/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"ts-maps-react": "../../packages/react"
1717
},
1818
"devDependencies": {
19-
"typescript": "^5",
19+
"@tailwindcss/postcss": "^4",
2020
"@types/node": "^20",
2121
"@types/react": "^19",
2222
"@types/react-dom": "^19",
23-
"@tailwindcss/postcss": "^4",
24-
"tailwindcss": "^4",
2523
"eslint": "^9",
26-
"eslint-config-next": "16.0.0"
24+
"eslint-config-next": "16.0.0",
25+
"tailwindcss": "^4",
26+
"typescript": "^5"
2727
}
2828
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const config = {
22
plugins: {
3-
"@tailwindcss/postcss": {},
3+
'@tailwindcss/postcss': {},
44
},
5-
};
5+
}
66

7-
export default config;
7+
export default config

playground/react-samples/tsconfig.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"compilerOptions": {
3+
"incremental": true,
34
"target": "ES2017",
5+
"jsx": "react-jsx",
46
"lib": ["dom", "dom.iterable", "esnext"],
7+
"module": "esnext",
8+
"moduleResolution": "bundler",
9+
"paths": {
10+
"@/*": ["./*"]
11+
},
12+
"resolveJsonModule": true,
513
"allowJs": true,
6-
"skipLibCheck": true,
714
"strict": true,
815
"noEmit": true,
916
"esModuleInterop": true,
10-
"module": "esnext",
11-
"moduleResolution": "bundler",
12-
"resolveJsonModule": true,
1317
"isolatedModules": true,
14-
"jsx": "react-jsx",
15-
"incremental": true,
18+
"skipLibCheck": true,
1619
"plugins": [
1720
{
1821
"name": "next"
1922
}
20-
],
21-
"paths": {
22-
"@/*": ["./*"]
23-
}
23+
]
2424
},
2525
"include": [
2626
"next-env.d.ts",

playground/vue-samples/src/views/VectorMapView.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
<script setup lang="ts">
22
import type { MapOptions } from 'ts-maps'
3+
import { Brasil, Canada, Iraq, Italy, Russia, Spain, UnitedStates, VectorMap, WorldMap } from 'ts-maps-vue'
34
import { computed, reactive, ref } from 'vue'
4-
import { VectorMap } from 'ts-maps-vue'
5-
import {
6-
Brasil,
7-
Canada,
8-
Iraq,
9-
Italy,
10-
Russia,
11-
Spain,
12-
UnitedStates,
13-
WorldMap,
14-
} from 'ts-maps-vue'
155
166
type MapName = 'world' | 'world-merc' | 'us-merc' | 'us-mill' | 'us-lcc' | 'us-aea' | 'spain' | 'italy' | 'canada' | 'brasil'
177

0 commit comments

Comments
 (0)