@burdenoff/microfe-product 2026.525.2 → 2026.525.3
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/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/product-management/modules/content-pages/components/ContentPageForm.d.ts.map +1 -1
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js +371 -371
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.d.ts.map +1 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +96 -107
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
- package/dist/product-management/shared/components/input/ProductCombobox.d.ts +29 -0
- package/dist/product-management/shared/components/input/ProductCombobox.d.ts.map +1 -0
- package/dist/product-management/shared/components/input/ProductCombobox.js +107 -0
- package/dist/product-management/shared/components/input/ProductCombobox.js.map +1 -0
- package/dist/product-management/shared/index.js +1 -0
- package/dist/product-management/shared/utils/cn.js +10 -0
- package/dist/product-management/shared/utils/cn.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { useTr as e } from "../../../shared/hooks/useTr.js";
|
|
2
2
|
import { TagInput as t } from "../../../shared/components/input/TagInput.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { ProductCombobox as n } from "../../../shared/components/input/ProductCombobox.js";
|
|
4
|
+
import { ZodError as r } from "../../../../node_modules/zod/v4/classic/errors.js";
|
|
5
|
+
import { createContentPageSchema as i, updateContentPageSchema as a } from "../schemas/index.js";
|
|
6
|
+
import { useCallback as o, useRef as s, useState as c } from "react";
|
|
7
|
+
import { Bold as l, Code as u, Eye as d, EyeOff as f, Heading as p, Italic as m, Link as h, List as g, ListOrdered as _, Loader2 as v, Quote as y } from "lucide-react";
|
|
8
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
8
9
|
//#region src/product-management/modules/content-pages/components/ContentPageForm.tsx
|
|
9
|
-
function
|
|
10
|
+
function S(e) {
|
|
10
11
|
let t = e;
|
|
11
12
|
return t = t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), t = t.replace(/```(\w*)\n([\s\S]*?)```/g, (e, t, n) => `<pre class="bg-gray-900 text-gray-100 rounded-lg p-4 overflow-x-auto my-3"><code>${n.trim()}</code></pre>`), t = t.replace(/`([^`]+)`/g, "<code class=\"bg-gray-200 dark:bg-gray-700 px-1.5 py-0.5 rounded text-sm\">$1</code>"), t = t.replace(/^###### (.+)$/gm, "<h6 class=\"text-sm font-semibold mt-4 mb-2\">$1</h6>"), t = t.replace(/^##### (.+)$/gm, "<h5 class=\"text-sm font-bold mt-4 mb-2\">$1</h5>"), t = t.replace(/^#### (.+)$/gm, "<h4 class=\"text-base font-bold mt-4 mb-2\">$1</h4>"), t = t.replace(/^### (.+)$/gm, "<h3 class=\"text-lg font-bold mt-4 mb-2\">$1</h3>"), t = t.replace(/^## (.+)$/gm, "<h2 class=\"text-xl font-bold mt-5 mb-2\">$1</h2>"), t = t.replace(/^# (.+)$/gm, "<h1 class=\"text-2xl font-bold mt-6 mb-3\">$1</h1>"), t = t.replace(/\*\*\*(.+?)\*\*\*/g, "<strong><em>$1</em></strong>"), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "<a href=\"$2\" class=\"text-blue-500 underline hover:text-blue-700\" target=\"_blank\" rel=\"noopener noreferrer\">$1</a>"), t = t.replace(/^> (.+)$/gm, "<blockquote class=\"border-l-4 border-gray-300 pl-4 italic text-gray-600 my-2\">$1</blockquote>"), t = t.replace(/(^- .+$(\n^- .+$)*)/gm, (e) => `<ul class="list-disc list-inside my-2">\n${e.split("\n").map((e) => `<li class="ml-4">${e.replace(/^- /, "")}</li>`).join("\n")}\n</ul>`), t = t.replace(/(^\d+\. .+$(\n^\d+\. .+$)*)/gm, (e) => `<ol class="list-decimal list-inside my-2">\n${e.split("\n").map((e) => `<li class="ml-4">${e.replace(/^\d+\. /, "")}</li>`).join("\n")}\n</ol>`), t = t.replace(/^---$/gm, "<hr class=\"my-4 border-gray-300\" />"), t = t.split(/\n\n+/).map((e) => {
|
|
12
13
|
let t = e.trim();
|
|
13
14
|
return t ? /^<(h[1-6]|ul|ol|pre|blockquote|hr|div)/.test(t) ? t : `<p class="my-2 leading-relaxed">${t.replace(/\n/g, "<br />")}</p>` : "";
|
|
14
15
|
}).join("\n"), t;
|
|
15
16
|
}
|
|
16
|
-
var
|
|
17
|
+
var C = [
|
|
17
18
|
{
|
|
18
19
|
label: "Bold",
|
|
19
|
-
icon:
|
|
20
|
+
icon: l,
|
|
20
21
|
prefix: "**",
|
|
21
22
|
suffix: "**",
|
|
22
23
|
placeholder: "bold text"
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
label: "Italic",
|
|
26
|
-
icon:
|
|
27
|
+
icon: m,
|
|
27
28
|
prefix: "*",
|
|
28
29
|
suffix: "*",
|
|
29
30
|
placeholder: "italic text"
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
33
|
label: "Heading",
|
|
33
|
-
icon:
|
|
34
|
+
icon: p,
|
|
34
35
|
prefix: "## ",
|
|
35
36
|
suffix: "",
|
|
36
37
|
placeholder: "Heading",
|
|
@@ -38,7 +39,7 @@ var S = [
|
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
label: "Bullet List",
|
|
41
|
-
icon:
|
|
42
|
+
icon: g,
|
|
42
43
|
prefix: "- ",
|
|
43
44
|
suffix: "",
|
|
44
45
|
placeholder: "List item",
|
|
@@ -46,7 +47,7 @@ var S = [
|
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
label: "Numbered List",
|
|
49
|
-
icon:
|
|
50
|
+
icon: _,
|
|
50
51
|
prefix: "1. ",
|
|
51
52
|
suffix: "",
|
|
52
53
|
placeholder: "List item",
|
|
@@ -54,14 +55,14 @@ var S = [
|
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
label: "Link",
|
|
57
|
-
icon:
|
|
58
|
+
icon: h,
|
|
58
59
|
prefix: "[",
|
|
59
60
|
suffix: "](url)",
|
|
60
61
|
placeholder: "link text"
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
label: "Code Block",
|
|
64
|
-
icon:
|
|
65
|
+
icon: u,
|
|
65
66
|
prefix: "```\n",
|
|
66
67
|
suffix: "\n```",
|
|
67
68
|
placeholder: "code",
|
|
@@ -69,537 +70,537 @@ var S = [
|
|
|
69
70
|
},
|
|
70
71
|
{
|
|
71
72
|
label: "Quote",
|
|
72
|
-
icon:
|
|
73
|
+
icon: y,
|
|
73
74
|
prefix: "> ",
|
|
74
75
|
suffix: "",
|
|
75
76
|
placeholder: "quote text",
|
|
76
77
|
block: !0
|
|
77
78
|
}
|
|
78
|
-
],
|
|
79
|
-
function
|
|
80
|
-
let
|
|
81
|
-
slug:
|
|
82
|
-
title:
|
|
83
|
-
content:
|
|
84
|
-
contentFormat:
|
|
85
|
-
seoTitle:
|
|
86
|
-
seoDescription:
|
|
87
|
-
seoKeywords:
|
|
88
|
-
isPublished:
|
|
89
|
-
visibility:
|
|
90
|
-
sortOrder:
|
|
91
|
-
productId:
|
|
92
|
-
excerpt:
|
|
93
|
-
thumbnail:
|
|
94
|
-
author:
|
|
95
|
-
publishedAt:
|
|
96
|
-
readingTime:
|
|
97
|
-
featured:
|
|
98
|
-
category:
|
|
99
|
-
}), [
|
|
79
|
+
], w = new Set(["blog", "press"]);
|
|
80
|
+
function T({ contentPage: l, onSubmit: u, onCancel: p, loading: m }) {
|
|
81
|
+
let h = e(), [g, _] = c({
|
|
82
|
+
slug: l?.slug || "",
|
|
83
|
+
title: l?.title || "",
|
|
84
|
+
content: l?.content || "",
|
|
85
|
+
contentFormat: l?.contentFormat || "markdown",
|
|
86
|
+
seoTitle: l?.seoTitle || "",
|
|
87
|
+
seoDescription: l?.seoDescription || "",
|
|
88
|
+
seoKeywords: l?.seoKeywords || "",
|
|
89
|
+
isPublished: l?.isPublished ?? !1,
|
|
90
|
+
visibility: l?.visibility ?? "PUBLIC",
|
|
91
|
+
sortOrder: l?.sortOrder ?? 0,
|
|
92
|
+
productId: l?.productId || "",
|
|
93
|
+
excerpt: l?.excerpt || "",
|
|
94
|
+
thumbnail: l?.thumbnail || "",
|
|
95
|
+
author: l?.author || "",
|
|
96
|
+
publishedAt: l?.publishedAt ? l.publishedAt.slice(0, 16) : "",
|
|
97
|
+
readingTime: l?.readingTime ?? 0,
|
|
98
|
+
featured: l?.featured ?? !1,
|
|
99
|
+
category: l?.category || ""
|
|
100
|
+
}), [y, T] = c(l?.tags ?? []), E = [
|
|
100
101
|
"blog",
|
|
101
102
|
"legal",
|
|
102
103
|
"docs",
|
|
103
104
|
"press",
|
|
104
105
|
"page"
|
|
105
|
-
], [
|
|
106
|
-
|
|
107
|
-
}, [
|
|
106
|
+
], [D, O] = c((l?.tags ?? []).find((e) => E.includes(e)) || "page"), k = (e) => {
|
|
107
|
+
O(e), T((t) => [e, ...t.filter((e) => !E.includes(e))]);
|
|
108
|
+
}, [A, j] = c({}), [M, N] = c(!1), P = s(null), F = () => {
|
|
108
109
|
try {
|
|
109
|
-
let e =
|
|
110
|
-
return t.sortOrder = typeof
|
|
110
|
+
let e = l ? a : i, t = { ...g };
|
|
111
|
+
return t.sortOrder = typeof g.sortOrder == "string" ? parseInt(g.sortOrder, 10) || 0 : g.sortOrder, t.seoTitle || delete t.seoTitle, t.seoDescription || delete t.seoDescription, t.seoKeywords || delete t.seoKeywords, t.productId || delete t.productId, t.contentFormat ||= "markdown", t.excerpt || delete t.excerpt, t.thumbnail || delete t.thumbnail, t.author || delete t.author, t.publishedAt || delete t.publishedAt, t.readingTime || delete t.readingTime, t.category || delete t.category, e.parse(t), j({}), !0;
|
|
111
112
|
} catch (e) {
|
|
112
|
-
if (e instanceof
|
|
113
|
+
if (e instanceof r) {
|
|
113
114
|
let t = {};
|
|
114
115
|
e.issues.forEach((e) => {
|
|
115
116
|
let n = e.path.join(".");
|
|
116
117
|
t[n] = e.message;
|
|
117
|
-
}),
|
|
118
|
+
}), j(t);
|
|
118
119
|
}
|
|
119
120
|
return !1;
|
|
120
121
|
}
|
|
121
|
-
},
|
|
122
|
-
if (e.preventDefault(), !
|
|
123
|
-
let t = typeof
|
|
124
|
-
await l
|
|
125
|
-
title:
|
|
126
|
-
content:
|
|
127
|
-
contentFormat:
|
|
128
|
-
seoTitle:
|
|
129
|
-
seoDescription:
|
|
130
|
-
seoKeywords:
|
|
131
|
-
isPublished:
|
|
132
|
-
visibility:
|
|
133
|
-
sortOrder: t ===
|
|
134
|
-
productId:
|
|
122
|
+
}, I = async (e) => {
|
|
123
|
+
if (e.preventDefault(), !F()) return;
|
|
124
|
+
let t = typeof g.sortOrder == "string" ? parseInt(g.sortOrder, 10) || 0 : g.sortOrder, n = [D, ...y.filter((e) => !E.includes(e))];
|
|
125
|
+
await u(l ? {
|
|
126
|
+
title: g.title === l.title ? void 0 : g.title,
|
|
127
|
+
content: g.content === l.content ? void 0 : g.content,
|
|
128
|
+
contentFormat: g.contentFormat === l.contentFormat ? void 0 : g.contentFormat,
|
|
129
|
+
seoTitle: g.seoTitle === (l.seoTitle || "") ? void 0 : g.seoTitle || void 0,
|
|
130
|
+
seoDescription: g.seoDescription === (l.seoDescription || "") ? void 0 : g.seoDescription || void 0,
|
|
131
|
+
seoKeywords: g.seoKeywords === (l.seoKeywords || "") ? void 0 : g.seoKeywords || void 0,
|
|
132
|
+
isPublished: g.isPublished === l.isPublished ? void 0 : g.isPublished,
|
|
133
|
+
visibility: g.visibility === l.visibility ? void 0 : g.visibility,
|
|
134
|
+
sortOrder: t === l.sortOrder ? void 0 : t,
|
|
135
|
+
productId: g.productId === (l.productId || "") ? void 0 : g.productId || void 0,
|
|
135
136
|
tags: n,
|
|
136
|
-
excerpt:
|
|
137
|
-
thumbnail:
|
|
138
|
-
author:
|
|
139
|
-
publishedAt:
|
|
140
|
-
readingTime:
|
|
141
|
-
featured:
|
|
142
|
-
category:
|
|
137
|
+
excerpt: g.excerpt || void 0,
|
|
138
|
+
thumbnail: g.thumbnail || void 0,
|
|
139
|
+
author: g.author || void 0,
|
|
140
|
+
publishedAt: g.publishedAt ? new Date(g.publishedAt).toISOString() : void 0,
|
|
141
|
+
readingTime: g.readingTime || void 0,
|
|
142
|
+
featured: g.featured,
|
|
143
|
+
category: g.category || void 0
|
|
143
144
|
} : {
|
|
144
|
-
slug:
|
|
145
|
-
title:
|
|
146
|
-
content:
|
|
147
|
-
contentFormat:
|
|
148
|
-
seoTitle:
|
|
149
|
-
seoDescription:
|
|
150
|
-
seoKeywords:
|
|
151
|
-
isPublished:
|
|
152
|
-
visibility:
|
|
145
|
+
slug: g.slug,
|
|
146
|
+
title: g.title,
|
|
147
|
+
content: g.content,
|
|
148
|
+
contentFormat: g.contentFormat || "markdown",
|
|
149
|
+
seoTitle: g.seoTitle || void 0,
|
|
150
|
+
seoDescription: g.seoDescription || void 0,
|
|
151
|
+
seoKeywords: g.seoKeywords || void 0,
|
|
152
|
+
isPublished: g.isPublished,
|
|
153
|
+
visibility: g.visibility,
|
|
153
154
|
sortOrder: t,
|
|
154
|
-
productId:
|
|
155
|
+
productId: g.productId || void 0,
|
|
155
156
|
tags: n,
|
|
156
|
-
excerpt:
|
|
157
|
-
thumbnail:
|
|
158
|
-
author:
|
|
159
|
-
publishedAt:
|
|
160
|
-
readingTime:
|
|
161
|
-
featured:
|
|
162
|
-
category:
|
|
157
|
+
excerpt: g.excerpt || void 0,
|
|
158
|
+
thumbnail: g.thumbnail || void 0,
|
|
159
|
+
author: g.author || void 0,
|
|
160
|
+
publishedAt: g.publishedAt ? new Date(g.publishedAt).toISOString() : void 0,
|
|
161
|
+
readingTime: g.readingTime || void 0,
|
|
162
|
+
featured: g.featured,
|
|
163
|
+
category: g.category || void 0
|
|
163
164
|
});
|
|
164
|
-
},
|
|
165
|
-
let t =
|
|
165
|
+
}, L = o((e) => {
|
|
166
|
+
let t = P.current;
|
|
166
167
|
if (!t) return;
|
|
167
|
-
let { selectionStart: n, selectionEnd: r } = t, i =
|
|
168
|
+
let { selectionStart: n, selectionEnd: r } = t, i = g.content, a = i.substring(n, r) || e.placeholder, o, s, c;
|
|
168
169
|
o = e.block && n > 0 && i[n - 1] !== "\n" ? `\n${e.prefix}${a}${e.suffix}` : `${e.prefix}${a}${e.suffix}`;
|
|
169
170
|
let l = i.substring(0, n), u = i.substring(r), d = l + o + u;
|
|
170
|
-
|
|
171
|
+
_((e) => ({
|
|
171
172
|
...e,
|
|
172
173
|
content: d
|
|
173
174
|
})), s = n + o.indexOf(a), c = s + a.length, requestAnimationFrame(() => {
|
|
174
175
|
t.focus(), t.setSelectionRange(s, c);
|
|
175
176
|
});
|
|
176
|
-
}, [
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
onSubmit:
|
|
177
|
+
}, [g.content]), R = "\n w-full px-3 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n disabled:bg-muted disabled:cursor-not-allowed\n transition-all duration-200\n ";
|
|
178
|
+
return /* @__PURE__ */ x("form", {
|
|
179
|
+
onSubmit: I,
|
|
179
180
|
className: "space-y-6 animate-in fade-in duration-300",
|
|
180
181
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ x("div", {
|
|
182
183
|
className: "space-y-4",
|
|
183
184
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ b("h3", {
|
|
185
186
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
186
|
-
children:
|
|
187
|
+
children: h("contentPages.basicInformation", "Basic Information")
|
|
187
188
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ x("div", { children: [
|
|
190
|
+
/* @__PURE__ */ b("label", {
|
|
190
191
|
htmlFor: "pageType",
|
|
191
192
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
192
|
-
children:
|
|
193
|
+
children: h("contentPages.pageType", "Page Type")
|
|
193
194
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ x("select", {
|
|
195
196
|
id: "pageType",
|
|
196
|
-
value:
|
|
197
|
-
onChange: (e) =>
|
|
198
|
-
className:
|
|
199
|
-
disabled:
|
|
197
|
+
value: D,
|
|
198
|
+
onChange: (e) => k(e.target.value),
|
|
199
|
+
className: R,
|
|
200
|
+
disabled: m,
|
|
200
201
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ b("option", {
|
|
202
203
|
value: "blog",
|
|
203
|
-
children:
|
|
204
|
+
children: h("contentPages.typeBlog", "Blog Post")
|
|
204
205
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ b("option", {
|
|
206
207
|
value: "legal",
|
|
207
|
-
children:
|
|
208
|
+
children: h("contentPages.typeLegal", "Legal")
|
|
208
209
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ b("option", {
|
|
210
211
|
value: "docs",
|
|
211
|
-
children:
|
|
212
|
+
children: h("contentPages.typeDocs", "Documentation")
|
|
212
213
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ b("option", {
|
|
214
215
|
value: "press",
|
|
215
|
-
children:
|
|
216
|
+
children: h("contentPages.typePress", "Press Release")
|
|
216
217
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ b("option", {
|
|
218
219
|
value: "page",
|
|
219
|
-
children:
|
|
220
|
+
children: h("contentPages.typePage", "General Page")
|
|
220
221
|
})
|
|
221
222
|
]
|
|
222
223
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ b("p", {
|
|
224
225
|
className: "text-xs text-text-tertiary mt-1",
|
|
225
|
-
children:
|
|
226
|
+
children: h("contentPages.pageTypeHint", "Sets the primary tag and which fields apply. Blog Posts and Press Releases get the extra Article Details section below.")
|
|
226
227
|
})
|
|
227
228
|
] }),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ x("div", { children: [
|
|
230
|
+
/* @__PURE__ */ x("label", {
|
|
230
231
|
htmlFor: "slug",
|
|
231
232
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
232
233
|
children: [
|
|
233
|
-
|
|
234
|
+
h("contentPages.slug", "Slug"),
|
|
234
235
|
" ",
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ b("span", {
|
|
236
237
|
className: "text-[var(--color-status-error)]",
|
|
237
238
|
children: "*"
|
|
238
239
|
})
|
|
239
240
|
]
|
|
240
241
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ b("input", {
|
|
242
243
|
id: "slug",
|
|
243
244
|
type: "text",
|
|
244
|
-
value:
|
|
245
|
-
onChange: (e) =>
|
|
246
|
-
...
|
|
245
|
+
value: g.slug,
|
|
246
|
+
onChange: (e) => _({
|
|
247
|
+
...g,
|
|
247
248
|
slug: e.target.value.toLowerCase().replace(/\s+/g, "-")
|
|
248
249
|
}),
|
|
249
|
-
className:
|
|
250
|
+
className: R,
|
|
250
251
|
placeholder: "page-slug",
|
|
251
|
-
disabled:
|
|
252
|
-
required: !
|
|
252
|
+
disabled: m || !!l,
|
|
253
|
+
required: !l
|
|
253
254
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ b("p", {
|
|
255
256
|
className: "text-xs text-text-tertiary mt-1",
|
|
256
|
-
children:
|
|
257
|
+
children: h("contentPages.slugHint", "Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.")
|
|
257
258
|
}),
|
|
258
|
-
|
|
259
|
+
A.slug && /* @__PURE__ */ b("p", {
|
|
259
260
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
260
|
-
children:
|
|
261
|
+
children: A.slug
|
|
261
262
|
})
|
|
262
263
|
] }),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ x("div", { children: [
|
|
265
|
+
/* @__PURE__ */ x("label", {
|
|
265
266
|
htmlFor: "title",
|
|
266
267
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
267
268
|
children: [
|
|
268
|
-
|
|
269
|
+
h("contentPages.pageTitle", "Title"),
|
|
269
270
|
" ",
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ b("span", {
|
|
271
272
|
className: "text-[var(--color-status-error)]",
|
|
272
273
|
children: "*"
|
|
273
274
|
})
|
|
274
275
|
]
|
|
275
276
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ b("input", {
|
|
277
278
|
id: "title",
|
|
278
279
|
type: "text",
|
|
279
|
-
value:
|
|
280
|
-
onChange: (e) =>
|
|
281
|
-
...
|
|
280
|
+
value: g.title,
|
|
281
|
+
onChange: (e) => _({
|
|
282
|
+
...g,
|
|
282
283
|
title: e.target.value
|
|
283
284
|
}),
|
|
284
|
-
className:
|
|
285
|
-
placeholder:
|
|
286
|
-
disabled:
|
|
285
|
+
className: R,
|
|
286
|
+
placeholder: h("contentPages.enterPageTitle", "Enter page title"),
|
|
287
|
+
disabled: m,
|
|
287
288
|
required: !0
|
|
288
289
|
}),
|
|
289
|
-
|
|
290
|
+
A.title && /* @__PURE__ */ b("p", {
|
|
290
291
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
291
|
-
children:
|
|
292
|
+
children: A.title
|
|
292
293
|
})
|
|
293
294
|
] })
|
|
294
295
|
]
|
|
295
296
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ x("div", {
|
|
297
298
|
className: "space-y-4 pt-4 border-t border-default",
|
|
298
299
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ b("h3", {
|
|
300
301
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
301
|
-
children:
|
|
302
|
+
children: h("contentPages.contentEditor", "Content Editor")
|
|
302
303
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ x("div", {
|
|
304
305
|
className: "border border-default rounded-lg overflow-hidden",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ x("div", {
|
|
306
307
|
className: "flex items-center justify-between bg-muted px-2 py-1.5 border-b border-default",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ b("div", {
|
|
308
309
|
className: "flex items-center gap-0.5",
|
|
309
|
-
children:
|
|
310
|
+
children: C.map((e) => {
|
|
310
311
|
let t = e.icon;
|
|
311
|
-
return /* @__PURE__ */
|
|
312
|
+
return /* @__PURE__ */ b("button", {
|
|
312
313
|
type: "button",
|
|
313
314
|
title: e.label,
|
|
314
|
-
onClick: () =>
|
|
315
|
-
disabled:
|
|
315
|
+
onClick: () => L(e),
|
|
316
|
+
disabled: m || M,
|
|
316
317
|
className: "\n inline-flex items-center justify-center\n w-8 h-8\n rounded\n text-text-secondary\n hover:bg-muted hover:text-text-primary\n transition-all duration-150\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
|
|
317
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ b(t, { size: 16 })
|
|
318
319
|
}, e.label);
|
|
319
320
|
})
|
|
320
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ x("div", {
|
|
321
322
|
className: "flex items-center gap-1",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ x("button", {
|
|
323
324
|
type: "button",
|
|
324
|
-
onClick: () =>
|
|
325
|
+
onClick: () => N(!1),
|
|
325
326
|
className: `
|
|
326
327
|
inline-flex items-center gap-1.5 px-3 py-1 rounded text-xs font-medium
|
|
327
328
|
transition-all duration-150
|
|
328
|
-
${
|
|
329
|
+
${M ? "text-text-tertiary hover:text-text-secondary" : "bg-surface text-text-primary shadow-sm"}
|
|
329
330
|
`,
|
|
330
|
-
children: [/* @__PURE__ */
|
|
331
|
-
}), /* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ b(f, { size: 14 }), h("contentPages.editMode", "Edit")]
|
|
332
|
+
}), /* @__PURE__ */ x("button", {
|
|
332
333
|
type: "button",
|
|
333
|
-
onClick: () =>
|
|
334
|
+
onClick: () => N(!0),
|
|
334
335
|
className: `
|
|
335
336
|
inline-flex items-center gap-1.5 px-3 py-1 rounded text-xs font-medium
|
|
336
337
|
transition-all duration-150
|
|
337
|
-
${
|
|
338
|
+
${M ? "bg-surface text-text-primary shadow-sm" : "text-text-tertiary hover:text-text-secondary"}
|
|
338
339
|
`,
|
|
339
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ b(d, { size: 14 }), h("contentPages.previewMode", "Preview")]
|
|
340
341
|
})]
|
|
341
342
|
})]
|
|
342
|
-
}), /* @__PURE__ */
|
|
343
|
+
}), /* @__PURE__ */ x("div", {
|
|
343
344
|
className: "relative",
|
|
344
|
-
children: [!
|
|
345
|
-
ref:
|
|
345
|
+
children: [!M && /* @__PURE__ */ b("textarea", {
|
|
346
|
+
ref: P,
|
|
346
347
|
id: "content",
|
|
347
|
-
value:
|
|
348
|
-
onChange: (e) =>
|
|
349
|
-
...
|
|
348
|
+
value: g.content,
|
|
349
|
+
onChange: (e) => _({
|
|
350
|
+
...g,
|
|
350
351
|
content: e.target.value
|
|
351
352
|
}),
|
|
352
353
|
className: "\n w-full px-4 py-3\n min-h-[400px]\n bg-surface\n text-text-primary\n placeholder:text-text-tertiary\n focus:outline-none\n disabled:bg-muted disabled:cursor-not-allowed\n font-mono text-sm\n resize-y\n transition-all duration-200\n ",
|
|
353
|
-
placeholder:
|
|
354
|
-
disabled:
|
|
355
|
-
}),
|
|
354
|
+
placeholder: h("contentPages.writeContentPlaceholder", "Write your content in markdown..."),
|
|
355
|
+
disabled: m
|
|
356
|
+
}), M && /* @__PURE__ */ b("div", {
|
|
356
357
|
className: "\n w-full px-4 py-3\n min-h-[400px]\n bg-surface\n text-text-primary\n overflow-y-auto\n prose-like\n ",
|
|
357
|
-
dangerouslySetInnerHTML: { __html:
|
|
358
|
+
dangerouslySetInnerHTML: { __html: g.content ? S(g.content) : "<p class=\"text-gray-400 italic\">Nothing to preview yet. Start writing in the editor.</p>" }
|
|
358
359
|
})]
|
|
359
360
|
})]
|
|
360
361
|
}),
|
|
361
|
-
|
|
362
|
+
A.content && /* @__PURE__ */ b("p", {
|
|
362
363
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
363
|
-
children:
|
|
364
|
+
children: A.content
|
|
364
365
|
})
|
|
365
366
|
]
|
|
366
367
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ x("div", {
|
|
368
369
|
className: "space-y-4 pt-4 border-t border-default",
|
|
369
370
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ b("h3", {
|
|
371
372
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
372
|
-
children:
|
|
373
|
+
children: h("contentPages.seoMetadata", "SEO Metadata")
|
|
373
374
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ x("div", { children: [
|
|
376
|
+
/* @__PURE__ */ b("label", {
|
|
376
377
|
htmlFor: "seoTitle",
|
|
377
378
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
378
|
-
children:
|
|
379
|
+
children: h("contentPages.seoTitle", "SEO Title")
|
|
379
380
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ b("input", {
|
|
381
382
|
id: "seoTitle",
|
|
382
383
|
type: "text",
|
|
383
|
-
value:
|
|
384
|
-
onChange: (e) =>
|
|
385
|
-
...
|
|
384
|
+
value: g.seoTitle,
|
|
385
|
+
onChange: (e) => _({
|
|
386
|
+
...g,
|
|
386
387
|
seoTitle: e.target.value
|
|
387
388
|
}),
|
|
388
|
-
className:
|
|
389
|
-
placeholder:
|
|
390
|
-
disabled:
|
|
389
|
+
className: R,
|
|
390
|
+
placeholder: h("contentPages.seoTitlePlaceholder", "Page title for search engines"),
|
|
391
|
+
disabled: m
|
|
391
392
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ x("p", {
|
|
393
394
|
className: "text-xs text-text-tertiary mt-1",
|
|
394
|
-
children: [
|
|
395
|
+
children: [g.seoTitle.length, "/100 characters"]
|
|
395
396
|
}),
|
|
396
|
-
|
|
397
|
+
A.seoTitle && /* @__PURE__ */ b("p", {
|
|
397
398
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
398
|
-
children:
|
|
399
|
+
children: A.seoTitle
|
|
399
400
|
})
|
|
400
401
|
] }),
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ x("div", { children: [
|
|
403
|
+
/* @__PURE__ */ b("label", {
|
|
403
404
|
htmlFor: "seoDescription",
|
|
404
405
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
405
|
-
children:
|
|
406
|
+
children: h("contentPages.seoDescription", "SEO Description")
|
|
406
407
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ b("textarea", {
|
|
408
409
|
id: "seoDescription",
|
|
409
|
-
value:
|
|
410
|
-
onChange: (e) =>
|
|
411
|
-
...
|
|
410
|
+
value: g.seoDescription,
|
|
411
|
+
onChange: (e) => _({
|
|
412
|
+
...g,
|
|
412
413
|
seoDescription: e.target.value
|
|
413
414
|
}),
|
|
414
415
|
rows: 3,
|
|
415
|
-
className:
|
|
416
|
-
placeholder:
|
|
417
|
-
disabled:
|
|
416
|
+
className: R,
|
|
417
|
+
placeholder: h("contentPages.seoDescriptionPlaceholder", "Brief description for search engine results"),
|
|
418
|
+
disabled: m
|
|
418
419
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ x("p", {
|
|
420
421
|
className: "text-xs text-text-tertiary mt-1",
|
|
421
|
-
children: [
|
|
422
|
+
children: [g.seoDescription.length, "/300 characters"]
|
|
422
423
|
}),
|
|
423
|
-
|
|
424
|
+
A.seoDescription && /* @__PURE__ */ b("p", {
|
|
424
425
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
425
|
-
children:
|
|
426
|
+
children: A.seoDescription
|
|
426
427
|
})
|
|
427
428
|
] }),
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ x("div", { children: [
|
|
430
|
+
/* @__PURE__ */ b("label", {
|
|
430
431
|
htmlFor: "seoKeywords",
|
|
431
432
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
432
|
-
children:
|
|
433
|
+
children: h("contentPages.seoKeywords", "SEO Keywords")
|
|
433
434
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ b("input", {
|
|
435
436
|
id: "seoKeywords",
|
|
436
437
|
type: "text",
|
|
437
|
-
value:
|
|
438
|
-
onChange: (e) =>
|
|
439
|
-
...
|
|
438
|
+
value: g.seoKeywords,
|
|
439
|
+
onChange: (e) => _({
|
|
440
|
+
...g,
|
|
440
441
|
seoKeywords: e.target.value
|
|
441
442
|
}),
|
|
442
|
-
className:
|
|
443
|
+
className: R,
|
|
443
444
|
placeholder: "keyword1, keyword2, keyword3",
|
|
444
|
-
disabled:
|
|
445
|
+
disabled: m
|
|
445
446
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ x("p", {
|
|
447
448
|
className: "text-xs text-text-tertiary mt-1",
|
|
448
449
|
children: [
|
|
449
450
|
"Comma-separated keywords. ",
|
|
450
|
-
|
|
451
|
+
g.seoKeywords.length,
|
|
451
452
|
"/200 characters"
|
|
452
453
|
]
|
|
453
454
|
}),
|
|
454
|
-
|
|
455
|
+
A.seoKeywords && /* @__PURE__ */ b("p", {
|
|
455
456
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
456
|
-
children:
|
|
457
|
+
children: A.seoKeywords
|
|
457
458
|
})
|
|
458
459
|
] })
|
|
459
460
|
]
|
|
460
461
|
}),
|
|
461
|
-
|
|
462
|
+
w.has(D) && /* @__PURE__ */ x("div", {
|
|
462
463
|
className: "space-y-4 pt-4 border-t border-default",
|
|
463
464
|
children: [
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ b("h3", {
|
|
465
466
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
466
|
-
children:
|
|
467
|
+
children: h("contentPages.extraDetailFields", "Article Details")
|
|
467
468
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ b("p", {
|
|
469
470
|
className: "text-xs text-text-tertiary",
|
|
470
471
|
children: "Optional details for blog posts and press releases — summary, hero image, author, publish date, category."
|
|
471
472
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ x("div", { children: [
|
|
474
|
+
/* @__PURE__ */ b("label", {
|
|
474
475
|
htmlFor: "excerpt",
|
|
475
476
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
476
|
-
children:
|
|
477
|
+
children: h("contentPages.excerpt", "Excerpt")
|
|
477
478
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ b("textarea", {
|
|
479
480
|
id: "excerpt",
|
|
480
|
-
value:
|
|
481
|
-
onChange: (e) =>
|
|
482
|
-
...
|
|
481
|
+
value: g.excerpt,
|
|
482
|
+
onChange: (e) => _({
|
|
483
|
+
...g,
|
|
483
484
|
excerpt: e.target.value
|
|
484
485
|
}),
|
|
485
486
|
rows: 2,
|
|
486
|
-
className:
|
|
487
|
+
className: R,
|
|
487
488
|
placeholder: "Short summary shown on listing cards",
|
|
488
|
-
disabled:
|
|
489
|
+
disabled: m
|
|
489
490
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ x("p", {
|
|
491
492
|
className: "text-xs text-text-tertiary mt-1",
|
|
492
|
-
children: [
|
|
493
|
+
children: [g.excerpt.length, "/500 characters"]
|
|
493
494
|
})
|
|
494
495
|
] }),
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ x("div", { children: [
|
|
497
|
+
/* @__PURE__ */ b("label", {
|
|
497
498
|
htmlFor: "thumbnail",
|
|
498
499
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
499
|
-
children:
|
|
500
|
+
children: h("contentPages.thumbnail", "Thumbnail URL")
|
|
500
501
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ b("input", {
|
|
502
503
|
id: "thumbnail",
|
|
503
504
|
type: "url",
|
|
504
|
-
value:
|
|
505
|
-
onChange: (e) =>
|
|
506
|
-
...
|
|
505
|
+
value: g.thumbnail,
|
|
506
|
+
onChange: (e) => _({
|
|
507
|
+
...g,
|
|
507
508
|
thumbnail: e.target.value
|
|
508
509
|
}),
|
|
509
|
-
className:
|
|
510
|
+
className: R,
|
|
510
511
|
placeholder: "https://images.unsplash.com/...",
|
|
511
|
-
disabled:
|
|
512
|
+
disabled: m
|
|
512
513
|
}),
|
|
513
|
-
|
|
514
|
+
g.thumbnail && /* @__PURE__ */ b("div", {
|
|
514
515
|
className: "mt-2 rounded-lg overflow-hidden border border-default",
|
|
515
516
|
style: { maxWidth: 320 },
|
|
516
|
-
children: /* @__PURE__ */
|
|
517
|
-
src:
|
|
517
|
+
children: /* @__PURE__ */ b("img", {
|
|
518
|
+
src: g.thumbnail,
|
|
518
519
|
alt: "Thumbnail preview",
|
|
519
520
|
className: "w-full h-auto"
|
|
520
521
|
})
|
|
521
522
|
})
|
|
522
523
|
] }),
|
|
523
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ x("div", {
|
|
524
525
|
className: "grid grid-cols-2 gap-4",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
526
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
526
527
|
htmlFor: "author",
|
|
527
528
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
528
|
-
children:
|
|
529
|
-
}), /* @__PURE__ */
|
|
529
|
+
children: h("contentPages.author", "Author")
|
|
530
|
+
}), /* @__PURE__ */ b("input", {
|
|
530
531
|
id: "author",
|
|
531
532
|
type: "text",
|
|
532
|
-
value:
|
|
533
|
-
onChange: (e) =>
|
|
534
|
-
...
|
|
533
|
+
value: g.author,
|
|
534
|
+
onChange: (e) => _({
|
|
535
|
+
...g,
|
|
535
536
|
author: e.target.value
|
|
536
537
|
}),
|
|
537
|
-
className:
|
|
538
|
+
className: R,
|
|
538
539
|
placeholder: "Author name",
|
|
539
|
-
disabled:
|
|
540
|
-
})] }), /* @__PURE__ */
|
|
540
|
+
disabled: m
|
|
541
|
+
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
541
542
|
htmlFor: "category",
|
|
542
543
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
543
|
-
children:
|
|
544
|
-
}), /* @__PURE__ */
|
|
544
|
+
children: h("contentPages.category", "Category")
|
|
545
|
+
}), /* @__PURE__ */ b("input", {
|
|
545
546
|
id: "category",
|
|
546
547
|
type: "text",
|
|
547
|
-
value:
|
|
548
|
-
onChange: (e) =>
|
|
549
|
-
...
|
|
548
|
+
value: g.category,
|
|
549
|
+
onChange: (e) => _({
|
|
550
|
+
...g,
|
|
550
551
|
category: e.target.value
|
|
551
552
|
}),
|
|
552
|
-
className:
|
|
553
|
+
className: R,
|
|
553
554
|
placeholder: "Engineering, Product, Company",
|
|
554
|
-
disabled:
|
|
555
|
+
disabled: m
|
|
555
556
|
})] })]
|
|
556
557
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ x("div", {
|
|
558
559
|
className: "grid grid-cols-2 gap-4",
|
|
559
|
-
children: [/* @__PURE__ */
|
|
560
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
560
561
|
htmlFor: "publishedAt",
|
|
561
562
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
562
|
-
children:
|
|
563
|
-
}), /* @__PURE__ */
|
|
563
|
+
children: h("contentPages.publishedAt", "Publish Date")
|
|
564
|
+
}), /* @__PURE__ */ b("input", {
|
|
564
565
|
id: "publishedAt",
|
|
565
566
|
type: "datetime-local",
|
|
566
|
-
value:
|
|
567
|
-
onChange: (e) =>
|
|
568
|
-
...
|
|
567
|
+
value: g.publishedAt,
|
|
568
|
+
onChange: (e) => _({
|
|
569
|
+
...g,
|
|
569
570
|
publishedAt: e.target.value
|
|
570
571
|
}),
|
|
571
|
-
className:
|
|
572
|
-
disabled:
|
|
573
|
-
})] }), /* @__PURE__ */
|
|
572
|
+
className: R,
|
|
573
|
+
disabled: m
|
|
574
|
+
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
574
575
|
htmlFor: "readingTime",
|
|
575
576
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
576
|
-
children:
|
|
577
|
-
}), /* @__PURE__ */
|
|
577
|
+
children: h("contentPages.readingTime", "Reading Time (min)")
|
|
578
|
+
}), /* @__PURE__ */ b("input", {
|
|
578
579
|
id: "readingTime",
|
|
579
580
|
type: "number",
|
|
580
581
|
min: 0,
|
|
581
582
|
max: 999,
|
|
582
|
-
value:
|
|
583
|
-
onChange: (e) =>
|
|
584
|
-
...
|
|
583
|
+
value: g.readingTime,
|
|
584
|
+
onChange: (e) => _({
|
|
585
|
+
...g,
|
|
585
586
|
readingTime: parseInt(e.target.value, 10) || 0
|
|
586
587
|
}),
|
|
587
|
-
className:
|
|
588
|
+
className: R,
|
|
588
589
|
placeholder: "5",
|
|
589
|
-
disabled:
|
|
590
|
+
disabled: m
|
|
590
591
|
})] })]
|
|
591
592
|
}),
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ x("div", {
|
|
593
594
|
className: "flex items-center gap-3",
|
|
594
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ b("button", {
|
|
595
596
|
type: "button",
|
|
596
597
|
role: "switch",
|
|
597
|
-
"aria-checked":
|
|
598
|
-
onClick: () =>
|
|
599
|
-
...
|
|
600
|
-
featured: !
|
|
598
|
+
"aria-checked": g.featured,
|
|
599
|
+
onClick: () => _({
|
|
600
|
+
...g,
|
|
601
|
+
featured: !g.featured
|
|
601
602
|
}),
|
|
602
|
-
disabled:
|
|
603
|
+
disabled: m,
|
|
603
604
|
className: `
|
|
604
605
|
relative inline-flex h-6 w-11 shrink-0
|
|
605
606
|
cursor-pointer rounded-full
|
|
@@ -607,39 +608,39 @@ function w({ contentPage: c, onSubmit: l, onCancel: f, loading: p }) {
|
|
|
607
608
|
transition-colors duration-200 ease-in-out
|
|
608
609
|
focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] focus:ring-offset-2
|
|
609
610
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
610
|
-
${
|
|
611
|
+
${g.featured ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
|
|
611
612
|
`,
|
|
612
|
-
children: /* @__PURE__ */
|
|
613
|
+
children: /* @__PURE__ */ b("span", { className: `
|
|
613
614
|
pointer-events-none inline-block h-5 w-5
|
|
614
615
|
transform rounded-full bg-white shadow ring-0
|
|
615
616
|
transition duration-200 ease-in-out
|
|
616
|
-
${
|
|
617
|
+
${g.featured ? "translate-x-5" : "translate-x-0"}
|
|
617
618
|
` })
|
|
618
|
-
}), /* @__PURE__ */
|
|
619
|
+
}), /* @__PURE__ */ b("label", {
|
|
619
620
|
className: "text-sm font-medium text-text-primary",
|
|
620
|
-
children:
|
|
621
|
+
children: g.featured ? h("contentPages.featured", "Featured") : h("contentPages.notFeatured", "Not Featured")
|
|
621
622
|
})]
|
|
622
623
|
})
|
|
623
624
|
]
|
|
624
625
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ x("div", {
|
|
626
627
|
className: "space-y-4 pt-4 border-t border-default",
|
|
627
628
|
children: [
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ b("h3", {
|
|
629
630
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
630
|
-
children:
|
|
631
|
+
children: h("contentPages.publishing", "Publishing")
|
|
631
632
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ x("div", {
|
|
633
634
|
className: "flex items-center gap-3",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
635
|
+
children: [/* @__PURE__ */ b("button", {
|
|
635
636
|
type: "button",
|
|
636
637
|
role: "switch",
|
|
637
|
-
"aria-checked":
|
|
638
|
-
onClick: () =>
|
|
639
|
-
...
|
|
640
|
-
isPublished: !
|
|
638
|
+
"aria-checked": g.isPublished,
|
|
639
|
+
onClick: () => _({
|
|
640
|
+
...g,
|
|
641
|
+
isPublished: !g.isPublished
|
|
641
642
|
}),
|
|
642
|
-
disabled:
|
|
643
|
+
disabled: m,
|
|
643
644
|
className: `
|
|
644
645
|
relative inline-flex h-6 w-11 shrink-0
|
|
645
646
|
cursor-pointer rounded-full
|
|
@@ -647,159 +648,158 @@ function w({ contentPage: c, onSubmit: l, onCancel: f, loading: p }) {
|
|
|
647
648
|
transition-colors duration-200 ease-in-out
|
|
648
649
|
focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)] focus:ring-offset-2
|
|
649
650
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
650
|
-
${
|
|
651
|
+
${g.isPublished ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
|
|
651
652
|
`,
|
|
652
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ b("span", { className: `
|
|
653
654
|
pointer-events-none inline-block h-5 w-5
|
|
654
655
|
transform rounded-full bg-white shadow ring-0
|
|
655
656
|
transition duration-200 ease-in-out
|
|
656
|
-
${
|
|
657
|
+
${g.isPublished ? "translate-x-5" : "translate-x-0"}
|
|
657
658
|
` })
|
|
658
|
-
}), /* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ b("label", {
|
|
659
660
|
className: "text-sm font-medium text-text-primary",
|
|
660
|
-
children:
|
|
661
|
+
children: g.isPublished ? h("contentPages.published", "Published") : h("contentPages.draft", "Draft")
|
|
661
662
|
})]
|
|
662
663
|
}),
|
|
663
|
-
|
|
664
|
+
A.isPublished && /* @__PURE__ */ b("p", {
|
|
664
665
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
665
|
-
children:
|
|
666
|
+
children: A.isPublished
|
|
666
667
|
}),
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ x("div", { children: [
|
|
669
|
+
/* @__PURE__ */ b("label", {
|
|
669
670
|
htmlFor: "visibility",
|
|
670
671
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
671
|
-
children:
|
|
672
|
+
children: h("contentPages.visibility", "Visibility")
|
|
672
673
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ x("select", {
|
|
674
675
|
id: "visibility",
|
|
675
|
-
value:
|
|
676
|
-
onChange: (e) =>
|
|
677
|
-
...
|
|
676
|
+
value: g.visibility,
|
|
677
|
+
onChange: (e) => _({
|
|
678
|
+
...g,
|
|
678
679
|
visibility: e.target.value
|
|
679
680
|
}),
|
|
680
|
-
className:
|
|
681
|
-
disabled:
|
|
681
|
+
className: R,
|
|
682
|
+
disabled: m,
|
|
682
683
|
children: [
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ b("option", {
|
|
684
685
|
value: "PUBLIC",
|
|
685
|
-
children:
|
|
686
|
+
children: h("contentPages.visibilityPublic", "Public — visible to everyone")
|
|
686
687
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ b("option", {
|
|
688
689
|
value: "AUTHENTICATED",
|
|
689
|
-
children:
|
|
690
|
+
children: h("contentPages.visibilityAuthenticated", "Authenticated — signed-in users only")
|
|
690
691
|
}),
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ b("option", {
|
|
692
693
|
value: "INTERNAL",
|
|
693
|
-
children:
|
|
694
|
+
children: h("contentPages.visibilityInternal", "Internal — staff/admin only")
|
|
694
695
|
})
|
|
695
696
|
]
|
|
696
697
|
}),
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ b("p", {
|
|
698
699
|
className: "text-xs text-text-tertiary mt-1",
|
|
699
|
-
children:
|
|
700
|
+
children: h("contentPages.visibilityHint", "Public is required for blog posts and legal pages to appear on the website.")
|
|
700
701
|
}),
|
|
701
|
-
|
|
702
|
+
A.visibility && /* @__PURE__ */ b("p", {
|
|
702
703
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
703
|
-
children:
|
|
704
|
+
children: A.visibility
|
|
704
705
|
})
|
|
705
706
|
] }),
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ x("div", { children: [
|
|
708
|
+
/* @__PURE__ */ b("label", {
|
|
708
709
|
htmlFor: "sortOrder",
|
|
709
710
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
710
|
-
children:
|
|
711
|
+
children: h("contentPages.sortOrder", "Sort Order")
|
|
711
712
|
}),
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ b("input", {
|
|
713
714
|
id: "sortOrder",
|
|
714
715
|
type: "number",
|
|
715
716
|
min: 0,
|
|
716
|
-
value:
|
|
717
|
-
onChange: (e) =>
|
|
718
|
-
...
|
|
717
|
+
value: g.sortOrder,
|
|
718
|
+
onChange: (e) => _({
|
|
719
|
+
...g,
|
|
719
720
|
sortOrder: parseInt(e.target.value, 10) || 0
|
|
720
721
|
}),
|
|
721
|
-
className:
|
|
722
|
+
className: R,
|
|
722
723
|
placeholder: "0",
|
|
723
|
-
disabled:
|
|
724
|
+
disabled: m
|
|
724
725
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ b("p", {
|
|
726
727
|
className: "text-xs text-text-tertiary mt-1",
|
|
727
|
-
children:
|
|
728
|
+
children: h("contentPages.sortOrderHint", "Lower numbers appear first. Default is 0.")
|
|
728
729
|
}),
|
|
729
|
-
|
|
730
|
+
A.sortOrder && /* @__PURE__ */ b("p", {
|
|
730
731
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
731
|
-
children:
|
|
732
|
+
children: A.sortOrder
|
|
732
733
|
})
|
|
733
734
|
] }),
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ x("div", { children: [
|
|
736
|
+
/* @__PURE__ */ b("label", {
|
|
736
737
|
htmlFor: "productId",
|
|
737
738
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
738
|
-
children:
|
|
739
|
+
children: h("contentPages.productId", "Product ID")
|
|
739
740
|
}),
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ b(n, {
|
|
741
742
|
id: "productId",
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
productId: e.target.value
|
|
743
|
+
value: g.productId,
|
|
744
|
+
onChange: (e) => _({
|
|
745
|
+
...g,
|
|
746
|
+
productId: e
|
|
747
747
|
}),
|
|
748
|
-
|
|
749
|
-
placeholder:
|
|
750
|
-
|
|
748
|
+
disabled: m,
|
|
749
|
+
placeholder: h("contentPages.productIdPlaceholder", "Optional product association"),
|
|
750
|
+
error: A.productId
|
|
751
751
|
}),
|
|
752
|
-
/* @__PURE__ */
|
|
752
|
+
/* @__PURE__ */ b("p", {
|
|
753
753
|
className: "text-xs text-text-tertiary mt-1",
|
|
754
|
-
children:
|
|
754
|
+
children: h("contentPages.productIdHint", "Associate this content page with a specific product.")
|
|
755
755
|
}),
|
|
756
|
-
|
|
756
|
+
A.productId && /* @__PURE__ */ b("p", {
|
|
757
757
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
758
|
-
children:
|
|
758
|
+
children: A.productId
|
|
759
759
|
})
|
|
760
760
|
] })
|
|
761
761
|
]
|
|
762
762
|
}),
|
|
763
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ x("div", {
|
|
764
764
|
className: "space-y-4 pt-4 border-t border-default",
|
|
765
765
|
children: [
|
|
766
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ b("h3", {
|
|
767
767
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
768
768
|
children: "Tags"
|
|
769
769
|
}),
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
value:
|
|
772
|
-
onChange:
|
|
773
|
-
disabled:
|
|
770
|
+
/* @__PURE__ */ b(t, {
|
|
771
|
+
value: y,
|
|
772
|
+
onChange: T,
|
|
773
|
+
disabled: m
|
|
774
774
|
}),
|
|
775
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ b("p", {
|
|
776
776
|
className: "text-xs text-text-tertiary",
|
|
777
777
|
children: "Press Enter or comma to add a tag."
|
|
778
778
|
})
|
|
779
779
|
]
|
|
780
780
|
}),
|
|
781
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ x("div", {
|
|
782
782
|
className: "flex gap-3 pt-4 border-t border-default",
|
|
783
|
-
children: [/* @__PURE__ */
|
|
783
|
+
children: [/* @__PURE__ */ x("button", {
|
|
784
784
|
type: "submit",
|
|
785
|
-
disabled:
|
|
785
|
+
disabled: m,
|
|
786
786
|
className: "\n inline-flex items-center gap-2 px-6 py-2.5\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90 hover:scale-[1.02]\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
|
|
787
|
-
children: [
|
|
787
|
+
children: [m && /* @__PURE__ */ b(v, {
|
|
788
788
|
size: 16,
|
|
789
789
|
className: "animate-spin"
|
|
790
|
-
}),
|
|
791
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), l ? h("contentPages.updateContentPage", "Update Content Page") : h("contentPages.createContentPage", "Create Content Page")]
|
|
791
|
+
}), /* @__PURE__ */ b("button", {
|
|
792
792
|
type: "button",
|
|
793
|
-
onClick:
|
|
794
|
-
disabled:
|
|
793
|
+
onClick: p,
|
|
794
|
+
disabled: m,
|
|
795
795
|
className: "\n px-6 py-2.5\n bg-transparent\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-muted\n transition-all duration-200\n font-medium\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
|
|
796
|
-
children:
|
|
796
|
+
children: h("productCommon.cancel", "Cancel")
|
|
797
797
|
})]
|
|
798
798
|
})
|
|
799
799
|
]
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
802
|
//#endregion
|
|
803
|
-
export {
|
|
803
|
+
export { T as ContentPageForm };
|
|
804
804
|
|
|
805
805
|
//# sourceMappingURL=ContentPageForm.js.map
|