@donotdev/templates 0.0.8 → 0.0.9
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/README.md +42 -0
- package/dist/AdminLandingTemplate.d.ts.map +1 -1
- package/dist/AdminLandingTemplate.js +1 -1
- package/dist/DashboardTemplate.js +1 -1
- package/dist/HomeTemplate.js +1 -1
- package/dist/LoginTemplate.js +1 -1
- package/dist/ProfileTemplate.js +1 -1
- package/dist/WhatsNewTemplate.js +1 -1
- package/dist/billing/BillingSuccessTemplate.js +1 -1
- package/dist/billing/CheckoutTemplate.js +1 -1
- package/dist/billing/PaymentTemplate.js +1 -1
- package/dist/billing/SubscriptionTemplate.js +1 -1
- package/dist/billing/UserSubscriptionTemplate.js +1 -1
- package/dist/blog/BlogList.d.ts +28 -0
- package/dist/blog/BlogList.d.ts.map +1 -0
- package/dist/blog/BlogList.js +1 -0
- package/dist/blog/BlogPost.d.ts +29 -0
- package/dist/blog/BlogPost.d.ts.map +1 -0
- package/dist/blog/BlogPost.js +1 -0
- package/dist/blog/blog-loader.d.ts +136 -0
- package/dist/blog/blog-loader.d.ts.map +1 -0
- package/dist/blog/blog-loader.js +2 -0
- package/dist/blog/index.d.ts +31 -0
- package/dist/blog/index.d.ts.map +1 -0
- package/dist/blog/index.js +1 -0
- package/dist/components/MarkdownViewer.d.ts.map +1 -1
- package/dist/components/MarkdownViewer.js +1 -1
- package/dist/crud/CarCardListTemplate.d.ts.map +1 -1
- package/dist/crud/CarCardListTemplate.js +1 -1
- package/dist/crud/CarDetailTemplate.js +1 -1
- package/dist/crud/InquiryAdminTemplate.d.ts.map +1 -1
- package/dist/crud/InquiryAdminTemplate.js +1 -1
- package/dist/crud/InquiryFormTemplate.js +1 -1
- package/dist/crud/ProductCardListTemplate.d.ts.map +1 -1
- package/dist/crud/ProductCardListTemplate.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/legal/LegalNoticeTemplate.js +1 -1
- package/dist/legal/PrivacyPolicyTemplate.js +1 -1
- package/dist/legal/TermsOfServiceTemplate.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @donotdev/templates
|
|
2
|
+
|
|
3
|
+
Page templates, blog system, and reusable components for common app patterns.
|
|
4
|
+
|
|
5
|
+
## What's Included
|
|
6
|
+
|
|
7
|
+
- **Page Templates** — Home, Dashboard, Login, Profile, Admin Landing, What's New
|
|
8
|
+
- **Blog System** — Convention-based markdown blog with i18n (`slug_lang.md`), reading time, tags, and auto-generated RSS/sitemap
|
|
9
|
+
- **CRUD Templates** — Entity list/detail page templates
|
|
10
|
+
- **Billing Templates** — Pricing, checkout, subscription management pages
|
|
11
|
+
- **Legal Templates** — Privacy policy, terms of service
|
|
12
|
+
- **MarkdownViewer** — SSR-safe markdown renderer with syntax highlighting, lazy images, and framework Link integration
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
bun install @donotdev/templates
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Blog Quick Start
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { createBlogLoader, BlogList, BlogPostView } from '@donotdev/templates';
|
|
24
|
+
|
|
25
|
+
// In your app's data loader:
|
|
26
|
+
const files = import.meta.glob('../../content/blog/*.md', {
|
|
27
|
+
query: '?raw', import: 'default', eager: true,
|
|
28
|
+
});
|
|
29
|
+
const blog = createBlogLoader(files as Record<string, string>, 'en');
|
|
30
|
+
|
|
31
|
+
// Get posts
|
|
32
|
+
const posts = blog.getAllPosts(); // Sorted by date, newest first
|
|
33
|
+
const post = blog.getPostBySlug('my-post');
|
|
34
|
+
const tags = blog.getAllTags();
|
|
35
|
+
const filtered = blog.getPostsByTag('react');
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
File convention: `src/content/blog/my-post_en.md`, `my-post_fr.md` (falls back to `_en`).
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
This package is part of the DoNotDev Framework.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminLandingTemplate.d.ts","sourceRoot":"","sources":["../src/AdminLandingTemplate.tsx"],"names":[],"mappings":"
|
|
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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
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 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
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};
|
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 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};
|
package/dist/LoginTemplate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
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};
|
package/dist/ProfileTemplate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
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};
|
package/dist/WhatsNewTemplate.js
CHANGED
|
@@ -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
|
|
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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CheckCircle as d,AlertCircle as
|
|
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 +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{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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as
|
|
1
|
+
"use client";import{jsx as i,jsxs as r}from"react/jsx-runtime";import{SubscriptionManager as a}from"@donotdev/billing";import{useTranslation as m}from"@donotdev/core";import{PageContainer as c}from"@donotdev/ui";function b({namespace:e,meta:p,availablePlans:n,allowPlanChange:o=!1,title:l,subtitle:s}){const{t}=m([e,"billing"]);return i(c,{variant:"docs",children:r("div",{children:[r("div",{style:{marginBottom:"2rem"},children:[i("h1",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700,marginBottom:"0.5rem"},children:l||t("billing:subscription.title")}),i("p",{style:{color:"var(--muted-foreground)"},children:s||t("billing:subscription.subtitle")})]}),i(a,{availablePlans:n,allowPlanChange:o})]})})}export{b as UserSubscriptionTemplate};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { BlogPost } from './blog-loader';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the BlogList component.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <BlogList posts={blog.getAllPosts()} />
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export interface BlogListProps {
|
|
12
|
+
/** Array of blog posts to display (newest first) */
|
|
13
|
+
posts: BlogPost[];
|
|
14
|
+
/** Empty state content when no posts exist */
|
|
15
|
+
emptyState?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Blog List Component
|
|
19
|
+
*
|
|
20
|
+
* Renders blog posts with:
|
|
21
|
+
* - Tag filter chips at the top
|
|
22
|
+
* - Featured/latest post displayed larger with optional hero image
|
|
23
|
+
* - Remaining posts in a responsive [1,1,2,3] grid
|
|
24
|
+
*
|
|
25
|
+
* @version 0.0.4
|
|
26
|
+
*/
|
|
27
|
+
export declare function BlogList({ posts, emptyState, }: BlogListProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=BlogList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlogList.d.ts","sourceRoot":"","sources":["../../src/blog/BlogList.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AA+BD;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,UAAU,GACX,EAAE,aAAa,qTAwIf"}
|
|
@@ -0,0 +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};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BlogPost as BlogPostType } from './blog-loader';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the BlogPostView component.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <BlogPostView post={blog.getPostBySlug('my-post')} />
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export interface BlogPostProps {
|
|
11
|
+
/** The blog post to render (null = not found state) */
|
|
12
|
+
post: BlogPostType | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Blog Post View Component
|
|
16
|
+
*
|
|
17
|
+
* Renders a full blog post with:
|
|
18
|
+
* - Hero title
|
|
19
|
+
* - Back navigation
|
|
20
|
+
* - Date + reading time
|
|
21
|
+
* - Tags
|
|
22
|
+
* - Full markdown content via MarkdownViewer
|
|
23
|
+
*
|
|
24
|
+
* Shows a not-found state if post is null.
|
|
25
|
+
*
|
|
26
|
+
* @version 0.0.3
|
|
27
|
+
*/
|
|
28
|
+
export declare function BlogPostView({ post, }: BlogPostProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=BlogPost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlogPost.d.ts","sourceRoot":"","sources":["../../src/blog/BlogPost.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,GACL,EAAE,aAAa,2CA8Df"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as t,jsxs as i,Fragment as c}from"react/jsx-runtime";import{ArrowLeft as r}from"lucide-react";import{Button as o,HeroSection as g,Section as l,Text as n}from"@donotdev/components";import{useTranslation as s}from"@donotdev/core";import{Link as m}from"@donotdev/ui";import{MarkdownViewer as h}from"../components/MarkdownViewer";function j({post:e}){const{t:a}=s("blog");if(!e)return i(l,{children:[t(n,{as:"p",variant:"muted",align:"center",children:a("notFound")}),t(m,{path:"/blog",children:t(o,{variant:"ghost",icon:r,children:a("backToBlog")})})]});const d=[e.meta.date?`${a("publishedOn")} ${e.meta.date}`:null,`${e.readingTime} ${a("minuteRead")}`].filter(Boolean).join(" \xB7 ");return i(c,{children:[t(g,{title:e.meta.title}),i(l,{children:[t(m,{path:"/blog",children:t(o,{variant:"ghost",icon:r,children:a("backToBlog")})}),t(n,{as:"p",level:"small",variant:"muted",children:d}),e.tags.length>0&&t(n,{as:"p",level:"caption",variant:"muted",children:e.tags.join(" \xB7 ")}),e.meta.image&&t("img",{src:e.meta.image,alt:e.meta.title,loading:"eager",decoding:"async",style:{width:"100%",maxHeight:"480px",objectFit:"cover",borderRadius:"var(--radius-md)",marginTop:"var(--gap-md)",marginBottom:"var(--gap-md)"}}),t(h,{content:e.content})]})]})}export{j as BlogPostView};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Blog data loader utilities
|
|
3
|
+
* @description Processes import.meta.glob results into typed blog post data with i18n,
|
|
4
|
+
* reading time estimation, and tag filtering.
|
|
5
|
+
* RSS and sitemap are auto-generated at build time by the SEO pipeline (SEOGenerator).
|
|
6
|
+
*
|
|
7
|
+
* ## Convention
|
|
8
|
+
* Files are named `slug_lang.md` (e.g. `my-post_en.md`, `my-post_fr.md`).
|
|
9
|
+
* The slug is everything before the last `_lang` suffix.
|
|
10
|
+
* Frontmatter is parsed from `---` delimited YAML-like block.
|
|
11
|
+
*
|
|
12
|
+
* ## Supported frontmatter fields
|
|
13
|
+
* ```yaml
|
|
14
|
+
* ---
|
|
15
|
+
* title: My Post Title
|
|
16
|
+
* description: A short summary for listings and SEO
|
|
17
|
+
* date: 2025-06-01
|
|
18
|
+
* tags: typescript, react, tutorial
|
|
19
|
+
* image: /assets/blog/my-post-hero.png
|
|
20
|
+
* ---
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* ## i18n fallback
|
|
24
|
+
* If no file exists for the requested language, falls back to `_en`.
|
|
25
|
+
*
|
|
26
|
+
* @version 0.0.2
|
|
27
|
+
* @since 0.0.1
|
|
28
|
+
* @author AMBROISE PARK Consulting
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Metadata parsed from markdown frontmatter.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```yaml
|
|
35
|
+
* ---
|
|
36
|
+
* title: Getting Started
|
|
37
|
+
* description: Learn DoNotDev in 5 minutes
|
|
38
|
+
* date: 2025-06-01
|
|
39
|
+
* tags: tutorial, getting-started
|
|
40
|
+
* image: /assets/blog/hero.png
|
|
41
|
+
* ---
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export interface BlogMeta {
|
|
45
|
+
/** Post title */
|
|
46
|
+
title: string;
|
|
47
|
+
/** Short description for listings and SEO meta tags */
|
|
48
|
+
description: string;
|
|
49
|
+
/** Publication date in YYYY-MM-DD format */
|
|
50
|
+
date: string;
|
|
51
|
+
/** Comma-separated tags (parsed into string[] on BlogPost) */
|
|
52
|
+
tags?: string;
|
|
53
|
+
/** Optional hero/og image path (relative to public/) */
|
|
54
|
+
image?: string;
|
|
55
|
+
/** Additional custom frontmatter fields */
|
|
56
|
+
[key: string]: string | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A resolved blog post with computed fields.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const post = blog.getPostBySlug('my-post');
|
|
64
|
+
* console.log(post.readingTime); // 4
|
|
65
|
+
* console.log(post.tags); // ['typescript', 'react']
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export interface BlogPost {
|
|
69
|
+
/** URL-safe slug derived from filename (e.g. "my-post") */
|
|
70
|
+
slug: string;
|
|
71
|
+
/** Parsed frontmatter metadata */
|
|
72
|
+
meta: BlogMeta;
|
|
73
|
+
/** Markdown content (without frontmatter) */
|
|
74
|
+
content: string;
|
|
75
|
+
/** Estimated reading time in minutes */
|
|
76
|
+
readingTime: number;
|
|
77
|
+
/** Parsed tags array (from comma-separated frontmatter) */
|
|
78
|
+
tags: string[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Result of {@link createBlogLoader}.
|
|
82
|
+
* Provides methods to query blog posts.
|
|
83
|
+
*/
|
|
84
|
+
export interface BlogLoader {
|
|
85
|
+
/** Get all posts sorted by date (newest first) */
|
|
86
|
+
getAllPosts: () => BlogPost[];
|
|
87
|
+
/** Get a single post by slug, or null if not found */
|
|
88
|
+
getPostBySlug: (slug: string) => BlogPost | null;
|
|
89
|
+
/** Get all unique tags across all posts */
|
|
90
|
+
getAllTags: () => string[];
|
|
91
|
+
/** Get posts filtered by tag */
|
|
92
|
+
getPostsByTag: (tag: string) => BlogPost[];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Parse frontmatter from raw markdown string.
|
|
96
|
+
* Expects `---\nkey: value\n---\ncontent` format.
|
|
97
|
+
*
|
|
98
|
+
* @param raw - Raw markdown file content including frontmatter
|
|
99
|
+
* @returns Parsed metadata and content body
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const { meta, content } = parseFrontmatter(rawMarkdown);
|
|
104
|
+
* console.log(meta.title); // "My Post"
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
export declare function parseFrontmatter(raw: string): {
|
|
108
|
+
meta: BlogMeta;
|
|
109
|
+
content: string;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Create a blog loader from import.meta.glob results.
|
|
113
|
+
*
|
|
114
|
+
* The glob call **must** live in app code (Vite resolves paths relative to the calling file).
|
|
115
|
+
* Pass the result to this function for processing.
|
|
116
|
+
*
|
|
117
|
+
* @param globResult - Result of `import.meta.glob('./*.md', { query: '?raw', import: 'default', eager: true })`
|
|
118
|
+
* @param currentLang - Current language code (e.g. 'en', 'fr'). Falls back to 'en' if missing.
|
|
119
|
+
* @returns Blog loader with getAllPosts(), getPostBySlug(), getAllTags(), getPostsByTag()
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* // In your app's data/blog/index.ts:
|
|
124
|
+
* const files = import.meta.glob('../../content/blog/*.md', {
|
|
125
|
+
* query: '?raw', import: 'default', eager: true,
|
|
126
|
+
* });
|
|
127
|
+
* const blog = createBlogLoader(files as Record<string, string>, 'en');
|
|
128
|
+
*
|
|
129
|
+
* const posts = blog.getAllPosts(); // All posts, newest first
|
|
130
|
+
* const post = blog.getPostBySlug('my-post'); // Single post
|
|
131
|
+
* const tags = blog.getAllTags(); // ['react', 'typescript', ...]
|
|
132
|
+
* const filtered = blog.getPostsByTag('react'); // Posts tagged 'react'
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export declare function createBlogLoader(globResult: Record<string, string>, currentLang: string): BlogLoader;
|
|
136
|
+
//# sourceMappingURL=blog-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-loader.d.ts","sourceRoot":"","sources":["../../src/blog/blog-loader.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,QAAQ;IACvB,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,QAAQ;IACvB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,WAAW,EAAE,MAAM,QAAQ,EAAE,CAAC;IAC9B,sDAAsD;IACtD,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,GAAG,IAAI,CAAC;IACjD,2CAA2C;IAC3C,UAAU,EAAE,MAAM,MAAM,EAAE,CAAC;IAC3B,gCAAgC;IAChC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,QAAQ,EAAE,CAAC;CAC5C;AA4BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAoBA;AA6BD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,WAAW,EAAE,MAAM,GAClB,UAAU,CAsDZ"}
|
|
@@ -0,0 +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};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Blog utilities and components
|
|
3
|
+
* @description Convention-based blog system using markdown files with frontmatter.
|
|
4
|
+
*
|
|
5
|
+
* ## Features
|
|
6
|
+
* - i18n with `slug_lang.md` convention and `_en` fallback
|
|
7
|
+
* - Reading time estimation
|
|
8
|
+
* - Tag-based filtering
|
|
9
|
+
* - Lazy image loading via MarkdownViewer
|
|
10
|
+
* - RSS 2.0 + sitemap auto-generated at build time by SEOGenerator
|
|
11
|
+
*
|
|
12
|
+
* ## File Convention
|
|
13
|
+
* `src/content/blog/slug_lang.md` (e.g. `my-post_en.md`, `my-post_fr.md`)
|
|
14
|
+
*
|
|
15
|
+
* ## Exports
|
|
16
|
+
* - `createBlogLoader` — Core loader function
|
|
17
|
+
* - `parseFrontmatter` — Frontmatter parser
|
|
18
|
+
* - `BlogList` — Post listing component
|
|
19
|
+
* - `BlogPostView` — Single post component
|
|
20
|
+
* - Types: `BlogPost`, `BlogMeta`, `BlogLoader`
|
|
21
|
+
*
|
|
22
|
+
* @see {@link https://donotdev.com/blog | DoNotDev Blog} for a live example
|
|
23
|
+
*
|
|
24
|
+
* @version 0.0.3
|
|
25
|
+
* @since 0.0.1
|
|
26
|
+
* @author AMBROISE PARK Consulting
|
|
27
|
+
*/
|
|
28
|
+
export * from './blog-loader';
|
|
29
|
+
export * from './BlogList';
|
|
30
|
+
export * from './BlogPost';
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blog/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./blog-loader";export*from"./BlogList";export*from"./BlogPost";
|
|
@@ -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":"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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
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 +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;
|
|
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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
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 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useState as Y,useEffect as ft,useMemo as y,useCallback as gt}from"react";import{Share2 as pt,Heart as mt}from"lucide-react";import{Grid as B,Card as z,Stack as h,Text as s,Section as N,Button as k,ImageGallery as vt,Spinner as St}from"@donotdev/components";import{PageContainer as L,Link as bt,useRouteParam as xt,useNavigate as yt}from"@donotdev/ui";import{useTranslation as M}from"@donotdev/core";import{useCrud as Ct,useCrudCardList as wt,formatValue as D,useRelatedItems as It,useEntityFavorites as Ut}from"@donotdev/crud";import{InquiryFormTemplate as kt}from"./InquiryFormTemplate";function Dt({entity:i,id:Z,customerEntity:R,inquiryEntity:T,relatedFields:F=["make","price"],locale:tt,makeField:p="make",modelField:m="model",variantField:W="variant",yearField:f="year",mileageField:v="mileage",fuelTypeField:C="fuelType",transmissionField:w="transmission",priceField:u="price",imagesField:$="images",descriptionField:A,contextField:et="carId",pageNamespace:rt}){const nt=xt("id"),S=Z||nt||"",it=yt(),ot=i.namespace||`entity-${i.name.toLowerCase()}`,{t:a,i18n:at}=M([ot,"crud"]),ct=rt||i.collection,{t:o}=M(ct),{t:Vt}=M("crud"),V=tt||at?.language?.replace("_","-")||"en-US",{get:_}=Ct(i,{backend:"functions"}),[r,lt]=Y(null),[q,I]=Y("pending"),{data:st}=wt(i,{staleTime:1e3*60*30}),{isFavorite:ut,toggleFavorite:dt}=Ut({collection:i.collection}),G=ut(S),U=y(()=>i.fields[u],[i.fields,u]),j=gt(t=>t==null?"\u2014":new Intl.NumberFormat(V).format(t)+" km",[V]),H=y(()=>{if(A)return A;const t=`description_${V}`;return i.fields[t]?t:i.fields.description?"description":null},[A,V,i.fields]),E=y(()=>{const t=r?.[$];return t?Array.isArray(t)?t.map(n=>typeof n=="object"&&n&&"fullUrl"in n?{fullUrl:n.fullUrl,thumbUrl:n.thumbUrl}:{fullUrl:n,thumbUrl:n}):[{fullUrl:t,thumbUrl:t}]:[]},[r,$]),g=y(()=>{if(!r)return"";const t=r[p]||"",n=r[m]||"",c=r[W]||"";return[t,n,c].filter(Boolean).join(" ")},[r,p,m,W]),J=y(()=>{if(!r)return[];const t=[],n=r[f];n!=null&&t.push({label:a(f),value:String(n)});const c=r[v];c!=null&&t.push({label:a(v),value:j(c)});const b=r[C];if(b&&i.fields[C]){const d=D(b,i.fields[C],a,{compact:!0});t.push({label:a(C),value:typeof d=="string"?d:String(b)})}const x=r[w];if(x&&i.fields[w]){const d=D(x,i.fields[w],a,{compact:!0});t.push({label:a(w),value:typeof d=="string"?d:String(x)})}return t},[r,f,v,C,w,i.fields,a,j]),{items:K}=It(i,r,st?.items||[],F,{limit:3,tolerance:.3}),O=y(()=>{if(!r)return g;const t=[];if(r[p]&&t.push(String(r[p])),r[m]&&t.push(String(r[m])),r[f]&&t.push(String(r[f])),r[v]&&t.push(j(r[v])),r[u]&&U){const n=r[u],c=D(n,U,a,{asString:!0});t.push(typeof c=="string"?c:String(r[u]))}return t.length>0?t.join(" \u2022 "):g},[r,p,m,f,v,u,U,j,a,g]);ft(()=>{if(!S){I("error");return}I("pending"),_(S).then(t=>{t?(lt(t),I("success")):I("error")}).catch(()=>{I("error")})},[S,_]);const ht=async()=>{navigator.share?await navigator.share({title:g,url:window.location.href}):await navigator.clipboard.writeText(window.location.href)},Q=H&&r?r[H]:null;return q==="pending"?e(L,{children:e(St,{overlay:!0})}):q==="error"||!r?e(L,{children:l(h,{direction:"column",gap:"large",style:{padding:"var(--gap-xl) 0",textAlign:"center"},children:[e(s,{level:"h2",children:o("notFound","Vehicle not found")}),e(bt,{path:"/",children:e(k,{variant:"primary",children:o("backToHome","Back to home")})})]})}):l(L,{children:[e(N,{children:l(B,{cols:[1,1,2,2],gap:"large",children:[e("div",{children:E.length>0?e(vt,{images:E,altPrefix:g}):e("div",{style:{width:"100%",aspectRatio:"16/9",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--muted)",borderRadius:"var(--radius-lg)"},children:e(s,{variant:"muted",children:o("noImages","No images")})})}),l(h,{direction:"column",gap:"large",children:[l(h,{direction:"column",gap:"tight",children:[e(h,{direction:"row",gap:"tight",align:"center",children:e(s,{level:"h1",style:{margin:0},children:g})}),e("div",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,color:"var(--accent)"},children:(()=>{const t=r[u];if(t==null||!U)return null;const n=D(t,U,a,{});return typeof n=="string"?e(s,{variant:"accent",weight:"bold",style:{fontSize:"var(--font-size-3xl)"},children:n}):n})()})]}),J.length>0&&e(z,{variant:"glass",children:e(B,{cols:2,children:J.map(({label:t,value:n})=>l(h,{direction:"column",gap:"tight",children:[e(s,{variant:"muted",style:{fontSize:"var(--font-size-sm)"},children:t}),e(s,{style:{fontWeight:500},children:n})]},t))})}),l(h,{direction:"row",children:[R&&T?e(k,{variant:"primary",style:{flex:1},onClick:()=>{const t=document.getElementById("inquiry-form");t&&t.scrollIntoView({behavior:"smooth",block:"start"})},children:o("contactUs","Contact us")}):e(k,{variant:"primary",style:{flex:1},disabled:!0,children:o("contactUs","Contact us")}),e(k,{variant:"outline",icon:e(pt,{size:18}),onClick:ht,children:o("share","Share")}),e(k,{variant:G?"primary":"outline",icon:e(mt,{size:18}),onClick:()=>dt(S),children:G?o("saved","Saved"):o("save","Save")})]})]})]})}),Q&&e(N,{title:o("description","Description"),children:e(z,{variant:"glass",children:e(s,{style:{whiteSpace:"pre-wrap",lineHeight:1.7},children:Q})})}),R&&T&&e(N,{id:"inquiry-form",title:o("interested","Interested?"),children:e(z,{variant:"glass",title:o("getInTouch","Get in touch"),children:e(kt,{customerEntity:R,inquiryEntity:T,contextId:S,contextName:g,contextDetails:O,messagePlaceholder:O,contextField:et})})}),K.length>0&&e(N,{title:o("similarVehicles","Similar Vehicles"),children:e(B,{cols:[1,2,3,3],children:K.map(t=>{const n=t[$],c=n?typeof n=="string"?n:Array.isArray(n)?n[0]?.thumbUrl||n[0]?.fullUrl||n[0]:null:null,b=t[p]||"",x=t[m]||"";return e(z,{clickable:!0,onClick:()=>it(`/${i.collection}/${t.id}`),elevated:!0,children:l(h,{direction:"column",children:[c&&e("div",{style:{width:"100%",aspectRatio:"16/9",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"var(--muted)"},children:e("img",{src:c,alt:`${b} ${x}`,style:{width:"100%",height:"100%",objectFit:"cover"}})}),l(h,{direction:"column",gap:"tight",children:[l(s,{level:"h4",style:{margin:0},children:[b," ",x]}),e(s,{variant:"muted",children:t[f]}),(()=>{const d=t[u],X=i.fields[u];if(d==null||!X)return null;const P=D(d,X,a,{compact:!0});return typeof P=="string"?e(s,{style:{fontWeight:700,color:"var(--accent)"},children:P}):e("div",{style:{fontWeight:700,color:"var(--accent)"},children:P})})()]})]})},t.id)})})})]})}var Bt=Dt;export{Dt as CarDetailTemplate,Bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InquiryAdminTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/InquiryAdminTemplate.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAe1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"InquiryAdminTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/InquiryAdminTemplate.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAe1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAS7C,UAAU,yBAAyB;IACjC,yDAAyD;IACzD,cAAc,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,aAAa,EACb,gBAA+B,EAC/B,WAAmB,EACnB,WAAmB,EACnB,IAAI,EACJ,YAAY,EACZ,KAAK,GACN,EAAE,yBAAyB,GAAG,YAAY,CAqS1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as o,Fragment as Y}from"react/jsx-runtime";import{useMemo as D,useCallback as H}from"react";import{Mail as J,Phone as K,User as Q,CheckCircle2 as P,Clock as X}from"lucide-react";import{Button as k,Card as V,Section as M,Stack as i,Text as c,Badge as Z,Grid as q,Spinner as ee}from"@donotdev/components";import{useTranslation as S,formatDate as te}from"@donotdev/core";import{Link as b}from"@donotdev/ui";import{useCrud as ae,useCrudList as L,translateLabel as ne}from"@donotdev/crud";function me({customerEntity:R,inquiryEntity:m,customerBasePath:T="/customers",collapsible:z=!1,defaultOpen:B=!1,open:W,onOpenChange:_,title:y}){const{t:f}=S(`entity-${m.name.toLowerCase()}`),{t:r}=S("crud"),F=y||f("name"),{items:p,loading:O,refresh:se}=L(m,{backend:"functions"}),{items:N}=L(R,{backend:"functions"}),U=D(()=>{const e=new Map;return N?.forEach(n=>{n.id&&e.set(n.id,n)}),e},[N]),{update:I}=ae(m,{backend:"functions"}),E=H(async e=>{await I(e,{status:"available"})},[I]),w=D(()=>p?[...p].filter(e=>(typeof e.status=="string"?e.status:"draft")==="draft").sort((e,n)=>{const a=(typeof e.createdAt=="string"?e.createdAt:typeof e.date=="string"?e.date:"")||"";return((typeof n.createdAt=="string"?n.createdAt:typeof n.date=="string"?n.date:"")||"").localeCompare(a)}):[],[p]);if(O)return t(M,{title:f("name"),children:t(ee,{})});const $=t(Y,{children:w.length===0?t(c,{variant:"muted",children:r("noInquiries",{defaultValue:"No inquiries found."})}):t(q,{cols:[1,1,2,2],
|
|
1
|
+
"use client";import{jsx as t,jsxs as o,Fragment as Y}from"react/jsx-runtime";import{useMemo as D,useCallback as H}from"react";import{Mail as J,Phone as K,User as Q,CheckCircle2 as P,Clock as X}from"lucide-react";import{Button as k,Card as V,Section as M,Stack as i,Text as c,Badge as Z,Grid as q,Spinner as ee}from"@donotdev/components";import{useTranslation as S,formatDate as te}from"@donotdev/core";import{Link as b}from"@donotdev/ui";import{useCrud as ae,useCrudList as L,translateLabel as ne}from"@donotdev/crud";function me({customerEntity:R,inquiryEntity:m,customerBasePath:T="/customers",collapsible:z=!1,defaultOpen:B=!1,open:W,onOpenChange:_,title:y}){const{t:f}=S(`entity-${m.name.toLowerCase()}`),{t:r}=S("crud"),F=y||f("name"),{items:p,loading:O,refresh:se}=L(m,{backend:"functions"}),{items:N}=L(R,{backend:"functions"}),U=D(()=>{const e=new Map;return N?.forEach(n=>{n.id&&e.set(n.id,n)}),e},[N]),{update:I}=ae(m,{backend:"functions"}),E=H(async e=>{await I(e,{status:"available"})},[I]),w=D(()=>p?[...p].filter(e=>(typeof e.status=="string"?e.status:"draft")==="draft").sort((e,n)=>{const a=(typeof e.createdAt=="string"?e.createdAt:typeof e.date=="string"?e.date:"")||"";return((typeof n.createdAt=="string"?n.createdAt:typeof n.date=="string"?n.date:"")||"").localeCompare(a)}):[],[p]);if(O)return t(M,{title:f("name"),children:t(ee,{})});const $=t(Y,{children:w.length===0?t(c,{variant:"muted",children:r("noInquiries",{defaultValue:"No inquiries found."})}):t(q,{cols:[1,1,2,2],children:w.map(e=>{const n=typeof e.customerId=="string"?e.customerId:void 0,a=n?U.get(n):void 0,h=typeof e.status=="string"?e.status:"draft",g=h==="available",d=typeof a?.email=="string"?a.email:void 0,u=typeof a?.phone=="string"?a.phone:void 0,G=a&&(a.firstName||a.lastName)?[a.firstName,a.lastName].filter(Boolean).join(" "):void 0,j=typeof e.message=="string"&&e.message?e.message.length>150?`${e.message.substring(0,150)}...`:e.message:"",x=typeof e.date=="string"?e.date:typeof e.createdAt=="string"?e.createdAt:void 0,A=o(i,{children:[o(i,{direction:"row",gap:"tight",align:"center",justify:"between",children:[t(Z,{variant:g?"secondary":"outline",children:o(i,{direction:"row",gap:"tight",align:"center",children:[g?t(P,{size:12}):t(X,{size:12}),ne(`status.${h}`,f)]})}),x&&t(c,{variant:"muted",level:"small",children:te(x)})]}),a?o(i,{gap:"tight",children:[o(i,{direction:"row",gap:"tight",align:"center",children:[t(Q,{size:14}),t(c,{weight:"medium",level:"small",children:G||r("customer",{defaultValue:"Customer"})})]}),d&&t(c,{level:"small",variant:"muted",children:d}),u&&t(c,{level:"small",variant:"muted",children:u})]}):t(c,{variant:"muted",level:"small",children:r("noCustomer",{defaultValue:"No customer linked"})}),j&&t(c,{level:"small",children:j}),o(i,{gap:"tight",children:[(d||u)&&o(i,{direction:"row",gap:"tight",children:[d&&t(k,{variant:"outline",icon:J,fullWidth:!0,className:"dndev-flex-1",render:({children:s,className:l,...v})=>t(b,{path:`mailto:${d}${typeof e.carId=="string"&&e.carId?`?subject=${encodeURIComponent(r("actions.replySubject",{defaultValue:"Re: Your inquiry"}))}`:""}`,className:l,onClick:C=>C.stopPropagation(),...v,children:s}),children:r("actions.email",{defaultValue:"Email"})}),u&&t(k,{variant:"outline",icon:K,fullWidth:!0,className:"dndev-flex-1",render:({children:s,className:l,...v})=>t(b,{path:`tel:${u}`,className:l,onClick:C=>C.stopPropagation(),...v,children:s}),children:r("actions.call",{defaultValue:"Call"})})]}),!g&&t(k,{variant:"outline",icon:P,fullWidth:!0,onClick:s=>{s.preventDefault(),s.stopPropagation(),E(e.id)},children:r("actions.markResponded",{defaultValue:"Mark responded"})})]})]});return a?.id?t(b,{path:`${T}/${a.id}`,className:"dndev-block dndev-h-full",onClick:s=>{const l=s.target;(l.closest("button")||l.closest('a[href^="mailto:"]')||l.closest('a[href^="tel:"]'))&&(s.preventDefault(),s.stopPropagation())},children:t(V,{clickable:!0,children:A})},e.id):t(V,{children:A},e.id)})})});return z?t(M,{title:F,collapsible:!0,defaultOpen:B,open:W,onOpenChange:_,children:$}):$}export{me as InquiryAdminTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e,jsxs as S,Fragment as G}from"react/jsx-runtime";import{useState as k}from"react";import{Stack as w,Button as R,Card as W,Alert as H,Text as x}from"@donotdev/components";import{useCrud as j,useEntityForm as V,FormFieldRenderer as l}from"@donotdev/crud";import{useTranslation as $}from"@donotdev/core";function J({customerEntity:o,inquiryEntity:u,contextId:q,contextName:y,contextDetails:b,messagePlaceholder:D,contextField:C="carId",customerFields:f=["firstName","lastName","email","phone"],messageField:c="message",consentField:m="gdprConsent",onSuccess:_,onError:A}){const{add:L}=j(o,{backend:"functions"}),{add:O}=j(u,{backend:"functions"}),d=$(`entity-${o.name.toLowerCase()}`),s=$(`entity-${u.name.toLowerCase()}`),I=b?s.t("message.placeholder.withDetails",`Inquiry about: ${b}`,{details:b}):y?s.t("message.placeholder.context",`Inquiry about: ${y}`,{name:y}):"",g=V(u,{operation:"create",defaultValues:{[C]:q||void 0,date:new Date().toISOString(),status:"draft",[c]:I}}),p=u.fields[c],M=D||p?.options?.placeholder,t=V(o,{operation:"create",defaultValues:{type:"Prospect",status:"draft",[m]:!1}}),[h,v]=k("idle"),[N,T]=k(""),P=async a=>{v("loading"),T("");try{const n=await L(a),r=g.getValues(c),z=(typeof r=="string"?r.trim():"")||I||s.t("message.default","General inquiry"),B={customerId:n,[C]:q||void 0,[c]:z,date:new Date().toISOString(),status:"draft"};await O(B),v("success"),t.reset(),g.reset(),_?.()}catch(n){v("error");const r=n instanceof Error?n:new Error(String(n));T(r.message),A?.(r)}};return h==="success"?e(W,{variant:"glass",children:S(w,{direction:"column",style:{textAlign:"center",padding:"var(--gap-lg)"},children:[e("div",{style:{fontSize:"2rem",color:"var(--success)"},children:"\u2713"}),e(x,{level:"h3",children:s.t("success.title","Thank you for your inquiry!")}),e(x,{variant:"muted",children:s.t("success.message","We'll get back to you as soon as possible.")})]})}):e("form",{onSubmit:a=>{a.preventDefault(),t.handleSubmit(P)(a)},children:S(w,{direction:"column",children:[h==="error"&&N&&e(H,{variant:"error",description:N}),(()=>{const a=o.fields.firstName,n=o.fields.lastName;return f.includes("firstName")&&f.includes("lastName")&&a&&n?S(G,{children:[S(w,{direction:"row",children:[e("div",{style:{flex:1},children:e(l,{name:"firstName",config:a,control:t.control,errors:t.formState.errors,t:d.t})}),e("div",{style:{flex:1},children:e(l,{name:"lastName",config:n,control:t.control,errors:t.formState.errors,t:d.t})})]}),f.filter(r=>r!=="firstName"&&r!=="lastName").map(r=>{const i=o.fields[r];return i?e(l,{name:r,config:i,control:t.control,errors:t.formState.errors,t:d.t},r):null})]}):f.map(r=>{const i=o.fields[r];return i?e(l,{name:r,config:i,control:t.control,errors:t.formState.errors,t:d.t},r):null})})(),p&&e(l,{name:c,config:{...p,options:{...p.options,...M&&{placeholder:M}}},control:g.control,errors:g.formState.errors,t:s.t}),o.fields[m]&&e(l,{name:m,config:o.fields[m],control:t.control,errors:t.formState.errors,t:d.t}),e(R,{type:"submit",variant:"primary",disabled:h==="loading"||t.formState.isSubmitting,style:{width:"100%"},children:h==="loading"?s.t("submit.sending","Sending..."):s.t("submit","Send Inquiry")})]})})}var Z=J;export{J as InquiryFormTemplate,Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCardListTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/ProductCardListTemplate.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductCardListTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/ProductCardListTemplate.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAa1D,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,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,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sGAAsG;IACtG,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAiCD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,IAAmB,EACnB,SAA0B,EAC1B,MAAM,EACN,WAAmB,EACnB,WAAW,EACX,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,MAAM,EACN,gBAAwB,EACxB,WAAmB,GACpB,EAAE,4BAA4B,2CA6e9B;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as l,jsxs as i,Fragment as ge}from"react/jsx-runtime";import{useMemo as d,useCallback as G}from"react";import{Heart as U}from"lucide-react";import{Grid as me,Card as ve,Stack as x,Text as w,Section as H,Badge as he,Button as be}from"@donotdev/components";import{useTranslation as xe}from"@donotdev/core";import{useNavigate as we}from"@donotdev/ui";import{translateFieldLabel as W,useCrudCardList as Fe,EntityFilters as Ce,matchesFilter as ke,useEntityFavorites as ye,formatValue as Y,useCrudFilters as q}from"@donotdev/crud";const Ve={available:"success",active:"success",in_stock:"success",new:"success",pending:"warning",reserved:"warning",low_stock:"warning",sold:"destructive",unavailable:"destructive",out_of_stock:"destructive",inactive:"secondary",draft:"outline"};function je(e){const F=String(e).toLowerCase().replace(/[\s-]/g,"_");return Ve[F]||"secondary"}function Se({entity:e,title:F,description:J,basePath:K,onClick:C,cols:Q=[1,2,3,4],staleTime:X=1e3*60*30,filter:k,hideFilters:Z=!1,titleFields:g,subtitleField:_,priceField:y,specsFields:m,badgeField:V,locale:ee,imageAspectRatio:re="4/3",hideSection:te=!1}){const B=we(),A=K??`/${e.collection}`,{t:a,i18n:le}=xe([e.namespace,"crud"]),Te=ee||le?.language?.replace("_","-")||"en-US",c=d(()=>y||(Object.keys(e.fields).find(r=>e.fields[r]?.type==="price")??void 0),[y,e.fields]),u=d(()=>{if(V)return V;const r=["status","state","condition","availability"];return Object.keys(e.fields).find(t=>r.includes(t.toLowerCase())&&(e.fields[t]?.type==="select"||e.fields[t]?.type==="text"))},[V,e.fields]),ae=d(()=>{if(g&&g.length>0)return g;const r=Object.keys(e.fields).find(t=>e.fields[t]?.type==="text");return r?[r]:[]},[g,e.fields]),N=d(()=>m&&m.length>0?m:Object.keys(e.fields).filter(r=>{if(r===c||r===u)return!1;const t=e.fields[r]?.type;return t==="number"||t==="select"}).slice(0,3),[m,e.fields,c,u]),{data:se,loading:oe}=Fe(e,{staleTime:X}),j=se?.items||[],{isFavorite:ie,toggleFavorite:ne,favoritesFilter:$}=ye({collection:e.collection}),{showFavoritesOnly:f,setShowFavoritesOnly:ce}=q({collection:e.collection}),{filters:S}=q({collection:e.collection}),I=G(r=>Object.keys(S).length===0?!0:Object.entries(S).every(([t,n])=>{const o=r[t],h=e.fields[t]?.type||"text";return ke(o,n,h)}),[S,e.fields]),p=d(()=>{let r=j;return r=r.filter(I),f&&(r=r.filter($)),k&&(r=r.filter(k)),r},[j,I,f,$,k]),D=d(()=>{const t=(e.listCardFields??e.listFields??[]).find(n=>{const o=e.fields[n];return o?.type==="image"||o?.type==="images"});return t||Object.keys(e.fields).find(n=>{const o=e.fields[n];return o?.type==="image"||o?.type==="images"})},[e.listCardFields,e.listFields,e.fields]),de=G(r=>{C?C(r):B(`${A}/${r}`)},[A,B,C]),T=F||a("name",{defaultValue:e.name}),v=J||a("description",{defaultValue:""}),E=a("name",{defaultValue:e.name});return i(ge,{children:[l("style",{children:`
|
|
2
2
|
.product-card {
|
|
3
3
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
4
4
|
}
|
|
@@ -37,4 +37,4 @@
|
|
|
37
37
|
font-size: var(--font-size-sm);
|
|
38
38
|
color: var(--muted-foreground);
|
|
39
39
|
}
|
|
40
|
-
`}),(
|
|
40
|
+
`}),(T||v)&&i("header",{style:{marginBottom:"var(--gap-lg)"},children:[T&&l("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,margin:0,marginBottom:v?"var(--gap-sm)":0},children:T}),v&&l("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:v})]}),!Z&&l(H,{title:a("crud:filters.title",{entity:E,defaultValue:`Browse ${E} - Filters`}),collapsible:!0,defaultOpen:!0,children:i(x,{direction:"column",children:[l(be,{variant:f?"primary":"outline",icon:l(U,{size:18}),onClick:()=>ce(!f),children:f?a("crud:favorites.showAll",{defaultValue:"Show All"}):a("crud:favorites.showFavorites",{defaultValue:"Show Favorites"})}),l(Ce,{entity:e,data:j,fieldsToFilter:e.listCardFields})]})}),(()=>{const r=p.length===0?i(x,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[l(w,{level:"h3",style:{color:"var(--muted-foreground)"},children:a("crud:emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),l(w,{style:{color:"var(--muted-foreground)"},children:a("crud:emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):l(me,{cols:Q,children:p.map(t=>{const n=D?t[D]:null,o=typeof n=="string"&&n.length>0?n:null,h=ae.map(s=>t[s]).filter(Boolean).join(" ")||t.id,P=_?t[_]:null,R=c?t[c]:null,M=c?e.fields[c]:null,z=u?t[u]:null,O=ie(t.id);return i(ve,{clickable:!0,onClick:()=>de(t.id),elevated:!0,className:"product-card",children:[l("div",{onClick:s=>{s.stopPropagation(),ne(t.id)},style:{position:"absolute",top:"var(--gap-sm)",left:"var(--gap-sm)",zIndex:10,cursor:"pointer",padding:"var(--gap-xs)",borderRadius:"var(--radius-full)",backgroundColor:"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s"},onMouseEnter:s=>{s.currentTarget.style.backgroundColor="rgba(255, 255, 255, 1)"},onMouseLeave:s=>{s.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.9)"},"aria-label":O?a("crud:favorites.remove",{defaultValue:"Remove from favorites"}):a("crud:favorites.add",{defaultValue:"Add to favorites"}),children:l(U,{size:20,fill:O?"#ef4444":"#ffffff",stroke:O?"#ef4444":"#ffffff",style:{transition:"fill 0.2s, stroke 0.2s"}})}),i(x,{direction:"column",children:[o&&i("div",{className:"product-card-image",style:{position:"relative",width:"100%",aspectRatio:re},children:[l("img",{src:o,alt:h,style:{width:"100%",height:"100%",objectFit:"cover"}}),z&&l("div",{style:{position:"absolute",top:"var(--gap-sm)",insetInlineEnd:"var(--gap-sm)"},children:l(he,{variant:je(z),children:W(String(z),e.fields[u],a)})})]}),i(x,{direction:"column",gap:"tight",children:[i("div",{children:[l(w,{level:"h4",style:{margin:0},children:h}),P&&l(w,{level:"small",variant:"muted",style:{marginTop:"var(--gap-xs)"},children:P})]}),R!=null&&M&&l("div",{className:"product-price",children:(()=>{const s=Y(R,M,a,{compact:!0});return s})()}),N.length>0&&l("div",{className:"product-specs",children:N.map(s=>{const b=t[s];if(b==null)return null;const L=e.fields[s],fe=W(s,L,a),pe=L?Y(b,L,a,{compact:!0}):b;return i("span",{className:"product-spec-pill",children:[fe,": ",pe]},s)})})]})]})]},t.id)})});return te?r:l(H,{title:oe?a("crud:results.title.fetching",{defaultValue:"Fetching..."}):a("crud:results.title.count",{count:p.length,defaultValue:p.length===1?"Found 1 item":`Found ${p.length} items`}),collapsible:!0,defaultOpen:!0,children:r})})()]})}var $e=Se;export{Se as ProductCardListTemplate,$e as default};
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";export*from"./HomeTemplate";export*from"./WhatsNewTemplate";export*from"./DashboardTemplate";export*from"./LoginTemplate";export*from"./AdminLandingTemplate";export*from"./ProfileTemplate";export*from"./billing";export*from"./crud";export*from"./legal";export*from"./components/MarkdownViewer";
|
|
1
|
+
"use client";export*from"./HomeTemplate";export*from"./WhatsNewTemplate";export*from"./DashboardTemplate";export*from"./LoginTemplate";export*from"./AdminLandingTemplate";export*from"./ProfileTemplate";export*from"./billing";export*from"./crud";export*from"./legal";export*from"./components/MarkdownViewer";export*from"./blog";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{Text as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{Text as b,Stack as i}from"@donotdev/components";import{useTranslation as S,formatDate as D}from"@donotdev/core";const W=({publisherName:s,publisherType:n,legalStatus:d,registrationNumber:o,vatNumber:l,shareCapital:h,registeredOffice:u,email:p,phone:a,directorName:v,directorRole:m="Publication Director",hostingProvider:z,hostingAddress:g,hostingContact:f,lastUpdated:x,sections:c={intellectualProperty:!0,personalData:!0,cookies:!0}})=>{const{t,i18n:P}=S("legalNotice"),y=D(x,P?.language||"en");return r("div",{children:e("div",{style:{maxWidth:"none"},children:[e("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u2696\uFE0F ",t("title","Legal Notice")]}),e("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[t("lastUpdated","Last updated"),": ",y]})]}),e(i,{gap:"large",children:[e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("publisher.title","1. Publisher Information")}),e(i,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("publisher.name","Publisher name"),":"]})," ",s]}),e("p",{children:[e("strong",{children:[t("publisher.type","Type"),":"]})," ",t(`publisher.types.${n}`,n==="company"?"Company":"Individual")]}),d&&e("p",{children:[e("strong",{children:[t("publisher.legalStatus","Legal status"),":"]})," ",d]}),h&&n==="company"&&e("p",{children:[e("strong",{children:[t("publisher.shareCapital","Share capital"),":"]})," ",h]})]})]}),(o||l)&&e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("registration.title","2. Registration Details")}),e(i,{gap:"tight",children:[o&&e("p",{children:[e("strong",{children:[t("registration.number","Registration number / SIRET"),":"]})," ",o]}),l&&e("p",{children:[e("strong",{children:[t("registration.vat","VAT number"),":"]})," ",l]})]})]}),e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("office.title","3. Registered Office")}),e("p",{children:[e("strong",{children:[t("office.address","Address"),":"]}),r("br",{}),u]})]}),e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("contact.title","4. Contact Information")}),e(i,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("contact.email","Email"),":"]})," ",e("a",{href:`mailto:${p}`,style:{color:"var(--primary)"},children:[" ",p]})]}),a&&e("p",{children:[e("strong",{children:[t("contact.phone","Phone"),":"]})," ",r("a",{href:`tel:${a}`,style:{color:"var(--primary)"},children:a})]})]})]}),e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("director.title","5. Publication Director")}),e(i,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("director.name","Name"),":"]})," ",v]}),m&&e("p",{children:[e("strong",{children:[t("director.role","Role"),":"]})," ",m]})]})]}),e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("hosting.title","6. Hosting Provider")}),e(i,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("hosting.provider","Provider"),":"]})," ",z]})," ",g&&e("p",{children:[e("strong",{children:[t("hosting.address","Address"),":"]}),r("br",{}),g]}),f&&e("p",{children:[e("strong",{children:[t("hosting.contact","Contact"),":"]})," ",f]})]})]}),c.intellectualProperty&&e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("intellectualProperty.title","7. Intellectual Property")}),r("p",{children:t("intellectualProperty.content","All content on this website, including but not limited to text, graphics, logos, images, audio clips, digital downloads, data compilations, and software, is the property of {publisherName} or its content suppliers and is protected by international copyright laws.",{publisherName:s})}),r("p",{style:{marginTop:"1rem"},children:t("intellectualProperty.unauthorized","The unauthorized use of any content from this website may violate copyright, trademark, and other laws.")})]}),c.personalData&&e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("personalData.title","8. Personal Data")}),e("p",{children:[t("personalData.content","For information about how we collect, use, and protect your personal data, please refer to our "),r("a",{href:"/privacy",style:{color:"var(--primary)",textDecoration:"underline"},children:t("personalData.privacyPolicy","Privacy Policy")}),"."]})]}),c.cookies&&e("section",{children:[r("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("cookies.title","9. Cookies")}),e("p",{children:[t("cookies.content","This website uses cookies. For detailed information about cookies and how we use them, please refer to our "),r("a",{href:"/privacy",style:{color:"var(--primary)",textDecoration:"underline"},children:t("cookies.privacyPolicy","Privacy Policy")}),"."]})]})]}),r("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)"},children:e(b,{variant:"muted",level:"small",children:[t("footer.accurate","The information in this Legal Notice is accurate as of")," ",y," ",t("footer.updated","and may be updated to reflect changes in our company information.")]})})]})})};export{W as LegalNoticeTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as o,Fragment as n}from"react/jsx-runtime";import{List as i,Stack as p}from"@donotdev/components";import{useTranslation as f,formatDate as y}from"@donotdev/core";const d=({companyName:a,websiteUrl:z,privacyEmail:m,companyAddress:h,dpoEmail:c,lastUpdated:g,sections:s={children:!0,international:!0,california:!0,eu:!0},contactInfo:r={}})=>{const{t:e,i18n:u}=f("privacy"),l=y(g,u?.language||"en");return o("div",{children:t("div",{style:{maxWidth:"none"},children:[t("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[t("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u{1F512} ",e("title","Privacy Policy")]}),t("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[e("lastUpdated","Last updated"),": ",l]})]}),t(p,{gap:"large",children:[t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.introduction.title","1. Introduction")}),t("p",{style:{marginBottom:"1rem"},children:[e("sections.introduction.welcome","Welcome to")," ",a," ",'("',e("common.we","we"),'," "',e("common.our","our"),',"'," ",e("common.or","or"),' "',e("common.us","us"),'").'," ",e("sections.introduction.commitment","We are committed to protecting your privacy and ensuring you have a positive experience on our platform. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our development framework, tools, and services.")]}),t("p",{children:[e("sections.introduction.agreement","By using")," ",a,","," ",e("sections.introduction.agree","you agree to the collection and use of information in accordance with this policy. If you do not agree with our policies and practices, please do not use our services.")]})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.collection.title","2. Information We Collect")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.provided.title","2.1 Information You Provide")}),o(i,{items:[o("strong",{children:e("sections.collection.provided.accountDesc","Name, email address, password, and profile information when you create an account")},"account"),t(n,{children:[t("strong",{children:[e("sections.collection.provided.usage","Usage Data"),":"]})," ",e("sections.collection.provided.usageDesc","Information about how you use our services, including features accessed and time spent")]}),t(n,{children:[t("strong",{children:[e("sections.collection.provided.communication","Communication"),":"]})," ",e("sections.collection.provided.communicationDesc","Messages, feedback, and support requests you send to us")]}),t(n,{children:[t("strong",{children:[e("sections.collection.provided.payment","Payment Information"),":"]})," ",e("sections.collection.provided.paymentDesc","Billing details and payment method information for premium features")]}),t(n,{children:[t("strong",{children:[e("sections.collection.provided.project","Project Data"),":"]})," ",e("sections.collection.provided.projectDesc","Code, configurations, and project files you create using our framework")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.automatic.title","2.2 Automatically Collected Information")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.collection.automatic.device","Device Information"),":"]})," ",e("sections.collection.automatic.deviceDesc","IP address, browser type, operating system, and device identifiers")]}),t(n,{children:[t("strong",{children:[e("sections.collection.automatic.analytics","Usage Analytics"),":"]})," ",e("sections.collection.automatic.analyticsDesc","Pages visited, features used, and interaction patterns")]}),t(n,{children:[t("strong",{children:[e("sections.collection.automatic.performance","Performance Data"),":"]})," ",e("sections.collection.automatic.performanceDesc","Error logs, performance metrics, and system diagnostics")]}),t(n,{children:[t("strong",{children:[e("sections.collection.automatic.cookies","Cookies and Tracking"),":"]})," ",e("sections.collection.automatic.cookiesDesc","Small data files stored on your device to improve your experience")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.usage.title","3. How We Use Your Information")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.usage.intro","We use the information we collect to:")}),o(i,{items:[e("sections.usage.provide","Provide, maintain, and improve our services"),e("sections.usage.process","Process transactions and manage your account"),e("sections.usage.send","Send you important updates, security alerts, and support messages"),e("sections.usage.respond","Respond to your comments, questions, and support requests"),e("sections.usage.analyze","Analyze usage patterns to enhance user experience"),e("sections.usage.detect","Detect and prevent fraud, abuse, and security threats"),e("sections.usage.comply","Comply with legal obligations and enforce our terms"),e("sections.usage.develop","Develop new features and services based on user feedback")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.sharing.title","4. Information Sharing and Disclosure")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.intro","We do not sell, trade, or rent your personal information to third parties. We may share your information in the following circumstances:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.providers.title","4.1 Service Providers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.providers.intro","We may share information with trusted third-party service providers who assist us in operating our platform, such as:")}),o(i,{items:[e("sections.sharing.providers.hosting","Cloud hosting and infrastructure providers"),e("sections.sharing.providers.payment","Payment processors for billing and transactions"),e("sections.sharing.providers.analytics","Analytics and monitoring services"),e("sections.sharing.providers.support","Customer support and communication tools")],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.legal.title","4.2 Legal Requirements")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.legal.desc","We may disclose your information if required by law, court order, or government request, or to protect our rights, property, or safety.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.business.title","4.3 Business Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.business.desc","In the event of a merger, acquisition, or sale of assets, your information may be transferred as part of the business transaction.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.security.title","5. Data Security")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.security.intro","We implement appropriate technical and organizational measures to protect your information against unauthorized access, alteration, disclosure, or destruction. These measures include:")}),o(i,{items:[e("sections.security.encryption","Encryption of data in transit and at rest"),e("sections.security.assessments","Regular security assessments and updates"),e("sections.security.access","Access controls and authentication mechanisms"),e("sections.security.training","Employee training on data protection practices"),e("sections.security.incident","Incident response and breach notification procedures")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.retention.title","6. Data Retention")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.retention.intro","We retain your information for as long as necessary to provide our services, comply with legal obligations, resolve disputes, and enforce our agreements. The retention period varies based on the type of information:")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.retention.account","Account Information"),":"]})," ",e("sections.retention.accountDesc","Retained while your account is active and for a reasonable period after deletion")]}),t(n,{children:[t("strong",{children:[e("sections.retention.usage","Usage Data"),":"]})," ",e("sections.retention.usageDesc","Retained for analytics and service improvement purposes")]}),t(n,{children:[t("strong",{children:[e("sections.retention.payment","Payment Information"),":"]})," ",e("sections.retention.paymentDesc","Retained as required by financial regulations")]}),t(n,{children:[t("strong",{children:[e("sections.retention.communication","Communication Records"),":"]})," ",e("sections.retention.communicationDesc","Retained for customer support and legal compliance")]})],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.rights.title","7. Your Rights and Choices")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.intro","Depending on your location, you may have the following rights regarding your personal information:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.access.title","7.1 Access and Portability")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.access.desc","You can request access to your personal information and receive a copy in a portable format.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.correction.title","7.2 Correction and Update")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.correction.desc","You can request correction of inaccurate or incomplete information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.deletion.title","7.3 Deletion")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.deletion.desc","You can request deletion of your personal information, subject to legal requirements.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.restriction.title","7.4 Restriction and Objection")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.restriction.desc","You can request restriction of processing or object to certain uses of your information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.marketing.title","7.5 Marketing Communications")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.marketing.desc","You can opt out of marketing communications at any time using the unsubscribe link or contacting us directly.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.cookies.title","8. Cookies and Tracking Technologies")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.cookies.intro","We use cookies and similar tracking technologies to enhance your experience, analyze usage, and provide personalized content. You can control cookie settings through your browser preferences.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.cookies.types.title","8.1 Types of Cookies We Use")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.cookies.types.essential","Essential Cookies"),":"]})," ",e("sections.cookies.types.essentialDesc","Required for basic functionality and security")]}),t(n,{children:[t("strong",{children:[e("sections.cookies.types.analytics","Analytics Cookies"),":"]})," ",e("sections.cookies.types.analyticsDesc","Help us understand how visitors use our platform")]}),t(n,{children:[t("strong",{children:[e("sections.cookies.types.functional","Functional Cookies"),":"]})," ",e("sections.cookies.types.functionalDesc","Remember your preferences and settings")]}),t(n,{children:[t("strong",{children:[e("sections.cookies.types.marketing","Marketing Cookies"),":"]})," ",e("sections.cookies.types.marketingDesc","Used for targeted advertising and content")]})],style:{paddingInlineStart:"1.5rem"}})]}),s.international&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.international.title","9. International Data Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.international.desc","Your information may be transferred to and processed in countries other than your own. We ensure appropriate safeguards are in place to protect your information in accordance with applicable data protection laws.")})]}),s.children&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.children.title","10. Children's Privacy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.children.desc","Our services are not intended for children under the age of 13. We do not knowingly collect personal information from children under 13. If you believe we have collected information from a child under 13, please contact us immediately.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.changes.title","11. Changes to This Privacy Policy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.changes.desc",'We may update this Privacy Policy from time to time to reflect changes in our practices or applicable laws. We will notify you of any material changes by posting the updated policy on our website and updating the "Last updated" date.')})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.contact.title","12. Contact Us")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.contact.intro","If you have any questions about this Privacy Policy or our data practices, please contact us:")}),t("div",{className:"dndev-grid dndev-gap-sm",style:{backgroundColor:"color-mix(in oklab, var(--muted) 50%, transparent)",padding:"1rem",borderRadius:"var(--radius-lg)"},children:[t("p",{children:[t("strong",{children:[e("sections.contact.email","Email"),":"]})," ",m]}),t("p",{children:[t("strong",{children:[e("sections.contact.address","Address"),":"]})," ",h]}),c&&t("p",{children:[t("strong",{children:[e("sections.contact.dpo","Data Protection Officer"),":"]})," ",c]}),r.phone&&t("p",{children:[t("strong",{children:[e("sections.contact.phone","Phone"),":"]})," ",r.phone]}),r.supportEmail&&t("p",{children:[t("strong",{children:[e("sections.contact.support","Support Email"),":"]})," ",r.supportEmail]})]})]}),s.eu&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.eu.title","13. Legal Basis for Processing (EU Users)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.eu.intro","For users in the European Union, our legal basis for processing your personal information includes:")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.eu.consent","Consent"),":"]})," ",e("sections.eu.consentDesc","When you explicitly agree to our processing")]}),t(n,{children:[t("strong",{children:[e("sections.eu.contract","Contract Performance"),":"]})," ",e("sections.eu.contractDesc","To provide our services under our terms")]}),t(n,{children:[t("strong",{children:[e("sections.eu.legitimate","Legitimate Interest"),":"]})," ",e("sections.eu.legitimateDesc","To improve our services and prevent fraud")]}),t(n,{children:[t("strong",{children:[e("sections.eu.legal","Legal Obligation"),":"]})," ",e("sections.eu.legalDesc","To comply with applicable laws and regulations")]})],style:{paddingInlineStart:"1.5rem"}})]}),s.california&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.california.title","14. California Privacy Rights (CCPA)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.california.desc","California residents have additional rights under the California Consumer Privacy Act (CCPA), including the right to know what personal information we collect and how we use it, the right to delete personal information, and the right to opt out of the sale of personal information.")})]})]}),o("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:t("p",{children:[e("footer.effective","This Privacy Policy is effective as of")," ",l," ",e("footer.remain","and will remain in effect except with respect to any changes in its provisions in the future.")]})})]})})};var v=d;export{d as PrivacyPolicyTemplate,v as default};
|
|
1
|
+
import{jsxs as t,jsx as o,Fragment as i}from"react/jsx-runtime";import{List as n,Stack as g}from"@donotdev/components";import{useTranslation as p,formatDate as f}from"@donotdev/core";const y=({companyName:a,websiteUrl:v,privacyEmail:d,companyAddress:m,dpoEmail:c,lastUpdated:h,sections:r={children:!0,international:!0,california:!0,eu:!0},contactInfo:s={}})=>{const{t:e,i18n:u}=p("privacy"),l=f(h,u?.language||"en");return o("div",{children:t("div",{style:{maxWidth:"none"},children:[t("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[t("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u{1F512} ",e("title","Privacy Policy")]}),t("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[e("lastUpdated","Last updated"),": ",l]})]}),t(g,{gap:"large",children:[t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.introduction.title","1. Introduction")}),t("p",{style:{marginBottom:"1rem"},children:[e("sections.introduction.welcome","Welcome to")," ",a," ",'("',e("common.we","we"),'," "',e("common.our","our"),',"'," ",e("common.or","or"),' "',e("common.us","us"),'").'," ",e("sections.introduction.commitment","We are committed to protecting your privacy and ensuring you have a positive experience on our platform. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our development framework, tools, and services.")]}),t("p",{children:[e("sections.introduction.agreement","By using")," ",a,","," ",e("sections.introduction.agree","you agree to the collection and use of information in accordance with this policy. If you do not agree with our policies and practices, please do not use our services.")]})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.collection.title","2. Information We Collect")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.provided.title","2.1 Information You Provide")}),o(n,{items:[o("strong",{children:e("sections.collection.provided.accountDesc","Name, email address, password, and profile information when you create an account")},"account"),t(i,{children:[t("strong",{children:[e("sections.collection.provided.usage","Usage Data"),":"]})," ",e("sections.collection.provided.usageDesc","Information about how you use our services, including features accessed and time spent")]}),t(i,{children:[t("strong",{children:[e("sections.collection.provided.communication","Communication"),":"]})," ",e("sections.collection.provided.communicationDesc","Messages, feedback, and support requests you send to us")]}),t(i,{children:[t("strong",{children:[e("sections.collection.provided.payment","Payment Information"),":"]})," ",e("sections.collection.provided.paymentDesc","Billing details and payment method information for premium features")]}),t(i,{children:[t("strong",{children:[e("sections.collection.provided.project","Project Data"),":"]})," ",e("sections.collection.provided.projectDesc","Code, configurations, and project files you create using our framework")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.automatic.title","2.2 Automatically Collected Information")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.collection.automatic.device","Device Information"),":"]})," ",e("sections.collection.automatic.deviceDesc","IP address, browser type, operating system, and device identifiers")]}),t(i,{children:[t("strong",{children:[e("sections.collection.automatic.analytics","Usage Analytics"),":"]})," ",e("sections.collection.automatic.analyticsDesc","Pages visited, features used, and interaction patterns")]}),t(i,{children:[t("strong",{children:[e("sections.collection.automatic.performance","Performance Data"),":"]})," ",e("sections.collection.automatic.performanceDesc","Error logs, performance metrics, and system diagnostics")]}),t(i,{children:[t("strong",{children:[e("sections.collection.automatic.cookies","Cookies and Tracking"),":"]})," ",e("sections.collection.automatic.cookiesDesc","Small data files stored on your device to improve your experience")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.usage.title","3. How We Use Your Information")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.usage.intro","We use the information we collect to:")}),o(n,{items:[e("sections.usage.provide","Provide, maintain, and improve our services"),e("sections.usage.process","Process transactions and manage your account"),e("sections.usage.send","Send you important updates, security alerts, and support messages"),e("sections.usage.respond","Respond to your comments, questions, and support requests"),e("sections.usage.analyze","Analyze usage patterns to enhance user experience"),e("sections.usage.detect","Detect and prevent fraud, abuse, and security threats"),e("sections.usage.comply","Comply with legal obligations and enforce our terms"),e("sections.usage.develop","Develop new features and services based on user feedback")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.sharing.title","4. Information Sharing and Disclosure")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.intro","We do not sell, trade, or rent your personal information to third parties. We may share your information in the following circumstances:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.providers.title","4.1 Service Providers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.providers.intro","We may share information with trusted third-party service providers who assist us in operating our platform, such as:")}),o(n,{items:[e("sections.sharing.providers.hosting","Cloud hosting and infrastructure providers"),e("sections.sharing.providers.payment","Payment processors for billing and transactions"),e("sections.sharing.providers.analytics","Analytics and monitoring services"),e("sections.sharing.providers.support","Customer support and communication tools")],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.legal.title","4.2 Legal Requirements")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.legal.desc","We may disclose your information if required by law, court order, or government request, or to protect our rights, property, or safety.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.business.title","4.3 Business Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.business.desc","In the event of a merger, acquisition, or sale of assets, your information may be transferred as part of the business transaction.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.security.title","5. Data Security")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.security.intro","We implement appropriate technical and organizational measures to protect your information against unauthorized access, alteration, disclosure, or destruction. These measures include:")}),o(n,{items:[e("sections.security.encryption","Encryption of data in transit and at rest"),e("sections.security.assessments","Regular security assessments and updates"),e("sections.security.access","Access controls and authentication mechanisms"),e("sections.security.training","Employee training on data protection practices"),e("sections.security.incident","Incident response and breach notification procedures")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.retention.title","6. Data Retention")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.retention.intro","We retain your information for as long as necessary to provide our services, comply with legal obligations, resolve disputes, and enforce our agreements. The retention period varies based on the type of information:")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.retention.account","Account Information"),":"]})," ",e("sections.retention.accountDesc","Retained while your account is active and for a reasonable period after deletion")]}),t(i,{children:[t("strong",{children:[e("sections.retention.usage","Usage Data"),":"]})," ",e("sections.retention.usageDesc","Retained for analytics and service improvement purposes")]}),t(i,{children:[t("strong",{children:[e("sections.retention.payment","Payment Information"),":"]})," ",e("sections.retention.paymentDesc","Retained as required by financial regulations")]}),t(i,{children:[t("strong",{children:[e("sections.retention.communication","Communication Records"),":"]})," ",e("sections.retention.communicationDesc","Retained for customer support and legal compliance")]})],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.rights.title","7. Your Rights and Choices")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.intro","Depending on your location, you may have the following rights regarding your personal information:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.access.title","7.1 Access and Portability")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.access.desc","You can request access to your personal information and receive a copy in a portable format.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.correction.title","7.2 Correction and Update")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.correction.desc","You can request correction of inaccurate or incomplete information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.deletion.title","7.3 Deletion")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.deletion.desc","You can request deletion of your personal information, subject to legal requirements.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.restriction.title","7.4 Restriction and Objection")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.restriction.desc","You can request restriction of processing or object to certain uses of your information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.marketing.title","7.5 Marketing Communications")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.marketing.desc","You can opt out of marketing communications at any time using the unsubscribe link or contacting us directly.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.cookies.title","8. Cookies and Tracking Technologies")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.cookies.intro","We use cookies and similar tracking technologies to enhance your experience, analyze usage, and provide personalized content. You can control cookie settings through your browser preferences.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.cookies.types.title","8.1 Types of Cookies We Use")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.cookies.types.essential","Essential Cookies"),":"]})," ",e("sections.cookies.types.essentialDesc","Required for basic functionality and security")]}),t(i,{children:[t("strong",{children:[e("sections.cookies.types.analytics","Analytics Cookies"),":"]})," ",e("sections.cookies.types.analyticsDesc","Help us understand how visitors use our platform")]}),t(i,{children:[t("strong",{children:[e("sections.cookies.types.functional","Functional Cookies"),":"]})," ",e("sections.cookies.types.functionalDesc","Remember your preferences and settings")]}),t(i,{children:[t("strong",{children:[e("sections.cookies.types.marketing","Marketing Cookies"),":"]})," ",e("sections.cookies.types.marketingDesc","Used for targeted advertising and content")]})],style:{paddingInlineStart:"1.5rem"}})]}),r.international&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.international.title","9. International Data Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.international.desc","Your information may be transferred to and processed in countries other than your own. We ensure appropriate safeguards are in place to protect your information in accordance with applicable data protection laws.")})]}),r.children&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.children.title","10. Children's Privacy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.children.desc","Our services are not intended for children under the age of 13. We do not knowingly collect personal information from children under 13. If you believe we have collected information from a child under 13, please contact us immediately.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.changes.title","11. Changes to This Privacy Policy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.changes.desc",'We may update this Privacy Policy from time to time to reflect changes in our practices or applicable laws. We will notify you of any material changes by posting the updated policy on our website and updating the "Last updated" date.')})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.contact.title","12. Contact Us")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.contact.intro","If you have any questions about this Privacy Policy or our data practices, please contact us:")}),t("div",{className:"dndev-grid dndev-gap-sm",style:{backgroundColor:"color-mix(in oklab, var(--muted) 50%, transparent)",padding:"1rem",borderRadius:"var(--radius-lg)"},children:[t("p",{children:[t("strong",{children:[e("sections.contact.email","Email"),":"]})," ",d]}),t("p",{children:[t("strong",{children:[e("sections.contact.address","Address"),":"]})," ",m]}),c&&t("p",{children:[t("strong",{children:[e("sections.contact.dpo","Data Protection Officer"),":"]})," ",c]}),s.phone&&t("p",{children:[t("strong",{children:[e("sections.contact.phone","Phone"),":"]})," ",s.phone]}),s.supportEmail&&t("p",{children:[t("strong",{children:[e("sections.contact.support","Support Email"),":"]})," ",s.supportEmail]})]})]}),r.eu&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.eu.title","13. Legal Basis for Processing (EU Users)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.eu.intro","For users in the European Union, our legal basis for processing your personal information includes:")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.eu.consent","Consent"),":"]})," ",e("sections.eu.consentDesc","When you explicitly agree to our processing")]}),t(i,{children:[t("strong",{children:[e("sections.eu.contract","Contract Performance"),":"]})," ",e("sections.eu.contractDesc","To provide our services under our terms")]}),t(i,{children:[t("strong",{children:[e("sections.eu.legitimate","Legitimate Interest"),":"]})," ",e("sections.eu.legitimateDesc","To improve our services and prevent fraud")]}),t(i,{children:[t("strong",{children:[e("sections.eu.legal","Legal Obligation"),":"]})," ",e("sections.eu.legalDesc","To comply with applicable laws and regulations")]})],style:{paddingInlineStart:"1.5rem"}})]}),r.california&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.california.title","14. California Privacy Rights (CCPA)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.california.desc","California residents have additional rights under the California Consumer Privacy Act (CCPA), including the right to know what personal information we collect and how we use it, the right to delete personal information, and the right to opt out of the sale of personal information.")})]})]}),o("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:t("p",{children:[e("footer.effective","This Privacy Policy is effective as of")," ",l," ",e("footer.remain","and will remain in effect except with respect to any changes in its provisions in the future.")]})})]})})};var W=y;export{y as PrivacyPolicyTemplate,W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as t}from"react/jsx-runtime";import{Stack as g}from"@donotdev/components";import{useTranslation as f,formatDate as p}from"@donotdev/core";const s=({companyName:o,websiteUrl:v,legalEmail:a,companyAddress:c,lastUpdated:l,sections:S={children:!0,international:!0,california:!0,eu:!0},contactInfo:n={},jurisdiction:m="the United States",arbitrationOrg:d="American Arbitration Association",arbitrationLocation:h="New York, NY"})=>{const{t:e,i18n:u}=f("terms"),r=p(l,u?.language||"en");return t("div",{children:i("div",{style:{maxWidth:"none"},children:[i("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[i("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u{1F4CB} ",e("title","Terms of Service")]}),i("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[e("lastUpdated","Last updated"),": ",r]})]}),i(g,{gap:"large",children:[i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.introduction.title","1. Introduction")}),i("p",{style:{marginBottom:"1rem"},children:[e("sections.introduction.welcome","Welcome to")," ",o," ",'("',e("common.we","we"),'," "',e("common.our","our"),',"'," ",e("common.or","or"),' "',e("common.us","us"),'").'," ",e("sections.introduction.govern",'These Terms of Service ("Terms") govern your use of our development framework, tools, and services (collectively, the "Service"). By accessing or using our Service, you agree to be bound by these Terms.')]}),t("p",{children:e("sections.introduction.organization","If you are using our Service on behalf of an organization, you represent that you have the authority to bind that organization to these Terms. If you do not agree to these Terms, please do not use our Service.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.service.title","2. Service Description")}),i("p",{style:{marginBottom:"1rem"},children:[o," ",e("sections.service.description","is a comprehensive development framework that provides tools, components, and infrastructure for building modern web applications. Our Service includes:")]}),i("ul",{className:"dndev-grid dndev-gap-sm",style:{listStyleType:"disc",paddingInlineStart:"1.5rem"},children:[t("li",{children:e("sections.service.framework","Development framework and libraries")}),t("li",{children:e("sections.service.ui","UI components and design system")}),t("li",{children:e("sections.service.auth","Authentication and authorization services")}),t("li",{children:e("sections.service.i18n","Internationalization and localization tools")}),t("li",{children:e("sections.service.billing","Billing and subscription management")}),t("li",{children:e("sections.service.docs","Documentation and support resources")})]})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.account.title","3. Account Registration and Security")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.account.creation.title","3.1 Account Creation")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.account.creation.desc","To access certain features of our Service, you must create an account. You agree to provide accurate, current, and complete information during registration and to update such information to keep it accurate, current, and complete.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.account.security.title","3.2 Account Security")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.account.security.desc","You are responsible for safeguarding your account credentials and for all activities that occur under your account. You agree to notify us immediately of any unauthorized use of your account or any other breach of security.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.account.eligibility.title","3.3 Account Eligibility")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.account.eligibility.desc","You must be at least 13 years old to use our Service. If you are under 18, you must have parental or guardian consent to use our Service.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.acceptable.title","4. Acceptable Use Policy")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.acceptable.intro","You agree to use our Service only for lawful purposes and in accordance with these Terms. You agree not to:")}),i("ul",{className:"dndev-grid dndev-gap-sm",style:{listStyleType:"disc",paddingInlineStart:"1.5rem"},children:[t("li",{children:e("sections.acceptable.laws","Use the Service to violate any applicable laws or regulations")}),t("li",{children:e("sections.acceptable.infringe","Infringe upon the intellectual property rights of others")}),t("li",{children:e("sections.acceptable.harmful","Transmit harmful, offensive, or inappropriate content")}),t("li",{children:e("sections.acceptable.unauthorized","Attempt to gain unauthorized access to our systems or other users' accounts")}),t("li",{children:e("sections.acceptable.spam","Use the Service for spam, phishing, or other malicious activities")}),t("li",{children:e("sections.acceptable.disrupt","Interfere with or disrupt the Service or servers")}),t("li",{children:e("sections.acceptable.reverse","Reverse engineer, decompile, or disassemble our software")}),t("li",{children:e("sections.acceptable.automated","Use automated systems to access the Service without permission")}),t("li",{children:e("sections.acceptable.share","Share your account credentials with others")}),t("li",{children:e("sections.acceptable.competing","Use the Service to build competing products or services")})]})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.payment.title","5. Subscription and Payment Terms")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.plans.title","5.1 Subscription Plans")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.plans.desc","We offer various subscription plans with different features and pricing. Subscription details, including pricing and features, are available on our website and may be updated from time to time.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.processing.title","5.2 Payment Processing")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.processing.desc","Payments are processed through secure third-party payment processors. You authorize us to charge your payment method for all fees associated with your subscription.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.billing.title","5.3 Billing and Renewal")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.billing.desc","Subscriptions automatically renew unless cancelled before the renewal date. You will be charged the applicable subscription fee on each renewal date.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.refunds.title","5.4 Refunds and Cancellation")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.refunds.desc","You may cancel your subscription at any time through your account settings. Refunds are provided in accordance with our refund policy, which may vary by plan and usage.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.ip.title","6. Intellectual Property Rights")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.ip.ours.title","6.1 Our Intellectual Property")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.ip.ours.desc","The Service, including all software, content, and materials, is owned by us or our licensors and is protected by intellectual property laws. We grant you a limited, non-exclusive, non-transferable license to use the Service in accordance with these Terms.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.ip.yours.title","6.2 Your Content")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.ip.yours.desc","You retain ownership of any content you create using our Service. You grant us a license to use, store, and process your content solely to provide and improve our Service.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.ip.opensource.title","6.3 Open Source Components")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.ip.opensource.desc","Our Service may include open source software components. The use of such components is subject to their respective open source licenses.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.privacy.title","7. Privacy and Data Protection")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.privacy.desc","Your privacy is important to us. Our collection and use of your personal information is governed by our Privacy Policy, which is incorporated into these Terms by reference.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.availability.title","8. Service Availability and Support")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.availability.service.title","8.1 Service Availability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.availability.service.desc","We strive to maintain high service availability but do not guarantee uninterrupted access. The Service may be temporarily unavailable due to maintenance, updates, or other factors beyond our control.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.availability.support.title","8.2 Support Services")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.availability.support.desc","Support availability varies by subscription plan. We provide support through documentation, community forums, and direct support channels as specified in your plan.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.availability.updates.title","8.3 Updates and Changes")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.availability.updates.desc","We may update the Service from time to time to improve functionality, security, or user experience. We will provide reasonable notice of significant changes that may affect your use of the Service.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.termination.title","9. Termination and Suspension")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.termination.you.title","9.1 Termination by You")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.termination.you.desc","You may terminate your account at any time by cancelling your subscription and deleting your account through your account settings.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.termination.us.title","9.2 Termination by Us")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.termination.us.desc","We may terminate or suspend your account immediately if you violate these Terms, engage in fraudulent activity, or for any other reason at our sole discretion.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.termination.effect.title","9.3 Effect of Termination")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.termination.effect.desc","Upon termination, your right to use the Service ceases immediately. We may delete your account data in accordance with our data retention policies.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.disclaimers.title","10. Disclaimers and Limitations")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.disclaimers.service.title","10.1 Service Disclaimers")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.disclaimers.service.desc",'THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.')}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.disclaimers.liability.title","10.2 Limitation of Liability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.disclaimers.liability.desc","TO THE MAXIMUM EXTENT PERMITTED BY LAW, WE SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, DATA, OR USE, INCURRED BY YOU OR ANY THIRD PARTY.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.disclaimers.maximum.title","10.3 Maximum Liability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.disclaimers.maximum.desc","OUR TOTAL LIABILITY TO YOU FOR ANY CLAIMS ARISING OUT OF OR RELATING TO THESE TERMS OR THE SERVICE SHALL NOT EXCEED THE AMOUNT PAID BY YOU FOR THE SERVICE IN THE TWELVE MONTHS PRECEDING THE CLAIM.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.indemnification.title","11. Indemnification")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.indemnification.desc","You agree to indemnify, defend, and hold harmless us and our officers, directors, employees, and agents from and against any claims, damages, losses, and expenses arising out of or relating to your use of the Service or violation of these Terms.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.governing.title","12. Governing Law and Dispute Resolution")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.governing.law.title","12.1 Governing Law")}),i("p",{style:{marginBottom:"1rem"},children:[e("sections.governing.law.desc","These Terms are governed by and construed in accordance with the laws of")," ",m,","," ",e("sections.governing.law.without","without regard to its conflict of law principles.")]}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.governing.dispute.title","12.2 Dispute Resolution")}),i("p",{style:{marginBottom:"1rem"},children:[e("sections.governing.dispute.desc","Any disputes arising out of or relating to these Terms or the Service shall be resolved through binding arbitration in accordance with the rules of")," ",d,"."," ",e("sections.governing.dispute.location","The arbitration shall be conducted in")," ",h,"."]}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.governing.class.title","12.3 Class Action Waiver")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.governing.class.desc","You agree that any arbitration or legal proceeding will be conducted on an individual basis and not as a class action or representative action.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.miscellaneous.title","13. Miscellaneous")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.entire.title","13.1 Entire Agreement")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.entire.desc","These Terms, together with our Privacy Policy, constitute the entire agreement between you and us regarding the Service and supersede all prior agreements and understandings.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.severability.title","13.2 Severability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.severability.desc","If any provision of these Terms is held to be invalid or unenforceable, the remaining provisions will continue in full force and effect.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.waiver.title","13.3 Waiver")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.waiver.desc","Our failure to enforce any provision of these Terms does not constitute a waiver of that provision or any other provision.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.assignment.title","13.4 Assignment")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.assignment.desc","You may not assign or transfer your rights or obligations under these Terms without our written consent. We may assign these Terms without restriction.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.force.title","13.5 Force Majeure")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.force.desc","We shall not be liable for any failure to perform our obligations due to circumstances beyond our reasonable control, including but not limited to natural disasters, war, terrorism, or government actions.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.changes.title","14. Changes to These Terms")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.changes.desc",'We may update these Terms from time to time to reflect changes in our practices or applicable laws. We will notify you of any material changes by posting the updated Terms on our website and updating the "Last updated" date.')})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.contact.title","15. Contact Us")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.contact.intro","If you have any questions about these Terms of Service, please contact us:")}),i("div",{className:"dndev-grid dndev-gap-sm",style:{backgroundColor:"color-mix(in oklab, var(--muted) 50%, transparent)",padding:"1rem",borderRadius:"var(--radius-lg)"},children:[i("p",{children:[i("strong",{children:[e("sections.contact.email","Email"),":"]})," ",a]}),i("p",{children:[i("strong",{children:[e("sections.contact.address","Address"),":"]})," ",c]}),n.phone&&i("p",{children:[i("strong",{children:[e("sections.contact.phone","Phone"),":"]})," ",n.phone]}),n.supportEmail&&i("p",{children:[i("strong",{children:[e("sections.contact.support","Support Email"),":"]})," ",n.supportEmail]})]})]})]}),t("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("p",{children:[e("footer.effective","These Terms of Service are effective as of")," ",r," ",e("footer.remain","and will remain in effect except with respect to any changes in its provisions in the future.")]})})]})})};var y=s;export{s as TermsOfServiceTemplate,y as default};
|
|
1
|
+
import{jsxs as i,jsx as t}from"react/jsx-runtime";import{Stack as u}from"@donotdev/components";import{useTranslation as g,formatDate as f}from"@donotdev/core";const p=({companyName:o,websiteUrl:y,legalEmail:s,companyAddress:a,lastUpdated:c,sections:v={children:!0,international:!0,california:!0,eu:!0},contactInfo:n={},jurisdiction:l="the United States",arbitrationOrg:m="American Arbitration Association",arbitrationLocation:d="New York, NY"})=>{const{t:e,i18n:h}=g("terms"),r=f(c,h?.language||"en");return t("div",{children:i("div",{style:{maxWidth:"none"},children:[i("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[i("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u{1F4CB} ",e("title","Terms of Service")]}),i("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[e("lastUpdated","Last updated"),": ",r]})]}),i(u,{gap:"large",children:[i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.introduction.title","1. Introduction")}),i("p",{style:{marginBottom:"1rem"},children:[e("sections.introduction.welcome","Welcome to")," ",o," ",'("',e("common.we","we"),'," "',e("common.our","our"),',"'," ",e("common.or","or"),' "',e("common.us","us"),'").'," ",e("sections.introduction.govern",'These Terms of Service ("Terms") govern your use of our development framework, tools, and services (collectively, the "Service"). By accessing or using our Service, you agree to be bound by these Terms.')]}),t("p",{children:e("sections.introduction.organization","If you are using our Service on behalf of an organization, you represent that you have the authority to bind that organization to these Terms. If you do not agree to these Terms, please do not use our Service.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.service.title","2. Service Description")}),i("p",{style:{marginBottom:"1rem"},children:[o," ",e("sections.service.description","is a comprehensive development framework that provides tools, components, and infrastructure for building modern web applications. Our Service includes:")]}),i("ul",{className:"dndev-grid dndev-gap-sm",style:{listStyleType:"disc",paddingInlineStart:"1.5rem"},children:[t("li",{children:e("sections.service.framework","Development framework and libraries")}),t("li",{children:e("sections.service.ui","UI components and design system")}),t("li",{children:e("sections.service.auth","Authentication and authorization services")}),t("li",{children:e("sections.service.i18n","Internationalization and localization tools")}),t("li",{children:e("sections.service.billing","Billing and subscription management")}),t("li",{children:e("sections.service.docs","Documentation and support resources")})]})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.account.title","3. Account Registration and Security")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.account.creation.title","3.1 Account Creation")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.account.creation.desc","To access certain features of our Service, you must create an account. You agree to provide accurate, current, and complete information during registration and to update such information to keep it accurate, current, and complete.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.account.security.title","3.2 Account Security")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.account.security.desc","You are responsible for safeguarding your account credentials and for all activities that occur under your account. You agree to notify us immediately of any unauthorized use of your account or any other breach of security.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.account.eligibility.title","3.3 Account Eligibility")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.account.eligibility.desc","You must be at least 13 years old to use our Service. If you are under 18, you must have parental or guardian consent to use our Service.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.acceptable.title","4. Acceptable Use Policy")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.acceptable.intro","You agree to use our Service only for lawful purposes and in accordance with these Terms. You agree not to:")}),i("ul",{className:"dndev-grid dndev-gap-sm",style:{listStyleType:"disc",paddingInlineStart:"1.5rem"},children:[t("li",{children:e("sections.acceptable.laws","Use the Service to violate any applicable laws or regulations")}),t("li",{children:e("sections.acceptable.infringe","Infringe upon the intellectual property rights of others")}),t("li",{children:e("sections.acceptable.harmful","Transmit harmful, offensive, or inappropriate content")}),t("li",{children:e("sections.acceptable.unauthorized","Attempt to gain unauthorized access to our systems or other users' accounts")}),t("li",{children:e("sections.acceptable.spam","Use the Service for spam, phishing, or other malicious activities")}),t("li",{children:e("sections.acceptable.disrupt","Interfere with or disrupt the Service or servers")}),t("li",{children:e("sections.acceptable.reverse","Reverse engineer, decompile, or disassemble our software")}),t("li",{children:e("sections.acceptable.automated","Use automated systems to access the Service without permission")}),t("li",{children:e("sections.acceptable.share","Share your account credentials with others")}),t("li",{children:e("sections.acceptable.competing","Use the Service to build competing products or services")})]})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.payment.title","5. Subscription and Payment Terms")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.plans.title","5.1 Subscription Plans")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.plans.desc","We offer various subscription plans with different features and pricing. Subscription details, including pricing and features, are available on our website and may be updated from time to time.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.processing.title","5.2 Payment Processing")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.processing.desc","Payments are processed through secure third-party payment processors. You authorize us to charge your payment method for all fees associated with your subscription.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.billing.title","5.3 Billing and Renewal")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.billing.desc","Subscriptions automatically renew unless cancelled before the renewal date. You will be charged the applicable subscription fee on each renewal date.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.payment.refunds.title","5.4 Refunds and Cancellation")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.payment.refunds.desc","You may cancel your subscription at any time through your account settings. Refunds are provided in accordance with our refund policy, which may vary by plan and usage.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.ip.title","6. Intellectual Property Rights")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.ip.ours.title","6.1 Our Intellectual Property")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.ip.ours.desc","The Service, including all software, content, and materials, is owned by us or our licensors and is protected by intellectual property laws. We grant you a limited, non-exclusive, non-transferable license to use the Service in accordance with these Terms.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.ip.yours.title","6.2 Your Content")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.ip.yours.desc","You retain ownership of any content you create using our Service. You grant us a license to use, store, and process your content solely to provide and improve our Service.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.ip.opensource.title","6.3 Open Source Components")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.ip.opensource.desc","Our Service may include open source software components. The use of such components is subject to their respective open source licenses.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.privacy.title","7. Privacy and Data Protection")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.privacy.desc","Your privacy is important to us. Our collection and use of your personal information is governed by our Privacy Policy, which is incorporated into these Terms by reference.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.availability.title","8. Service Availability and Support")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.availability.service.title","8.1 Service Availability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.availability.service.desc","We strive to maintain high service availability but do not guarantee uninterrupted access. The Service may be temporarily unavailable due to maintenance, updates, or other factors beyond our control.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.availability.support.title","8.2 Support Services")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.availability.support.desc","Support availability varies by subscription plan. We provide support through documentation, community forums, and direct support channels as specified in your plan.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.availability.updates.title","8.3 Updates and Changes")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.availability.updates.desc","We may update the Service from time to time to improve functionality, security, or user experience. We will provide reasonable notice of significant changes that may affect your use of the Service.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.termination.title","9. Termination and Suspension")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.termination.you.title","9.1 Termination by You")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.termination.you.desc","You may terminate your account at any time by cancelling your subscription and deleting your account through your account settings.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.termination.us.title","9.2 Termination by Us")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.termination.us.desc","We may terminate or suspend your account immediately if you violate these Terms, engage in fraudulent activity, or for any other reason at our sole discretion.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.termination.effect.title","9.3 Effect of Termination")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.termination.effect.desc","Upon termination, your right to use the Service ceases immediately. We may delete your account data in accordance with our data retention policies.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.disclaimers.title","10. Disclaimers and Limitations")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.disclaimers.service.title","10.1 Service Disclaimers")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.disclaimers.service.desc",'THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.')}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.disclaimers.liability.title","10.2 Limitation of Liability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.disclaimers.liability.desc","TO THE MAXIMUM EXTENT PERMITTED BY LAW, WE SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, DATA, OR USE, INCURRED BY YOU OR ANY THIRD PARTY.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.disclaimers.maximum.title","10.3 Maximum Liability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.disclaimers.maximum.desc","OUR TOTAL LIABILITY TO YOU FOR ANY CLAIMS ARISING OUT OF OR RELATING TO THESE TERMS OR THE SERVICE SHALL NOT EXCEED THE AMOUNT PAID BY YOU FOR THE SERVICE IN THE TWELVE MONTHS PRECEDING THE CLAIM.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.indemnification.title","11. Indemnification")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.indemnification.desc","You agree to indemnify, defend, and hold harmless us and our officers, directors, employees, and agents from and against any claims, damages, losses, and expenses arising out of or relating to your use of the Service or violation of these Terms.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.governing.title","12. Governing Law and Dispute Resolution")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.governing.law.title","12.1 Governing Law")}),i("p",{style:{marginBottom:"1rem"},children:[e("sections.governing.law.desc","These Terms are governed by and construed in accordance with the laws of")," ",l,","," ",e("sections.governing.law.without","without regard to its conflict of law principles.")]}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.governing.dispute.title","12.2 Dispute Resolution")}),i("p",{style:{marginBottom:"1rem"},children:[e("sections.governing.dispute.desc","Any disputes arising out of or relating to these Terms or the Service shall be resolved through binding arbitration in accordance with the rules of")," ",m,"."," ",e("sections.governing.dispute.location","The arbitration shall be conducted in")," ",d,"."]}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.governing.class.title","12.3 Class Action Waiver")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.governing.class.desc","You agree that any arbitration or legal proceeding will be conducted on an individual basis and not as a class action or representative action.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.miscellaneous.title","13. Miscellaneous")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.entire.title","13.1 Entire Agreement")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.entire.desc","These Terms, together with our Privacy Policy, constitute the entire agreement between you and us regarding the Service and supersede all prior agreements and understandings.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.severability.title","13.2 Severability")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.severability.desc","If any provision of these Terms is held to be invalid or unenforceable, the remaining provisions will continue in full force and effect.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.waiver.title","13.3 Waiver")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.waiver.desc","Our failure to enforce any provision of these Terms does not constitute a waiver of that provision or any other provision.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.assignment.title","13.4 Assignment")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.assignment.desc","You may not assign or transfer your rights or obligations under these Terms without our written consent. We may assign these Terms without restriction.")}),t("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.miscellaneous.force.title","13.5 Force Majeure")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.miscellaneous.force.desc","We shall not be liable for any failure to perform our obligations due to circumstances beyond our reasonable control, including but not limited to natural disasters, war, terrorism, or government actions.")})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.changes.title","14. Changes to These Terms")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.changes.desc",'We may update these Terms from time to time to reflect changes in our practices or applicable laws. We will notify you of any material changes by posting the updated Terms on our website and updating the "Last updated" date.')})]}),i("section",{children:[t("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.contact.title","15. Contact Us")}),t("p",{style:{marginBottom:"1rem"},children:e("sections.contact.intro","If you have any questions about these Terms of Service, please contact us:")}),i("div",{className:"dndev-grid dndev-gap-sm",style:{backgroundColor:"color-mix(in oklab, var(--muted) 50%, transparent)",padding:"1rem",borderRadius:"var(--radius-lg)"},children:[i("p",{children:[i("strong",{children:[e("sections.contact.email","Email"),":"]})," ",s]}),i("p",{children:[i("strong",{children:[e("sections.contact.address","Address"),":"]})," ",a]}),n.phone&&i("p",{children:[i("strong",{children:[e("sections.contact.phone","Phone"),":"]})," ",n.phone]}),n.supportEmail&&i("p",{children:[i("strong",{children:[e("sections.contact.support","Support Email"),":"]})," ",n.supportEmail]})]})]})]}),t("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:i("p",{children:[e("footer.effective","These Terms of Service are effective as of")," ",r," ",e("footer.remain","and will remain in effect except with respect to any changes in its provisions in the future.")]})})]})})};var T=p;export{p as TermsOfServiceTemplate,T as default};
|