PWA
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m24s

This commit is contained in:
eewing
2026-02-19 07:41:49 -06:00
parent 5776a1fdb1
commit c0fae761da
10919 changed files with 874329 additions and 13511 deletions
@@ -1,15 +1,22 @@
import { l as lifecycle_function_unavailable, h as hasContext, g as getContext, s as setContext, d as derived, a as getAllContexts, p as props_id, b as attributes, c as bind_props, e as spread_props, f as escape_html } from "../../chunks/index2.js";
import "clsx";
import { l as lifecycle_function_unavailable, g as getContext, h as hasContext, s as setContext, d as derived, a as getAllContexts, p as props_id, b as attributes, c as bind_props, e as spread_props, f as head, i as escape_html } from "../../chunks/index2.js";
import "@sveltejs/kit/internal";
import "../../chunks/exports.js";
import "../../chunks/utils.js";
import { g as get$2 } from "../../chunks/index.js";
import "@sveltejs/kit/internal/server";
import { o as on } from "../../chunks/root.js";
import "../../chunks/state.svelte.js";
import "clsx";
import { c as cn } from "../../chunks/utils2.js";
import { i as isWritableSymbol, B as BoxSymbol, b as boxFrom, a as boxWith, c as boxFlatten, t as toReadonlyBox, d as isBox, e as isWritableBox, s as styleToString, f as isObject, g as executeCallbacks, h as attachRef, j as createBitsAttrs, k as getDataOpenClosed, l as boolToEmptyStrOrUndef, m as boolToStr, n as simpleBox, o as composeHandlers, p as createId, q as mergeProps, r as cssToStyleObj, u as getDataChecked, v as getAriaChecked, w as boolToTrueOrUndef, L as Label } from "../../chunks/label.js";
import { isTabbable, tabbable, isFocusable, focusable } from "tabbable";
import { computePosition, offset, shift, limitShift, flip, size, arrow, hide } from "@floating-ui/dom";
import { s as siteSlugs } from "../../chunks/sites.js";
function html(value) {
var html2 = String(value);
var open = "<!---->";
return open + html2 + "<!---->";
}
function mount() {
lifecycle_function_unavailable("mount");
}
@@ -18,6 +25,27 @@ function unmount() {
}
async function tick() {
}
const getStores = () => {
const stores$1 = getContext("__svelte__");
return {
/** @type {typeof page} */
page: {
subscribe: stores$1.page.subscribe
},
/** @type {typeof navigating} */
navigating: {
subscribe: stores$1.navigating.subscribe
},
/** @type {typeof updated} */
updated: stores$1.updated
};
};
const page = {
subscribe(fn) {
const store = getStores().page;
return store.subscribe(fn);
}
};
function box(initialValue) {
let current = initialValue;
return {
@@ -2219,6 +2247,50 @@ class AvatarRootState {
return this.#props($$value);
}
}
class AvatarImageState {
static create(opts) {
return new AvatarImageState(opts, AvatarRootContext.get());
}
opts;
root;
attachment;
constructor(opts, root) {
this.opts = opts;
this.root = root;
this.attachment = attachRef(this.opts.ref);
watch.pre(
[
() => this.opts.src.current,
() => this.opts.crossOrigin.current
],
([src, crossOrigin]) => {
if (!src) {
this.root.opts.loadingStatus.current = "error";
return;
}
this.root.loadImage(src, crossOrigin, this.opts.referrerPolicy.current);
}
);
}
#props = derived(() => ({
id: this.opts.id.current,
style: {
display: this.root.opts.loadingStatus.current === "loaded" ? "block" : "none"
},
"data-status": this.root.opts.loadingStatus.current,
[avatarAttrs.image]: "",
src: this.opts.src.current,
crossorigin: this.opts.crossOrigin.current,
referrerpolicy: this.opts.referrerPolicy.current,
...this.attachment
}));
get props() {
return this.#props();
}
set props($$value) {
return this.#props($$value);
}
}
class AvatarFallbackState {
static create(opts) {
return new AvatarFallbackState(opts, AvatarRootContext.get());
@@ -2292,6 +2364,40 @@ function Avatar$1($$renderer, $$props) {
bind_props($$props, { loadingStatus, ref });
});
}
function Avatar_image$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const uid = props_id($$renderer2);
let {
src,
child,
id = createId(uid),
ref = null,
crossorigin = void 0,
referrerpolicy = void 0,
$$slots,
$$events,
...restProps
} = $$props;
const imageState = AvatarImageState.create({
src: boxWith(() => src),
id: boxWith(() => id),
ref: boxWith(() => ref, (v) => ref = v),
crossOrigin: boxWith(() => crossorigin),
referrerPolicy: boxWith(() => referrerpolicy)
});
const mergedProps = mergeProps(restProps, imageState.props);
if (child) {
$$renderer2.push("<!--[-->");
child($$renderer2, { props: mergedProps });
$$renderer2.push(`<!---->`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<img${attributes({ ...mergedProps, src })} onload="this.__e=event" onerror="this.__e=event"/>`);
}
$$renderer2.push(`<!--]-->`);
bind_props($$props, { ref });
});
}
function Avatar_fallback$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const uid = props_id($$renderer2);
@@ -3644,6 +3750,46 @@ function Avatar($$renderer, $$props) {
bind_props($$props, { ref, loadingStatus });
});
}
function Avatar_image($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
$$slots,
$$events,
...restProps
} = $$props;
let $$settled = true;
let $$inner_renderer;
function $$render_inner($$renderer3) {
$$renderer3.push("<!---->");
Avatar_image$1?.($$renderer3, spread_props([
{
"data-slot": "avatar-image",
class: cn("aspect-square size-full", className)
},
restProps,
{
get ref() {
return ref;
},
set ref($$value) {
ref = $$value;
$$settled = false;
}
}
]));
$$renderer3.push(`<!---->`);
}
do {
$$settled = true;
$$inner_renderer = $$renderer2.copy();
$$render_inner($$inner_renderer);
} while (!$$settled);
$$renderer2.subsume($$inner_renderer);
bind_props($$props, { ref });
});
}
function Avatar_fallback($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
@@ -3899,31 +4045,44 @@ function Switch($$renderer, $$props) {
bind_props($$props, { ref, checked });
});
}
const pwaInfo = { "webManifest": { "linkTag": '<link rel="manifest" href="/manifest.webmanifest">' } };
function _layout($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let { data, children } = $$props;
let pathname = get$2(page).url.pathname;
const isSiteRoute = siteSlugs.includes(pathname.slice(1).split("/")[0] ?? "");
let darkmode = false;
let onDarkmodeChange = () => {
};
head("12qhfyh", $$renderer2, ($$renderer3) => {
{
$$renderer3.push("<!--[-->");
$$renderer3.push(`${html(pwaInfo.webManifest.linkTag)}`);
}
$$renderer3.push(`<!--]-->`);
});
$$renderer2.push(`<div class="app-shell">`);
if (data.user) {
if (data.user && !isSiteRoute) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<header class="flex items-center justify-between w-full"><h1 class="text-lg font-semibold">Base</h1> `);
$$renderer2.push(`<header class="fixed right-0 top-0 z-50 flex items-center gap-2 p-2 pr-[max(0.5rem,env(safe-area-inset-right))] pt-[max(0.5rem,env(safe-area-inset-top))]" aria-label="User menu">`);
$$renderer2.push("<!---->");
Dropdown_menu?.($$renderer2, {
children: ($$renderer3) => {
$$renderer3.push("<!---->");
Dropdown_menu_trigger?.($$renderer3, {
class: "rounded-full border border-input bg-background hover:bg-accent",
class: "border-0 bg-transparent hover:bg-muted inline-flex size-10 shrink-0 items-center justify-center rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
onclick: (e) => e.preventDefault(),
children: ($$renderer4) => {
$$renderer4.push("<!---->");
Avatar?.($$renderer4, {
class: "h-8 w-8",
class: "size-10 rounded-full",
children: ($$renderer5) => {
$$renderer5.push("<!---->");
Avatar_image?.($$renderer5, { src: data.user.avatar, alt: "" });
$$renderer5.push(`<!----> `);
$$renderer5.push("<!---->");
Avatar_fallback?.($$renderer5, {
class: "text-xs",
class: "bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-full text-sm font-medium",
children: ($$renderer6) => {
$$renderer6.push(`<!---->${escape_html(data.user.name ? String(data.user.name).slice(0, 2).toUpperCase() : data.user.email ? String(data.user.email).slice(0, 2).toUpperCase() : "?")}`);
},
@@ -3941,7 +4100,7 @@ function _layout($$renderer, $$props) {
$$renderer3.push("<!---->");
Dropdown_menu_content?.($$renderer3, {
align: "end",
class: "w-48",
class: "w-56",
children: ($$renderer4) => {
$$renderer4.push(`<div class="relative flex cursor-default items-center gap-2 rounded-sm py-1.5 px-2 text-sm outline-none select-none" role="button" tabindex="0">`);
Label($$renderer4, {
@@ -3973,9 +4132,9 @@ function _layout($$renderer, $$props) {
} else {
$$renderer2.push("<!--[!-->");
}
$$renderer2.push(`<!--]--> <main class="flex-1 flex flex-col gap-4 min-h-0">`);
$$renderer2.push(`<!--]--> <div class="page-view">`);
children?.($$renderer2);
$$renderer2.push(`<!----></main></div>`);
$$renderer2.push(`<!----></div></div>`);
});
}
export {