Migrated code from Kobold Kid webite amd made a simple static page site.
This commit is contained in:
56
types/Calender.d.ts
vendored
56
types/Calender.d.ts
vendored
@@ -1,56 +0,0 @@
|
||||
type Days =
|
||||
| "Sunday"
|
||||
| "Monday"
|
||||
| "Tuesday"
|
||||
| "Wednesday"
|
||||
| "Thursday"
|
||||
| "Friday"
|
||||
| "Saturday";
|
||||
|
||||
type DaysOfWeek = Days[];
|
||||
|
||||
interface WeekDays {
|
||||
sunday: DaysOfWeek;
|
||||
monday: DaysOfWeek;
|
||||
}
|
||||
|
||||
interface MonthDay {
|
||||
date: string;
|
||||
isOverflow: boolean;
|
||||
overflowDirection: "prev" | "next" | null;
|
||||
}
|
||||
|
||||
interface Month {
|
||||
week1: MonthDay[];
|
||||
week2: MonthDay[];
|
||||
week3: MonthDay[];
|
||||
week4: MonthDay[];
|
||||
week5: MonthDay[];
|
||||
week6: MonthDay[];
|
||||
}
|
||||
|
||||
interface WeekLayout {
|
||||
weekdays: DaysOfWeek;
|
||||
month: Month;
|
||||
}
|
||||
|
||||
interface MonthLayout {
|
||||
sunday: WeekLayout;
|
||||
monday: WeekLayout;
|
||||
}
|
||||
|
||||
interface UpdateCalenderPropsDateLayout {
|
||||
year: number;
|
||||
month: number;
|
||||
day: number;
|
||||
}
|
||||
interface UpdateCalendarProps {
|
||||
date: UpdateCalenderPropsDateLayout;
|
||||
isLoading: boolean;
|
||||
}
|
||||
|
||||
interface SelectedDateInfo {
|
||||
date: string;
|
||||
title: string;
|
||||
layout: MonthLayout;
|
||||
}
|
||||
24
types/Stickers.d.ts
vendored
24
types/Stickers.d.ts
vendored
@@ -1,24 +0,0 @@
|
||||
type StickerVal = -2 | -1 | 0 | 1 | 2 | null;
|
||||
|
||||
type ValidStickerVal = -2 | -1 | 0 | 1 | 2;
|
||||
|
||||
interface AddEditStickerProps {
|
||||
date: Date;
|
||||
sticker: ValidStickerVal;
|
||||
}
|
||||
|
||||
interface Sticker {
|
||||
id: string;
|
||||
date: string;
|
||||
sticker: StickerVal;
|
||||
edited: boolean;
|
||||
manual: boolean;
|
||||
}
|
||||
|
||||
type StickerDays = Sticker[];
|
||||
|
||||
interface StickerModal {
|
||||
isOpen: boolean;
|
||||
selectedSticker: StickerVal;
|
||||
step: number;
|
||||
}
|
||||
139
types/cache-life.d.ts
vendored
Normal file
139
types/cache-life.d.ts
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
// Type definitions for Next.js cacheLife configs
|
||||
|
||||
declare module "next/cache" {
|
||||
export { unstable_cache } from "next/dist/server/web/spec-extension/unstable-cache";
|
||||
export {
|
||||
revalidateTag,
|
||||
revalidatePath,
|
||||
unstable_expireTag,
|
||||
unstable_expirePath
|
||||
} from "next/dist/server/web/spec-extension/revalidate";
|
||||
export { unstable_noStore } from "next/dist/server/web/spec-extension/unstable-no-store";
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` for a timespan defined by the `"default"` profile.
|
||||
* ```
|
||||
* stale: 300 seconds (5 minutes)
|
||||
* revalidate: 900 seconds (15 minutes)
|
||||
* expire: never
|
||||
* ```
|
||||
*
|
||||
* This cache may be stale on clients for 5 minutes before checking with the server.
|
||||
* If the server receives a new request after 15 minutes, start revalidating new values in the background.
|
||||
* It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: "default"): void;
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` for a timespan defined by the `"seconds"` profile.
|
||||
* ```
|
||||
* stale: 0 seconds
|
||||
* revalidate: 1 seconds
|
||||
* expire: 60 seconds (1 minute)
|
||||
* ```
|
||||
*
|
||||
* This cache may be stale on clients for 0 seconds before checking with the server.
|
||||
* If the server receives a new request after 1 seconds, start revalidating new values in the background.
|
||||
* If this entry has no traffic for 1 minute it will expire. The next request will recompute it.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: "seconds"): void;
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` for a timespan defined by the `"minutes"` profile.
|
||||
* ```
|
||||
* stale: 300 seconds (5 minutes)
|
||||
* revalidate: 60 seconds (1 minute)
|
||||
* expire: 3600 seconds (1 hour)
|
||||
* ```
|
||||
*
|
||||
* This cache may be stale on clients for 5 minutes before checking with the server.
|
||||
* If the server receives a new request after 1 minute, start revalidating new values in the background.
|
||||
* If this entry has no traffic for 1 hour it will expire. The next request will recompute it.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: "minutes"): void;
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` for a timespan defined by the `"hours"` profile.
|
||||
* ```
|
||||
* stale: 300 seconds (5 minutes)
|
||||
* revalidate: 3600 seconds (1 hour)
|
||||
* expire: 86400 seconds (1 day)
|
||||
* ```
|
||||
*
|
||||
* This cache may be stale on clients for 5 minutes before checking with the server.
|
||||
* If the server receives a new request after 1 hour, start revalidating new values in the background.
|
||||
* If this entry has no traffic for 1 day it will expire. The next request will recompute it.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: "hours"): void;
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` for a timespan defined by the `"days"` profile.
|
||||
* ```
|
||||
* stale: 300 seconds (5 minutes)
|
||||
* revalidate: 86400 seconds (1 day)
|
||||
* expire: 604800 seconds (1 week)
|
||||
* ```
|
||||
*
|
||||
* This cache may be stale on clients for 5 minutes before checking with the server.
|
||||
* If the server receives a new request after 1 day, start revalidating new values in the background.
|
||||
* If this entry has no traffic for 1 week it will expire. The next request will recompute it.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: "days"): void;
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` for a timespan defined by the `"weeks"` profile.
|
||||
* ```
|
||||
* stale: 300 seconds (5 minutes)
|
||||
* revalidate: 604800 seconds (1 week)
|
||||
* expire: 2592000 seconds (30 days)
|
||||
* ```
|
||||
*
|
||||
* This cache may be stale on clients for 5 minutes before checking with the server.
|
||||
* If the server receives a new request after 1 week, start revalidating new values in the background.
|
||||
* If this entry has no traffic for 30 days it will expire. The next request will recompute it.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: "weeks"): void;
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` for a timespan defined by the `"max"` profile.
|
||||
* ```
|
||||
* stale: 300 seconds (5 minutes)
|
||||
* revalidate: 2592000 seconds (30 days)
|
||||
* expire: never
|
||||
* ```
|
||||
*
|
||||
* This cache may be stale on clients for 5 minutes before checking with the server.
|
||||
* If the server receives a new request after 30 days, start revalidating new values in the background.
|
||||
* It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: "max"): void;
|
||||
|
||||
/**
|
||||
* Cache this `"use cache"` using a custom timespan.
|
||||
* ```
|
||||
* stale: ... // seconds
|
||||
* revalidate: ... // seconds
|
||||
* expire: ... // seconds
|
||||
* ```
|
||||
*
|
||||
* This is similar to Cache-Control: max-age=`stale`,s-max-age=`revalidate`,stale-while-revalidate=`expire-revalidate`
|
||||
*
|
||||
* If a value is left out, the lowest of other cacheLife() calls or the default, is used instead.
|
||||
*/
|
||||
export function unstable_cacheLife(profile: {
|
||||
/**
|
||||
* This cache may be stale on clients for ... seconds before checking with the server.
|
||||
*/
|
||||
stale?: number;
|
||||
/**
|
||||
* If the server receives a new request after ... seconds, start revalidating new values in the background.
|
||||
*/
|
||||
revalidate?: number;
|
||||
/**
|
||||
* If this entry has no traffic for ... seconds it will expire. The next request will recompute it.
|
||||
*/
|
||||
expire?: number;
|
||||
}): void;
|
||||
|
||||
export { cacheTag as unstable_cacheTag } from "next/dist/server/use-cache/cache-tag";
|
||||
}
|
||||
1
types/package.json
Normal file
1
types/package.json
Normal file
@@ -0,0 +1 @@
|
||||
{"type": "module"}
|
||||
Reference in New Issue
Block a user