@axium/calendar 0.5.4 → 0.5.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/calendar",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "Calendar for Axium",
6
6
  "funding": {
@@ -38,8 +38,8 @@
38
38
  "build": "tsc"
39
39
  },
40
40
  "peerDependencies": {
41
- "@axium/client": ">=0.37.0",
42
- "@axium/core": ">=0.39.0",
41
+ "@axium/client": ">=0.39.0",
42
+ "@axium/core": ">=0.41.0",
43
43
  "@axium/server": ">=0.47.0",
44
44
  "@sveltejs/kit": "^2.27.3",
45
45
  "kysely": "^0.29.0",
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import { text } from '@axium/client';
3
+ import { TopBarContent } from '@axium/client/components';
4
+
5
+ const { children } = $props();
6
+ </script>
7
+
8
+ <TopBarContent name={text('app_name.calendar')} icon="calendar" href="/calendar" />
9
+
10
+ {@render children()}
@@ -1,6 +1,6 @@
1
1
  import { EventFilter, getSpanFilter, type Calendar } from '@axium/calendar/common';
2
2
  import { fetchAPI } from '@axium/client/requests';
3
- import { getCurrentSession } from '@axium/client/user';
3
+ import { currentSession } from '@axium/client/user';
4
4
  import type { Session, User } from '@axium/core';
5
5
  import { redirect } from '@sveltejs/kit';
6
6
  import { prettifyError } from 'zod';
@@ -11,11 +11,8 @@ export const ssr = false;
11
11
  export async function load({ parent, url }) {
12
12
  let { session }: { session?: (Session & { user: User }) | null } = await parent();
13
13
 
14
- try {
15
- session ||= await getCurrentSession();
16
- } catch (e) {
17
- redirect(307, '/login?after=/calendar');
18
- }
14
+ session ||= await currentSession();
15
+ if (!session) redirect(307, '/login?after=/calendar');
19
16
 
20
17
  const filter: EventFilter = getSpanFilter('week', new Date());
21
18
  try {
@@ -1,13 +1,9 @@
1
- body:has(#cal-app) {
2
- top: 4em;
3
- }
4
-
5
1
  #cal-app {
6
2
  display: grid;
7
3
  grid-template-rows: 3em 1fr;
8
4
  grid-template-columns: 15em 1fr;
9
- inset: 0;
10
- position: absolute;
5
+ position: fixed;
6
+ inset: var(--top-bar-height, 0px) 0 0;
11
7
 
12
8
  h3,
13
9
  h4 {