@medialane/ui 0.145.1 → 0.146.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/collapsible-section.cjs +69 -0
- package/dist/components/collapsible-section.cjs.map +1 -0
- package/dist/components/collapsible-section.d.cts +15 -0
- package/dist/components/collapsible-section.d.ts +15 -0
- package/dist/components/collapsible-section.js +45 -0
- package/dist/components/collapsible-section.js.map +1 -0
- package/dist/components/drop-create-form.cjs +341 -0
- package/dist/components/drop-create-form.cjs.map +1 -0
- package/dist/components/drop-create-form.d.cts +39 -0
- package/dist/components/drop-create-form.d.ts +39 -0
- package/dist/components/drop-create-form.js +322 -0
- package/dist/components/drop-create-form.js.map +1 -0
- package/dist/components/drop-preview-card.cjs +106 -0
- package/dist/components/drop-preview-card.cjs.map +1 -0
- package/dist/components/drop-preview-card.d.cts +17 -0
- package/dist/components/drop-preview-card.d.ts +17 -0
- package/dist/components/drop-preview-card.js +82 -0
- package/dist/components/drop-preview-card.js.map +1 -0
- package/dist/components/drop-preview-card.test.cjs +84 -0
- package/dist/components/drop-preview-card.test.cjs.map +1 -0
- package/dist/components/drop-preview-card.test.d.cts +2 -0
- package/dist/components/drop-preview-card.test.d.ts +2 -0
- package/dist/components/drop-preview-card.test.js +83 -0
- package/dist/components/drop-preview-card.test.js.map +1 -0
- package/dist/components/drop-status-display.cjs +103 -0
- package/dist/components/drop-status-display.cjs.map +1 -0
- package/dist/components/drop-status-display.d.cts +15 -0
- package/dist/components/drop-status-display.d.ts +15 -0
- package/dist/components/drop-status-display.js +77 -0
- package/dist/components/drop-status-display.js.map +1 -0
- package/dist/components/drop-status-display.test.cjs +29 -0
- package/dist/components/drop-status-display.test.cjs.map +1 -0
- package/dist/components/drop-status-display.test.d.cts +2 -0
- package/dist/components/drop-status-display.test.d.ts +2 -0
- package/dist/components/drop-status-display.test.js +28 -0
- package/dist/components/drop-status-display.test.js.map +1 -0
- package/dist/components/exclusive-content-section.cjs +88 -0
- package/dist/components/exclusive-content-section.cjs.map +1 -0
- package/dist/components/exclusive-content-section.d.cts +10 -0
- package/dist/components/exclusive-content-section.d.ts +10 -0
- package/dist/components/exclusive-content-section.js +64 -0
- package/dist/components/exclusive-content-section.js.map +1 -0
- package/dist/data/drop-create-schema.cjs +8 -1
- package/dist/data/drop-create-schema.cjs.map +1 -1
- package/dist/data/drop-create-schema.d.cts +20 -0
- package/dist/data/drop-create-schema.d.ts +20 -0
- package/dist/data/drop-create-schema.js +8 -1
- package/dist/data/drop-create-schema.js.map +1 -1
- package/dist/data/gated-content-types.cjs +39 -0
- package/dist/data/gated-content-types.cjs.map +1 -0
- package/dist/data/gated-content-types.d.cts +12 -0
- package/dist/data/gated-content-types.d.ts +12 -0
- package/dist/data/gated-content-types.js +14 -0
- package/dist/data/gated-content-types.js.map +1 -0
- package/dist/index.cjs +27 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/drop-status.cjs +37 -0
- package/dist/utils/drop-status.cjs.map +1 -0
- package/dist/utils/drop-status.d.cts +12 -0
- package/dist/utils/drop-status.d.ts +12 -0
- package/dist/utils/drop-status.js +13 -0
- package/dist/utils/drop-status.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var exclusive_content_section_exports = {};
|
|
21
|
+
__export(exclusive_content_section_exports, {
|
|
22
|
+
ExclusiveContentSection: () => ExclusiveContentSection
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(exclusive_content_section_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_lucide_react = require("lucide-react");
|
|
27
|
+
var import_form = require("./form.js");
|
|
28
|
+
var import_input = require("./input.js");
|
|
29
|
+
var import_select = require("./select.js");
|
|
30
|
+
var import_switch = require("./switch.js");
|
|
31
|
+
var import_collapsible_section = require("./collapsible-section.js");
|
|
32
|
+
var import_gated_content_types = require("../data/gated-content-types.js");
|
|
33
|
+
const CONTENT_TYPES = Object.keys(import_gated_content_types.GATED_CONTENT_TYPES).map((value) => ({
|
|
34
|
+
value,
|
|
35
|
+
label: value.charAt(0) + value.slice(1).toLowerCase()
|
|
36
|
+
}));
|
|
37
|
+
function ExclusiveContentSection({ form }) {
|
|
38
|
+
const gatedEnabled = form.watch("gatedEnabled");
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
|
+
import_collapsible_section.CollapsibleSection,
|
|
41
|
+
{
|
|
42
|
+
open: gatedEnabled,
|
|
43
|
+
onOpenChange: (o) => form.setValue("gatedEnabled", o),
|
|
44
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Lock, { className: "h-4 w-4 text-primary" }),
|
|
45
|
+
label: "Exclusive Content",
|
|
46
|
+
hint: gatedEnabled ? "Holders get a locked tab with this content" : "Optional \xB7 reward holders with gated content",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Reward your holders with exclusive access \u2014 video, audio, documents, or any link. Only verified token holders can access this content." }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium", children: "Enable exclusive content" }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
+
import_switch.Switch,
|
|
53
|
+
{
|
|
54
|
+
checked: gatedEnabled,
|
|
55
|
+
onCheckedChange: (checked) => form.setValue("gatedEnabled", checked)
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] }),
|
|
59
|
+
gatedEnabled && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "gatedContentTitle", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Content title" }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { placeholder: "e.g. Behind-the-scenes footage", ...field }) }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
64
|
+
] }) }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "gatedContentUrl", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Content URL" }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { placeholder: "https://\u2026", ...field }) }),
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormDescription, { children: "Only holders will see this URL. Use a private or unlisted link." }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
70
|
+
] }) }),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormField, { control: form.control, name: "gatedContentType", render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Content type" }),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { value: field.value, onValueChange: field.onChange, children: [
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, { placeholder: "Select type" }) }) }),
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectContent, { children: CONTENT_TYPES.map(({ value, label }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { value, children: label }, value)) })
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
78
|
+
] }) })
|
|
79
|
+
] })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
ExclusiveContentSection
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=exclusive-content-section.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/exclusive-content-section.tsx"],"sourcesContent":["\"use client\";\n\nimport type { UseFormReturn } from \"react-hook-form\";\nimport { Lock } from \"lucide-react\";\nimport { FormControl, FormField, FormItem, FormLabel, FormMessage, FormDescription } from \"./form.js\";\nimport { Input } from \"./input.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"./select.js\";\nimport { Switch } from \"./switch.js\";\nimport { CollapsibleSection } from \"./collapsible-section.js\";\nimport { GATED_CONTENT_TYPES } from \"../data/gated-content-types.js\";\nimport type { DropCreateFormValues } from \"../data/drop-create-schema.js\";\n\nconst CONTENT_TYPES = Object.keys(GATED_CONTENT_TYPES).map((value) => ({\n value,\n label: value.charAt(0) + value.slice(1).toLowerCase(),\n}));\n\nexport function ExclusiveContentSection({ form }: { form: UseFormReturn<DropCreateFormValues> }) {\n const gatedEnabled = form.watch(\"gatedEnabled\");\n\n return (\n <CollapsibleSection\n open={gatedEnabled}\n onOpenChange={(o) => form.setValue(\"gatedEnabled\", o)}\n icon={<Lock className=\"h-4 w-4 text-primary\" />}\n label=\"Exclusive Content\"\n hint={gatedEnabled ? \"Holders get a locked tab with this content\" : \"Optional · reward holders with gated content\"}\n >\n <p className=\"text-xs text-muted-foreground\">\n Reward your holders with exclusive access — video, audio, documents, or any link.\n Only verified token holders can access this content.\n </p>\n\n <div className=\"flex items-center justify-between\">\n <p className=\"text-sm font-medium\">Enable exclusive content</p>\n <Switch\n checked={gatedEnabled}\n onCheckedChange={(checked) => form.setValue(\"gatedEnabled\", checked)}\n />\n </div>\n\n {gatedEnabled && (\n <>\n <FormField control={form.control} name=\"gatedContentTitle\" render={({ field }) => (\n <FormItem>\n <FormLabel>Content title</FormLabel>\n <FormControl><Input placeholder=\"e.g. Behind-the-scenes footage\" {...field} /></FormControl>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"gatedContentUrl\" render={({ field }) => (\n <FormItem>\n <FormLabel>Content URL</FormLabel>\n <FormControl><Input placeholder=\"https://…\" {...field} /></FormControl>\n <FormDescription>Only holders will see this URL. Use a private or unlisted link.</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"gatedContentType\" render={({ field }) => (\n <FormItem>\n <FormLabel>Content type</FormLabel>\n <Select value={field.value} onValueChange={field.onChange}>\n <FormControl><SelectTrigger><SelectValue placeholder=\"Select type\" /></SelectTrigger></FormControl>\n <SelectContent>\n {CONTENT_TYPES.map(({ value, label }) => <SelectItem key={value} value={value}>{label}</SelectItem>)}\n </SelectContent>\n </Select>\n <FormMessage />\n </FormItem>\n )} />\n </>\n )}\n </CollapsibleSection>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBY;AArBZ,0BAAqB;AACrB,kBAA0F;AAC1F,mBAAsB;AACtB,oBAA8E;AAC9E,oBAAuB;AACvB,iCAAmC;AACnC,iCAAoC;AAGpC,MAAM,gBAAgB,OAAO,KAAK,8CAAmB,EAAE,IAAI,CAAC,WAAW;AAAA,EACrE;AAAA,EACA,OAAO,MAAM,OAAO,CAAC,IAAI,MAAM,MAAM,CAAC,EAAE,YAAY;AACtD,EAAE;AAEK,SAAS,wBAAwB,EAAE,KAAK,GAAkD;AAC/F,QAAM,eAAe,KAAK,MAAM,cAAc;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc,CAAC,MAAM,KAAK,SAAS,gBAAgB,CAAC;AAAA,MACpD,MAAM,4CAAC,4BAAK,WAAU,wBAAuB;AAAA,MAC7C,OAAM;AAAA,MACN,MAAM,eAAe,+CAA+C;AAAA,MAEpE;AAAA,oDAAC,OAAE,WAAU,iCAAgC,yJAG7C;AAAA,QAEA,6CAAC,SAAI,WAAU,qCACb;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1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
+
import { DropCreateFormValues } from '../data/drop-create-schema.cjs';
|
|
4
|
+
import 'zod';
|
|
5
|
+
|
|
6
|
+
declare function ExclusiveContentSection({ form }: {
|
|
7
|
+
form: UseFormReturn<DropCreateFormValues>;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { ExclusiveContentSection };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
+
import { DropCreateFormValues } from '../data/drop-create-schema.js';
|
|
4
|
+
import 'zod';
|
|
5
|
+
|
|
6
|
+
declare function ExclusiveContentSection({ form }: {
|
|
7
|
+
form: UseFormReturn<DropCreateFormValues>;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { ExclusiveContentSection };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Lock } from "lucide-react";
|
|
4
|
+
import { FormControl, FormField, FormItem, FormLabel, FormMessage, FormDescription } from "./form.js";
|
|
5
|
+
import { Input } from "./input.js";
|
|
6
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
|
|
7
|
+
import { Switch } from "./switch.js";
|
|
8
|
+
import { CollapsibleSection } from "./collapsible-section.js";
|
|
9
|
+
import { GATED_CONTENT_TYPES } from "../data/gated-content-types.js";
|
|
10
|
+
const CONTENT_TYPES = Object.keys(GATED_CONTENT_TYPES).map((value) => ({
|
|
11
|
+
value,
|
|
12
|
+
label: value.charAt(0) + value.slice(1).toLowerCase()
|
|
13
|
+
}));
|
|
14
|
+
function ExclusiveContentSection({ form }) {
|
|
15
|
+
const gatedEnabled = form.watch("gatedEnabled");
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
CollapsibleSection,
|
|
18
|
+
{
|
|
19
|
+
open: gatedEnabled,
|
|
20
|
+
onOpenChange: (o) => form.setValue("gatedEnabled", o),
|
|
21
|
+
icon: /* @__PURE__ */ jsx(Lock, { className: "h-4 w-4 text-primary" }),
|
|
22
|
+
label: "Exclusive Content",
|
|
23
|
+
hint: gatedEnabled ? "Holders get a locked tab with this content" : "Optional \xB7 reward holders with gated content",
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Reward your holders with exclusive access \u2014 video, audio, documents, or any link. Only verified token holders can access this content." }),
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
27
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Enable exclusive content" }),
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
Switch,
|
|
30
|
+
{
|
|
31
|
+
checked: gatedEnabled,
|
|
32
|
+
onCheckedChange: (checked) => form.setValue("gatedEnabled", checked)
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] }),
|
|
36
|
+
gatedEnabled && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
37
|
+
/* @__PURE__ */ jsx(FormField, { control: form.control, name: "gatedContentTitle", render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
38
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Content title" }),
|
|
39
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { placeholder: "e.g. Behind-the-scenes footage", ...field }) }),
|
|
40
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
41
|
+
] }) }),
|
|
42
|
+
/* @__PURE__ */ jsx(FormField, { control: form.control, name: "gatedContentUrl", render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
43
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Content URL" }),
|
|
44
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, { placeholder: "https://\u2026", ...field }) }),
|
|
45
|
+
/* @__PURE__ */ jsx(FormDescription, { children: "Only holders will see this URL. Use a private or unlisted link." }),
|
|
46
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
47
|
+
] }) }),
|
|
48
|
+
/* @__PURE__ */ jsx(FormField, { control: form.control, name: "gatedContentType", render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
49
|
+
/* @__PURE__ */ jsx(FormLabel, { children: "Content type" }),
|
|
50
|
+
/* @__PURE__ */ jsxs(Select, { value: field.value, onValueChange: field.onChange, children: [
|
|
51
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select type" }) }) }),
|
|
52
|
+
/* @__PURE__ */ jsx(SelectContent, { children: CONTENT_TYPES.map(({ value, label }) => /* @__PURE__ */ jsx(SelectItem, { value, children: label }, value)) })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
55
|
+
] }) })
|
|
56
|
+
] })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
ExclusiveContentSection
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=exclusive-content-section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/exclusive-content-section.tsx"],"sourcesContent":["\"use client\";\n\nimport type { UseFormReturn } from \"react-hook-form\";\nimport { Lock } from \"lucide-react\";\nimport { FormControl, FormField, FormItem, FormLabel, FormMessage, FormDescription } from \"./form.js\";\nimport { Input } from \"./input.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"./select.js\";\nimport { Switch } from \"./switch.js\";\nimport { CollapsibleSection } from \"./collapsible-section.js\";\nimport { GATED_CONTENT_TYPES } from \"../data/gated-content-types.js\";\nimport type { DropCreateFormValues } from \"../data/drop-create-schema.js\";\n\nconst CONTENT_TYPES = Object.keys(GATED_CONTENT_TYPES).map((value) => ({\n value,\n label: value.charAt(0) + value.slice(1).toLowerCase(),\n}));\n\nexport function ExclusiveContentSection({ form }: { form: UseFormReturn<DropCreateFormValues> }) {\n const gatedEnabled = form.watch(\"gatedEnabled\");\n\n return (\n <CollapsibleSection\n open={gatedEnabled}\n onOpenChange={(o) => form.setValue(\"gatedEnabled\", o)}\n icon={<Lock className=\"h-4 w-4 text-primary\" />}\n label=\"Exclusive Content\"\n hint={gatedEnabled ? \"Holders get a locked tab with this content\" : \"Optional · reward holders with gated content\"}\n >\n <p className=\"text-xs text-muted-foreground\">\n Reward your holders with exclusive access — video, audio, documents, or any link.\n Only verified token holders can access this content.\n </p>\n\n <div className=\"flex items-center justify-between\">\n <p className=\"text-sm font-medium\">Enable exclusive content</p>\n <Switch\n checked={gatedEnabled}\n onCheckedChange={(checked) => form.setValue(\"gatedEnabled\", checked)}\n />\n </div>\n\n {gatedEnabled && (\n <>\n <FormField control={form.control} name=\"gatedContentTitle\" render={({ field }) => (\n <FormItem>\n <FormLabel>Content title</FormLabel>\n <FormControl><Input placeholder=\"e.g. Behind-the-scenes footage\" {...field} /></FormControl>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"gatedContentUrl\" render={({ field }) => (\n <FormItem>\n <FormLabel>Content URL</FormLabel>\n <FormControl><Input placeholder=\"https://…\" {...field} /></FormControl>\n <FormDescription>Only holders will see this URL. Use a private or unlisted link.</FormDescription>\n <FormMessage />\n </FormItem>\n )} />\n\n <FormField control={form.control} name=\"gatedContentType\" render={({ field }) => (\n <FormItem>\n <FormLabel>Content type</FormLabel>\n <Select value={field.value} onValueChange={field.onChange}>\n <FormControl><SelectTrigger><SelectValue placeholder=\"Select type\" /></SelectTrigger></FormControl>\n <SelectContent>\n {CONTENT_TYPES.map(({ value, label }) => <SelectItem key={value} value={value}>{label}</SelectItem>)}\n </SelectContent>\n </Select>\n <FormMessage />\n </FormItem>\n )} />\n </>\n )}\n </CollapsibleSection>\n );\n}\n"],"mappings":";AAwBY,SAkBJ,UAlBI,KASN,YATM;AArBZ,SAAS,YAAY;AACrB,SAAS,aAAa,WAAW,UAAU,WAAW,aAAa,uBAAuB;AAC1F,SAAS,aAAa;AACtB,SAAS,QAAQ,eAAe,YAAY,eAAe,mBAAmB;AAC9E,SAAS,cAAc;AACvB,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AAGpC,MAAM,gBAAgB,OAAO,KAAK,mBAAmB,EAAE,IAAI,CAAC,WAAW;AAAA,EACrE;AAAA,EACA,OAAO,MAAM,OAAO,CAAC,IAAI,MAAM,MAAM,CAAC,EAAE,YAAY;AACtD,EAAE;AAEK,SAAS,wBAAwB,EAAE,KAAK,GAAkD;AAC/F,QAAM,eAAe,KAAK,MAAM,cAAc;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc,CAAC,MAAM,KAAK,SAAS,gBAAgB,CAAC;AAAA,MACpD,MAAM,oBAAC,QAAK,WAAU,wBAAuB;AAAA,MAC7C,OAAM;AAAA,MACN,MAAM,eAAe,+CAA+C;AAAA,MAEpE;AAAA,4BAAC,OAAE,WAAU,iCAAgC,yJAG7C;AAAA,QAEA,qBAAC,SAAI,WAAU,qCACb;AAAA,8BAAC,OAAE,WAAU,uBAAsB,sCAAwB;AAAA,UAC3D;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,cACT,iBAAiB,CAAC,YAAY,KAAK,SAAS,gBAAgB,OAAO;AAAA;AAAA,UACrE;AAAA,WACF;AAAA,QAEC,gBACC,iCACE;AAAA,8BAAC,aAAU,SAAS,KAAK,SAAS,MAAK,qBAAoB,QAAQ,CAAC,EAAE,MAAM,MAC1E,qBAAC,YACC;AAAA,gCAAC,aAAU,2BAAa;AAAA,YACxB,oBAAC,eAAY,8BAAC,SAAM,aAAY,kCAAkC,GAAG,OAAO,GAAE;AAAA,YAC9E,oBAAC,eAAY;AAAA,aACf,GACC;AAAA,UAEH,oBAAC,aAAU,SAAS,KAAK,SAAS,MAAK,mBAAkB,QAAQ,CAAC,EAAE,MAAM,MACxE,qBAAC,YACC;AAAA,gCAAC,aAAU,yBAAW;AAAA,YACtB,oBAAC,eAAY,8BAAC,SAAM,aAAY,kBAAa,GAAG,OAAO,GAAE;AAAA,YACzD,oBAAC,mBAAgB,6EAA+D;AAAA,YAChF,oBAAC,eAAY;AAAA,aACf,GACC;AAAA,UAEH,oBAAC,aAAU,SAAS,KAAK,SAAS,MAAK,oBAAmB,QAAQ,CAAC,EAAE,MAAM,MACzE,qBAAC,YACC;AAAA,gCAAC,aAAU,0BAAY;AAAA,YACvB,qBAAC,UAAO,OAAO,MAAM,OAAO,eAAe,MAAM,UAC/C;AAAA,kCAAC,eAAY,8BAAC,iBAAc,8BAAC,eAAY,aAAY,eAAc,GAAE,GAAgB;AAAA,cACrF,oBAAC,iBACE,wBAAc,IAAI,CAAC,EAAE,OAAO,MAAM,MAAM,oBAAC,cAAuB,OAAe,mBAAtB,KAA4B,CAAa,GACrG;AAAA,eACF;AAAA,YACA,oBAAC,eAAY;AAAA,aACf,GACC;AAAA,WACL;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -58,7 +58,11 @@ const dropCreateSchema = z.object({
|
|
|
58
58
|
endTime: z.string().default("23:59"),
|
|
59
59
|
maxPerWallet: z.string().regex(/^\d+$/, "Must be a positive integer").refine((v) => parseInt(v, 10) >= 1, "Minimum 1").default("1"),
|
|
60
60
|
whitelistEnabled: z.boolean().default(false),
|
|
61
|
-
allowlistAddresses: z.string().default("")
|
|
61
|
+
allowlistAddresses: z.string().default(""),
|
|
62
|
+
gatedEnabled: z.boolean().default(false),
|
|
63
|
+
gatedContentTitle: z.string().max(100).default(""),
|
|
64
|
+
gatedContentUrl: z.string().default(""),
|
|
65
|
+
gatedContentType: z.string().default("")
|
|
62
66
|
}).superRefine((values, ctx) => {
|
|
63
67
|
const start = parseDateTime(values.startDate, values.startTime);
|
|
64
68
|
const end = parseDateTime(values.endDate, values.endTime);
|
|
@@ -77,6 +81,9 @@ const dropCreateSchema = z.object({
|
|
|
77
81
|
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ["allowlistAddresses"], message: "Add at least one address, or turn the whitelist off" });
|
|
78
82
|
}
|
|
79
83
|
}
|
|
84
|
+
if (values.gatedEnabled && values.gatedContentUrl.trim() === "") {
|
|
85
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ["gatedContentUrl"], message: "Add a content URL, or turn exclusive content off" });
|
|
86
|
+
}
|
|
80
87
|
});
|
|
81
88
|
// Annotate the CommonJS export names for ESM import in node:
|
|
82
89
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/data/drop-create-schema.ts"],"sourcesContent":["\"use client\";\n\nimport * as z from \"zod\";\nimport { IP_TYPES } from \"./ip.js\";\n\nfunction parseDateTime(date: string, time: string): number | null {\n const t = new Date(`${date}T${time}:00`).getTime();\n return Number.isNaN(t) ? null : t;\n}\n\nexport const dropCreateSchema = z\n .object({\n name: z.string().min(1, \"Collection name required\").max(100),\n symbol: z\n .string()\n .min(1, \"Symbol required\")\n .max(10)\n .regex(/^[A-Z0-9]+$/, \"Uppercase letters and numbers only\"),\n\n ipType: z.enum(IP_TYPES),\n licenseType: z.string().min(1, \"License required\"),\n commercialUse: z.string().default(\"\"),\n derivatives: z.string().default(\"\"),\n attribution: z.string().default(\"\"),\n geographicScope: z.string().default(\"Worldwide\"),\n aiPolicy: z.string().default(\"\"),\n royalty: z.coerce.number().min(0).max(50).default(0),\n descriptionTemplate: z.string().max(500).optional(),\n\n priceAmount: z\n .string()\n .default(\"\")\n .refine((v: string) => v === \"\" || !Number.isNaN(Number(v)), \"Enter a valid price\")\n .refine((v: string) => v === \"\" || Number(v) >= 0, \"Price must be zero or greater\"),\n paymentToken: z.string(),\n startDate: z.string().min(1, \"Start date required\"),\n startTime: z.string().default(\"00:00\"),\n endDate: z.string().min(1, \"End date required\"),\n endTime: z.string().default(\"23:59\"),\n maxPerWallet: z\n .string()\n .regex(/^\\d+$/, \"Must be a positive integer\")\n .refine((v: string) => parseInt(v, 10) >= 1, \"Minimum 1\")\n .default(\"1\"),\n\n whitelistEnabled: z.boolean().default(false),\n allowlistAddresses: z.string().default(\"\"),\n })\n .superRefine((values, ctx) => {\n const start = parseDateTime(values.startDate, values.startTime);\n const end = parseDateTime(values.endDate, values.endTime);\n if (start === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"startDate\"], message: \"Enter a valid start date and time\" });\n }\n if (end === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"Enter a valid end date and time\" });\n }\n if (start !== null && end !== null && end <= start) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"End time must be after the start time\" });\n }\n\n if (values.whitelistEnabled) {\n const addrs = values.allowlistAddresses.split(/[\\n,\\s]+/).map((a) => a.trim()).filter(Boolean);\n if (addrs.length === 0) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"allowlistAddresses\"], message: \"Add at least one address, or turn the whitelist off\" });\n }\n }\n });\n\nexport type DropCreateFormValues = z.infer<typeof dropCreateSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,QAAmB;AACnB,gBAAyB;AAEzB,SAAS,cAAc,MAAc,MAA6B;AAChE,QAAM,KAAI,oBAAI,KAAK,GAAG,IAAI,IAAI,IAAI,KAAK,GAAE,QAAQ;AACjD,SAAO,OAAO,MAAM,CAAC,IAAI,OAAO;AAClC;AAEO,MAAM,mBAAmB,EAC7B,OAAO;AAAA,EACN,MAAM,EAAE,OA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AA,EAEd,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EAC3C,oBAAoB,EAAE,OAAO,EAAE,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../src/data/drop-create-schema.ts"],"sourcesContent":["\"use client\";\n\nimport * as z from \"zod\";\nimport { IP_TYPES } from \"./ip.js\";\n\nfunction parseDateTime(date: string, time: string): number | null {\n const t = new Date(`${date}T${time}:00`).getTime();\n return Number.isNaN(t) ? null : t;\n}\n\nexport const dropCreateSchema = z\n .object({\n name: z.string().min(1, \"Collection name required\").max(100),\n symbol: z\n .string()\n .min(1, \"Symbol required\")\n .max(10)\n .regex(/^[A-Z0-9]+$/, \"Uppercase letters and numbers only\"),\n\n ipType: z.enum(IP_TYPES),\n licenseType: z.string().min(1, \"License required\"),\n commercialUse: z.string().default(\"\"),\n derivatives: z.string().default(\"\"),\n attribution: z.string().default(\"\"),\n geographicScope: z.string().default(\"Worldwide\"),\n aiPolicy: z.string().default(\"\"),\n royalty: z.coerce.number().min(0).max(50).default(0),\n descriptionTemplate: z.string().max(500).optional(),\n\n priceAmount: z\n .string()\n .default(\"\")\n .refine((v: string) => v === \"\" || !Number.isNaN(Number(v)), \"Enter a valid price\")\n .refine((v: string) => v === \"\" || Number(v) >= 0, \"Price must be zero or greater\"),\n paymentToken: z.string(),\n startDate: z.string().min(1, \"Start date required\"),\n startTime: z.string().default(\"00:00\"),\n endDate: z.string().min(1, \"End date required\"),\n endTime: z.string().default(\"23:59\"),\n maxPerWallet: z\n .string()\n .regex(/^\\d+$/, \"Must be a positive integer\")\n .refine((v: string) => parseInt(v, 10) >= 1, \"Minimum 1\")\n .default(\"1\"),\n\n whitelistEnabled: z.boolean().default(false),\n allowlistAddresses: z.string().default(\"\"),\n\n gatedEnabled: z.boolean().default(false),\n gatedContentTitle: z.string().max(100).default(\"\"),\n gatedContentUrl: z.string().default(\"\"),\n gatedContentType: z.string().default(\"\"),\n })\n .superRefine((values, ctx) => {\n const start = parseDateTime(values.startDate, values.startTime);\n const end = parseDateTime(values.endDate, values.endTime);\n if (start === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"startDate\"], message: \"Enter a valid start date and time\" });\n }\n if (end === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"Enter a valid end date and time\" });\n }\n if (start !== null && end !== null && end <= start) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"End time must be after the start time\" });\n }\n\n if (values.whitelistEnabled) {\n const addrs = values.allowlistAddresses.split(/[\\n,\\s]+/).map((a) => a.trim()).filter(Boolean);\n if (addrs.length === 0) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"allowlistAddresses\"], message: \"Add at least one address, or turn the whitelist off\" });\n }\n }\n\n if (values.gatedEnabled && values.gatedContentUrl.trim() === \"\") {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"gatedContentUrl\"], message: \"Add a content URL, or turn exclusive content off\" });\n }\n });\n\nexport type DropCreateFormValues = z.infer<typeof dropCreateSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,QAAmB;AACnB,gBAAyB;AAEzB,SAAS,cAAc,MAAc,MAA6B;AAChE,QAAM,KAAI,oBAAI,KAAK,GAAG,IAAI,IAAI,IAAI,KAAK,GAAE,QAAQ;AACjD,SAAO,OAAO,MAAM,CAAC,IAAI,OAAO;AAClC;AAEO,MAAM,mBAAmB,EAC7B,OAAO;AAAA,EACN,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,0BAA0B,EAAE,IAAI,GAAG;AAAA,EAC3D,QAAQ,EACL,OAAO,EACP,IAAI,GAAG,iBAAiB,EACxB,IAAI,EAAE,EACN,MAAM,eAAe,oCAAoC;AAAA,EAE5D,QAAQ,EAAE,KAAK,kBAAQ;AAAA,EACvB,aAAa,EAAE,OAAO,EAAE,IAAI,GAAG,kBAAkB;AA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string>>;
|
|
22
22
|
whitelistEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
23
23
|
allowlistAddresses: z.ZodDefault<z.ZodString>;
|
|
24
|
+
gatedEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
25
|
+
gatedContentTitle: z.ZodDefault<z.ZodString>;
|
|
26
|
+
gatedContentUrl: z.ZodDefault<z.ZodString>;
|
|
27
|
+
gatedContentType: z.ZodDefault<z.ZodString>;
|
|
24
28
|
}, "strip", z.ZodTypeAny, {
|
|
25
29
|
symbol: string;
|
|
26
30
|
name: string;
|
|
@@ -41,6 +45,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
41
45
|
maxPerWallet: string;
|
|
42
46
|
whitelistEnabled: boolean;
|
|
43
47
|
allowlistAddresses: string;
|
|
48
|
+
gatedEnabled: boolean;
|
|
49
|
+
gatedContentTitle: string;
|
|
50
|
+
gatedContentUrl: string;
|
|
51
|
+
gatedContentType: string;
|
|
44
52
|
descriptionTemplate?: string | undefined;
|
|
45
53
|
}, {
|
|
46
54
|
symbol: string;
|
|
@@ -63,6 +71,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
63
71
|
maxPerWallet?: string | undefined;
|
|
64
72
|
whitelistEnabled?: boolean | undefined;
|
|
65
73
|
allowlistAddresses?: string | undefined;
|
|
74
|
+
gatedEnabled?: boolean | undefined;
|
|
75
|
+
gatedContentTitle?: string | undefined;
|
|
76
|
+
gatedContentUrl?: string | undefined;
|
|
77
|
+
gatedContentType?: string | undefined;
|
|
66
78
|
}>, {
|
|
67
79
|
symbol: string;
|
|
68
80
|
name: string;
|
|
@@ -83,6 +95,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
83
95
|
maxPerWallet: string;
|
|
84
96
|
whitelistEnabled: boolean;
|
|
85
97
|
allowlistAddresses: string;
|
|
98
|
+
gatedEnabled: boolean;
|
|
99
|
+
gatedContentTitle: string;
|
|
100
|
+
gatedContentUrl: string;
|
|
101
|
+
gatedContentType: string;
|
|
86
102
|
descriptionTemplate?: string | undefined;
|
|
87
103
|
}, {
|
|
88
104
|
symbol: string;
|
|
@@ -105,6 +121,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
105
121
|
maxPerWallet?: string | undefined;
|
|
106
122
|
whitelistEnabled?: boolean | undefined;
|
|
107
123
|
allowlistAddresses?: string | undefined;
|
|
124
|
+
gatedEnabled?: boolean | undefined;
|
|
125
|
+
gatedContentTitle?: string | undefined;
|
|
126
|
+
gatedContentUrl?: string | undefined;
|
|
127
|
+
gatedContentType?: string | undefined;
|
|
108
128
|
}>;
|
|
109
129
|
type DropCreateFormValues = z.infer<typeof dropCreateSchema>;
|
|
110
130
|
|
|
@@ -21,6 +21,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
21
21
|
maxPerWallet: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
22
22
|
whitelistEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
23
23
|
allowlistAddresses: z.ZodDefault<z.ZodString>;
|
|
24
|
+
gatedEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
25
|
+
gatedContentTitle: z.ZodDefault<z.ZodString>;
|
|
26
|
+
gatedContentUrl: z.ZodDefault<z.ZodString>;
|
|
27
|
+
gatedContentType: z.ZodDefault<z.ZodString>;
|
|
24
28
|
}, "strip", z.ZodTypeAny, {
|
|
25
29
|
symbol: string;
|
|
26
30
|
name: string;
|
|
@@ -41,6 +45,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
41
45
|
maxPerWallet: string;
|
|
42
46
|
whitelistEnabled: boolean;
|
|
43
47
|
allowlistAddresses: string;
|
|
48
|
+
gatedEnabled: boolean;
|
|
49
|
+
gatedContentTitle: string;
|
|
50
|
+
gatedContentUrl: string;
|
|
51
|
+
gatedContentType: string;
|
|
44
52
|
descriptionTemplate?: string | undefined;
|
|
45
53
|
}, {
|
|
46
54
|
symbol: string;
|
|
@@ -63,6 +71,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
63
71
|
maxPerWallet?: string | undefined;
|
|
64
72
|
whitelistEnabled?: boolean | undefined;
|
|
65
73
|
allowlistAddresses?: string | undefined;
|
|
74
|
+
gatedEnabled?: boolean | undefined;
|
|
75
|
+
gatedContentTitle?: string | undefined;
|
|
76
|
+
gatedContentUrl?: string | undefined;
|
|
77
|
+
gatedContentType?: string | undefined;
|
|
66
78
|
}>, {
|
|
67
79
|
symbol: string;
|
|
68
80
|
name: string;
|
|
@@ -83,6 +95,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
83
95
|
maxPerWallet: string;
|
|
84
96
|
whitelistEnabled: boolean;
|
|
85
97
|
allowlistAddresses: string;
|
|
98
|
+
gatedEnabled: boolean;
|
|
99
|
+
gatedContentTitle: string;
|
|
100
|
+
gatedContentUrl: string;
|
|
101
|
+
gatedContentType: string;
|
|
86
102
|
descriptionTemplate?: string | undefined;
|
|
87
103
|
}, {
|
|
88
104
|
symbol: string;
|
|
@@ -105,6 +121,10 @@ declare const dropCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
105
121
|
maxPerWallet?: string | undefined;
|
|
106
122
|
whitelistEnabled?: boolean | undefined;
|
|
107
123
|
allowlistAddresses?: string | undefined;
|
|
124
|
+
gatedEnabled?: boolean | undefined;
|
|
125
|
+
gatedContentTitle?: string | undefined;
|
|
126
|
+
gatedContentUrl?: string | undefined;
|
|
127
|
+
gatedContentType?: string | undefined;
|
|
108
128
|
}>;
|
|
109
129
|
type DropCreateFormValues = z.infer<typeof dropCreateSchema>;
|
|
110
130
|
|
|
@@ -25,7 +25,11 @@ const dropCreateSchema = z.object({
|
|
|
25
25
|
endTime: z.string().default("23:59"),
|
|
26
26
|
maxPerWallet: z.string().regex(/^\d+$/, "Must be a positive integer").refine((v) => parseInt(v, 10) >= 1, "Minimum 1").default("1"),
|
|
27
27
|
whitelistEnabled: z.boolean().default(false),
|
|
28
|
-
allowlistAddresses: z.string().default("")
|
|
28
|
+
allowlistAddresses: z.string().default(""),
|
|
29
|
+
gatedEnabled: z.boolean().default(false),
|
|
30
|
+
gatedContentTitle: z.string().max(100).default(""),
|
|
31
|
+
gatedContentUrl: z.string().default(""),
|
|
32
|
+
gatedContentType: z.string().default("")
|
|
29
33
|
}).superRefine((values, ctx) => {
|
|
30
34
|
const start = parseDateTime(values.startDate, values.startTime);
|
|
31
35
|
const end = parseDateTime(values.endDate, values.endTime);
|
|
@@ -44,6 +48,9 @@ const dropCreateSchema = z.object({
|
|
|
44
48
|
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ["allowlistAddresses"], message: "Add at least one address, or turn the whitelist off" });
|
|
45
49
|
}
|
|
46
50
|
}
|
|
51
|
+
if (values.gatedEnabled && values.gatedContentUrl.trim() === "") {
|
|
52
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ["gatedContentUrl"], message: "Add a content URL, or turn exclusive content off" });
|
|
53
|
+
}
|
|
47
54
|
});
|
|
48
55
|
export {
|
|
49
56
|
dropCreateSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/data/drop-create-schema.ts"],"sourcesContent":["\"use client\";\n\nimport * as z from \"zod\";\nimport { IP_TYPES } from \"./ip.js\";\n\nfunction parseDateTime(date: string, time: string): number | null {\n const t = new Date(`${date}T${time}:00`).getTime();\n return Number.isNaN(t) ? null : t;\n}\n\nexport const dropCreateSchema = z\n .object({\n name: z.string().min(1, \"Collection name required\").max(100),\n symbol: z\n .string()\n .min(1, \"Symbol required\")\n .max(10)\n .regex(/^[A-Z0-9]+$/, \"Uppercase letters and numbers only\"),\n\n ipType: z.enum(IP_TYPES),\n licenseType: z.string().min(1, \"License required\"),\n commercialUse: z.string().default(\"\"),\n derivatives: z.string().default(\"\"),\n attribution: z.string().default(\"\"),\n geographicScope: z.string().default(\"Worldwide\"),\n aiPolicy: z.string().default(\"\"),\n royalty: z.coerce.number().min(0).max(50).default(0),\n descriptionTemplate: z.string().max(500).optional(),\n\n priceAmount: z\n .string()\n .default(\"\")\n .refine((v: string) => v === \"\" || !Number.isNaN(Number(v)), \"Enter a valid price\")\n .refine((v: string) => v === \"\" || Number(v) >= 0, \"Price must be zero or greater\"),\n paymentToken: z.string(),\n startDate: z.string().min(1, \"Start date required\"),\n startTime: z.string().default(\"00:00\"),\n endDate: z.string().min(1, \"End date required\"),\n endTime: z.string().default(\"23:59\"),\n maxPerWallet: z\n .string()\n .regex(/^\\d+$/, \"Must be a positive integer\")\n .refine((v: string) => parseInt(v, 10) >= 1, \"Minimum 1\")\n .default(\"1\"),\n\n whitelistEnabled: z.boolean().default(false),\n allowlistAddresses: z.string().default(\"\"),\n })\n .superRefine((values, ctx) => {\n const start = parseDateTime(values.startDate, values.startTime);\n const end = parseDateTime(values.endDate, values.endTime);\n if (start === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"startDate\"], message: \"Enter a valid start date and time\" });\n }\n if (end === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"Enter a valid end date and time\" });\n }\n if (start !== null && end !== null && end <= start) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"End time must be after the start time\" });\n }\n\n if (values.whitelistEnabled) {\n const addrs = values.allowlistAddresses.split(/[\\n,\\s]+/).map((a) => a.trim()).filter(Boolean);\n if (addrs.length === 0) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"allowlistAddresses\"], message: \"Add at least one address, or turn the whitelist off\" });\n }\n }\n });\n\nexport type DropCreateFormValues = z.infer<typeof dropCreateSchema>;\n"],"mappings":";AAEA,YAAY,OAAO;AACnB,SAAS,gBAAgB;AAEzB,SAAS,cAAc,MAAc,MAA6B;AAChE,QAAM,KAAI,oBAAI,KAAK,GAAG,IAAI,IAAI,IAAI,KAAK,GAAE,QAAQ;AACjD,SAAO,OA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4BAA4B,EAC3C,OAAO,CAAC,MAAc,SAAS,GAAG,EAAE,KAAK,GAAG,WAAW,EACvD,QAAQ,GAAG;AAAA,EAEd,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EAC3C,oBAAoB,EAAE,OAAO,EAAE,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../src/data/drop-create-schema.ts"],"sourcesContent":["\"use client\";\n\nimport * as z from \"zod\";\nimport { IP_TYPES } from \"./ip.js\";\n\nfunction parseDateTime(date: string, time: string): number | null {\n const t = new Date(`${date}T${time}:00`).getTime();\n return Number.isNaN(t) ? null : t;\n}\n\nexport const dropCreateSchema = z\n .object({\n name: z.string().min(1, \"Collection name required\").max(100),\n symbol: z\n .string()\n .min(1, \"Symbol required\")\n .max(10)\n .regex(/^[A-Z0-9]+$/, \"Uppercase letters and numbers only\"),\n\n ipType: z.enum(IP_TYPES),\n licenseType: z.string().min(1, \"License required\"),\n commercialUse: z.string().default(\"\"),\n derivatives: z.string().default(\"\"),\n attribution: z.string().default(\"\"),\n geographicScope: z.string().default(\"Worldwide\"),\n aiPolicy: z.string().default(\"\"),\n royalty: z.coerce.number().min(0).max(50).default(0),\n descriptionTemplate: z.string().max(500).optional(),\n\n priceAmount: z\n .string()\n .default(\"\")\n .refine((v: string) => v === \"\" || !Number.isNaN(Number(v)), \"Enter a valid price\")\n .refine((v: string) => v === \"\" || Number(v) >= 0, \"Price must be zero or greater\"),\n paymentToken: z.string(),\n startDate: z.string().min(1, \"Start date required\"),\n startTime: z.string().default(\"00:00\"),\n endDate: z.string().min(1, \"End date required\"),\n endTime: z.string().default(\"23:59\"),\n maxPerWallet: z\n .string()\n .regex(/^\\d+$/, \"Must be a positive integer\")\n .refine((v: string) => parseInt(v, 10) >= 1, \"Minimum 1\")\n .default(\"1\"),\n\n whitelistEnabled: z.boolean().default(false),\n allowlistAddresses: z.string().default(\"\"),\n\n gatedEnabled: z.boolean().default(false),\n gatedContentTitle: z.string().max(100).default(\"\"),\n gatedContentUrl: z.string().default(\"\"),\n gatedContentType: z.string().default(\"\"),\n })\n .superRefine((values, ctx) => {\n const start = parseDateTime(values.startDate, values.startTime);\n const end = parseDateTime(values.endDate, values.endTime);\n if (start === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"startDate\"], message: \"Enter a valid start date and time\" });\n }\n if (end === null) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"Enter a valid end date and time\" });\n }\n if (start !== null && end !== null && end <= start) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"endDate\"], message: \"End time must be after the start time\" });\n }\n\n if (values.whitelistEnabled) {\n const addrs = values.allowlistAddresses.split(/[\\n,\\s]+/).map((a) => a.trim()).filter(Boolean);\n if (addrs.length === 0) {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"allowlistAddresses\"], message: \"Add at least one address, or turn the whitelist off\" });\n }\n }\n\n if (values.gatedEnabled && values.gatedContentUrl.trim() === \"\") {\n ctx.addIssue({ code: z.ZodIssueCode.custom, path: [\"gatedContentUrl\"], message: \"Add a content URL, or turn exclusive content off\" });\n }\n });\n\nexport type DropCreateFormValues = z.infer<typeof dropCreateSchema>;\n"],"mappings":";AAEA,YAAY,OAAO;AACnB,SAAS,gBAAgB;AAEzB,SAAS,cAAc,MAAc,MAA6B;AAChE,QAAM,KAAI,oBAAI,KAAK,GAAG,IAAI,IAAI,IAAI,KAAK,GAAE,QAAQ;AACjD,SAAO,OAAO,MAAM,CAAC,IAAI,OAAO;AAClC;AAEO,MAAM,mBAAmB,EAC7B,OAAO;AAAA,EACN,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,0BAA0B,EAAE,IAAI,GAAG;AAAA,EAC3D,QAAQ,EACL,OAAO,EACP,IAAI,GAAG,iBAAiB,EACxB,IAAI,EAAE,EACN,MAAM,eAAe,oCAAoC;AAAA,EAE5D,QAAQ,EAAE,KAAK,QAAQ;AAAA,EACvB,aAAa,EAA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
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var gated_content_types_exports = {};
|
|
20
|
+
__export(gated_content_types_exports, {
|
|
21
|
+
GATED_CONTENT_TYPES: () => GATED_CONTENT_TYPES,
|
|
22
|
+
GATED_CONTENT_TYPE_FALLBACK: () => GATED_CONTENT_TYPE_FALLBACK
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(gated_content_types_exports);
|
|
25
|
+
var import_lucide_react = require("lucide-react");
|
|
26
|
+
const GATED_CONTENT_TYPES = {
|
|
27
|
+
VIDEO: { icon: import_lucide_react.Play, cta: "Watch now" },
|
|
28
|
+
AUDIO: { icon: import_lucide_react.Music, cta: "Listen now" },
|
|
29
|
+
STREAM: { icon: import_lucide_react.Radio, cta: "Watch live" },
|
|
30
|
+
DOCUMENT: { icon: import_lucide_react.FileText, cta: "Open document" },
|
|
31
|
+
LINK: { icon: import_lucide_react.Link2, cta: "Access content" }
|
|
32
|
+
};
|
|
33
|
+
const GATED_CONTENT_TYPE_FALLBACK = GATED_CONTENT_TYPES.LINK;
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
GATED_CONTENT_TYPES,
|
|
37
|
+
GATED_CONTENT_TYPE_FALLBACK
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=gated-content-types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/data/gated-content-types.ts"],"sourcesContent":["import { Play, Music, Radio, FileText, Link2 } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nexport interface ContentTypeConfig {\n icon: ComponentType<{ className?: string }>;\n cta: string;\n}\n\nexport const GATED_CONTENT_TYPES: Record<string, ContentTypeConfig> = {\n VIDEO: { icon: Play, cta: \"Watch now\" },\n AUDIO: { icon: Music, cta: \"Listen now\" },\n STREAM: { icon: Radio, cta: \"Watch live\" },\n DOCUMENT: { icon: FileText, cta: \"Open document\" },\n LINK: { icon: Link2, cta: \"Access content\" },\n};\n\nexport const GATED_CONTENT_TYPE_FALLBACK = GATED_CONTENT_TYPES.LINK;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAoD;AAQ7C,MAAM,sBAAyD;AAAA,EACpE,OAAU,EAAE,MAAM,0BAAU,KAAK,YAAY;AAAA,EAC7C,OAAU,EAAE,MAAM,2BAAU,KAAK,aAAa;AAAA,EAC9C,QAAU,EAAE,MAAM,2BAAU,KAAK,aAAa;AAAA,EAC9C,UAAU,EAAE,MAAM,8BAAU,KAAK,gBAAgB;AAAA,EACjD,MAAU,EAAE,MAAM,2BAAU,KAAK,iBAAiB;AACpD;AAEO,MAAM,8BAA8B,oBAAoB;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ContentTypeConfig {
|
|
4
|
+
icon: ComponentType<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
cta: string;
|
|
8
|
+
}
|
|
9
|
+
declare const GATED_CONTENT_TYPES: Record<string, ContentTypeConfig>;
|
|
10
|
+
declare const GATED_CONTENT_TYPE_FALLBACK: ContentTypeConfig;
|
|
11
|
+
|
|
12
|
+
export { type ContentTypeConfig, GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ContentTypeConfig {
|
|
4
|
+
icon: ComponentType<{
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
cta: string;
|
|
8
|
+
}
|
|
9
|
+
declare const GATED_CONTENT_TYPES: Record<string, ContentTypeConfig>;
|
|
10
|
+
declare const GATED_CONTENT_TYPE_FALLBACK: ContentTypeConfig;
|
|
11
|
+
|
|
12
|
+
export { type ContentTypeConfig, GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Play, Music, Radio, FileText, Link2 } from "lucide-react";
|
|
2
|
+
const GATED_CONTENT_TYPES = {
|
|
3
|
+
VIDEO: { icon: Play, cta: "Watch now" },
|
|
4
|
+
AUDIO: { icon: Music, cta: "Listen now" },
|
|
5
|
+
STREAM: { icon: Radio, cta: "Watch live" },
|
|
6
|
+
DOCUMENT: { icon: FileText, cta: "Open document" },
|
|
7
|
+
LINK: { icon: Link2, cta: "Access content" }
|
|
8
|
+
};
|
|
9
|
+
const GATED_CONTENT_TYPE_FALLBACK = GATED_CONTENT_TYPES.LINK;
|
|
10
|
+
export {
|
|
11
|
+
GATED_CONTENT_TYPES,
|
|
12
|
+
GATED_CONTENT_TYPE_FALLBACK
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=gated-content-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/data/gated-content-types.ts"],"sourcesContent":["import { Play, Music, Radio, FileText, Link2 } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nexport interface ContentTypeConfig {\n icon: ComponentType<{ className?: string }>;\n cta: string;\n}\n\nexport const GATED_CONTENT_TYPES: Record<string, ContentTypeConfig> = {\n VIDEO: { icon: Play, cta: \"Watch now\" },\n AUDIO: { icon: Music, cta: \"Listen now\" },\n STREAM: { icon: Radio, cta: \"Watch live\" },\n DOCUMENT: { icon: FileText, cta: \"Open document\" },\n LINK: { icon: Link2, cta: \"Access content\" },\n};\n\nexport const GATED_CONTENT_TYPE_FALLBACK = GATED_CONTENT_TYPES.LINK;\n"],"mappings":"AAAA,SAAS,MAAM,OAAO,OAAO,UAAU,aAAa;AAQ7C,MAAM,sBAAyD;AAAA,EACpE,OAAU,EAAE,MAAM,MAAU,KAAK,YAAY;AAAA,EAC7C,OAAU,EAAE,MAAM,OAAU,KAAK,aAAa;AAAA,EAC9C,QAAU,EAAE,MAAM,OAAU,KAAK,aAAa;AAAA,EAC9C,UAAU,EAAE,MAAM,UAAU,KAAK,gBAAgB;AAAA,EACjD,MAAU,EAAE,MAAM,OAAU,KAAK,iBAAiB;AACpD;AAEO,MAAM,8BAA8B,oBAAoB;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -74,6 +74,7 @@ __export(index_exports, {
|
|
|
74
74
|
CoinsExplorer: () => import_coins_explorer.CoinsExplorer,
|
|
75
75
|
Collapsible: () => import_collapsible.Collapsible,
|
|
76
76
|
CollapsibleContent: () => import_collapsible.CollapsibleContent,
|
|
77
|
+
CollapsibleSection: () => import_collapsible_section.CollapsibleSection,
|
|
77
78
|
CollapsibleTrigger: () => import_collapsible.CollapsibleTrigger,
|
|
78
79
|
CollectionActivityTab: () => import_collection_activity_tab.CollectionActivityTab,
|
|
79
80
|
CollectionCard: () => import_collection_card.CollectionCard,
|
|
@@ -109,7 +110,12 @@ __export(index_exports, {
|
|
|
109
110
|
DiscoverFeedSection: () => import_discover_feed_section.DiscoverFeedSection,
|
|
110
111
|
DiscoverHero: () => import_discover_hero.DiscoverHero,
|
|
111
112
|
DropCountdown: () => import_drop_countdown.DropCountdown,
|
|
113
|
+
DropCreateForm: () => import_drop_create_form.DropCreateForm,
|
|
112
114
|
DropItemList: () => import_drop_item_list.DropItemList,
|
|
115
|
+
DropPreviewCard: () => import_drop_preview_card.DropPreviewCard,
|
|
116
|
+
DropPriceDisplay: () => import_drop_status_display.DropPriceDisplay,
|
|
117
|
+
DropStatusBadge: () => import_drop_status_display.DropStatusBadge,
|
|
118
|
+
DropSupplyProgress: () => import_drop_status_display.DropSupplyProgress,
|
|
113
119
|
DropdownMenu: () => import_dropdown_menu.DropdownMenu,
|
|
114
120
|
DropdownMenuCheckboxItem: () => import_dropdown_menu.DropdownMenuCheckboxItem,
|
|
115
121
|
DropdownMenuContent: () => import_dropdown_menu.DropdownMenuContent,
|
|
@@ -132,6 +138,7 @@ __export(index_exports, {
|
|
|
132
138
|
EMPTY_SPONSORSHIP_TERMS: () => import_license_terms_builder.EMPTY_SPONSORSHIP_TERMS,
|
|
133
139
|
EmailVerificationGate: () => import_email_verification_gate.EmailVerificationGate,
|
|
134
140
|
EmptyOrError: () => import_empty_or_error.EmptyOrError,
|
|
141
|
+
ExclusiveContentSection: () => import_exclusive_content_section.ExclusiveContentSection,
|
|
135
142
|
FadeIn: () => import_motion_primitives.FadeIn,
|
|
136
143
|
FastMint: () => import_fast_mint.FastMint,
|
|
137
144
|
FeaturedCarousel: () => import_featured_carousel.FeaturedCarousel,
|
|
@@ -143,6 +150,8 @@ __export(index_exports, {
|
|
|
143
150
|
FormItem: () => import_form.FormItem,
|
|
144
151
|
FormLabel: () => import_form.FormLabel,
|
|
145
152
|
FormMessage: () => import_form.FormMessage,
|
|
153
|
+
GATED_CONTENT_TYPES: () => import_gated_content_types.GATED_CONTENT_TYPES,
|
|
154
|
+
GATED_CONTENT_TYPE_FALLBACK: () => import_gated_content_types.GATED_CONTENT_TYPE_FALLBACK,
|
|
146
155
|
GEOGRAPHIC_SCOPES: () => import_ip.GEOGRAPHIC_SCOPES,
|
|
147
156
|
GradientButton: () => import_gradient_button.GradientButton,
|
|
148
157
|
HelpIcon: () => import_help_icon.HelpIcon,
|
|
@@ -305,6 +314,7 @@ __export(index_exports, {
|
|
|
305
314
|
formatUsdPrice: () => import_format.formatUsdPrice,
|
|
306
315
|
getDefaultClaimWindow: () => import_launchpad_defaults.getDefaultClaimWindow,
|
|
307
316
|
getDefaultDropSchedule: () => import_launchpad_defaults.getDefaultDropSchedule,
|
|
317
|
+
getDropStatus: () => import_drop_status.getDropStatus,
|
|
308
318
|
getFriendlyWalletError: () => import_wallet_error.getFriendlyWalletError,
|
|
309
319
|
getReadIds: () => import_notification_storage.getReadIds,
|
|
310
320
|
ipfsToHttp: () => import_ipfs.ipfsToHttp,
|
|
@@ -426,6 +436,13 @@ var import_activity_timeline_row = require("./components/activity-timeline-row.j
|
|
|
426
436
|
var import_drop_item_list = require("./components/drop-item-list.js");
|
|
427
437
|
var import_drop_create_schema = require("./data/drop-create-schema.js");
|
|
428
438
|
var import_launchpad_defaults = require("./utils/launchpad-defaults.js");
|
|
439
|
+
var import_drop_status = require("./utils/drop-status.js");
|
|
440
|
+
var import_drop_status_display = require("./components/drop-status-display.js");
|
|
441
|
+
var import_gated_content_types = require("./data/gated-content-types.js");
|
|
442
|
+
var import_collapsible_section = require("./components/collapsible-section.js");
|
|
443
|
+
var import_exclusive_content_section = require("./components/exclusive-content-section.js");
|
|
444
|
+
var import_drop_preview_card = require("./components/drop-preview-card.js");
|
|
445
|
+
var import_drop_create_form = require("./components/drop-create-form.js");
|
|
429
446
|
var import_use_usd_prices = require("./utils/use-usd-prices.js");
|
|
430
447
|
var import_notification_row = require("./components/notification-row.js");
|
|
431
448
|
var import_notification_meta = require("./data/notification-meta.js");
|
|
@@ -589,6 +606,7 @@ var import_dialog = require("./components/dialog.js");
|
|
|
589
606
|
CoinsExplorer,
|
|
590
607
|
Collapsible,
|
|
591
608
|
CollapsibleContent,
|
|
609
|
+
CollapsibleSection,
|
|
592
610
|
CollapsibleTrigger,
|
|
593
611
|
CollectionActivityTab,
|
|
594
612
|
CollectionCard,
|
|
@@ -624,7 +642,12 @@ var import_dialog = require("./components/dialog.js");
|
|
|
624
642
|
DiscoverFeedSection,
|
|
625
643
|
DiscoverHero,
|
|
626
644
|
DropCountdown,
|
|
645
|
+
DropCreateForm,
|
|
627
646
|
DropItemList,
|
|
647
|
+
DropPreviewCard,
|
|
648
|
+
DropPriceDisplay,
|
|
649
|
+
DropStatusBadge,
|
|
650
|
+
DropSupplyProgress,
|
|
628
651
|
DropdownMenu,
|
|
629
652
|
DropdownMenuCheckboxItem,
|
|
630
653
|
DropdownMenuContent,
|
|
@@ -647,6 +670,7 @@ var import_dialog = require("./components/dialog.js");
|
|
|
647
670
|
EMPTY_SPONSORSHIP_TERMS,
|
|
648
671
|
EmailVerificationGate,
|
|
649
672
|
EmptyOrError,
|
|
673
|
+
ExclusiveContentSection,
|
|
650
674
|
FadeIn,
|
|
651
675
|
FastMint,
|
|
652
676
|
FeaturedCarousel,
|
|
@@ -658,6 +682,8 @@ var import_dialog = require("./components/dialog.js");
|
|
|
658
682
|
FormItem,
|
|
659
683
|
FormLabel,
|
|
660
684
|
FormMessage,
|
|
685
|
+
GATED_CONTENT_TYPES,
|
|
686
|
+
GATED_CONTENT_TYPE_FALLBACK,
|
|
661
687
|
GEOGRAPHIC_SCOPES,
|
|
662
688
|
GradientButton,
|
|
663
689
|
HelpIcon,
|
|
@@ -820,6 +846,7 @@ var import_dialog = require("./components/dialog.js");
|
|
|
820
846
|
formatUsdPrice,
|
|
821
847
|
getDefaultClaimWindow,
|
|
822
848
|
getDefaultDropSchedule,
|
|
849
|
+
getDropStatus,
|
|
823
850
|
getFriendlyWalletError,
|
|
824
851
|
getReadIds,
|
|
825
852
|
ipfsToHttp,
|