@rizom/brain 0.2.0-alpha.242 → 0.2.0-alpha.243
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.
- package/dist/brain.js +39 -39
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/site.js +4 -4
- package/dist/site.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ab as a,bb as n}from"./chunks/index-7dgqrfes.js";import"./chunks/index-g1cqpphy.js";function t(i){return i}var s={name:"@rizom/brain",version:"0.2.0-alpha.
|
|
2
|
+
import{ab as a,bb as n}from"./chunks/index-7dgqrfes.js";import"./chunks/index-g1cqpphy.js";function t(i){return i}var s={name:"@rizom/brain",version:"0.2.0-alpha.243",description:"Brain runtime + CLI \u2014 scaffold, run, and manage AI brain instances",keywords:["brain","ai","cli","mcp","agent","personal-ai","knowledge-management"],license:"AGPL-3.0-only",author:"Yeehaa <yeehaa@rizom.ai> (https://rizom.ai)",bin:{brain:"./dist/brain.js"},bugs:"https://github.com/rizom-ai/brains/issues",dependencies:{"@clack/prompts":"^1.5.1","@modelcontextprotocol/sdk":"^1.29.0","@tailwindcss/postcss":"^4.3.1","@tailwindcss/typography":"^0.5.20",postcss:"^8.5.15",preact:"^10.27.2","preact-render-to-string":"^6.7.0",tailwindcss:"^4.3.1",zod:"^4.1.8"},devDependencies:{"@brains/app":"workspace:*","@brains/auth-service":"workspace:*","@brains/build-tools":"workspace:*","@brains/content-formatters":"workspace:*","@brains/deploy-support":"workspace:*","@brains/eslint-config":"workspace:*","@brains/mcp-service":"workspace:*","@brains/plugins":"workspace:*","@brains/ranger":"workspace:*","@brains/relay":"workspace:*","@brains/rover":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-default":"workspace:*","@brains/site-personal":"workspace:*","@brains/site-professional":"workspace:*","@brains/theme-rizom":"workspace:*","@brains/typescript-config":"workspace:*","@brains/utils":"workspace:*","@rizom/theme-default":"workspace:*","@types/bun":"^1.3.14",rolldown:"^1.0.0","rolldown-plugin-dts":"^0.27.4",typescript:"^7.0.2"},engines:{bun:">=1.3.3"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./cli":"./dist/brain.js","./plugins":{types:"./dist/plugins.d.ts",import:"./dist/plugins.js"},"./entities":{types:"./dist/entities.d.ts",import:"./dist/entities.js"},"./services":{types:"./dist/services.d.ts",import:"./dist/services.js"},"./interfaces":{types:"./dist/interfaces.d.ts",import:"./dist/interfaces.js"},"./templates":{types:"./dist/templates.d.ts",import:"./dist/templates.js"},"./site":{types:"./dist/site.d.ts",import:"./dist/site.js"},"./deploy":{types:"./dist/deploy.d.ts",import:"./dist/deploy.js"},"./tsconfig.instance.json":"./tsconfig.instance.json"},files:["dist","templates","tsconfig.instance.json"],homepage:"https://github.com/rizom-ai/brains/tree/main/packages/brain-cli#readme",optionalDependencies:{"@bitwarden/sdk-napi":"^1.0.0","@libsql/client":"^0.17.4","@tailwindcss/oxide":"^4.1.4",lightningcss:"^1.29.2","playwright-core":"^1.61.0","react-devtools-core":"^7.0.1",sharp:"^0.35.1"},publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/rizom-ai/brains.git",directory:"packages/brain-cli"},scripts:{build:"bun scripts/build.ts","dev:start":"bun scripts/build.ts && bun dist/brain.js start",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",prepublishOnly:"bun scripts/build.ts",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};var r=s.version;export{n as z,t as defineBrain,a as ZodError,r as PLUGIN_API_VERSION};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=37FFEA36A7E123B664756E2164756E21
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
"import packageJson from \"../package.json\" with { type: \"json\" };\n\n/**\n * Pre-v1 external plugin API marker.\n *\n * During alpha, the external plugin API compatibility marker tracks the\n * published @rizom/brain package version. Once the plugin API is declared\n * stable, this can move to an independent semver contract such as 1.0.0.\n */\nexport const PLUGIN_API_VERSION: string = packageJson.version;\n"
|
|
7
7
|
],
|
|
8
8
|
"mappings": ";0FA6FO,UAAS,CAAW,CAAC,EAA8C,CACxE,OAAO,mxFCrFF,IAAM,EAA6B,EAAY",
|
|
9
|
-
"debugId": "
|
|
9
|
+
"debugId": "37FFEA36A7E123B664756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/dist/site.js
CHANGED
|
@@ -1371,7 +1371,7 @@ ${r.join(`
|
|
|
1371
1371
|
letter-spacing: 0.02em;
|
|
1372
1372
|
}
|
|
1373
1373
|
.printable-footer a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
|
|
1374
|
-
`}},void 0,!1,void 0,this),n1("header",{className:"printable-hero",children:[n1("div",{className:"printable-masthead",children:r.brandLabel&&n1("p",{className:"printable-kicker",children:r.brandLabel},void 0,!1,void 0,this)},void 0,!1,void 0,this),n1("div",{children:[n1("h1",{className:"printable-title",children:r.title},void 0,!1,void 0,this),r.excerpt&&n1("p",{className:"printable-excerpt",children:r.excerpt},void 0,!1,void 0,this),n1("div",{className:"printable-meta",children:[r.author&&n1("span",{children:["By ",r.author]},void 0,!0,void 0,this),f&&n1("span",{children:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r.coverImageUrl&&n1("figure",{className:"printable-cover-wrap",children:n1("img",{className:"printable-cover",src:r.coverImageUrl,alt:""},void 0,!1,void 0,this)},void 0,!1,void 0,this),n1(Dr,{markdown:r.body,className:"printable-body"},void 0,!1,void 0,this),(Boolean(r.canonicalUrl)||Boolean(r.brandLabel))&&n1("footer",{className:"printable-footer",children:[n1("span",{children:r.brandLabel??"Printable PDF"},void 0,!1,void 0,this),r.canonicalUrl&&n1("a",{href:r.canonicalUrl,children:r.canonicalUrl},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var cc=Z4({sourceEntityType:"post",attachmentType:W5,template:Wc,themeMode:"light",buildContent:async(l,r)=>{let{frontmatter:f,content:u}=Vf(l.content),i=A1.parse(f),n=await r.resolveImageDataUrl(i.coverImageId);return{title:i.title,body:u,...i.excerpt?{excerpt:i.excerpt}:{},...i.author?{author:i.author}:{},...i.publishedAt?{publishedAt:i.publishedAt}:{},...i.canonicalUrl?{canonicalUrl:i.canonicalUrl}:{},...n?{coverImageUrl:n}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}},pageTitle:(l)=>l.title,slug:(l)=>rf(l.metadata.slug,l.metadata.title)});import{jsxDEV as x_}from"preact/jsx-dev-runtime";var mn="og-image",D_="blog:og-image",Zc=W.object({title:W.string().min(1),excerpt:W.string().optional(),author:W.string().optional(),publishedAt:W.string().optional(),brandLabel:W.string().optional(),coverImageUrl:W.string().optional()}),zc={name:D_,pluginId:"blog",schema:Zc,renderers:{image:S_}};function j_(l){if(!l)return;let r=new Date(l);if(Number.isNaN(r.getTime()))return;return H1(r,{style:"medium"})}function S_(l){let r=Zc.parse(l);return x_(K2,{brandLabel:r.brandLabel??r.title,eyebrow:"Journal",title:r.title,subtitle:r.excerpt,meta:[r.author],tag:j_(r.publishedAt)},void 0,!1,void 0,this)}var Oc=$n({sourceEntityType:"post",attachmentType:mn,template:zc,themeMode:"light",buildContent:async(l,r)=>{let{frontmatter:f}=Vf(l.content),u=A1.parse(f),i=await r.resolveImageDataUrl(u.coverImageId);return{title:u.title,...u.excerpt?{excerpt:u.excerpt}:{},...u.author?{author:u.author}:{},...u.publishedAt?{publishedAt:u.publishedAt}:{},...i?{coverImageUrl:i}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}},pageTitle:(l)=>l.title,slug:(l)=>rf(l.metadata.slug,l.metadata.title)});var Xc={name:"@brains/blog",license:"AGPL-3.0-only",version:"0.2.0-alpha.242",description:"AI-powered blog post generation from existing brain content",dependencies:{"@brains/atproto-contracts":"workspace:*","@brains/contracts":"workspace:*","@brains/media-page-composer":"workspace:*","@brains/plugins":"workspace:*","@brains/style-guide":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},private:!0,scripts:{eval:"cd evals && bun run brain-eval",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};class Yc extends Mu{entityType=Yf.entityType;schema=z4;adapter=Yf;unregisterAtprotoProjection;unregisterPrintableAttachmentProvider;unregisterOgImageAttachmentProvider;constructor(l={}){super("blog",Xc,l,l3)}getEntityTypeConfig(){return{weight:2,projectionSourceRole:"primary",publish:{publishStatuses:["queued","published"]}}}createGenerationHandler(l){return new f3(this.logger.child("BlogGenerationJobHandler"),l)}getTemplates(){return Gm()}getDataSources(){return[new h3(this.logger.child("BlogDataSource"))]}async onRegister(l){let{RSSDataSource:r}=await import("./chunks/rss-datasource-99x3m7bw.js");l.entities.registerDataSource(new r(this.logger.child("RSSDataSource"))),Um(l,this.logger),Fm(l,this.logger),Lm(l,this.logger),am(l),this.unregisterPrintableAttachmentProvider=l.attachments.register("post",W5,cc(l)),this.unregisterOgImageAttachmentProvider=l.attachments.register("post",mn,Oc(l)),this.deferPublishAssetRegistration(l),this.unregisterAtprotoProjection=$f.getInstance().register(y6()),this.logger.info("Blog plugin registered (routes auto-generated at /posts/)")}deferPublishAssetRegistration(l){l.messaging.subscribe($u.pluginsRegistered,async()=>{return await l.messaging.send({type:p9.register,payload:{entityType:"post",attachmentType:mn,mediaEntityType:"image",targetEntityField:{location:"frontmatter",field:"ogImageId"},requiredWhen:{status:"published"},autoGenerate:!0,jobType:"image:image-render-source"}}),{success:!0}})}async onShutdown(){this.unregisterPrintableAttachmentProvider?.(),this.unregisterPrintableAttachmentProvider=void 0,this.unregisterOgImageAttachmentProvider?.(),this.unregisterOgImageAttachmentProvider=void 0,this.unregisterAtprotoProjection?.(),this.unregisterAtprotoProjection=void 0}}var ff=W.object({tagline:W.string().optional().describe("Short public profile tagline"),intro:W.string().optional().describe("Longer public profile introduction"),story:W.string().optional().describe("Extended profile narrative sourced from the markdown body"),audience:W.string().optional().describe("Primary audience or community served")}),Jc=W.object({tagline:ff.shape.tagline,intro:ff.shape.intro,audience:ff.shape.audience}),O4=W.object({role:W.string().optional().describe("Professional role or working identity"),expertise:W.array(W.string()).optional().describe("Skills, domains, and areas of focus"),currentFocus:W.string().optional().describe("What the professional is currently working on"),availability:W.string().optional().describe("Work, speaking, or collaboration availability")}),c5=ff.extend(O4.shape),Qc=W.object({purpose:W.string().optional().describe("Team purpose"),focusAreas:W.array(W.string()).optional().describe("Team focus areas"),capabilities:W.array(W.string()).optional().describe("Team capabilities"),workingPrinciples:W.array(W.string()).optional().describe("Principles guiding how the team works")}),Bc=ff.extend(Qc.shape),Hc=W.object({mission:W.string().optional().describe("Organization mission"),focusAreas:W.array(W.string()).optional().describe("Organization focus areas"),offerings:W.array(W.string()).optional().describe("Organization products, services, or programs"),values:W.array(W.string()).optional().describe("Organization values")}),Gc=ff.extend(Hc.shape),C_=bn.extend(c5.shape).strict(),s_=bn.extend(Bc.shape).strict(),e_=bn.extend(Gc.shape).strict(),Uc=bn.extend(ff.shape).loose(),lp=Uc.extend(O4.shape).loose();var Ih0=W.record(W.string(),W.unknown());var Dh0=W.record(W.string(),W.unknown());var rp=W.string().trim().min(3).max(80).refine((l)=>l.split(/\s+/u).length>=2&&l.split(/\s+/u).length<=6,"Role must contain between two and six words").refine((l)=>!/[.!?]$/u.test(l),"Role must be a phrase"),fp=W.string().trim().min(12).max(240).refine((l)=>!/[\r\n]/u.test(l),"Purpose must be one line"),up=W.string().trim().min(2).max(60).refine((l)=>l.split(/\s+/u).length<=5,"Values must contain at most five words"),ip=W.object({role:rp,purpose:fp,values:W.array(up).length(3)}).refine(({values:l})=>new Set(l.map((r)=>r.toLowerCase())).size===l.length,{message:"Values must be distinct",path:["values"]});var Ch0=W.record(W.string(),W.unknown());var kp=W.object({enabled:W.boolean().default(!0)}),tt0=W.object({starterIdentity:kp.default({enabled:!0})});async function Fc(l){let f=(await l.listEntities({entityType:"anchor-profile",options:{limit:1}}))[0];if(!f)throw Error("Profile not found \u2014 create an anchor-profile entity");return f.content}async function uf(l,r){let f=await Fc(l),{metadata:u,content:i}=Ll(f,W.record(W.string(),W.unknown()));return r.parse(i?{...u,story:i}:u)}var Hr=W.string().nullable().default(null),Mf=W.object({name:W.string(),organization:Hr,description:Hr,avatar:Hr,website:Hr,email:Hr,socialLinks:W.array(W.object({platform:W.enum(["github","instagram","linkedin","email","website"]),url:W.string(),label:Hr})).nullable().default(null),tagline:Hr,intro:Hr,story:Hr,audience:Hr});var Rc=W.object({}),Z5=mf.extend({id:W.literal("site-info"),entityType:W.literal("site-info"),metadata:Rc});var $p=Nc.omit({url:!0,analyticsScript:!0}),Bi=$p.extend({title:W.string().optional().describe("Optional site title override"),description:W.string().optional().describe("Optional site description override")});var mp=W.record(W.string(),W.unknown());class nf extends Vu{constructor(){super({entityType:"site-info",purpose:"Singleton configuration describing the published site.",schema:Z5,frontmatterSchema:Bi,isSingleton:!0,hasBody:!1})}createSiteInfoContent(l){let r=Bi.parse(l);return this.buildMarkdown("",r)}parseSiteInfoBody(l){return this.parseFrontmatter(l)}fromMarkdown(l){return{content:l,entityType:"site-info"}}extractMetadata(l){return{}}generateFrontMatter(l){let r=this.parseFrontmatter(l.content);return this.buildMarkdown("",mp.parse(r))}}var Dt0=new nf;var w50=new nf;var gp=new nf;async function Hu(l){let f=(await l.listEntities({entityType:"site-info",options:{limit:1}}))[0];if(!f)throw Error("Site info not found \u2014 create a site-info entity");return gp.parseSiteInfoBody(f.content)}function Lc(l,r){let f=l.metadata.publishedAt??l.created,u=r.metadata.publishedAt??r.created;return new Date(u).getTime()-new Date(f).getTime()}async function Hi(l,r){return(await l.listEntities({entityType:r.entityType,options:{limit:20}})).sort(Lc).slice(0,r.count).map(r.parse)}function gn(l){if(!l)throw Error("CTA not configured in site-info");return l}var ac=W.object({label:W.string(),href:W.string(),priority:W.number()}),dp=W.object({primary:W.array(ac),secondary:W.array(ac)}),Ap=W.object({platform:W.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:W.string().describe("Profile or contact URL"),label:W.string().optional().describe("Optional display label")}),Kp=Bi.extend({title:W.string(),description:W.string(),navigation:dp,copyright:W.string(),socialLinks:W.array(Ap).optional().describe("Social media links composed by a site integration")});class z5{postsListUrl;id="personal:homepage";name="Personal Homepage DataSource";description="Fetches profile and blog posts for a personal homepage";constructor(l){this.postsListUrl=l}async fetch(l,r,f){let u=f.entityService,[i,n,h]=await Promise.all([uf(u,Mf),Hi(u,{entityType:"post",count:6,parse:Cf}),Hu(u)]),w={profile:i,posts:n,postsListUrl:this.postsListUrl,cta:gn(h.cta)};return r.parse(w)}}class O5{id="personal:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let i={profile:await uf(f.entityService,Mf)};return r.parse(i)}}import{jsxDEV as p0,Fragment as Tc}from"preact/jsx-dev-runtime";function Wp(l){return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function cp(l){return l.split(/(\*[^*]+\*)/).map((r,f)=>{if(r.startsWith("*")&&r.endsWith("*")&&r.length>2)return p0("em",{className:"font-sans italic font-medium text-theme-inverse tracking-[-0.015em] [font-variation-settings:'opsz'_72]",children:r.slice(1,-1)},f,!1,void 0,this);return r})}var Y4=({profile:l,posts:r,postsListUrl:f,cta:u})=>{let i=l.tagline??l.description,n=l.name.split(" ")[0];return p0(Tc,{children:[p0(Ml,{title:l.name,description:l.description??i??"Personal site",ogType:"website"},void 0,!1,void 0,this),p0("header",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col items-center justify-center px-6 md:px-12 pt-32 pb-24 gap-7",children:p0("div",{className:"w-full max-w-[1100px] mx-auto text-center flex flex-col items-center gap-7",children:[i&&p0("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:cp(i)},void 0,!1,void 0,this),l.description&&p0("p",{className:"text-[clamp(1.0625rem,1.4vw,1.3125rem)] leading-[1.5] text-theme-inverse opacity-95 max-w-[600px] mx-auto m-0",children:l.description},void 0,!1,void 0,this),p0("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[p0("a",{href:f,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-theme text-brand border-2 border-theme font-heading font-semibold text-[15px] hover:bg-theme-subtle hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Read the Blog ",p0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("a",{href:"/about",className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-inverse font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["About ",n]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),r.length>0&&p0("section",{className:"flex flex-col py-24 px-6 md:px-12 gap-11 bg-theme-subtle",children:[p0("div",{className:"flex justify-between items-end max-w-layout mx-auto w-full gap-6 flex-wrap",children:[p0("div",{children:[p0("span",{className:"block font-heading font-semibold text-[13px] uppercase tracking-[0.22em] text-brand mb-3 [font-variation-settings:'wdth'_85,'opsz'_12]",children:"The Archive"},void 0,!1,void 0,this),p0("h2",{className:"font-heading font-bold text-[clamp(2.25rem,5vw,3.75rem)] leading-none tracking-[-0.03em] text-heading m-0 [font-variation-settings:'wdth'_92,'opsz'_64]",children:["Recent"," ",p0("em",{className:"font-sans italic font-medium text-brand [font-variation-settings:'opsz'_60]",children:"posts"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p0("a",{href:f,className:"font-heading font-semibold text-[15px] text-brand inline-flex items-center gap-1.5 pb-1.5 border-b-2 border-current hover:text-brand-dark transition-colors [font-variation-settings:'wdth'_88,'opsz'_16]",children:["View the whole archive ",p0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p0("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(min(100%,320px),1fr))] gap-8 max-w-layout mx-auto w-full",children:r.map((h)=>p0("a",{href:h.url,className:"group flex flex-col bg-theme border border-theme rounded-md overflow-hidden hover:-translate-y-1 hover:border-brand/50 transition-all no-underline shadow-sm hover:shadow-lg",children:[h.coverImageUrl?p0("img",{src:h.coverImageUrl,alt:h.metadata.title,className:"w-full aspect-[16/10] object-cover bg-theme-muted"},void 0,!1,void 0,this):p0("div",{className:"w-full aspect-[16/10] bg-gradient-to-br from-brand to-accent","aria-hidden":"true"},void 0,!1,void 0,this),p0("div",{className:"flex flex-col gap-4 p-7 flex-1",children:[p0("div",{className:"flex flex-wrap items-center gap-3.5 font-heading text-[11px] font-semibold uppercase tracking-[0.18em] text-theme-muted [font-variation-settings:'wdth'_85,'opsz'_11]",children:[h.frontmatter.seriesName&&p0(Tc,{children:[p0("span",{className:"text-brand",children:h.frontmatter.seriesName},void 0,!1,void 0,this),p0("span",{className:"w-[3px] h-[3px] rounded-full bg-current opacity-50","aria-hidden":"true"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("time",{children:Wp(h.metadata.publishedAt??h.created)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("h3",{className:"font-sans font-semibold text-[clamp(1.375rem,1.8vw,1.625rem)] leading-[1.18] tracking-[-0.012em] text-heading m-0 text-balance",children:h.metadata.title},void 0,!1,void 0,this),h.frontmatter.excerpt&&p0("p",{className:"text-base leading-[1.55] text-theme-muted m-0 flex-1",children:h.frontmatter.excerpt},void 0,!1,void 0,this),p0("span",{className:"inline-flex items-center gap-1.5 font-heading font-semibold text-[13px] uppercase tracking-[0.14em] text-brand mt-1 [font-variation-settings:'wdth'_88,'opsz'_14]",children:["Read the post"," ",p0("span",{"aria-hidden":"true",className:"transition-transform group-hover:translate-x-1",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},h.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[p0("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),p0("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:u.heading},void 0,!1,void 0,this),u.subtitle&&p0("p",{className:"text-center text-base leading-[1.55] text-theme-on-dark opacity-80 max-w-[480px] m-0",children:u.subtitle},void 0,!1,void 0,this),p0("a",{href:u.buttonLink,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all mt-2 [font-variation-settings:'wdth'_92,'opsz'_18]",children:[u.buttonText," ",p0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as h1,Fragment as Zp}from"preact/jsx-dev-runtime";var J4=({profile:l})=>{let r=`About ${l.name}`,f=l.description??l.intro??"About page",u=Boolean(l.email??l.website);return h1(Zp,{children:[h1(Ml,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),h1("section",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col px-6 md:px-12 pt-32 pb-24",children:h1("div",{className:"w-full max-w-3xl mx-auto flex flex-col gap-6",children:[h1("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,4.5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:l.name},void 0,!1,void 0,this),l.description&&h1("p",{className:"text-[clamp(1.0625rem,1.4vw,1.25rem)] leading-[1.55] text-theme-inverse opacity-95 max-w-2xl m-0",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l.story&&h1("section",{className:`py-24 px-6 md:px-12 bg-theme-subtle${u?"":" flex-grow"}`,children:h1("div",{className:"max-w-3xl mx-auto",children:h1(Dr,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),u&&h1("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[h1("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),h1("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:["Say"," ",h1("em",{className:"font-sans italic font-medium text-accent [font-variation-settings:'opsz'_72]",children:"hi."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h1("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[l.email&&h1("a",{href:`mailto:${l.email}`,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Get in Touch ",h1("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.website&&h1("a",{href:l.website,className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-on-dark font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:"Website"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var Vc={name:"@brains/site-personal",license:"AGPL-3.0-only",version:"0.2.0-alpha.242",description:"Personal site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var Op=W.object({entityDisplay:W.object({post:W.object({label:W.string().default("Post"),pluralName:W.string().optional()}).default({label:"Post"})}).default({post:{label:"Post"}})}),Xp=W.object({heading:W.string(),buttonText:W.string(),buttonLink:W.string(),subtitle:W.string().nullable().default(null)}),Yp=Sl;class Q4 extends yn{dependencies=["blog"];constructor(l={}){super("personal-site",Vc,l,Op)}async onRegister(l){let r=this.config.entityDisplay.post,f=`/${r.pluralName??r.label.toLowerCase()+"s"}`,u=new z5(f);l.entities.registerDataSource(u);let i=new O5;l.entities.registerDataSource(i);let n=W.object({profile:Mf,posts:W.array(Yp),postsListUrl:W.string(),cta:Xp}),h=W.object({profile:Mf});l.templates.register({homepage:Yl({name:"homepage",description:"Personal homepage with recent blog posts",schema:n,dataSourceId:"personal:homepage",requiredPermission:"public",layout:{component:Y4}}),about:Yl({name:"about",description:"About page with profile",schema:h,dataSourceId:"personal:about",requiredPermission:"public",layout:{component:J4}})}),this.logger.info("Personal site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function B4(l){return new Q4(l??{})}var H4=[{id:"home",path:"/",title:"Home",description:"Personal site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"personal-site:homepage",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"personal-site:about",dataQuery:{}}]}];import{jsxDEV as T1}from"preact/jsx-dev-runtime";function G4({sections:l,siteInfo:r}){let f=[...r.navigation.primary,...r.navigation.secondary].filter((u)=>u.label!=="Home");return T1("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[T1(A2,{title:r.title,titleClassName:"font-heading font-bold text-2xl",navigation:r.navigation.primary,showThemeToggle:!0,themeToggleClassName:"bg-theme-toggle text-theme-toggle-icon hover:bg-theme-toggle-hover rounded-[10px]",...r.logo!==void 0?{logo:r.logo}:{}},void 0,!1,void 0,this),T1("main",{className:"flex-grow flex flex-col",children:l},void 0,!1,void 0,this),T1("footer",{className:"bg-footer text-footer border-t border-theme",children:T1("div",{className:"max-w-layout mx-auto flex flex-col md:flex-row justify-between items-center py-8 px-6 md:px-8",children:[T1("div",{className:"flex flex-col gap-1 mb-4 md:mb-0",children:[T1("span",{className:"text-brand font-heading font-bold text-lg",children:r.title},void 0,!1,void 0,this),r.description&&T1("span",{className:"text-theme-muted text-xs",children:r.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T1("nav",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 mb-4 md:mb-0",children:f.map((u)=>T1("a",{href:u.href,className:"text-theme-muted text-[13px] hover:text-brand transition-colors",children:u.label},u.href,!1,void 0,this))},void 0,!1,void 0,this),T1("div",{className:"flex items-center gap-4",children:[r.copyright&&T1("span",{className:"text-theme-light text-[11px]",children:r.copyright},void 0,!1,void 0,this),T1(df,{variant:"footer",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var dn=W.enum(["generating","draft","queued","published","failed"]),Mc="publishedAt is required when deck status is published",Pc=(l)=>l.status==="published"&&!l.publishedAt,U4=(l)=>{if(Pc(l))throw Error(Mc)},vr=W.object({title:W.string(),slug:W.string().optional(),description:W.string().optional(),author:W.string().optional(),status:dn,publishedAt:W.string().datetime().optional(),event:W.string().optional(),coverImageId:W.string().optional(),ogImageId:W.string().optional()}),Jp=W.object({title:W.string(),description:W.string().optional(),status:dn,publishedAt:W.string().datetime().optional(),coverImageId:W.string().optional(),slug:W.string(),error:W.string().optional()}).superRefine((l,r)=>{if(!Pc(l))return;r.addIssue({code:W.ZodIssueCode.custom,path:["publishedAt"],message:Mc})}),Gi=mf.extend({entityType:W.literal("deck"),metadata:Jp}),X5=Gi.extend({frontmatter:vr,body:W.string(),ogImageUrl:W.string().optional()}),Qp=X5.extend({url:W.string().optional(),typeLabel:W.string().optional(),listUrl:W.string().optional(),listLabel:W.string().optional(),coverImageUrl:W.string().optional(),ogImageUrl:W.string().optional(),coverImageWidth:W.number().optional(),coverImageHeight:W.number().optional()});class F4 extends Vu{constructor(){super({entityType:"deck",purpose:"A slide-deck presentation.",schema:Gi,frontmatterSchema:vr,supportsCoverImage:!0})}validateSlideStructure(l){if(!/^---$/gm.test(l))throw Error("Invalid deck: markdown must contain slide separators (---) to be a valid presentation")}toMarkdown(l){let r=this.extractBody(l.content);this.validateSlideStructure(r);let f=this.parseFrontMatter(l.content,vr);U4(f);let u={...f,slug:f.slug??l.metadata.slug};return this.buildMarkdown(r,u)}fromMarkdown(l){let r=this.parseFrontmatter(l),f=this.extractBody(l);U4(r),this.validateSlideStructure(f);let u=r.slug??D1(r.title),i=r.status;return{entityType:"deck",content:l,metadata:{slug:u,title:r.title,description:r.description,status:i,publishedAt:r.publishedAt,coverImageId:r.coverImageId}}}generateTitle(l){return l.metadata.title}generateSummary(l){if(l.metadata.description)return l.metadata.description;return`Presentation: ${l.metadata.title}`}generateFrontMatter(l){return this.toMarkdown(l)}buildStub(l){let r={title:l.title,slug:l.id,status:"generating"};return{content:this.buildMarkdown(`---
|
|
1374
|
+
`}},void 0,!1,void 0,this),n1("header",{className:"printable-hero",children:[n1("div",{className:"printable-masthead",children:r.brandLabel&&n1("p",{className:"printable-kicker",children:r.brandLabel},void 0,!1,void 0,this)},void 0,!1,void 0,this),n1("div",{children:[n1("h1",{className:"printable-title",children:r.title},void 0,!1,void 0,this),r.excerpt&&n1("p",{className:"printable-excerpt",children:r.excerpt},void 0,!1,void 0,this),n1("div",{className:"printable-meta",children:[r.author&&n1("span",{children:["By ",r.author]},void 0,!0,void 0,this),f&&n1("span",{children:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r.coverImageUrl&&n1("figure",{className:"printable-cover-wrap",children:n1("img",{className:"printable-cover",src:r.coverImageUrl,alt:""},void 0,!1,void 0,this)},void 0,!1,void 0,this),n1(Dr,{markdown:r.body,className:"printable-body"},void 0,!1,void 0,this),(Boolean(r.canonicalUrl)||Boolean(r.brandLabel))&&n1("footer",{className:"printable-footer",children:[n1("span",{children:r.brandLabel??"Printable PDF"},void 0,!1,void 0,this),r.canonicalUrl&&n1("a",{href:r.canonicalUrl,children:r.canonicalUrl},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var cc=Z4({sourceEntityType:"post",attachmentType:W5,template:Wc,themeMode:"light",buildContent:async(l,r)=>{let{frontmatter:f,content:u}=Vf(l.content),i=A1.parse(f),n=await r.resolveImageDataUrl(i.coverImageId);return{title:i.title,body:u,...i.excerpt?{excerpt:i.excerpt}:{},...i.author?{author:i.author}:{},...i.publishedAt?{publishedAt:i.publishedAt}:{},...i.canonicalUrl?{canonicalUrl:i.canonicalUrl}:{},...n?{coverImageUrl:n}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}},pageTitle:(l)=>l.title,slug:(l)=>rf(l.metadata.slug,l.metadata.title)});import{jsxDEV as x_}from"preact/jsx-dev-runtime";var mn="og-image",D_="blog:og-image",Zc=W.object({title:W.string().min(1),excerpt:W.string().optional(),author:W.string().optional(),publishedAt:W.string().optional(),brandLabel:W.string().optional(),coverImageUrl:W.string().optional()}),zc={name:D_,pluginId:"blog",schema:Zc,renderers:{image:S_}};function j_(l){if(!l)return;let r=new Date(l);if(Number.isNaN(r.getTime()))return;return H1(r,{style:"medium"})}function S_(l){let r=Zc.parse(l);return x_(K2,{brandLabel:r.brandLabel??r.title,eyebrow:"Journal",title:r.title,subtitle:r.excerpt,meta:[r.author],tag:j_(r.publishedAt)},void 0,!1,void 0,this)}var Oc=$n({sourceEntityType:"post",attachmentType:mn,template:zc,themeMode:"light",buildContent:async(l,r)=>{let{frontmatter:f}=Vf(l.content),u=A1.parse(f),i=await r.resolveImageDataUrl(u.coverImageId);return{title:u.title,...u.excerpt?{excerpt:u.excerpt}:{},...u.author?{author:u.author}:{},...u.publishedAt?{publishedAt:u.publishedAt}:{},...i?{coverImageUrl:i}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}},pageTitle:(l)=>l.title,slug:(l)=>rf(l.metadata.slug,l.metadata.title)});var Xc={name:"@brains/blog",license:"AGPL-3.0-only",version:"0.2.0-alpha.243",description:"AI-powered blog post generation from existing brain content",dependencies:{"@brains/atproto-contracts":"workspace:*","@brains/contracts":"workspace:*","@brains/media-page-composer":"workspace:*","@brains/plugins":"workspace:*","@brains/style-guide":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},private:!0,scripts:{eval:"cd evals && bun run brain-eval",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};class Yc extends Mu{entityType=Yf.entityType;schema=z4;adapter=Yf;unregisterAtprotoProjection;unregisterPrintableAttachmentProvider;unregisterOgImageAttachmentProvider;constructor(l={}){super("blog",Xc,l,l3)}getEntityTypeConfig(){return{weight:2,projectionSourceRole:"primary",publish:{publishStatuses:["queued","published"]}}}createGenerationHandler(l){return new f3(this.logger.child("BlogGenerationJobHandler"),l)}getTemplates(){return Gm()}getDataSources(){return[new h3(this.logger.child("BlogDataSource"))]}async onRegister(l){let{RSSDataSource:r}=await import("./chunks/rss-datasource-99x3m7bw.js");l.entities.registerDataSource(new r(this.logger.child("RSSDataSource"))),Um(l,this.logger),Fm(l,this.logger),Lm(l,this.logger),am(l),this.unregisterPrintableAttachmentProvider=l.attachments.register("post",W5,cc(l)),this.unregisterOgImageAttachmentProvider=l.attachments.register("post",mn,Oc(l)),this.deferPublishAssetRegistration(l),this.unregisterAtprotoProjection=$f.getInstance().register(y6()),this.logger.info("Blog plugin registered (routes auto-generated at /posts/)")}deferPublishAssetRegistration(l){l.messaging.subscribe($u.pluginsRegistered,async()=>{return await l.messaging.send({type:p9.register,payload:{entityType:"post",attachmentType:mn,mediaEntityType:"image",targetEntityField:{location:"frontmatter",field:"ogImageId"},requiredWhen:{status:"published"},autoGenerate:!0,jobType:"image:image-render-source"}}),{success:!0}})}async onShutdown(){this.unregisterPrintableAttachmentProvider?.(),this.unregisterPrintableAttachmentProvider=void 0,this.unregisterOgImageAttachmentProvider?.(),this.unregisterOgImageAttachmentProvider=void 0,this.unregisterAtprotoProjection?.(),this.unregisterAtprotoProjection=void 0}}var ff=W.object({tagline:W.string().optional().describe("Short public profile tagline"),intro:W.string().optional().describe("Longer public profile introduction"),story:W.string().optional().describe("Extended profile narrative sourced from the markdown body"),audience:W.string().optional().describe("Primary audience or community served")}),Jc=W.object({tagline:ff.shape.tagline,intro:ff.shape.intro,audience:ff.shape.audience}),O4=W.object({role:W.string().optional().describe("Professional role or working identity"),expertise:W.array(W.string()).optional().describe("Skills, domains, and areas of focus"),currentFocus:W.string().optional().describe("What the professional is currently working on"),availability:W.string().optional().describe("Work, speaking, or collaboration availability")}),c5=ff.extend(O4.shape),Qc=W.object({purpose:W.string().optional().describe("Team purpose"),focusAreas:W.array(W.string()).optional().describe("Team focus areas"),capabilities:W.array(W.string()).optional().describe("Team capabilities"),workingPrinciples:W.array(W.string()).optional().describe("Principles guiding how the team works")}),Bc=ff.extend(Qc.shape),Hc=W.object({mission:W.string().optional().describe("Organization mission"),focusAreas:W.array(W.string()).optional().describe("Organization focus areas"),offerings:W.array(W.string()).optional().describe("Organization products, services, or programs"),values:W.array(W.string()).optional().describe("Organization values")}),Gc=ff.extend(Hc.shape),C_=bn.extend(c5.shape).strict(),s_=bn.extend(Bc.shape).strict(),e_=bn.extend(Gc.shape).strict(),Uc=bn.extend(ff.shape).loose(),lp=Uc.extend(O4.shape).loose();var Ih0=W.record(W.string(),W.unknown());var Dh0=W.record(W.string(),W.unknown());var rp=W.string().trim().min(3).max(80).refine((l)=>l.split(/\s+/u).length>=2&&l.split(/\s+/u).length<=6,"Role must contain between two and six words").refine((l)=>!/[.!?]$/u.test(l),"Role must be a phrase"),fp=W.string().trim().min(12).max(240).refine((l)=>!/[\r\n]/u.test(l),"Purpose must be one line"),up=W.string().trim().min(2).max(60).refine((l)=>l.split(/\s+/u).length<=5,"Values must contain at most five words"),ip=W.object({role:rp,purpose:fp,values:W.array(up).length(3)}).refine(({values:l})=>new Set(l.map((r)=>r.toLowerCase())).size===l.length,{message:"Values must be distinct",path:["values"]});var Ch0=W.record(W.string(),W.unknown());var kp=W.object({enabled:W.boolean().default(!0)}),tt0=W.object({starterIdentity:kp.default({enabled:!0})});async function Fc(l){let f=(await l.listEntities({entityType:"anchor-profile",options:{limit:1}}))[0];if(!f)throw Error("Profile not found \u2014 create an anchor-profile entity");return f.content}async function uf(l,r){let f=await Fc(l),{metadata:u,content:i}=Ll(f,W.record(W.string(),W.unknown()));return r.parse(i?{...u,story:i}:u)}var Hr=W.string().nullable().default(null),Mf=W.object({name:W.string(),organization:Hr,description:Hr,avatar:Hr,website:Hr,email:Hr,socialLinks:W.array(W.object({platform:W.enum(["github","instagram","linkedin","email","website"]),url:W.string(),label:Hr})).nullable().default(null),tagline:Hr,intro:Hr,story:Hr,audience:Hr});var Rc=W.object({}),Z5=mf.extend({id:W.literal("site-info"),entityType:W.literal("site-info"),metadata:Rc});var $p=Nc.omit({url:!0,analyticsScript:!0}),Bi=$p.extend({title:W.string().optional().describe("Optional site title override"),description:W.string().optional().describe("Optional site description override")});var mp=W.record(W.string(),W.unknown());class nf extends Vu{constructor(){super({entityType:"site-info",purpose:"Singleton configuration describing the published site.",schema:Z5,frontmatterSchema:Bi,isSingleton:!0,hasBody:!1})}createSiteInfoContent(l){let r=Bi.parse(l);return this.buildMarkdown("",r)}parseSiteInfoBody(l){return this.parseFrontmatter(l)}fromMarkdown(l){return{content:l,entityType:"site-info"}}extractMetadata(l){return{}}generateFrontMatter(l){let r=this.parseFrontmatter(l.content);return this.buildMarkdown("",mp.parse(r))}}var Dt0=new nf;var w50=new nf;var gp=new nf;async function Hu(l){let f=(await l.listEntities({entityType:"site-info",options:{limit:1}}))[0];if(!f)throw Error("Site info not found \u2014 create a site-info entity");return gp.parseSiteInfoBody(f.content)}function Lc(l,r){let f=l.metadata.publishedAt??l.created,u=r.metadata.publishedAt??r.created;return new Date(u).getTime()-new Date(f).getTime()}async function Hi(l,r){return(await l.listEntities({entityType:r.entityType,options:{limit:20}})).sort(Lc).slice(0,r.count).map(r.parse)}function gn(l){if(!l)throw Error("CTA not configured in site-info");return l}var ac=W.object({label:W.string(),href:W.string(),priority:W.number()}),dp=W.object({primary:W.array(ac),secondary:W.array(ac)}),Ap=W.object({platform:W.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:W.string().describe("Profile or contact URL"),label:W.string().optional().describe("Optional display label")}),Kp=Bi.extend({title:W.string(),description:W.string(),navigation:dp,copyright:W.string(),socialLinks:W.array(Ap).optional().describe("Social media links composed by a site integration")});class z5{postsListUrl;id="personal:homepage";name="Personal Homepage DataSource";description="Fetches profile and blog posts for a personal homepage";constructor(l){this.postsListUrl=l}async fetch(l,r,f){let u=f.entityService,[i,n,h]=await Promise.all([uf(u,Mf),Hi(u,{entityType:"post",count:6,parse:Cf}),Hu(u)]),w={profile:i,posts:n,postsListUrl:this.postsListUrl,cta:gn(h.cta)};return r.parse(w)}}class O5{id="personal:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let i={profile:await uf(f.entityService,Mf)};return r.parse(i)}}import{jsxDEV as p0,Fragment as Tc}from"preact/jsx-dev-runtime";function Wp(l){return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function cp(l){return l.split(/(\*[^*]+\*)/).map((r,f)=>{if(r.startsWith("*")&&r.endsWith("*")&&r.length>2)return p0("em",{className:"font-sans italic font-medium text-theme-inverse tracking-[-0.015em] [font-variation-settings:'opsz'_72]",children:r.slice(1,-1)},f,!1,void 0,this);return r})}var Y4=({profile:l,posts:r,postsListUrl:f,cta:u})=>{let i=l.tagline??l.description,n=l.name.split(" ")[0];return p0(Tc,{children:[p0(Ml,{title:l.name,description:l.description??i??"Personal site",ogType:"website"},void 0,!1,void 0,this),p0("header",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col items-center justify-center px-6 md:px-12 pt-32 pb-24 gap-7",children:p0("div",{className:"w-full max-w-[1100px] mx-auto text-center flex flex-col items-center gap-7",children:[i&&p0("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:cp(i)},void 0,!1,void 0,this),l.description&&p0("p",{className:"text-[clamp(1.0625rem,1.4vw,1.3125rem)] leading-[1.5] text-theme-inverse opacity-95 max-w-[600px] mx-auto m-0",children:l.description},void 0,!1,void 0,this),p0("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[p0("a",{href:f,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-theme text-brand border-2 border-theme font-heading font-semibold text-[15px] hover:bg-theme-subtle hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Read the Blog ",p0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("a",{href:"/about",className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-inverse font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["About ",n]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),r.length>0&&p0("section",{className:"flex flex-col py-24 px-6 md:px-12 gap-11 bg-theme-subtle",children:[p0("div",{className:"flex justify-between items-end max-w-layout mx-auto w-full gap-6 flex-wrap",children:[p0("div",{children:[p0("span",{className:"block font-heading font-semibold text-[13px] uppercase tracking-[0.22em] text-brand mb-3 [font-variation-settings:'wdth'_85,'opsz'_12]",children:"The Archive"},void 0,!1,void 0,this),p0("h2",{className:"font-heading font-bold text-[clamp(2.25rem,5vw,3.75rem)] leading-none tracking-[-0.03em] text-heading m-0 [font-variation-settings:'wdth'_92,'opsz'_64]",children:["Recent"," ",p0("em",{className:"font-sans italic font-medium text-brand [font-variation-settings:'opsz'_60]",children:"posts"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p0("a",{href:f,className:"font-heading font-semibold text-[15px] text-brand inline-flex items-center gap-1.5 pb-1.5 border-b-2 border-current hover:text-brand-dark transition-colors [font-variation-settings:'wdth'_88,'opsz'_16]",children:["View the whole archive ",p0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),p0("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(min(100%,320px),1fr))] gap-8 max-w-layout mx-auto w-full",children:r.map((h)=>p0("a",{href:h.url,className:"group flex flex-col bg-theme border border-theme rounded-md overflow-hidden hover:-translate-y-1 hover:border-brand/50 transition-all no-underline shadow-sm hover:shadow-lg",children:[h.coverImageUrl?p0("img",{src:h.coverImageUrl,alt:h.metadata.title,className:"w-full aspect-[16/10] object-cover bg-theme-muted"},void 0,!1,void 0,this):p0("div",{className:"w-full aspect-[16/10] bg-gradient-to-br from-brand to-accent","aria-hidden":"true"},void 0,!1,void 0,this),p0("div",{className:"flex flex-col gap-4 p-7 flex-1",children:[p0("div",{className:"flex flex-wrap items-center gap-3.5 font-heading text-[11px] font-semibold uppercase tracking-[0.18em] text-theme-muted [font-variation-settings:'wdth'_85,'opsz'_11]",children:[h.frontmatter.seriesName&&p0(Tc,{children:[p0("span",{className:"text-brand",children:h.frontmatter.seriesName},void 0,!1,void 0,this),p0("span",{className:"w-[3px] h-[3px] rounded-full bg-current opacity-50","aria-hidden":"true"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("time",{children:Wp(h.metadata.publishedAt??h.created)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("h3",{className:"font-sans font-semibold text-[clamp(1.375rem,1.8vw,1.625rem)] leading-[1.18] tracking-[-0.012em] text-heading m-0 text-balance",children:h.metadata.title},void 0,!1,void 0,this),h.frontmatter.excerpt&&p0("p",{className:"text-base leading-[1.55] text-theme-muted m-0 flex-1",children:h.frontmatter.excerpt},void 0,!1,void 0,this),p0("span",{className:"inline-flex items-center gap-1.5 font-heading font-semibold text-[13px] uppercase tracking-[0.14em] text-brand mt-1 [font-variation-settings:'wdth'_88,'opsz'_14]",children:["Read the post"," ",p0("span",{"aria-hidden":"true",className:"transition-transform group-hover:translate-x-1",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},h.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p0("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[p0("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),p0("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:u.heading},void 0,!1,void 0,this),u.subtitle&&p0("p",{className:"text-center text-base leading-[1.55] text-theme-on-dark opacity-80 max-w-[480px] m-0",children:u.subtitle},void 0,!1,void 0,this),p0("a",{href:u.buttonLink,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all mt-2 [font-variation-settings:'wdth'_92,'opsz'_18]",children:[u.buttonText," ",p0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as h1,Fragment as Zp}from"preact/jsx-dev-runtime";var J4=({profile:l})=>{let r=`About ${l.name}`,f=l.description??l.intro??"About page",u=Boolean(l.email??l.website);return h1(Zp,{children:[h1(Ml,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),h1("section",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col px-6 md:px-12 pt-32 pb-24",children:h1("div",{className:"w-full max-w-3xl mx-auto flex flex-col gap-6",children:[h1("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,4.5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:l.name},void 0,!1,void 0,this),l.description&&h1("p",{className:"text-[clamp(1.0625rem,1.4vw,1.25rem)] leading-[1.55] text-theme-inverse opacity-95 max-w-2xl m-0",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l.story&&h1("section",{className:`py-24 px-6 md:px-12 bg-theme-subtle${u?"":" flex-grow"}`,children:h1("div",{className:"max-w-3xl mx-auto",children:h1(Dr,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),u&&h1("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[h1("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),h1("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:["Say"," ",h1("em",{className:"font-sans italic font-medium text-accent [font-variation-settings:'opsz'_72]",children:"hi."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h1("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[l.email&&h1("a",{href:`mailto:${l.email}`,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Get in Touch ",h1("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.website&&h1("a",{href:l.website,className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-on-dark font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:"Website"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var Vc={name:"@brains/site-personal",license:"AGPL-3.0-only",version:"0.2.0-alpha.243",description:"Personal site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var Op=W.object({entityDisplay:W.object({post:W.object({label:W.string().default("Post"),pluralName:W.string().optional()}).default({label:"Post"})}).default({post:{label:"Post"}})}),Xp=W.object({heading:W.string(),buttonText:W.string(),buttonLink:W.string(),subtitle:W.string().nullable().default(null)}),Yp=Sl;class Q4 extends yn{dependencies=["blog"];constructor(l={}){super("personal-site",Vc,l,Op)}async onRegister(l){let r=this.config.entityDisplay.post,f=`/${r.pluralName??r.label.toLowerCase()+"s"}`,u=new z5(f);l.entities.registerDataSource(u);let i=new O5;l.entities.registerDataSource(i);let n=W.object({profile:Mf,posts:W.array(Yp),postsListUrl:W.string(),cta:Xp}),h=W.object({profile:Mf});l.templates.register({homepage:Yl({name:"homepage",description:"Personal homepage with recent blog posts",schema:n,dataSourceId:"personal:homepage",requiredPermission:"public",layout:{component:Y4}}),about:Yl({name:"about",description:"About page with profile",schema:h,dataSourceId:"personal:about",requiredPermission:"public",layout:{component:J4}})}),this.logger.info("Personal site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function B4(l){return new Q4(l??{})}var H4=[{id:"home",path:"/",title:"Home",description:"Personal site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"personal-site:homepage",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"personal-site:about",dataQuery:{}}]}];import{jsxDEV as T1}from"preact/jsx-dev-runtime";function G4({sections:l,siteInfo:r}){let f=[...r.navigation.primary,...r.navigation.secondary].filter((u)=>u.label!=="Home");return T1("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[T1(A2,{title:r.title,titleClassName:"font-heading font-bold text-2xl",navigation:r.navigation.primary,showThemeToggle:!0,themeToggleClassName:"bg-theme-toggle text-theme-toggle-icon hover:bg-theme-toggle-hover rounded-[10px]",...r.logo!==void 0?{logo:r.logo}:{}},void 0,!1,void 0,this),T1("main",{className:"flex-grow flex flex-col",children:l},void 0,!1,void 0,this),T1("footer",{className:"bg-footer text-footer border-t border-theme",children:T1("div",{className:"max-w-layout mx-auto flex flex-col md:flex-row justify-between items-center py-8 px-6 md:px-8",children:[T1("div",{className:"flex flex-col gap-1 mb-4 md:mb-0",children:[T1("span",{className:"text-brand font-heading font-bold text-lg",children:r.title},void 0,!1,void 0,this),r.description&&T1("span",{className:"text-theme-muted text-xs",children:r.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T1("nav",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 mb-4 md:mb-0",children:f.map((u)=>T1("a",{href:u.href,className:"text-theme-muted text-[13px] hover:text-brand transition-colors",children:u.label},u.href,!1,void 0,this))},void 0,!1,void 0,this),T1("div",{className:"flex items-center gap-4",children:[r.copyright&&T1("span",{className:"text-theme-light text-[11px]",children:r.copyright},void 0,!1,void 0,this),T1(df,{variant:"footer",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var dn=W.enum(["generating","draft","queued","published","failed"]),Mc="publishedAt is required when deck status is published",Pc=(l)=>l.status==="published"&&!l.publishedAt,U4=(l)=>{if(Pc(l))throw Error(Mc)},vr=W.object({title:W.string(),slug:W.string().optional(),description:W.string().optional(),author:W.string().optional(),status:dn,publishedAt:W.string().datetime().optional(),event:W.string().optional(),coverImageId:W.string().optional(),ogImageId:W.string().optional()}),Jp=W.object({title:W.string(),description:W.string().optional(),status:dn,publishedAt:W.string().datetime().optional(),coverImageId:W.string().optional(),slug:W.string(),error:W.string().optional()}).superRefine((l,r)=>{if(!Pc(l))return;r.addIssue({code:W.ZodIssueCode.custom,path:["publishedAt"],message:Mc})}),Gi=mf.extend({entityType:W.literal("deck"),metadata:Jp}),X5=Gi.extend({frontmatter:vr,body:W.string(),ogImageUrl:W.string().optional()}),Qp=X5.extend({url:W.string().optional(),typeLabel:W.string().optional(),listUrl:W.string().optional(),listLabel:W.string().optional(),coverImageUrl:W.string().optional(),ogImageUrl:W.string().optional(),coverImageWidth:W.number().optional(),coverImageHeight:W.number().optional()});class F4 extends Vu{constructor(){super({entityType:"deck",purpose:"A slide-deck presentation.",schema:Gi,frontmatterSchema:vr,supportsCoverImage:!0})}validateSlideStructure(l){if(!/^---$/gm.test(l))throw Error("Invalid deck: markdown must contain slide separators (---) to be a valid presentation")}toMarkdown(l){let r=this.extractBody(l.content);this.validateSlideStructure(r);let f=this.parseFrontMatter(l.content,vr);U4(f);let u={...f,slug:f.slug??l.metadata.slug};return this.buildMarkdown(r,u)}fromMarkdown(l){let r=this.parseFrontmatter(l),f=this.extractBody(l);U4(r),this.validateSlideStructure(f);let u=r.slug??D1(r.title),i=r.status;return{entityType:"deck",content:l,metadata:{slug:u,title:r.title,description:r.description,status:i,publishedAt:r.publishedAt,coverImageId:r.coverImageId}}}generateTitle(l){return l.metadata.title}generateSummary(l){if(l.metadata.description)return l.metadata.description;return`Presentation: ${l.metadata.title}`}generateFrontMatter(l){return this.toMarkdown(l)}buildStub(l){let r={title:l.title,slug:l.id,status:"generating"};return{content:this.buildMarkdown(`---
|
|
1375
1375
|
`,r),metadata:{title:l.title,slug:l.id,status:"generating"}}}}var An=new F4;var Bp=W.union([W.enum(["public","shared","restricted"]),W.literal("private")]).optional().transform((l)=>{if(l===void 0)return"public";if(l==="private")return"restricted";return l}),Hp=W.object({title:W.string(),slug:W.string().nullable().default(null),description:W.string().nullable().default(null),author:W.string().nullable().default(null),status:dn,publishedAt:W.string().nullable().default(null),event:W.string().nullable().default(null),coverImageId:W.string().nullable().default(null),ogImageId:W.string().nullable().default(null)}),Gp=W.object({title:W.string(),description:W.string().nullable().default(null),status:dn,publishedAt:W.string().nullable().default(null),coverImageId:W.string().nullable().default(null),slug:W.string(),error:W.string().nullable().default(null)}),hf=W.object({id:W.string(),entityType:W.literal("deck"),content:W.string(),created:W.string(),updated:W.string(),visibility:Bp,metadata:Gp,contentHash:W.string(),frontmatter:Hp,body:W.string(),url:W.string().nullable().default(null),typeLabel:W.string().nullable().default(null),listUrl:W.string().nullable().default(null),listLabel:W.string().nullable().default(null),coverImageUrl:W.string().nullable().default(null),ogImageUrl:W.string().nullable().default(null),coverImageWidth:W.number().nullable().default(null),coverImageHeight:W.number().nullable().default(null)});var Up=W.object({markdown:W.string().describe("Markdown content with slide separators (---)"),deck:hf.nullable().default(null)}),N4=Yl({name:"deck-detail",description:"Render a presentation deck as Reveal.js slides",schema:Up,dataSourceId:"decks:entities",requiredPermission:"public",layout:{component:Cw,fullscreen:!0}});var R4=W.object({decks:W.array(X5)}),L4=W.object({decks:W.array(hf),pageTitle:W.string().nullable().default(null),pageLabel:W.string().nullable().default(null)});import{jsxDEV as a4}from"preact/jsx-dev-runtime";var Fp="Presentations",T4=({decks:l,pageLabel:r})=>{let f=l.map((i)=>({id:i.id,url:i.url,title:i.frontmatter.title,date:i.frontmatter.publishedAt??i.created,...i.frontmatter.description?{description:i.frontmatter.description}:{}}));return a4("div",{className:"deck-list bg-theme",children:a4("div",{className:"container mx-auto max-w-[1100px] px-6 py-16 md:px-12 md:py-24",children:a4(W2,{label:r&&r!=="Decks"?r:Fp,items:f},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};class Y5 extends Ic{constructor(){super(R4,{title:"Deck List",mappings:[{key:"decks",label:"Decks",type:"array",itemType:"object"}]})}}var V4=Yl({name:"deck-list",description:"List view of all presentation decks",schema:L4,dataSourceId:"decks:entities",requiredPermission:"public",formatter:new Y5,layout:{component:T4}});var Np=W.object({title:W.string().max(80).describe("A short, punchy title (2-5 words) that's memorable and evocative"),content:W.string().describe("Full slide deck content in markdown format with slide separators (---). Each slide should have a header and focused content."),description:W.string().describe("A concise 1-2 sentence summary that captures the essence of the talk")}),qc=Yl({name:"decks:generation",description:"Template for AI to generate complete slide decks from prompts",schema:Np,dataSourceId:"shell:ai-content",requiredPermission:"public",useKnowledgeContext:!0,basePrompt:`Generate a complete slide deck based on the user's prompt.
|
|
1376
1376
|
|
|
1377
1377
|
Content requirements:
|
|
@@ -1675,12 +1675,12 @@ ${w}`,templateName:"decks:description",representedIdentity:"none"})).description
|
|
|
1675
1675
|
color: var(--carousel-accent);
|
|
1676
1676
|
font-weight: 600;
|
|
1677
1677
|
}
|
|
1678
|
-
`}},void 0,!1,void 0,this),i.map((v,$)=>$1("section",{className:`deck-carousel-slide${$===0?" is-cover":""}`,children:[$1("header",{className:"deck-carousel-header",children:$1("span",{className:"deck-carousel-wordmark","aria-label":f??r,children:[$1("span",{className:"wm-primary",children:n.primary},void 0,!1,void 0,this),n.secondary!==void 0&&$1(Mp,{children:[$1("span",{className:"wm-dot",children:"."},void 0,!1,void 0,this),$1("span",{className:"wm-secondary",children:n.secondary},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$1("div",{className:"deck-carousel-body",children:$1("div",{className:"deck-carousel-content",dangerouslySetInnerHTML:{__html:o(v.markdown)}},void 0,!1,void 0,this)},void 0,!1,void 0,this),$1("footer",{className:"deck-carousel-footer",children:[$1("span",{className:"deck-carousel-footer-meta",children:u??r},void 0,!1,void 0,this),$1("span",{className:"deck-carousel-counter","aria-label":`Slide ${$+1} of ${h}`,children:[$1("span",{className:"deck-carousel-counter-current",children:String($+1).padStart(2,"0")},void 0,!1,void 0,this)," / ",$1("span",{children:w},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},$,!0,void 0,this))]},void 0,!0,void 0,this)}var Sc=20;class I4{metadata={outputEntityType:"document"};context;renderPdf;getThemeMode;constructor(l,r={}){this.context=l,this.renderPdf=r.renderPdf,this.getThemeMode=r.getThemeMode??(async()=>"dark")}async resolve(l){if(l.sourceEntityType!=="deck")return;let r=await this.context.entityService.getEntity({entityType:"deck",id:l.sourceEntityId});if(!r)return;let{brandLabel:f}=K5(this.context),u=Pp(r,{brandLabel:f});if(u.slides.length>Sc)throw Error(`Refusing to render carousel with ${u.slides.length} slides; maxSlides=${Sc}`);return{type:"document",data:await kn({mediaPath:`/_media/carousel/${r.id}`,template:jc,content:u,title:u.title,themeMode:await this.getThemeMode(),themeCSS:this.context.themeCSS,tmpPrefix:"brain-deck-carousel-",...this.renderPdf?{renderPdf:this.renderPdf}:{}}),mimeType:"application/pdf",filename:`${rf(r.metadata.slug,r.metadata.title)}-carousel.pdf`}}}function Pp(l,r={}){let{frontmatter:f,content:u}=Vf(l.content),i=typeof f.title==="string"?f.title:l.metadata.title,n=typeof f.event==="string"&&f.event.length>0?f.event:void 0,h=u.split(/^---$/gm).map((w)=>w.trim()).filter((w)=>w.length>0).map((w)=>({markdown:w}));return{title:i,slides:h,...r.brandLabel?{brandLabel:r.brandLabel}:{},...n?{eyebrow:n}:{}}}import{jsxDEV as _p}from"preact/jsx-dev-runtime";var J5="og-image",Ip="decks:og-image",xc=W.object({title:W.string().min(1),description:W.string().optional(),event:W.string().optional(),brandLabel:W.string().optional(),slideCount:W.number().int().positive().optional(),coverImageUrl:W.string().optional()}),Ec={name:Ip,pluginId:"decks",schema:xc,renderers:{image:qp}};function qp(l){let r=xc.parse(l),f=r.slideCount?`${r.slideCount} slide${r.slideCount===1?"":"s"}`:void 0;return _p(K2,{brandLabel:r.brandLabel??r.title,eyebrow:"Deck",title:r.title,subtitle:r.description,meta:[r.event],tag:f},void 0,!1,void 0,this)}var Cc=$n({sourceEntityType:"deck",attachmentType:J5,template:Ec,themeMode:"dark",buildContent:async(l,r)=>{let{frontmatter:f,content:u}=Vf(l.content),i=vr.parse(f),n=pp(u),h=await r.resolveImageDataUrl(i.coverImageId);return{title:i.title,...i.description?{description:i.description}:{},...i.event?{event:i.event}:{},...n?{slideCount:n}:{},...h?{coverImageUrl:h}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}},pageTitle:(l)=>l.title,slug:(l)=>rf(l.metadata.slug,l.metadata.title)});function pp(l){return l.split(/^---$/gm).map((r)=>r.trim()).filter((r)=>r.length>0).length}async function sc({entity:l,config:r}){let f=Gi.parse(l),u=Ll(f.content,vr),i=u.metadata;return{$type:"ai.rizom.brain.deck",title:i.title,...i.slug&&{slug:i.slug},...i.description&&{description:i.description},body:u.content,format:"text/markdown",...i.author&&{author:i.author},...i.event&&{event:i.event},...i.publishedAt&&{publishedAt:i.publishedAt},...r.brainDid&&{brainDid:r.brainDid},...r.anchorDid&&{anchorDid:r.anchorDid},sourceEntityType:"deck",sourceEntityId:f.id,createdAt:f.created,...f.updated&&{updatedAt:f.updated}}}function q4(){return{entityType:"deck",collection:"ai.rizom.brain.deck",lexicon:d1["ai.rizom.brain.deck"],validate:!1,buildRecord:sc}}var ec={name:"@brains/decks",license:"AGPL-3.0-only",version:"0.2.0-alpha.
|
|
1678
|
+
`}},void 0,!1,void 0,this),i.map((v,$)=>$1("section",{className:`deck-carousel-slide${$===0?" is-cover":""}`,children:[$1("header",{className:"deck-carousel-header",children:$1("span",{className:"deck-carousel-wordmark","aria-label":f??r,children:[$1("span",{className:"wm-primary",children:n.primary},void 0,!1,void 0,this),n.secondary!==void 0&&$1(Mp,{children:[$1("span",{className:"wm-dot",children:"."},void 0,!1,void 0,this),$1("span",{className:"wm-secondary",children:n.secondary},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$1("div",{className:"deck-carousel-body",children:$1("div",{className:"deck-carousel-content",dangerouslySetInnerHTML:{__html:o(v.markdown)}},void 0,!1,void 0,this)},void 0,!1,void 0,this),$1("footer",{className:"deck-carousel-footer",children:[$1("span",{className:"deck-carousel-footer-meta",children:u??r},void 0,!1,void 0,this),$1("span",{className:"deck-carousel-counter","aria-label":`Slide ${$+1} of ${h}`,children:[$1("span",{className:"deck-carousel-counter-current",children:String($+1).padStart(2,"0")},void 0,!1,void 0,this)," / ",$1("span",{children:w},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},$,!0,void 0,this))]},void 0,!0,void 0,this)}var Sc=20;class I4{metadata={outputEntityType:"document"};context;renderPdf;getThemeMode;constructor(l,r={}){this.context=l,this.renderPdf=r.renderPdf,this.getThemeMode=r.getThemeMode??(async()=>"dark")}async resolve(l){if(l.sourceEntityType!=="deck")return;let r=await this.context.entityService.getEntity({entityType:"deck",id:l.sourceEntityId});if(!r)return;let{brandLabel:f}=K5(this.context),u=Pp(r,{brandLabel:f});if(u.slides.length>Sc)throw Error(`Refusing to render carousel with ${u.slides.length} slides; maxSlides=${Sc}`);return{type:"document",data:await kn({mediaPath:`/_media/carousel/${r.id}`,template:jc,content:u,title:u.title,themeMode:await this.getThemeMode(),themeCSS:this.context.themeCSS,tmpPrefix:"brain-deck-carousel-",...this.renderPdf?{renderPdf:this.renderPdf}:{}}),mimeType:"application/pdf",filename:`${rf(r.metadata.slug,r.metadata.title)}-carousel.pdf`}}}function Pp(l,r={}){let{frontmatter:f,content:u}=Vf(l.content),i=typeof f.title==="string"?f.title:l.metadata.title,n=typeof f.event==="string"&&f.event.length>0?f.event:void 0,h=u.split(/^---$/gm).map((w)=>w.trim()).filter((w)=>w.length>0).map((w)=>({markdown:w}));return{title:i,slides:h,...r.brandLabel?{brandLabel:r.brandLabel}:{},...n?{eyebrow:n}:{}}}import{jsxDEV as _p}from"preact/jsx-dev-runtime";var J5="og-image",Ip="decks:og-image",xc=W.object({title:W.string().min(1),description:W.string().optional(),event:W.string().optional(),brandLabel:W.string().optional(),slideCount:W.number().int().positive().optional(),coverImageUrl:W.string().optional()}),Ec={name:Ip,pluginId:"decks",schema:xc,renderers:{image:qp}};function qp(l){let r=xc.parse(l),f=r.slideCount?`${r.slideCount} slide${r.slideCount===1?"":"s"}`:void 0;return _p(K2,{brandLabel:r.brandLabel??r.title,eyebrow:"Deck",title:r.title,subtitle:r.description,meta:[r.event],tag:f},void 0,!1,void 0,this)}var Cc=$n({sourceEntityType:"deck",attachmentType:J5,template:Ec,themeMode:"dark",buildContent:async(l,r)=>{let{frontmatter:f,content:u}=Vf(l.content),i=vr.parse(f),n=pp(u),h=await r.resolveImageDataUrl(i.coverImageId);return{title:i.title,...i.description?{description:i.description}:{},...i.event?{event:i.event}:{},...n?{slideCount:n}:{},...h?{coverImageUrl:h}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}},pageTitle:(l)=>l.title,slug:(l)=>rf(l.metadata.slug,l.metadata.title)});function pp(l){return l.split(/^---$/gm).map((r)=>r.trim()).filter((r)=>r.length>0).length}async function sc({entity:l,config:r}){let f=Gi.parse(l),u=Ll(f.content,vr),i=u.metadata;return{$type:"ai.rizom.brain.deck",title:i.title,...i.slug&&{slug:i.slug},...i.description&&{description:i.description},body:u.content,format:"text/markdown",...i.author&&{author:i.author},...i.event&&{event:i.event},...i.publishedAt&&{publishedAt:i.publishedAt},...r.brainDid&&{brainDid:r.brainDid},...r.anchorDid&&{anchorDid:r.anchorDid},sourceEntityType:"deck",sourceEntityId:f.id,createdAt:f.created,...f.updated&&{updatedAt:f.updated}}}function q4(){return{entityType:"deck",collection:"ai.rizom.brain.deck",lexicon:d1["ai.rizom.brain.deck"],validate:!1,buildRecord:sc}}var ec={name:"@brains/decks",license:"AGPL-3.0-only",version:"0.2.0-alpha.243",description:"Presentation decks plugin for creating and viewing slide presentations",dependencies:{"@brains/atproto-contracts":"workspace:*","@brains/content-formatters":"workspace:*","@brains/contracts":"workspace:*","@brains/image":"workspace:*","@brains/media-page-composer":"workspace:*","@brains/plugins":"workspace:*","@brains/site-info":"workspace:*","@brains/style-guide":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},private:!0,scripts:{eval:"cd evals && bun run brain-eval",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};var jp=W.object({prompt:W.string(),event:W.string().optional()}),Sp=W.object({title:W.string(),content:W.string()});class lZ extends Mu{deps;entityType=An.entityType;schema=An.schema;adapter=An;unregisterCarouselAttachmentProvider;unregisterOgImageAttachmentProvider;unregisterAtprotoProjection;constructor(l={}){super("decks",ec,{},jn);this.deps=l}createGenerationHandler(l){return new P4(this.logger.child("DeckGenerationJobHandler"),l)}getTemplates(){return{"deck-detail":N4,"deck-list":V4,generation:qc,description:_c}}getDataSources(){return[new M4(this.logger)]}getEntityTypeConfig(){return{weight:1.5,projectionSourceRole:"primary"}}async onRegister(l){this.deferPublishRegistration(l),this.subscribeToPublishExecute(l),this.registerCarouselAttachmentProvider(l),this.registerOgImageAttachmentProvider(l),this.registerEvalHandlers(l),this.unregisterAtprotoProjection=$f.getInstance().register(q4()),this.logger.info("Decks plugin registered")}async onShutdown(){this.unregisterCarouselAttachmentProvider?.(),this.unregisterCarouselAttachmentProvider=void 0,this.unregisterOgImageAttachmentProvider?.(),this.unregisterOgImageAttachmentProvider=void 0,this.unregisterAtprotoProjection?.(),this.unregisterAtprotoProjection=void 0}deferPublishRegistration(l){l.messaging.subscribe($u.pluginsRegistered,async()=>{return await l.messaging.send({type:q1.register,payload:{entityType:"deck",provider:{name:"internal",publish:async()=>({id:"internal"})},config:{executionMode:"provider"}}}),{success:!0}})}subscribeToPublishExecute(l){l.messaging.subscribe(q1.execute,async(r)=>{let{entityType:f,entityId:u}=r.payload;if(f!=="deck")return{success:!0};try{let i=await l.entityService.getEntity({entityType:"deck",id:u});if(!i)return await l.messaging.send({type:q1.reportFailure,payload:{entityType:f,entityId:u,error:`Deck not found: ${u}`}}),{success:!0};if(i.metadata.status==="published")return{success:!0};let n=new Date().toISOString(),h={...i,metadata:{...i.metadata,status:"published",publishedAt:n}};await l.entityService.updateEntity({entity:{...h,content:this.adapter.toMarkdown(h)}}),await l.messaging.send({type:q1.reportSuccess,payload:{entityType:f,entityId:u,result:{id:u}}})}catch(i){await l.messaging.send({type:q1.reportFailure,payload:{entityType:f,entityId:u,error:_1(i)}})}return{success:!0}})}registerCarouselAttachmentProvider(l){let r={...this.deps,getThemeMode:this.deps.getThemeMode??(async()=>{try{return(await Hu(l.entityService)).themeMode??"dark"}catch{return"dark"}})};this.unregisterCarouselAttachmentProvider=l.attachments.register("deck",pc,new I4(l,r))}registerOgImageAttachmentProvider(l){this.unregisterOgImageAttachmentProvider=l.attachments.register("deck",J5,Cc(l))}registerEvalHandlers(l){l.eval.registerHandler("generateDeck",async(r)=>{let f=jp.parse(r),u=Lr(await Rr(l.entityService));return l.ai.generate({prompt:`${f.prompt}${f.event?`
|
|
1679
1679
|
|
|
1680
1680
|
Note: This presentation is for "${f.event}".`:""}`,templateName:"decks:generation",representedIdentity:"anchor",...u&&{styleGuide:{voice:u}}})}),l.eval.registerHandler("generateDescription",async(r)=>{let f=Sp.parse(r);return l.ai.generate({prompt:`Title: ${f.title}
|
|
1681
1681
|
|
|
1682
1682
|
Content:
|
|
1683
|
-
${f.content}`,templateName:"decks:description",representedIdentity:"none"})})}}var V1=W.string().nullable().default(null),Pf=W.object({name:W.string(),organization:V1,description:V1,avatar:V1,website:V1,email:V1,socialLinks:W.array(W.object({platform:W.enum(["github","instagram","linkedin","email","website"]),url:W.string(),label:V1})).nullable().default(null),tagline:V1,intro:V1,story:V1,audience:V1,role:V1,expertise:W.array(W.string()).nullable().default(null),currentFocus:V1,availability:V1});class Q5{postsListUrl;decksListUrl;id="professional:homepage-list";name="Homepage List DataSource";description="Fetches profile, blog posts, and presentation decks for homepage";constructor(l,r){this.postsListUrl=l,this.decksListUrl=r}async fetch(l,r,f){let u=f.entityService,[i,n,h,w]=await Promise.all([uf(u,Pf),Hi(u,{entityType:"post",count:3,parse:Cf}),Hi(u,{entityType:"deck",count:3,parse:Kn}),Hu(u)]),o={profile:i,posts:n,decks:h,postsListUrl:this.postsListUrl,decksListUrl:this.decksListUrl,cta:gn(w.cta),sections:w.sections??{}};return r.parse(o)}}class B5{id="professional:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let i={profile:await uf(f.entityService,Pf)};return r.parse(i)}}import{jsxDEV as Wl,Fragment as Cp}from"preact/jsx-dev-runtime";var xp="grid md:grid-cols-[14rem_1px_1fr] gap-y-2 gap-x-0 md:gap-16 items-start",Ep="border-t md:border-t-0 md:border-l border-rule-strong md:self-stretch",_4=({number:l,title:r,blurb:f,children:u})=>Wl("section",{className:"py-20 border-b border-rule px-6 md:px-12",children:Wl("div",{className:"max-w-6xl mx-auto",children:Wl("div",{className:xp,children:[Wl(o6,{title:r,number:l,...f?{blurb:f}:{}},void 0,!1,void 0,this),Wl("div",{className:Ep,"aria-hidden":"true"},void 0,!1,void 0,this),Wl("div",{className:"mt-6 md:mt-0",children:u},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),p4=({profile:l,posts:r,decks:f,postsListUrl:u,decksListUrl:i,cta:n,sections:h})=>{let w=l.tagline?.length?l.tagline:l.description,o=r.map((A)=>({id:A.id,url:A.url,title:A.metadata.title,date:A.metadata.publishedAt??A.created,description:A.frontmatter.excerpt,series:A.frontmatter.seriesName&&A.frontmatter.seriesIndex?{name:A.frontmatter.seriesName,index:A.frontmatter.seriesIndex}:void 0})),v=f.map((A)=>({id:A.id,url:A.url,title:A.frontmatter.title||A.id,date:A.frontmatter.publishedAt??A.created,...A.frontmatter.description?{description:A.frontmatter.description}:{}})),$=l.name||"Home",m=[l.intro,l.description,w].find((A)=>A)??"Professional site",b=Boolean(l.description)||(l.expertise?.length??0)>0,d=l.socialLinks?.map(({label:A,...X})=>({...X,...A?{label:A}:{}}));return Wl(Cp,{children:[Wl(Ml,{title:$,description:m,ogType:"website"},void 0,!1,void 0,this),Wl("div",{className:"homepage-list bg-theme",children:[Wl("header",{className:"hero-bg-pattern relative w-full px-6 md:px-12 pt-28 pb-24 md:pt-28 md:pb-24 overflow-hidden border-b border-rule",children:Wl("div",{className:"relative z-10 max-w-6xl mx-auto w-full",children:[l.name&&Wl("div",{className:"flex items-center gap-[0.6rem] mb-6 font-mono text-[0.7rem] font-medium uppercase tracking-[0.22em] text-accent",children:[Wl("span",{className:"w-[18px] h-px bg-accent","aria-hidden":"true"},void 0,!1,void 0,this),Wl("span",{children:l.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&Wl("h1",{className:"font-heading text-[clamp(2.75rem,6.5vw,5.5rem)] font-normal text-heading leading-[1.02] tracking-[-0.025em] max-w-[18ch] [font-variation-settings:'opsz'_144,'SOFT'_30]",children:nt(w,"italic font-normal text-accent [font-variation-settings:'opsz'_144,'SOFT'_80]")},void 0,!1,void 0,this),l.intro&&Wl("p",{className:"font-heading font-light text-[clamp(1.1rem,1.8vw,1.4rem)] leading-[1.5] text-theme-muted max-w-[42ch] mt-8 [font-variation-settings:'opsz'_24]",children:nt(l.intro,"italic text-accent")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Wl(_4,{number:"01",title:"Essays",blurb:h.essays?.blurb,children:Wl(it,{items:o,viewAllUrl:u,viewAllLabel:"View all essays"},void 0,!1,void 0,this)},void 0,!1,void 0,this),v.length>0&&Wl(_4,{number:"02",title:"Presentations",blurb:h.presentations?.blurb,children:Wl(it,{items:v,viewAllUrl:i,viewAllLabel:"View all presentations"},void 0,!1,void 0,this)},void 0,!1,void 0,this),b&&Wl(_4,{number:"03",title:"About",blurb:h.about?.blurb,children:Wl("div",{className:"flex flex-col gap-8",children:[l.description&&Wl("p",{className:"font-heading font-light text-[1.25rem] leading-[1.55] text-theme max-w-[55ch] [font-variation-settings:'opsz'_24,'SOFT'_50]",children:l.description},void 0,!1,void 0,this),l.expertise&&l.expertise.length>0&&Wl(v6,{subjects:l.expertise},void 0,!1,void 0,this),Wl("a",{href:"/about",className:"mt-6 inline-flex items-center gap-2 font-mono text-[0.7rem] font-medium uppercase tracking-[0.18em] text-accent pb-1 relative before:content-[''] before:absolute before:left-0 before:right-full before:bottom-0 before:h-px before:bg-accent before:transition-[right] before:duration-300 hover:before:right-0",children:["Learn more",Wl("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Wl(ew,{cta:n,variant:"editorial",...d?{socialLinks:d}:{}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as $l,Fragment as sp}from"preact/jsx-dev-runtime";var D4=({profile:l})=>{let r=`About ${l.name||"Me"}`,f=[l.description,l.intro].find((i)=>i)??"About page",u=(l.expertise?.length??0)>0||Boolean(l.currentFocus)||Boolean(l.availability)||Boolean(l.email)||Boolean(l.website)||(l.socialLinks?.length??0)>0;return $l(sp,{children:[$l(Ml,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),$l("div",{className:"about-page bg-theme",children:[$l("header",{className:"hero-bg-pattern relative w-full py-16 md:py-24 px-6 md:px-12 bg-theme overflow-hidden",children:$l("div",{className:"relative z-10 max-w-4xl mx-auto",children:[$l("h1",{className:"text-5xl md:text-6xl font-semibold mb-6 text-heading",children:["About ",l.name||"Me"]},void 0,!0,void 0,this),l.description&&$l("p",{className:"text-xl md:text-2xl text-theme-muted leading-relaxed",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$l("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-12 md:py-16",children:[l.story&&$l("section",{className:"content-section-reveal mb-20 md:mb-28",children:$l(Dr,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this),u&&$l("div",{className:"content-section-reveal grid md:grid-cols-2 gap-x-16 gap-y-12",children:[l.expertise&&l.expertise.length>0&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Expertise"},void 0,!1,void 0,this),$l("ul",{className:"flex flex-wrap gap-3",children:l.expertise.map((i,n)=>$l("li",{className:n6({variant:"accent",size:"lg"}),children:i},n,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.currentFocus&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Current Focus"},void 0,!1,void 0,this),$l("p",{className:"text-lg text-theme leading-relaxed",children:l.currentFocus},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.availability&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Availability"},void 0,!1,void 0,this),$l("p",{className:"text-lg text-theme leading-relaxed",children:l.availability},void 0,!1,void 0,this)]},void 0,!0,void 0,this),(Boolean(l.email)||Boolean(l.website)||(l.socialLinks?.length??0)>0)&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Contact"},void 0,!1,void 0,this),$l("div",{className:"space-y-4",children:[l.email&&$l("p",{className:"text-lg",children:$l("a",{href:`mailto:${l.email}`,className:"text-brand hover:text-brand-dark transition-colors",children:l.email},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.website&&$l("p",{className:"text-lg",children:$l("a",{href:l.website,target:"_blank",rel:"noopener noreferrer",className:"text-brand hover:text-brand-dark transition-colors",children:l.website},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.socialLinks&&l.socialLinks.length>0&&$l("div",{className:"flex flex-wrap gap-4 mt-4",children:l.socialLinks.map((i,n)=>$l(j1,{href:i.url,external:!0,variant:"secondary",size:"md",children:i.label?.length?i.label:i.platform},n,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as m1,Fragment as rZ}from"preact/jsx-dev-runtime";var j4=()=>{return m1(rZ,{children:[m1(Ml,{title:"Thanks for subscribing!",description:"You've successfully subscribed to the newsletter."},void 0,!1,void 0,this),m1("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:m1("div",{className:"text-center max-w-md",children:[m1("div",{className:"text-6xl mb-6",children:"\uD83C\uDF89"},void 0,!1,void 0,this),m1("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Thanks for subscribing!"},void 0,!1,void 0,this),m1("p",{className:"text-lg text-theme-muted mb-8",children:"You'll receive a confirmation email shortly. Check your inbox to confirm your subscription."},void 0,!1,void 0,this),m1(j1,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},S4=()=>{return m1(rZ,{children:[m1(Ml,{title:"Subscription failed",description:"There was a problem with your subscription."},void 0,!1,void 0,this),m1("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:m1("div",{className:"text-center max-w-md",children:[m1("div",{className:"text-6xl mb-6",children:"\uD83D\uDE22"},void 0,!1,void 0,this),m1("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Something went wrong"},void 0,!1,void 0,this),m1("p",{className:"text-lg text-theme-muted mb-8",children:"We couldn't process your subscription. Please try again or contact us if the problem persists."},void 0,!1,void 0,this),m1(j1,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};var fZ=W.object({label:W.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:W.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')")}),ep={post:{label:"Post"},deck:{label:"Deck"}},uZ=W.object({entityDisplay:W.object({post:fZ,deck:fZ}).default(ep).describe("Display metadata for post and deck entity types used by the homepage")});var iZ={name:"@brains/site-professional",license:"AGPL-3.0-only",version:"0.2.0-alpha.242",description:"Professional site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/decks":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var rD=W.object({blurb:W.string().nullable().default(null).describe("Short italic subtitle under the section title")}),fD=W.object({heading:W.string(),buttonText:W.string(),buttonLink:W.string()}),uD=Sl,iD=hf;class x4 extends yn{dependencies=["blog","decks"];constructor(l){super("professional-site",iZ,l,uZ)}async onRegister(l){let r=this.config.entityDisplay.post,f=this.config.entityDisplay.deck,u=`/${r.pluralName??r.label.toLowerCase()+"s"}`,i=`/${f.pluralName??f.label.toLowerCase()+"s"}`,n=new Q5(u,i);l.entities.registerDataSource(n);let h=new B5;l.entities.registerDataSource(h);let w=W.object({profile:Pf,posts:W.array(uD),decks:W.array(iD),postsListUrl:W.string(),decksListUrl:W.string(),cta:fD,sections:W.record(W.string(),rD)}),o=W.object({profile:Pf}),v=W.object({});l.templates.register({"homepage-list":Yl({name:"homepage-list",description:"Professional homepage with essays and presentations",schema:w,dataSourceId:"professional:homepage-list",requiredPermission:"public",layout:{component:p4}}),about:Yl({name:"about",description:"About page with full profile information",schema:o,dataSourceId:"professional:about",requiredPermission:"public",layout:{component:D4}}),"subscribe-thanks":Yl({name:"subscribe-thanks",description:"Newsletter subscription success page",schema:v,requiredPermission:"public",layout:{component:j4}}),"subscribe-error":Yl({name:"subscribe-error",description:"Newsletter subscription error page",schema:v,requiredPermission:"public",layout:{component:S4}})}),this.logger.info("Professional site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function E4(l){return new x4(l??{})}var C4=[{id:"home",path:"/",title:"Home",description:"Professional site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"professional-site:homepage-list",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"professional-site:about",dataQuery:{}}]},{id:"subscribe-thanks",path:"/subscribe/thanks",title:"Thanks for subscribing",description:"Newsletter subscription confirmation",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-thanks",template:"professional-site:subscribe-thanks",dataQuery:{},content:{}}]},{id:"subscribe-error",path:"/subscribe/error",title:"Subscription failed",description:"Newsletter subscription error",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-error",template:"professional-site:subscribe-error",dataQuery:{},content:{}}]}];import{jsxDEV as H5}from"preact/jsx-dev-runtime";function s4({sections:l,siteInfo:r,slots:f,wordmark:u}){return H5("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[H5(A2,{title:r.title,navigation:r.navigation.primary,showThemeToggle:!0,...r.logo!==void 0?{logo:r.logo}:{},...u!==void 0?{wordmark:u}:{}},void 0,!1,void 0,this),H5("main",{className:"flex-grow flex flex-col bg-theme",children:l},void 0,!1,void 0,this),H5(f6,{primaryNavigation:r.navigation.primary,secondaryNavigation:r.navigation.secondary,copyright:r.copyright,socialLinks:r.socialLinks,title:r.title,tagline:r.description,children:f?.getSlot("footer-top").map((i)=>i.render())},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function nZ(l){return l}var yo0=G4;function go0(l){return nZ(B4(l))}var nD=H4,do0=nD,Ao0=s4;function Ko0(l){return nZ(E4(l))}var Wo0=C4;export{nD as routes,Ko0 as professionalSitePlugin,Wo0 as professionalRoutes,go0 as personalSitePlugin,do0 as personalRoutes,Ao0 as ProfessionalLayout,yo0 as PersonalLayout};
|
|
1683
|
+
${f.content}`,templateName:"decks:description",representedIdentity:"none"})})}}var V1=W.string().nullable().default(null),Pf=W.object({name:W.string(),organization:V1,description:V1,avatar:V1,website:V1,email:V1,socialLinks:W.array(W.object({platform:W.enum(["github","instagram","linkedin","email","website"]),url:W.string(),label:V1})).nullable().default(null),tagline:V1,intro:V1,story:V1,audience:V1,role:V1,expertise:W.array(W.string()).nullable().default(null),currentFocus:V1,availability:V1});class Q5{postsListUrl;decksListUrl;id="professional:homepage-list";name="Homepage List DataSource";description="Fetches profile, blog posts, and presentation decks for homepage";constructor(l,r){this.postsListUrl=l,this.decksListUrl=r}async fetch(l,r,f){let u=f.entityService,[i,n,h,w]=await Promise.all([uf(u,Pf),Hi(u,{entityType:"post",count:3,parse:Cf}),Hi(u,{entityType:"deck",count:3,parse:Kn}),Hu(u)]),o={profile:i,posts:n,decks:h,postsListUrl:this.postsListUrl,decksListUrl:this.decksListUrl,cta:gn(w.cta),sections:w.sections??{}};return r.parse(o)}}class B5{id="professional:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let i={profile:await uf(f.entityService,Pf)};return r.parse(i)}}import{jsxDEV as Wl,Fragment as Cp}from"preact/jsx-dev-runtime";var xp="grid md:grid-cols-[14rem_1px_1fr] gap-y-2 gap-x-0 md:gap-16 items-start",Ep="border-t md:border-t-0 md:border-l border-rule-strong md:self-stretch",_4=({number:l,title:r,blurb:f,children:u})=>Wl("section",{className:"py-20 border-b border-rule px-6 md:px-12",children:Wl("div",{className:"max-w-6xl mx-auto",children:Wl("div",{className:xp,children:[Wl(o6,{title:r,number:l,...f?{blurb:f}:{}},void 0,!1,void 0,this),Wl("div",{className:Ep,"aria-hidden":"true"},void 0,!1,void 0,this),Wl("div",{className:"mt-6 md:mt-0",children:u},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),p4=({profile:l,posts:r,decks:f,postsListUrl:u,decksListUrl:i,cta:n,sections:h})=>{let w=l.tagline?.length?l.tagline:l.description,o=r.map((A)=>({id:A.id,url:A.url,title:A.metadata.title,date:A.metadata.publishedAt??A.created,description:A.frontmatter.excerpt,series:A.frontmatter.seriesName&&A.frontmatter.seriesIndex?{name:A.frontmatter.seriesName,index:A.frontmatter.seriesIndex}:void 0})),v=f.map((A)=>({id:A.id,url:A.url,title:A.frontmatter.title||A.id,date:A.frontmatter.publishedAt??A.created,...A.frontmatter.description?{description:A.frontmatter.description}:{}})),$=l.name||"Home",m=[l.intro,l.description,w].find((A)=>A)??"Professional site",b=Boolean(l.description)||(l.expertise?.length??0)>0,d=l.socialLinks?.map(({label:A,...X})=>({...X,...A?{label:A}:{}}));return Wl(Cp,{children:[Wl(Ml,{title:$,description:m,ogType:"website"},void 0,!1,void 0,this),Wl("div",{className:"homepage-list bg-theme",children:[Wl("header",{className:"hero-bg-pattern relative w-full px-6 md:px-12 pt-28 pb-24 md:pt-28 md:pb-24 overflow-hidden border-b border-rule",children:Wl("div",{className:"relative z-10 max-w-6xl mx-auto w-full",children:[l.name&&Wl("div",{className:"flex items-center gap-[0.6rem] mb-6 font-mono text-[0.7rem] font-medium uppercase tracking-[0.22em] text-accent",children:[Wl("span",{className:"w-[18px] h-px bg-accent","aria-hidden":"true"},void 0,!1,void 0,this),Wl("span",{children:l.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&Wl("h1",{className:"font-heading text-[clamp(2.75rem,6.5vw,5.5rem)] font-normal text-heading leading-[1.02] tracking-[-0.025em] max-w-[18ch] [font-variation-settings:'opsz'_144,'SOFT'_30]",children:nt(w,"italic font-normal text-accent [font-variation-settings:'opsz'_144,'SOFT'_80]")},void 0,!1,void 0,this),l.intro&&Wl("p",{className:"font-heading font-light text-[clamp(1.1rem,1.8vw,1.4rem)] leading-[1.5] text-theme-muted max-w-[42ch] mt-8 [font-variation-settings:'opsz'_24]",children:nt(l.intro,"italic text-accent")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Wl(_4,{number:"01",title:"Essays",blurb:h.essays?.blurb,children:Wl(it,{items:o,viewAllUrl:u,viewAllLabel:"View all essays"},void 0,!1,void 0,this)},void 0,!1,void 0,this),v.length>0&&Wl(_4,{number:"02",title:"Presentations",blurb:h.presentations?.blurb,children:Wl(it,{items:v,viewAllUrl:i,viewAllLabel:"View all presentations"},void 0,!1,void 0,this)},void 0,!1,void 0,this),b&&Wl(_4,{number:"03",title:"About",blurb:h.about?.blurb,children:Wl("div",{className:"flex flex-col gap-8",children:[l.description&&Wl("p",{className:"font-heading font-light text-[1.25rem] leading-[1.55] text-theme max-w-[55ch] [font-variation-settings:'opsz'_24,'SOFT'_50]",children:l.description},void 0,!1,void 0,this),l.expertise&&l.expertise.length>0&&Wl(v6,{subjects:l.expertise},void 0,!1,void 0,this),Wl("a",{href:"/about",className:"mt-6 inline-flex items-center gap-2 font-mono text-[0.7rem] font-medium uppercase tracking-[0.18em] text-accent pb-1 relative before:content-[''] before:absolute before:left-0 before:right-full before:bottom-0 before:h-px before:bg-accent before:transition-[right] before:duration-300 hover:before:right-0",children:["Learn more",Wl("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Wl(ew,{cta:n,variant:"editorial",...d?{socialLinks:d}:{}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as $l,Fragment as sp}from"preact/jsx-dev-runtime";var D4=({profile:l})=>{let r=`About ${l.name||"Me"}`,f=[l.description,l.intro].find((i)=>i)??"About page",u=(l.expertise?.length??0)>0||Boolean(l.currentFocus)||Boolean(l.availability)||Boolean(l.email)||Boolean(l.website)||(l.socialLinks?.length??0)>0;return $l(sp,{children:[$l(Ml,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),$l("div",{className:"about-page bg-theme",children:[$l("header",{className:"hero-bg-pattern relative w-full py-16 md:py-24 px-6 md:px-12 bg-theme overflow-hidden",children:$l("div",{className:"relative z-10 max-w-4xl mx-auto",children:[$l("h1",{className:"text-5xl md:text-6xl font-semibold mb-6 text-heading",children:["About ",l.name||"Me"]},void 0,!0,void 0,this),l.description&&$l("p",{className:"text-xl md:text-2xl text-theme-muted leading-relaxed",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$l("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-12 md:py-16",children:[l.story&&$l("section",{className:"content-section-reveal mb-20 md:mb-28",children:$l(Dr,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this),u&&$l("div",{className:"content-section-reveal grid md:grid-cols-2 gap-x-16 gap-y-12",children:[l.expertise&&l.expertise.length>0&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Expertise"},void 0,!1,void 0,this),$l("ul",{className:"flex flex-wrap gap-3",children:l.expertise.map((i,n)=>$l("li",{className:n6({variant:"accent",size:"lg"}),children:i},n,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.currentFocus&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Current Focus"},void 0,!1,void 0,this),$l("p",{className:"text-lg text-theme leading-relaxed",children:l.currentFocus},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.availability&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Availability"},void 0,!1,void 0,this),$l("p",{className:"text-lg text-theme leading-relaxed",children:l.availability},void 0,!1,void 0,this)]},void 0,!0,void 0,this),(Boolean(l.email)||Boolean(l.website)||(l.socialLinks?.length??0)>0)&&$l("section",{children:[$l("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Contact"},void 0,!1,void 0,this),$l("div",{className:"space-y-4",children:[l.email&&$l("p",{className:"text-lg",children:$l("a",{href:`mailto:${l.email}`,className:"text-brand hover:text-brand-dark transition-colors",children:l.email},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.website&&$l("p",{className:"text-lg",children:$l("a",{href:l.website,target:"_blank",rel:"noopener noreferrer",className:"text-brand hover:text-brand-dark transition-colors",children:l.website},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.socialLinks&&l.socialLinks.length>0&&$l("div",{className:"flex flex-wrap gap-4 mt-4",children:l.socialLinks.map((i,n)=>$l(j1,{href:i.url,external:!0,variant:"secondary",size:"md",children:i.label?.length?i.label:i.platform},n,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as m1,Fragment as rZ}from"preact/jsx-dev-runtime";var j4=()=>{return m1(rZ,{children:[m1(Ml,{title:"Thanks for subscribing!",description:"You've successfully subscribed to the newsletter."},void 0,!1,void 0,this),m1("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:m1("div",{className:"text-center max-w-md",children:[m1("div",{className:"text-6xl mb-6",children:"\uD83C\uDF89"},void 0,!1,void 0,this),m1("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Thanks for subscribing!"},void 0,!1,void 0,this),m1("p",{className:"text-lg text-theme-muted mb-8",children:"You'll receive a confirmation email shortly. Check your inbox to confirm your subscription."},void 0,!1,void 0,this),m1(j1,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},S4=()=>{return m1(rZ,{children:[m1(Ml,{title:"Subscription failed",description:"There was a problem with your subscription."},void 0,!1,void 0,this),m1("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:m1("div",{className:"text-center max-w-md",children:[m1("div",{className:"text-6xl mb-6",children:"\uD83D\uDE22"},void 0,!1,void 0,this),m1("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Something went wrong"},void 0,!1,void 0,this),m1("p",{className:"text-lg text-theme-muted mb-8",children:"We couldn't process your subscription. Please try again or contact us if the problem persists."},void 0,!1,void 0,this),m1(j1,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};var fZ=W.object({label:W.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:W.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')")}),ep={post:{label:"Post"},deck:{label:"Deck"}},uZ=W.object({entityDisplay:W.object({post:fZ,deck:fZ}).default(ep).describe("Display metadata for post and deck entity types used by the homepage")});var iZ={name:"@brains/site-professional",license:"AGPL-3.0-only",version:"0.2.0-alpha.243",description:"Professional site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/decks":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var rD=W.object({blurb:W.string().nullable().default(null).describe("Short italic subtitle under the section title")}),fD=W.object({heading:W.string(),buttonText:W.string(),buttonLink:W.string()}),uD=Sl,iD=hf;class x4 extends yn{dependencies=["blog","decks"];constructor(l){super("professional-site",iZ,l,uZ)}async onRegister(l){let r=this.config.entityDisplay.post,f=this.config.entityDisplay.deck,u=`/${r.pluralName??r.label.toLowerCase()+"s"}`,i=`/${f.pluralName??f.label.toLowerCase()+"s"}`,n=new Q5(u,i);l.entities.registerDataSource(n);let h=new B5;l.entities.registerDataSource(h);let w=W.object({profile:Pf,posts:W.array(uD),decks:W.array(iD),postsListUrl:W.string(),decksListUrl:W.string(),cta:fD,sections:W.record(W.string(),rD)}),o=W.object({profile:Pf}),v=W.object({});l.templates.register({"homepage-list":Yl({name:"homepage-list",description:"Professional homepage with essays and presentations",schema:w,dataSourceId:"professional:homepage-list",requiredPermission:"public",layout:{component:p4}}),about:Yl({name:"about",description:"About page with full profile information",schema:o,dataSourceId:"professional:about",requiredPermission:"public",layout:{component:D4}}),"subscribe-thanks":Yl({name:"subscribe-thanks",description:"Newsletter subscription success page",schema:v,requiredPermission:"public",layout:{component:j4}}),"subscribe-error":Yl({name:"subscribe-error",description:"Newsletter subscription error page",schema:v,requiredPermission:"public",layout:{component:S4}})}),this.logger.info("Professional site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function E4(l){return new x4(l??{})}var C4=[{id:"home",path:"/",title:"Home",description:"Professional site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"professional-site:homepage-list",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"professional-site:about",dataQuery:{}}]},{id:"subscribe-thanks",path:"/subscribe/thanks",title:"Thanks for subscribing",description:"Newsletter subscription confirmation",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-thanks",template:"professional-site:subscribe-thanks",dataQuery:{},content:{}}]},{id:"subscribe-error",path:"/subscribe/error",title:"Subscription failed",description:"Newsletter subscription error",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-error",template:"professional-site:subscribe-error",dataQuery:{},content:{}}]}];import{jsxDEV as H5}from"preact/jsx-dev-runtime";function s4({sections:l,siteInfo:r,slots:f,wordmark:u}){return H5("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[H5(A2,{title:r.title,navigation:r.navigation.primary,showThemeToggle:!0,...r.logo!==void 0?{logo:r.logo}:{},...u!==void 0?{wordmark:u}:{}},void 0,!1,void 0,this),H5("main",{className:"flex-grow flex flex-col bg-theme",children:l},void 0,!1,void 0,this),H5(f6,{primaryNavigation:r.navigation.primary,secondaryNavigation:r.navigation.secondary,copyright:r.copyright,socialLinks:r.socialLinks,title:r.title,tagline:r.description,children:f?.getSlot("footer-top").map((i)=>i.render())},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function nZ(l){return l}var yo0=G4;function go0(l){return nZ(B4(l))}var nD=H4,do0=nD,Ao0=s4;function Ko0(l){return nZ(E4(l))}var Wo0=C4;export{nD as routes,Ko0 as professionalSitePlugin,Wo0 as professionalRoutes,go0 as personalSitePlugin,do0 as personalRoutes,Ao0 as ProfessionalLayout,yo0 as PersonalLayout};
|
|
1684
1684
|
|
|
1685
|
-
//# debugId=
|
|
1685
|
+
//# debugId=C670C6196C12F1D564756E2164756E21
|
|
1686
1686
|
//# sourceMappingURL=site.js.map
|