Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump packages; fix incorrect text #33

Merged
merged 58 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d92ca58
remove duplicate code
Lenni009 Dec 27, 2023
d5e7bd7
Bump @types/node from 20.10.5 to 20.10.6
dependabot[bot] Jan 1, 2024
9d9a6f2
Bump @picocss/pico from 1.5.10 to 1.5.11
dependabot[bot] Jan 1, 2024
b2cc880
Bump vue from 3.3.13 to 3.4.3
dependabot[bot] Jan 1, 2024
583924a
Merge pull request #9 from Lenni009/dependabot/npm_and_yarn/dev/vue-3…
Lenni009 Jan 1, 2024
b563f3b
Merge pull request #8 from Lenni009/dependabot/npm_and_yarn/dev/picoc…
Lenni009 Jan 1, 2024
965b9d9
Bump sass from 1.69.5 to 1.69.6
dependabot[bot] Jan 1, 2024
5669b05
Merge pull request #5 from Lenni009/dependabot/npm_and_yarn/dev/types…
Lenni009 Jan 1, 2024
adf8c9b
Merge pull request #7 from Lenni009/dependabot/npm_and_yarn/dev/sass-…
Lenni009 Jan 1, 2024
eac9d86
Bump @vitejs/plugin-vue from 5.0.0 to 5.0.2
dependabot[bot] Jan 1, 2024
ab3cf6e
Merge pull request #6 from Lenni009/dependabot/npm_and_yarn/dev/vitej…
Lenni009 Jan 1, 2024
85e2b41
Bump vue from 3.4.3 to 3.4.5
dependabot[bot] Jan 8, 2024
f59b9cb
Bump @types/node from 20.10.6 to 20.10.7
dependabot[bot] Jan 8, 2024
1d710d5
Bump vite from 5.0.10 to 5.0.11
dependabot[bot] Jan 8, 2024
2089490
Merge pull request #14 from Lenni009/dependabot/npm_and_yarn/dev/vite…
Lenni009 Jan 8, 2024
db1ef0f
Merge pull request #11 from Lenni009/dependabot/npm_and_yarn/dev/vue-…
Lenni009 Jan 8, 2024
af8aae1
Merge pull request #13 from Lenni009/dependabot/npm_and_yarn/dev/type…
Lenni009 Jan 8, 2024
2bd38e5
Bump vue-i18n from 9.8.0 to 9.9.0
dependabot[bot] Jan 8, 2024
dfbca08
Merge pull request #10 from Lenni009/dependabot/npm_and_yarn/dev/vue-…
Lenni009 Jan 8, 2024
7160095
Bump sass from 1.69.6 to 1.69.7
dependabot[bot] Jan 8, 2024
62fefb7
Merge pull request #12 from Lenni009/dependabot/npm_and_yarn/dev/sass…
Lenni009 Jan 8, 2024
5495a9c
Bump @types/node from 20.10.7 to 20.11.2
dependabot[bot] Jan 15, 2024
34e8f73
Bump vue from 3.4.5 to 3.4.13
dependabot[bot] Jan 15, 2024
6c99adf
Bump prettier from 3.1.1 to 3.2.2
dependabot[bot] Jan 15, 2024
26faee3
Merge pull request #15 from Lenni009/dependabot/npm_and_yarn/dev/type…
Lenni009 Jan 15, 2024
d5cf2b4
Merge pull request #18 from Lenni009/dependabot/npm_and_yarn/dev/pret…
Lenni009 Jan 15, 2024
914ecb2
Merge pull request #16 from Lenni009/dependabot/npm_and_yarn/dev/vue-…
Lenni009 Jan 15, 2024
b26f9ea
Bump @vitejs/plugin-vue from 5.0.2 to 5.0.3
dependabot[bot] Jan 15, 2024
2d3f597
Merge pull request #17 from Lenni009/dependabot/npm_and_yarn/dev/vite…
Lenni009 Jan 15, 2024
1c3c102
Bump vite from 5.0.11 to 5.0.12
dependabot[bot] Jan 22, 2024
029e2db
Bump prettier from 3.2.2 to 3.2.4
dependabot[bot] Jan 22, 2024
2f6b68c
Bump sass from 1.69.7 to 1.70.0
dependabot[bot] Jan 22, 2024
917d9b8
Bump @types/node from 20.11.2 to 20.11.5
dependabot[bot] Jan 22, 2024
0131bb8
Merge pull request #19 from Lenni009/dependabot/npm_and_yarn/dev/vite…
Lenni009 Jan 22, 2024
6b0db12
Merge pull request #21 from Lenni009/dependabot/npm_and_yarn/dev/sass…
Lenni009 Jan 22, 2024
bd709b0
Merge pull request #23 from Lenni009/dependabot/npm_and_yarn/dev/type…
Lenni009 Jan 22, 2024
caadc4d
Merge pull request #20 from Lenni009/dependabot/npm_and_yarn/dev/pret…
Lenni009 Jan 22, 2024
56c1099
Bump vue from 3.4.13 to 3.4.15
dependabot[bot] Jan 22, 2024
009ce58
Merge pull request #22 from Lenni009/dependabot/npm_and_yarn/dev/vue-…
Lenni009 Jan 22, 2024
4e58d5d
Bump @types/node from 20.11.5 to 20.11.10
dependabot[bot] Jan 29, 2024
c6cb118
Merge pull request #24 from NMSCD/dependabot/npm_and_yarn/dev/types/n…
Lenni009 Jan 29, 2024
5b67313
Bump vue-i18n from 9.9.0 to 9.9.1
dependabot[bot] Feb 5, 2024
d2a7ed1
Bump prettier from 3.2.4 to 3.2.5
dependabot[bot] Feb 5, 2024
0275f58
Bump @types/node from 20.11.10 to 20.11.16
dependabot[bot] Feb 5, 2024
076f798
Merge pull request #25 from NMSCD/dependabot/npm_and_yarn/dev/vue-i18…
Lenni009 Feb 5, 2024
93b7a59
Merge pull request #26 from NMSCD/dependabot/npm_and_yarn/dev/prettie…
Lenni009 Feb 5, 2024
625be00
Merge pull request #27 from NMSCD/dependabot/npm_and_yarn/dev/types/n…
Lenni009 Feb 5, 2024
c38a24f
Bump @vitejs/plugin-vue from 5.0.3 to 5.0.4
dependabot[bot] Feb 12, 2024
8caf86d
Merge pull request #28 from NMSCD/dependabot/npm_and_yarn/dev/vitejs/…
Lenni009 Feb 12, 2024
dec4e93
Bump vue from 3.4.15 to 3.4.18
dependabot[bot] Feb 12, 2024
03fd9e8
Bump vite from 5.0.12 to 5.1.1
dependabot[bot] Feb 12, 2024
05c789b
Bump @types/node from 20.11.16 to 20.11.17
dependabot[bot] Feb 12, 2024
6ecc5d1
Merge pull request #29 from NMSCD/dependabot/npm_and_yarn/dev/types/n…
Lenni009 Feb 12, 2024
801aa92
Merge pull request #32 from NMSCD/dependabot/npm_and_yarn/dev/vite-5.1.1
Lenni009 Feb 12, 2024
fc41d63
Merge pull request #31 from NMSCD/dependabot/npm_and_yarn/dev/vue-3.4.18
Lenni009 Feb 12, 2024
c953e6a
formatting
Lenni009 Feb 12, 2024
706ec5e
bump pico
Lenni009 Feb 12, 2024
e4f0bb1
Merge branch 'main' into dev
Lenni009 Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
trim_trailing_whitespace = true
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ updates:
target-branch: 'dev'
schedule:
interval: 'weekly'

