@donotdev/templates 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/AdminLandingTemplate.d.ts +0 -1
  2. package/dist/AdminLandingTemplate.d.ts.map +1 -1
  3. package/dist/AdminLandingTemplate.js +1 -1
  4. package/dist/DashboardTemplate.d.ts.map +1 -1
  5. package/dist/DashboardTemplate.js +1 -1
  6. package/dist/HomeTemplate.d.ts.map +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 +2 -8
  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.d.ts +1 -1
  27. package/dist/billing/UserSubscriptionTemplate.d.ts.map +1 -1
  28. package/dist/billing/UserSubscriptionTemplate.js +1 -1
  29. package/dist/blog/BlogList.d.ts +1 -1
  30. package/dist/blog/BlogList.d.ts.map +1 -1
  31. package/dist/blog/BlogList.js +1 -1
  32. package/dist/blog/BlogPost.d.ts +1 -1
  33. package/dist/blog/BlogPost.d.ts.map +1 -1
  34. package/dist/blog/BlogPost.js +1 -1
  35. package/dist/blog/blog-loader.js +2 -2
  36. package/dist/components/MarkdownViewer.d.ts +0 -1
  37. package/dist/components/MarkdownViewer.d.ts.map +1 -1
  38. package/dist/components/MarkdownViewer.js +1 -1
  39. package/dist/crud/CarCardListTemplate.d.ts +0 -1
  40. package/dist/crud/CarCardListTemplate.d.ts.map +1 -1
  41. package/dist/crud/CarCardListTemplate.js +1 -1
  42. package/dist/crud/CarDetailTemplate.d.ts +0 -1
  43. package/dist/crud/CarDetailTemplate.d.ts.map +1 -1
  44. package/dist/crud/CarDetailTemplate.js +1 -1
  45. package/dist/crud/InquiryAdminTemplate.d.ts +1 -2
  46. package/dist/crud/InquiryAdminTemplate.d.ts.map +1 -1
  47. package/dist/crud/InquiryAdminTemplate.js +1 -1
  48. package/dist/crud/InquiryFormTemplate.d.ts +0 -1
  49. package/dist/crud/InquiryFormTemplate.d.ts.map +1 -1
  50. package/dist/crud/InquiryFormTemplate.js +1 -1
  51. package/dist/crud/ProductCardListTemplate.d.ts +0 -1
  52. package/dist/crud/ProductCardListTemplate.d.ts.map +1 -1
  53. package/dist/crud/ProductCardListTemplate.js +1 -40
  54. package/dist/legal/LegalNoticeTemplate.d.ts +10 -1
  55. package/dist/legal/LegalNoticeTemplate.d.ts.map +1 -1
  56. package/dist/legal/LegalNoticeTemplate.js +1 -1
  57. package/dist/legal/PrivacyPolicyTemplate.d.ts +10 -2
  58. package/dist/legal/PrivacyPolicyTemplate.d.ts.map +1 -1
  59. package/dist/legal/PrivacyPolicyTemplate.js +1 -1
  60. package/dist/legal/TermsOfServiceTemplate.d.ts +10 -2
  61. package/dist/legal/TermsOfServiceTemplate.d.ts.map +1 -1
  62. package/dist/legal/TermsOfServiceTemplate.js +1 -1
  63. package/package.json +13 -13
