@donotdev/templates 0.0.8 → 0.0.10

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.
Files changed (69) hide show
  1. package/README.md +42 -0
  2. package/dist/AdminLandingTemplate.d.ts +0 -1
  3. package/dist/AdminLandingTemplate.d.ts.map +1 -1
  4. package/dist/AdminLandingTemplate.js +1 -1
  5. package/dist/DashboardTemplate.d.ts.map +1 -1
  6. package/dist/DashboardTemplate.js +1 -1
  7. package/dist/HomeTemplate.js +1 -1
  8. package/dist/LoginTemplate.d.ts.map +1 -1
  9. package/dist/LoginTemplate.js +1 -1
  10. package/dist/ProfileTemplate.d.ts.map +1 -1
  11. package/dist/ProfileTemplate.js +1 -1
  12. package/dist/WhatsNewTemplate.d.ts.map +1 -1
  13. package/dist/WhatsNewTemplate.js +1 -1
  14. package/dist/billing/BillingSuccessTemplate.d.ts +1 -3
  15. package/dist/billing/BillingSuccessTemplate.d.ts.map +1 -1
  16. package/dist/billing/BillingSuccessTemplate.js +1 -1
  17. package/dist/billing/CheckoutTemplate.d.ts +1 -2
  18. package/dist/billing/CheckoutTemplate.d.ts.map +1 -1
  19. package/dist/billing/CheckoutTemplate.js +1 -1
  20. package/dist/billing/PaymentTemplate.d.ts +2 -3
  21. package/dist/billing/PaymentTemplate.d.ts.map +1 -1
  22. package/dist/billing/PaymentTemplate.js +1 -1
  23. package/dist/billing/SubscriptionTemplate.d.ts +2 -3
  24. package/dist/billing/SubscriptionTemplate.d.ts.map +1 -1
  25. package/dist/billing/SubscriptionTemplate.js +1 -1
  26. package/dist/billing/UserSubscriptionTemplate.js +1 -1
  27. package/dist/blog/BlogList.d.ts +28 -0
  28. package/dist/blog/BlogList.d.ts.map +1 -0
  29. package/dist/blog/BlogList.js +1 -0
  30. package/dist/blog/BlogPost.d.ts +29 -0
  31. package/dist/blog/BlogPost.d.ts.map +1 -0
  32. package/dist/blog/BlogPost.js +1 -0
  33. package/dist/blog/blog-loader.d.ts +136 -0
  34. package/dist/blog/blog-loader.d.ts.map +1 -0
  35. package/dist/blog/blog-loader.js +2 -0
  36. package/dist/blog/index.d.ts +31 -0
  37. package/dist/blog/index.d.ts.map +1 -0
  38. package/dist/blog/index.js +1 -0
  39. package/dist/components/MarkdownViewer.d.ts +0 -1
  40. package/dist/components/MarkdownViewer.d.ts.map +1 -1
  41. package/dist/components/MarkdownViewer.js +1 -1
  42. package/dist/crud/CarCardListTemplate.d.ts +0 -1
  43. package/dist/crud/CarCardListTemplate.d.ts.map +1 -1
  44. package/dist/crud/CarCardListTemplate.js +1 -1
  45. package/dist/crud/CarDetailTemplate.d.ts +0 -1
  46. package/dist/crud/CarDetailTemplate.d.ts.map +1 -1
  47. package/dist/crud/CarDetailTemplate.js +1 -1
  48. package/dist/crud/InquiryAdminTemplate.d.ts +1 -2
  49. package/dist/crud/InquiryAdminTemplate.d.ts.map +1 -1
  50. package/dist/crud/InquiryAdminTemplate.js +1 -1
  51. package/dist/crud/InquiryFormTemplate.d.ts +0 -1
  52. package/dist/crud/InquiryFormTemplate.d.ts.map +1 -1
  53. package/dist/crud/InquiryFormTemplate.js +1 -1
  54. package/dist/crud/ProductCardListTemplate.d.ts +0 -1
  55. package/dist/crud/ProductCardListTemplate.d.ts.map +1 -1
  56. package/dist/crud/ProductCardListTemplate.js +1 -40
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/legal/LegalNoticeTemplate.d.ts +10 -1
  61. package/dist/legal/LegalNoticeTemplate.d.ts.map +1 -1
  62. package/dist/legal/LegalNoticeTemplate.js +1 -1
  63. package/dist/legal/PrivacyPolicyTemplate.d.ts +10 -2
  64. package/dist/legal/PrivacyPolicyTemplate.d.ts.map +1 -1
  65. package/dist/legal/PrivacyPolicyTemplate.js +1 -1
  66. package/dist/legal/TermsOfServiceTemplate.d.ts +10 -2
  67. package/dist/legal/TermsOfServiceTemplate.d.ts.map +1 -1
  68. package/dist/legal/TermsOfServiceTemplate.js +1 -1
  69. package/package.json +12 -12
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @donotdev/templates
2
+
3
+ Page templates, blog system, and reusable components for common app patterns.
4
+
5
+ ## What's Included
6
+
7
+ - **Page Templates** — Home, Dashboard, Login, Profile, Admin Landing, What's New
8
+ - **Blog System** — Convention-based markdown blog with i18n (`slug_lang.md`), reading time, tags, and auto-generated RSS/sitemap
9
+ - **CRUD Templates** — Entity list/detail page templates
10
+ - **Billing Templates** — Pricing, checkout, subscription management pages
11
+ - **Legal Templates** — Privacy policy, terms of service
12
+ - **MarkdownViewer** — SSR-safe markdown renderer with syntax highlighting, lazy images, and framework Link integration
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ bun install @donotdev/templates
18
+ ```
19
+
20
+ ## Blog Quick Start
21
+
22
+ ```typescript
23
+ import { createBlogLoader, BlogList, BlogPostView } from '@donotdev/templates';
24
+
25
+ // In your app's data loader:
26
+ const files = import.meta.glob('../../content/blog/*.md', {
27
+ query: '?raw', import: 'default', eager: true,
28
+ });
29
+ const blog = createBlogLoader(files as Record<string, string>, 'en');
30
+
31
+ // Get posts
32
+ const posts = blog.getAllPosts(); // Sorted by date, newest first
33
+ const post = blog.getPostBySlug('my-post');
34
+ const tags = blog.getAllTags();
35
+ const filtered = blog.getPostsByTag('react');
36
+ ```
37
+
38
+ File convention: `src/content/blog/my-post_en.md`, `my-post_fr.md` (falls back to `_en`).
39
+
40
+ ## License
41
+
42
+ This package is part of the DoNotDev Framework.
@@ -47,5 +47,4 @@ export interface AdminLandingTemplateProps {
47
47
 
48
48
  */
49
49
  export declare function AdminLandingTemplate({ title, subtitle, message, supportLink, publicWebsiteLink, redirectConfig, children, }: AdminLandingTemplateProps): import("react/jsx-runtime").JSX.Element | null;
50
- export default AdminLandingTemplate;
51
50
  //# sourceMappingURL=AdminLandingTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdminLandingTemplate.d.ts","sourceRoot":"","sources":["../src/AdminLandingTemplate.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,yBAAyB;IACxC,uCAAuC;IAEvC,KAAK,EAAE,MAAM,CAAC;IAEd,oEAAoE;IAEpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,6CAA6C;IAE7C,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QAEd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF,yCAAyC;IAEzC,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,wCAAwC;IAExC,iBAAiB,CAAC,EAAE;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,6BAA6B;IAE7B,cAAc,CAAC,EAAE;QACf,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;QAElC,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,wDAAwD;IAExD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAEL,QAAQ,EAER,OAAO,EAEP,WAAW,EAEX,iBAAiB,EAEjB,cAAc,EAEd,QAAQ,GACT,EAAE,yBAAyB,kDAkG3B;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"AdminLandingTemplate.d.ts","sourceRoot":"","sources":["../src/AdminLandingTemplate.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,yBAAyB;IACxC,uCAAuC;IAEvC,KAAK,EAAE,MAAM,CAAC;IAEd,oEAAoE;IAEpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,6CAA6C;IAE7C,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QAEd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF,yCAAyC;IAEzC,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,wCAAwC;IAExC,iBAAiB,CAAC,EAAE;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,6BAA6B;IAE7B,cAAc,CAAC,EAAE;QACf,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;QAElC,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,wDAAwD;IAExD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAEL,QAAQ,EAER,OAAO,EAEP,WAAW,EAEX,iBAAiB,EAEjB,cAAc,EAEd,QAAQ,GACT,EAAE,yBAAyB,kDAmG3B"}
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as k,jsxs as o}from"react/jsx-runtime";import{useEffect as y}from"react";import{MultipleAuthProviders as z}from"@donotdev/auth";import{HeroSection as T,Section as C,Text as P,Stack as x}from"@donotdev/components";import{useTranslation as A,useAppConfig as j,getPlatformEnvVar as R}from"@donotdev/core";import{PageContainer as W,useNavigate as E,useRedirectGuard as F,Loader as U,Link as u}from"@donotdev/ui";function m({title:f,subtitle:g,message:i,supportLink:s,publicWebsiteLink:l,redirectConfig:d,children:h}){const{t:c}=A("dndev"),p=E(),v=j("app"),{shouldRedirect:n,redirectTo:t,isChecking:b}=F({condition:d?.condition,redirectTo:d?.redirectTo});if(y(()=>{n&&t&&p(t,{replace:!0})},[n,t,p]),b)return e(U,{});if(n&&t)return null;const a=s?.path||v?.links?.support,r=l?.path||R("APP_URL"),L=s?.label||c("adminLanding.contactSupport","Contact Support"),S=l?.label||c("adminLanding.visitWebsite","Visit Website");return o(W,{children:[e(T,{title:f,subtitle:g,variant:"primary"}),i&&e(C,{title:i.title,align:"center",children:e(P,{as:"p",level:"body",children:i.content})}),e(z,{}),h,(a||r)&&o(x,{direction:"row",gap:"tight",justify:"center",align:"center",children:[a&&o(k,{children:[e(u,{path:a,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:L}),r&&e("span",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:" | "})]}),r&&e(u,{path:r,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:S})]})]})}var V=m;export{m as AdminLandingTemplate,V as default};
1
+ "use client";import{jsx as t,Fragment as P,jsxs as a}from"react/jsx-runtime";import{useEffect as x}from"react";import{MultipleAuthProviders as y}from"@donotdev/auth";import{HeroSection as z,Section as L,Text as T,Stack as j}from"@donotdev/components";import{useTranslation as A,useAppConfig as C,getPlatformEnvVar as _}from"@donotdev/core";import{PageContainer as R,useNavigate as W,useRedirectGuard as k,Loader as E,Link as u}from"@donotdev/ui";function N({title:f,subtitle:m,message:i,supportLink:s,publicWebsiteLink:c,redirectConfig:l,children:h}){const{t:d}=A("dndev"),p=W(),g=C("app"),{shouldRedirect:n,redirectTo:e,isChecking:v}=k({condition:l?.condition,redirectTo:l?.redirectTo});if(x(()=>{n&&e&&p(e,{replace:!0})},[n,e,p]),v)return t(E,{});if(n&&e)return null;const o=s?.path||g?.links?.support,r=c?.path||_("APP_URL"),b=s?.label||d("adminLanding.contactSupport","Contact Support"),S=c?.label||d("adminLanding.visitWebsite","Visit Website");return a(R,{children:[t(z,{title:f,subtitle:m,variant:"primary"}),i&&t(L,{title:i.title,align:"center",children:t(T,{as:"p",level:"body",children:i.content})}),t(y,{}),h,(o||r)&&a(j,{direction:"row",gap:"tight",justify:"center",align:"center",children:[o&&a(P,{children:[t(u,{path:o,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:b}),r&&t("span",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:" | "})]}),r&&t(u,{path:r,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:S})]})]})}export{N as AdminLandingTemplate};
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardTemplate.d.ts","sourceRoot":"","sources":["../src/DashboardTemplate.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAY/B,CAAC"}
1
+ {"version":3,"file":"DashboardTemplate.d.ts","sourceRoot":"","sources":["../src/DashboardTemplate.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAY/B,CAAC"}
@@ -1 +1 @@
1
- import{jsx as o,jsxs as a}from"react/jsx-runtime";import{Stack as e}from"@donotdev/components";const r=()=>a(e,{gap:"large",children:[o("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700},children:"Dashboard"}),o("p",{style:{color:"var(--muted-foreground)"},children:"Dashboard template coming soon. This is a placeholder for the full dashboard implementation."})]});export{r as DashboardTemplate};
1
+ "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Stack as r}from"@donotdev/components";const t=()=>o(r,{gap:"large",children:[e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700},children:"Dashboard"}),e("p",{style:{color:"var(--muted-foreground)"},children:"Dashboard template coming soon. This is a placeholder for the full dashboard implementation."})]});export{t as DashboardTemplate};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as e}from"react/jsx-runtime";import{Button as o,CallToAction as i,Card as n,HeroSection as r,Section as c,Text as a}from"@donotdev/components";import{PageContainer as s}from"@donotdev/ui";function d(){return e(s,{children:[t(r,{title:"I AM HeroSection",subtitle:"I am the hero section component with gradient background and prominent call-to-action",variant:"primary"}),e(c,{title:"I am Section",gridCols:3,children:[t(n,{title:"I am Card1",children:t(a,{children:"I am the first card component. Cards are used to showcase content, features, or information in a contained format."})}),t(n,{title:"I am Card2",children:t(a,{children:"I am the second card component. Cards can contain any content including text, images, buttons, or other components."})}),t(n,{title:"I am Card3",children:t(a,{children:"I am the third card component. When placed inside a Section with gridCols, cards automatically arrange in a responsive grid layout."})})]}),t(i,{title:"I AM CallToAction",subtitle:"I am the call to action component used for conversion-focused sections with primary and secondary actions",primaryAction:t(o,{variant:"primary",children:"Primary Action"}),secondaryAction:t(o,{variant:"outline",children:"Secondary Action"})})]})}export{d as HomeTemplate};
1
+ "use client";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Button as i,CallToAction as a,Card as n,HeroSection as r,Section as c,Text as e}from"@donotdev/components";import{PageContainer as d}from"@donotdev/ui";function h(){return o(d,{children:[t(r,{title:"I AM HeroSection",subtitle:"I am the hero section component with gradient background and prominent call-to-action",variant:"primary"}),o(c,{title:"I am Section",gridCols:3,children:[t(n,{title:"I am Card1",children:t(e,{children:"I am the first card component. Cards are used to showcase content, features, or information in a contained format."})}),t(n,{title:"I am Card2",children:t(e,{children:"I am the second card component. Cards can contain any content including text, images, buttons, or other components."})}),t(n,{title:"I am Card3",children:t(e,{children:"I am the third card component. When placed inside a Section with gridCols, cards automatically arrange in a responsive grid layout."})})]}),t(a,{title:"I AM CallToAction",subtitle:"I am the call to action component used for conversion-focused sections with primary and secondary actions",primaryAction:t(i,{variant:"primary",children:"Primary Action"}),secondaryAction:t(i,{variant:"outline",children:"Secondary Action"})})]})}export{h as HomeTemplate};
@@ -1 +1 @@
1
- {"version":3,"file":"LoginTemplate.d.ts","sourceRoot":"","sources":["../src/LoginTemplate.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAsGhD,CAAC"}
1
+ {"version":3,"file":"LoginTemplate.d.ts","sourceRoot":"","sources":["../src/LoginTemplate.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAsGhD,CAAC"}
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as c}from"react/jsx-runtime";import"lucide-react";import{Card as e,Stack as n}from"@donotdev/components";import{useTranslation as g}from"@donotdev/core";import{useAuthVisibility as u}from"@donotdev/ui";const p=({title:r,subtitle:o,redirectTo:a})=>{const{shouldHide:l,isLoading:s,isReady:d}=u(),{t:i}=g("login");return l?t(e,{subtitle:o||i("login.description","Sign in to your account"),children:t("div",{className:"dndev-surface","data-variant":"destructive",style:{borderRadius:"var(--radius-lg)",border:"1px solid var(--destructive)",backgroundColor:"color-mix(in oklab, var(--destructive) 10%, transparent)",padding:"var(--gap-md)"},children:t("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--destructive-foreground)"},children:i("login.authNotAvailable","Authentication is not available. Please contact support if you believe this is an error.")})})}):s||!d?t(e,{title:r||i("login.title","Login"),subtitle:o||i("login.description","Sign in to your account"),children:t(n,{align:"center",justify:"center",style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:t("div",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("login.loading","Loading authentication...")})})}):t(e,{title:r||i("login.title","Login"),subtitle:o||i("login.description","Sign in to your account"),children:c(n,{gap:"medium",children:[t("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("login.comingSoon","Login template coming soon. Redirect: {redirectTo}",{redirectTo:a||"/"})}),t("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("login.placeholder","This is a placeholder for the full login implementation with Firebase Auth integration.")})]})})};export{p as LoginTemplate};
1
+ "use client";import{jsx as o,jsxs as c}from"react/jsx-runtime";import{Card as t,Stack as n}from"@donotdev/components";import{useTranslation as g}from"@donotdev/core";import{useAuthVisibility as u}from"@donotdev/ui";const h=({title:r,subtitle:e,redirectTo:a})=>{const{shouldHide:l,isLoading:s,isReady:d}=u(),{t:i}=g("login");return l?o(t,{subtitle:e||i("login.description","Sign in to your account"),children:o("div",{className:"dndev-surface","data-variant":"destructive",style:{borderRadius:"var(--radius-lg)",border:"1px solid var(--destructive)",backgroundColor:"color-mix(in oklab, var(--destructive) 10%, transparent)",padding:"var(--gap-md)"},children:o("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--destructive-foreground)"},children:i("login.authNotAvailable","Authentication is not available. Please contact support if you believe this is an error.")})})}):s||!d?o(t,{title:r||i("login.title","Login"),subtitle:e||i("login.description","Sign in to your account"),children:o(n,{align:"center",justify:"center",style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:o("div",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("login.loading","Loading authentication...")})})}):o(t,{title:r||i("login.title","Login"),subtitle:e||i("login.description","Sign in to your account"),children:c(n,{children:[o("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("login.comingSoon","Login template coming soon. Redirect: {redirectTo}",{redirectTo:a||"/"})}),o("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("login.placeholder","This is a placeholder for the full login implementation with Firebase Auth integration.")})]})})};export{h as LoginTemplate};
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileTemplate.d.ts","sourceRoot":"","sources":["../src/ProfileTemplate.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsBpD,CAAC"}
1
+ {"version":3,"file":"ProfileTemplate.d.ts","sourceRoot":"","sources":["../src/ProfileTemplate.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsBpD,CAAC"}
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Stack as r}from"@donotdev/components";const o=({customClaims:i})=>t(r,{gap:"large",children:[e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700},children:"Profile"}),e("p",{style:{color:"var(--muted-foreground)"},children:"Profile template coming soon. This is a placeholder for the full profile management implementation."}),i&&i.length>0&&t("div",{style:{fontSize:"var(--font-size-sm)"},children:[e("p",{style:{fontWeight:500},children:"Custom claims tracked:"}),e("ul",{style:{listStyleType:"disc",paddingInlineStart:"2.5rem"},children:i.map(l=>e("li",{children:l},l))})]})]});export{o as ProfileTemplate};
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Stack as i}from"@donotdev/components";const s=({customClaims:t})=>r(i,{gap:"large",children:[e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700},children:"Profile"}),e("p",{style:{color:"var(--muted-foreground)"},children:"Profile template coming soon. This is a placeholder for the full profile management implementation."}),t&&t.length>0&&r("div",{style:{fontSize:"var(--font-size-sm)"},children:[e("p",{style:{fontWeight:500},children:"Custom claims tracked:"}),e("ul",{style:{listStyleType:"disc",paddingInlineStart:"2.5rem"},children:t.map(l=>e("li",{children:l},l))})]})]});export{s as ProfileTemplate};
@@ -1 +1 @@
1
- {"version":3,"file":"WhatsNewTemplate.d.ts","sourceRoot":"","sources":["../src/WhatsNewTemplate.tsx"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE;QACP,IAAI,EACA,OAAO,GACP,SAAS,GACT,YAAY,GACZ,SAAS,GACT,OAAO,GACP,UAAU,GACV,aAAa,CAAC;QAClB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,EAAE,CAAC;IACJ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,SAAS,EACT,cAAqB,EACrB,iBAAwB,EACxB,UAAU,EACV,eAAe,GAChB,EAAE,qBAAqB,2CAmbvB"}
1
+ {"version":3,"file":"WhatsNewTemplate.d.ts","sourceRoot":"","sources":["../src/WhatsNewTemplate.tsx"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE;QACP,IAAI,EACA,OAAO,GACP,SAAS,GACT,YAAY,GACZ,SAAS,GACT,OAAO,GACP,UAAU,GACV,aAAa,CAAC;QAClB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,EAAE,CAAC;IACJ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,SAAS,EACT,cAAqB,EACrB,iBAAwB,EACxB,UAAU,EACV,eAAe,GAChB,EAAE,qBAAqB,2CAuavB"}
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useState as m,useEffect as N}from"react";import{cn as W,Badge as s,BADGE_VARIANT as d,Card as p,Stack as a,Grid as h}from"@donotdev/components";function B({changelog:o,className:f,showNavigation:y=!0,showVersionBadges:l=!0,maxEntries:c,onVersionSelect:w}){const[g,z]=m(null),[u,b]=m([]);N(()=>{let e=o;c&&(e=o.slice(0,c)),b(e)},[o,c]);const v=e=>{switch(e){case"major":return{backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)"};case"minor":return{backgroundColor:"var(--primary)",color:"var(--primary-foreground)"};case"patch":return{backgroundColor:"var(--success)",color:"var(--success-foreground)"};case"preview":return{backgroundColor:"var(--accent)",color:"var(--accent-foreground)"};case"beta":return{backgroundColor:"var(--warning)",color:"var(--warning-foreground)"};default:return{backgroundColor:"var(--muted)",color:"var(--muted-foreground)"}}},x=e=>{switch(e){case"added":return"\u{1F7E2}";case"changed":return"\u{1F7E1}";case"deprecated":return"\u{1F7E0}";case"removed":return"\u{1F534}";case"fixed":return"\u{1F527}";case"security":return"\u{1F512}";case"performance":return"\u26A1";default:return"\u2022"}},S=e=>{switch(e){case"added":return"var(--success)";case"changed":return"var(--warning)";case"deprecated":return"var(--warning)";case"removed":return"var(--destructive)";case"fixed":return"var(--primary)";case"security":return"var(--accent)";case"performance":return"var(--primary)";default:return"var(--muted-foreground)"}},C=e=>{z(e),w?.(e)},t=g?o.find(e=>e.version===g):u[0];return n("div",{className:W("dndev-w-full dndev-mx-auto",f),style:{maxWidth:"72rem"},children:[n("div",{className:"dndev-text-center",style:{marginBottom:"var(--gap-lg)"},children:[r("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,color:"var(--foreground)",marginBottom:"var(--gap-md)"},children:"What's New in DnDev"}),r("p",{className:"dndev-mx-auto",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",maxWidth:"42rem"},children:"Stay up to date with the latest features, improvements, and fixes in the DoNotDev Framework"})]}),n(h,{cols:4,gap:"large",className:"dndev-grid-responsive-1-4",children:[y&&r("div",{style:{gridColumn:"span 1"},children:r(p,{title:r(a,{direction:"row",align:"center",gap:"tight",children:"\u{1F33F} Versions"}),children:r(a,{gap:"tight",children:u.map(e=>n("button",{onClick:()=>C(e.version),className:"dndev-w-full dndev-text-left dndev-surface","data-variant":t?.version===e.version?"accent":"default",style:{padding:"var(--gap-md)",borderLeft:t?.version===e.version?"2px solid var(--primary)":void 0,transition:"background-color 0.2s"},children:[n(a,{direction:"row",align:"center",justify:"between",style:{marginBottom:"var(--gap-sm)"},children:[r("span",{style:{fontFamily:"monospace",fontSize:"var(--font-size-sm)",fontWeight:500},children:e.version}),l&&r(s,{variant:d.SECONDARY,style:{fontSize:"var(--font-size-xs)",...v(e.type)},children:e.type})]}),n(a,{direction:"row",align:"center",gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:["\u{1F4C5} ",new Date(e.date).toLocaleDateString()]}),r("div",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,marginTop:"var(--gap-sm)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.title})]},e.version))})})}),r("div",{style:{gridColumn:"span 3"},children:t&&r(p,{title:r(a,{direction:"row",align:"start",justify:"between",children:n("div",{children:[n(a,{direction:"row",align:"center",gap:"medium",style:{marginBottom:"var(--gap-sm)"},children:[r("h2",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700,color:"var(--foreground)"},children:t.title}),l&&r(s,{variant:d.SECONDARY,style:{fontSize:"var(--font-size-sm)",...v(t.type)},children:t.type})]}),n(a,{direction:"row",align:"center",gap:"medium",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:[n(a,{direction:"row",align:"center",gap:"tight",children:["\u{1F3F7}\uFE0F"," ",r("span",{style:{fontFamily:"monospace"},children:t.version})]}),n(a,{direction:"row",align:"center",gap:"tight",children:["\u{1F4C5} ",new Date(t.date).toLocaleDateString()]})]})]})}),subtitle:t.description,children:n(a,{gap:"medium",children:[t.changes.map((e,i)=>n(a,{gap:"medium",children:[r("h3",{className:"dndev-flex dndev-items-center dndev-gap-sm",style:{fontSize:"var(--font-size-lg)",fontWeight:600,color:S(e.type)},children:n(a,{direction:"row",align:"center",gap:"tight",as:"span",children:[r("span",{children:x(e.type)}),r("span",{children:e.type.charAt(0).toUpperCase()+e.type.slice(1)})]})}),r(a,{as:"ul",gap:"tight",style:{marginLeft:"1.5rem"},children:e.items.map((k,F)=>r("li",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:k},F))})]},i)),t.breaking&&t.breaking.length>0&&n("div",{style:{borderLeft:"4px solid var(--destructive)",paddingLeft:"var(--gap-md)",paddingTop:"var(--gap-sm)",paddingBottom:"var(--gap-sm)",backgroundColor:"color-mix(in oklab, var(--destructive) 10%, transparent)"},children:[r("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,color:"var(--destructive-foreground)",marginBottom:"var(--gap-sm)"},children:"\u26A0\uFE0F Breaking Changes"}),r(a,{as:"ul",gap:"tight",children:t.breaking.map((e,i)=>r("li",{style:{fontSize:"var(--font-size-sm)",color:"var(--destructive-foreground)"},children:e},i))})]}),(t.contributors||t.pullRequests)&&r("div",{style:{paddingTop:"var(--gap-md)",borderTop:"1px solid var(--border)"},children:n(h,{cols:2,gap:"medium",className:"dndev-grid-responsive-1-2",children:[t.contributors&&n("div",{children:[r("h4",{style:{fontWeight:500,fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",marginBottom:"var(--gap-sm)"},children:"Contributors"}),r(a,{direction:"row",wrap:"wrap",gap:"tight",children:t.contributors.map((e,i)=>r(s,{variant:d.OUTLINE,style:{fontSize:"var(--font-size-xs)"},children:e},i))})]}),t.pullRequests&&n("div",{children:[r("h4",{style:{fontWeight:500,fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",marginBottom:"var(--gap-sm)"},children:"Pull Requests"}),r(a,{direction:"row",wrap:"wrap",gap:"tight",children:t.pullRequests.map((e,i)=>n(s,{variant:d.OUTLINE,style:{fontSize:"var(--font-size-xs)"},children:["#",e]},i))})]})]})})]})})})]})]})}export{B as WhatsNewTemplate};
1
+ "use client";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useState as x,useMemo as D}from"react";import{cn as k,Badge as o,BADGE_VARIANT as s,Card as p,Stack as i,Grid as f}from"@donotdev/components";import{useTranslation as N}from"@donotdev/core";function I({changelog:a,className:h,showNavigation:y=!0,showVersionBadges:l=!0,maxEntries:d,onVersionSelect:w}){const{t:c}=N("whatsNew"),[v,z]=x(null),u=D(()=>d?a.slice(0,d):a,[a,d]),g=e=>{switch(e){case"major":return{backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)"};case"minor":return{backgroundColor:"var(--primary)",color:"var(--primary-foreground)"};case"patch":return{backgroundColor:"var(--success)",color:"var(--success-foreground)"};case"preview":return{backgroundColor:"var(--accent)",color:"var(--accent-foreground)"};case"beta":return{backgroundColor:"var(--warning)",color:"var(--warning-foreground)"};default:return{backgroundColor:"var(--muted)",color:"var(--muted-foreground)"}}},S=e=>{switch(e){case"added":return"\u{1F7E2}";case"changed":return"\u{1F7E1}";case"deprecated":return"\u{1F7E0}";case"removed":return"\u{1F534}";case"fixed":return"\u{1F527}";case"security":return"\u{1F512}";case"performance":return"\u26A1";default:return"\u2022"}},b=e=>{switch(e){case"added":return"var(--success)";case"changed":return"var(--warning)";case"deprecated":return"var(--warning)";case"removed":return"var(--destructive)";case"fixed":return"var(--primary)";case"security":return"var(--accent)";case"performance":return"var(--primary)";default:return"var(--muted-foreground)"}},C=e=>{z(e),w?.(e)},t=v?a.find(e=>e.version===v):u[0];return n("div",{className:k("dndev-w-full dndev-mx-auto",h),style:{maxWidth:"72rem"},children:[n("div",{className:"dndev-text-center",style:{marginBottom:"var(--gap-lg)"},children:[r("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,color:"var(--foreground)",marginBottom:"var(--gap-md)"},children:c("title","What's New in DnDev")}),r("p",{className:"dndev-mx-auto",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",maxWidth:"42rem"},children:c("subtitle","Stay up to date with the latest features, improvements, and fixes in the DoNotDev Framework")})]}),n(f,{cols:4,gap:"large",className:"dndev-grid-responsive-1-4",children:[y&&r("div",{style:{gridColumn:"span 1"},children:r(p,{title:r(i,{direction:"row",align:"center",gap:"tight",children:"\u{1F33F} Versions"}),children:r(i,{gap:"tight",children:u.map(e=>n("button",{onClick:()=>C(e.version),className:"dndev-w-full dndev-text-left dndev-surface","data-variant":t?.version===e.version?"accent":"default",style:{padding:"var(--gap-md)",borderInlineStart:t?.version===e.version?"2px solid var(--primary)":void 0,transition:"background-color 0.2s"},children:[n(i,{direction:"row",align:"center",justify:"between",style:{marginBottom:"var(--gap-sm)"},children:[r("span",{style:{fontFamily:"monospace",fontSize:"var(--font-size-sm)",fontWeight:500},children:e.version}),l&&r(o,{variant:s.SECONDARY,style:{fontSize:"var(--font-size-xs)",...g(e.type)},children:e.type})]}),n(i,{direction:"row",align:"center",gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:["\u{1F4C5} ",new Date(e.date).toLocaleDateString()]}),r("div",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,marginTop:"var(--gap-sm)",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.title})]},e.version))})})}),r("div",{style:{gridColumn:"span 3"},children:t&&r(p,{title:r(i,{direction:"row",align:"start",justify:"between",children:n("div",{children:[n(i,{direction:"row",align:"center",style:{marginBottom:"var(--gap-sm)"},children:[r("h2",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700,color:"var(--foreground)"},children:t.title}),l&&r(o,{variant:s.SECONDARY,style:{fontSize:"var(--font-size-sm)",...g(t.type)},children:t.type})]}),n(i,{direction:"row",align:"center",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:[n(i,{direction:"row",align:"center",gap:"tight",children:["\u{1F3F7}\uFE0F"," ",r("span",{style:{fontFamily:"monospace"},children:t.version})]}),n(i,{direction:"row",align:"center",gap:"tight",children:["\u{1F4C5} ",new Date(t.date).toLocaleDateString()]})]})]})}),subtitle:t.description,children:n(i,{children:[t.changes.map(e=>n(i,{children:[r("h3",{className:"dndev-flex dndev-items-center dndev-gap-sm",style:{fontSize:"var(--font-size-lg)",fontWeight:600,color:b(e.type)},children:n(i,{direction:"row",align:"center",gap:"tight",as:"span",children:[r("span",{children:S(e.type)}),r("span",{children:e.type.charAt(0).toUpperCase()+e.type.slice(1)})]})}),r(i,{as:"ul",gap:"tight",style:{marginInlineStart:"1.5rem"},children:e.items.map(m=>r("li",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m},m))})]},e.type)),t.breaking&&t.breaking.length>0&&n("div",{style:{borderInlineStart:"4px solid var(--destructive)",paddingInlineStart:"var(--gap-md)",paddingTop:"var(--gap-sm)",paddingBottom:"var(--gap-sm)",backgroundColor:"color-mix(in oklab, var(--destructive) 10%, transparent)"},children:[r("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,color:"var(--destructive-foreground)",marginBottom:"var(--gap-sm)"},children:"\u26A0\uFE0F Breaking Changes"}),r(i,{as:"ul",gap:"tight",children:t.breaking.map(e=>r("li",{style:{fontSize:"var(--font-size-sm)",color:"var(--destructive-foreground)"},children:e},e))})]}),(t.contributors||t.pullRequests)&&r("div",{style:{paddingTop:"var(--gap-md)",borderTop:"1px solid var(--border)"},children:n(f,{cols:2,className:"dndev-grid-responsive-1-2",children:[t.contributors&&n("div",{children:[r("h4",{style:{fontWeight:500,fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",marginBottom:"var(--gap-sm)"},children:"Contributors"}),r(i,{direction:"row",wrap:"wrap",gap:"tight",children:t.contributors.map(e=>r(o,{variant:s.OUTLINE,style:{fontSize:"var(--font-size-xs)"},children:e},e))})]}),t.pullRequests&&n("div",{children:[r("h4",{style:{fontWeight:500,fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",marginBottom:"var(--gap-sm)"},children:"Pull Requests"}),r(i,{direction:"row",wrap:"wrap",gap:"tight",children:t.pullRequests.map(e=>n(o,{variant:s.OUTLINE,style:{fontSize:"var(--font-size-xs)"},children:["#",e]},e))})]})]})})]})})})]})]})}export{I as WhatsNewTemplate};
@@ -1,7 +1,5 @@
1
- import type { PageMeta } from '@donotdev/core';
2
1
  export interface BillingSuccessTemplateProps {
3
2
  namespace: string;
4
- meta: PageMeta;
5
3
  title?: string;
6
4
  subtitle?: string;
7
5
  nextSteps?: Array<{
@@ -22,5 +20,5 @@ export interface BillingSuccessTemplateProps {
22
20
  * @since 0.0.1
23
21
  * @author AMBROISE PARK Consulting
24
22
  */
25
- export declare function BillingSuccessTemplate({ namespace, meta, title, subtitle, nextSteps, supportEmail, }: BillingSuccessTemplateProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function BillingSuccessTemplate({ namespace, title, subtitle, nextSteps, supportEmail, }: BillingSuccessTemplateProps): import("react/jsx-runtime").JSX.Element;
26
24
  //# sourceMappingURL=BillingSuccessTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BillingSuccessTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/BillingSuccessTemplate.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAS/C,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAc,EACd,YAAoC,GACrC,EAAE,2BAA2B,2CA2P7B"}
1
+ {"version":3,"file":"BillingSuccessTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/BillingSuccessTemplate.tsx"],"names":[],"mappings":"AAqCA,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAc,EACd,YAAoC,GACrC,EAAE,2BAA2B,2CA8P7B"}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CheckCircle as d,AlertCircle as S,ExternalLink as b}from"lucide-react";import{Card as s,Button as m,BUTTON_VARIANT as x,Stack as a,Grid as T}from"@donotdev/components";import{useTranslation as B}from"@donotdev/core";import{PageContainer as u,useNavigate as N,useAuthSafe as k,useBillingVisibility as C,FeatureDisabled as w}from"@donotdev/ui";function W({namespace:g,meta:E,title:o,subtitle:p,nextSteps:c=[],supportEmail:l="support@example.com"}){const{shouldHide:h}=C(),{t:n}=B([g,"billing"]),v=k("userSubscription"),f=N();if(h)return e(u,{variant:"docs",children:e(w,{featureName:"Billing Success",title:o||n("billing:templates.success.title","Payment Successful!"),description:n("billing:templates.success.notAvailable","Billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,supportEmail:l})});const i=v,y=i?.status==="active";return e(u,{variant:"docs",children:t("div",{children:[t("div",{className:"dndev-text-center",style:{marginBottom:"var(--gap-lg)"},children:[e(a,{align:"center",justify:"center",style:{marginBottom:"var(--gap-md)"},children:y?e(d,{style:{width:"4rem",height:"4rem",color:"var(--success)"}}):e(S,{style:{width:"4rem",height:"4rem",color:"var(--warning)"}})}),e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"var(--gap-md)"},children:o||n("billing:templates.success.title","Payment Successful!")}),e("p",{style:{fontSize:"var(--font-size-xl)",color:"var(--muted-foreground)"},children:p||n("billing:templates.success.subtitle","Thank you for your purchase")})]}),i&&e(s,{style:{marginBottom:"var(--gap-lg)"},children:t("div",{children:[e("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,marginBottom:"var(--gap-md)"},children:"Subscription Details"}),e(a,{gap:"medium",children:t(T,{cols:2,gap:"medium",className:"dndev-grid-responsive-1-2",children:[t("div",{children:[e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:"Plan"}),e("p",{style:{fontWeight:600,textTransform:"capitalize"},children:i.tier})]}),t("div",{children:[e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:"Status"}),e("p",{style:{fontWeight:600,textTransform:"capitalize"},children:i.status})]}),i.subscriptionEnd&&t("div",{children:[e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i.status==="active"?"Valid Until":"Ended On"}),e("p",{style:{fontWeight:600},children:i.subscriptionEnd===null?"Lifetime":new Date(i.subscriptionEnd).toLocaleDateString()})]})]})})]})}),c.length>0&&e(s,{style:{marginBottom:"var(--gap-lg)"},children:t("div",{children:[e("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,marginBottom:"var(--gap-md)"},children:"What's Next?"}),e(a,{as:"ul",gap:"medium",children:c.map((r,z)=>t(a,{as:"li",direction:"row",align:"start",children:[e(d,{className:"dndev-size-md",style:{color:"var(--success)",marginRight:"var(--gap-md)",marginTop:"0.125rem",flexShrink:0}}),t("div",{className:"dndev-flex-1",children:[e("p",{style:{fontWeight:600},children:r.title}),e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:r.description}),r.link&&e(m,{variant:x.LINK,style:{padding:0,height:"auto",marginTop:"var(--gap-sm)"},onClick:()=>window.open(r.link,"_blank"),icon:b,children:r.linkText||"Learn more"})]})]},z))})]})}),e(s,{children:e("div",{className:"dndev-text-center",style:{paddingTop:"var(--gap-lg)"},children:t("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:["Need help? Contact us at"," ",e("a",{href:`mailto:${l}`,style:{color:"var(--primary)",textDecoration:"underline"},onMouseEnter:r=>{r.currentTarget.style.textDecoration="underline"},children:l})]})})}),e("div",{className:"dndev-text-center",style:{marginTop:"var(--gap-lg)"},children:e(m,{onClick:()=>f("/"),children:"Go to Dashboard"})})]})})}export{W as BillingSuccessTemplate};
1
+ "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{CheckCircle as m,AlertCircle as S,ExternalLink as z}from"lucide-react";import{Card as a,Button as u,BUTTON_VARIANT as x,Stack as r,Grid as N}from"@donotdev/components";import{useTranslation as T}from"@donotdev/core";import{PageContainer as g,useNavigate as B,useAuthSafe as k,useBillingVisibility as w,FeatureDisabled as C}from"@donotdev/ui";function E({namespace:h,title:o,subtitle:p,nextSteps:c=[],supportEmail:s="support@example.com"}){const{shouldHide:v}=w(),{t}=T([h,"billing"]),f=k("userSubscription"),b=B();if(v)return e(g,{variant:"docs",children:e(C,{featureName:"Billing Success",title:o||t("billing:templates.success.title","Payment Successful!"),description:t("billing:templates.success.notAvailable","Billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,supportEmail:s})});const n=f,y=n?.status==="active";return e(g,{variant:"docs",children:i("div",{children:[i("div",{className:"dndev-text-center",style:{marginBottom:"var(--gap-lg)"},children:[e(r,{align:"center",justify:"center",style:{marginBottom:"var(--gap-md)"},children:y?e(m,{style:{width:"4rem",height:"4rem",color:"var(--success)"}}):e(S,{style:{width:"4rem",height:"4rem",color:"var(--warning)"}})}),e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"var(--gap-md)"},children:o||t("billing:templates.success.title","Payment Successful!")}),e("p",{style:{fontSize:"var(--font-size-xl)",color:"var(--muted-foreground)"},children:p||t("billing:templates.success.subtitle","Thank you for your purchase")})]}),n&&e(a,{style:{marginBottom:"var(--gap-lg)"},children:i("div",{children:[e("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,marginBottom:"var(--gap-md)"},children:t("billing:templates.success.subscriptionDetails","Subscription Details")}),e(r,{children:i(N,{cols:2,className:"dndev-grid-responsive-1-2",children:[i("div",{children:[e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:t("billing:templates.success.plan","Plan")}),e("p",{style:{fontWeight:600,textTransform:"capitalize"},children:n.tier})]}),i("div",{children:[e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:t("billing:templates.success.status","Status")}),e("p",{style:{fontWeight:600,textTransform:"capitalize"},children:n.status})]}),n.subscriptionEnd&&i("div",{children:[e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:n.status==="active"?t("billing:templates.success.validUntil","Valid Until"):t("billing:templates.success.endedOn","Ended On")}),e("p",{style:{fontWeight:600},children:n.subscriptionEnd===null?t("billing:templates.success.lifetime","Lifetime"):new Date(n.subscriptionEnd).toLocaleDateString()})]})]})})]})}),c.length>0&&e(a,{style:{marginBottom:"var(--gap-lg)"},children:i("div",{children:[e("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,marginBottom:"var(--gap-md)"},children:t("billing:templates.success.whatsNext","What's Next?")}),e(r,{as:"ul",children:c.map(l=>i(r,{as:"li",direction:"row",align:"start",children:[e(m,{className:"dndev-size-md",style:{color:"var(--success)",marginInlineEnd:"var(--gap-md)",marginTop:"0.125rem",flexShrink:0}}),i("div",{className:"dndev-flex-1",children:[e("p",{style:{fontWeight:600},children:l.title}),e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:l.description}),l.link&&e(u,{variant:x.LINK,style:{padding:0,height:"auto",marginTop:"var(--gap-sm)"},onClick:()=>{try{const d=new URL(l.link,window.location.origin);(d.protocol==="http:"||d.protocol==="https:")&&window.open(l.link,"_blank","noopener,noreferrer")}catch{}},icon:z,children:l.linkText||t("billing:templates.success.learnMore","Learn more")})]})]},l.title))})]})}),e(a,{children:e("div",{className:"dndev-text-center",style:{paddingTop:"var(--gap-lg)"},children:i("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:[t("billing:templates.success.needHelp","Need help? Contact us at")," ",e("a",{href:`mailto:${s}`,style:{color:"var(--primary)",textDecoration:"underline"},children:s})]})})}),e("div",{className:"dndev-text-center",style:{marginTop:"var(--gap-lg)"},children:e(u,{onClick:()=>b("/"),children:t("billing:templates.success.goToDashboard","Go to Dashboard")})})]})})}export{E as BillingSuccessTemplate};
@@ -1,6 +1,6 @@
1
1
  import type { CheckoutMode } from '@donotdev/core';
2
2
  import type { ReactNode } from 'react';
3
- interface CheckoutPageTemplateProps {
3
+ export interface CheckoutPageTemplateProps {
4
4
  children?: ReactNode;
5
5
  priceId?: string;
6
6
  mode?: CheckoutMode;
@@ -32,5 +32,4 @@ interface CheckoutPageTemplateProps {
32
32
  * @author AMBROISE PARK Consulting
33
33
  */
34
34
  export declare function CheckoutPageTemplate({ children, priceId, mode, title, description, onSuccess, onCancel, successMessage, cancelMessage, successRedirect, cancelRedirect, showToast, billingOptions, }: CheckoutPageTemplateProps): import("react/jsx-runtime").JSX.Element;
35
- export {};
36
35
  //# sourceMappingURL=CheckoutTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/CheckoutTemplate.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,yBAAyB;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,IAAgB,EAChB,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,aAAa,EACb,eAAe,EACf,cAAc,EACd,SAAgB,EAChB,cAAc,GACf,EAAE,yBAAyB,2CA0G3B"}
1
+ {"version":3,"file":"CheckoutTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/CheckoutTemplate.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,IAAgB,EAChB,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,aAAa,EACb,eAAe,EACf,cAAc,EACd,SAAgB,EAChB,cAAc,GACf,EAAE,yBAAyB,2CA0G3B"}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{StripeCheckoutButton as x}from"@donotdev/billing";import{Card as g,BUTTON_VARIANT as T,useToast as N,Stack as w}from"@donotdev/components";import{useTranslation as C}from"@donotdev/core";import{useNavigate as S,useBillingVisibility as U,FeatureDisabled as P}from"@donotdev/ui";function A({children:c,priceId:l,mode:r="payment",title:n,description:v,onSuccess:f,onCancel:y,successMessage:d,cancelMessage:m,successRedirect:s,cancelRedirect:i,showToast:u=!0,billingOptions:a}){const{shouldHide:k,isLoading:b}=U(),{t}=C("billing"),{toast:p}=N(),h=S(),R=()=>{u&&d&&p("success",d),s&&h(s),f?.()},B=()=>{u&&m&&p("info",m),i&&h(i),y?.()};return k?e(P,{featureName:"Checkout",title:n||t("templates.checkout.title"),description:t("templates.checkout.notAvailable","Stripe billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,showRetry:!0,onRetry:()=>window.location.reload()}):b?e(g,{className:"dndev-mx-auto",style:{maxWidth:"42rem"},children:e("div",{className:"dndev-text-center",style:{paddingTop:"var(--gap-lg)"},children:e("p",{style:{color:"var(--muted-foreground)"},children:t("templates.checkout.loading","Loading checkout...")})})}):e("div",{children:o(g,{className:"dndev-mx-auto",style:{maxWidth:"42rem"},children:[o("div",{className:"dndev-text-center",children:[e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"var(--gap-md)"},children:n||t("templates.checkout.title")}),e("p",{style:{color:"var(--muted-foreground)"},children:v||t("templates.checkout.description")})]}),o(w,{gap:"large",style:{marginTop:"var(--gap-lg)"},children:[c&&e("div",{children:c}),l&&e("div",{children:e(x,{priceId:l,mode:r,successUrl:a?.successUrl||s||"/billing/success",cancelUrl:a?.cancelUrl||i||"/checkout",metadata:a?.metadata,allowPromotionCodes:a?.allowPromotionCodes,variant:T.DEFAULT,className:"dndev-w-full",children:t(r==="payment"?"templates.checkout.completePurchase":"templates.checkout.startSubscription")})})]})]})})}export{A as CheckoutPageTemplate};
1
+ "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import{StripeCheckoutButton as N}from"@donotdev/billing";import{Card as f,BUTTON_VARIANT as C,useToast as T,Stack as S}from"@donotdev/components";import{useTranslation as b}from"@donotdev/core";import{useNavigate as w,useBillingVisibility as U,FeatureDisabled as P}from"@donotdev/ui";function D({children:l,priceId:n,mode:s="payment",title:c,description:v,onSuccess:g,onCancel:k,successMessage:d,cancelMessage:m,successRedirect:a,cancelRedirect:r,showToast:u=!0,billingOptions:o}){const{shouldHide:y,isLoading:x}=U(),{t}=b("billing"),{toast:h}=T(),p=w(),j=()=>{u&&d&&h("success",d),a&&p(a),g?.()},A=()=>{u&&m&&h("info",m),r&&p(r),k?.()};return y?e(P,{featureName:"Checkout",title:c||t("templates.checkout.title"),description:t("templates.checkout.notAvailable","Stripe billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,showRetry:!0,onRetry:()=>{window.location.reload()}}):x?e(f,{className:"dndev-mx-auto",style:{maxWidth:"42rem"},children:e("div",{className:"dndev-text-center",style:{paddingTop:"var(--gap-lg)"},children:e("p",{style:{color:"var(--muted-foreground)"},children:t("templates.checkout.loading","Loading checkout...")})})}):e("div",{children:i(f,{className:"dndev-mx-auto",style:{maxWidth:"42rem"},children:[i("div",{className:"dndev-text-center",children:[e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"var(--gap-md)"},children:c||t("templates.checkout.title")}),e("p",{style:{color:"var(--muted-foreground)"},children:v||t("templates.checkout.description")})]}),i(S,{gap:"large",style:{marginTop:"var(--gap-lg)"},children:[l&&e("div",{children:l}),n&&e("div",{children:e(N,{priceId:n,mode:s,successUrl:o?.successUrl||a||"/billing/success",cancelUrl:o?.cancelUrl||r||"/checkout",metadata:o?.metadata,allowPromotionCodes:o?.allowPromotionCodes,variant:C.DEFAULT,className:"dndev-w-full",children:t(s==="payment"?"templates.checkout.completePurchase":"templates.checkout.startSubscription")})})]})]})})}export{D as CheckoutPageTemplate};
@@ -1,7 +1,6 @@
1
- import type { PageMeta, StripeFrontConfig } from '@donotdev/core';
1
+ import type { StripeFrontConfig } from '@donotdev/core';
2
2
  export interface PaymentTemplateProps {
3
3
  namespace: string;
4
- meta: PageMeta;
5
4
  billing: StripeFrontConfig;
6
5
  successUrl?: string;
7
6
  cancelUrl?: string;
@@ -22,5 +21,5 @@ export interface PaymentTemplateProps {
22
21
  * @since 0.0.1
23
22
  * @author AMBROISE PARK Consulting
24
23
  */
25
- export declare function PaymentTemplate({ namespace, meta, billing, successUrl, cancelUrl, title, subtitle, layout, }: PaymentTemplateProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function PaymentTemplate({ namespace, billing, successUrl, cancelUrl, title, subtitle, layout, }: PaymentTemplateProps): import("react/jsx-runtime").JSX.Element;
26
25
  //# sourceMappingURL=PaymentTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/PaymentTemplate.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAclE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,iBAAiB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,IAAI,EACJ,OAAO,EACP,UAAU,EACV,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAe,GAChB,EAAE,oBAAoB,2CAoGtB"}
1
+ {"version":3,"file":"PaymentTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/PaymentTemplate.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAcxD,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,OAAO,EACP,UAAU,EACV,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAe,GAChB,EAAE,oBAAoB,2CAoGtB"}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as m}from"react/jsx-runtime";import{lazy as u,Suspense as S}from"react";import{Stack as n,Grid as T,Text as l,Section as j}from"@donotdev/components";import{useTranslation as x,maybeTranslate as g}from"@donotdev/core";import{PageContainer as s,useBillingVisibility as L,FeatureDisabled as U}from"@donotdev/ui";const k=u(()=>import("@donotdev/billing").then(a=>({default:a.ProductCard}))),B=u(()=>import("@donotdev/billing").then(a=>({default:a.SecurityNotice})));function I({namespace:a,meta:N,billing:o,successUrl:h,cancelUrl:b,title:c,subtitle:d,layout:f="grid"}){const{shouldHide:y,isLoading:v}=L(),{t:r}=x([a,"billing"]),p=c?g(r,c):r("billing:templates.purchase.title"),w=d?g(r,d):r("billing:templates.purchase.subtitle");if(y)return e(s,{variant:"standard",children:e(U,{featureName:"Billing",title:p,description:r("billing:templates.purchase.notAvailable","Stripe billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,showRetry:!0,onRetry:()=>window.location.reload()})});if(v)return e(s,{variant:"standard",children:e(n,{align:"center",gap:"medium",children:e(l,{variant:"muted",children:r("billing:templates.purchase.loading","Loading billing...")})})});const C=Object.keys(o).length,P=f==="grid"?C===2?2:3:void 0;return e(s,{variant:"standard",children:e(S,{fallback:e(n,{align:"center",gap:"medium",children:e(l,{variant:"muted",children:"Loading..."})}),children:m(n,{gap:"large",align:"center",children:[m(n,{gap:"medium",align:"center",children:[e(l,{as:"h1",level:"h1",children:p}),e(l,{as:"h2",level:"h2",variant:"muted",children:w})]}),e(j,{children:e(T,{cols:P,gap:"large",children:Object.entries(o).map(([t,i])=>e(k,{namespace:a,configKey:t,id:t,name:i.name,price:i.price,currency:i.currency,description:i.description||"",features:i.features||[],mode:"payment",priceId:i.priceId,allowPromotionCodes:i.allowPromotionCodes??!0,metadata:{billingConfigKey:t,productType:"payment",source:"payment_template"},successUrl:h,cancelUrl:b},t))})}),e(B,{})]})})})}export{I as PaymentTemplate};
1
+ "use client";import{jsx as e,jsxs as u}from"react/jsx-runtime";import{lazy as m,Suspense as j}from"react";import{Stack as n,Grid as w,Text as l,Section as x}from"@donotdev/components";import{useTranslation as T,maybeTranslate as h}from"@donotdev/core";import{PageContainer as o,useBillingVisibility as L,FeatureDisabled as N}from"@donotdev/ui";const _=m(()=>import("@donotdev/billing").then(i=>({default:i.ProductCard}))),B=m(()=>import("@donotdev/billing").then(i=>({default:i.SecurityNotice})));function z({namespace:i,billing:s,successUrl:g,cancelUrl:b,title:c,subtitle:d,layout:y="grid"}){const{shouldHide:f,isLoading:v}=L(),{t:r}=T([i,"billing"]),p=c?h(r,c):r("billing:templates.purchase.title"),C=d?h(r,d):r("billing:templates.purchase.subtitle");if(f)return e(o,{variant:"standard",children:e(N,{featureName:"Billing",title:p,description:r("billing:templates.purchase.notAvailable","Stripe billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,showRetry:!0,onRetry:()=>{window.location.reload()}})});if(v)return e(o,{variant:"standard",children:e(n,{align:"center",children:e(l,{variant:"muted",children:r("billing:templates.purchase.loading","Loading billing...")})})});const S=Object.keys(s).length,P=y==="grid"?S===2?2:3:void 0;return e(o,{variant:"standard",children:e(j,{fallback:e(n,{align:"center",children:e(l,{variant:"muted",children:"Loading..."})}),children:u(n,{gap:"large",align:"center",children:[u(n,{align:"center",children:[e(l,{as:"h1",level:"h1",children:p}),e(l,{as:"h2",level:"h2",variant:"muted",children:C})]}),e(x,{children:e(w,{cols:P,gap:"large",children:Object.entries(s).map(([a,t])=>e(_,{namespace:i,configKey:a,id:a,name:t.name,price:t.price,currency:t.currency,description:t.description||"",features:t.features||[],mode:"payment",priceId:t.priceId,allowPromotionCodes:t.allowPromotionCodes??!0,metadata:{billingConfigKey:a,productType:"payment",source:"payment_template"},successUrl:g,cancelUrl:b},a))})}),e(B,{})]})})})}export{z as PaymentTemplate};
@@ -1,4 +1,4 @@
1
- import type { PageMeta, StripeFrontConfig } from '@donotdev/core';
1
+ import type { StripeFrontConfig } from '@donotdev/core';
2
2
  /**
3
3
  * Subscription plan type
4
4
  * Extends StripeFrontConfig product structure with subscription-specific fields
@@ -22,7 +22,6 @@ export type SubscriptionPlan = StripeFrontConfig[string] & {
22
22
  */
23
23
  export interface SubscriptionTemplateProps {
24
24
  namespace: string;
25
- meta: PageMeta;
26
25
  plans: SubscriptionPlan[];
27
26
  successUrl?: string;
28
27
  cancelUrl?: string;
@@ -58,5 +57,5 @@ export interface SubscriptionTemplateProps {
58
57
  * @since 0.0.1
59
58
  * @author AMBROISE PARK Consulting
60
59
  */
61
- export declare function SubscriptionTemplate({ namespace, meta, plans, successUrl, cancelUrl, title, subtitle, }: SubscriptionTemplateProps): import("react/jsx-runtime").JSX.Element;
60
+ export declare function SubscriptionTemplate({ namespace, plans, successUrl, cancelUrl, title, subtitle, }: SubscriptionTemplateProps): import("react/jsx-runtime").JSX.Element;
62
61
  //# sourceMappingURL=SubscriptionTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SubscriptionTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/SubscriptionTemplate.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOlE;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,IAAI,EACJ,KAAK,EACL,UAA+B,EAC/B,SAA2B,EAC3B,KAAK,EACL,QAAQ,GACT,EAAE,yBAAyB,2CAgN3B"}
1
+ {"version":3,"file":"SubscriptionTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/SubscriptionTemplate.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOxD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,KAAK,EACL,UAA+B,EAC/B,SAA2B,EAC3B,KAAK,EACL,QAAQ,GACT,EAAE,yBAAyB,2CA+M3B"}
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{useState as f}from"react";import{ProductCard as y}from"@donotdev/billing";import{Button as N,BUTTON_VARIANT as x,Badge as w,BADGE_VARIANT as S,Stack as T,Grid as B}from"@donotdev/components";import{useTranslation as C}from"@donotdev/core";import{PageContainer as s,useBillingVisibility as z,FeatureDisabled as I}from"@donotdev/ui";function A({namespace:o,meta:R,plans:c,successUrl:m="/billing/success",cancelUrl:p="/subscription",title:l,subtitle:u}){const{shouldHide:g,isLoading:b}=z(),{t}=C([o,"billing"]),[n,v]=f("year");if(g)return i(s,{variant:"standard",children:i(I,{featureName:"Subscriptions",title:l||t("billing:templates.subscription.title"),description:t("billing:templates.subscription.notAvailable","Stripe billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,showRetry:!0,onRetry:()=>window.location.reload()})});if(b)return i(s,{variant:"standard",children:i("div",{className:"dndev-text-center",style:{paddingTop:"3rem",paddingBottom:"3rem"},children:i("p",{style:{color:"var(--muted-foreground)"},children:t("billing:templates.subscription.loading","Loading subscriptions...")})})});const d=c.filter(r=>r.interval===n),h=()=>{const r=d.length;return r===1?{cols:1,className:"dndev-max-w-md dndev-mx-auto"}:r===2?{cols:2,className:"dndev-max-w-4xl dndev-mx-auto dndev-grid-responsive-1-2"}:r===3?{cols:3,className:"dndev-grid-responsive-1-3"}:r===4?{cols:4,className:"dndev-grid-responsive-1-2-4"}:{cols:4,className:"dndev-grid-responsive-1-2-3-4"}};return i(s,{variant:"standard",children:a("div",{children:[a("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[i("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:l||t("billing:templates.subscription.title")}),i("p",{style:{fontSize:"var(--font-size-xl)",color:"var(--muted-foreground)",marginBottom:"2rem"},children:u||t("billing:templates.subscription.subtitle")}),a(T,{direction:"row",align:"center",justify:"center",gap:"medium",children:[i("span",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:n==="month"?"var(--primary)":"var(--muted-foreground)"},children:t("billing:templates.subscription.billingToggle.monthly")}),i(N,{variant:x.OUTLINE,onClick:()=>v(n==="month"?"year":"month"),className:"dndev-relative",children:i("div",{style:{width:"3rem",height:"1.5rem",backgroundColor:n==="year"?"var(--primary)":"rgb(229, 231, 235)",borderRadius:"9999px",transition:"background-color 0.2s"},children:i("div",{style:{width:"1.25rem",height:"1.25rem",backgroundColor:"white",borderRadius:"9999px",boxShadow:"var(--shadow-sm)",transform:n==="year"?"translateX(1.5rem)":"translateX(0.125rem)",marginTop:"0.125rem",transition:"transform 0.2s"}})})}),a("span",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:n==="year"?"var(--primary)":"var(--muted-foreground)"},children:[t("billing:templates.subscription.billingToggle.yearly"),i(w,{variant:S.SECONDARY,style:{marginInlineStart:"0.5rem"},children:t("billing:templates.subscription.billingToggle.save20")})]})]})]}),(()=>{const r=h();return i(B,{cols:r.cols,className:r.className,gap:"medium",children:d.map(e=>i(y,{namespace:o,configKey:e.id,id:e.id,name:e.name,price:e.price,currency:e.currency,description:e.description??"",features:e.features??[],popular:e.popular,mode:"subscription",priceId:e.priceId,metadata:{billingConfigKey:e.id,planId:e.id,planName:e.name,billingInterval:e.interval,productType:"subscription",source:"subscription_template",...e.metadata},successUrl:m,cancelUrl:p,allowPromotionCodes:!0},e.id))})})()]})})}export{A as SubscriptionTemplate};
1
+ "use client";import{jsx as r,jsxs as o}from"react/jsx-runtime";import{useState as h}from"react";import{ProductCard as y}from"@donotdev/billing";import{Button as x,BUTTON_VARIANT as N,Badge as T,BADGE_VARIANT as w,Stack as S,Grid as B}from"@donotdev/components";import{useTranslation as I}from"@donotdev/core";import{PageContainer as s,useBillingVisibility as C,FeatureDisabled as z}from"@donotdev/ui";function L({namespace:a,plans:c,successUrl:m="/billing/success",cancelUrl:u="/subscription",title:l,subtitle:g}){const{shouldHide:p,isLoading:b}=C(),{t:i}=I([a,"billing"]),[n,v]=h("year");if(p)return r(s,{variant:"standard",children:r(z,{featureName:"Subscriptions",title:l||i("billing:templates.subscription.title"),description:i("billing:templates.subscription.notAvailable","Stripe billing is not configured or available. Please contact support if you believe this is an error."),showContactSupport:!0,showRetry:!0,onRetry:()=>{window.location.reload()}})});if(b)return r(s,{variant:"standard",children:r("div",{className:"dndev-text-center",style:{paddingTop:"3rem",paddingBottom:"3rem"},children:r("p",{style:{color:"var(--muted-foreground)"},children:i("billing:templates.subscription.loading","Loading subscriptions...")})})});const d=c.filter(t=>t.interval===n),f=()=>{const t=d.length;return t===1?{cols:1,className:"dndev-max-w-md dndev-mx-auto"}:t===2?{cols:2,className:"dndev-max-w-4xl dndev-mx-auto dndev-grid-responsive-1-2"}:t===3?{cols:3,className:"dndev-grid-responsive-1-3"}:t===4?{cols:4,className:"dndev-grid-responsive-1-2-4"}:{cols:4,className:"dndev-grid-responsive-1-2-3-4"}};return r(s,{variant:"standard",children:o("div",{children:[o("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[r("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:l||i("billing:templates.subscription.title")}),r("p",{style:{fontSize:"var(--font-size-xl)",color:"var(--muted-foreground)",marginBottom:"2rem"},children:g||i("billing:templates.subscription.subtitle")}),o(S,{direction:"row",align:"center",justify:"center",children:[r("span",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:n==="month"?"var(--primary)":"var(--muted-foreground)"},children:i("billing:templates.subscription.billingToggle.monthly")}),r(x,{variant:N.OUTLINE,onClick:()=>v(n==="month"?"year":"month"),className:"dndev-relative",role:"switch","aria-checked":n==="year","aria-label":i("billing:templates.subscription.billingToggle.ariaLabel","Toggle billing interval"),children:r("div",{style:{width:"3rem",height:"1.5rem",backgroundColor:n==="year"?"var(--primary)":"rgb(229, 231, 235)",borderRadius:"9999px",transition:"background-color 0.2s"},children:r("div",{style:{width:"1.25rem",height:"1.25rem",backgroundColor:"var(--background)",borderRadius:"9999px",boxShadow:"var(--shadow-sm)",transform:n==="year"?"translateX(1.5rem)":"translateX(0.125rem)",marginTop:"0.125rem",transition:"transform 0.2s"}})})}),o("span",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:n==="year"?"var(--primary)":"var(--muted-foreground)"},children:[i("billing:templates.subscription.billingToggle.yearly"),r(T,{variant:w.SECONDARY,style:{marginInlineStart:"0.5rem"},children:i("billing:templates.subscription.billingToggle.save20")})]})]})]}),(()=>{const t=f();return r(B,{cols:t.cols,className:t.className,children:d.map(e=>r(y,{namespace:a,configKey:e.id,id:e.id,name:e.name,price:e.price,currency:e.currency,description:e.description??"",features:e.features??[],popular:e.popular,mode:"subscription",priceId:e.priceId,metadata:{billingConfigKey:e.id,planId:e.id,planName:e.name,billingInterval:e.interval,productType:"subscription",source:"subscription_template",...e.metadata},successUrl:m,cancelUrl:u,allowPromotionCodes:!0},e.id))})})()]})})}export{L as SubscriptionTemplate};
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{SubscriptionManager as s}from"@donotdev/billing";import{useTranslation as m}from"@donotdev/core";import{PageContainer as c}from"@donotdev/ui";function p({namespace:e,meta:b,availablePlans:n,allowPlanChange:l=!1,title:r,subtitle:o}){const{t}=m([e,"billing"]);return i(c,{variant:"docs",children:a("div",{children:[a("div",{style:{marginBottom:"2rem"},children:[i("h1",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700,marginBottom:"0.5rem"},children:r||t("billing:subscription.title")}),i("p",{style:{color:"var(--muted-foreground)"},children:o||t("billing:subscription.subtitle")})]}),i(s,{availablePlans:n,allowPlanChange:l})]})})}export{p as UserSubscriptionTemplate};
1
+ "use client";import{jsx as i,jsxs as r}from"react/jsx-runtime";import{SubscriptionManager as a}from"@donotdev/billing";import{useTranslation as m}from"@donotdev/core";import{PageContainer as c}from"@donotdev/ui";function b({namespace:e,meta:p,availablePlans:n,allowPlanChange:o=!1,title:l,subtitle:s}){const{t}=m([e,"billing"]);return i(c,{variant:"docs",children:r("div",{children:[r("div",{style:{marginBottom:"2rem"},children:[i("h1",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700,marginBottom:"0.5rem"},children:l||t("billing:subscription.title")}),i("p",{style:{color:"var(--muted-foreground)"},children:s||t("billing:subscription.subtitle")})]}),i(a,{availablePlans:n,allowPlanChange:o})]})})}export{b as UserSubscriptionTemplate};
@@ -0,0 +1,28 @@
1
+ import type { BlogPost } from './blog-loader';
2
+ import type { ReactNode } from 'react';
3
+ /**
4
+ * Props for the BlogList component.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <BlogList posts={blog.getAllPosts()} />
9
+ * ```
10
+ */
11
+ export interface BlogListProps {
12
+ /** Array of blog posts to display (newest first) */
13
+ posts: BlogPost[];
14
+ /** Empty state content when no posts exist */
15
+ emptyState?: ReactNode;
16
+ }
17
+ /**
18
+ * Blog List Component
19
+ *
20
+ * Renders blog posts with:
21
+ * - Tag filter chips at the top
22
+ * - Featured/latest post displayed larger with optional hero image
23
+ * - Remaining posts in a responsive [1,1,2,3] grid
24
+ *
25
+ * @version 0.0.4
26
+ */
27
+ export declare function BlogList({ posts, emptyState }: BlogListProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
28
+ //# sourceMappingURL=BlogList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlogList.d.ts","sourceRoot":"","sources":["../../src/blog/BlogList.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAwBD;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,aAAa,qTAwI5D"}
@@ -0,0 +1 @@
1
+ "use client";import{jsx as t,jsxs as n,Fragment as u}from"react/jsx-runtime";import{useState as j}from"react";import{Card as h,Grid as x,Stack as d,Tag as f,Text as c}from"@donotdev/components";import{useTranslation as w}from"@donotdev/core";import{Link as v}from"@donotdev/ui";function p({post:i,readMoreLabel:o}){return n(d,{direction:"row",justify:"between",align:"center",style:{width:"100%"},children:[i.tags.length>0&&t(c,{as:"span",level:"caption",variant:"muted",children:i.tags.join(" \xB7 ")}),n(c,{as:"span",level:"small",variant:"accent",children:[o," \u2192"]})]})}function F({posts:i,emptyState:o}){const{t:r}=w("blog"),[l,m]=j(null);if(i.length===0)return o||t(c,{as:"p",variant:"muted",align:"center",children:r("empty")});const s=[...new Set(i.flatMap(e=>e.tags))].sort(),b=l?i.filter(e=>e.tags.includes(l)):i,[a,...g]=b;return n(d,{gap:"large",children:[s.length>0&&n(d,{direction:"row",gap:"tight",wrap:"wrap",justify:"center",children:[t(f,{interactive:!0,variant:l===null?"accent":"outline",onClick:()=>m(null),size:"sm",children:r("all")}),s.map(e=>t(f,{interactive:!0,variant:l===e?"accent":"outline",onClick:()=>m(e===l?null:e),size:"sm",children:e},e))]}),a&&t(v,{path:`/blog/${a.slug}`,children:t(h,{clickable:!0,title:a.meta.title,subtitle:[a.meta.date,`${a.readingTime} ${r("minuteRead")}`].filter(Boolean).join(" \xB7 "),content:n(u,{children:[a.meta.image&&t("img",{src:a.meta.image,alt:a.meta.title,loading:"eager",decoding:"async",style:{width:"100%",maxHeight:"360px",objectFit:"cover",borderRadius:"var(--radius-md)",marginBottom:"var(--gap-md)"}}),t(c,{as:"p",children:a.meta.description})]}),footer:t(p,{post:a,readMoreLabel:r("readMore")})})}),g.length>0&&t(x,{cols:[1,1,2,3],children:g.map(e=>t(v,{path:`/blog/${e.slug}`,children:t(h,{clickable:!0,title:e.meta.title,subtitle:[e.meta.date,`${e.readingTime} ${r("minuteRead")}`].filter(Boolean).join(" \xB7 "),content:n(u,{children:[e.meta.image&&t("img",{src:e.meta.image,alt:e.meta.title,loading:"lazy",decoding:"async",style:{width:"100%",maxHeight:"180px",objectFit:"cover",borderRadius:"var(--radius-md)",marginBottom:"var(--gap-sm)"}}),t(c,{as:"p",level:"small",children:e.meta.description})]}),footer:t(p,{post:e,readMoreLabel:r("readMore")})})},e.slug))})]})}export{F as BlogList};
@@ -0,0 +1,29 @@
1
+ import type { BlogPost as BlogPostType } from './blog-loader';
2
+ /**
3
+ * Props for the BlogPostView component.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <BlogPostView post={blog.getPostBySlug('my-post')} />
8
+ * ```
9
+ */
10
+ export interface BlogPostProps {
11
+ /** The blog post to render (null = not found state) */
12
+ post: BlogPostType | null;
13
+ }
14
+ /**
15
+ * Blog Post View Component
16
+ *
17
+ * Renders a full blog post with:
18
+ * - Hero title
19
+ * - Back navigation
20
+ * - Date + reading time
21
+ * - Tags
22
+ * - Full markdown content via MarkdownViewer
23
+ *
24
+ * Shows a not-found state if post is null.
25
+ *
26
+ * @version 0.0.3
27
+ */
28
+ export declare function BlogPostView({ post }: BlogPostProps): import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=BlogPost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlogPost.d.ts","sourceRoot":"","sources":["../../src/blog/BlogPost.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,aAAa,2CA8DnD"}
@@ -0,0 +1 @@
1
+ "use client";import{jsx as t,jsxs as i,Fragment as c}from"react/jsx-runtime";import{ArrowLeft as r}from"lucide-react";import{Button as o,HeroSection as g,Section as l,Text as n}from"@donotdev/components";import{useTranslation as s}from"@donotdev/core";import{Link as m}from"@donotdev/ui";import{MarkdownViewer as h}from"../components/MarkdownViewer";function j({post:e}){const{t:a}=s("blog");if(!e)return i(l,{children:[t(n,{as:"p",variant:"muted",align:"center",children:a("notFound")}),t(m,{path:"/blog",children:t(o,{variant:"ghost",icon:r,children:a("backToBlog")})})]});const d=[e.meta.date?`${a("publishedOn")} ${e.meta.date}`:null,`${e.readingTime} ${a("minuteRead")}`].filter(Boolean).join(" \xB7 ");return i(c,{children:[t(g,{title:e.meta.title}),i(l,{children:[t(m,{path:"/blog",children:t(o,{variant:"ghost",icon:r,children:a("backToBlog")})}),t(n,{as:"p",level:"small",variant:"muted",children:d}),e.tags.length>0&&t(n,{as:"p",level:"caption",variant:"muted",children:e.tags.join(" \xB7 ")}),e.meta.image&&t("img",{src:e.meta.image,alt:e.meta.title,loading:"eager",decoding:"async",style:{width:"100%",maxHeight:"480px",objectFit:"cover",borderRadius:"var(--radius-md)",marginTop:"var(--gap-md)",marginBottom:"var(--gap-md)"}}),t(h,{content:e.content})]})]})}export{j as BlogPostView};
@@ -0,0 +1,136 @@
1
+ /**
2
+ * @fileoverview Blog data loader utilities
3
+ * @description Processes import.meta.glob results into typed blog post data with i18n,
4
+ * reading time estimation, and tag filtering.
5
+ * RSS and sitemap are auto-generated at build time by the SEO pipeline (SEOGenerator).
6
+ *
7
+ * ## Convention
8
+ * Files are named `slug_lang.md` (e.g. `my-post_en.md`, `my-post_fr.md`).
9
+ * The slug is everything before the last `_lang` suffix.
10
+ * Frontmatter is parsed from `---` delimited YAML-like block.
11
+ *
12
+ * ## Supported frontmatter fields
13
+ * ```yaml
14
+ * ---
15
+ * title: My Post Title
16
+ * description: A short summary for listings and SEO
17
+ * date: 2025-06-01
18
+ * tags: typescript, react, tutorial
19
+ * image: /assets/blog/my-post-hero.png
20
+ * ---
21
+ * ```
22
+ *
23
+ * ## i18n fallback
24
+ * If no file exists for the requested language, falls back to `_en`.
25
+ *
26
+ * @version 0.0.2
27
+ * @since 0.0.1
28
+ * @author AMBROISE PARK Consulting
29
+ */
30
+ /**
31
+ * Metadata parsed from markdown frontmatter.
32
+ *
33
+ * @example
34
+ * ```yaml
35
+ * ---
36
+ * title: Getting Started
37
+ * description: Learn DoNotDev in 5 minutes
38
+ * date: 2025-06-01
39
+ * tags: tutorial, getting-started
40
+ * image: /assets/blog/hero.png
41
+ * ---
42
+ * ```
43
+ */
44
+ export interface BlogMeta {
45
+ /** Post title */
46
+ title: string;
47
+ /** Short description for listings and SEO meta tags */
48
+ description: string;
49
+ /** Publication date in YYYY-MM-DD format */
50
+ date: string;
51
+ /** Comma-separated tags (parsed into string[] on BlogPost) */
52
+ tags?: string;
53
+ /** Optional hero/og image path (relative to public/) */
54
+ image?: string;
55
+ /** Additional custom frontmatter fields */
56
+ [key: string]: string | undefined;
57
+ }
58
+ /**
59
+ * A resolved blog post with computed fields.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const post = blog.getPostBySlug('my-post');
64
+ * console.log(post.readingTime); // 4
65
+ * console.log(post.tags); // ['typescript', 'react']
66
+ * ```
67
+ */
68
+ export interface BlogPost {
69
+ /** URL-safe slug derived from filename (e.g. "my-post") */
70
+ slug: string;
71
+ /** Parsed frontmatter metadata */
72
+ meta: BlogMeta;
73
+ /** Markdown content (without frontmatter) */
74
+ content: string;
75
+ /** Estimated reading time in minutes */
76
+ readingTime: number;
77
+ /** Parsed tags array (from comma-separated frontmatter) */
78
+ tags: string[];
79
+ }
80
+ /**
81
+ * Result of {@link createBlogLoader}.
82
+ * Provides methods to query blog posts.
83
+ */
84
+ export interface BlogLoader {
85
+ /** Get all posts sorted by date (newest first) */
86
+ getAllPosts: () => BlogPost[];
87
+ /** Get a single post by slug, or null if not found */
88
+ getPostBySlug: (slug: string) => BlogPost | null;
89
+ /** Get all unique tags across all posts */
90
+ getAllTags: () => string[];
91
+ /** Get posts filtered by tag */
92
+ getPostsByTag: (tag: string) => BlogPost[];
93
+ }
94
+ /**
95
+ * Parse frontmatter from raw markdown string.
96
+ * Expects `---\nkey: value\n---\ncontent` format.
97
+ *
98
+ * @param raw - Raw markdown file content including frontmatter
99
+ * @returns Parsed metadata and content body
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * const { meta, content } = parseFrontmatter(rawMarkdown);
104
+ * console.log(meta.title); // "My Post"
105
+ * ```
106
+ */
107
+ export declare function parseFrontmatter(raw: string): {
108
+ meta: BlogMeta;
109
+ content: string;
110
+ };
111
+ /**
112
+ * Create a blog loader from import.meta.glob results.
113
+ *
114
+ * The glob call **must** live in app code (Vite resolves paths relative to the calling file).
115
+ * Pass the result to this function for processing.
116
+ *
117
+ * @param globResult - Result of `import.meta.glob('./*.md', { query: '?raw', import: 'default', eager: true })`
118
+ * @param currentLang - Current language code (e.g. 'en', 'fr'). Falls back to 'en' if missing.
119
+ * @returns Blog loader with getAllPosts(), getPostBySlug(), getAllTags(), getPostsByTag()
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * // In your app's data/blog/index.ts:
124
+ * const files = import.meta.glob('../../content/blog/*.md', {
125
+ * query: '?raw', import: 'default', eager: true,
126
+ * });
127
+ * const blog = createBlogLoader(files as Record<string, string>, 'en');
128
+ *
129
+ * const posts = blog.getAllPosts(); // All posts, newest first
130
+ * const post = blog.getPostBySlug('my-post'); // Single post
131
+ * const tags = blog.getAllTags(); // ['react', 'typescript', ...]
132
+ * const filtered = blog.getPostsByTag('react'); // Posts tagged 'react'
133
+ * ```
134
+ */
135
+ export declare function createBlogLoader(globResult: Record<string, string>, currentLang: string): BlogLoader;
136
+ //# sourceMappingURL=blog-loader.d.ts.map