@burdenoff/microfe-product 2026.626.2 → 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.
Files changed (38) hide show
  1. package/dist/product/pages/ContentPageViewPage.js +42 -43
  2. package/dist/product/pages/ContentPageViewPage.js.map +1 -1
  3. package/dist/product/pages/ProductViewPage.js +88 -87
  4. package/dist/product/pages/ProductViewPage.js.map +1 -1
  5. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +341 -473
  6. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +8 -10
  8. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  9. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +201 -168
  10. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  11. package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js +1 -0
  12. package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js.map +1 -1
  13. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +37 -34
  14. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
  15. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +183 -138
  16. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  17. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +250 -252
  18. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  19. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +72 -72
  20. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  21. package/dist/product-management/modules/products/components/ProductForm.js +490 -492
  22. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  23. package/dist/product-management/modules/products/hooks/useProducts.js +20 -7
  24. package/dist/product-management/modules/products/hooks/useProducts.js.map +1 -1
  25. package/dist/product-management/modules/products/pages/ProductDetailPage.js +130 -129
  26. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  27. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +195 -203
  28. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  29. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +88 -87
  30. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  31. package/dist/shared/components/MarkdownEditor.js +161 -0
  32. package/dist/shared/components/MarkdownEditor.js.map +1 -0
  33. package/dist/shared/components/index.js +1 -0
  34. package/package.json +2 -2
  35. package/dist/node_modules/dompurify/dist/purify.es.js +0 -555
  36. package/dist/node_modules/dompurify/dist/purify.es.js.map +0 -1
  37. package/dist/shared/utils/renderMarkdown.js +0 -8
  38. 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 { TagInput as t } from "../../../shared/components/input/TagInput.js";
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";
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
- function S(e) {
11
- let t = e;
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) => {
13
- let t = e.trim();
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>` : "";
15
- }).join("\n"), t;
16
- }
17
- var C = [
18
- {
19
- label: "Bold",
20
- icon: l,
21
- prefix: "**",
22
- suffix: "**",
23
- placeholder: "bold text"
24
- },
25
- {
26
- label: "Italic",
27
- icon: m,
28
- prefix: "*",
29
- suffix: "*",
30
- placeholder: "italic text"
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
- ], [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 = () => {
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 = 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;
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 r) {
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
- }), j(t);
50
+ }), E(t);
119
51
  }
120
52
  return !1;
121
53
  }
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,
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: 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
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: 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,
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: g.productId || void 0,
87
+ productId: _.productId || void 0,
156
88
  tags: n,
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
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
- }, [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-bg-sunken disabled:cursor-not-allowed\n transition-all duration-200\n ";
178
- return /* @__PURE__ */ x("form", {
179
- onSubmit: I,
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__ */ x("div", {
102
+ /* @__PURE__ */ u("div", {
183
103
  className: "space-y-4",
184
104
  children: [
185
- /* @__PURE__ */ b("h3", {
105
+ /* @__PURE__ */ l("h3", {
186
106
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
187
- children: h("contentPages.basicInformation", "Basic Information")
107
+ children: g("contentPages.basicInformation", "Basic Information")
188
108
  }),
189
- /* @__PURE__ */ x("div", { children: [
190
- /* @__PURE__ */ b("label", {
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: h("contentPages.pageType", "Page Type")
113
+ children: g("contentPages.pageType", "Page Type")
194
114
  }),
195
- /* @__PURE__ */ x("select", {
115
+ /* @__PURE__ */ u("select", {
196
116
  id: "pageType",
197
- value: D,
198
- onChange: (e) => k(e.target.value),
199
- className: R,
200
- disabled: m,
117
+ value: S,
118
+ onChange: (e) => w(e.target.value),
119
+ className: k,
120
+ disabled: h,
201
121
  children: [
202
- /* @__PURE__ */ b("option", {
122
+ /* @__PURE__ */ l("option", {
203
123
  value: "blog",
204
- children: h("contentPages.typeBlog", "Blog Post")
124
+ children: g("contentPages.typeBlog", "Blog Post")
205
125
  }),
206
- /* @__PURE__ */ b("option", {
126
+ /* @__PURE__ */ l("option", {
207
127
  value: "legal",
208
- children: h("contentPages.typeLegal", "Legal")
128
+ children: g("contentPages.typeLegal", "Legal")
209
129
  }),
210
- /* @__PURE__ */ b("option", {
130
+ /* @__PURE__ */ l("option", {
211
131
  value: "docs",
212
- children: h("contentPages.typeDocs", "Documentation")
132
+ children: g("contentPages.typeDocs", "Documentation")
213
133
  }),
214
- /* @__PURE__ */ b("option", {
134
+ /* @__PURE__ */ l("option", {
215
135
  value: "press",
216
- children: h("contentPages.typePress", "Press Release")
136
+ children: g("contentPages.typePress", "Press Release")
217
137
  }),
218
- /* @__PURE__ */ b("option", {
138
+ /* @__PURE__ */ l("option", {
219
139
  value: "page",
220
- children: h("contentPages.typePage", "General Page")
140
+ children: g("contentPages.typePage", "General Page")
221
141
  })
222
142
  ]
223
143
  }),
224
- /* @__PURE__ */ b("p", {
144
+ /* @__PURE__ */ l("p", {
225
145
  className: "text-xs text-text-tertiary mt-1",
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.")
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__ */ x("div", { children: [
230
- /* @__PURE__ */ x("label", {
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
- h("contentPages.slug", "Slug"),
154
+ g("contentPages.slug", "Slug"),
235
155
  " ",
236
- /* @__PURE__ */ b("span", {
156
+ /* @__PURE__ */ l("span", {
237
157
  className: "text-[var(--color-status-error)]",
238
158
  children: "*"
239
159
  })
240
160
  ]
241
161
  }),
242
- /* @__PURE__ */ b("input", {
162
+ /* @__PURE__ */ l("input", {
243
163
  id: "slug",
244
164
  type: "text",
245
- value: g.slug,
246
- onChange: (e) => _({
247
- ...g,
165
+ value: _.slug,
166
+ onChange: (e) => v({
167
+ ..._,
248
168
  slug: e.target.value.toLowerCase().replace(/\s+/g, "-")
249
169
  }),
250
- className: R,
170
+ className: k,
251
171
  placeholder: "page-slug",
252
- disabled: m || !!l,
253
- required: !l
172
+ disabled: h || !!f,
173
+ required: !f
254
174
  }),
255
- /* @__PURE__ */ b("p", {
175
+ /* @__PURE__ */ l("p", {
256
176
  className: "text-xs text-text-tertiary mt-1",
257
- children: h("contentPages.slugHint", "Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.")
177
+ children: g("contentPages.slugHint", "Lowercase letters, numbers, and hyphens only. Cannot be changed after creation.")
258
178
  }),
259
- A.slug && /* @__PURE__ */ b("p", {
179
+ T.slug && /* @__PURE__ */ l("p", {
260
180
  className: "text-sm text-[var(--color-status-error)] mt-1",
261
- children: A.slug
181
+ children: T.slug
262
182
  })
263
183
  ] }),
264
- /* @__PURE__ */ x("div", { children: [
265
- /* @__PURE__ */ x("label", {
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
- h("contentPages.pageTitle", "Title"),
189
+ g("contentPages.pageTitle", "Title"),
270
190
  " ",
271
- /* @__PURE__ */ b("span", {
191
+ /* @__PURE__ */ l("span", {
272
192
  className: "text-[var(--color-status-error)]",
273
193
  children: "*"
274
194
  })
275
195
  ]
276
196
  }),
277
- /* @__PURE__ */ b("input", {
197
+ /* @__PURE__ */ l("input", {
278
198
  id: "title",
279
199
  type: "text",
280
- value: g.title,
281
- onChange: (e) => _({
282
- ...g,
200
+ value: _.title,
201
+ onChange: (e) => v({
202
+ ..._,
283
203
  title: e.target.value
284
204
  }),
285
- className: R,
286
- placeholder: h("contentPages.enterPageTitle", "Enter page title"),
287
- disabled: m,
205
+ className: k,
206
+ placeholder: g("contentPages.enterPageTitle", "Enter page title"),
207
+ disabled: h,
288
208
  required: !0
289
209
  }),
290
- A.title && /* @__PURE__ */ b("p", {
210
+ T.title && /* @__PURE__ */ l("p", {
291
211
  className: "text-sm text-[var(--color-status-error)] mt-1",
292
- children: A.title
212
+ children: T.title
293
213
  })
294
214
  ] })
295
215
  ]
296
216
  }),
297
- /* @__PURE__ */ x("div", {
217
+ /* @__PURE__ */ u("div", {
298
218
  className: "space-y-4 pt-4 border-t border-border-seam",
299
- children: [
300
- /* @__PURE__ */ b("h3", {
301
- className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
302
- children: h("contentPages.contentEditor", "Content Editor")
303
- }),
304
- /* @__PURE__ */ x("div", {
305
- className: "border border-default rounded-lg overflow-hidden",
306
- children: [/* @__PURE__ */ x("div", {
307
- className: "flex items-center justify-between bg-bg-sunken px-2 py-1.5 border-b border-border-seam",
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
- A.content && /* @__PURE__ */ b("p", {
363
- className: "text-sm text-[var(--color-status-error)] mt-1",
364
- children: A.content
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__ */ x("div", {
236
+ /* @__PURE__ */ u("div", {
369
237
  className: "space-y-4 pt-4 border-t border-border-seam",
370
238
  children: [
371
- /* @__PURE__ */ b("h3", {
239
+ /* @__PURE__ */ l("h3", {
372
240
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
373
- children: h("contentPages.seoMetadata", "SEO Metadata")
241
+ children: g("contentPages.seoMetadata", "SEO Metadata")
374
242
  }),
375
- /* @__PURE__ */ x("div", { children: [
376
- /* @__PURE__ */ b("label", {
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: h("contentPages.seoTitle", "SEO Title")
247
+ children: g("contentPages.seoTitle", "SEO Title")
380
248
  }),
381
- /* @__PURE__ */ b("input", {
249
+ /* @__PURE__ */ l("input", {
382
250
  id: "seoTitle",
383
251
  type: "text",
384
- value: g.seoTitle,
385
- onChange: (e) => _({
386
- ...g,
252
+ value: _.seoTitle,
253
+ onChange: (e) => v({
254
+ ..._,
387
255
  seoTitle: e.target.value
388
256
  }),
389
- className: R,
390
- placeholder: h("contentPages.seoTitlePlaceholder", "Page title for search engines"),
391
- disabled: m
257
+ className: k,
258
+ placeholder: g("contentPages.seoTitlePlaceholder", "Page title for search engines"),
259
+ disabled: h
392
260
  }),
393
- /* @__PURE__ */ x("p", {
261
+ /* @__PURE__ */ u("p", {
394
262
  className: "text-xs text-text-tertiary mt-1",
395
- children: [g.seoTitle.length, "/100 characters"]
263
+ children: [_.seoTitle.length, "/100 characters"]
396
264
  }),
397
- A.seoTitle && /* @__PURE__ */ b("p", {
265
+ T.seoTitle && /* @__PURE__ */ l("p", {
398
266
  className: "text-sm text-[var(--color-status-error)] mt-1",
399
- children: A.seoTitle
267
+ children: T.seoTitle
400
268
  })
401
269
  ] }),
402
- /* @__PURE__ */ x("div", { children: [
403
- /* @__PURE__ */ b("label", {
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: h("contentPages.seoDescription", "SEO Description")
274
+ children: g("contentPages.seoDescription", "SEO Description")
407
275
  }),
408
- /* @__PURE__ */ b("textarea", {
276
+ /* @__PURE__ */ l("textarea", {
409
277
  id: "seoDescription",
410
- value: g.seoDescription,
411
- onChange: (e) => _({
412
- ...g,
278
+ value: _.seoDescription,
279
+ onChange: (e) => v({
280
+ ..._,
413
281
  seoDescription: e.target.value
414
282
  }),
415
283
  rows: 3,
416
- className: R,
417
- placeholder: h("contentPages.seoDescriptionPlaceholder", "Brief description for search engine results"),
418
- disabled: m
284
+ className: k,
285
+ placeholder: g("contentPages.seoDescriptionPlaceholder", "Brief description for search engine results"),
286
+ disabled: h
419
287
  }),
420
- /* @__PURE__ */ x("p", {
288
+ /* @__PURE__ */ u("p", {
421
289
  className: "text-xs text-text-tertiary mt-1",
422
- children: [g.seoDescription.length, "/300 characters"]
290
+ children: [_.seoDescription.length, "/300 characters"]
423
291
  }),
424
- A.seoDescription && /* @__PURE__ */ b("p", {
292
+ T.seoDescription && /* @__PURE__ */ l("p", {
425
293
  className: "text-sm text-[var(--color-status-error)] mt-1",
426
- children: A.seoDescription
294
+ children: T.seoDescription
427
295
  })
428
296
  ] }),
429
- /* @__PURE__ */ x("div", { children: [
430
- /* @__PURE__ */ b("label", {
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: h("contentPages.seoKeywords", "SEO Keywords")
301
+ children: g("contentPages.seoKeywords", "SEO Keywords")
434
302
  }),
435
- /* @__PURE__ */ b("input", {
303
+ /* @__PURE__ */ l("input", {
436
304
  id: "seoKeywords",
437
305
  type: "text",
438
- value: g.seoKeywords,
439
- onChange: (e) => _({
440
- ...g,
306
+ value: _.seoKeywords,
307
+ onChange: (e) => v({
308
+ ..._,
441
309
  seoKeywords: e.target.value
442
310
  }),
443
- className: R,
311
+ className: k,
444
312
  placeholder: "keyword1, keyword2, keyword3",
445
- disabled: m
313
+ disabled: h
446
314
  }),
447
- /* @__PURE__ */ x("p", {
315
+ /* @__PURE__ */ u("p", {
448
316
  className: "text-xs text-text-tertiary mt-1",
449
317
  children: [
450
318
  "Comma-separated keywords. ",
451
- g.seoKeywords.length,
319
+ _.seoKeywords.length,
452
320
  "/200 characters"
453
321
  ]
454
322
  }),
455
- A.seoKeywords && /* @__PURE__ */ b("p", {
323
+ T.seoKeywords && /* @__PURE__ */ l("p", {
456
324
  className: "text-sm text-[var(--color-status-error)] mt-1",
457
- children: A.seoKeywords
325
+ children: T.seoKeywords
458
326
  })
459
327
  ] })
460
328
  ]
461
329
  }),
462
- w.has(D) && /* @__PURE__ */ x("div", {
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__ */ b("h3", {
333
+ /* @__PURE__ */ l("h3", {
466
334
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
467
- children: h("contentPages.extraDetailFields", "Article Details")
335
+ children: g("contentPages.extraDetailFields", "Article Details")
468
336
  }),
469
- /* @__PURE__ */ b("p", {
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__ */ x("div", { children: [
474
- /* @__PURE__ */ b("label", {
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: h("contentPages.excerpt", "Excerpt")
345
+ children: g("contentPages.excerpt", "Excerpt")
478
346
  }),
479
- /* @__PURE__ */ b("textarea", {
347
+ /* @__PURE__ */ l("textarea", {
480
348
  id: "excerpt",
481
- value: g.excerpt,
482
- onChange: (e) => _({
483
- ...g,
349
+ value: _.excerpt,
350
+ onChange: (e) => v({
351
+ ..._,
484
352
  excerpt: e.target.value
485
353
  }),
486
354
  rows: 2,
487
- className: R,
355
+ className: k,
488
356
  placeholder: "Short summary shown on listing cards",
489
- disabled: m
357
+ disabled: h
490
358
  }),
491
- /* @__PURE__ */ x("p", {
359
+ /* @__PURE__ */ u("p", {
492
360
  className: "text-xs text-text-tertiary mt-1",
493
- children: [g.excerpt.length, "/500 characters"]
361
+ children: [_.excerpt.length, "/500 characters"]
494
362
  })
495
363
  ] }),
496
- /* @__PURE__ */ x("div", { children: [
497
- /* @__PURE__ */ b("label", {
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: h("contentPages.thumbnail", "Thumbnail URL")
368
+ children: g("contentPages.thumbnail", "Thumbnail URL")
501
369
  }),
502
- /* @__PURE__ */ b("input", {
370
+ /* @__PURE__ */ l("input", {
503
371
  id: "thumbnail",
504
372
  type: "url",
505
- value: g.thumbnail,
506
- onChange: (e) => _({
507
- ...g,
373
+ value: _.thumbnail,
374
+ onChange: (e) => v({
375
+ ..._,
508
376
  thumbnail: e.target.value
509
377
  }),
510
- className: R,
378
+ className: k,
511
379
  placeholder: "https://images.unsplash.com/...",
512
- disabled: m
380
+ disabled: h
513
381
  }),
514
- g.thumbnail && /* @__PURE__ */ b("div", {
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__ */ b("img", {
518
- src: g.thumbnail,
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__ */ x("div", {
392
+ /* @__PURE__ */ u("div", {
525
393
  className: "grid grid-cols-2 gap-4",
526
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
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: h("contentPages.author", "Author")
530
- }), /* @__PURE__ */ b("input", {
397
+ children: g("contentPages.author", "Author")
398
+ }), /* @__PURE__ */ l("input", {
531
399
  id: "author",
532
400
  type: "text",
533
- value: g.author,
534
- onChange: (e) => _({
535
- ...g,
401
+ value: _.author,
402
+ onChange: (e) => v({
403
+ ..._,
536
404
  author: e.target.value
537
405
  }),
538
- className: R,
406
+ className: k,
539
407
  placeholder: "Author name",
540
- disabled: m
541
- })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
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: h("contentPages.category", "Category")
545
- }), /* @__PURE__ */ b("input", {
412
+ children: g("contentPages.category", "Category")
413
+ }), /* @__PURE__ */ l("input", {
546
414
  id: "category",
547
415
  type: "text",
548
- value: g.category,
549
- onChange: (e) => _({
550
- ...g,
416
+ value: _.category,
417
+ onChange: (e) => v({
418
+ ..._,
551
419
  category: e.target.value
552
420
  }),
553
- className: R,
421
+ className: k,
554
422
  placeholder: "Engineering, Product, Company",
555
- disabled: m
423
+ disabled: h
556
424
  })] })]
557
425
  }),
558
- /* @__PURE__ */ x("div", {
426
+ /* @__PURE__ */ u("div", {
559
427
  className: "grid grid-cols-2 gap-4",
560
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
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: h("contentPages.publishedAt", "Publish Date")
564
- }), /* @__PURE__ */ b("input", {
431
+ children: g("contentPages.publishedAt", "Publish Date")
432
+ }), /* @__PURE__ */ l("input", {
565
433
  id: "publishedAt",
566
434
  type: "datetime-local",
567
- value: g.publishedAt,
568
- onChange: (e) => _({
569
- ...g,
435
+ value: _.publishedAt,
436
+ onChange: (e) => v({
437
+ ..._,
570
438
  publishedAt: e.target.value
571
439
  }),
572
- className: R,
573
- disabled: m
574
- })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
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: h("contentPages.readingTime", "Reading Time (min)")
578
- }), /* @__PURE__ */ b("input", {
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: g.readingTime,
584
- onChange: (e) => _({
585
- ...g,
451
+ value: _.readingTime,
452
+ onChange: (e) => v({
453
+ ..._,
586
454
  readingTime: parseInt(e.target.value, 10) || 0
587
455
  }),
588
- className: R,
456
+ className: k,
589
457
  placeholder: "5",
590
- disabled: m
458
+ disabled: h
591
459
  })] })]
592
460
  }),
593
- /* @__PURE__ */ x("div", {
461
+ /* @__PURE__ */ u("div", {
594
462
  className: "flex items-center gap-3",
595
- children: [/* @__PURE__ */ b("button", {
463
+ children: [/* @__PURE__ */ l("button", {
596
464
  type: "button",
597
465
  role: "switch",
598
- "aria-checked": g.featured,
599
- onClick: () => _({
600
- ...g,
601
- featured: !g.featured
466
+ "aria-checked": _.featured,
467
+ onClick: () => v({
468
+ ..._,
469
+ featured: !_.featured
602
470
  }),
603
- disabled: m,
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
- ${g.featured ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
479
+ ${_.featured ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
612
480
  `,
613
- children: /* @__PURE__ */ b("span", { className: `
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
- ${g.featured ? "translate-x-5" : "translate-x-0"}
485
+ ${_.featured ? "translate-x-5" : "translate-x-0"}
618
486
  ` })
619
- }), /* @__PURE__ */ b("label", {
487
+ }), /* @__PURE__ */ l("label", {
620
488
  className: "text-sm font-medium text-text-primary",
621
- children: g.featured ? h("contentPages.featured", "Featured") : h("contentPages.notFeatured", "Not Featured")
489
+ children: _.featured ? g("contentPages.featured", "Featured") : g("contentPages.notFeatured", "Not Featured")
622
490
  })]