@@ -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":"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;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 t,Fragment as x,jsxs as a}from"react/jsx-runtime";import{useEffect as P}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 F({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(P(()=>{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(x,{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})]})]})}var U=F;export{F as AdminLandingTemplate,U as default};
1
+ "use client";import{jsx as e,Fragment as S,jsxs as a}from"react/jsx-runtime";import{useEffect as k}from"react";import{MultipleAuthProviders as y}from"@donotdev/auth";import{HeroSection as z,Section as T,Text as C,Stack as P}from"@donotdev/components";import{useTranslation as x,useAppConfig as A,getPlatformEnvVar as j}from"@donotdev/core";import{PageContainer as R,useNavigate as W,useRedirectGuard as E,Loader as N,Link as u}from"@donotdev/ui";function V({title:m,subtitle:f,message:i,supportLink:s,publicWebsiteLink:l,redirectConfig:c,children:g}){const{t:d}=x("dndev"),p=W(),h=A("app"),{shouldRedirect:n,redirectTo:t,isChecking:v}=E({condition:c?.condition,redirectTo:c?.redirectTo});if(k(()=>{n&&t&&p(t,{replace:!0})},[n,t,p]),v)return e(N,{});if(n&&t)return null;const o=s?.path||h?.links?.support,r=l?.path||j("APP_URL"),b=s?.label||d("adminLanding.contactSupport","Contact Support"),L=l?.label||d("adminLanding.visitWebsite","Visit Website");return a(R,{children:[e(z,{title:m,subtitle:f,variant:"primary"}),i&&e(T,{title:i.title,align:"center",children:e(C,{as:"p",level:"body",children:i.content})}),e(y,{}),g,(o||r)&&a(P,{direction:"row",gap:"tight",justify:"center",align:"center",children:[o&&a(S,{children:[e(u,{path:o,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:b}),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:L})]})]})}export{V 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 e}from"react/jsx-runtime";import{Stack as r}from"@donotdev/components";const t=()=>e(r,{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{t as DashboardTemplate};
1
+ "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Stack as a}from"@donotdev/components";const r=()=>o(a,{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{r as DashboardTemplate};
@@ -1 +1 @@
1
- {"version":3,"file":"HomeTemplate.d.ts","sourceRoot":"","sources":["../src/HomeTemplate.tsx"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,4CAoC3B"}
1
+ {"version":3,"file":"HomeTemplate.d.ts","sourceRoot":"","sources":["../src/HomeTemplate.tsx"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,4CAoC3B"}
@@ -1 +1 @@
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
+ "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 +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":"AAeA,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 o,jsxs as c}from"react/jsx-runtime";import"lucide-react";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 b=({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{b as LoginTemplate};
1
+ "use client";import{jsx as t,jsxs as c}from"react/jsx-runtime";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,{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 +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 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
+ "use client";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 +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 f,Stack as i,Grid as p}from"@donotdev/components";function L({changelog:o,className:h,showNavigation:y=!0,showVersionBadges:c=!0,maxEntries:l,onVersionSelect:w}){const[v,z]=m(null),[u,b]=m([]);N(()=>{let e=o;l&&(e=o.slice(0,l)),b(e)},[o,l]);const 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)"}}},C=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)"}},x=e=>{z(e),w?.(e)},t=v?o.find(e=>e.version===v):u[0];return n("div",{className:W("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:"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(p,{cols:4,gap:"large",className:"dndev-grid-responsive-1-4",children:[y&&r("div",{style:{gridColumn:"span 1"},children:r(f,{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:()=>x(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(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}),c&&r(s,{variant:d.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(f,{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}),c&&r(s,{variant:d.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,a)=>n(i,{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(i,{direction:"row",align:"center",gap:"tight",as:"span",children:[r("span",{children:C(e.type)}),r("span",{children:e.type.charAt(0).toUpperCase()+e.type.slice(1)})]})}),r(i,{as:"ul",gap:"tight",style:{marginLeft:"1.5rem"},children:e.items.map((D,k)=>r("li",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:D},k))})]},a)),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(i,{as:"ul",gap:"tight",children:t.breaking.map((e,a)=>r("li",{style:{fontSize:"var(--font-size-sm)",color:"var(--destructive-foreground)"},children:e},a))})]}),(t.contributors||t.pullRequests)&&r("div",{style:{paddingTop:"var(--gap-md)",borderTop:"1px solid var(--border)"},children:n(p,{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,a)=>r(s,{variant:d.OUTLINE,style:{fontSize:"var(--font-size-xs)"},children:e},a))})]}),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,a)=>n(s,{variant:d.OUTLINE,style:{fontSize:"var(--font-size-xs)"},children:["#",e]},a))})]})]})})]})})})]})]})}export{L as WhatsNewTemplate};
1
+ "use client";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useState as k,useMemo as C}from"react";import{cn as F,Badge as o,BADGE_VARIANT as s,Card as p,Stack as a,Grid as h}from"@donotdev/components";import{useTranslation as N}from"@donotdev/core";function W({changelog:i,className:f,showNavigation:y=!0,showVersionBadges:l=!0,maxEntries:d,onVersionSelect:w}){const{t:c}=N("whatsNew"),[u,z]=k(null),g=C(()=>d?i.slice(0,d):i,[i,d]),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)"}}},b=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)"}},x=e=>{z(e),w?.(e)},t=u?i.find(e=>e.version===u):g[0];return n("div",{className:F("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: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(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:g.map(e=>n("button",{onClick:()=>x(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(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(o,{variant:s.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",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)",...v(t.type)},children:t.type})]}),n(a,{direction:"row",align:"center",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,{children:[t.changes.map(e=>n(a,{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:b(e.type)}),r("span",{children:e.type.charAt(0).toUpperCase()+e.type.slice(1)})]})}),r(a,{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(a,{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(h,{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(a,{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(a,{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{W 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,2CA4P7B"}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CheckCircle as d,AlertCircle as b,ExternalLink as z}from"lucide-react";import{Card as a,Button as m,BUTTON_VARIANT as x,Stack as l,Grid as T}from"@donotdev/components";import{useTranslation as B}from"@donotdev/core";import{PageContainer as h,useNavigate as N,useAuthSafe as k,useBillingVisibility as C,FeatureDisabled as w}from"@donotdev/ui";function P({namespace:u,meta:W,title:s,subtitle:g,nextSteps:c=[],supportEmail:o="support@example.com"}){const{shouldHide:v}=C(),{t:n}=B([u,"billing"]),p=k("userSubscription"),f=N();if(v)return e(h,{variant:"docs",children:e(w,{featureName:"Billing Success",title:s||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:o})});const i=p,y=i?.status==="active";return e(h,{variant:"docs",children:t("div",{children:[t("div",{className:"dndev-text-center",style:{marginBottom:"var(--gap-lg)"},children:[e(l,{align:"center",justify:"center",style:{marginBottom:"var(--gap-md)"},children:y?e(d,{style:{width:"4rem",height:"4rem",color:"var(--success)"}}):e(b,{style:{width:"4rem",height:"4rem",color:"var(--warning)"}})}),e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"var(--gap-md)"},children:s||n("billing:templates.success.title","Payment Successful!")}),e("p",{style:{fontSize:"var(--font-size-xl)",color:"var(--muted-foreground)"},children:g||n("billing:templates.success.subtitle","Thank you for your purchase")})]}),i&&e(a,{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(l,{children:t(T,{cols:2,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(a,{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(l,{as:"ul",children:c.map((r,S)=>t(l,{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:z,children:r.linkText||"Learn more"})]})]},S))})]})}),e(a,{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:${o}`,style:{color:"var(--primary)",textDecoration:"underline"},onMouseEnter:r=>{r.currentTarget.style.textDecoration="underline"},children:o})]})})}),e("div",{className:"dndev-text-center",style:{marginTop:"var(--gap-lg)"},children:e(m,{onClick:()=>f("/"),children:"Go to Dashboard"})})]})})}export{P 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 p,BUTTON_VARIANT as x,Stack as n,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 D({namespace:u,title:o,subtitle:h,nextSteps:c=[],supportEmail:r="support@example.com"}){const{shouldHide:v}=w(),{t}=T([u,"billing"]),f=k("userSubscription"),y=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:r})});const s=f,b=s?.status==="active";return e(g,{variant:"docs",children:i("div",{children:[i("div",{className:"dndev-text-center",style:{marginBottom:"var(--gap-lg)"},children:[e(n,{align:"center",justify:"center",style:{marginBottom:"var(--gap-md)"},children:b?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:h||t("billing:templates.success.subtitle","Thank you for your purchase")})]}),s&&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(n,{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:s.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:s.status})]}),i("div",{children:[e("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:s.status==="active"?t("billing:templates.success.validUntil","Valid Until"):t("billing:templates.success.endedOn","Ended On")}),e("p",{style:{fontWeight:600},children:s.subscriptionEnd==null?t("billing:templates.success.lifetime","Lifetime"):new Date(s.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(n,{as:"ul",children:c.map(l=>i(n,{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(p,{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:${r}`,style:{color:"var(--primary)",textDecoration:"underline"},children:r})]})})}),e("div",{className:"dndev-text-center",style:{marginTop:"var(--gap-lg)"},children:e(p,{onClick:()=>y("/"),children:t("billing:templates.success.goToDashboard","Go to Dashboard")})})]})})}export{D as BillingSuccessTemplate};
@@ -1,18 +1,13 @@
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;
7
7
  title?: string;
8
8
  description?: string;
9
- onSuccess?: () => void;
10
- onCancel?: () => void;
11
- successMessage?: string;
12
- cancelMessage?: string;
13
9
  successRedirect?: string;
14
10
  cancelRedirect?: string;
