@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.
- package/dist/AdminLandingTemplate.d.ts +0 -1
- package/dist/AdminLandingTemplate.d.ts.map +1 -1
- package/dist/AdminLandingTemplate.js +1 -1
- package/dist/DashboardTemplate.d.ts.map +1 -1
- package/dist/DashboardTemplate.js +1 -1
- package/dist/HomeTemplate.d.ts.map +1 -1
- package/dist/HomeTemplate.js +1 -1
- package/dist/LoginTemplate.d.ts.map +1 -1
- package/dist/LoginTemplate.js +1 -1
- package/dist/ProfileTemplate.d.ts.map +1 -1
- package/dist/ProfileTemplate.js +1 -1
- package/dist/WhatsNewTemplate.d.ts.map +1 -1
- package/dist/WhatsNewTemplate.js +1 -1
- package/dist/billing/BillingSuccessTemplate.d.ts +1 -3
- package/dist/billing/BillingSuccessTemplate.d.ts.map +1 -1
- package/dist/billing/BillingSuccessTemplate.js +1 -1
- package/dist/billing/CheckoutTemplate.d.ts +2 -8
- package/dist/billing/CheckoutTemplate.d.ts.map +1 -1
- package/dist/billing/CheckoutTemplate.js +1 -1
- package/dist/billing/PaymentTemplate.d.ts +2 -3
- package/dist/billing/PaymentTemplate.d.ts.map +1 -1
- package/dist/billing/PaymentTemplate.js +1 -1
- package/dist/billing/SubscriptionTemplate.d.ts +2 -3
- package/dist/billing/SubscriptionTemplate.d.ts.map +1 -1
- package/dist/billing/SubscriptionTemplate.js +1 -1
- package/dist/billing/UserSubscriptionTemplate.d.ts +1 -1
- package/dist/billing/UserSubscriptionTemplate.d.ts.map +1 -1
- package/dist/billing/UserSubscriptionTemplate.js +1 -1
- package/dist/blog/BlogList.d.ts +1 -1
- package/dist/blog/BlogList.d.ts.map +1 -1
- package/dist/blog/BlogList.js +1 -1
- package/dist/blog/BlogPost.d.ts +1 -1
- package/dist/blog/BlogPost.d.ts.map +1 -1
- package/dist/blog/BlogPost.js +1 -1
- package/dist/blog/blog-loader.js +2 -2
- package/dist/components/MarkdownViewer.d.ts +0 -1
- package/dist/components/MarkdownViewer.d.ts.map +1 -1
- package/dist/components/MarkdownViewer.js +1 -1
- package/dist/crud/CarCardListTemplate.d.ts +0 -1
- package/dist/crud/CarCardListTemplate.d.ts.map +1 -1
- package/dist/crud/CarCardListTemplate.js +1 -1
- package/dist/crud/CarDetailTemplate.d.ts +0 -1
- package/dist/crud/CarDetailTemplate.d.ts.map +1 -1
- package/dist/crud/CarDetailTemplate.js +1 -1
- package/dist/crud/InquiryAdminTemplate.d.ts +1 -2
- package/dist/crud/InquiryAdminTemplate.d.ts.map +1 -1
- package/dist/crud/InquiryAdminTemplate.js +1 -1
- package/dist/crud/InquiryFormTemplate.d.ts +0 -1
- package/dist/crud/InquiryFormTemplate.d.ts.map +1 -1
- package/dist/crud/InquiryFormTemplate.js +1 -1
- package/dist/crud/ProductCardListTemplate.d.ts +0 -1
- package/dist/crud/ProductCardListTemplate.d.ts.map +1 -1
- package/dist/crud/ProductCardListTemplate.js +1 -40
- package/dist/legal/LegalNoticeTemplate.d.ts +10 -1
- package/dist/legal/LegalNoticeTemplate.d.ts.map +1 -1
- package/dist/legal/LegalNoticeTemplate.js +1 -1
- package/dist/legal/PrivacyPolicyTemplate.d.ts +10 -2
- package/dist/legal/PrivacyPolicyTemplate.d.ts.map +1 -1
- package/dist/legal/PrivacyPolicyTemplate.js +1 -1
- package/dist/legal/TermsOfServiceTemplate.d.ts +10 -2
- package/dist/legal/TermsOfServiceTemplate.d.ts.map +1 -1
- package/dist/legal/TermsOfServiceTemplate.js +1 -1
- 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
|
|
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
|
|
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":"
|
|
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
|
|
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":"
|
|
1
|
+
{"version":3,"file":"HomeTemplate.d.ts","sourceRoot":"","sources":["../src/HomeTemplate.tsx"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,4CAoC3B"}
|
package/dist/HomeTemplate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
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":"
|
|
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"}
|
package/dist/LoginTemplate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
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":"
|
|
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"}
|
package/dist/ProfileTemplate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
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":"
|
|
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"}
|
package/dist/WhatsNewTemplate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useState as
|
|
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,
|
|
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":"
|
|
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
|
|
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,
|
|
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":"
|
|
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
|
|
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 {
|
|
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,
|
|
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":"
|
|
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
|
|
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 {
|
|
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,
|
|
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":"
|
|
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
|
|
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 +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;
|
|
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
|
|
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};
|
package/dist/blog/BlogList.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export interface BlogListProps {
|
|
|
24
24
|
*
|
|
25
25
|
* @version 0.0.4
|
|
26
26
|
*/
|
|
27
|
-
export declare function BlogList({ posts, emptyState
|
|
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;
|
|
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"}
|
package/dist/blog/BlogList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
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};
|
package/dist/blog/BlogPost.d.ts
CHANGED
|
@@ -25,5 +25,5 @@ export interface BlogPostProps {
|
|
|
25
25
|
*
|
|
26
26
|
* @version 0.0.3
|
|
27
27
|
*/
|
|
28
|
-
export declare function BlogPostView({ post
|
|
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,
|
|
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"}
|
package/dist/blog/BlogPost.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
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};
|
package/dist/blog/blog-loader.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
2
|
-
`)){const l=
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownViewer.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownViewer.tsx"],"names":[],"mappings":"
|
|
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
|
|
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":"
|
|
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
|
|
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,
|
|
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"}
|