623
491
  })
624
492
  ]
625
493
  }),
626
- /* @__PURE__ */ x("div", {
494
+ /* @__PURE__ */ u("div", {
627
495
  className: "space-y-4 pt-4 border-t border-border-seam",
628
496
  children: [
629
- /* @__PURE__ */ b("h3", {
497
+ /* @__PURE__ */ l("h3", {
630
498
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
631
- children: h("contentPages.publishing", "Publishing")
499
+ children: g("contentPages.publishing", "Publishing")
632
500
  }),
633
- /* @__PURE__ */ x("div", {
501
+ /* @__PURE__ */ u("div", {
634
502
  className: "flex items-center gap-3",
635
- children: [/* @__PURE__ */ b("button", {
503
+ children: [/* @__PURE__ */ l("button", {
636
504
  type: "button",
637
505
  role: "switch",
638
- "aria-checked": g.isPublished,
639
- onClick: () => _({
640
- ...g,
641
- isPublished: !g.isPublished
506
+ "aria-checked": _.isPublished,
507
+ onClick: () => v({
508
+ ..._,
509
+ isPublished: !_.isPublished
642
510
  }),
643
- disabled: m,
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
- ${g.isPublished ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
519
+ ${_.isPublished ? "bg-[var(--color-action-primary-bg)]" : "bg-gray-300 dark:bg-gray-600"}
652
520
  `,
653
- children: /* @__PURE__ */ b("span", { className: `
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
- ${g.isPublished ? "translate-x-5" : "translate-x-0"}
525
+ ${_.isPublished ? "translate-x-5" : "translate-x-0"}
658
526
  ` })
659
- }), /* @__PURE__ */ b("label", {
527
+ }), /* @__PURE__ */ l("label", {
660
528
  className: "text-sm font-medium text-text-primary",
661
- children: g.isPublished ? h("contentPages.published", "Published") : h("contentPages.draft", "Draft")
529
+ children: _.isPublished ? g("contentPages.published", "Published") : g("contentPages.draft", "Draft")
662
530
  })]
663
531
  }),
664
- A.isPublished && /* @__PURE__ */ b("p", {
532
+ T.isPublished && /* @__PURE__ */ l("p", {
665
533
  className: "text-sm text-[var(--color-status-error)] mt-1",
666
- children: A.isPublished
534
+ children: T.isPublished
667
535
  }),
668
- /* @__PURE__ */ x("div", { children: [
669
- /* @__PURE__ */ b("label", {
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: h("contentPages.visibility", "Visibility")
540
+ children: g("contentPages.visibility", "Visibility")
673
541
  }),
674
- /* @__PURE__ */ x("select", {
542
+ /* @__PURE__ */ u("select", {
675
543
  id: "visibility",
676
- value: g.visibility,
677
- onChange: (e) => _({
678
- ...g,
544
+ value: _.visibility,
545
+ onChange: (e) => v({
546
+ ..._,
679
547
  visibility: e.target.value
680
548
  }),
681
- className: R,
682
- disabled: m,
549
+ className: k,
550
+ disabled: h,
683
551
  children: [
684
- /* @__PURE__ */ b("option", {
552
+ /* @__PURE__ */ l("option", {
685
553
  value: "PUBLIC",
686
- children: h("contentPages.visibilityPublic", "Public — visible to everyone")
554
+ children: g("contentPages.visibilityPublic", "Public — visible to everyone")
687
555
  }),
688
- /* @__PURE__ */ b("option", {
556
+ /* @__PURE__ */ l("option", {
689
557
  value: "AUTHENTICATED",
690
- children: h("contentPages.visibilityAuthenticated", "Authenticated — signed-in users only")
558
+ children: g("contentPages.visibilityAuthenticated", "Authenticated — signed-in users only")
691
559
  }),
692
- /* @__PURE__ */ b("option", {
560
+ /* @__PURE__ */ l("option", {
693
561
  value: "INTERNAL",
694
- children: h("contentPages.visibilityInternal", "Internal — staff/admin only")
562
+ children: g("contentPages.visibilityInternal", "Internal — staff/admin only")
695
563
  })
696
564
  ]
697
565
  }),
698
- /* @__PURE__ */ b("p", {
566
+ /* @__PURE__ */ l("p", {
699
567
  className: "text-xs text-text-tertiary mt-1",
700
- children: h("contentPages.visibilityHint", "Public is required for blog posts and legal pages to appear on the website.")
568
+ children: g("contentPages.visibilityHint", "Public is required for blog posts and legal pages to appear on the website.")
701
569
  }),
702
- A.visibility && /* @__PURE__ */ b("p", {
570
+ T.visibility && /* @__PURE__ */ l("p", {
703
571
  className: "text-sm text-[var(--color-status-error)] mt-1",
704
- children: A.visibility
572
+ children: T.visibility
705
573
  })
706
574
  ] }),
707
- /* @__PURE__ */ x("div", { children: [
708
- /* @__PURE__ */ b("label", {
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: h("contentPages.sortOrder", "Sort Order")
579
+ children: g("contentPages.sortOrder", "Sort Order")
712
580
  }),
713
- /* @__PURE__ */ b("input", {
581
+ /* @__PURE__ */ l("input", {
714
582
  id: "sortOrder",
715
583
  type: "number",
716
584
  min: 0,
717
- value: g.sortOrder,
718
- onChange: (e) => _({
719
- ...g,
585
+ value: _.sortOrder,
586
+ onChange: (e) => v({
587
+ ..._,
720
588
  sortOrder: parseInt(e.target.value, 10) || 0
721
589
  }),
722
- className: R,
590
+ className: k,
723
591
  placeholder: "0",
724
- disabled: m
592
+ disabled: h
725
593
  }),
726
- /* @__PURE__ */ b("p", {
594
+ /* @__PURE__ */ l("p", {
727
595
  className: "text-xs text-text-tertiary mt-1",
728
- children: h("contentPages.sortOrderHint", "Lower numbers appear first. Default is 0.")
596
+ children: g("contentPages.sortOrderHint", "Lower numbers appear first. Default is 0.")
729
597
  }),
730
- A.sortOrder && /* @__PURE__ */ b("p", {
598
+ T.sortOrder && /* @__PURE__ */ l("p", {
731
599
  className: "text-sm text-[var(--color-status-error)] mt-1",
732
- children: A.sortOrder
600
+ children: T.sortOrder
733
601
  })
734
602
  ] }),
735
- /* @__PURE__ */ x("div", { children: [
736
- /* @__PURE__ */ b("label", {
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: h("contentPages.productId", "Product ID")
607
+ children: g("contentPages.productId", "Product ID")
740
608
  }),
741
- /* @__PURE__ */ b(n, {
609
+ /* @__PURE__ */ l(r, {
742
610
  id: "productId",
743
- value: g.productId,
744
- onChange: (e) => _({
745
- ...g,
611
+ value: _.productId,
612
+ onChange: (e) => v({
613
+ ..._,
746
614
  productId: e
747
615
  }),
748
- disabled: m,
749
- placeholder: h("contentPages.productIdPlaceholder", "Optional product association"),
750
- error: A.productId
616
+ disabled: h,
617
+ placeholder: g("contentPages.productIdPlaceholder", "Optional product association"),
618
+ error: T.productId
751
619
  }),
752
- /* @__PURE__ */ b("p", {
620
+ /* @__PURE__ */ l("p", {
753
621
  className: "text-xs text-text-tertiary mt-1",
754
- children: h("contentPages.productIdHint", "Associate this content page with a specific product.")
622
+ children: g("contentPages.productIdHint", "Associate this content page with a specific product.")
755
623
  }),
756
- A.productId && /* @__PURE__ */ b("p", {
624
+ T.productId && /* @__PURE__ */ l("p", {
757
625
  className: "text-sm text-[var(--color-status-error)] mt-1",
758
- children: A.productId
626
+ children: T.productId
759
627
  })
760
628
  ] })
761
629
  ]
762
630
  }),
763
- /* @__PURE__ */ x("div", {
631
+ /* @__PURE__ */ u("div", {
764
632
  className: "space-y-4 pt-4 border-t border-border-seam",
765
633
  children: [
766
- /* @__PURE__ */ b("h3", {
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__ */ b(t, {
638
+ /* @__PURE__ */ l(n, {
771
639
  value: y,
772
- onChange: T,
773
- disabled: m
640
+ onChange: b,
641
+ disabled: h
774
642
  }),
775
- /* @__PURE__ */ b("p", {
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__ */ x("div", {
649
+ /* @__PURE__ */ u("div", {
782
650
  className: "flex gap-3 pt-4 border-t border-border-seam",
783
- children: [/* @__PURE__ */ x("button", {
651
+ children: [/* @__PURE__ */ u("button", {
784
652
  type: "submit",
785
- disabled: m,
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: [m && /* @__PURE__ */ b(v, {
655
+ children: [h && /* @__PURE__ */ l(c, {
788
656
  size: 16,
789
657
  className: "animate-spin"
790
- }), l ? h("contentPages.updateContentPage", "Update Content Page") : h("contentPages.createContentPage", "Create Content Page")]
791
- }), /* @__PURE__ */ b("button", {
658
+ }), f ? g("contentPages.updateContentPage", "Update Content Page") : g("contentPages.createContentPage", "Create Content Page")]
659
+ }), /* @__PURE__ */ l("button", {
792
660
  type: "button",
793
- onClick: p,
794
- disabled: m,
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: h("productCommon.cancel", "Cancel")
664
+ children: g("productCommon.cancel", "Cancel")
797
665
  })]
798
666
  })
799
667
  ]
800
668
  });
801
669
  }
802
670
  //#endregion
803
- export { T as ContentPageForm };
671
+ export { f as ContentPageForm };
804
672
 
805
673
  //# sourceMappingURL=ContentPageForm.js.map