@leadertechie/personal-site-kit 0.1.0-alpha.10 → 0.1.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"website-api.d.ts","sourceRoot":"","sources":["../../src/api/website-api.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE3E,qBAAa,UAAU;IACrB,OAAO,CAAC,cAAc,CAAiC;IAEhD,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;IAIzD,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,UAAU;IAgBL,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;CA0FlE"}
1
+ {"version":3,"file":"website-api.d.ts","sourceRoot":"","sources":["../../src/api/website-api.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE3E,qBAAa,UAAU;IACrB,OAAO,CAAC,cAAc,CAAiC;IAEhD,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;IAIzD,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,UAAU;IAqBL,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;CA0FlE"}
package/dist/api.js CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WebsiteAPI } from "./chunks/website-api-CuyeBej-.js";
2
- import { A, B, M, R, c, a, g, b, d, h, e, r, s, v } from "./chunks/website-api-CuyeBej-.js";
1
+ import { W as WebsiteAPI } from "./chunks/website-api-DTaVHBO_.js";
2
+ import { A, B, M, R, c, a, g, b, d, h, e, r, s, v } from "./chunks/website-api-DTaVHBO_.js";
3
3
  const defaultAPI = new WebsiteAPI();
4
4
  export {
5
5
  A as AUTH_KV,
@@ -1,6 +1,6 @@
1
1
  import { css, html, LitElement } from "lit";
2
2
  import { customElement, property, state } from "lit/decorators.js";
3
- import { S as SiteStore } from "./site-store-Vqmjjz9c.js";
3
+ import { S as SiteStore } from "./site-store-CGV9c2DI.js";
4
4
  import { MarkdownPipeline } from "@leadertechie/r2tohtml";
5
5
  const aboutmeStyles = css`
6
6
  :host {
@@ -2280,11 +2280,16 @@ class FooterComponent extends (_a$2 = LitElement, _copyright_dec = [property({ t
2280
2280
  __privateAdd$2(this, _footerLinks, __runInitializers$2(_init$2, 12, this, [])), __runInitializers$2(_init$2, 15, this);
2281
2281
  }
2282
2282
  render() {
2283
+ const links = this.footerLinks && this.footerLinks.length > 0 ? this.footerLinks : [
2284
+ { text: "LinkedIn", link: "https://linkedin.com" },
2285
+ { text: "GitHub", link: "https://github.com" },
2286
+ { text: "Email", link: "mailto:you@example.com" }
2287
+ ];
2283
2288
  return html`
2284
2289
  <div class="footer-content">
2285
- <span>&copy; ${this.copyright}</span>
2290
+ <span>&copy; ${this.copyright || "2026 Personal Site"}</span>
2286
2291
  <span class="links">
2287
- ${(this.footerLinks || []).map(
2292
+ ${links.map(
2288
2293
  (link) => {
2289
2294
  const isExternal = link.link.startsWith("http") || link.link.startsWith("mailto:");
2290
2295
  return html`<a
@@ -21,7 +21,10 @@ async function initializeConfig(infra) {
21
21
  const res = await fetch(`${activeConfig.apiUrl}/api/static`);
22
22
  if (res.ok) {
23
23
  const remoteStatic = await res.json().catch(() => ({}));
24
- activeConfig = { ...activeConfig, ...remoteStatic };
24
+ const filteredStatic = Object.fromEntries(
25
+ Object.entries(remoteStatic).filter(([_, v]) => v != null && v !== "")
26
+ );
27
+ activeConfig = { ...activeConfig, ...filteredStatic };
25
28
  }
26
29
  } catch (e) {
27
30
  console.warn("Failed to load static details from R2, using defaults.");
@@ -1,4 +1,4 @@
1
- import { S as SiteStore } from "./site-store-Vqmjjz9c.js";
1
+ import { S as SiteStore } from "./site-store-CGV9c2DI.js";
2
2
  import { MarkdownPipeline } from "@leadertechie/r2tohtml";
3
3
  const pipeline = new MarkdownPipeline({
4
4
  imagePathPrefix: "images/",
@@ -804,24 +804,31 @@ class WebsiteAPI {
804
804
  return response;
805
805
  }
806
806
  addAdminCORSHeaders(response, origin) {
807
- const allowOrigin = origin && (origin.includes("localhost") || origin.includes("127.0.0.1")) ? origin : "same-origin";
808
- response.headers.set("Access-Control-Allow-Origin", allowOrigin);
809
- response.headers.set("Access-Control-Allow-Credentials", "true");
807
+ const isLocal = origin && (origin.includes("localhost") || origin.includes("127.0.0.1"));
808
+ if (isLocal) {
809
+ response.headers.set("Access-Control-Allow-Origin", origin);
810
+ response.headers.set("Access-Control-Allow-Credentials", "true");
811
+ }
810
812
  response.headers.set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
811
813
  response.headers.set("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Session-Token");
812
814
  return response;
813
815
  }
814
816
  handleCORS(origin) {
815
- const allowOrigin = origin && (origin.includes("localhost") || origin.includes("127.0.0.1")) ? origin : "*";
817
+ const isLocal = origin && (origin.includes("localhost") || origin.includes("127.0.0.1"));
818
+ const allowOrigin = isLocal ? origin : "*";
819
+ const headers = {
820
+ "Access-Control-Allow-Origin": allowOrigin,
821
+ "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
822
+ "Access-Control-Allow-Headers": "Content-Type, Authorization, X-Session-Token",
823
+ "Access-Control-Max-Age": "86400"
824
+ };
825
+ if (isLocal) {
826
+ headers["Access-Control-Allow-Credentials"] = "true";
827
+ }
816
828
  return new Response(null, {
817
- status: 200,
818
- headers: {
819
- "Access-Control-Allow-Origin": allowOrigin,
820
- "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
821
- "Access-Control-Allow-Headers": "Content-Type, Authorization, X-Session-Token",
822
- "Access-Control-Allow-Credentials": "true",
823
- "Access-Control-Max-Age": "86400"
824
- }
829
+ status: 204,
830
+ // No content for OPTIONS
831
+ headers
825
832
  });
826
833
  }
827
834
  async fetch(request, env) {
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A, B, M, R, W, c, a, g, b, d, h, e, r, s, v } from "./chunks/website-api-CuyeBej-.js";
1
+ import { A, B, M, R, W, c, a, g, b, d, h, e, r, s, v } from "./chunks/website-api-DTaVHBO_.js";
2
2
  import { WebsitePrerender } from "./prerender.js";
3
- import { A as A2, a as a2, b as b2, c as c2, d as d2, e as e2, f, g as g2, h as h2, i, B as B2, F, M as M2, j, S, k } from "./chunks/index-_AMi6ort.js";
4
- import { S as S2, g as g3, i as i2, r as r2 } from "./chunks/site-store-Vqmjjz9c.js";
5
- import { R as R2, T, W as W2, b as b3, c as c3, g as g4, r as r3 } from "./chunks/template-C1tMqlPY.js";
3
+ import { A as A2, a as a2, b as b2, c as c2, d as d2, e as e2, f, g as g2, h as h2, i, B as B2, F, M as M2, j, S, k } from "./chunks/index-B2jGIzSi.js";
4
+ import { S as S2, g as g3, i as i2, r as r2 } from "./chunks/site-store-CGV9c2DI.js";
5
+ import { R as R2, T, W as W2, b as b3, c as c3, g as g4, r as r3 } from "./chunks/template-Ccxil4s-.js";
6
6
  export {
7
7
  A as AUTH_KV,
8
8
  A2 as AdminAboutMeSection,
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/prerender/template.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAyBD,eAAO,MAAM,kBAAkB,GAAU,2EAOtC,aAAa,KAAG,OAAO,CAAC,MAAM,CAyBhC,CAAC"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/prerender/template.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAyBD,eAAO,MAAM,kBAAkB,GAAU,2EAOtC,aAAa,KAAG,OAAO,CAAC,MAAM,CA0BhC,CAAC"}
package/dist/prerender.js CHANGED
@@ -35,6 +35,7 @@ const createHtmlTemplate = async ({
35
35
  <html lang="en" data-theme="light">
36
36
  <head>
37
37
  <meta charset="UTF-8" />
38
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' data: https:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; connect-src 'self' https: http://localhost:* http://127.0.0.1:*; font-src 'self' data: https:;" />
38
39
  <link rel="icon" type="image/svg+xml" href="/api/logo" />
39
40
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
40
41
  <title>${title}</title>
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAiB,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,cAAc,SAAS,CAAC;AAkBxB,wBAAsB,gBAAgB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAkBpG;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAW5D;AAED,wBAAgB,SAAS,IAAI,aAAa,CAEzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAiB,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,cAAc,SAAS,CAAC;AAkBxB,wBAAsB,gBAAgB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAsBpG;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAW5D;AAED,wBAAgB,SAAS,IAAI,aAAa,CAEzC"}
package/dist/shared.js CHANGED
@@ -1,5 +1,5 @@
1
- import { S, g, i, r } from "./chunks/site-store-Vqmjjz9c.js";
2
- import { R, T, W, b, c, g as g2, r as r2 } from "./chunks/template-C1tMqlPY.js";
1
+ import { S, g, i, r } from "./chunks/site-store-CGV9c2DI.js";
2
+ import { R, T, W, b, c, g as g2, r as r2 } from "./chunks/template-Ccxil4s-.js";
3
3
  export {
4
4
  R as Router,
5
5
  S as SiteStore,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/footer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAInE,qBACa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAgB;IAG7B,QAAQ,CAAC,SAAS,SAAM;IAGxB,QAAQ,CAAC,WAAW,EAAE,WAAW,EAAE,CAAM;IAEzC,MAAM;CAmBP"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/footer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAInE,qBACa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,MAAM,0BAAgB;IAG7B,QAAQ,CAAC,SAAS,SAAM;IAGxB,QAAQ,CAAC,WAAW,EAAE,WAAW,EAAE,CAAM;IAEzC,MAAM;CA2BP"}
package/dist/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, a, b, c, d, e, f, g, h, i, B, F, M, j, S, k } from "./chunks/index-_AMi6ort.js";
1
+ import { A, a, b, c, d, e, f, g, h, i, B, F, M, j, S, k } from "./chunks/index-B2jGIzSi.js";
2
2
  export {
3
3
  A as AdminAboutMeSection,
4
4
  a as AdminBlogsSection,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leadertechie/personal-site-kit",
3
- "version": "0.1.0-alpha.10",
3
+ "version": "0.1.0-alpha.11",
4
4
  "type": "module",
5
5
  "description": "A high-performance personal website engine for Cloudflare Workers and R2",
6
6
  "repository": {