@bedard/hexboard 0.0.1
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/.github/workflows/build.yml +65 -0
- package/.github/workflows/release.yml +0 -0
- package/.vscode/settings.json +5 -0
- package/LICENSE +21 -0
- package/README.md +8 -0
- package/dist/index.d.ts +127 -0
- package/dist/index.js +1056 -0
- package/eslint.config.js +85 -0
- package/index.html +22 -0
- package/package.json +58 -0
- package/src/lib/components/hexboard/Hexboard.vue +865 -0
- package/src/lib/components/hexboard/constants.ts +389 -0
- package/src/lib/components/hexboard/dom.ts +19 -0
- package/src/lib/components/hexboard/geometry.ts +59 -0
- package/src/lib/components/hexboard/haptics.ts +56 -0
- package/src/lib/components/hexboard/pieces/Celtic.vue +22 -0
- package/src/lib/components/hexboard/pieces/Fantasy.vue +22 -0
- package/src/lib/components/hexboard/pieces/Gioco.vue +22 -0
- package/src/lib/components/hexboard/pieces/Spatial.vue +22 -0
- package/src/lib/components/hexboard/pieces/index.ts +4 -0
- package/src/lib/components/hexboard/types.ts +28 -0
- package/src/lib/index.ts +1 -0
- package/src/sandbox/App.vue +28 -0
- package/src/sandbox/components/Button.vue +8 -0
- package/src/sandbox/components/icons/Github.vue +3 -0
- package/src/sandbox/components/icons/Menu.vue +3 -0
- package/src/sandbox/components/icons/X.vue +3 -0
- package/src/sandbox/index.ts +5 -0
- package/src/sandbox/tailwind.css +59 -0
- package/src/sandbox/views/HomeToolbar.vue +80 -0
- package/src/tests/example.test.tsx +18 -0
- package/src/tests/hexboard.test.tsx +832 -0
- package/src/tests/utils.ts +26 -0
- package/tsconfig.json +30 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +42 -0
- package/vite.sandbox.config.ts +21 -0
- package/vitest.config.ts +35 -0
package/eslint.config.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import globals from 'globals'
|
|
2
|
+
import js from '@eslint/js'
|
|
3
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
|
4
|
+
import stylistic from '@stylistic/eslint-plugin'
|
|
5
|
+
import ts from 'typescript-eslint'
|
|
6
|
+
import vue from 'eslint-plugin-vue'
|
|
7
|
+
|
|
8
|
+
export default ts.config(
|
|
9
|
+
js.configs.recommended,
|
|
10
|
+
...ts.configs.recommended,
|
|
11
|
+
...vue.configs['flat/recommended'],
|
|
12
|
+
stylistic.configs.recommended,
|
|
13
|
+
{
|
|
14
|
+
languageOptions: {
|
|
15
|
+
globals: globals.browser,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
files: ['**/*.vue'],
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parserOptions: {
|
|
22
|
+
parser: ts.parser,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
files: ['**/*.ts', '**/*.vue'],
|
|
28
|
+
plugins: {
|
|
29
|
+
'simple-import-sort': simpleImportSort,
|
|
30
|
+
},
|
|
31
|
+
rules: {
|
|
32
|
+
'simple-import-sort/imports': 'error',
|
|
33
|
+
'simple-import-sort/exports': 'error',
|
|
34
|
+
'vue/attributes-order': [
|
|
35
|
+
'error',
|
|
36
|
+
{
|
|
37
|
+
alphabetical: true,
|
|
38
|
+
order: [
|
|
39
|
+
[
|
|
40
|
+
'CONDITIONALS',
|
|
41
|
+
'CONTENT',
|
|
42
|
+
'LIST_RENDERING',
|
|
43
|
+
'RENDER_MODIFIERS',
|
|
44
|
+
'SLOT',
|
|
45
|
+
'TWO_WAY_BINDING',
|
|
46
|
+
'TWO_WAY_BINDING',
|
|
47
|
+
'OTHER_DIRECTIVES',
|
|
48
|
+
],
|
|
49
|
+
['ATTR_SHORTHAND_BOOL', 'ATTR_STATIC', 'GLOBAL'],
|
|
50
|
+
['ATTR_DYNAMIC', 'DEFINITION', 'UNIQUE'],
|
|
51
|
+
'EVENTS',
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
'vue/multi-word-component-names': 'off',
|
|
56
|
+
'vue/v-bind-style': [
|
|
57
|
+
'error',
|
|
58
|
+
'shorthand',
|
|
59
|
+
{
|
|
60
|
+
sameNameShorthand: 'always',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
files: [
|
|
67
|
+
'src/lib/components/hexboard/pieces/*.vue',
|
|
68
|
+
'src/sandbox/components/icons/*.vue',
|
|
69
|
+
],
|
|
70
|
+
rules: {
|
|
71
|
+
'vue/attributes-order': 'off',
|
|
72
|
+
'vue/max-attributes-per-line': 'off',
|
|
73
|
+
'vue/multi-word-component-names': 'off',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
files: ['src/**/*.{ts,tsx}'],
|
|
78
|
+
rules: {
|
|
79
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
ignores: ['dist-sandbox/', 'dist/', 'node_modules/'],
|
|
84
|
+
},
|
|
85
|
+
)
|
package/index.html
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
|
|
7
|
+
<title>Hexboard</title>
|
|
8
|
+
|
|
9
|
+
<link href="/src/sandbox/tailwind.css" rel="stylesheet" />
|
|
10
|
+
|
|
11
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
12
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
13
|
+
<link
|
|
14
|
+
href="https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap"
|
|
15
|
+
rel="stylesheet"
|
|
16
|
+
/>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<div id="app"></div>
|
|
20
|
+
<script type="module" src="/src/sandbox/index.ts"></script>
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Scott Bedard",
|
|
3
|
+
"description": "Component library for hexchess.club",
|
|
4
|
+
"devDependencies": {
|
|
5
|
+
"@bedard/hexchess": "^2.5.1",
|
|
6
|
+
"@eslint/js": "^9.39.1",
|
|
7
|
+
"@headlessui/vue": "^1.7.23",
|
|
8
|
+
"@heroicons/vue": "^2.2.0",
|
|
9
|
+
"@stylistic/eslint-plugin": "^5.6.1",
|
|
10
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
11
|
+
"@types/node": "^22.19.2",
|
|
12
|
+
"@vitejs/plugin-vue": "^6.0.2",
|
|
13
|
+
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
|
14
|
+
"@vitest/browser": "^4.0.15",
|
|
15
|
+
"@vitest/browser-playwright": "^4.0.15",
|
|
16
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
17
|
+
"@vitest/ui": "^4.0.15",
|
|
18
|
+
"@vue/test-utils": "^2.4.6",
|
|
19
|
+
"eslint": "^9.39.1",
|
|
20
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
21
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
22
|
+
"globals": "^16.5.0",
|
|
23
|
+
"jsdom": "^27.3.0",
|
|
24
|
+
"playwright": "^1.57.0",
|
|
25
|
+
"tailwindcss": "^4.1.17",
|
|
26
|
+
"typescript": "^5.9.3",
|
|
27
|
+
"typescript-eslint": "^8.49.0",
|
|
28
|
+
"vite": "^6.4.1",
|
|
29
|
+
"vite-plugin-dts": "^4.5.4",
|
|
30
|
+
"vitest": "^4.0.15",
|
|
31
|
+
"vitest-browser-vue": "^2.0.1",
|
|
32
|
+
"vue": "^3.5.25",
|
|
33
|
+
"vue-tsc": "^3.1.8"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"hexchess"
|
|
37
|
+
],
|
|
38
|
+
"main": "dist/index.js",
|
|
39
|
+
"module": "dist/index.js",
|
|
40
|
+
"name": "@bedard/hexboard",
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@bedard/hexchess": "^2.5.0",
|
|
43
|
+
"vue": "^3.5.0"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "vite build",
|
|
47
|
+
"build:sandbox": "vite build --config vite.sandbox.config.ts",
|
|
48
|
+
"build:all": "vite build && vite build --config vite.sandbox.config.ts",
|
|
49
|
+
"dev": "vite",
|
|
50
|
+
"lint": "eslint .",
|
|
51
|
+
"lint:fix": "eslint . --fix",
|
|
52
|
+
"test": "vitest"
|
|
53
|
+
},
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"type": "module",
|
|
56
|
+
"types": "dist/index.d.ts",
|
|
57
|
+
"version": "0.0.1"
|
|
58
|
+
}
|