- package-ecosystem: 'github-actions'
directory: '/'
target-branch: 'dev'
schedule:
interval: 'weekly'
465 changes: 230 additions & 235 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "region-adjacency-checker",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
Expand All @@ -11,21 +12,21 @@
"format": "prettier --write src/"
},
"dependencies": {
"@picocss/pico": "^1.5.10",
"@picocss/pico": "^2.0.0",
"pinia": "^2.1.7",
"sass": "^1.69.5",
"vue": "^3.3.13",
"vue-i18n": "^9.8.0"
"sass": "^1.70.0",
"vue": "^3.4.18",
"vue-i18n": "^9.9.1"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.2",
"@types/node": "^20.10.5",
"@vitejs/plugin-vue": "^5.0.0",
"@types/node": "^20.11.17",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/tsconfig": "^0.5.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
"prettier": "^3.2.5",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite": "^5.1.1",
"vue-tsc": "^1.8.27"
}
}
41 changes: 20 additions & 21 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import NavBar from './components/NavBar.vue';
import { useRegionDataStore } from './stores/regionData';
import { storeToRefs } from 'pinia';
import GlyphInput from './components/GlyphInput.vue';
import { ref } from 'vue';
import { ref, computed } from 'vue';
import { useRegionAdjacency } from './composables/useRegionAdjacency';
import { useI18n } from './hooks/useI18n';

