build: bundle dependencies and ship pre-built dist

This commit is contained in:
saberzero1 2026-04-27 21:38:16 +02:00
parent 9de1035319
commit b56138e469
No known key found for this signature in database
4 changed files with 50 additions and 10 deletions

View file

@ -1,5 +1,3 @@
import { jsx } from 'preact/jsx-runtime';
// node_modules/@quartz-community/utils/dist/lang.js
function classNames(...classes) {
return classes.filter(Boolean).join(" ");
@ -7,7 +5,7 @@ function classNames(...classes) {
// src/util/path.ts
function pathToRoot(slug) {
let rootPath = slug.split("/").filter((x) => x !== "").slice(0, -1).map((_) => "..").join("/");
let rootPath = slug.split("/").filter((x2) => x2 !== "").slice(0, -1).map((_2) => "..").join("/");
if (rootPath.length === 0) {
rootPath = ".";
}
@ -28,11 +26,33 @@ var locales = {
function i18n(locale) {
return locales[locale] || en_US_default;
}
var l;
l = { __e: function(n2, l2, u3, t2) {
for (var i2, r2, o2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
if ((r2 = i2.constructor) && null != r2.getDerivedStateFromError && (i2.setState(r2.getDerivedStateFromError(n2)), o2 = i2.__d), null != i2.componentDidCatch && (i2.componentDidCatch(n2, t2 || {}), o2 = i2.__d), o2) return i2.__E = i2;
} catch (l3) {
n2 = l3;
}
throw n2;
} }, "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Math.random().toString(8);
// node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
var f2 = 0;
function u2(e2, t2, n2, o2, i2, u3) {
t2 || (t2 = {});
var a2, c2, p2 = t2;
if ("ref" in p2) for (c2 in p2 = {}, t2) "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
var l2 = { type: e2, props: p2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f2, __i: -1, __u: 0, __source: i2, __self: u3 };
if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
return l.vnode && l.vnode(l2), l2;
}
// src/components/PageTitle.tsx
var PageTitle = ({ fileData, cfg, displayClass }) => {
const locale = cfg?.locale ?? "en-US";
const title = cfg?.pageTitle ?? i18n(locale).propertyDefaults.title;
const baseDir = pathToRoot(fileData.slug);
return /* @__PURE__ */ jsx("h2", { class: classNames(displayClass, "page-title"), children: /* @__PURE__ */ jsx("a", { href: baseDir, children: title }) });
return /* @__PURE__ */ u2("h2", { class: classNames(displayClass, "page-title"), children: /* @__PURE__ */ u2("a", { href: baseDir, children: title }) });
};
PageTitle.css = `
.page-title {

File diff suppressed because one or more lines are too long

28
dist/index.js vendored
View file

@ -1,5 +1,3 @@
import { jsx } from 'preact/jsx-runtime';
// node_modules/@quartz-community/utils/dist/lang.js
function classNames(...classes) {
return classes.filter(Boolean).join(" ");
@ -7,7 +5,7 @@ function classNames(...classes) {
// src/util/path.ts
function pathToRoot(slug) {
let rootPath = slug.split("/").filter((x) => x !== "").slice(0, -1).map((_) => "..").join("/");
let rootPath = slug.split("/").filter((x2) => x2 !== "").slice(0, -1).map((_2) => "..").join("/");
if (rootPath.length === 0) {
rootPath = ".";
}
@ -28,11 +26,33 @@ var locales = {
function i18n(locale) {
return locales[locale] || en_US_default;
}
var l;
l = { __e: function(n2, l2, u3, t2) {
for (var i2, r2, o2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
if ((r2 = i2.constructor) && null != r2.getDerivedStateFromError && (i2.setState(r2.getDerivedStateFromError(n2)), o2 = i2.__d), null != i2.componentDidCatch && (i2.componentDidCatch(n2, t2 || {}), o2 = i2.__d), o2) return i2.__E = i2;
} catch (l3) {
n2 = l3;
}
throw n2;
} }, "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Math.random().toString(8);
// node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
var f2 = 0;
function u2(e2, t2, n2, o2, i2, u3) {
t2 || (t2 = {});
var a2, c2, p2 = t2;
if ("ref" in p2) for (c2 in p2 = {}, t2) "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
var l2 = { type: e2, props: p2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f2, __i: -1, __u: 0, __source: i2, __self: u3 };
if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
return l.vnode && l.vnode(l2), l2;
}
// src/components/PageTitle.tsx
var PageTitle = ({ fileData, cfg, displayClass }) => {
const locale = cfg?.locale ?? "en-US";
const title = cfg?.pageTitle ?? i18n(locale).propertyDefaults.title;
const baseDir = pathToRoot(fileData.slug);
return /* @__PURE__ */ jsx("h2", { class: classNames(displayClass, "page-title"), children: /* @__PURE__ */ jsx("a", { href: baseDir, children: title }) });
return /* @__PURE__ */ u2("h2", { class: classNames(displayClass, "page-title"), children: /* @__PURE__ */ u2("a", { href: baseDir, children: title }) });
};
PageTitle.css = `
.page-title {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long