@slashclick/ui 0.1.14 → 0.1.15
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.
|
@@ -82,7 +82,7 @@ const Pricing = ({ onSubscribe }) => {
|
|
|
82
82
|
});
|
|
83
83
|
if (!response.ok) {
|
|
84
84
|
if (response.status === 401) {
|
|
85
|
-
window.location.href =
|
|
85
|
+
window.location.href = `/signin?callbackUrl=${encodeURIComponent(window.location.pathname)}`;
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
const data2 = yield response.json().catch(() => ({}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/tailwind/pricing.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { Check, Zap } from 'lucide-react'\n\nconst FREE_FEATURES = [\n '1 story',\n '10 characters',\n '10 locations',\n '1 timeline',\n 'Image galleries',\n 'Public sharing',\n]\n\nconst PRO_FEATURES = [\n 'Unlimited stories',\n 'Unlimited characters',\n 'Unlimited locations',\n 'Unlimited timelines',\n 'Image galleries',\n 'Public sharing',\n 'Priority support',\n]\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ninterface PricingProps {\n onSubscribe?: () => void\n}\n\nexport const Pricing = ({ onSubscribe }: PricingProps) => {\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<string | null>(null)\n\n const handleSubscribe = async () => {\n if (onSubscribe) {\n onSubscribe()\n return\n }\n setLoading(true)\n setError(null)\n try {\n const response = await fetch('/api/subscription/checkout', {\n method: 'POST',\n })\n if (!response.ok) {\n if (response.status === 401) {\n window.location.href = '/signin?redirect=/about/pricing'\n return\n }\n const data = (await response.json().catch(() => ({}))) as {\n error?: string\n }\n throw new Error(data.error ?? 'Failed to create checkout session')\n }\n const data = (await response.json()) as { url: string }\n if (data.url) {\n window.location.href = data.url\n }\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : 'Something went wrong. Please try again.',\n )\n } finally {\n setLoading(false)\n }\n }\n\n return (\n <div className=\"bg-gray-900\">\n <main>\n {/* Header */}\n <div className=\"mx-auto mt-16 max-w-7xl px-6 sm:mt-32 lg:px-8\">\n <div className=\"mx-auto max-w-4xl text-center\">\n <h1 className=\"text-base font-semibold leading-7 text-indigo-400\">\n Pricing\n </h1>\n <p className=\"mt-2 text-4xl font-bold tracking-tight text-white sm:text-5xl\">\n Start free. Upgrade when you're ready.\n </p>\n </div>\n <p className=\"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-300\">\n Build your story bible for free. Subscribe for unlimited worlds,\n characters, and creative freedom.\n </p>\n\n {/* Pricing cards */}\n <div className=\"isolate mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-8 lg:mx-0 lg:max-w-none lg:grid-cols-2\">\n {/* Free tier */}\n <div className=\"rounded-3xl p-8 ring-1 ring-white/10 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Preview\n </h2>\n <p className=\"rounded-full bg-white/10 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Free forever\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Explore Story Bible and start building your creative world with\n no commitment.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $0\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <a\n href=\"/signin\"\n className=\"mt-6 block rounded-md bg-white/10 px-3 py-2 text-center text-sm font-semibold leading-6 text-white hover:bg-white/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white\"\n >\n Get started free\n </a>\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {FREE_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n\n {/* Pro tier */}\n <div className=\"rounded-3xl bg-white/5 p-8 ring-2 ring-indigo-500 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Pro\n </h2>\n <p className=\"rounded-full bg-indigo-500 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Most popular\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Unlock unlimited stories, characters, locations, and timelines.\n Build entire universes.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $9.99\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <button\n onClick={handleSubscribe}\n disabled={loading}\n className={classNames(\n 'mt-6 flex w-full items-center justify-center gap-2 rounded-md px-3 py-2 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500',\n loading\n ? 'cursor-not-allowed bg-indigo-400 text-white'\n : 'shadow-2xs bg-indigo-500 text-white hover:bg-indigo-400',\n )}\n >\n <Zap className=\"h-4 w-4\" aria-hidden=\"true\" />\n {loading ? 'Redirecting…' : 'Subscribe — $9.99/mo'}\n </button>\n {error && (\n <p className=\"mt-3 text-center text-sm text-red-400\">{error}</p>\n )}\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {PRO_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n {/* FAQ */}\n <div className=\"mx-auto mt-24 max-w-2xl pb-24\">\n <h2 className=\"text-2xl font-bold leading-10 tracking-tight text-white\">\n Frequently asked questions\n </h2>\n <dl className=\"mt-10 space-y-8\">\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Can I cancel anytime?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Yes. You can cancel at any time from the subscription\n management page. You retain Pro access until the end of your\n current billing period.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n What happens to my data if I downgrade?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Your existing stories and characters are never deleted.\n You'll just be unable to create new ones beyond the\n preview limits until you resubscribe.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Is billing monthly or annually?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Currently monthly only. Annual billing with a discount is\n coming soon.\n </dd>\n </div>\n </dl>\n </div>\n </div>\n </main>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4EU;AA3EV,mBAAyB;AACzB,0BAA2B;AAE3B,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,SAAS,cAAc,SAAmB;AACxC,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAMO,MAAM,UAAU,CAAC,EAAE,YAAY,MAAoB;AACxD,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAC5C,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAwB,IAAI;AAEtD,QAAM,kBAAkB,MAAY;AAnCtC;AAoCI,QAAI,aAAa;AACf,kBAAY;AACZ;AAAA,IACF;AACA,eAAW,IAAI;AACf,aAAS,IAAI;AACb,QAAI;AACF,YAAM,WAAW,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AAU,iCACb;AAAA,kDAAC,QAAG,WAAU,2DAA0D,wCAExE;AAAA,MACA,6CAAC,QAAG,WAAU,mBACZ;AAAA,qDAAC,SACC;AAAA,sDAAC,QAAG,WAAU,gDAA+C,mCAE7D;AAAA,UACA,4CAAC,QAAG,WAAU,0CAAyC,wJAIvD;AAAA,WACF;AAAA,QACA,6CAAC,SACC;AAAA,sDAAC,QAAG,WAAU,gDAA+C,qDAE7D;AAAA,UACA,4CAAC,QAAG,WAAU,0CAAyC,+JAIvD;AAAA,WACF;AAAA,QACA,6CAAC,SACC;AAAA,sDAAC,QAAG,WAAU,gDAA+C,6CAE7D;AAAA,UACA,4CAAC,QAAG,WAAU,0CAAyC,oFAGvD;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF,GACF,GACF;AAEJ;","names":["data"]}
|
|
1
|
+
{"version":3,"sources":["../../../components/tailwind/pricing.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { Check, Zap } from 'lucide-react'\n\nconst FREE_FEATURES = [\n '1 story',\n '10 characters',\n '10 locations',\n '1 timeline',\n 'Image galleries',\n 'Public sharing',\n]\n\nconst PRO_FEATURES = [\n 'Unlimited stories',\n 'Unlimited characters',\n 'Unlimited locations',\n 'Unlimited timelines',\n 'Image galleries',\n 'Public sharing',\n 'Priority support',\n]\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ninterface PricingProps {\n onSubscribe?: () => void\n}\n\nexport const Pricing = ({ onSubscribe }: PricingProps) => {\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<string | null>(null)\n\n const handleSubscribe = async () => {\n if (onSubscribe) {\n onSubscribe()\n return\n }\n setLoading(true)\n setError(null)\n try {\n const response = await fetch('/api/subscription/checkout', {\n method: 'POST',\n })\n if (!response.ok) {\n if (response.status === 401) {\n window.location.href = `/signin?callbackUrl=${encodeURIComponent(window.location.pathname)}`\n return\n }\n const data = (await response.json().catch(() => ({}))) as {\n error?: string\n }\n throw new Error(data.error ?? 'Failed to create checkout session')\n }\n const data = (await response.json()) as { url: string }\n if (data.url) {\n window.location.href = data.url\n }\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : 'Something went wrong. Please try again.',\n )\n } finally {\n setLoading(false)\n }\n }\n\n return (\n <div className=\"bg-gray-900\">\n <main>\n {/* Header */}\n <div className=\"mx-auto mt-16 max-w-7xl px-6 sm:mt-32 lg:px-8\">\n <div className=\"mx-auto max-w-4xl text-center\">\n <h1 className=\"text-base font-semibold leading-7 text-indigo-400\">\n Pricing\n </h1>\n <p className=\"mt-2 text-4xl font-bold tracking-tight text-white sm:text-5xl\">\n Start free. Upgrade when you're ready.\n </p>\n </div>\n <p className=\"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-300\">\n Build your story bible for free. Subscribe for unlimited worlds,\n characters, and creative freedom.\n </p>\n\n {/* Pricing cards */}\n <div className=\"isolate mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-8 lg:mx-0 lg:max-w-none lg:grid-cols-2\">\n {/* Free tier */}\n <div className=\"rounded-3xl p-8 ring-1 ring-white/10 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Preview\n </h2>\n <p className=\"rounded-full bg-white/10 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Free forever\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Explore Story Bible and start building your creative world with\n no commitment.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $0\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <a\n href=\"/signin\"\n className=\"mt-6 block rounded-md bg-white/10 px-3 py-2 text-center text-sm font-semibold leading-6 text-white hover:bg-white/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white\"\n >\n Get started free\n </a>\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {FREE_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n\n {/* Pro tier */}\n <div className=\"rounded-3xl bg-white/5 p-8 ring-2 ring-indigo-500 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Pro\n </h2>\n <p className=\"rounded-full bg-indigo-500 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Most popular\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Unlock unlimited stories, characters, locations, and timelines.\n Build entire universes.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $9.99\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <button\n onClick={handleSubscribe}\n disabled={loading}\n className={classNames(\n 'mt-6 flex w-full items-center justify-center gap-2 rounded-md px-3 py-2 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500',\n loading\n ? 'cursor-not-allowed bg-indigo-400 text-white'\n : 'shadow-2xs bg-indigo-500 text-white hover:bg-indigo-400',\n )}\n >\n <Zap className=\"h-4 w-4\" aria-hidden=\"true\" />\n {loading ? 'Redirecting…' : 'Subscribe — $9.99/mo'}\n </button>\n {error && (\n <p className=\"mt-3 text-center text-sm text-red-400\">{error}</p>\n )}\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {PRO_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n {/* FAQ */}\n <div className=\"mx-auto mt-24 max-w-2xl pb-24\">\n <h2 className=\"text-2xl font-bold leading-10 tracking-tight text-white\">\n Frequently asked questions\n </h2>\n <dl className=\"mt-10 space-y-8\">\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Can I cancel anytime?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Yes. You can cancel at any time from the subscription\n management page. You retain Pro access until the end of your\n current billing period.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n What happens to my data if I downgrade?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Your existing stories and characters are never deleted.\n You'll just be unable to create new ones beyond the\n preview limits until you resubscribe.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Is billing monthly or annually?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Currently monthly only. Annual billing with a discount is\n coming soon.\n </dd>\n </div>\n </dl>\n </div>\n </div>\n </main>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4EU;AA3EV,mBAAyB;AACzB,0BAA2B;AAE3B,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,SAAS,cAAc,SAAmB;AACxC,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAMO,MAAM,UAAU,CAAC,EAAE,YAAY,MAAoB;AACxD,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAC5C,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAwB,IAAI;AAEtD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AC1B;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,eAAY;AAAA;AAAA,cACd;AAAA,cACC;AAAA,iBALM,OAMT,CACD;AAAA;AAAA,QACH;AAAA,SACF;AAAA,OACF;AAAA,IAGA,6CAAC,SAAI,WAAU,iCACb;AAAA,kDAAC,QAAG,WAAU,2DAA0D,wCAExE;AAAA,MACA,6CAAC,QAAG,WAAU,mBACZ;AAAA,qDAAC,SACC;AAAA,sDAAC,QAAG,WAAU,gDAA+C,mCAE7D;AAAA,UACA,4CAAC,QAAG,WAAU,0CAAyC,wJAIvD;AAAA,WACF;AAAA,QACA,6CAAC,SACC;AAAA,sDAAC,QAAG,WAAU,gDAA+C,qDAE7D;AAAA,UACA,4CAAC,QAAG,WAAU,0CAAyC,+JAIvD;AAAA,WACF;AAAA,QACA,6CAAC,SACC;AAAA,sDAAC,QAAG,WAAU,gDAA+C,6CAE7D;AAAA,UACA,4CAAC,QAAG,WAAU,0CAAyC,oFAGvD;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF,GACF,GACF;AAEJ;","names":["data"]}
|
|
@@ -59,7 +59,7 @@ const Pricing = ({ onSubscribe }) => {
|
|
|
59
59
|
});
|
|
60
60
|
if (!response.ok) {
|
|
61
61
|
if (response.status === 401) {
|
|
62
|
-
window.location.href =
|
|
62
|
+
window.location.href = `/signin?callbackUrl=${encodeURIComponent(window.location.pathname)}`;
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
const data2 = yield response.json().catch(() => ({}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/tailwind/pricing.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { Check, Zap } from 'lucide-react'\n\nconst FREE_FEATURES = [\n '1 story',\n '10 characters',\n '10 locations',\n '1 timeline',\n 'Image galleries',\n 'Public sharing',\n]\n\nconst PRO_FEATURES = [\n 'Unlimited stories',\n 'Unlimited characters',\n 'Unlimited locations',\n 'Unlimited timelines',\n 'Image galleries',\n 'Public sharing',\n 'Priority support',\n]\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ninterface PricingProps {\n onSubscribe?: () => void\n}\n\nexport const Pricing = ({ onSubscribe }: PricingProps) => {\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<string | null>(null)\n\n const handleSubscribe = async () => {\n if (onSubscribe) {\n onSubscribe()\n return\n }\n setLoading(true)\n setError(null)\n try {\n const response = await fetch('/api/subscription/checkout', {\n method: 'POST',\n })\n if (!response.ok) {\n if (response.status === 401) {\n window.location.href = '/signin?redirect=/about/pricing'\n return\n }\n const data = (await response.json().catch(() => ({}))) as {\n error?: string\n }\n throw new Error(data.error ?? 'Failed to create checkout session')\n }\n const data = (await response.json()) as { url: string }\n if (data.url) {\n window.location.href = data.url\n }\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : 'Something went wrong. Please try again.',\n )\n } finally {\n setLoading(false)\n }\n }\n\n return (\n <div className=\"bg-gray-900\">\n <main>\n {/* Header */}\n <div className=\"mx-auto mt-16 max-w-7xl px-6 sm:mt-32 lg:px-8\">\n <div className=\"mx-auto max-w-4xl text-center\">\n <h1 className=\"text-base font-semibold leading-7 text-indigo-400\">\n Pricing\n </h1>\n <p className=\"mt-2 text-4xl font-bold tracking-tight text-white sm:text-5xl\">\n Start free. Upgrade when you're ready.\n </p>\n </div>\n <p className=\"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-300\">\n Build your story bible for free. Subscribe for unlimited worlds,\n characters, and creative freedom.\n </p>\n\n {/* Pricing cards */}\n <div className=\"isolate mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-8 lg:mx-0 lg:max-w-none lg:grid-cols-2\">\n {/* Free tier */}\n <div className=\"rounded-3xl p-8 ring-1 ring-white/10 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Preview\n </h2>\n <p className=\"rounded-full bg-white/10 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Free forever\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Explore Story Bible and start building your creative world with\n no commitment.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $0\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <a\n href=\"/signin\"\n className=\"mt-6 block rounded-md bg-white/10 px-3 py-2 text-center text-sm font-semibold leading-6 text-white hover:bg-white/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white\"\n >\n Get started free\n </a>\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {FREE_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n\n {/* Pro tier */}\n <div className=\"rounded-3xl bg-white/5 p-8 ring-2 ring-indigo-500 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Pro\n </h2>\n <p className=\"rounded-full bg-indigo-500 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Most popular\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Unlock unlimited stories, characters, locations, and timelines.\n Build entire universes.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $9.99\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <button\n onClick={handleSubscribe}\n disabled={loading}\n className={classNames(\n 'mt-6 flex w-full items-center justify-center gap-2 rounded-md px-3 py-2 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500',\n loading\n ? 'cursor-not-allowed bg-indigo-400 text-white'\n : 'shadow-2xs bg-indigo-500 text-white hover:bg-indigo-400',\n )}\n >\n <Zap className=\"h-4 w-4\" aria-hidden=\"true\" />\n {loading ? 'Redirecting…' : 'Subscribe — $9.99/mo'}\n </button>\n {error && (\n <p className=\"mt-3 text-center text-sm text-red-400\">{error}</p>\n )}\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {PRO_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n {/* FAQ */}\n <div className=\"mx-auto mt-24 max-w-2xl pb-24\">\n <h2 className=\"text-2xl font-bold leading-10 tracking-tight text-white\">\n Frequently asked questions\n </h2>\n <dl className=\"mt-10 space-y-8\">\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Can I cancel anytime?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Yes. You can cancel at any time from the subscription\n management page. You retain Pro access until the end of your\n current billing period.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n What happens to my data if I downgrade?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Your existing stories and characters are never deleted.\n You'll just be unable to create new ones beyond the\n preview limits until you resubscribe.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Is billing monthly or annually?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Currently monthly only. Annual billing with a discount is\n coming soon.\n </dd>\n </div>\n </dl>\n </div>\n </div>\n </main>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4EU,SACE,KADF;AA3EV,SAAS,gBAAgB;AACzB,SAAS,OAAO,WAAW;AAE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AA,YACC,SAAS;AAAA,YACT,UAAU;AAAA,YACV,WAAW;AAAA,cACT;AAAA,cACA,UACI,gDACA;AAAA,YACN;AAAA,YAEA;AAAA,kCAAC,OAAI,WAAU,WAAU,eAAY,QAAO;AAAA,cAC3C,UAAU,sBAAiB;AAAA;AAAA;AAAA,QAC9B;AAAA,QACC,SACC,oBAAC,OAAE,WAAU,yCAAyC,iBAAM;AAAA,QAE9D;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAU;AAAA,YAET,uBAAa,IAAI,CAAC,YACjB,qBAAC,QAAiB,WAAU,gBAC1B;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,eAAY;AAAA;AAAA,cACd;AAAA,cACC;AAAA,iBALM,OAMT,CACD;AAAA;AAAA,QACH;AAAA,SACF;AAAA,OACF;AAAA,IAGA,qBAAC,SAAI,WAAU,iCACb;AAAA,0BAAC,QAAG,WAAU,2DAA0D,wCAExE;AAAA,MACA,qBAAC,QAAG,WAAU,mBACZ;AAAA,6BAAC,SACC;AAAA,8BAAC,QAAG,WAAU,gDAA+C,mCAE7D;AAAA,UACA,oBAAC,QAAG,WAAU,0CAAyC,wJAIvD;AAAA,WACF;AAAA,QACA,qBAAC,SACC;AAAA,8BAAC,QAAG,WAAU,gDAA+C,qDAE7D;AAAA,UACA,oBAAC,QAAG,WAAU,0CAAyC,+JAIvD;AAAA,WACF;AAAA,QACA,qBAAC,SACC;AAAA,8BAAC,QAAG,WAAU,gDAA+C,6CAE7D;AAAA,UACA,oBAAC,QAAG,WAAU,0CAAyC,oFAGvD;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF,GACF,GACF;AAEJ;","names":["data"]}
|
|
1
|
+
{"version":3,"sources":["../../../components/tailwind/pricing.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { Check, Zap } from 'lucide-react'\n\nconst FREE_FEATURES = [\n '1 story',\n '10 characters',\n '10 locations',\n '1 timeline',\n 'Image galleries',\n 'Public sharing',\n]\n\nconst PRO_FEATURES = [\n 'Unlimited stories',\n 'Unlimited characters',\n 'Unlimited locations',\n 'Unlimited timelines',\n 'Image galleries',\n 'Public sharing',\n 'Priority support',\n]\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ninterface PricingProps {\n onSubscribe?: () => void\n}\n\nexport const Pricing = ({ onSubscribe }: PricingProps) => {\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<string | null>(null)\n\n const handleSubscribe = async () => {\n if (onSubscribe) {\n onSubscribe()\n return\n }\n setLoading(true)\n setError(null)\n try {\n const response = await fetch('/api/subscription/checkout', {\n method: 'POST',\n })\n if (!response.ok) {\n if (response.status === 401) {\n window.location.href = `/signin?callbackUrl=${encodeURIComponent(window.location.pathname)}`\n return\n }\n const data = (await response.json().catch(() => ({}))) as {\n error?: string\n }\n throw new Error(data.error ?? 'Failed to create checkout session')\n }\n const data = (await response.json()) as { url: string }\n if (data.url) {\n window.location.href = data.url\n }\n } catch (err) {\n setError(\n err instanceof Error\n ? err.message\n : 'Something went wrong. Please try again.',\n )\n } finally {\n setLoading(false)\n }\n }\n\n return (\n <div className=\"bg-gray-900\">\n <main>\n {/* Header */}\n <div className=\"mx-auto mt-16 max-w-7xl px-6 sm:mt-32 lg:px-8\">\n <div className=\"mx-auto max-w-4xl text-center\">\n <h1 className=\"text-base font-semibold leading-7 text-indigo-400\">\n Pricing\n </h1>\n <p className=\"mt-2 text-4xl font-bold tracking-tight text-white sm:text-5xl\">\n Start free. Upgrade when you're ready.\n </p>\n </div>\n <p className=\"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-300\">\n Build your story bible for free. Subscribe for unlimited worlds,\n characters, and creative freedom.\n </p>\n\n {/* Pricing cards */}\n <div className=\"isolate mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-8 lg:mx-0 lg:max-w-none lg:grid-cols-2\">\n {/* Free tier */}\n <div className=\"rounded-3xl p-8 ring-1 ring-white/10 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Preview\n </h2>\n <p className=\"rounded-full bg-white/10 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Free forever\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Explore Story Bible and start building your creative world with\n no commitment.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $0\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <a\n href=\"/signin\"\n className=\"mt-6 block rounded-md bg-white/10 px-3 py-2 text-center text-sm font-semibold leading-6 text-white hover:bg-white/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white\"\n >\n Get started free\n </a>\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {FREE_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n\n {/* Pro tier */}\n <div className=\"rounded-3xl bg-white/5 p-8 ring-2 ring-indigo-500 xl:p-10\">\n <div className=\"flex items-center justify-between gap-x-4\">\n <h2 className=\"text-lg font-semibold leading-8 text-white\">\n Pro\n </h2>\n <p className=\"rounded-full bg-indigo-500 px-2.5 py-1 text-xs font-semibold leading-5 text-white\">\n Most popular\n </p>\n </div>\n <p className=\"mt-4 text-sm leading-6 text-gray-300\">\n Unlock unlimited stories, characters, locations, and timelines.\n Build entire universes.\n </p>\n <p className=\"mt-6 flex items-baseline gap-x-1\">\n <span className=\"text-4xl font-bold tracking-tight text-white\">\n $9.99\n </span>\n <span className=\"text-sm font-semibold leading-6 text-gray-300\">\n /month\n </span>\n </p>\n <button\n onClick={handleSubscribe}\n disabled={loading}\n className={classNames(\n 'mt-6 flex w-full items-center justify-center gap-2 rounded-md px-3 py-2 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500',\n loading\n ? 'cursor-not-allowed bg-indigo-400 text-white'\n : 'shadow-2xs bg-indigo-500 text-white hover:bg-indigo-400',\n )}\n >\n <Zap className=\"h-4 w-4\" aria-hidden=\"true\" />\n {loading ? 'Redirecting…' : 'Subscribe — $9.99/mo'}\n </button>\n {error && (\n <p className=\"mt-3 text-center text-sm text-red-400\">{error}</p>\n )}\n <ul\n role=\"list\"\n className=\"mt-8 space-y-3 text-sm leading-6 text-gray-300 xl:mt-10\"\n >\n {PRO_FEATURES.map((feature) => (\n <li key={feature} className=\"flex gap-x-3\">\n <Check\n className=\"h-6 w-5 flex-none text-white\"\n aria-hidden=\"true\"\n />\n {feature}\n </li>\n ))}\n </ul>\n </div>\n </div>\n\n {/* FAQ */}\n <div className=\"mx-auto mt-24 max-w-2xl pb-24\">\n <h2 className=\"text-2xl font-bold leading-10 tracking-tight text-white\">\n Frequently asked questions\n </h2>\n <dl className=\"mt-10 space-y-8\">\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Can I cancel anytime?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Yes. You can cancel at any time from the subscription\n management page. You retain Pro access until the end of your\n current billing period.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n What happens to my data if I downgrade?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Your existing stories and characters are never deleted.\n You'll just be unable to create new ones beyond the\n preview limits until you resubscribe.\n </dd>\n </div>\n <div>\n <dt className=\"text-base font-semibold leading-7 text-white\">\n Is billing monthly or annually?\n </dt>\n <dd className=\"mt-2 text-base leading-7 text-gray-300\">\n Currently monthly only. Annual billing with a discount is\n coming soon.\n </dd>\n </div>\n </dl>\n </div>\n </div>\n </main>\n </div>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