Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jan 10, 2024
1 parent 299c766 commit 49cc9e7
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
16 changes: 8 additions & 8 deletions apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,36 +39,36 @@
"@spectacular/typescript-config": "workspace:*",
"@spectacular/utils": "workspace:*",
"@sveltejs/adapter-auto": "3.1.0",
"@sveltejs/adapter-node": "2.0.2",
"@sveltejs/adapter-node": "2.1.0",
"@sveltejs/adapter-vercel": "4.0.4",
"@sveltejs/enhanced-img": "0.1.7",
"@sveltejs/kit": "2.0.6",
"@sveltejs/kit": "2.2.0",
"@sveltejs/vite-plugin-svelte": "3.0.1",
"@tailwindcss/container-queries": "0.1.1",
"@tailwindcss/forms": "0.5.7",
"@tailwindcss/typography": "0.5.10",
"@types/d3-scale": "4.0.8",
"@types/node": "20.10.7",
"@typescript-eslint/eslint-plugin": "6.18.0",
"@typescript-eslint/parser": "6.18.0",
"@types/node": "20.10.8",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"@vercel/analytics": "1.1.1",
"@vincjo/datatables": "1.14.2",
"@vitest/coverage-v8": "1.1.3",
"@xyflow/svelte": "0.0.31",
"@xyflow/svelte": "0.0.32",
"autoprefixer": "10.4.16",
"d3-array": "3.2.4",
"d3-scale": "4.0.2",
"d3-scale-chromatic": "3.0.0",
"d3-shape": "3.2.0",
"date-fns": "3.1.0",
"date-fns": "3.2.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-svelte": "2.35.1",
"formsnap": "0.4.2",
"houdini": "1.2.35",
"houdini-svelte": "1.2.35",
"layerchart": "0.27.1",
"lucide-svelte": "0.307.0",
"lucide-svelte": "0.308.0",
"postcss": "8.4.33",
"prettier": "3.1.1",
"prettier-plugin-svelte": "3.1.2",
Expand Down
8 changes: 4 additions & 4 deletions apps/console/src/lib/components/layout/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import Icon from '@spectacular/skeleton/components/icons/Icon.svelte';
import { menuNavLinks } from '$lib/links';
import { page } from '$app/stores';
import { link } from '$lib/i18n/link';
// Local
import { link } from '$lib/i18n/link';
// Local
let currentRailCategory: keyof typeof menuNavLinks | undefined = undefined;
const drawerStore = getDrawerStore();
Expand Down Expand Up @@ -88,7 +88,7 @@
{#each segment.list as { href, label, badge }}
<li on:keypress on:click={drawerStore.close}>
<a
{...$link(href)}
{...$link(href)}
class={listboxItemActive(href)}
data-sveltekit-preload-data="hover"
>
Expand Down
6 changes: 3 additions & 3 deletions apps/console/src/lib/i18n/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import type { AvailableLanguageTag } from '$i18n/runtime';
export const LANG_DETAILS = {
en: {
name: 'English',
label: 'En',
label: 'En'
},
de: {
name: 'German',
label: 'De',
},
label: 'De'
}
} satisfies { [L in AvailableLanguageTag]: { name: string; label: string } };

export const LANG_PARAM = 'lang';
10 changes: 5 additions & 5 deletions apps/console/src/lib/i18n/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Page } from '@sveltejs/kit';
import { derived } from 'svelte/store';
import { resolveRoute } from '$app/paths';
import { sourceLanguageTag } from '$i18n/runtime';
import type {AvailableLanguageTag} from '$i18n/runtime';
import type { AvailableLanguageTag } from '$i18n/runtime';
import { page } from '$app/stores';
import { LANG_PARAM } from './constants';

Expand All @@ -24,7 +24,7 @@ export function localize<T extends string | URL>(location: T, lang: AvailableLan
// As it is, the locale param is prepended whenever the href points to a non-default-locale.
// This could be fine-tuned to, for example, account for user's preferences in localstorage / cookies / page.data.
return resolveRoute(`/[[${LANG_PARAM}]]${str}`, {
['lang']: lang === sourceLanguageTag ? '' : lang,
['lang']: lang === sourceLanguageTag ? '' : lang
});
}

Expand Down Expand Up @@ -69,10 +69,10 @@ export function deriveLink($page: Page) {
const currentPage = $page.url.pathname === path || undefined;
const currentHash = currentPage && '#' + hash === $page.url.hash;
return {
'href': _href,
'hreflang': lang || undefined,
href: _href,
hreflang: lang || undefined,
'data-current': currentHash ? 'step' : currentPage ? 'page' : undefined,
'aria-current': currentHash ? 'step' : currentPage ? 'page' : undefined,
'aria-current': currentHash ? 'step' : currentPage ? 'page' : undefined
// Add more attributes if relevant.
} satisfies Partial<HTMLAnchorAttributes>;
};
Expand Down
4 changes: 2 additions & 2 deletions apps/console/src/lib/i18n/validation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from 'zod';
import { availableLanguageTags } from '$i18n/runtime';
import type {AvailableLanguageTag} from '$i18n/runtime';
import { availableLanguageTags } from '$i18n/runtime';
import type { AvailableLanguageTag } from '$i18n/runtime';

export function isAvailableLang(maybeLang: unknown): maybeLang is AvailableLanguageTag {
return availableLanguageTags.indexOf(maybeLang as AvailableLanguageTag) > -1;
Expand Down
3 changes: 1 addition & 2 deletions apps/console/src/lib/server/middleware/lang.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Handle } from '@sveltejs/kit';
import { Logger } from '@spectacular/utils';
import { getTextDirection } from '$lib/i18n';
import { sourceLanguageTag , setLanguageTag } from '$i18n/runtime';
import { sourceLanguageTag, setLanguageTag } from '$i18n/runtime';
import type { AvailableLanguageTag } from '$i18n/runtime';
import { getEventLang } from '$lib/i18n/event';

Expand Down Expand Up @@ -30,4 +30,3 @@ export const lang = (async ({ event, resolve }) => {
});
return result;
}) satisfies Handle;

4 changes: 3 additions & 1 deletion apps/console/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
};
function matchPathWhitelist(routeId: string | null): boolean {
console.log({routeId})
console.log({ routeId });
// If homepage route
if (routeId === '/[[lang=lang]]') return true;
// If any blog route `/[[lang=lang]]/blog`
Expand Down Expand Up @@ -130,6 +130,8 @@
<!--
Rerender the page whenever the language changes
TODO: https://github.com/CUPUM/nplex/blob/main/src/lib/components/LangKey.svelte
https://github.com/opral/monorepo/tree/paraglide-js-adapter-sveltekit/inlang/source-code/paraglide/paraglide-js-adapter-sveltekit
-->
{#key lang}
<slot />
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/routes/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export const load = async (event) => {
}
return {
lang,
user: event.data.user,
user: event.data.user
};
};

0 comments on commit 49cc9e7

Please sign in to comment.