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