From 0ffc1852d322ee898497f6b3702fb82e2fd98a4a Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Tue, 28 May 2024 17:20:45 +0200 Subject: [PATCH] wip --- components/LanguageMap.vue | 109 +++++---------- package.json | 2 + pnpm-lock.yaml | 25 ++++ routes/select.vue | 14 -- server/createMapPolygons.ts | 268 ++++++++++++++++++++++++++++-------- 5 files changed, 272 insertions(+), 146 deletions(-) diff --git a/components/LanguageMap.vue b/components/LanguageMap.vue index 4a3a4d430..2ef1893bb 100644 --- a/components/LanguageMap.vue +++ b/components/LanguageMap.vue @@ -1,7 +1,9 @@ @@ -9,8 +11,7 @@ diff --git a/package.json b/package.json index 1c9cf5bac..41dc3a841 100644 --- a/package.json +++ b/package.json @@ -65,11 +65,13 @@ "pageres": "^6.3.1", "papaparse": "^5.4.1", "plausible-api": "https://github.com/avo7/plausible-api.git#main", + "polygon-clipping": "^0.15.7", "qr-code-styling": "^1.6.0-rc.1", "query-string": "^7.1.1", "querystringify": "^2.2.0", "rtlcss": "^3.1.2", "sha1": "^1.1.1", + "simplify-js": "^1.2.4", "speakeasy": "^2.0.0", "sql-template-strings": "^2.2.2", "sqlite": "^4.0.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d57ad1728..7732bad03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -158,6 +158,9 @@ dependencies: plausible-api: specifier: https://github.com/avo7/plausible-api.git#main version: github.com/avo7/plausible-api/0bb79ad1d26754a71b3ec1351255dbf5a32e6e2a + polygon-clipping: + specifier: ^0.15.7 + version: 0.15.7 qr-code-styling: specifier: ^1.6.0-rc.1 version: 1.6.0-rc.1 @@ -173,6 +176,9 @@ dependencies: sha1: specifier: ^1.1.1 version: 1.1.1 + simplify-js: + specifier: ^1.2.4 + version: 1.2.4 speakeasy: specifier: ^2.0.0 version: 2.0.0 @@ -13146,6 +13152,13 @@ packages: - typescript dev: false + /polygon-clipping@0.15.7: + resolution: {integrity: sha512-nhfdr83ECBg6xtqOAJab1tbksbBAOMUltN60bU+llHVOL0e5Onm1WpAXXWXVB39L8AJFssoIhEVuy/S90MmotA==} + dependencies: + robust-predicates: 3.0.2 + splaytree: 3.1.2 + dev: false + /posix-character-classes@0.1.1: resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} engines: {node: '>=0.10.0'} @@ -14802,6 +14815,10 @@ packages: resolution: {integrity: sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==} dev: false + /robust-predicates@3.0.2: + resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} + dev: false + /rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} dev: false @@ -15178,6 +15195,10 @@ packages: is-arrayish: 0.3.2 dev: true + /simplify-js@1.2.4: + resolution: {integrity: sha512-vITfSlwt7h/oyrU42R83mtzFpwYk3+mkH9bOHqq/Qw6n8rtR7aE3NZQ5fbcyCUVVmuMJR6ynsAhOfK2qoah8Jg==} + dev: false + /sirv@2.0.3: resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} engines: {node: '>= 10'} @@ -15352,6 +15373,10 @@ packages: base32.js: 0.0.1 dev: false + /splaytree@3.1.2: + resolution: {integrity: sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==} + dev: false + /split-on-first@1.1.0: resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==} engines: {node: '>=6'} diff --git a/routes/select.vue b/routes/select.vue index f1a5acae4..fecf527d1 100644 --- a/routes/select.vue +++ b/routes/select.vue @@ -1,19 +1,5 @@