bump: svelte -> 5.34.8 (#600)
* bump: svelte -> 5.34.8 * fix: unfreeze lockfile * fix: add svelte override
This commit is contained in:
1 parent
de3ca92544
commit
b98b902c7a
11 files changed
+18
-27
No files matched your search
+2
-2
@@ -26,7 +26,7 @@
|
|||||||
"postcss": "^8.4.30",
|
"postcss": "^8.4.30",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"prettier-plugin-svelte": "^3.2.7",
|
"prettier-plugin-svelte": "^3.2.7",
|
||||||
"svelte": "^5.19.7",
|
"svelte": "^5.34.8",
|
||||||
"svelte-adapter-bun-next": "^1.0.3",
|
"svelte-adapter-bun-next": "^1.0.3",
|
||||||
"svelte-check": "^4.0.0",
|
"svelte-check": "^4.0.0",
|
||||||
"svelte-floating-ui": "^1.5.9",
|
"svelte-floating-ui": "^1.5.9",
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
"vite": "^5.4.14"
|
"vite": "^5.4.14"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"svelte": "^5.19.7"
|
"svelte": "^5.34.8"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
placeholder?: string | undefined
|
placeholder?: string | undefined
|
||||||
value?: string
|
value?: string
|
||||||
actions?: boolean
|
actions?: boolean
|
||||||
|
tools?: boolean
|
||||||
preview?: boolean
|
preview?: boolean
|
||||||
class?: ClassValue
|
class?: ClassValue
|
||||||
required?: boolean
|
required?: boolean
|
||||||
|
|||||||
@@ -104,8 +104,8 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{#each nodes as node, index (node.comment_view.comment.id)}
|
{#each nodes as node, index (node.comment_view.comment.id)}
|
||||||
<Comment
|
<Comment
|
||||||
|
bind:node={nodes[index]}
|
||||||
postId={post.id}
|
postId={post.id}
|
||||||
node={nodes[index]}
|
|
||||||
op={post.creator_id == node.comment_view.creator.id}
|
op={post.creator_id == node.comment_view.creator.id}
|
||||||
contentClass="{node.children.length > 0 ||
|
contentClass="{node.children.length > 0 ||
|
||||||
node.comment_view.counts.child_count > 0
|
node.comment_view.counts.child_count > 0
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
bind:open={nodes[index].expanded}
|
bind:open={nodes[index].expanded}
|
||||||
>
|
>
|
||||||
{#if node.children?.length > 0}
|
{#if node.children?.length > 0}
|
||||||
<Comments {post} nodes={nodes[index].children} isParent={false} />
|
<Comments {post} bind:nodes={nodes[index].children} isParent={false} />
|
||||||
{/if}
|
{/if}
|
||||||
</Comment>
|
</Comment>
|
||||||
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let {
|
let {
|
||||||
post: passedPost = $bindable(),
|
post = $bindable(),
|
||||||
actions = true,
|
actions = true,
|
||||||
hideCommunity = false,
|
hideCommunity = false,
|
||||||
view = settings.view,
|
view = settings.view,
|
||||||
@@ -59,11 +59,6 @@
|
|||||||
onhide,
|
onhide,
|
||||||
}: Props = $props()
|
}: Props = $props()
|
||||||
|
|
||||||
let post = $state(passedPost)
|
|
||||||
$effect(() => {
|
|
||||||
passedPost = post
|
|
||||||
})
|
|
||||||
|
|
||||||
let tags = $derived(parseTags(post.post.name))
|
let tags = $derived(parseTags(post.post.name))
|
||||||
let type = $derived(mediaType(post.post.url))
|
let type = $derived(mediaType(post.post.url))
|
||||||
let rule = $derived(getTagRule(tags.tags))
|
let rule = $derived(getTagRule(tags.tags))
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { settings } from '$lib/settings.svelte.js'
|
import { settings } from '$lib/settings.svelte.js'
|
||||||
import type { Snippet } from 'svelte'
|
import type { Snippet } from 'svelte'
|
||||||
import type { ClassValue, UIEventHandler } from 'svelte/elements'
|
import type { ClassValue, HTMLAttributes, UIEventHandler } from 'svelte/elements'
|
||||||
import { scrollY } from 'svelte/reactivity/window'
|
import { scrollY } from 'svelte/reactivity/window'
|
||||||
|
|
||||||
interface Props {
|
interface Props extends HTMLAttributes<HTMLDivElement> {
|
||||||
route?: { id: string | null } | undefined
|
route?: { id: string | null } | undefined
|
||||||
class?: ClassValue
|
class?: ClassValue
|
||||||
children?: Snippet
|
children?: Snippet
|
||||||
|
|||||||
@@ -943,7 +943,8 @@
|
|||||||
"language_not_allowed": "That language isn't allowed in this community. Unset it to use the community's default.",
|
"language_not_allowed": "That language isn't allowed in this community. Unset it to use the community's default.",
|
||||||
"couldnt_find_person": "That user doesn't exist.",
|
"couldnt_find_person": "That user doesn't exist.",
|
||||||
"couldnt_find_community": "That community doesn't exist.",
|
"couldnt_find_community": "That community doesn't exist.",
|
||||||
"not_an_admin": "You are not an admin of this instance."
|
"not_an_admin": "You are not an admin of this instance.",
|
||||||
|
"rate_limit_error": "You are performing that action too fast."
|
||||||
},
|
},
|
||||||
"aria": {
|
"aria": {
|
||||||
"pagination": {
|
"pagination": {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export function toast({
|
|||||||
let id = 0
|
let id = 0
|
||||||
|
|
||||||
toasts.update(toasts => {
|
toasts.update(toasts => {
|
||||||
id = Math.floor(Math.random() * 10000)
|
id = Math.max(...toasts.map(t => t.id)) + 1
|
||||||
|
|
||||||
return [
|
return [
|
||||||
...toasts,
|
...toasts,
|
||||||
|
|||||||
@@ -34,13 +34,6 @@
|
|||||||
|
|
||||||
let { data } = $props()
|
let { data } = $props()
|
||||||
|
|
||||||
// hack to fix effect bug
|
|
||||||
// TODO find cause
|
|
||||||
let comments = $state(data.comments)
|
|
||||||
$effect(() => {
|
|
||||||
comments = data.comments
|
|
||||||
})
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if (
|
if (
|
||||||
!(data.post.value.post_view.read && settings.markPostsAsRead) &&
|
!(data.post.value.post_view.read && settings.markPostsAsRead) &&
|
||||||
@@ -64,7 +57,7 @@
|
|||||||
|
|
||||||
async function reloadComments() {
|
async function reloadComments() {
|
||||||
loading = true
|
loading = true
|
||||||
comments = getClient().getComments({
|
data.comments.value = getClient().getComments({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 25,
|
limit: 25,
|
||||||
type_: 'All',
|
type_: 'All',
|
||||||
@@ -248,7 +241,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</noscript>
|
</noscript>
|
||||||
{/if}
|
{/if}
|
||||||
{#await comments}
|
{#await data.comments.value}
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
{#each new Array(10) as _, index}
|
{#each new Array(10) as _, index}
|
||||||
{_}
|
{_}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export async function load({ params, url, fetch }) {
|
|||||||
}),
|
}),
|
||||||
post: new ReactiveState(post),
|
post: new ReactiveState(post),
|
||||||
commentSort: new ReactiveState(sort),
|
commentSort: new ReactiveState(sort),
|
||||||
comments: (await awaitIfServer(comments)).data,
|
comments: new ReactiveState((await awaitIfServer(comments)).data),
|
||||||
slots: {
|
slots: {
|
||||||
sidebar: {
|
sidebar: {
|
||||||
component: CommunityCard,
|
component: CommunityCard,
|
||||||
|
|||||||
@@ -40,9 +40,10 @@
|
|||||||
focus,
|
focus,
|
||||||
virtualize = true,
|
virtualize = true,
|
||||||
}: Props = $props()
|
}: Props = $props()
|
||||||
let comments = $state(passedComments)
|
|
||||||
|
|
||||||
let commenting = $state(false)
|
let commenting = $state(false)
|
||||||
|
|
||||||
|
let comments = $derived(passedComments)
|
||||||
|
|
||||||
let tree = $state(buildCommentsTree(comments.comments))
|
let tree = $state(buildCommentsTree(comments.comments))
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
tree = buildCommentsTree(comments.comments)
|
tree = buildCommentsTree(comments.comments)
|
||||||
@@ -144,7 +145,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<div class="divide-y divide-slate-200 dark:divide-zinc-800">
|
<div class="divide-y divide-slate-200 dark:divide-zinc-800">
|
||||||
<div class="-mx-4 sm:-mx-6 px-4 sm:px-6">
|
<div class="-mx-4 sm:-mx-6 px-4 sm:px-6">
|
||||||
<Comments isParent={true} bind:nodes={tree} post={post.post_view.post} />
|
<Comments isParent={true} nodes={tree} post={post.post_view.post} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
Reference in new issue
Block a user