I guess we displaying posts now
This commit is contained in:
parent
3f03c12152
commit
19eb695b08
14 changed files with 387 additions and 171 deletions
3
.env
Normal file
3
.env
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
DATE_START = 2025-04-15
|
||||||
|
PDS_URL = https://pds.witchcraft.systems
|
||||||
|
PORT = 3000
|
136
.gitignore
vendored
136
.gitignore
vendored
|
@ -1,136 +0,0 @@
|
||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
lerna-debug.log*
|
|
||||||
.pnpm-debug.log*
|
|
||||||
|
|
||||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
||||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
||||||
|
|
||||||
# Runtime data
|
|
||||||
pids
|
|
||||||
*.pid
|
|
||||||
*.seed
|
|
||||||
*.pid.lock
|
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
||||||
lib-cov
|
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
|
||||||
coverage
|
|
||||||
*.lcov
|
|
||||||
|
|
||||||
# nyc test coverage
|
|
||||||
.nyc_output
|
|
||||||
|
|
||||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
||||||
.grunt
|
|
||||||
|
|
||||||
# Bower dependency directory (https://bower.io/)
|
|
||||||
bower_components
|
|
||||||
|
|
||||||
# node-waf configuration
|
|
||||||
.lock-wscript
|
|
||||||
|
|
||||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
||||||
build/Release
|
|
||||||
|
|
||||||
# Dependency directories
|
|
||||||
node_modules/
|
|
||||||
jspm_packages/
|
|
||||||
|
|
||||||
# Snowpack dependency directory (https://snowpack.dev/)
|
|
||||||
web_modules/
|
|
||||||
|
|
||||||
# TypeScript cache
|
|
||||||
*.tsbuildinfo
|
|
||||||
|
|
||||||
# Optional npm cache directory
|
|
||||||
.npm
|
|
||||||
|
|
||||||
# Optional eslint cache
|
|
||||||
.eslintcache
|
|
||||||
|
|
||||||
# Optional stylelint cache
|
|
||||||
.stylelintcache
|
|
||||||
|
|
||||||
# Microbundle cache
|
|
||||||
.rpt2_cache/
|
|
||||||
.rts2_cache_cjs/
|
|
||||||
.rts2_cache_es/
|
|
||||||
.rts2_cache_umd/
|
|
||||||
|
|
||||||
# Optional REPL history
|
|
||||||
.node_repl_history
|
|
||||||
|
|
||||||
# Output of 'npm pack'
|
|
||||||
*.tgz
|
|
||||||
|
|
||||||
# Yarn Integrity file
|
|
||||||
.yarn-integrity
|
|
||||||
|
|
||||||
# dotenv environment variable files
|
|
||||||
.env
|
|
||||||
.env.development.local
|
|
||||||
.env.test.local
|
|
||||||
.env.production.local
|
|
||||||
.env.local
|
|
||||||
|
|
||||||
# parcel-bundler cache (https://parceljs.org/)
|
|
||||||
.cache
|
|
||||||
.parcel-cache
|
|
||||||
|
|
||||||
# Next.js build output
|
|
||||||
.next
|
|
||||||
out
|
|
||||||
|
|
||||||
# Nuxt.js build / generate output
|
|
||||||
.nuxt
|
|
||||||
dist
|
|
||||||
|
|
||||||
# Gatsby files
|
|
||||||
.cache/
|
|
||||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
||||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
||||||
# public
|
|
||||||
|
|
||||||
# vuepress build output
|
|
||||||
.vuepress/dist
|
|
||||||
|
|
||||||
# vuepress v2.x temp and cache directory
|
|
||||||
.temp
|
|
||||||
.cache
|
|
||||||
|
|
||||||
# vitepress build output
|
|
||||||
**/.vitepress/dist
|
|
||||||
|
|
||||||
# vitepress cache directory
|
|
||||||
**/.vitepress/cache
|
|
||||||
|
|
||||||
# Docusaurus cache and generated files
|
|
||||||
.docusaurus
|
|
||||||
|
|
||||||
# Serverless directories
|
|
||||||
.serverless/
|
|
||||||
|
|
||||||
# FuseBox cache
|
|
||||||
.fusebox/
|
|
||||||
|
|
||||||
# DynamoDB Local files
|
|
||||||
.dynamodb/
|
|
||||||
|
|
||||||
# TernJS port file
|
|
||||||
.tern-port
|
|
||||||
|
|
||||||
# Stores VSCode versions used for testing VSCode extensions
|
|
||||||
.vscode-test
|
|
||||||
|
|
||||||
# yarn v2
|
|
||||||
.yarn/cache
|
|
||||||
.yarn/unplugged
|
|
||||||
.yarn/build-state.yml
|
|
||||||
.yarn/install-state.gz
|
|
||||||
.pnp.*
|
|
11
index.html
11
index.html
|
@ -1,11 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Alpine.js Test</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
$POSTSPLACEHOLDER
|
|
||||||
</body>
|
|
||||||
</html>
|
|
32
node_modules/.svelte2tsx-language-server-files/svelte-native-jsx.d.ts
generated
vendored
Normal file
32
node_modules/.svelte2tsx-language-server-files/svelte-native-jsx.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
declare namespace svelteNative.JSX {
|
||||||
|
|
||||||
|
// Every namespace eligible for use needs to implement the following two functions
|
||||||
|
function mapElementTag(
|
||||||
|
tag: string
|
||||||
|
): any;
|
||||||
|
|
||||||
|
function createElement<Elements extends IntrinsicElements, Key extends keyof Elements>(
|
||||||
|
element: Key | undefined | null, attrs: Elements[Key]
|
||||||
|
): any;
|
||||||
|
function createElement<Elements extends IntrinsicElements, Key extends keyof Elements, T>(
|
||||||
|
element: Key | undefined | null, attrEnhancers: T, attrs: Elements[Key] & T
|
||||||
|
): any;
|
||||||
|
|
||||||
|
|
||||||
|
/* svelte specific */
|
||||||
|
interface ElementClass {
|
||||||
|
$$prop_def: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ElementAttributesProperty {
|
||||||
|
$$prop_def: any; // specify the property name to use
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add empty IntrinsicAttributes to prevent fallback to the one in the JSX namespace
|
||||||
|
interface IntrinsicAttributes {
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IntrinsicElements {
|
||||||
|
[name: string]: { [name: string]: any };
|
||||||
|
}
|
||||||
|
}
|
287
node_modules/.svelte2tsx-language-server-files/svelte-shims-v4.d.ts
generated
vendored
Normal file
287
node_modules/.svelte2tsx-language-server-files/svelte-shims-v4.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,287 @@
|
||||||
|
// Whenever a ambient declaration changes, its number should be increased
|
||||||
|
// This way, we avoid the situation where multiple ambient versions of svelte2tsx
|
||||||
|
// are loaded and their declarations conflict each other
|
||||||
|
// See https://github.com/sveltejs/language-tools/issues/1059 for an example bug that stems from it
|
||||||
|
// If you change anything in this file, think about whether or not it should be backported to svelte-shims.d.ts
|
||||||
|
|
||||||
|
type AConstructorTypeOf<T, U extends any[] = any[]> = new (...args: U) => T;
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteActionReturnType = {
|
||||||
|
update?: (args: any) => void,
|
||||||
|
destroy?: () => void
|
||||||
|
} | void
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteTransitionConfig = {
|
||||||
|
delay?: number,
|
||||||
|
duration?: number,
|
||||||
|
easing?: (t: number) => number,
|
||||||
|
css?: (t: number, u: number) => string,
|
||||||
|
tick?: (t: number, u: number) => void
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteTransitionReturnType = SvelteTransitionConfig | (() => SvelteTransitionConfig)
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteAnimationReturnType = {
|
||||||
|
delay?: number,
|
||||||
|
duration?: number,
|
||||||
|
easing?: (t: number) => number,
|
||||||
|
css?: (t: number, u: number) => string,
|
||||||
|
tick?: (t: number, u: number) => void
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteWithOptionalProps<Props, Keys extends keyof Props> = Omit<Props, Keys> & Partial<Pick<Props, Keys>>;
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteAllProps = { [index: string]: any }
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SveltePropsAnyFallback<Props> = {[K in keyof Props]: Props[K] extends never ? never : Props[K] extends undefined ? any : Props[K]}
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteSlotsAnyFallback<Slots> = {[K in keyof Slots]: {[S in keyof Slots[K]]: Slots[K][S] extends undefined ? any : Slots[K][S]}}
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteRestProps = { [index: string]: any }
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteSlots = { [index: string]: any }
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type SvelteStore<T> = { subscribe: (run: (value: T) => any, invalidate?: any) => any }
|
||||||
|
|
||||||
|
// Forces TypeScript to look into the type which results in a better representation of it
|
||||||
|
// which helps for error messages and is necessary for d.ts file transformation so that
|
||||||
|
// no ambient type references are left in the output
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type KeysMatching<Obj, V> = {[K in keyof Obj]-?: Obj[K] extends V ? K : never}[keyof Obj]
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
declare type __sveltets_2_CustomEvents<T> = {[K in KeysMatching<T, CustomEvent>]: T[K] extends CustomEvent ? T[K]['detail']: T[K]}
|
||||||
|
|
||||||
|
declare function __sveltets_2_ensureRightProps<Props>(props: Props): {};
|
||||||
|
declare function __sveltets_2_instanceOf<T = any>(type: AConstructorTypeOf<T>): T;
|
||||||
|
declare function __sveltets_2_allPropsType(): SvelteAllProps
|
||||||
|
declare function __sveltets_2_restPropsType(): SvelteRestProps
|
||||||
|
declare function __sveltets_2_slotsType<Slots, Key extends keyof Slots>(slots: Slots): Record<Key, boolean>;
|
||||||
|
|
||||||
|
// Overload of the following two functions is necessary.
|
||||||
|
// An empty array of optionalProps makes OptionalProps type any, which means we lose the prop typing.
|
||||||
|
// optionalProps need to be first or its type cannot be infered correctly.
|
||||||
|
|
||||||
|
declare function __sveltets_2_partial<Props = {}, Events = {}, Slots = {}, Exports = {}, Bindings = string>(
|
||||||
|
render: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
): {props: Expand<SveltePropsAnyFallback<Props>>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>>, exports?: Exports, bindings?: Bindings }
|
||||||
|
declare function __sveltets_2_partial<Props = {}, Events = {}, Slots = {}, Exports = {}, Bindings = string, OptionalProps extends keyof Props = any>(
|
||||||
|
optionalProps: OptionalProps[],
|
||||||
|
render: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
): {props: Expand<SvelteWithOptionalProps<SveltePropsAnyFallback<Props>, OptionalProps>>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>>, exports?: Exports, bindings?: Bindings }
|
||||||
|
|
||||||
|
declare function __sveltets_2_partial_with_any<Props = {}, Events = {}, Slots = {}, Exports = {}, Bindings = string>(
|
||||||
|
render: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
): {props: Expand<SveltePropsAnyFallback<Props> & SvelteAllProps>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>>, exports?: Exports, bindings?: Bindings }
|
||||||
|
declare function __sveltets_2_partial_with_any<Props = {}, Events = {}, Slots = {}, Exports = {}, Bindings = string, OptionalProps extends keyof Props = any>(
|
||||||
|
optionalProps: OptionalProps[],
|
||||||
|
render: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
): {props: Expand<SvelteWithOptionalProps<SveltePropsAnyFallback<Props>, OptionalProps> & SvelteAllProps>, events: Events, slots: Expand<SvelteSlotsAnyFallback<Slots>>, exports?: Exports, bindings?: Bindings }
|
||||||
|
|
||||||
|
|
||||||
|
declare function __sveltets_2_with_any<Props = {}, Events = {}, Slots = {}, Exports = {}, Bindings = string>(
|
||||||
|
render: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
): {props: Expand<Props & SvelteAllProps>, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
|
||||||
|
declare function __sveltets_2_with_any_event<Props = {}, Events = {}, Slots = {}, Exports = {}, Bindings = string>(
|
||||||
|
render: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
): {props: Props, events: Events & {[evt: string]: CustomEvent<any>;}, slots: Slots, exports?: Exports, bindings?: Bindings }
|
||||||
|
|
||||||
|
declare function __sveltets_2_store_get<T = any>(store: SvelteStore<T>): T
|
||||||
|
declare function __sveltets_2_store_get<Store extends SvelteStore<any> | undefined | null>(store: Store): Store extends SvelteStore<infer T> ? T : Store;
|
||||||
|
declare function __sveltets_2_any(dummy: any): any;
|
||||||
|
declare function __sveltets_2_invalidate<T>(getValue: () => T): T
|
||||||
|
|
||||||
|
declare function __sveltets_2_mapWindowEvent<K extends keyof HTMLBodyElementEventMap>(
|
||||||
|
event: K
|
||||||
|
): HTMLBodyElementEventMap[K];
|
||||||
|
declare function __sveltets_2_mapBodyEvent<K extends keyof WindowEventMap>(
|
||||||
|
event: K
|
||||||
|
): WindowEventMap[K];
|
||||||
|
declare function __sveltets_2_mapElementEvent<K extends keyof HTMLElementEventMap>(
|
||||||
|
event: K
|
||||||
|
): HTMLElementEventMap[K];
|
||||||
|
|
||||||
|
declare function __sveltets_2_bubbleEventDef<Events, K extends keyof Events>(
|
||||||
|
events: Events, eventKey: K
|
||||||
|
): Events[K];
|
||||||
|
declare function __sveltets_2_bubbleEventDef(
|
||||||
|
events: any, eventKey: string
|
||||||
|
): any;
|
||||||
|
|
||||||
|
declare const __sveltets_2_customEvent: CustomEvent<any>;
|
||||||
|
declare function __sveltets_2_toEventTypings<Typings>(): {[Key in keyof Typings]: CustomEvent<Typings[Key]>};
|
||||||
|
|
||||||
|
declare function __sveltets_2_unionType<T1, T2>(t1: T1, t2: T2): T1 | T2;
|
||||||
|
declare function __sveltets_2_unionType<T1, T2, T3>(t1: T1, t2: T2, t3: T3): T1 | T2 | T3;
|
||||||
|
declare function __sveltets_2_unionType<T1, T2, T3, T4>(t1: T1, t2: T2, t3: T3, t4: T4): T1 | T2 | T3 | T4;
|
||||||
|
declare function __sveltets_2_unionType(...types: any[]): any;
|
||||||
|
|
||||||
|
declare function __sveltets_2_createSvelte2TsxComponent<Props extends {}, Events extends {}, Slots extends {}>(
|
||||||
|
render: {props: Props, events: Events, slots: Slots }
|
||||||
|
): typeof import("svelte").SvelteComponent<Props, Events, Slots>;
|
||||||
|
|
||||||
|
declare function __sveltets_2_unwrapArr<T>(arr: ArrayLike<T>): T
|
||||||
|
declare function __sveltets_2_unwrapPromiseLike<T>(promise: PromiseLike<T> | T): T
|
||||||
|
|
||||||
|
// v2
|
||||||
|
declare function __sveltets_2_createCreateSlot<Slots = Record<string, Record<string, any>>>(): <SlotName extends keyof Slots>(slotName: SlotName, attrs: Slots[SlotName]) => Record<string, any>;
|
||||||
|
declare function __sveltets_2_createComponentAny(props: Record<string, any>): import("svelte").SvelteComponent<any, any, any>;
|
||||||
|
|
||||||
|
declare function __sveltets_2_any(...dummy: any[]): any;
|
||||||
|
declare function __sveltets_2_empty(...dummy: any[]): {};
|
||||||
|
declare function __sveltets_2_union<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>(t1:T1,t2?:T2,t3?:T3,t4?:T4,t5?:T5,t6?:T6,t7?:T7,t8?:T8,t9?:T9,t10?:T10): T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8 & T9 & T10;
|
||||||
|
declare function __sveltets_2_nonNullable<T>(type: T): NonNullable<T>;
|
||||||
|
|
||||||
|
declare function __sveltets_2_cssProp(prop: Record<string, any>): {};
|
||||||
|
|
||||||
|
// @ts-ignore Svelte v3/v4 don't have this
|
||||||
|
declare function __sveltets_2_ensureSnippet(val: ReturnType<import('svelte').Snippet> | undefined | null): any;
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type __sveltets_2_SvelteAnimationReturnType = {
|
||||||
|
delay?: number,
|
||||||
|
duration?: number,
|
||||||
|
easing?: (t: number) => number,
|
||||||
|
css?: (t: number, u: number) => string,
|
||||||
|
tick?: (t: number, u: number) => void
|
||||||
|
}
|
||||||
|
declare var __sveltets_2_AnimationMove: { from: DOMRect, to: DOMRect }
|
||||||
|
declare function __sveltets_2_ensureAnimation(animationCall: __sveltets_2_SvelteAnimationReturnType): {};
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type __sveltets_2_SvelteActionReturnType = {
|
||||||
|
update?: (args: any) => void,
|
||||||
|
destroy?: () => void,
|
||||||
|
$$_attributes?: Record<string, any>,
|
||||||
|
} | void
|
||||||
|
declare function __sveltets_2_ensureAction<T extends __sveltets_2_SvelteActionReturnType>(actionCall: T): T extends {$$_attributes?: any} ? T['$$_attributes'] : {};
|
||||||
|
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type __sveltets_2_SvelteTransitionConfig = {
|
||||||
|
delay?: number,
|
||||||
|
duration?: number,
|
||||||
|
easing?: (t: number) => number,
|
||||||
|
css?: (t: number, u: number) => string,
|
||||||
|
tick?: (t: number, u: number) => void
|
||||||
|
}
|
||||||
|
/** @internal PRIVATE API, DO NOT USE */
|
||||||
|
type __sveltets_2_SvelteTransitionReturnType = __sveltets_2_SvelteTransitionConfig | (() => __sveltets_2_SvelteTransitionConfig)
|
||||||
|
declare function __sveltets_2_ensureTransition(transitionCall: __sveltets_2_SvelteTransitionReturnType): {};
|
||||||
|
|
||||||
|
// Includes undefined and null for all types as all usages also allow these
|
||||||
|
declare function __sveltets_2_ensureType<T>(type: AConstructorTypeOf<T>, el: T | undefined | null): {};
|
||||||
|
declare function __sveltets_2_ensureType<T1, T2>(type1: AConstructorTypeOf<T1>, type2: AConstructorTypeOf<T2>, el: T1 | T2 | undefined | null): {};
|
||||||
|
|
||||||
|
// The following is necessary because there are two clashing errors that can't be solved at the same time
|
||||||
|
// when using Svelte2TsxComponent, more precisely the event typings in
|
||||||
|
// __sveltets_2_ensureComponent<T extends new (..) => _SvelteComponent<any,||any||<-this,any>>(type: T): T;
|
||||||
|
// If we type it as "any", we have an error when using sth like {a: CustomEvent<any>}
|
||||||
|
// If we type it as "{}", we have an error when using sth like {[evt: string]: CustomEvent<any>}
|
||||||
|
// If we type it as "unknown", we get all kinds of follow up errors which we want to avoid
|
||||||
|
// Therefore introduce two more base classes just for this case.
|
||||||
|
/**
|
||||||
|
* Ambient type only used for intellisense, DO NOT USE IN YOUR PROJECT
|
||||||
|
*/
|
||||||
|
declare type ATypedSvelteComponent = {
|
||||||
|
/**
|
||||||
|
* @internal This is for type checking capabilities only
|
||||||
|
* and does not exist at runtime. Don't use this property.
|
||||||
|
*/
|
||||||
|
$$prop_def: any;
|
||||||
|
/**
|
||||||
|
* @internal This is for type checking capabilities only
|
||||||
|
* and does not exist at runtime. Don't use this property.
|
||||||
|
*/
|
||||||
|
$$events_def: any;
|
||||||
|
/**
|
||||||
|
* @internal This is for type checking capabilities only
|
||||||
|
* and does not exist at runtime. Don't use this property.
|
||||||
|
*/
|
||||||
|
$$slot_def: any;
|
||||||
|
|
||||||
|
$on(event: string, handler: any): () => void;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Ambient type only used for intellisense, DO NOT USE IN YOUR PROJECT.
|
||||||
|
*
|
||||||
|
* If you're looking for the type of a Svelte Component, use `SvelteComponent` and `ComponentType` instead:
|
||||||
|
*
|
||||||
|
* ```ts
|
||||||
|
* import type { ComponentType, SvelteComponent } from "svelte";
|
||||||
|
* let myComponentConstructor: ComponentType<SvelteComponent> = ..;
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
declare type ConstructorOfATypedSvelteComponent = new (args: {target: any, props?: any}) => ATypedSvelteComponent
|
||||||
|
// Usage note: Cannot properly transform generic function components to class components due to TypeScript limitations
|
||||||
|
declare function __sveltets_2_ensureComponent<
|
||||||
|
T extends
|
||||||
|
| ConstructorOfATypedSvelteComponent
|
||||||
|
| (typeof import('svelte') extends { mount: any }
|
||||||
|
? // @ts-ignore svelte.Component doesn't exist in Svelte 4
|
||||||
|
import('svelte').Component<any, any, any>
|
||||||
|
: never)
|
||||||
|
| null
|
||||||
|
| undefined
|
||||||
|
>(
|
||||||
|
type: T
|
||||||
|
): NonNullable<
|
||||||
|
T extends ConstructorOfATypedSvelteComponent
|
||||||
|
? T
|
||||||
|
: typeof import('svelte') extends { mount: any }
|
||||||
|
? // @ts-ignore svelte.Component doesn't exist in Svelte 4
|
||||||
|
T extends import('svelte').Component<
|
||||||
|
infer Props extends Record<string, any>,
|
||||||
|
infer Exports extends Record<string, any>,
|
||||||
|
infer Bindings extends string
|
||||||
|
>
|
||||||
|
? new (
|
||||||
|
options: import('svelte').ComponentConstructorOptions<Props>
|
||||||
|
) => import('svelte').SvelteComponent<Props, Props['$$events'], Props['$$slots']> &
|
||||||
|
Exports & { $$bindings: Bindings }
|
||||||
|
: never
|
||||||
|
: never
|
||||||
|
>;
|
||||||
|
|
||||||
|
declare function __sveltets_2_ensureArray<T extends ArrayLike<unknown> | Iterable<unknown>>(array: T): T extends ArrayLike<infer U> ? U[] : T extends Iterable<infer U> ? Iterable<U> : any[];
|
||||||
|
|
||||||
|
type __sveltets_2_PropsWithChildren<Props, Slots> = Props &
|
||||||
|
(Slots extends { default: any }
|
||||||
|
// This is unfortunate because it means "accepts no props" turns into "accepts any prop"
|
||||||
|
// but the alternative is non-fixable type errors because of the way TypeScript index
|
||||||
|
// signatures work (they will always take precedence and make an impossible-to-satisfy children type).
|
||||||
|
? Props extends Record<string, never>
|
||||||
|
? any
|
||||||
|
: { children?: any }
|
||||||
|
: {});
|
||||||
|
declare function __sveltets_2_runes_constructor<Props extends {}>(render: {props: Props }): import("svelte").ComponentConstructorOptions<Props>;
|
||||||
|
|
||||||
|
declare function __sveltets_2_get_set_binding<T>(get: (() => T) | null | undefined, set: (t: T) => void): T;
|
||||||
|
|
||||||
|
declare function __sveltets_$$bindings<Bindings extends string[]>(...bindings: Bindings): Bindings[number];
|
||||||
|
|
||||||
|
declare function __sveltets_2_fn_component<
|
||||||
|
Props extends Record<string, any>, Exports extends Record<string, any>, Bindings extends string
|
||||||
|
// @ts-ignore Svelte 5 only
|
||||||
|
>(klass: {props: Props, exports?: Exports, bindings?: Bindings }): import('svelte').Component<Props, Exports, Bindings>;
|
||||||
|
|
||||||
|
interface __sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
||||||
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & { $$bindings?: Bindings } & Exports;
|
||||||
|
(internal: unknown, props: Props extends Record<string, never> ? {$$events?: Events, $$slots?: Slots} : Props & {$$events?: Events, $$slots?: Slots}): Exports & { $set?: any, $on?: any };
|
||||||
|
z_$$bindings?: Bindings;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare function __sveltets_2_isomorphic_component<
|
||||||
|
Props extends Record<string, any>, Events extends Record<string, any>, Slots extends Record<string, any>, Exports extends Record<string, any>, Bindings extends string
|
||||||
|
>(klass: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }): __sveltets_2_IsomorphicComponent<Props, Events, Slots, Exports, Bindings>;
|
||||||
|
|
||||||
|
declare function __sveltets_2_isomorphic_component_slots<
|
||||||
|
Props extends Record<string, any>, Events extends Record<string, any>, Slots extends Record<string, any>, Exports extends Record<string, any>, Bindings extends string
|
||||||
|
>(klass: {props: Props, events: Events, slots: Slots, exports?: Exports, bindings?: Bindings }): __sveltets_2_IsomorphicComponent<__sveltets_2_PropsWithChildren<Props, Slots>, Events, Slots, Exports, Bindings>;
|
1
node_modules/.vite/_svelte_metadata.json
generated
vendored
Normal file
1
node_modules/.vite/_svelte_metadata.json
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"compilerOptions":{"css":"external","dev":true,"hmr":true},"extensions":[".svelte"]}
|
8
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
8
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"hash": "cc57f64c",
|
||||||
|
"configHash": "97f4d997",
|
||||||
|
"lockfileHash": "e3b0c442",
|
||||||
|
"browserHash": "6470842e",
|
||||||
|
"optimized": {},
|
||||||
|
"chunks": {}
|
||||||
|
}
|
3
node_modules/.vite/deps/package.json
generated
vendored
Normal file
3
node_modules/.vite/deps/package.json
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"type": "module"
|
||||||
|
}
|
|
@ -2,7 +2,6 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/witchcraft.ico" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>ATProto PDS</title>
|
<title>ATProto PDS</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
BIN
web/public/favicon.ico
Normal file
BIN
web/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 109 KiB |
|
@ -1,21 +1,53 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Post } from "./pdsfetch";
|
import { Post } from "./pdsfetch";
|
||||||
let { post } : { post : Post } = $props();
|
let { post }: { post: Post } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div id="postContainer">
|
||||||
|
<div id="postHeader">
|
||||||
|
{#if post.authorAvatarCid}
|
||||||
|
<img
|
||||||
|
id="avatar"
|
||||||
|
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.authorAvatarCid}"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
<p>{post.displayName} | {post.timenotstamp}</p>
|
<p>{post.displayName} | {post.timenotstamp}</p>
|
||||||
|
</div>
|
||||||
|
<div id="postContent">
|
||||||
<p>{post.text}</p>
|
<p>{post.text}</p>
|
||||||
{#if post.replyingDid}
|
{#if post.replyingDid}
|
||||||
<p>Replying to: {post.replyingDid}</p>
|
<p>Replying to: {post.replyingDid}</p>
|
||||||
{/if}
|
{/if}
|
||||||
{#if post.imagesLinksCid}
|
{#if post.imagesLinksCid}
|
||||||
{#each post.imagesLinksCid as imageLink}
|
{#each post.imagesLinksCid as imageLink}
|
||||||
<img src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={imageLink}" />
|
<img
|
||||||
|
id="embedImages"
|
||||||
|
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={imageLink}"
|
||||||
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
{#if post.videosLinkCid}
|
{#if post.videosLinkCid}
|
||||||
<video src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.videosLinkCid}" />
|
<video
|
||||||
|
id="embedVideo"
|
||||||
|
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.videosLinkCid}"
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#postContainer {
|
||||||
|
display: column;
|
||||||
|
text-align: start;
|
||||||
|
border: 2px solid black;
|
||||||
|
padding: 4%;
|
||||||
|
}
|
||||||
|
#postHeader {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
#avatar {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { simpleFetchHandler, XRPC } from "@atcute/client";
|
import { simpleFetchHandler, XRPC } from "@atcute/client";
|
||||||
import "@atcute/bluesky/lexicons";
|
import "@atcute/bluesky/lexicons";
|
||||||
// import { ComAtprotoRepoListRecords } from "@atcute/client/lexicons";
|
// import { ComAtprotoRepoListRecords.Record } from "@atcute/client/lexicons";
|
||||||
// import { AppBskyFeedPost } from "@atcute/client/lexicons";
|
// import { AppBskyFeedPost } from "@atcute/client/lexicons";
|
||||||
// import { AppBskyActorDefs } from "@atcute/client/lexicons";
|
// import { AppBskyActorDefs } from "@atcute/client/lexicons";
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ interface AccountMetadata {
|
||||||
}
|
}
|
||||||
class Post {
|
class Post {
|
||||||
authorDid: string;
|
authorDid: string;
|
||||||
|
authorAvatarCid: string | null;
|
||||||
displayName : string;
|
displayName : string;
|
||||||
text: string;
|
text: string;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
|
@ -18,12 +19,11 @@ class Post {
|
||||||
quotingDid: string | null;
|
quotingDid: string | null;
|
||||||
replyingDid: string | null;
|
replyingDid: string | null;
|
||||||
imagesLinksCid: string[] | null;
|
imagesLinksCid: string[] | null;
|
||||||
imagesAltText: string[] | null;
|
|
||||||
videosLinkCid: string | null;
|
videosLinkCid: string | null;
|
||||||
videosLinksUrls: string[] | null;
|
|
||||||
|
|
||||||
constructor(record: ComAtprotoRepoListRecords.Record, account : AccountMetadata) {
|
constructor(record: ComAtprotoRepoListRecords.Record, account : AccountMetadata) {
|
||||||
this.authorDid = account.did;
|
this.authorDid = account.did;
|
||||||
|
this.authorAvatarCid = account.avatarCid;
|
||||||
this.displayName = account.displayName;
|
this.displayName = account.displayName;
|
||||||
const post = record.value as AppBskyFeedPost.Record;
|
const post = record.value as AppBskyFeedPost.Record;
|
||||||
this.timenotstamp = post.createdAt;
|
this.timenotstamp = post.createdAt;
|
||||||
|
@ -42,7 +42,6 @@ class Post {
|
||||||
this.imagesLinksCid = post.embed.images.map((imageRecord) =>
|
this.imagesLinksCid = post.embed.images.map((imageRecord) =>
|
||||||
imageRecord.image.ref.$link
|
imageRecord.image.ref.$link
|
||||||
);
|
);
|
||||||
this.imagesAltText = post.embed.images.map((imageRecord) => imageRecord.alt || "no alt text :(")
|
|
||||||
break;
|
break;
|
||||||
case "app.bsky.embed.video":
|
case "app.bsky.embed.video":
|
||||||
this.videosLinkCid = post.embed.video.ref.$link;
|
this.videosLinkCid = post.embed.video.ref.$link;
|
||||||
|
@ -57,7 +56,6 @@ class Post {
|
||||||
this.imagesLinksCid = post.embed.media.images.map((imageRecord) =>
|
this.imagesLinksCid = post.embed.media.images.map((imageRecord) =>
|
||||||
imageRecord.image.ref.$link
|
imageRecord.image.ref.$link
|
||||||
);
|
);
|
||||||
this.imagesAltText = post.embed.images.map((imageRecord) => imageRecord.alt || "no alt text :(")
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "app.bsky.embed.video":
|
case "app.bsky.embed.video":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue