@burdenoff/microfe-product 2026.525.1 → 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.
@@ -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 { ZodError as n } from "../../../../node_modules/zod/v4/classic/errors.js";
4
- import { createContentPageSchema as r, updateContentPageSchema as i } from "../schemas/index.js";
5
- import { useCallback as a, useRef as o, useState as s } from "react";
6
- import { Bold as c, Code as l, Eye as u, EyeOff as d, Heading as f, Italic as p, Link as m, List as h, ListOrdered as g, Loader2 as _, Quote as v } from "lucide-react";
7
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
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 x(e) {
10
+ function S(e) {
10
11
  let t = e;
11
12
  return t = t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), 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(/^&gt; (.+)$/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 S = [
17
+ var C = [
17
18
  {
18
19
  label: "Bold",
19
- icon: c,
20
+ icon: l,
20
21
  prefix: "**",
21
22
  suffix: "**",
22
23
  placeholder: "bold text"
23
24
  },
24
25
  {
25
26
  label: "Italic",
26
- icon: p,
27
+ icon: m,
27
28
  prefix: "*",
28
29
  suffix: "*",
29
30
  placeholder: "italic text"
30
31
  },
31
32
  {
32
33
  label: "Heading",
33
- icon: f,
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: h,
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: g,
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: m,
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: l,
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: v,
73
+ icon: y,
73
74
  prefix: "> ",
74
75
  suffix: "",
75
76
  placeholder: "quote text",
76
77
  block: !0
77
78
  }
78
- ], C = new Set(["blog", "press"]);
79
- function w({ contentPage: c, onSubmit: l, onCancel: f, loading: p }) {
80
- let m = e(), [h, g] = s({
81
- slug: c?.slug || "",
82
- title: c?.title || "",
83
- content: c?.content || "",
84
- contentFormat: c?.contentFormat || "markdown",
85
- seoTitle: c?.seoTitle || "",
86
- seoDescription: c?.seoDescription || "",
87
- seoKeywords: c?.seoKeywords || "",
88
- isPublished: c?.isPublished ?? !1,
89
- visibility: c?.visibility ?? "PUBLIC",
90
- sortOrder: c?.sortOrder ?? 0,
91
- productId: c?.productId || "",
92
- excerpt: c?.excerpt || "",
93
- thumbnail: c?.thumbnail || "",
94
- author: c?.author || "",
95
- publishedAt: c?.publishedAt ? c.publishedAt.slice(0, 16) : "",
96
- readingTime: c?.readingTime ?? 0,
97
- featured: c?.featured ?? !1,
98
- category: c?.category || ""
99
- }), [v, w] = s(c?.tags ?? []), T = [
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
- ], [E, D] = s((c?.tags ?? []).find((e) => T.includes(e)) || "page"), O = (e) => {
106
- D(e), w((t) => [e, ...t.filter((e) => !T.includes(e))]);
107
- }, [k, A] = s({}), [j, M] = s(!1), N = o(null), P = () => {
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 = c ? i : r, t = { ...h };
110
- return t.sortOrder = typeof h.sortOrder == "string" ? parseInt(h.sortOrder, 10) || 0 : h.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), A({}), !0;
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 n) {
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
- }), A(t);
118
+ }), j(t);
118
119
  }
119
120
  return !1;
120
121
  }