15
- showToast?: boolean;
16
11
  billingOptions?: {
17
12
  metadata?: Record<string, string>;
18
13
  allowPromotionCodes?: boolean;
@@ -31,6 +26,5 @@ interface CheckoutPageTemplateProps {
31
26
  * @since 0.0.1
32
27
  * @author AMBROISE PARK Consulting
33
28
  */
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 {};
29
+ export declare function CheckoutPageTemplate({ children, priceId, mode, title, description, successRedirect, cancelRedirect, billingOptions, }: CheckoutPageTemplateProps): import("react/jsx-runtime").JSX.Element;
36
30
  //# 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;AAMnD,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,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,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,eAAe,EACf,cAAc,EACd,cAAc,GACf,EAAE,yBAAyB,2CAoF3B"}
@@ -1 +1 @@
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
+ "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{StripeCheckoutButton as h}from"@donotdev/billing";import{Card as c,BUTTON_VARIANT as g,Stack as v}from"@donotdev/components";import{useTranslation as f}from"@donotdev/core";import{useBillingVisibility as k,FeatureDisabled as y}from"@donotdev/ui";function b({children:a,priceId:l,mode:r="payment",title:s,description:n,successRedirect:d,cancelRedirect:m,billingOptions:i}){const{shouldHide:p,isLoading:u}=k(),{t}=f("billing");return p?e(y,{featureName:"Checkout",title:s||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()}}):u?e(c,{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(c,{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:s||t("templates.checkout.title")}),e("p",{style:{color:"var(--muted-foreground)"},children:n||t("templates.checkout.description")})]}),o(v,{gap:"large",style:{marginTop:"var(--gap-lg)"},children:[a&&e("div",{children:a}),l&&e("div",{children:e(h,{priceId:l,mode:r,successUrl:i?.successUrl||d||"/billing/success",cancelUrl:i?.cancelUrl||m||"/checkout",metadata:i?.metadata,allowPromotionCodes:i?.allowPromotionCodes,variant:g.DEFAULT,className:"dndev-w-full",children:t(r==="payment"?"templates.checkout.completePurchase":"templates.checkout.startSubscription")})})]})]})})}export{b 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 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 A({namespace:i,meta: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{A as PaymentTemplate};
1
+ "use client";import{jsx as e,jsxs as u}from"react/jsx-runtime";import{lazy as m,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=m(()=>import("@donotdev/billing").then(a=>({default:a.ProductCard}))),B=m(()=>import("@donotdev/billing").then(a=>({default:a.SecurityNotice})));function N({namespace:a,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",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",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: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{N 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 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 w,BADGE_VARIANT as S,Stack as T,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 D({namespace:a,meta:A,plans:c,successUrl:m="/billing/success",cancelUrl:u="/subscription",title:l,subtitle:g}){const{shouldHide:p,isLoading:v}=C(),{t}=I([a,"billing"]),[n,b]=h("year");if(p)return r(s,{variant:"standard",children:r(z,{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(v)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:t("billing:templates.subscription.loading","Loading subscriptions...")})})});const d=c.filter(i=>i.interval===n),f=()=>{const i=d.length;return i===1?{cols:1,className:"dndev-max-w-md dndev-mx-auto"}:i===2?{cols:2,className:"dndev-max-w-4xl dndev-mx-auto dndev-grid-responsive-1-2"}:i===3?{cols:3,className:"dndev-grid-responsive-1-3"}:i===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||t("billing:templates.subscription.title")}),r("p",{style:{fontSize:"var(--font-size-xl)",color:"var(--muted-foreground)",marginBottom:"2rem"},children:g||t("billing:templates.subscription.subtitle")}),o(T,{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:t("billing:templates.subscription.billingToggle.monthly")}),r(x,{variant:N.OUTLINE,onClick:()=>b(n==="month"?"year":"month"),className:"dndev-relative",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:"white",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:[t("billing:templates.subscription.billingToggle.yearly"),r(w,{variant:S.SECONDARY,style:{marginInlineStart:"0.5rem"},children:t("billing:templates.subscription.billingToggle.save20")})]})]})]}),(()=>{const i=f();return r(B,{cols:i.cols,className:i.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{D as SubscriptionTemplate};
1
+ "use client";import{jsx as i,jsxs as n}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 T,BADGE_VARIANT as w,Stack as S,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 k({namespace:l,plans:c,successUrl:m="/billing/success",cancelUrl:p="/subscription",title:o,subtitle:g}){const{shouldHide:u,isLoading:b}=z(),{t:r}=C([l,"billing"]),[a,v]=f("year");if(u)return i(s,{variant:"standard",children:i(I,{featureName:"Subscriptions",title:o||r("billing:templates.subscription.title"),description:r("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:r("billing:templates.subscription.loading","Loading subscriptions...")})})});const d=c.filter(t=>t.interval===a),h=()=>{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 i(s,{variant:"standard",children:n("div",{children:[n("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[i("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:o||r("billing:templates.subscription.title")}),i("p",{style:{fontSize:"var(--font-size-xl)",color:"var(--muted-foreground)",marginBottom:"2rem"},children:g||r("billing:templates.subscription.subtitle")}),n(S,{direction:"row",align:"center",justify:"center",children:[i("span",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:a==="month"?"var(--primary)":"var(--muted-foreground)"},children:r("billing:templates.subscription.billingToggle.monthly")}),i(N,{variant:x.OUTLINE,onClick:()=>v(a==="month"?"year":"month"),className:"dndev-relative",role:"switch","aria-checked":a==="year","aria-label":r("billing:templates.subscription.billingToggle.ariaLabel","Toggle billing interval"),children:i("div",{style:{width:"3rem",height:"1.5rem",backgroundColor:a==="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:"var(--background)",borderRadius:"9999px",boxShadow:"var(--shadow-sm)",transform:a==="year"?"translateX(1.5rem)":"translateX(0.125rem)",marginTop:"0.125rem",transition:"transform 0.2s"}})})}),n("span",{style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:a==="year"?"var(--primary)":"var(--muted-foreground)"},children:[r("billing:templates.subscription.billingToggle.yearly"),i(T,{variant:w.SECONDARY,style:{marginInlineStart:"0.5rem"},children:r("billing:templates.subscription.billingToggle.save20")})]})]})]}),(()=>{const t=h();return i(B,{cols:t.cols,className:t.className,children:d.map(e=>i(y,{namespace:l,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{k as SubscriptionTemplate};
@@ -1,7 +1,7 @@
1
1
  import type { PageMeta } from '@donotdev/core';
2
2
  export interface UserSubscriptionTemplateProps {
3
3
  namespace: string;
4
- meta: PageMeta;
4
+ meta?: PageMeta;
5
5
  availablePlans?: Array<{
6
6
  id: string;
7
7
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"UserSubscriptionTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/UserSubscriptionTemplate.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,IAAI,EACJ,cAAc,EACd,eAAuB,EACvB,KAAK,EACL,QAAQ,GACT,EAAE,6BAA6B,2CA8B/B"}
1
+ {"version":3,"file":"UserSubscriptionTemplate.d.ts","sourceRoot":"","sources":["../../src/billing/UserSubscriptionTemplate.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,IAAI,EACJ,cAAc,EACd,eAAuB,EACvB,KAAK,EACL,QAAQ,GACT,EAAE,6BAA6B,2CA8B/B"}
@@ -1 +1 @@
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};
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};
@@ -24,5 +24,5 @@ export interface BlogListProps {
24
24
  *
25
25
  * @version 0.0.4
26
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;
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
28
  //# sourceMappingURL=BlogList.d.ts.map
@@ -1 +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;AA+BD;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,UAAU,GACX,EAAE,aAAa,qTAwIf"}
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"}
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as n,Fragment as g}from"react/jsx-runtime";import{useState as j}from"react";import{Card as u,Grid as x,Stack as h,Tag as p,Text as c}from"@donotdev/components";import{useTranslation as y}from"@donotdev/core";import{Link as f}from"@donotdev/ui";function v({post:i,readMoreLabel:o}){return n("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",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}=y("blog"),[l,d]=j(null);if(i.length===0)return o||t(c,{as:"p",variant:"muted",align:"center",children:r("empty")});const m=[...new Set(i.flatMap(e=>e.tags))].sort(),b=l?i.filter(e=>e.tags.includes(l)):i,[a,...s]=b;return n(h,{gap:"large",children:[m.length>0&&n(h,{direction:"row",gap:"tight",wrap:"wrap",justify:"center",children:[t(p,{interactive:!0,variant:l===null?"accent":"outline",onClick:()=>d(null),size:"sm",children:r("all")}),m.map(e=>t(p,{interactive:!0,variant:l===e?"accent":"outline",onClick:()=>d(e===l?null:e),size:"sm",children:e},e))]}),a&&t(f,{path:`/blog/${a.slug}`,children:t(u,{clickable:!0,title:a.meta.title,subtitle:[a.meta.date,`${a.readingTime} ${r("minuteRead")}`].filter(Boolean).join(" \xB7 "),content:n(g,{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(v,{post:a,readMoreLabel:r("readMore")})})}),s.length>0&&t(x,{cols:[1,1,2,3],gap:"medium",children:s.map(e=>t(f,{path:`/blog/${e.slug}`,children:t(u,{clickable:!0,title:e.meta.title,subtitle:[e.meta.date,`${e.readingTime} ${r("minuteRead")}`].filter(Boolean).join(" \xB7 "),content:n(g,{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(v,{post:e,readMoreLabel:r("readMore")})})},e.slug))})]})}export{F as BlogList};
1
+ "use client";import{jsx as e,jsxs as n,Fragment as p}from"react/jsx-runtime";import{useState as x}from"react";import{Card as u,Grid as j,Stack as c,Tag as h,Text as o}from"@donotdev/components";import{useTranslation as w}from"@donotdev/core";import{Link as f}from"@donotdev/ui";function v({post:i,readMoreLabel:s}){return n(c,{direction:"row",justify:"between",align:"center",style:{width:"100%"},children:[i.tags.length>0&&e(o,{as:"span",level:"caption",variant:"muted",children:i.tags.join(" \xB7 ")}),n(o,{as:"span",level:"small",variant:"accent",children:[s," \u2192"]})]})}function y({posts:i,emptyState:s}){const{t:r}=w("blog"),[l,d]=x(null);if(i.length===0)return s||e(o,{as:"p",variant:"muted",align:"center",children:r("empty")});const m=[...new Set(i.flatMap(t=>t.tags))].sort(),b=l?i.filter(t=>t.tags.includes(l)):i,[a,...g]=b;return n(c,{gap:"large",children:[m.length>0&&n(c,{direction:"row",gap:"tight",wrap:"wrap",justify:"center",children:[e(h,{interactive:!0,variant:l===null?"accent":"outline",onClick:()=>d(null),size:"sm",children:r("all")}),m.map(t=>e(h,{interactive:!0,variant:l===t?"accent":"outline",onClick:()=>d(t===l?null:t),size:"sm",children:t},t))]}),a&&e(f,{path:`/blog/${a.slug}`,children:e(u,{clickable:!0,title:a.meta.title,subtitle:[a.meta.date,`${a.readingTime} ${r("minuteRead")}`].filter(Boolean).join(" \xB7 "),content:n(p,{children:[a.meta.image&&e("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)"}}),e(o,{as:"p",children:a.meta.description})]}),footer:e(v,{post:a,readMoreLabel:r("readMore")})})}),g.length>0&&e(j,{cols:[1,1,2,3],children:g.map(t=>e(f,{path:`/blog/${t.slug}`,children:e(u,{clickable:!0,title:t.meta.title,subtitle:[t.meta.date,`${t.readingTime} ${r("minuteRead")}`].filter(Boolean).join(" \xB7 "),content:n(p,{children:[t.meta.image&&e("img",{src:t.meta.image,alt:t.meta.title,loading:"lazy",decoding:"async",style:{width:"100%",maxHeight:"180px",objectFit:"cover",borderRadius:"var(--radius-md)",marginBottom:"var(--gap-sm)"}}),e(o,{as:"p",level:"small",children:t.meta.description})]}),footer:e(v,{post:t,readMoreLabel:r("readMore")})})},t.slug))})]})}export{y as BlogList};
@@ -25,5 +25,5 @@ export interface BlogPostProps {
25
25
  *
26
26
  * @version 0.0.3
27
27
  */
28
- export declare function BlogPostView({ post, }: BlogPostProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function BlogPostView({ post }: BlogPostProps): import("react/jsx-runtime").JSX.Element;
29
29
  //# sourceMappingURL=BlogPost.d.ts.map
@@ -1 +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,EAC3B,IAAI,GACL,EAAE,aAAa,2CA8Df"}
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"}
@@ -1 +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};
1
+ "use client";import{jsx as a,jsxs as e,Fragment as d}from"react/jsx-runtime";import{ArrowLeft as o}from"lucide-react";import{Button as r,HeroSection as c,Section as l,Text as n}from"@donotdev/components";import{useTranslation as g}from"@donotdev/core";import{Link as s}from"@donotdev/ui";import{MarkdownViewer as h}from"../components/MarkdownViewer";function p({post:t}){const{t:i}=g("blog");if(!t)return e(l,{children:[a(n,{as:"p",variant:"muted",align:"center",children:i("notFound")}),a(s,{path:"/blog",children:a(r,{variant:"ghost",icon:o,children:i("backToBlog")})})]});const m=[t.meta.date?`${i("publishedOn")} ${t.meta.date}`:null,`${t.readingTime} ${i("minuteRead")}`].filter(Boolean).join(" \xB7 ");return e(d,{children:[a(c,{title:t.meta.title}),e(l,{children:[a(s,{path:"/blog",children:a(r,{variant:"ghost",icon:o,children:i("backToBlog")})}),a(n,{as:"p",level:"small",variant:"muted",children:m}),t.tags.length>0&&a(n,{as:"p",level:"caption",variant:"muted",children:t.tags.join(" \xB7 ")}),t.meta.image&&a("img",{src:t.meta.image,alt:t.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)"}}),a(h,{content:t.content})]})]})}export{p as BlogPostView};
@@ -1,2 +1,2 @@
1
- const p=200;function g(s){const t=s.trim().split(/\s+/).length;return Math.max(1,Math.ceil(t/200))}function f(s){return s?s.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean):[]}function d(s){const t=s.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);if(!t)return{meta:{title:"",description:"",date:""},content:s};const o={title:"",description:"",date:""},r=t[1]??"";for(const a of r.split(`
2
- `)){const l=a.indexOf(":");if(l===-1)continue;const e=a.slice(0,l).trim(),n=a.slice(l+1).trim();e&&(o[e]=n)}return{meta:o,content:t[2]??""}}function m(s){const t=s.split("/").pop()?.replace(/\.md$/,"");if(!t)return null;const o=t.lastIndexOf("_");if(o===-1)return{slug:t,lang:"en"};const r=t.slice(o+1),a=t.slice(0,o);return r.length>5?{slug:t,lang:"en"}:{slug:a,lang:r}}function h(s,t){const o=new Map;for(const[e,n]of Object.entries(s)){const i=m(e);i&&(o.has(i.slug)||o.set(i.slug,new Map),o.get(i.slug).set(i.lang,n))}const r=[];for(const[e,n]of o){const i=n.get(t)||n.get("en");if(!i)continue;const{meta:c,content:u}=d(i);r.push({slug:e,meta:c,content:u,readingTime:g(u),tags:f(c.tags)})}r.sort((e,n)=>!e.meta.date&&!n.meta.date?0:e.meta.date?n.meta.date?n.meta.date.localeCompare(e.meta.date):-1:1);const a=new Set;for(const e of r)for(const n of e.tags)a.add(n);const l=[...a].sort();return{getAllPosts:()=>r,getPostBySlug:e=>r.find(n=>n.slug===e)||null,getAllTags:()=>l,getPostsByTag:e=>r.filter(n=>n.tags.includes(e.toLowerCase()))}}export{h as createBlogLoader,d as parseFrontmatter};
1
+ const h=200;function f(o){const t=o.trim().split(/\s+/).length;return Math.max(1,Math.ceil(t/200))}function m(o){return o?o.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean):[]}function u(o){const t=o.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);if(!t)return{meta:{title:"",description:"",date:""},content:o};const s={title:"",description:"",date:""},a=t[1]??"";for(const r of a.split(`
2
+ `)){const l=r.indexOf(":");if(l===-1)continue;const e=r.slice(0,l).trim(),n=r.slice(l+1).trim();e&&(s[e]=n)}return{meta:s,content:t[2]??""}}function d(o){const t=o.split("/").pop()?.replace(/\.md$/,"");if(!t)return null;const s=t.lastIndexOf("_");if(s===-1)return{slug:t,lang:"en"};const a=t.slice(s+1),r=t.slice(0,s);return a.length>5?{slug:t,lang:"en"}:{slug:r,lang:a}}function p(o,t){const s=new Map;for(const[e,n]of Object.entries(o)){const c=d(e);c&&(s.has(c.slug)||s.set(c.slug,new Map),s.get(c.slug).set(c.lang,n))}const a=[];for(const[e,n]of s){const c=n.get(t)||n.get("en");if(!c)continue;const{meta:i,content:g}=u(c);a.push({slug:e,meta:i,content:g,readingTime:f(g),tags:m(i.tags)})}a.sort((e,n)=>!e.meta.date&&!n.meta.date?0:e.meta.date?n.meta.date?n.meta.date.localeCompare(e.meta.date):-1:1);const r=new Set;for(const e of a)for(const n of e.tags)r.add(n);const l=[...r].sort();return{getAllPosts:()=>a,getPostBySlug:e=>a.find(n=>n.slug===e)||null,getAllTags:()=>l,getPostsByTag:e=>a.filter(n=>n.tags.includes(e.toLowerCase()))}}export{p as createBlogLoader,u as parseFrontmatter};
@@ -5,5 +5,4 @@ export interface MarkdownViewerProps {
5
5
  className?: string;
6
6
  }
7
7
  export declare const MarkdownViewer: import("react").NamedExoticComponent<MarkdownViewerProps>;
8
- export default MarkdownViewer;
9
8
  //# sourceMappingURL=MarkdownViewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownViewer.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownViewer.tsx"],"names":[],"mappings":"AA4BA,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyFD,eAAO,MAAM,cAAc,2DAA2B,CAAC;AACvD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"MarkdownViewer.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownViewer.tsx"],"names":[],"mappings":"AAmDA,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyFD,eAAO,MAAM,cAAc,2DAA2B,CAAC"}
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import u,{domToReact as p,Element as c}from"html-react-parser";import{marked as g}from"marked";import{memo as h,useMemo as x}from"react";import{Code as k,cn as w}from"@donotdev/components";import{Link as y}from"@donotdev/ui";function m(n){let a="";for(const e of n.children)e.type==="text"?a+=e.data:e instanceof c&&(a+=m(e));return a}const b=({content:n,className:a})=>{const e=x(()=>{if(!n)return null;const d=g.parse(n,{async:!1,gfm:!0,breaks:!0});return u(d,{replace(l){if(!(l instanceof c))return;const{name:i,attribs:s,children:f}=l;if(i==="pre"){const r=f.find(t=>t instanceof c&&t.name==="code");if(r){const t=/language-(\w+)/.exec(r.attribs?.class||"")?.[1]||"text";return o(k,{language:t,children:m(r).replace(/\n$/,"")})}}if(i==="a"){const r=s?.href||"";return o(y,{path:r,children:p(f)})}if(i==="img"){const r=s?.src||"",t=s?.alt||"";return o("img",{src:r,alt:t,loading:"lazy",decoding:"async",style:{maxWidth:"100%",height:"auto"}})}}})},[n]);return e?o("div",{className:w("prose",a),children:e}):null},M=h(b);var B=M;export{M as MarkdownViewer,B as default};
1
+ "use client";import{jsx as n}from"react/jsx-runtime";import g,{domToReact as u,Element as o}from"html-react-parser";import{marked as h}from"marked";import{memo as x,useMemo as b}from"react";import{Code as j,cn as k}from"@donotdev/components";import{Link as v}from"@donotdev/ui";const w=/<script[\s\S]*?<\/script>/gi,y=/<iframe[\s\S]*?(?:<\/iframe>|\/?>)/gi,S=/<object[\s\S]*?(?:<\/object>|\/?>)/gi,M=/<embed[\s\S]*?(?:\/?>)/gi,C=/<svg[^>]*\s+on\w+[\s\S]*?(?:<\/svg>|\/?>)/gi,E=/\s+on\w+\s*=\s*["'][^"']*["']/gi,N=/\s+(?:xlink:)?href\s*=\s*["']\s*(?:javascript:|&#\d+;|&#x[0-9a-f]+;)[^"']*["']/gi,R=/\s+src\s*=\s*["']\s*(?:javascript:|&#\d+;|&#x[0-9a-f]+;)[^"']*["']/gi;function T(e){return e.replace(w,"").replace(y,"").replace(S,"").replace(M,"").replace(C,"").replace(E,"").replace(N,"").replace(R,"")}function f(e){let a="";for(const r of e.children)r.type==="text"?a+=r.data:r instanceof o&&(a+=f(r));return a}const V=({content:e,className:a})=>{const r=b(()=>{if(!e)return null;const p=h.parse(e,{async:!1,gfm:!0,breaks:!0}),d=T(p);return g(d,{replace(l){if(!(l instanceof o))return;const{name:c,attribs:i,children:m}=l;if(c==="pre"){const s=m.find(t=>t instanceof o&&t.name==="code");if(s){const t=/language-(\w+)/.exec(s.attribs?.class||"")?.[1]||"text";return n(j,{language:t,children:f(s).replace(/\n$/,"")})}}if(c==="a"){const s=i?.href||"";return n(v,{path:s,children:u(m)})}if(c==="img"){const s=i?.src||"",t=i?.alt||"";return n("img",{src:s,alt:t,loading:"lazy",decoding:"async",style:{maxWidth:"100%",height:"auto"}})}}})},[e]);return r?n("div",{className:k("prose",a),children:r}):null},z=x(V);export{z as MarkdownViewer};
@@ -46,5 +46,4 @@ export interface CarCardListTemplateProps extends Omit<EntityCardListProps, 'col
46
46
  * @returns React component
47
47
  */
48
48
  export declare function CarCardListTemplate({ entity, title, description, basePath, onClick, cols, staleTime, filter, hideFilters, makeField, modelField, imageField, mileageField, yearField, transmissionField, fuelTypeField, priceField, subtitleField, locale, imageAspectRatio, hideSection, }: CarCardListTemplateProps): import("react/jsx-runtime").JSX.Element;
49
- export default CarCardListTemplate;
50
49
  //# sourceMappingURL=CarCardListTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CarCardListTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/CarCardListTemplate.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAY1D,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,mBAAmB,EACnB,MAAM,CACP;IACC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8GAA8G;IAC9G,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,IAAmB,EACnB,SAA0B,EAC1B,MAAM,EACN,WAAmB,EACnB,SAAkB,EAClB,UAAoB,EACpB,UAAqB,EACrB,YAAwB,EACxB,SAAkB,EAClB,iBAAkC,EAClC,aAA0B,EAC1B,UAAoB,EACpB,aAAyB,EACzB,MAAM,EACN,gBAAyB,EACzB,WAAmB,GACpB,EAAE,wBAAwB,2CA0Y1B;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CarCardListTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/CarCardListTemplate.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAY1D,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,mBAAmB,EACnB,MAAM,CACP;IACC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8GAA8G;IAC9G,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,IAAmB,EACnB,SAA0B,EAC1B,MAAM,EACN,WAAmB,EACnB,SAAkB,EAClB,UAAoB,EACpB,UAAqB,EACrB,YAAwB,EACxB,SAAkB,EAClB,iBAAkC,EAClC,aAA0B,EAC1B,UAAoB,EACpB,aAAyB,EACzB,MAAM,EACN,gBAAyB,EACzB,WAAmB,GACpB,EAAE,wBAAwB,2CA+Y1B"}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as i,Fragment as he}from"react/jsx-runtime";import{useMemo as ve,useCallback as P}from"react";import{Heart as q,Calendar as ye,Gauge as we,Fuel as Fe,Sliders as Ce}from"lucide-react";import{Grid as be,Card as Ve,Stack as n,Text as a,Section as J,Button as xe,Spinner as Se}from"@donotdev/components";import{useTranslation as K}from"@donotdev/core";import{useNavigate as ke}from"@donotdev/ui";import{useCrudCardList as je,useCrudFilters as Q,EntityFilters as Te,matchesFilter as Ne,useEntityFavorites as $e,formatValue as T}from"@donotdev/crud";function ze({entity:r,title:Oe,description:Ae,basePath:W,onClick:p,cols:X=[1,2,3,4],staleTime:Y=1e3*60*30,filter:h,hideFilters:Z=!1,makeField:ee="make",modelField:te="model",imageField:le="images",mileageField:re="mileage",yearField:ie="year",transmissionField:N="transmission",fuelTypeField:$="fuelType",priceField:z="price",subtitleField:ne="variant",locale:oe,imageAspectRatio:ae="16/9",hideSection:se=!1}){const O=ke(),A=W??`/${r.collection}`,v=r.collection,{t:f,i18n:ce}=K([r.namespace,"crud"]),{t:o}=K("crud"),de=oe||ce?.language?.replace("_","-")||"en-US",{data:ue,loading:L}=je(r,{staleTime:Y}),y=ue?.items||[],{isFavorite:fe,toggleFavorite:ge,favoritesFilter:D}=$e({collection:v}),{showFavoritesOnly:d,setShowFavoritesOnly:me}=Q({collection:v}),{filters:w}=Q({collection:v}),_=P(l=>Object.keys(w).length===0?!0:Object.entries(w).every(([t,g])=>{const m=l[t],C=r.fields[t]?.type||"text";return Ne(m,g,C)}),[w,r.fields]),u=ve(()=>{let l=y;return l=l.filter(_),d&&(l=l.filter(D)),h&&(l=l.filter(h)),l},[y,_,d,D,h]),pe=P(l=>{p?p(l):O(`${A}/${l}`)},[A,O,p]),F=f("name",{defaultValue:r.name});return i(he,{children:[!Z&&e(J,{title:o("filters.title",{entity:F,defaultValue:`Browse ${F} - Filters`}),collapsible:!0,defaultOpen:!0,children:i(n,{direction:"column",children:[e(xe,{variant:d?"primary":"outline",icon:e(q,{size:18}),onClick:()=>me(!d),children:d?o("favorites.showAll",{defaultValue:"Show All"}):o("favorites.showFavorites",{defaultValue:"Show Favorites"})}),e(Te,{entity:r,data:y,fieldsToFilter:r.listCardFields})]})}),(()=>{const l=L?e(n,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:e(Se,{})}):u.length===0?i(n,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[e(a,{level:"h3",style:{color:"var(--muted-foreground)"},children:o("emptyState.title",{defaultValue:`No ${r.name.toLowerCase()} found`})}),e(a,{style:{color:"var(--muted-foreground)"},children:o("emptyState.description",{defaultValue:`No ${r.name.toLowerCase()} available at this time.`})})]}):e(be,{cols:X,children:u.map(t=>{if(t==null)return null;const g=t[le],m=typeof g=="string"?g:null,B=t[ee],C=t[te],c=t[re],b=t[ie],I=t[N],R=t[$],E=t[z],G=r.fields[z]??void 0,U=t[ne??"variant"],V=fe(t.id),H=r.fields[N],M=r.fields[$],x=H&&I!=null?T(I,H,f,{compact:!0}):null,S=M&&R!=null?T(R,M,f,{compact:!0}):null,k=[B,C].filter(Boolean).join(" ");return i(Ve,{clickable:!0,onClick:()=>pe(t.id),elevated:!0,style:{position:"relative",padding:0,overflow:"hidden"},children:[e(q,{fill:V?"#ef4444":"#ffffff",stroke:V?"#ef4444":"var(--muted-foreground)",onClick:s=>{s.stopPropagation(),ge(t.id)},style:{position:"absolute",top:"var(--gap-sm)",right:"var(--gap-sm)",zIndex:10,cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":V?o("favorites.remove",{defaultValue:"Remove from favorites"}):o("favorites.add",{defaultValue:"Add to favorites"})}),m&&e("div",{style:{width:"100%",aspectRatio:ae,overflow:"hidden"},children:e("img",{src:m,alt:k||F,style:{width:"100%",height:"100%",objectFit:"cover"}})}),i(n,{direction:"column",gap:"tight",style:{padding:"var(--gap-md)"},children:[k&&e(a,{level:"h4",weight:"semibold",children:k}),U&&e(a,{variant:"muted",level:"small",children:U}),E!=null&&G!=null&&(()=>{const s=G;if(!s)return null;const j=T(E,s,f,{compact:!0});return e("div",{style:{marginTop:"var(--gap-xs)",textAlign:"end"},children:typeof j=="string"?e(a,{variant:"accent",align:"end",weight:"bold",children:j}):j})})(),i(n,{direction:"column",gap:"tight",style:{marginTop:"var(--gap-sm)"},children:[(b||c)&&i(n,{direction:"row",gap:"tight",align:"center",children:[b&&i(n,{direction:"row",gap:"tight",align:"center",children:[e(ye,{size:16,style:{color:"var(--muted-foreground)"}}),e(a,{level:"small",children:b})]}),c&&i(n,{direction:"row",gap:"tight",align:"center",children:[e(we,{size:16,style:{color:"var(--muted-foreground)"}}),e(a,{level:"small",children:(()=>{const s=typeof c=="number"?c:Number(c);if(isNaN(s))return String(c)+" km";try{return new Intl.NumberFormat(de).format(s)+" km"}catch{return String(s)+" km"}})()})]})]}),(S||x)&&i(n,{direction:"row",gap:"tight",align:"center",children:[S&&i(n,{direction:"row",gap:"tight",align:"center",children:[e(Fe,{size:16,style:{color:"var(--muted-foreground)"}}),e(a,{level:"small",children:S})]}),x&&i(n,{direction:"row",gap:"tight",align:"center",children:[e(Ce,{size:16,style:{color:"var(--muted-foreground)"}}),e(a,{level:"small",children:x})]})]})]})]})]},t.id)})});return se?l:e(J,{title:L?o("results.title.fetching",{defaultValue:"Fetching..."}):o("results.title.count",{count:u.length,defaultValue:u.length===1?"Found 1 item":`Found ${u.length} items`}),collapsible:!0,defaultOpen:!0,children:l})})()]})}var Ue=ze;export{ze as CarCardListTemplate,Ue as default};
1
+ "use client";import{jsx as e,jsxs as r,Fragment as he}from"react/jsx-runtime";import{useMemo as pe,useCallback as _}from"react";import{Heart as q,Calendar as ve,Gauge as ye,Fuel as Fe,Sliders as we}from"lucide-react";import{Grid as be,Card as Ce,Stack as a,Text as o,Section as D,Button as ke,Spinner as xe}from"@donotdev/components";import{useTranslation as J,getListCardFieldNames as Se}from"@donotdev/core";import{useNavigate as Ve}from"@donotdev/ui";import{useCrudCardList as je,useCrudFilters as Te,EntityFilters as ze,matchesFilter as Ne,useEntityFavorites as Oe,formatValue as j}from"@donotdev/crud";function Ae({entity:l,title:Le,description:$e,basePath:K,onClick:h,cols:Q=[1,2,3,4],staleTime:W=1e3*60*30,filter:p,hideFilters:X=!1,makeField:Y="make",modelField:Z="model",imageField:ee="images",mileageField:te="mileage",yearField:ie="year",transmissionField:T="transmission",fuelTypeField:z="fuelType",priceField:N="price",subtitleField:le="variant",locale:re,imageAspectRatio:ae="16/9",hideSection:ne=!1}){const O=Ve(),A=K??`/${l.collection}`,L=l.collection,{t:m,i18n:oe}=J([l.namespace,"crud"]),{t:n}=J("crud"),se=re||oe?.language?.replace("_","-")||"en-US",{data:de,loading:$}=je(l,{staleTime:W}),v=de?.items||[],{isFavorite:ce,toggleFavorite:ue,favoritesFilter:I}=Oe({collection:L}),{showFavoritesOnly:c,setShowFavoritesOnly:me,filters:y}=Te({collection:L}),R=_(i=>Object.keys(y).length===0?!0:Object.entries(y).every(([t,g])=>{const f=i[t],w=l.fields[t]?.type||"text";return Ne(f,g,w)}),[y,l.fields]),u=pe(()=>{let i=v;return i=i.filter(R),c&&(i=i.filter(I)),p&&(i=i.filter(p)),i},[v,R,c,I,p]),ge=_(i=>{h?h(i):O(`${A}/${i}`)},[A,O,h]),F=m("name",{defaultValue:l.name});return r(he,{children:[!X&&e(D,{title:n("filters.title",{entity:F,defaultValue:`Browse ${F} - Filters`}),collapsible:!0,defaultOpen:!0,children:r(a,{direction:"column",children:[e(ke,{variant:c?"primary":"outline",icon:e(q,{size:18}),onClick:()=>me(!c),children:c?n("favorites.showAll",{defaultValue:"Show All"}):n("favorites.showFavorites",{defaultValue:"Show Favorites"})}),e(ze,{entity:l,data:v,fieldsToFilter:Se(l)})]})}),(()=>{const i=$?e(a,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:e(xe,{})}):u.length===0?r(a,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[e(o,{level:"h3",style:{color:"var(--muted-foreground)"},children:n("emptyState.title",{defaultValue:`No ${l.name.toLowerCase()} found`})}),e(o,{style:{color:"var(--muted-foreground)"},children:n("emptyState.description",{defaultValue:`No ${l.name.toLowerCase()} available at this time.`})})]}):e(be,{cols:Q,children:u.map(t=>{if(t==null)return null;const g=t[ee],f=typeof g=="string"?g:null,w=t[Y],fe=t[Z],d=t[te],b=t[ie],B=t[T],E=t[z],G=t[N],P=l.fields[N]??void 0,U=t[le??"variant"],C=ce(t.id),H=l.fields[T],M=l.fields[z],k=H&&B!=null?j(B,H,m,{compact:!0}):null,x=M&&E!=null?j(E,M,m,{compact:!0}):null,S=[w,fe].filter(Boolean).join(" ");return r(Ce,{clickable:!0,onClick:()=>ge(t.id),elevated:!0,style:{position:"relative",padding:0,overflow:"hidden"},children:[e("button",{type:"button",onClick:s=>{s.stopPropagation(),ue(t.id)},style:{position:"absolute",top:"var(--gap-sm)",insetInlineEnd:"var(--gap-sm)",zIndex:10,cursor:"pointer",padding:"var(--gap-xs)",borderRadius:"var(--radius-full)",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",border:"none"},"aria-label":C?n("favorites.remove",{defaultValue:"Remove from favorites"}):n("favorites.add",{defaultValue:"Add to favorites"}),children:e(q,{fill:C?"#ef4444":"#ffffff",stroke:C?"#ef4444":"var(--muted-foreground)",style:{width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"}})}),f&&e("div",{style:{width:"100%",aspectRatio:ae,overflow:"hidden"},children:e("img",{src:f,alt:S||F,style:{width:"100%",height:"100%",objectFit:"cover"}})}),r(a,{direction:"column",gap:"tight",style:{padding:"var(--gap-md)"},children:[S&&e(o,{level:"h4",weight:"semibold",children:S}),U&&e(o,{variant:"muted",level:"small",children:U}),G!=null&&P!=null&&(()=>{const s=P;if(!s)return null;const V=j(G,s,m,{compact:!0});return e("div",{style:{marginTop:"var(--gap-xs)",textAlign:"end"},children:typeof V=="string"?e(o,{variant:"accent",align:"end",weight:"bold",children:V}):V})})(),r(a,{direction:"column",gap:"tight",style:{marginTop:"var(--gap-sm)"},children:[(b||d)&&r(a,{direction:"row",gap:"tight",align:"center",children:[b&&r(a,{direction:"row",gap:"tight",align:"center",children:[e(ve,{size:16,style:{color:"var(--muted-foreground)"}}),e(o,{level:"small",children:b})]}),d&&r(a,{direction:"row",gap:"tight",align:"center",children:[e(ye,{size:16,style:{color:"var(--muted-foreground)"}}),e(o,{level:"small",children:(()=>{const s=typeof d=="number"?d:Number(d);if(isNaN(s))return String(d)+" km";try{return new Intl.NumberFormat(se).format(s)+" km"}catch{return String(s)+" km"}})()})]})]}),(x||k)&&r(a,{direction:"row",gap:"tight",align:"center",children:[x&&r(a,{direction:"row",gap:"tight",align:"center",children:[e(Fe,{size:16,style:{color:"var(--muted-foreground)"}}),e(o,{level:"small",children:x})]}),k&&r(a,{direction:"row",gap:"tight",align:"center",children:[e(we,{size:16,style:{color:"var(--muted-foreground)"}}),e(o,{level:"small",children:k})]})]})]})]})]},t.id)})});return ne?i:e(D,{title:$?n("results.title.fetching",{defaultValue:"Fetching..."}):n("results.title.count",{count:u.length,defaultValue:u.length===1?"Found 1 item":`Found ${u.length} items`}),collapsible:!0,defaultOpen:!0,children:i})})()]})}export{Ae as CarCardListTemplate};
@@ -34,5 +34,4 @@ export interface CarDetailTemplateProps {
34
34
  * CarDetailTemplate - Full vehicle detail page
35
35
  */
36
36
  export declare function CarDetailTemplate({ entity, id: propId, customerEntity, inquiryEntity, relatedFields, locale, makeField, modelField, variantField, yearField, mileageField, fuelTypeField, transmissionField, priceField, imagesField, descriptionField, contextField, pageNamespace, }: CarDetailTemplateProps): ReactElement;
37
- export default CarDetailTemplate;
38
37
  //# sourceMappingURL=CarDetailTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CarDetailTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/CarDetailTemplate.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,sBAAsB;IACrC,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAOD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,EAAE,EAAE,MAAM,EACV,cAAc,EACd,aAAa,EACb,aAAiC,EACjC,MAAM,EACN,SAAkB,EAClB,UAAoB,EACpB,YAAwB,EACxB,SAAkB,EAClB,YAAwB,EACxB,aAA0B,EAC1B,iBAAkC,EAClC,UAAoB,EACpB,WAAsB,EACtB,gBAAgB,EAChB,YAAsB,EACtB,aAAa,GACd,EAAE,sBAAsB,GAAG,YAAY,CAwfvC;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"CarDetailTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/CarDetailTemplate.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,sBAAsB;IACrC,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAOD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,EAAE,EAAE,MAAM,EACV,cAAc,EACd,aAAa,EACb,aAAiC,EACjC,MAAM,EACN,SAAkB,EAClB,UAAoB,EACpB,YAAwB,EACxB,SAAkB,EAClB,YAAwB,EACxB,aAA0B,EAC1B,iBAAkC,EAClC,UAAoB,EACpB,WAAsB,EACtB,gBAAgB,EAChB,YAAsB,EACtB,aAAa,GACd,EAAE,sBAAsB,GAAG,YAAY,CAigBvC"}