mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-02 02:00:31 +08:00
Update dependencies
This commit is contained in:
@@ -129,6 +129,7 @@ export default [
|
||||
},
|
||||
rules: {
|
||||
"svelte/no-at-html-tags": "off",
|
||||
"svelte/require-each-key": "off",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
},
|
||||
},
|
||||
|
||||
+40
-40
@@ -40,7 +40,7 @@ import type {
|
||||
import type { RequestOptions } from "./lib/fetcher.js";
|
||||
import type { ZodSchema } from "zod";
|
||||
|
||||
import { z, array, literal, number, object, string, union } from "zod";
|
||||
import * as z from "zod";
|
||||
|
||||
import * as repo from "./lib/repo.js";
|
||||
import { Fetcher } from "./lib/fetcher.js";
|
||||
@@ -89,45 +89,45 @@ export type {
|
||||
|
||||
export type Node = z.infer<typeof nodeSchema>;
|
||||
|
||||
const nodeSchema = object({
|
||||
id: string(),
|
||||
agent: string(),
|
||||
const nodeSchema = z.object({
|
||||
id: z.string(),
|
||||
agent: z.string(),
|
||||
config: nodeConfigSchema.nullable(),
|
||||
state: union([literal("running"), literal("stopped")]),
|
||||
avatarUrl: string().optional(),
|
||||
bannerUrl: string().optional(),
|
||||
description: string().optional(),
|
||||
state: z.union([z.literal("running"), z.literal("stopped")]),
|
||||
avatarUrl: z.string().optional(),
|
||||
bannerUrl: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
});
|
||||
|
||||
export type NodeIdentity = z.infer<typeof nodeIdentitySchema>;
|
||||
|
||||
const nodeIdentitySchema = object({
|
||||
alias: string().nullable(),
|
||||
did: string(),
|
||||
ssh: object({
|
||||
full: string(),
|
||||
hash: string(),
|
||||
const nodeIdentitySchema = z.object({
|
||||
alias: z.string().nullable(),
|
||||
did: z.string(),
|
||||
ssh: z.object({
|
||||
full: z.string(),
|
||||
hash: z.string(),
|
||||
}),
|
||||
});
|
||||
|
||||
export type NodeInfo = z.infer<typeof nodeInfoSchema>;
|
||||
|
||||
const nodeInfoSchema = object({
|
||||
message: string(),
|
||||
service: string(),
|
||||
version: string(),
|
||||
apiVersion: string(),
|
||||
nid: string(),
|
||||
path: string(),
|
||||
links: array(
|
||||
object({
|
||||
href: string(),
|
||||
rel: string(),
|
||||
type: union([
|
||||
literal("GET"),
|
||||
literal("POST"),
|
||||
literal("PUT"),
|
||||
literal("DELETE"),
|
||||
const nodeInfoSchema = z.object({
|
||||
message: z.string(),
|
||||
service: z.string(),
|
||||
version: z.string(),
|
||||
apiVersion: z.string(),
|
||||
nid: z.string(),
|
||||
path: z.string(),
|
||||
links: z.array(
|
||||
z.object({
|
||||
href: z.string(),
|
||||
rel: z.string(),
|
||||
type: z.union([
|
||||
z.literal("GET"),
|
||||
z.literal("POST"),
|
||||
z.literal("PUT"),
|
||||
z.literal("DELETE"),
|
||||
]),
|
||||
}),
|
||||
),
|
||||
@@ -135,12 +135,12 @@ const nodeInfoSchema = object({
|
||||
|
||||
export type NodePolicies = z.infer<typeof nodePoliciesSchema>;
|
||||
|
||||
const nodePoliciesSchema = object({
|
||||
rid: string(),
|
||||
policy: union([
|
||||
object({ policy: literal("block") }),
|
||||
object({
|
||||
policy: literal("allow"),
|
||||
const nodePoliciesSchema = z.object({
|
||||
rid: z.string(),
|
||||
policy: z.union([
|
||||
z.object({ policy: z.literal("block") }),
|
||||
z.object({
|
||||
policy: z.literal("allow"),
|
||||
scope: scopeSchema,
|
||||
}),
|
||||
]),
|
||||
@@ -150,8 +150,8 @@ export interface NodeStats {
|
||||
repos: { total: number };
|
||||
}
|
||||
|
||||
const nodeStatsSchema = object({
|
||||
repos: object({ total: number() }),
|
||||
const nodeStatsSchema = z.object({
|
||||
repos: z.object({ total: z.number() }),
|
||||
}) satisfies ZodSchema<NodeStats>;
|
||||
|
||||
export class HttpdClient {
|
||||
@@ -211,7 +211,7 @@ export class HttpdClient {
|
||||
path: "node/policies/repos",
|
||||
options,
|
||||
},
|
||||
array(nodePoliciesSchema),
|
||||
z.array(nodePoliciesSchema),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ export class HttpdClient {
|
||||
path: `nodes/${nid}/inventory`,
|
||||
options,
|
||||
},
|
||||
array(string()),
|
||||
z.array(z.string()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
import type { z } from "zod";
|
||||
import { array, boolean, number, object, string } from "zod";
|
||||
import * as z from "zod";
|
||||
import { authorSchema, codeLocationSchema } from "../shared";
|
||||
|
||||
export type Comment = z.infer<typeof commentSchema>;
|
||||
export type Embed = Comment["embeds"][0];
|
||||
export type Reaction = Comment["reactions"][0];
|
||||
|
||||
export const commentSchema = object({
|
||||
id: string(),
|
||||
export const commentSchema = z.object({
|
||||
id: z.string(),
|
||||
author: authorSchema,
|
||||
body: string(),
|
||||
edits: array(
|
||||
object({
|
||||
body: z.string(),
|
||||
edits: z.array(
|
||||
z.object({
|
||||
author: authorSchema,
|
||||
body: string(),
|
||||
embeds: array(object({ name: string(), content: string() })),
|
||||
timestamp: number(),
|
||||
body: z.string(),
|
||||
embeds: z.array(z.object({ name: z.string(), content: z.string() })),
|
||||
timestamp: z.number(),
|
||||
}),
|
||||
),
|
||||
embeds: array(object({ name: string(), content: string() })),
|
||||
reactions: array(object({ emoji: string(), authors: array(authorSchema) })),
|
||||
timestamp: number(),
|
||||
embeds: z.array(z.object({ name: z.string(), content: z.string() })),
|
||||
reactions: z.array(
|
||||
z.object({ emoji: z.string(), authors: z.array(authorSchema) }),
|
||||
),
|
||||
timestamp: z.number(),
|
||||
location: codeLocationSchema.nullable().optional(),
|
||||
resolved: boolean(),
|
||||
replyTo: string().nullable(),
|
||||
resolved: z.boolean(),
|
||||
replyTo: z.string().nullable(),
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ZodSchema, z } from "zod";
|
||||
import { array, literal, object, string, union } from "zod";
|
||||
import type { ZodSchema } from "zod";
|
||||
import * as z from "zod";
|
||||
|
||||
import { commentSchema } from "./comment.js";
|
||||
import { authorSchema } from "../shared.js";
|
||||
@@ -8,24 +8,24 @@ export type IssueState =
|
||||
| { status: "open" }
|
||||
| { status: "closed"; reason: "other" | "solved" };
|
||||
|
||||
const issueStateSchema = union([
|
||||
object({ status: literal("open") }),
|
||||
object({
|
||||
status: literal("closed"),
|
||||
reason: union([literal("other"), literal("solved")]),
|
||||
const issueStateSchema = z.union([
|
||||
z.object({ status: z.literal("open") }),
|
||||
z.object({
|
||||
status: z.literal("closed"),
|
||||
reason: z.union([z.literal("other"), z.literal("solved")]),
|
||||
}),
|
||||
]) satisfies ZodSchema<IssueState>;
|
||||
|
||||
export const issueSchema = object({
|
||||
id: string(),
|
||||
export const issueSchema = z.object({
|
||||
id: z.string(),
|
||||
author: authorSchema,
|
||||
title: string(),
|
||||
title: z.string(),
|
||||
state: issueStateSchema,
|
||||
discussion: array(commentSchema),
|
||||
labels: array(string()),
|
||||
assignees: array(authorSchema),
|
||||
discussion: z.array(commentSchema),
|
||||
labels: z.array(z.string()),
|
||||
assignees: z.array(authorSchema),
|
||||
});
|
||||
|
||||
export type Issue = z.infer<typeof issueSchema>;
|
||||
|
||||
export const issuesSchema = array(issueSchema) satisfies ZodSchema<Issue[]>;
|
||||
export const issuesSchema = z.array(issueSchema) satisfies ZodSchema<Issue[]>;
|
||||
|
||||
+80
-80
@@ -1,125 +1,125 @@
|
||||
import type { z } from "zod";
|
||||
import * as z from "zod";
|
||||
|
||||
import { array, boolean, literal, number, object, string, union } from "zod";
|
||||
export const scopeSchema = z.union([z.literal("followed"), z.literal("all")]);
|
||||
|
||||
export const scopeSchema = union([literal("followed"), literal("all")]);
|
||||
|
||||
export const seedingPolicySchema = union([
|
||||
object({
|
||||
policy: literal("block"),
|
||||
export const seedingPolicySchema = z.union([
|
||||
z.object({
|
||||
policy: z.literal("block"),
|
||||
}),
|
||||
object({
|
||||
policy: literal("allow"),
|
||||
z.object({
|
||||
policy: z.literal("allow"),
|
||||
scope: scopeSchema,
|
||||
}),
|
||||
]);
|
||||
|
||||
export type SeedingPolicy = z.infer<typeof seedingPolicySchema>;
|
||||
|
||||
const defaultSeedingPolicySchema = union([
|
||||
object({
|
||||
default: literal("block"),
|
||||
const defaultSeedingPolicySchema = z.union([
|
||||
z.object({
|
||||
default: z.literal("block"),
|
||||
}),
|
||||
object({
|
||||
default: literal("allow"),
|
||||
z.object({
|
||||
default: z.literal("allow"),
|
||||
scope: scopeSchema,
|
||||
}),
|
||||
]);
|
||||
|
||||
export const nodeConfigSchema = object({
|
||||
alias: string(),
|
||||
peers: union([
|
||||
object({ type: literal("static") }),
|
||||
object({ type: literal("dynamic") }),
|
||||
export const nodeConfigSchema = z.object({
|
||||
alias: z.string(),
|
||||
peers: z.union([
|
||||
z.object({ type: z.literal("static") }),
|
||||
z.object({ type: z.literal("dynamic") }),
|
||||
]),
|
||||
listen: array(string()),
|
||||
connect: array(string()),
|
||||
externalAddresses: array(string()),
|
||||
proxy: string().optional(),
|
||||
onion: union([
|
||||
object({
|
||||
mode: literal("proxy"),
|
||||
address: string(),
|
||||
}),
|
||||
object({ mode: literal("forward") }),
|
||||
]).optional(),
|
||||
log: union([
|
||||
literal("ERROR"),
|
||||
literal("WARN"),
|
||||
literal("INFO"),
|
||||
literal("DEBUG"),
|
||||
literal("TRACE"),
|
||||
]),
|
||||
network: union([literal("main"), literal("test")]),
|
||||
relay: union([literal("always"), literal("never"), literal("auto")]),
|
||||
limits: object({
|
||||
routingMaxSize: number(),
|
||||
routingMaxAge: number(),
|
||||
fetchConcurrency: number(),
|
||||
gossipMaxAge: number(),
|
||||
maxOpenFiles: number(),
|
||||
rate: object({
|
||||
inbound: object({
|
||||
fillRate: number(),
|
||||
capacity: number(),
|
||||
listen: z.array(z.string()),
|
||||
connect: z.array(z.string()),
|
||||
externalAddresses: z.array(z.string()),
|
||||
proxy: z.string().optional(),
|
||||
onion: z
|
||||
.union([
|
||||
z.object({
|
||||
mode: z.literal("proxy"),
|
||||
address: z.string(),
|
||||
}),
|
||||
outbound: object({
|
||||
fillRate: number(),
|
||||
capacity: number(),
|
||||
z.object({ mode: z.literal("forward") }),
|
||||
])
|
||||
.optional(),
|
||||
log: z.union([
|
||||
z.literal("ERROR"),
|
||||
z.literal("WARN"),
|
||||
z.literal("INFO"),
|
||||
z.literal("DEBUG"),
|
||||
z.literal("TRACE"),
|
||||
]),
|
||||
network: z.union([z.literal("main"), z.literal("test")]),
|
||||
relay: z.union([z.literal("always"), z.literal("never"), z.literal("auto")]),
|
||||
limits: z.object({
|
||||
routingMaxSize: z.number(),
|
||||
routingMaxAge: z.number(),
|
||||
fetchConcurrency: z.number(),
|
||||
gossipMaxAge: z.number(),
|
||||
maxOpenFiles: z.number(),
|
||||
rate: z.object({
|
||||
inbound: z.object({
|
||||
fillRate: z.number(),
|
||||
capacity: z.number(),
|
||||
}),
|
||||
outbound: z.object({
|
||||
fillRate: z.number(),
|
||||
capacity: z.number(),
|
||||
}),
|
||||
}),
|
||||
connection: object({
|
||||
inbound: number(),
|
||||
outbound: number(),
|
||||
connection: z.object({
|
||||
inbound: z.number(),
|
||||
outbound: z.number(),
|
||||
}),
|
||||
}),
|
||||
workers: number(),
|
||||
workers: z.number(),
|
||||
seedingPolicy: defaultSeedingPolicySchema,
|
||||
});
|
||||
|
||||
export type DefaultSeedingPolicy = z.infer<typeof defaultSeedingPolicySchema>;
|
||||
|
||||
export const configSchema = object({
|
||||
publicExplorer: string(),
|
||||
preferredSeeds: array(string()),
|
||||
cli: object({ hints: boolean() }),
|
||||
web: object({
|
||||
pinned: object({
|
||||
repositories: array(string()),
|
||||
export const configSchema = z.object({
|
||||
publicExplorer: z.string(),
|
||||
preferredSeeds: z.array(z.string()),
|
||||
cli: z.object({ hints: z.boolean() }),
|
||||
web: z.object({
|
||||
pinned: z.object({
|
||||
repositories: z.array(z.string()),
|
||||
}),
|
||||
bannerUrl: string().optional(),
|
||||
avatarUrl: string().optional(),
|
||||
description: string().optional(),
|
||||
bannerUrl: z.string().optional(),
|
||||
avatarUrl: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
}),
|
||||
node: nodeConfigSchema,
|
||||
});
|
||||
|
||||
export type Config = z.infer<typeof configSchema>;
|
||||
|
||||
export const rangeSchema = union([
|
||||
object({
|
||||
type: literal("lines"),
|
||||
range: object({ start: number(), end: number() }),
|
||||
export const rangeSchema = z.union([
|
||||
z.object({
|
||||
type: z.literal("lines"),
|
||||
range: z.object({ start: z.number(), end: z.number() }),
|
||||
}),
|
||||
object({
|
||||
type: literal("chars"),
|
||||
line: number(),
|
||||
range: object({ start: number(), end: number() }),
|
||||
z.object({
|
||||
type: z.literal("chars"),
|
||||
line: z.number(),
|
||||
range: z.object({ start: z.number(), end: z.number() }),
|
||||
}),
|
||||
]);
|
||||
|
||||
export type Range = z.infer<typeof rangeSchema>;
|
||||
|
||||
export const codeLocationSchema = object({
|
||||
commit: string(),
|
||||
path: string(),
|
||||
export const codeLocationSchema = z.object({
|
||||
commit: z.string(),
|
||||
path: z.string(),
|
||||
old: rangeSchema.optional(),
|
||||
new: rangeSchema.optional(),
|
||||
});
|
||||
|
||||
export type Author = z.infer<typeof authorSchema>;
|
||||
|
||||
export const authorSchema = object({
|
||||
id: string(),
|
||||
alias: string().optional(),
|
||||
export const authorSchema = z.object({
|
||||
id: z.string(),
|
||||
alias: z.string().optional(),
|
||||
});
|
||||
|
||||
Generated
+991
-691
File diff suppressed because it is too large
Load Diff
+33
-33
@@ -20,59 +20,59 @@
|
||||
"node": ">=18.17.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.19.0",
|
||||
"@playwright/test": "^1.50.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.4",
|
||||
"@eslint/js": "^9.27.0",
|
||||
"@playwright/test": "^1.52.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||
"@tsconfig/svelte": "^5.0.4",
|
||||
"@types/config": "^3.3.5",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@types/lodash": "^4.17.15",
|
||||
"@types/lodash": "^4.17.17",
|
||||
"@types/md5": "^2.3.5",
|
||||
"@types/node": "^20.14.12",
|
||||
"@types/node": "^22.15.21",
|
||||
"@types/wait-on": "^5.3.4",
|
||||
"@typescript-eslint/parser": "^8.22.0",
|
||||
"@typescript-eslint/parser": "^8.32.1",
|
||||
"chalk": "^5.4.1",
|
||||
"config": "^3.3.12",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-svelte": "^2.46.1",
|
||||
"execa": "^9.5.2",
|
||||
"config": "^4.0.0",
|
||||
"eslint": "^9.27.0",
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-plugin-svelte": "^3.9.0",
|
||||
"execa": "^9.5.3",
|
||||
"get-port": "^7.1.0",
|
||||
"globals": "^15.14.0",
|
||||
"happy-dom": "^16.8.1",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-svelte": "^3.3.3",
|
||||
"svelte-check": "^4.1.4",
|
||||
"svelte-eslint-parser": "^0.43.0",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript-eslint": "^8.22.0",
|
||||
"vite": "^5.4.14",
|
||||
"vite-plugin-virtual": "^0.3.0",
|
||||
"vitest": "^3.0.4",
|
||||
"wait-on": "^8.0.2"
|
||||
"globals": "^16.1.0",
|
||||
"happy-dom": "^17.4.7",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier-plugin-svelte": "^3.4.0",
|
||||
"svelte-check": "^4.2.1",
|
||||
"svelte-eslint-parser": "^1.2.0",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.32.1",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-virtual": "^0.4.0",
|
||||
"vitest": "^3.1.4",
|
||||
"wait-on": "^8.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radicle/gray-matter": "4.1.0",
|
||||
"@wooorm/starry-night": "^3.6.0",
|
||||
"@wooorm/starry-night": "^3.7.0",
|
||||
"async-mutex": "^0.5.0",
|
||||
"baconjs": "^3.0.19",
|
||||
"baconjs": "^3.0.23",
|
||||
"bs58": "^6.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"compare-versions": "^6.1.1",
|
||||
"dompurify": "^3.2.4",
|
||||
"dompurify": "^3.2.6",
|
||||
"fuzzysort": "^3.1.0",
|
||||
"hast-util-to-dom": "^4.0.0",
|
||||
"hast-util-to-html": "^9.0.4",
|
||||
"hast-util-to-dom": "^4.0.1",
|
||||
"hast-util-to-html": "^9.0.5",
|
||||
"lodash": "^4.17.21",
|
||||
"lru-cache": "^11.0.2",
|
||||
"marked": "^15.0.6",
|
||||
"marked-emoji": "^1.4.3",
|
||||
"lru-cache": "^11.1.0",
|
||||
"marked": "^15.0.12",
|
||||
"marked-emoji": "^2.0.0",
|
||||
"marked-footnote": "^1.2.4",
|
||||
"marked-katex-extension": "^5.1.4",
|
||||
"marked-linkify-it": "^3.1.12",
|
||||
"md5": "^2.3.0",
|
||||
"svelte": "^5.19.6",
|
||||
"svelte": "^5.30.0",
|
||||
"twemoji": "^14.0.2",
|
||||
"zod": "^3.24.1"
|
||||
"zod": "^3.25.16"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
height="48"
|
||||
width="48"
|
||||
fill="currentColor"
|
||||
viewBox={"0 0 24 24"}>
|
||||
viewBox="0 0 24 24">
|
||||
{#if name === "alert"}
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
}
|
||||
|
||||
.title * {
|
||||
line-clamp: 1;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -146,7 +145,7 @@
|
||||
<ActivityDiagram
|
||||
id={repo.rid}
|
||||
viewBoxHeight={200}
|
||||
styleColor="var(--color-foreground-primary"
|
||||
styleColor="var(--color-foreground-primary)"
|
||||
activity={repoInfo.activity} />
|
||||
</div>
|
||||
<div class="title">
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
{baseUrl}
|
||||
{rawPath}
|
||||
id={root.id}
|
||||
lastEdit={root.edits.length > 1 ? root.edits.pop() : undefined}
|
||||
lastEdit={root.edits.length > 1 ? root.edits.at(-1) : undefined}
|
||||
authorId={root.author.id}
|
||||
authorAlias={root.author.alias}
|
||||
reactions={root.reactions}
|
||||
@@ -62,7 +62,7 @@
|
||||
<CommentComponent
|
||||
{baseUrl}
|
||||
{rawPath}
|
||||
lastEdit={reply.edits.length > 1 ? reply.edits.pop() : undefined}
|
||||
lastEdit={reply.edits.length > 1 ? reply.edits.at(-1) : undefined}
|
||||
id={reply.id}
|
||||
authorId={reply.author.id}
|
||||
authorAlias={reply.author.alias}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
// with Radicle Linking Exception. For full terms see the included
|
||||
// LICENSE file.
|
||||
|
||||
//@ts-expect-error the typescript bindings are out of date.
|
||||
import * as Bacon from "baconjs";
|
||||
|
||||
// A task executor that runs only one task concurrently. If a new task
|
||||
|
||||
@@ -2,15 +2,15 @@ import type { BaseUrl } from "@http-client";
|
||||
|
||||
import isEqual from "lodash/isEqual";
|
||||
import storedWritable from "@app/lib/localStore";
|
||||
import { array, number, string, object } from "zod";
|
||||
import * as z from "zod";
|
||||
import { get } from "svelte/store";
|
||||
|
||||
import config from "@app/lib/config";
|
||||
|
||||
const seedSchema = object({
|
||||
hostname: string(),
|
||||
port: number(),
|
||||
scheme: string(),
|
||||
const seedSchema = z.object({
|
||||
hostname: z.string(),
|
||||
port: z.number(),
|
||||
scheme: z.string(),
|
||||
});
|
||||
|
||||
// Seed that is opened on cold app start on the landing page.
|
||||
@@ -24,7 +24,7 @@ export const selectedSeed = storedWritable<BaseUrl | undefined>(
|
||||
// A list of seeds that the user has explicitly bookmarked.
|
||||
export const bookmarkedSeeds = storedWritable<BaseUrl[]>(
|
||||
"bookmarkedSeeds",
|
||||
array(seedSchema),
|
||||
z.array(seedSchema),
|
||||
[],
|
||||
!window.localStorage,
|
||||
);
|
||||
|
||||
@@ -64,7 +64,9 @@
|
||||
$: if (visible) {
|
||||
syntaxHighlightingLoading = true;
|
||||
void highlightContent().then(output => {
|
||||
// eslint-disable-next-line
|
||||
highlighting = output;
|
||||
// eslint-disable-next-line
|
||||
syntaxHighlightingLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
style:font-family="var(--font-family-monospace)">
|
||||
{fromCommit.substring(0, 6)}..{toCommit.substring(0, 6)}
|
||||
</span>
|
||||
<Icon name={"chevron-down"} />
|
||||
<Icon name="chevron-down" />
|
||||
</Button>
|
||||
|
||||
@@ -297,10 +297,7 @@
|
||||
<!-- Footer -->
|
||||
{#if !collapsedOnly}
|
||||
<div class="sidebar-footer" style:flex-direction="row">
|
||||
<Button
|
||||
title={"Collapse"}
|
||||
on:click={toggleSidebar}
|
||||
variant="background">
|
||||
<Button title="Collapse" on:click={toggleSidebar} variant="background">
|
||||
<div class="icon" class:expanded>
|
||||
<Icon name="chevron-left" />
|
||||
</div>
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
styleBorderRadius="0"
|
||||
variant={!preview ? "selected" : "not-selected"}
|
||||
on:click={() => {
|
||||
// eslint-disable-next-line
|
||||
preview = false;
|
||||
}}>
|
||||
<Icon name="chevron-left-right" />Code
|
||||
@@ -168,6 +169,7 @@
|
||||
variant={preview ? "selected" : "not-selected"}
|
||||
on:click={() => {
|
||||
window.location.hash = "";
|
||||
// eslint-disable-next-line
|
||||
preview = true;
|
||||
}}>
|
||||
<Icon name="eye-open" />Preview
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
slot="toggle"
|
||||
let:expanded
|
||||
let:toggle
|
||||
styleBorderRadius={"var(--border-radius-tiny) 0 0 var(--border-radius-tiny)"}
|
||||
styleBorderRadius="var(--border-radius-tiny) 0 0 var(--border-radius-tiny)"
|
||||
styleWidth="100%"
|
||||
on:click={toggle}
|
||||
title="Change branch"
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
tabindex="0"
|
||||
class="folder"
|
||||
on:click={() => {
|
||||
// eslint-disable-next-line
|
||||
expanded = !expanded;
|
||||
}}>
|
||||
<div class="icon-container" class:expanded>
|
||||
|
||||
@@ -94,7 +94,7 @@ describe("worker", () => {
|
||||
});
|
||||
|
||||
const outputs: number[] = [];
|
||||
w.output.onValue((value: never) => outputs.push(value));
|
||||
w.output.onValue(value => outputs.push(value));
|
||||
|
||||
await w.submit(1);
|
||||
await w.submit(2);
|
||||
|
||||
Reference in New Issue
Block a user