121
- }, F = async (e) => {
122
- if (e.preventDefault(), !P()) return;
123
- let t = typeof h.sortOrder == "string" ? parseInt(h.sortOrder, 10) || 0 : h.sortOrder, n = [E, ...v.filter((e) => !T.includes(e))];
124
- await l(c ? {
125
- title: h.title === c.title ? void 0 : h.title,
126
- content: h.content === c.content ? void 0 : h.content,
127
- contentFormat: h.contentFormat === c.contentFormat ? void 0 : h.contentFormat,
128
- seoTitle: h.seoTitle === (c.seoTitle || "") ? void 0 : h.seoTitle || void 0,
129
- seoDescription: h.seoDescription === (c.seoDescription || "") ? void 0 : h.seoDescription || void 0,
130
- seoKeywords: h.seoKeywords === (c.seoKeywords || "") ? void 0 : h.seoKeywords || void 0,
131
- isPublished: h.isPublished === c.isPublished ? void 0 : h.isPublished,
132
- visibility: h.visibility === c.visibility ? void 0 : h.visibility,
133
- sortOrder: t === c.sortOrder ? void 0 : t,
134
- productId: h.productId === (c.productId || "") ? void 0 : h.productId || void 0,
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: h.excerpt || void 0,
137
- thumbnail: h.thumbnail || void 0,
138
- author: h.author || void 0,
139
- publishedAt: h.publishedAt ? new Date(h.publishedAt).toISOString() : void 0,
140
- readingTime: h.readingTime || void 0,
141
- featured: h.featured,
142
- category: h.category || void 0
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: h.slug,
145
- title: h.title,
146
- content: h.content,
147
- contentFormat: h.contentFormat || "markdown",
148
- seoTitle: h.seoTitle || void 0,
149
- seoDescription: h.seoDescription || void 0,
150
- seoKeywords: h.seoKeywords || void 0,
151
- isPublished: h.isPublished,
152
- visibility: h.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: h.productId || void 0,
155
+ productId: g.productId || void 0,
155
156
  tags: n,
156
- excerpt: h.excerpt || void 0,
157
- thumbnail: h.thumbnail || void 0,
158
- author: h.author || void 0,
159
- publishedAt: h.publishedAt ? new Date(h.publishedAt).toISOString() : void 0,
160
- readingTime: h.readingTime || void 0,
161
- featured: h.featured,
162
- category: h.category || void 0
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
- }, I = a((e) => {
165
- let t = N.current;
165
+ }, L = o((e) => {
166
+ let t = P.current;
166
167
  if (!t) return;
167
- let { selectionStart: n, selectionEnd: r } = t, i = h.content, a = i.substring(n, r) || e.placeholder, o, s, c;
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
- g((e) => ({
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
- }, [h.content]), L = "\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 ";
177
- return /* @__PURE__ */ b("form", {
178
- onSubmit: F,
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__ */ b("div", {
182
+ /* @__PURE__ */ x("div", {
182
183
  className: "space-y-4",
183
184
  children: [
184
- /* @__PURE__ */ y("h3", {
185
+ /* @__PURE__ */ b("h3", {
185
186
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
186
- children: m("contentPages.basicInformation", "Basic Information")
187
+ children: h("contentPages.basicInformation", "Basic Information")
187
188
  }),
188
- /* @__PURE__ */ b("div", { children: [
189
- /* @__PURE__ */ y("label", {
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: m("contentPages.pageType", "Page Type")
193
+ children: h("contentPages.pageType", "Page Type")
193
194
  }),
194
- /* @__PURE__ */ b("select", {
195
+ /* @__PURE__ */ x("select", {
195
196
  id: "pageType",
196
- value: E,
197
- onChange: (e) => O(e.target.value),
198
- className: L,
199
- disabled: p,
197
+ value: D,
198
+ onChange: (e) => k(e.target.value),
199
+ className: R,
200
+ disabled: m,
200
201
  children: [
201
- /* @__PURE__ */ y("option", {
202
+ /* @__PURE__ */ b("option", {
202
203
  value: "blog",
203
- children: m("contentPages.typeBlog", "Blog Post")
204
+ children: h("contentPages.typeBlog", "Blog Post")
204
205
  }),
205
- /* @__PURE__ */ y("option", {
206
+ /* @__PURE__ */ b("option", {
206
207
  value: "legal",
207
- children: m("contentPages.typeLegal", "Legal")
208
+ children: h("contentPages.typeLegal", "Legal")
208
209
  }),
209
- /* @__PURE__ */ y("option", {
210
+ /* @__PURE__ */ b("option", {
210
211
  value: "docs",
211
- children: m("contentPages.typeDocs", "Documentation")
212
+ children: h("contentPages.typeDocs", "Documentation")
212
213
  }),
213
- /* @__PURE__ */ y("option", {
214
+ /* @__PURE__ */ b("option", {
214
215
  value: "press",
215
- children: m("contentPages.typePress", "Press Release")
216
+ children: h("contentPages.typePress", "Press Release")
216
217
  }),
217
- /* @__PURE__ */ y("option", {
218
+ /* @__PURE__ */ b("option", {
218
219
  value: "page",
219
- children: m("contentPages.typePage", "General Page")
220
+ children: h("contentPages.typePage", "General Page")
220
221
  })
221
222
  ]
222
223
  }),
223
- /* @__PURE__ */ y("p", {
224
+ /* @__PURE__ */ b("p", {
224
225
  className: "text-xs text-text-tertiary mt-1",
225
- children: m("contentPages.pageTypeHint", "Sets the primary tag and which fields apply. Blog Posts and Press Releases get the extra Article Details section below.")
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__ */ b("div", { children: [
229
- /* @__PURE__ */ b("label", {
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
- m("contentPages.slug", "Slug"),
234
+ h("contentPages.slug", "Slug"),
234
235
  " ",
235
- /* @__PURE__ */ y("span", {
236
+ /* @__PURE__ */ b("span", {
236
237
  className: "text-[var(--color-status-error)]",
237
238
  children: "*"
238
239
  })
239
240
  ]
240
241
  }),
241
- /* @__PURE__ */ y("input", {
242
+ /* @__PURE__ */ b("input", {
242
243
  id: "slug",
243
244
  type: "text",
244
- value: h.slug,
245
- onChange: (e) => g({
246
- ...h,
245
+ value: g.slug,
246
+ onChange: (e) => _({
247
+ ...g,
247
248
  slug: e.target.value.toLowerCase().replace(/\s+/g, "-")
248
249
  }),
249
- className: L,
250
+ className: R,
250
251
  placeholder: "page-slug",
251
- disabled: p || !!c,
252
- required: !c
252
+ disabled: m || !!l,
253
+ required: !l
253
254
  }),
254
- /* @__PURE__ */ y("p", {
255
+ /* @__PURE__ */ b("p", {
255
256
  className: "text-xs text-text-tertiary mt-1",
256
- children: m("contentPages.slugHint", "Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.")
257
+ children: h("contentPages.slugHint", "Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.")
257
258
  }),
258
- k.slug && /* @__PURE__ */ y("p", {
259
+ A.slug && /* @__PURE__ */ b("p", {
259
260
  className: "text-sm text-[var(--color-status-error)] mt-1",
260
- children: k.slug
261
+ children: A.slug
261
262
  })
262
263
  ] }),
263
- /* @__PURE__ */ b("div", { children: [
264
- /* @__PURE__ */ b("label", {
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
- m("contentPages.pageTitle", "Title"),
269
+ h("contentPages.pageTitle", "Title"),
269
270
  " ",
270
- /* @__PURE__ */ y("span", {
271
+ /* @__PURE__ */ b("span", {
271
272
  className: "text-[var(--color-status-error)]",
272
273
  children: "*"
273
274
  })
274
275
  ]
275
276
  }),
276
- /* @__PURE__ */ y("input", {
277
+ /* @__PURE__ */ b("input", {
277
278
  id: "title",
278
279
  type: "text",
279
- value: h.title,
280
- onChange: (e) => g({
281
- ...h,
280
+ value: g.title,
281
+ onChange: (e) => _({
282
+ ...g,
282
283
  title: e.target.value
283
284
  }),
284
- className: L,
285
- placeholder: m("contentPages.enterPageTitle", "Enter page title"),
286
- disabled: p,
285
+ className: R,
286
+ placeholder: h("contentPages.enterPageTitle", "Enter page title"),
287
+ disabled: m,
287
288
  required: !0
288
289
  }),
289
- k.title && /* @__PURE__ */ y("p", {
290
+ A.title && /* @__PURE__ */ b("p", {
290
291
  className: "text-sm text-[var(--color-status-error)] mt-1",
291
- children: k.title
292
+ children: A.title
292
293
  })
293
294
  ] })
294
295
  ]
295
296
  }),
296
- /* @__PURE__ */ b("div", {
297
+ /* @__PURE__ */ x("div", {
297
298
  className: "space-y-4 pt-4 border-t border-default",
298
299
  children: [
299
- /* @__PURE__ */ y("h3", {
300
+ /* @__PURE__ */ b("h3", {
300
301
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
301
- children: m("contentPages.contentEditor", "Content Editor")
302
+ children: h("contentPages.contentEditor", "Content Editor")
302
303
  }),
303
- /* @__PURE__ */ b("div", {
304
+ /* @__PURE__ */ x("div", {
304
305
  className: "border border-default rounded-lg overflow-hidden",
305
- children: [/* @__PURE__ */ b("div", {
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__ */ y("div", {
308
+ children: [/* @__PURE__ */ b("div", {
308
309
  className: "flex items-center gap-0.5",
309
- children: S.map((e) => {
310
+ children: C.map((e) => {
310
311
  let t = e.icon;
311
- return /* @__PURE__ */ y("button", {
312
+ return /* @__PURE__ */ b("button", {
312
313
  type: "button",
313
314
  title: e.label,
314
- onClick: () => I(e),
315
- disabled: p || j,
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__ */ y(t, { size: 16 })
318
+ children: /* @__PURE__ */ b(t, { size: 16 })
318
319
  }, e.label);
319
320
  })
320
- }), /* @__PURE__ */ b("div", {
321
+ }), /* @__PURE__ */ x("div", {
321
322
  className: "flex items-center gap-1",
322
- children: [/* @__PURE__ */ b("button", {
323
+ children: [/* @__PURE__ */ x("button", {
323
324
  type: "button",
324
- onClick: () => M(!1),
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
- ${j ? "text-text-tertiary hover:text-text-secondary" : "bg-surface text-text-primary shadow-sm"}
329
+ ${M ? "text-text-tertiary hover:text-text-secondary" : "bg-surface text-text-primary shadow-sm"}
329
330
  `,
330
- children: [/* @__PURE__ */ y(d, { size: 14 }), m("contentPages.editMode", "Edit")]
331
- }), /* @__PURE__ */ b("button", {
331
+ children: [/* @__PURE__ */ b(f, { size: 14 }), h("contentPages.editMode", "Edit")]
332
+ }), /* @__PURE__ */ x("button", {
332
333
  type: "button",
333
- onClick: () => M(!0),
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
- ${j ? "bg-surface text-text-primary shadow-sm" : "text-text-tertiary hover:text-text-secondary"}
338
+ ${M ? "bg-surface text-text-primary shadow-sm" : "text-text-tertiary hover:text-text-secondary"}
338
339
  `,
339
- children: [/* @__PURE__ */ y(u, { size: 14 }), m("contentPages.previewMode", "Preview")]
340
+ children: [/* @__PURE__ */ b(d, { size: 14 }), h("contentPages.previewMode", "Preview")]
340
341
  })]
341
342
  })]
342
- }), /* @__PURE__ */ b("div", {
343
+ }), /* @__PURE__ */ x("div", {
343
344
  className: "relative",
344
- children: [!j && /* @__PURE__ */ y("textarea", {
345
- ref: N,
345
+ children: [!M && /* @__PURE__ */ b("textarea", {
346
+ ref: P,
346
347
  id: "content",
347
- value: h.content,
348
- onChange: (e) => g({
349
- ...h,
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: m("contentPages.writeContentPlaceholder", "Write your content in markdown..."),
354
- disabled: p
355
- }), j && /* @__PURE__ */ y("div", {
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: h.content ? x(h.content) : "<p class=\"text-gray-400 italic\">Nothing to preview yet. Start writing in the editor.</p>" }
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
- k.content && /* @__PURE__ */ y("p", {
362
+ A.content && /* @__PURE__ */ b("p", {
362
363
  className: "text-sm text-[var(--color-status-error)] mt-1",
363
- children: k.content
364
+ children: A.content
364
365
  })
365
366
  ]
366
367
  }),
367
- /* @__PURE__ */ b("div", {
368
+ /* @__PURE__ */ x("div", {
368
369
  className: "space-y-4 pt-4 border-t border-default",
369
370
  children: [
370
- /* @__PURE__ */ y("h3", {
371
+ /* @__PURE__ */ b("h3", {
371
372
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
372
- children: m("contentPages.seoMetadata", "SEO Metadata")
373
+ children: h("contentPages.seoMetadata", "SEO Metadata")
373
374
  }),
374
- /* @__PURE__ */ b("div", { children: [
375
- /* @__PURE__ */ y("label", {
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: m("contentPages.seoTitle", "SEO Title")
379
+ children: h("contentPages.seoTitle", "SEO Title")
379
380
  }),
380
- /* @__PURE__ */ y("input", {
381
+ /* @__PURE__ */ b("input", {
381
382
  id: "seoTitle",
382
383
  type: "text",
383
- value: h.seoTitle,
384
- onChange: (e) => g({
385
- ...h,
384
+ value: g.seoTitle,
385
+ onChange: (e) => _({
386
+ ...g,
386
387
  seoTitle: e.target.value
387
388
  }),
388
- className: L,
389
- placeholder: m("contentPages.seoTitlePlaceholder", "Page title for search engines"),
390
- disabled: p
389
+ className: R,
390
+ placeholder: h("contentPages.seoTitlePlaceholder", "Page title for search engines"),
391
+ disabled: m
391
392
  }),
392
- /* @__PURE__ */ b("p", {
393
+ /* @__PURE__ */ x("p", {
393
394
  className: "text-xs text-text-tertiary mt-1",
394
- children: [h.seoTitle.length, "/100 characters"]
395
+ children: [g.seoTitle.length, "/100 characters"]
395
396
  }),
396
- k.seoTitle && /* @__PURE__ */ y("p", {
397
+ A.seoTitle && /* @__PURE__ */ b("p", {
397
398
  className: "text-sm text-[var(--color-status-error)] mt-1",
398
- children: k.seoTitle
399
+ children: A.seoTitle
399
400
  })
400
401
  ] }),
401
- /* @__PURE__ */ b("div", { children: [
402
- /* @__PURE__ */ y("label", {
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: m("contentPages.seoDescription", "SEO Description")
406
+ children: h("contentPages.seoDescription", "SEO Description")
406
407
  }),
407
- /* @__PURE__ */ y("textarea", {
408
+ /* @__PURE__ */ b("textarea", {
408
409
  id: "seoDescription",
409
- value: h.seoDescription,
410
- onChange: (e) => g({
411
- ...h,
410
+ value: g.seoDescription,
411
+ onChange: (e) => _({
412
+ ...g,
412
413
  seoDescription: e.target.value
413
414
  }),
414
415
  rows: 3,
415
- className: L,
416
- placeholder: m("contentPages.seoDescriptionPlaceholder", "Brief description for search engine results"),
417
- disabled: p
416
+ className: R,
417
+ placeholder: h("contentPages.seoDescriptionPlaceholder", "Brief description for search engine results"),
418
+ disabled: m
418
419
  }),
419
- /* @__PURE__ */ b("p", {
420
+ /* @__PURE__ */ x("p", {
420
421
  className: "text-xs text-text-tertiary mt-1",
421
- children: [h.seoDescription.length, "/300 characters"]
422
+ children: [g.seoDescription.length, "/300 characters"]
422
423
  }),
423
- k.seoDescription && /* @__PURE__ */ y("p", {
424
+ A.seoDescription && /* @__PURE__ */ b("p", {
424
425
  className: "text-sm text-[var(--color-status-error)] mt-1",
425
- children: k.seoDescription
426
+ children: A.seoDescription
426
427
  })
427
428
  ] }),
428
- /* @__PURE__ */ b("div", { children: [
429
- /* @__PURE__ */ y("label", {
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: m("contentPages.seoKeywords", "SEO Keywords")
433
+ children: h("contentPages.seoKeywords", "SEO Keywords")
433
434
  }),
434
- /* @__PURE__ */ y("input", {
435
+ /* @__PURE__ */ b("input", {
435
436
  id: "seoKeywords",
436
437
  type: "text",
437
- value: h.seoKeywords,
438
- onChange: (e) => g({
439
- ...h,
438
+ value: g.seoKeywords,
439
+ onChange: (e) => _({
440
+ ...g,
440
441
  seoKeywords: e.target.value
441
442
  }),
442
- className: L,
443
+ className: R,
443
444
  placeholder: "keyword1, keyword2, keyword3",
444
- disabled: p
445
+ disabled: m
445
446
  }),
446
- /* @__PURE__ */ b("p", {
447
+ /* @__PURE__ */ x("p", {
447
448
  className: "text-xs text-text-tertiary mt-1",
448
449
  children: [
449
450
  "Comma-separated keywords. ",
450
- h.seoKeywords.length,
451
+ g.seoKeywords.length,
451
452
  "/200 characters"
452
453
  ]
453
454
  }),
454
- k.seoKeywords && /* @__PURE__ */ y("p", {
455
+ A.seoKeywords && /* @__PURE__ */ b("p", {
455
456
  className: "text-sm text-[var(--color-status-error)] mt-1",
456
- children: k.seoKeywords
457
+ children: A.seoKeywords
457
458
  })
458
459
  ] })
459
460
  ]
460
461
  }),
461
- C.has(E) && /* @__PURE__ */ b("div", {
462
+ w.has(D) && /* @__PURE__ */ x("div", {
462
463
  className: "space-y-4 pt-4 border-t border-default",
463
464
  children: [
464
- /* @__PURE__ */ y("h3", {
465
+ /* @__PURE__ */ b("h3", {
465
466
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
466
- children: m("contentPages.extraDetailFields", "Article Details")
467
+ children: h("contentPages.extraDetailFields", "Article Details")
467
468
  }),
468
- /* @__PURE__ */ y("p", {
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__ */ b("div", { children: [
473
- /* @__PURE__ */ y("label", {
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: m("contentPages.excerpt", "Excerpt")
477
+ children: h("contentPages.excerpt", "Excerpt")
477
478
  }),
478
- /* @__PURE__ */ y("textarea", {
479
+ /* @__PURE__ */ b("textarea", {
479
480
  id: "excerpt",
480
- value: h.excerpt,
481
- onChange: (e) => g({
482
- ...h,
481
+ value: g.excerpt,
482
+ onChange: (e) => _({
483
+ ...g,
483
484
  excerpt: e.target.value
484
485
  }),
485
486
  rows: 2,
486
- className: L,
487
+ className: R,
487
488
  placeholder: "Short summary shown on listing cards",
488
- disabled: p
489
+ disabled: m
489
490
  }),
490
- /* @__PURE__ */ b("p", {
491
+ /* @__PURE__ */ x("p", {
491
492
  className: "text-xs text-text-tertiary mt-1",
492
- children: [h.excerpt.length, "/500 characters"]
493
+ children: [g.excerpt.length, "/500 characters"]
493
494
  })
494
495
  ] }),
495
- /* @__PURE__ */ b("div", { children: [
496
- /* @__PURE__ */ y("label", {
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: m("contentPages.thumbnail", "Thumbnail URL")
500
+ children: h("contentPages.thumbnail", "Thumbnail URL")
500
501
  }),
501
- /* @__PURE__ */ y("input", {
502
+ /* @__PURE__ */ b("input", {
502
503
  id: "thumbnail",
503
504
  type: "url",
504
- value: h.thumbnail,
505
- onChange: (e) => g({
506
- ...h,
505
+ value: g.thumbnail,
506
+ onChange: (e) => _({
507
+ ...g,
507
508
  thumbnail: e.target.value
508
509
  }),
509
- className: L,
510
+ className: R,
510
511
  placeholder: "https://images.unsplash.com/...",
511
- disabled: p
512
+ disabled: m
512
513
  }),
513
- h.thumbnail && /* @__PURE__ */ y("div", {
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__ */ y("img", {
517
- src: h.thumbnail,
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__ */ b("div", {
524
+ /* @__PURE__ */ x("div", {
524
525
  className: "grid grid-cols-2 gap-4",
525
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
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: m("contentPages.author", "Author")
529
- }), /* @__PURE__ */ y("input", {
529
+ children: h("contentPages.author", "Author")
530
+ }), /* @__PURE__ */ b("input", {
530
531
  id: "author",
531
532
  type: "text",
532
- value: h.author,
533
- onChange: (e) => g({
534
- ...h,
533
+ value: g.author,
534
+ onChange: (e) => _({
535
+ ...g,
535
536
  author: e.target.value
536
537
  }),
537
- className: L,
538
+ className: R,
538
539
  placeholder: "Author name",
539
- disabled: p
540
- })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
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: m("contentPages.category", "Category")
544
- }), /* @__PURE__ */ y("input", {
544
+ children: h("contentPages.category", "Category")
545
+ }), /* @__PURE__ */ b("input", {
545
546
  id: "category",
546
547
  type: "text",
547
- value: h.category,
548
- onChange: (e) => g({
549
- ...h,
548
+ value: g.category,
549
+ onChange: (e) => _({
550
+ ...g,
550
551
  category: e.target.value
551
552
  }),
552
- className: L,
553
+ className: R,
553
554
  placeholder: "Engineering, Product, Company",
554
- disabled: p
555
+ disabled: m
555
556
  })] })]
556
557
  }),
557
- /* @__PURE__ */ b("div", {
558
+ /* @__PURE__ */ x("div", {
558
559
  className: "grid grid-cols-2 gap-4",
559
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
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: m("contentPages.publishedAt", "Publish Date")
563
- }), /* @__PURE__ */ y("input", {
563
+ children: h("contentPages.publishedAt", "Publish Date")
564
+ }), /* @__PURE__ */ b("input", {
564
565
  id: "publishedAt",
565
566
  type: "datetime-local",
566
- value: h.publishedAt,
567
- onChange: (e) => g({
568
- ...h,
567
+ value: g.publishedAt,
568
+ onChange: (e) => _({
569
+ ...g,
569
570
  publishedAt: e.target.value
570
571
  }),
571
- className: L,
572
- disabled: p
573
- })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
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: m("contentPages.readingTime", "Reading Time (min)")
577
- }), /* @__PURE__ */ y("input", {
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: h.readingTime,
583
- onChange: (e) => g({
584
- ...h,
583
+ value: g.readingTime,
584
+ onChange: (e) => _({
585
+ ...g,
585
586
  readingTime: parseInt(e.target.value, 10) || 0
586
587
  }),
587
- className: L,
588
+ className: R,
588
589
  placeholder: "5",
589
- disabled: p
590
+ disabled: m
590
591
  })] })]
591
592
  }),
592
- /* @__PURE__ */ b("div", {
593
+ /* @__PURE__ */ x("div", {
593
594
  className: "flex items-center gap-3",
594
- children: [/* @__PURE__ */ y("button", {
595
+ children: [/* @__PURE__ */ b("button", {
595
596
  type: "button",
596
597
  role: "switch",
597
- "aria-checked": h.featured,
598
- onClick: () => g({
599
- ...h,
600
- featured: !h.featured
598
+ "aria-checked": g.featured,
599
+ onClick: () => _({
600
+ ...g,
601
+ featured: !g.featured
601
602
  }),
602
- disabled: p,
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
- ${h.featured ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
611
+ ${g.featured ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
611
612
  `,
612
- children: /* @__PURE__ */ y("span", { className: `
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
- ${h.featured ? "translate-x-5" : "translate-x-0"}
617
+ ${g.featured ? "translate-x-5" : "translate-x-0"}
617
618
  ` })
618
- }), /* @__PURE__ */ y("label", {
619
+ }), /* @__PURE__ */ b("label", {
619
620
  className: "text-sm font-medium text-text-primary",
620
- children: h.featured ? m("contentPages.featured", "Featured") : m("contentPages.notFeatured", "Not Featured")
621
+ children: g.featured ? h("contentPages.featured", "Featured") : h("contentPages.notFeatured", "Not Featured")
621
622
  })]
622
623
  })
623
624
  ]
624
625
  }),
625
- /* @__PURE__ */ b("div", {
626
+ /* @__PURE__ */ x("div", {
626
627
  className: "space-y-4 pt-4 border-t border-default",
627
628
  children: [
628
- /* @__PURE__ */ y("h3", {
629
+ /* @__PURE__ */ b("h3", {
629
630
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
630
- children: m("contentPages.publishing", "Publishing")
631
+ children: h("contentPages.publishing", "Publishing")
631
632
  }),
632
- /* @__PURE__ */ b("div", {
633
+ /* @__PURE__ */ x("div", {
633
634
  className: "flex items-center gap-3",
634
- children: [/* @__PURE__ */ y("button", {
635
+ children: [/* @__PURE__ */ b("button", {
635
636
  type: "button",
636
637
  role: "switch",
637
- "aria-checked": h.isPublished,
638
- onClick: () => g({
639
- ...h,
640
- isPublished: !h.isPublished
638
+ "aria-checked": g.isPublished,
639
+ onClick: () => _({
640
+ ...g,
641
+ isPublished: !g.isPublished
641
642
  }),
642
- disabled: p,
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
- ${h.isPublished ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
651
+ ${g.isPublished ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
651
652
  `,
652
- children: /* @__PURE__ */ y("span", { className: `
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
- ${h.isPublished ? "translate-x-5" : "translate-x-0"}
657
+ ${g.isPublished ? "translate-x-5" : "translate-x-0"}
657
658
  ` })
658
- }), /* @__PURE__ */ y("label", {
659
+ }), /* @__PURE__ */ b("label", {
659
660
  className: "text-sm font-medium text-text-primary",
660
- children: h.isPublished ? m("contentPages.published", "Published") : m("contentPages.draft", "Draft")
661
+ children: g.isPublished ? h("contentPages.published", "Published") : h("contentPages.draft", "Draft")
661
662
  })]
662
663
  }),
663
- k.isPublished && /* @__PURE__ */ y("p", {
664
+ A.isPublished && /* @__PURE__ */ b("p", {
664
665
  className: "text-sm text-[var(--color-status-error)] mt-1",
665
- children: k.isPublished
666
+ children: A.isPublished
666
667
  }),
667
- /* @__PURE__ */ b("div", { children: [
668
- /* @__PURE__ */ y("label", {
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: m("contentPages.visibility", "Visibility")
672
+ children: h("contentPages.visibility", "Visibility")
672
673
  }),
673
- /* @__PURE__ */ b("select", {
674
+ /* @__PURE__ */ x("select", {
674
675
  id: "visibility",
675
- value: h.visibility,
676
- onChange: (e) => g({
677
- ...h,
676
+ value: g.visibility,
677
+ onChange: (e) => _({
678
+ ...g,
678
679
  visibility: e.target.value
679
680
  }),
680
- className: L,
681
- disabled: p,
681
+ className: R,
682
+ disabled: m,
682
683
  children: [
683
- /* @__PURE__ */ y("option", {
684
+ /* @__PURE__ */ b("option", {
684
685
  value: "PUBLIC",
685
- children: m("contentPages.visibilityPublic", "Public — visible to everyone")
686
+ children: h("contentPages.visibilityPublic", "Public — visible to everyone")
686
687
  }),
687
- /* @__PURE__ */ y("option", {
688
+ /* @__PURE__ */ b("option", {
688
689
  value: "AUTHENTICATED",
689
- children: m("contentPages.visibilityAuthenticated", "Authenticated — signed-in users only")
690
+ children: h("contentPages.visibilityAuthenticated", "Authenticated — signed-in users only")
690
691
  }),
691
- /* @__PURE__ */ y("option", {
692
+ /* @__PURE__ */ b("option", {
692
693
  value: "INTERNAL",
693
- children: m("contentPages.visibilityInternal", "Internal — staff/admin only")
694
+ children: h("contentPages.visibilityInternal", "Internal — staff/admin only")
694
695
  })
695
696
  ]
696
697
  }),
697
- /* @__PURE__ */ y("p", {
698
+ /* @__PURE__ */ b("p", {
698
699
  className: "text-xs text-text-tertiary mt-1",
699
- children: m("contentPages.visibilityHint", "Public is required for blog posts and legal pages to appear on the website.")
700
+ children: h("contentPages.visibilityHint", "Public is required for blog posts and legal pages to appear on the website.")
700
701
  }),
701
- k.visibility && /* @__PURE__ */ y("p", {
702
+ A.visibility && /* @__PURE__ */ b("p", {
702
703
  className: "text-sm text-[var(--color-status-error)] mt-1",
703
- children: k.visibility
704
+ children: A.visibility
704
705
  })
705
706
  ] }),
706
- /* @__PURE__ */ b("div", { children: [
707
- /* @__PURE__ */ y("label", {
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: m("contentPages.sortOrder", "Sort Order")
711
+ children: h("contentPages.sortOrder", "Sort Order")
711
712
  }),
712
- /* @__PURE__ */ y("input", {
713
+ /* @__PURE__ */ b("input", {
713
714
  id: "sortOrder",
714
715
  type: "number",
715
716
  min: 0,
716
- value: h.sortOrder,
717
- onChange: (e) => g({
718
- ...h,
717
+ value: g.sortOrder,
718
+ onChange: (e) => _({
719
+ ...g,
719
720
  sortOrder: parseInt(e.target.value, 10) || 0
720
721
  }),
721
- className: L,
722
+ className: R,
722
723
  placeholder: "0",
723
- disabled: p
724
+ disabled: m
724
725
  }),
725
- /* @__PURE__ */ y("p", {
726
+ /* @__PURE__ */ b("p", {
726
727
  className: "text-xs text-text-tertiary mt-1",
727
- children: m("contentPages.sortOrderHint", "Lower numbers appear first. Default is 0.")
728
+ children: h("contentPages.sortOrderHint", "Lower numbers appear first. Default is 0.")
728
729
  }),
729
- k.sortOrder && /* @__PURE__ */ y("p", {
730
+ A.sortOrder && /* @__PURE__ */ b("p", {
730
731
  className: "text-sm text-[var(--color-status-error)] mt-1",
731
- children: k.sortOrder
732
+ children: A.sortOrder
732
733
  })
733
734
  ] }),
734
- /* @__PURE__ */ b("div", { children: [
735
- /* @__PURE__ */ y("label", {
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: m("contentPages.productId", "Product ID")
739
+ children: h("contentPages.productId", "Product ID")
739
740
  }),
740
- /* @__PURE__ */ y("input", {
741
+ /* @__PURE__ */ b(n, {
741
742
  id: "productId",
742
- type: "text",
743
- value: h.productId,
744
- onChange: (e) => g({
745
- ...h,
746
- productId: e.target.value
743
+ value: g.productId,
744
+ onChange: (e) => _({
745
+ ...g,
746
+ productId: e
747
747
  }),
748
- className: L,
749
- placeholder: m("contentPages.productIdPlaceholder", "Optional product association"),
750
- disabled: p
748
+ disabled: m,
749
+ placeholder: h("contentPages.productIdPlaceholder", "Optional product association"),
750
+ error: A.productId
751
751
  }),
752
- /* @__PURE__ */ y("p", {
752
+ /* @__PURE__ */ b("p", {
753
753
  className: "text-xs text-text-tertiary mt-1",
754
- children: m("contentPages.productIdHint", "Associate this content page with a specific product.")
754
+ children: h("contentPages.productIdHint", "Associate this content page with a specific product.")
755
755
  }),
756
- k.productId && /* @__PURE__ */ y("p", {
756
+ A.productId && /* @__PURE__ */ b("p", {
757
757
  className: "text-sm text-[var(--color-status-error)] mt-1",
758
- children: k.productId
758
+ children: A.productId
759
759
  })
760
760
  ] })
761
761
  ]
762
762
  }),
763
- /* @__PURE__ */ b("div", {
763
+ /* @__PURE__ */ x("div", {
764
764
  className: "space-y-4 pt-4 border-t border-default",
765
765
  children: [
766
- /* @__PURE__ */ y("h3", {
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__ */ y(t, {
771
- value: v,
772
- onChange: w,
773
- disabled: p
770
+ /* @__PURE__ */ b(t, {
771
+ value: y,
772
+ onChange: T,
773
+ disabled: m
774
774
  }),
775
- /* @__PURE__ */ y("p", {
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__ */ b("div", {
781
+ /* @__PURE__ */ x("div", {
782
782
  className: "flex gap-3 pt-4 border-t border-default",
783
- children: [/* @__PURE__ */ b("button", {
783
+ children: [/* @__PURE__ */ x("button", {
784
784
  type: "submit",
785
- disabled: p,
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: [p && /* @__PURE__ */ y(_, {
787
+ children: [m && /* @__PURE__ */ b(v, {
788
788
  size: 16,
789
789
  className: "animate-spin"
790
- }), c ? m("contentPages.updateContentPage", "Update Content Page") : m("contentPages.createContentPage", "Create Content Page")]
791
- }), /* @__PURE__ */ y("button", {
790
+ }), l ? h("contentPages.updateContentPage", "Update Content Page") : h("contentPages.createContentPage", "Create Content Page")]
791
+ }), /* @__PURE__ */ b("button", {
792
792
  type: "button",
793
- onClick: f,
794
- disabled: p,
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: m("productCommon.cancel", "Cancel")
796
+ children: h("productCommon.cancel", "Cancel")
797
797
  })]
798
798
  })
799
799
  ]
800
800
  });
801
801
  }
802
802
  //#endregion
803
- export { w as ContentPageForm };
803
+ export { T as ContentPageForm };
804
804
 
805
805
  //# sourceMappingURL=ContentPageForm.js.map