Expand All @@ -24,10 +24,12 @@ function checkAdjacency() {
} else if (distance === Math.sqrt(3)) {
adjacency.value = t('translation.touchingonthecorner');
} else {
adjacency.value = t('translation.touchingonthecorner');
adjacency.value = t('translation.nottouching');
}
isAdjacent.value = distance === 1 || distance === Math.sqrt(2) || distance === Math.sqrt(3);
}

const glyphInputLabels = computed(() => [t('translation.enterfirstregion'), t('translation.entersecondregion')]);
</script>

<template>
Expand All @@ -39,24 +41,21 @@ function checkAdjacency() {
<main>
<div class="input-wrapper">
<GlyphInput
:index="0"
:label="t('translation.enterfirstregion')"
class="glyph-input"
/>

<GlyphInput
:index="1"
:label="t('translation.entersecondregion')"
v-for="i in 2"
:index="i - 1"
:label="glyphInputLabels[i - 1]"
class="glyph-input"
/>
</div>
<button
:disabled="!glyphValues.length || glyphValues.some((gl) => gl.length !== 12)"
class="button"
@click="checkAdjacency"
>
{{ t('translation.check') }}
</button>
<div class="action-button-wrapper">
<button
:disabled="!glyphValues.length || glyphValues.some((gl) => gl.length !== 12)"
class="button"
@click="checkAdjacency"
>
{{ t('translation.check') }}
</button>
</div>
<p
v-show="adjacency"
:class="{ 'is-success': isAdjacent, 'is-error': !isAdjacent }"
Expand All @@ -80,16 +79,16 @@ function checkAdjacency() {
justify-content: space-evenly;
}

.button {
width: auto;
margin-inline: auto;
.action-button-wrapper {
margin-block-start: 2rem;
margin-block-end: 1rem;
text-align: center;
}

.output {
text-align: center;
padding: 1rem;
border-radius: var(--border-radius);
border-radius: var(--pico-border-radius);
}

.is-success {
Expand Down
1 change: 1 addition & 0 deletions src/components/GlyphInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const numberToGlyph = (n: number) => n.toString(16).toUpperCase(); // NoSonar th
.button {
line-height: 3rem;
padding: 0;
margin: 0;
}
}

Expand Down
9 changes: 5 additions & 4 deletions src/hooks/useI18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ type Join<FirstType, SecondType> = FirstType extends string | number
/**
* Helper type that transforms an object tree into a union type of all possibles leaves.
*/
type Leaves<ObjectType> = ObjectType extends Record<string, unknown>
? // eslint-disable-next-line @typescript-eslint/no-unused-vars
{ [Key in keyof ObjectType]-?: Join<Key, Leaves<ObjectType[Key]>> }[keyof ObjectType]
: '';
type Leaves<ObjectType> =
ObjectType extends Record<string, unknown>
? // eslint-disable-next-line @typescript-eslint/no-unused-vars
{ [Key in keyof ObjectType]-?: Join<Key, Leaves<ObjectType[Key]>> }[keyof ObjectType]
: '';

export type I18NLeaves = Leaves<(typeof messages)['Español']>;

Expand Down
3 changes: 2 additions & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const languageMap = {
const langEntries = Object.entries(languageMap);
const preferredUserLang = navigator.language;

const userLang = langEntries.find((lang) => lang[1].some((langCode) => langCode === preferredUserLang))?.[0] ?? 'English';
const userLang =
langEntries.find((lang) => lang[1].some((langCode) => langCode === preferredUserLang))?.[0] ?? 'English';

const localStorageLang = localStorage.getItem('lang');
const preferredLang = localStorageLang ?? userLang;
Expand Down
21 changes: 16 additions & 5 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue"
],
"exclude": [
"src/**/__tests__/*"
],
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"lib": [
"ESNext",
"DOM"
],
"moduleResolution": "Node",
"strict": true,
"verbatimModuleSyntax": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
Expand All @@ -18,9 +28,10 @@
"noImplicitReturns": true,
"skipLibCheck": true,
"composite": true,
"baseUrl": "/Image-Compressor/",
"paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
}
}
}
4 changes: 3 additions & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"composite": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"]
"types": [
"node"
]
}
}
Loading