···11import { error } from '@sveltejs/kit';
22import { command, getRequestEvent } from '$app/server';
33import * as v from 'valibot';
44-import { collections } from '../settings';
44+import { writableCollections } from '../settings';
55import { contrail, ensureInit } from '$lib/contrail';
6677// Validate collection format and check against allowed list
···99 v.string(),
1010 v.regex(/^[a-zA-Z][a-zA-Z0-9-]*(\.[a-zA-Z][a-zA-Z0-9-]*){2,}$/),
1111 v.check(
1212- (c) => collections.includes(c as (typeof collections)[number]),
1212+ (c) => writableCollections.includes(c as (typeof writableCollections)[number]),
1313 'Collection not in allowed list'
1414 )
1515);
+6
src/lib/atproto/settings.ts
···20202121export type AllowedCollection = (typeof collections)[number];
22222323+// Collections the server will accept in putRecord/createRecord/deleteRecord.
2424+// Superset of `collections` — includes collections we can write via the OAuth
2525+// scope granted by the PDS but don't need to list explicitly in our scope
2626+// request (e.g. app.bsky.feed.post for cross-posting).
2727+export const writableCollections = [...collections, 'app.bsky.feed.post'] as const;
2828+2329// which PDS to use for signup
2430const devPDS = 'https://pds.rip/';
2531const prodPDS = 'https://selfhosted.social/';
+1-1
src/lib/cards/sections/HeroCard/HeroCard.svelte
···22 import { goto } from '$app/navigation';
33 import { user } from '$lib/atproto';
44 import { getHandleOrDid } from '$lib/atproto/methods';
55- import { atProtoLoginModalState } from '@foxui/social';
65 import { Badge, cn } from '@foxui/core';
76 import type { ContentComponentProps } from '../../types';
87 import { getHeroDecorations, heroAlignClasses, heroVerticalAlignClasses } from '.';
98 import Decoration from './Decoration.svelte';
99+ import { atProtoLoginModalState } from '$lib/atproto/LoginModal.svelte';
10101111 let { item }: ContentComponentProps = $props();
1212
···1010 import { goto } from '$app/navigation';
1111 import * as TID from '@atcute/tid';
1212 import { Button } from '@foxui/core';
1313- import { atProtoLoginModalState } from '@foxui/social';
1313+ import { atProtoLoginModalState } from '$lib/atproto/LoginModal.svelte';
14141515 let { data } = $props();
1616
+1-1
src/routes/[[actor=actor]]/blog/new/+page.svelte
···11<script lang="ts">
22 import { user } from '$lib/atproto/auth.svelte';
33- import { atProtoLoginModalState } from '@foxui/social';
43 import { uploadBlob, createTID, putRecord } from '$lib/atproto/methods';
54 import { compressImage } from '$lib/atproto/image-helper';
65 import { Badge, Button } from '@foxui/core';
···109 import { RichTextEditor } from '$lib/components/rich-text-editor';
1110 import { putImage, getImage, clearImages } from '$lib/components/image-store';
1211 import type { Editor, Content } from '@tiptap/core';
1212+ import { atProtoLoginModalState } from '$lib/atproto/LoginModal.svelte';
13131414 const DRAFT_KEY = 'blog-draft';
1515