Skip to content

Commit ef6309e

Browse files
Merge branch 'main' into partners-catalog
2 parents 1aa70c9 + f6cd1ab commit ef6309e

File tree

46 files changed

+697
-654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+697
-654
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-bullseye as base
1+
FROM node:20-bullseye AS base
22

33
ARG PUBLIC_APPWRITE_ENDPOINT
44
ENV PUBLIC_APPWRITE_ENDPOINT ${PUBLIC_APPWRITE_ENDPOINT}
@@ -60,13 +60,13 @@ COPY pnpm-lock.yaml pnpm-lock.yaml
6060
RUN npm i -g corepack@latest
6161
RUN corepack enable
6262

63-
FROM base as build
63+
FROM base AS build
6464

6565
COPY . .
6666
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
6767
RUN NODE_OPTIONS=--max_old_space_size=16384 pnpm run build
6868

69-
FROM base as final
69+
FROM base AS final
7070

7171
# Install fontconfig
7272
COPY ./local-fonts /usr/share/fonts

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"pnpm": {
116116
"onlyBuiltDependencies": [
117117
"@parcel/watcher",
118+
"@tailwindcss/oxide",
118119
"core-js",
119120
"esbuild",
120121
"sharp",

src/lib/components/MultiCodeContextless.svelte

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { getCodeHtml, type Language } from '$lib/utils/code';
44
import { copy } from '$lib/utils/copy';
55
import { platformMap } from '$lib/utils/references';
6-
import { writable } from 'svelte/store';
6+
import { SvelteSet } from 'svelte/reactivity';
77
88
interface Props {
99
selected?: Language;
@@ -14,18 +14,26 @@
1414
1515
let { selected = $bindable('js'), data = [], width = null, height = null }: Props = $props();
1616
17-
let snippets = $derived(writable(new Set(data.map((d) => d.language))));
18-
const getSnippets = () => {
19-
return snippets;
20-
};
21-
22-
let content = $derived(data.find((d) => d.language === selected)?.content ?? '');
23-
24-
let platform = $derived(data.find((d) => d.language === selected)?.platform ?? '');
17+
const snippets = $derived(new SvelteSet(data.map((d) => d.language)));
18+
const content = $derived(data.find((d) => d.language === selected)?.content ?? '');
19+
const platform = $derived(data.find((d) => d.language === selected)?.platform ?? '');
20+
const result = $derived(
21+
getCodeHtml({
22+
content,
23+
language: selected ?? 'sh',
24+
withLineNumbers: true
25+
})
26+
);
27+
const options = $derived(
28+
Array.from(snippets).map((language) => ({
29+
value: language,
30+
label: platformMap[language]
31+
}))
32+
);
2533
26-
getSnippets().subscribe((n) => {
27-
if (selected === null && n.size > 0) {
28-
selected = Array.from(n)[0] as Language;
34+
$effect(() => {
35+
if (selected === null && snippets.size > 0) {
36+
selected = Array.from(snippets)[0] as Language;
2937
}
3038
});
3139
@@ -35,9 +43,7 @@
3543
} as const;
3644
type CopyStatusType = keyof typeof CopyStatus;
3745
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
38-
39-
let copyText = $state<CopyStatusValue>(CopyStatus.Copy);
40-
46+
let copyText: CopyStatusValue = $state(CopyStatus.Copy);
4147
async function handleCopy() {
4248
await copy(content);
4349
@@ -46,28 +52,13 @@
4652
copyText = CopyStatus.Copy;
4753
}, 1000);
4854
}
49-
50-
let result = $derived(
51-
getCodeHtml({
52-
content,
53-
language: selected ?? 'sh',
54-
withLineNumbers: true
55-
})
56-
);
57-
let options = $derived(
58-
Array.from($snippets).map((language) => ({
59-
value: language,
60-
label: platformMap[language]
61-
}))
62-
);
6355
</script>
6456

6557
<section
6658
class="dark web-code-snippet mx-auto w-full lg:!max-w-[90vw]"
6759
aria-label="code-snippet panel"
68-
style={`width: ${width ? width / 16 + 'rem' : 'inherit'}; height: ${
69-
height ? height / 16 + 'rem' : 'inherit'
70-
}`}
60+
style:width={width ? width / 16 + 'rem' : 'inherit'}
61+
style:height={height ? height / 16 + 'rem' : 'inherit'}
7162
>
7263
<header class="web-code-snippet-header">
7364
<div class="web-code-snippet-header-start">
@@ -79,9 +70,9 @@
7970
</div>
8071
<div class="web-code-snippet-header-end">
8172
<ul class="buttons-list flex gap-3">
82-
{#if $snippets.entries.length}
73+
{#if snippets.size}
8374
<li class="buttons-list-item flex self-center">
84-
<Select bind:value={selected} bind:options />
75+
<Select bind:value={selected} {options} />
8576
</li>
8677
{/if}
8778
<li class="buttons-list-item" style="padding-inline-start: 13px">
@@ -104,7 +95,7 @@
10495
</header>
10596
<div
10697
class="web-code-snippet-content overflow-auto"
107-
style={`height: ${height ? height / 16 + 'rem' : 'inherit'}`}
98+
style:height={height ? height / 16 + 'rem' : 'inherit'}
10899
>
109100
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
110101
{@html result}

src/lib/components/PreFooter.svelte

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
{plan.description}
117117
</p>
118118
<Button
119+
href={plan.buttonLink}
119120
event={plan.eventName}
120121
variant={plan.buttonVariant}
121122
class="w-full! flex-3 self-end md:w-fit"
@@ -135,29 +136,16 @@
135136
flex-basis: 5rem !important;
136137
}
137138
138-
.web-strip-plans-item-wrapper {
139-
gap: 2.65rem;
140-
}
141-
142139
@media (min-width: 1024px) and (max-width: 1224px) {
143140
.web-strip-plans-info {
144141
flex-basis: 1rem !important;
145142
}
146-
147-
.web-strip-plans-item-wrapper {
148-
gap: 1.25rem !important;
149-
inline-size: 100% !important;
150-
}
151143
}
152144
153145
@media (max-width: 1024px) {
154146
.web-strip-plans-info {
155147
flex-basis: 3rem !important;
156148
}
157-
158-
.web-strip-plans-item-wrapper {
159-
gap: 1.25rem !important;
160-
}
161149
}
162150
163151
.web-pre-footer-bg {

src/lib/components/shared/button.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { classNames } from '$lib/utils/classnames';
33
import type { HTMLButtonAttributes, HTMLAnchorAttributes } from 'svelte/elements';
44
import { cva, type VariantProps } from 'cva';
5-
import InlineTag from '../ui/InlineTag.svelte';
5+
import InlineTag from '../ui/inline-tag.svelte';
66
77
const button = cva(
88
[

src/lib/components/shared/dialog.svelte

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { fade, scale } from 'svelte/transition';
33
import { createDialog, melt } from '@melt-ui/svelte';
44
import type { Snippet } from 'svelte';
5-
import { browser } from '$app/environment';
65
76
type Props = {
87
url: string;
@@ -12,7 +11,7 @@
1211
};
1312
1413
const {
15-
elements: { portalled, trigger, content, overlay },
14+
elements: { trigger, content, overlay },
1615
states: { open }
1716
} = createDialog({
1817
forceVisible: true,
@@ -27,14 +26,9 @@
2726
{@render children()}
2827
</div>
2928
{:else}
30-
<button
31-
class="contents cursor-pointer"
32-
onclick={() => {
33-
if (browser && window) window.open(url, '_blank');
34-
}}
35-
>
29+
<a href={url} target="_blank" rel="noopener noreferrer" class="contents cursor-pointer">
3630
{@render children()}
37-
</button>
31+
</a>
3832
{/if}
3933

4034
{#if $open}

src/lib/components/ui/icon/icon.svelte

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<script lang="ts">
2-
import { classNames } from '$lib/utils/classnames';
3-
import type { SvelteHTMLElements } from 'svelte/elements';
2+
import type { SVGAttributes } from 'svelte/elements';
43
import type { IconType } from './types';
54
6-
type Props = SvelteHTMLElements['svg'] & {
5+
type Props = SVGAttributes<SVGElement> & {
76
class?: string;
8-
name: IconType;
7+
name?: IconType;
98
};
10-
119
const {
1210
xmlns = 'http://www.w3.org/2000/svg',
1311
viewBox = '0 0 24 24',

src/lib/layouts/Docs.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts" module>
2-
import { navigating } from '$app/stores';
32
import { writable } from 'svelte/store';
43
54
export type DocsLayoutVariant = 'default' | 'expanded' | 'two-side-navs';
@@ -40,15 +39,14 @@
4039
</script>
4140

4241
<script lang="ts">
43-
import { run } from 'svelte/legacy';
44-
4542
import { Search, IsLoggedIn } from '$lib/components';
4643
import { isMac } from '$lib/utils/platform';
4744
import { getContext, setContext } from 'svelte';
4845
import { SOCIAL_STATS } from '$lib/constants';
4946
import { page } from '$app/state';
5047
import { getAppwriteDashboardUrl } from '$lib/utils/dashboard';
5148
import { Button, Icon, InlineTag } from '$lib/components/ui';
49+
import { afterNavigate } from '$app/navigation';
5250
5351
interface Props {
5452
variant?: DocsLayoutVariant;
@@ -70,7 +68,7 @@
7068
$layoutState.currentVariant = variant;
7169
});
7270
73-
navigating.subscribe(() => {
71+
afterNavigate(() => {
7472
layoutState.update((n) => ({
7573
...n,
7674
showReferences: false,

src/lib/layouts/Sidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
rel="noopener noreferrer"
139139
class="web-u-inline-width-100-percent-mobile"
140140
>
141-
<Icon class="star" aria-hidden="true"></Icon>
141+
<Icon class="star" aria-hidden />
142142
<span class="text">Star on GitHub</span>
143143
<InlineTag>{SOCIAL_STATS.GITHUB.STAT}</InlineTag>
144144
</Button>

src/routes/(init)/init/(components)/event-carousel.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@
9898
on:emblaInit={onEmblaInit}
9999
>
100100
<div class="embla__container flex">
101-
{#each events as _}
101+
{#each events as { poster, title }}
102102
<div
103103
class="embla__slide bg-card/90 mr-4 min-w-0 [flex:0_0_33%] items-center rounded-lg p-4"
104104
>
105-
<img src={_.poster} class="m-auto rounded-t" />
106-
<h3 class="mt-0.5 text-base font-medium">{_.title}</h3>
105+
<img alt={title} src={poster} class="m-auto rounded-t" />
106+
<h3 class="mt-0.5 text-base font-medium">{title}</h3>
107107
</div>
108108
{/each}
109109
</div>

0 commit comments

Comments
 (0)