@burdenoff/microfe-product 2026.715.1 → 2026.720.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) 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/press-kit/components/PressKitAssetForm.js +250 -252
  10. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  11. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +72 -72
  12. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  13. package/dist/product-management/modules/products/components/ProductForm.js +490 -492
  14. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  15. package/dist/product-management/modules/products/pages/ProductDetailPage.js +130 -129
  16. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  17. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +195 -203
  18. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  19. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +88 -87
  20. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  21. package/dist/shared/components/MarkdownEditor.js +161 -0
  22. package/dist/shared/components/MarkdownEditor.js.map +1 -0
  23. package/dist/shared/components/index.js +1 -0
  24. package/package.json +2 -2
  25. package/dist/node_modules/dompurify/dist/purify.es.js +0 -555
  26. package/dist/node_modules/dompurify/dist/purify.es.js.map +0 -1
  27. package/dist/shared/utils/renderMarkdown.js +0 -8
  28. package/dist/shared/utils/renderMarkdown.js.map +0 -1
@@ -1,40 +1,41 @@
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 { useCreatePressKitAssetUpload as i } from "../hooks/usePressKitAssets.js";
6
- import { PRESS_KIT_CATEGORIES as a } from "../types/index.js";
7
- import { createPressKitAssetSchema as o, updatePressKitAssetSchema as s } from "../schemas/index.js";
8
- import { useRef as c, useState as l } from "react";
9
- import { Loader2 as u, UploadCloud as d } from "lucide-react";
10
- import { Fragment as f, jsx as p, jsxs as m } 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 { useCreatePressKitAssetUpload as a } from "../hooks/usePressKitAssets.js";
7
+ import { PRESS_KIT_CATEGORIES as o } from "../types/index.js";
8
+ import { createPressKitAssetSchema as s, updatePressKitAssetSchema as c } from "../schemas/index.js";
9
+ import { useRef as l, useState as u } from "react";
10
+ import { Loader2 as d, UploadCloud as f } from "lucide-react";
11
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
11
12
  //#region src/product-management/modules/press-kit/components/PressKitAssetForm.tsx
12
- var h = "\n w-full px-3 py-2 bg-surface border border-default rounded-lg\n text-text-primary 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 transition-all duration-200\n";
13
- function g({ asset: g, onSubmit: v, onCancel: y, loading: b }) {
14
- let x = e(), S = !!g, [C, w] = l({
15
- productId: g?.productId || "",
16
- category: g?.category || "LOGO",
17
- title: g?.title || "",
18
- slug: g?.slug || "",
19
- description: g?.description || "",
20
- fileUrl: g?.fileUrl || "",
21
- fileName: g?.fileName || "",
22
- fileSize: g?.fileSize ?? null,
23
- mimeType: g?.mimeType || "",
24
- thumbnailUrl: g?.thumbnailUrl || "",
25
- version: g?.version || "",
26
- visibility: g?.visibility ?? "PUBLIC",
27
- sortOrder: g?.sortOrder ?? 0
28
- }), [T, E] = l(g?.tags ?? []), [D, O] = l({}), { uploadFile: k, uploading: A } = i(), [j, M] = l(null), N = c(null), P = async (e) => {
13
+ var g = "\n w-full px-3 py-2 bg-surface border border-default rounded-lg\n text-text-primary 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 transition-all duration-200\n";
14
+ function _({ asset: _, onSubmit: y, onCancel: b, loading: x }) {
15
+ let S = e(), C = !!_, [w, T] = u({
16
+ productId: _?.productId || "",
17
+ category: _?.category || "LOGO",
18
+ title: _?.title || "",
19
+ slug: _?.slug || "",
20
+ description: _?.description || "",
21
+ fileUrl: _?.fileUrl || "",
22
+ fileName: _?.fileName || "",
23
+ fileSize: _?.fileSize ?? null,
24
+ mimeType: _?.mimeType || "",
25
+ thumbnailUrl: _?.thumbnailUrl || "",
26
+ version: _?.version || "",
27
+ visibility: _?.visibility ?? "PUBLIC",
28
+ sortOrder: _?.sortOrder ?? 0
29
+ }), [E, D] = u(_?.tags ?? []), [O, k] = u({}), { uploadFile: A, uploading: j } = a(), [M, N] = u(null), P = l(null), F = async (e) => {
29
30
  if (e) {
30
- M(null);
31
+ N(null);
31
32
  try {
32
- if (!C.productId) {
33
- M(x("pressKit.uploadNeedsProduct", "Select a product first"));
33
+ if (!w.productId) {
34
+ N(S("pressKit.uploadNeedsProduct", "Select a product first"));
34
35
  return;
35
36
  }
36
- let t = await k(e, C.productId, C.category);
37
- w((e) => ({
37
+ let t = await A(e, w.productId, w.category);
38
+ T((e) => ({
38
39
  ...e,
39
40
  fileUrl: t.fileUrl,
40
41
  fileName: t.fileName,
@@ -42,376 +43,373 @@ function g({ asset: g, onSubmit: v, onCancel: y, loading: b }) {
42
43
  mimeType: t.mimeType
43
44
  }));
44
45
  } catch (e) {
45
- M(e instanceof Error ? e.message : "Upload failed");
46
+ N(e instanceof Error ? e.message : "Upload failed");
46
47
  } finally {
47
- N.current && (N.current.value = "");
48
+ P.current && (P.current.value = "");
48
49
  }
49
50
  }
50
- }, F = () => {
51
+ }, I = () => {
51
52
  try {
52
- let e = S ? s : o, t = { ...C };
53
- return t.description || delete t.description, t.fileName || delete t.fileName, t.fileSize ?? delete t.fileSize, t.mimeType || delete t.mimeType, t.thumbnailUrl || delete t.thumbnailUrl, t.version || delete t.version, e.parse(t), O({}), !0;
53
+ let e = C ? c : s, t = { ...w };
54
+ return t.description || delete t.description, t.fileName || delete t.fileName, t.fileSize ?? delete t.fileSize, t.mimeType || delete t.mimeType, t.thumbnailUrl || delete t.thumbnailUrl, t.version || delete t.version, e.parse(t), k({}), !0;
54
55
  } catch (e) {
55
- if (e instanceof r) {
56
+ if (e instanceof i) {
56
57
  let t = {};
57
58
  e.issues.forEach((e) => {
58
59
  t[e.path.join(".")] = e.message;
59
- }), O(t);
60
+ }), k(t);
60
61
  }
61
62
  return !1;
62
63
  }
63
64
  };
64
- return /* @__PURE__ */ m("form", {
65
+ return /* @__PURE__ */ h("form", {
65
66
  onSubmit: async (e) => {
66
- if (e.preventDefault(), !F()) return;
67
- let t = (e) => S ? e.trim() === "" ? null : e : e || void 0, n = {
68
- category: C.category,
69
- title: C.title,
70
- description: t(C.description),
71
- fileUrl: C.fileUrl,
72
- fileName: t(C.fileName),
73
- fileSize: ((e) => S ? e : e ?? void 0)(C.fileSize),
74
- mimeType: t(C.mimeType),
75
- thumbnailUrl: t(C.thumbnailUrl),
76
- version: t(C.version),
77
- tags: T,
78
- visibility: C.visibility,
79
- sortOrder: typeof C.sortOrder == "string" ? parseInt(C.sortOrder, 10) || 0 : C.sortOrder
67
+ if (e.preventDefault(), !I()) return;
68
+ let t = (e) => C ? e.trim() === "" ? null : e : e || void 0, n = {
69
+ category: w.category,
70
+ title: w.title,
71
+ description: t(w.description),
72
+ fileUrl: w.fileUrl,
73
+ fileName: t(w.fileName),
74
+ fileSize: ((e) => C ? e : e ?? void 0)(w.fileSize),
75
+ mimeType: t(w.mimeType),
76
+ thumbnailUrl: t(w.thumbnailUrl),
77
+ version: t(w.version),
78
+ tags: E,
79
+ visibility: w.visibility,
80
+ sortOrder: typeof w.sortOrder == "string" ? parseInt(w.sortOrder, 10) || 0 : w.sortOrder
80
81
  };
81
- await v(S ? n : {
82
+ await y(C ? n : {
82
83
  ...n,
83
- productId: C.productId,
84
- slug: C.slug
84
+ productId: w.productId,
85
+ slug: w.slug
85
86
  });
86
87
  },
87
88
  className: "space-y-6 animate-in fade-in duration-200",
88
89
  children: [
89
- /* @__PURE__ */ m("div", {
90
+ /* @__PURE__ */ h("div", {
90
91
  className: "space-y-4",
91
92
  children: [
92
- /* @__PURE__ */ p("h3", {
93
+ /* @__PURE__ */ m("h3", {
93
94
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
94
- children: x("pressKit.basicInformation", "Basic Information")
95
+ children: S("pressKit.basicInformation", "Basic Information")
95
96
  }),
96
- !S && /* @__PURE__ */ m("div", { children: [
97
- /* @__PURE__ */ m("label", {
97
+ !C && /* @__PURE__ */ h("div", { children: [
98
+ /* @__PURE__ */ h("label", {
98
99
  htmlFor: "productId",
99
100
  className: "block text-sm font-medium text-text-primary mb-1",
100
101
  children: [
101
- x("pressKit.fieldProduct", "Product"),
102
+ S("pressKit.fieldProduct", "Product"),
102
103
  " ",
103
- /* @__PURE__ */ p("span", {
104
+ /* @__PURE__ */ m("span", {
104
105
  className: "text-[var(--color-status-error)]",
105
106
  children: "*"
106
107
  })
107
108
  ]
108
109
  }),
109
- /* @__PURE__ */ p(n, {
110
+ /* @__PURE__ */ m(r, {
110
111
  id: "productId",
111
- value: C.productId,
112
- onChange: (e) => w({
113
- ...C,
112
+ value: w.productId,
113
+ onChange: (e) => T({
114
+ ...w,
114
115
  productId: e
115
116
  }),
116
- disabled: b,
117
+ disabled: x,
117
118
  required: !0,
118
- placeholder: x("pressKit.selectProduct", "Select a product…"),
119
- error: D.productId
119
+ placeholder: S("pressKit.selectProduct", "Select a product…"),
120
+ error: O.productId
120
121
  }),
121
- D.productId && /* @__PURE__ */ p("p", {
122
+ O.productId && /* @__PURE__ */ m("p", {
122
123
  className: "text-sm text-[var(--color-status-error)] mt-1",
123
- children: D.productId
124
+ children: O.productId
124
125
  })
125
126
  ] }),
126
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
127
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
127
128
  htmlFor: "category",
128
129
  className: "block text-sm font-medium text-text-primary mb-1",
129
130
  children: [
130
- x("pressKit.fieldCategory", "Category"),
131
+ S("pressKit.fieldCategory", "Category"),
131
132
  " ",
132
- /* @__PURE__ */ p("span", {
133
+ /* @__PURE__ */ m("span", {
133
134
  className: "text-[var(--color-status-error)]",
134
135
  children: "*"
135
136
  })
136
137
  ]
137
- }), /* @__PURE__ */ p("select", {
138
+ }), /* @__PURE__ */ m("select", {
138
139
  id: "category",
139
- value: C.category,
140
- onChange: (e) => w({
141
- ...C,
140
+ value: w.category,
141
+ onChange: (e) => T({
142
+ ...w,
142
143
  category: e.target.value
143
144
  }),
144
- className: h,
145
- disabled: b,
146
- children: a.map((e) => /* @__PURE__ */ p("option", {
145
+ className: g,
146
+ disabled: x,
147
+ children: o.map((e) => /* @__PURE__ */ m("option", {
147
148
  value: e,
148
149
  children: e.replace(/_/g, " ")
149
150
  }, e))
150
151
  })] }),
151
- /* @__PURE__ */ m("div", { children: [
152
- /* @__PURE__ */ m("label", {
152
+ /* @__PURE__ */ h("div", { children: [
153
+ /* @__PURE__ */ h("label", {
153
154
  htmlFor: "title",
154
155
  className: "block text-sm font-medium text-text-primary mb-1",
155
156
  children: [
156
- x("pressKit.fieldTitle", "Title"),
157
+ S("pressKit.fieldTitle", "Title"),
157
158
  " ",
158
- /* @__PURE__ */ p("span", {
159
+ /* @__PURE__ */ m("span", {
159
160
  className: "text-[var(--color-status-error)]",
160
161
  children: "*"
161
162
  })
162
163
  ]
163
164
  }),
164
- /* @__PURE__ */ p("input", {
165
+ /* @__PURE__ */ m("input", {
165
166
  id: "title",
166
167
  type: "text",
167
- value: C.title,
168
+ value: w.title,
168
169
  onChange: (e) => {
169
170
  let t = e.target.value;
170
- w((e) => ({
171
+ T((e) => ({
171
172
  ...e,
172
173
  title: t,
173
- slug: !S && (!e.slug || e.slug === _(e.title)) ? _(t) : e.slug
174
+ slug: !C && (!e.slug || e.slug === v(e.title)) ? v(t) : e.slug
174
175
  }));
175
176
  },
176
- className: h,
177
- placeholder: x("pressKit.titlePlaceholder", "e.g. Logo — Dark"),
178
- disabled: b,
177
+ className: g,
178
+ placeholder: S("pressKit.titlePlaceholder", "e.g. Logo — Dark"),
179
+ disabled: x,
179
180
  required: !0
180
181
  }),
181
- D.title && /* @__PURE__ */ p("p", {
182
+ O.title && /* @__PURE__ */ m("p", {
182
183
  className: "text-sm text-[var(--color-status-error)] mt-1",
183
- children: D.title
184
+ children: O.title
184
185
  })
185
186
  ] }),
186
- /* @__PURE__ */ m("div", { children: [
187
- /* @__PURE__ */ m("label", {
187
+ /* @__PURE__ */ h("div", { children: [
188
+ /* @__PURE__ */ h("label", {
188
189
  htmlFor: "slug",
189
190
  className: "block text-sm font-medium text-text-primary mb-1",
190
191
  children: [
191
- x("pressKit.fieldSlug", "Slug"),
192
+ S("pressKit.fieldSlug", "Slug"),
192
193
  " ",
193
- /* @__PURE__ */ p("span", {
194
+ /* @__PURE__ */ m("span", {
194
195
  className: "text-[var(--color-status-error)]",
195
196
  children: "*"
196
197
  })
197
198
  ]
198
199
  }),
199
- /* @__PURE__ */ p("input", {
200
+ /* @__PURE__ */ m("input", {
200
201
  id: "slug",
201
202
  type: "text",
202
- value: C.slug,
203
- onChange: (e) => w({
204
- ...C,
203
+ value: w.slug,
204
+ onChange: (e) => T({
205
+ ...w,
205
206
  slug: e.target.value.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "")
206
207
  }),
207
- className: h,
208
+ className: g,
208
209
  placeholder: "logo-dark",
209
- disabled: b || S,
210
- required: !S
210
+ disabled: x || C,
211
+ required: !C
211
212
  }),
212
- /* @__PURE__ */ p("p", {
213
+ /* @__PURE__ */ m("p", {
213
214
  className: "text-xs text-text-tertiary mt-1",
214
- children: x("pressKit.slugHint", "Lowercase, numbers, hyphens. Cannot change after creation.")
215
+ children: S("pressKit.slugHint", "Lowercase, numbers, hyphens. Cannot change after creation.")
215
216
  }),
216
- D.slug && /* @__PURE__ */ p("p", {
217
+ O.slug && /* @__PURE__ */ m("p", {
217
218
  className: "text-sm text-[var(--color-status-error)] mt-1",
218
- children: D.slug
219
+ children: O.slug
219
220
  })
220
221
  ] }),
221
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
222
- htmlFor: "description",
223
- className: "block text-sm font-medium text-text-primary mb-1",
224
- children: x("pressKit.fieldDescription", "Description")
225
- }), /* @__PURE__ */ p("textarea", {
222
+ /* @__PURE__ */ m(t, {
226
223
  id: "description",
227
- value: C.description,
228
- onChange: (e) => w({
229
- ...C,
230
- description: e.target.value
224
+ label: S("pressKit.fieldDescription", "Description"),
225
+ value: w.description,
226
+ onChange: (e) => T({
227
+ ...w,
228
+ description: e
231
229
  }),
232
- rows: 3,
233
- className: h,
234
- placeholder: x("pressKit.descriptionPlaceholder", "Short description / usage notes"),
235
- disabled: b
236
- })] })
230
+ placeholder: S("pressKit.descriptionPlaceholder", "Short description / usage notes"),
231
+ disabled: x,
232
+ rows: 4,
233
+ minHeight: 120
234
+ })
237
235
  ]
238
236
  }),
239
- /* @__PURE__ */ m("div", {
237
+ /* @__PURE__ */ h("div", {
240
238
  className: "space-y-4 pt-4 border-t border-border-seam",
241
239
  children: [
242
- /* @__PURE__ */ p("h3", {
240
+ /* @__PURE__ */ m("h3", {
243
241
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
244
- children: x("pressKit.fileSection", "File")
242
+ children: S("pressKit.fileSection", "File")
245
243
  }),
246
- /* @__PURE__ */ p("p", {
244
+ /* @__PURE__ */ m("p", {
247
245
  className: "text-xs text-text-tertiary",
248
- children: x("pressKit.fileUploadHint", "Upload the file (drag & drop or click), or paste a public CDN/file URL below.")
246
+ children: S("pressKit.fileUploadHint", "Upload the file (drag & drop or click), or paste a public CDN/file URL below.")
249
247
  }),
250
- /* @__PURE__ */ m("div", {
248
+ /* @__PURE__ */ h("div", {
251
249
  onClick: () => {
252
- b || A || N.current?.click();
250
+ x || j || P.current?.click();
253
251
  },
254
252
  onDragOver: (e) => e.preventDefault(),
255
253
  onDrop: (e) => {
256
- e.preventDefault(), !(b || A) && P(e.dataTransfer.files?.[0]);
254
+ e.preventDefault(), !(x || j) && F(e.dataTransfer.files?.[0]);
257
255
  },
258
- className: `flex flex-col items-center justify-center gap-2 px-4 py-6 border-2 border-dashed border-default rounded-lg transition-colors ${b || A ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:border-[var(--color-border-focus)]"}`,
256
+ className: `flex flex-col items-center justify-center gap-2 px-4 py-6 border-2 border-dashed border-default rounded-lg transition-colors ${x || j ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:border-[var(--color-border-focus)]"}`,
259
257
  children: [
260
- /* @__PURE__ */ p("input", {
261
- ref: N,
258
+ /* @__PURE__ */ m("input", {
259
+ ref: P,
262
260
  type: "file",
263
261
  className: "hidden",
264
- disabled: b || A,
265
- onChange: (e) => void P(e.target.files?.[0])
262
+ disabled: x || j,
263
+ onChange: (e) => void F(e.target.files?.[0])
266
264
  }),
267
- A ? /* @__PURE__ */ m("span", {
265
+ j ? /* @__PURE__ */ h("span", {
268
266
  className: "inline-flex items-center gap-2 text-sm text-text-secondary",
269
- children: [/* @__PURE__ */ p(u, {
267
+ children: [/* @__PURE__ */ m(d, {
270
268
  size: 16,
271
269
  className: "animate-spin"
272
- }), x("pressKit.uploading", "Uploading…")]
273
- }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, {
270
+ }), S("pressKit.uploading", "Uploading…")]
271
+ }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(f, {
274
272
  size: 22,
275
273
  className: "text-text-tertiary"
276
- }), /* @__PURE__ */ p("span", {
274
+ }), /* @__PURE__ */ m("span", {
277
275
  className: "text-sm text-text-secondary",
278
- children: x("pressKit.uploadCta", "Drag & drop a file, or click to choose")
276
+ children: S("pressKit.uploadCta", "Drag & drop a file, or click to choose")
279
277
  })] }),
280
- C.fileUrl && !A && /* @__PURE__ */ p("span", {
278
+ w.fileUrl && !j && /* @__PURE__ */ m("span", {
281
279
  className: "text-xs text-[var(--color-status-success)] break-all",
282
- children: C.fileName || C.fileUrl
280
+ children: w.fileName || w.fileUrl
283
281
  })
284
282
  ]
285
283
  }),
286
- j && /* @__PURE__ */ p("p", {
284
+ M && /* @__PURE__ */ m("p", {
287
285
  className: "text-sm text-[var(--color-status-error)]",
288
- children: j
286
+ children: M
289
287
  }),
290
- /* @__PURE__ */ m("div", { children: [
291
- /* @__PURE__ */ m("label", {
288
+ /* @__PURE__ */ h("div", { children: [
289
+ /* @__PURE__ */ h("label", {
292
290
  htmlFor: "fileUrl",
293
291
  className: "block text-sm font-medium text-text-primary mb-1",
294
292
  children: [
295
- x("pressKit.fieldFileUrl", "File URL"),
293
+ S("pressKit.fieldFileUrl", "File URL"),
296
294
  " ",
297
- /* @__PURE__ */ p("span", {
295
+ /* @__PURE__ */ m("span", {
298
296
  className: "text-[var(--color-status-error)]",
299
297
  children: "*"
300
298
  })
301
299
  ]
302
300
  }),
303
- /* @__PURE__ */ p("input", {
301
+ /* @__PURE__ */ m("input", {
304
302
  id: "fileUrl",
305
303
  type: "url",
306
- value: C.fileUrl,
307
- onChange: (e) => w({
308
- ...C,
304
+ value: w.fileUrl,
305
+ onChange: (e) => T({
306
+ ...w,
309
307
  fileUrl: e.target.value
310
308
  }),
311
- className: h,
309
+ className: g,
312
310
  placeholder: "https://cdn.example.com/press/logo-dark.svg",
313
- disabled: b,
311
+ disabled: x,
314
312
  required: !0
315
313
  }),
316
- D.fileUrl && /* @__PURE__ */ p("p", {
314
+ O.fileUrl && /* @__PURE__ */ m("p", {
317
315
  className: "text-sm text-[var(--color-status-error)] mt-1",
318
- children: D.fileUrl
316
+ children: O.fileUrl
319
317
  })
320
318
  ] }),
321
- /* @__PURE__ */ m("div", {
319
+ /* @__PURE__ */ h("div", {
322
320
  className: "grid grid-cols-2 gap-4",
323
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
321
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
324
322
  htmlFor: "fileName",
325
323
  className: "block text-sm font-medium text-text-primary mb-1",
326
- children: x("pressKit.fieldFileName", "File Name")
327
- }), /* @__PURE__ */ p("input", {
324
+ children: S("pressKit.fieldFileName", "File Name")
325
+ }), /* @__PURE__ */ m("input", {
328
326
  id: "fileName",
329
327
  type: "text",
330
- value: C.fileName,
331
- onChange: (e) => w({
332
- ...C,
328
+ value: w.fileName,
329
+ onChange: (e) => T({
330
+ ...w,
333
331
  fileName: e.target.value
334
332
  }),
335
- className: h,
333
+ className: g,
336
334
  placeholder: "logo-dark.svg",
337
- disabled: b
338
- })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
335
+ disabled: x
336
+ })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
339
337
  htmlFor: "mimeType",
340
338
  className: "block text-sm font-medium text-text-primary mb-1",
341
- children: x("pressKit.fieldMimeType", "MIME Type")
342
- }), /* @__PURE__ */ p("input", {
339
+ children: S("pressKit.fieldMimeType", "MIME Type")
340
+ }), /* @__PURE__ */ m("input", {
343
341
  id: "mimeType",
344
342
  type: "text",
345
- value: C.mimeType,
346
- onChange: (e) => w({
347
- ...C,
343
+ value: w.mimeType,
344
+ onChange: (e) => T({
345
+ ...w,
348
346
  mimeType: e.target.value
349
347
  }),
350
- className: h,
348
+ className: g,
351
349
  placeholder: "image/svg+xml",
352
- disabled: b
350
+ disabled: x
353
351
  })] })]
354
352
  }),
355
- /* @__PURE__ */ m("div", {
353
+ /* @__PURE__ */ h("div", {
356
354
  className: "grid grid-cols-2 gap-4",
357
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
355
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
358
356
  htmlFor: "fileSize",
359
357
  className: "block text-sm font-medium text-text-primary mb-1",
360
- children: x("pressKit.fieldFileSize", "File Size (bytes)")
361
- }), /* @__PURE__ */ p("input", {
358
+ children: S("pressKit.fieldFileSize", "File Size (bytes)")
359
+ }), /* @__PURE__ */ m("input", {
362
360
  id: "fileSize",
363
361
  type: "number",
364
362
  min: 0,
365
- value: C.fileSize ?? "",
363
+ value: w.fileSize ?? "",
366
364
  onChange: (e) => {
367
365
  let t = e.target.value, n = parseInt(t, 10);
368
- w({
369
- ...C,
366
+ T({
367
+ ...w,
370
368
  fileSize: t === "" || Number.isNaN(n) ? null : n
371
369
  });
372
370
  },
373
- className: h,
374
- disabled: b
375
- })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
371
+ className: g,
372
+ disabled: x
373
+ })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
376
374
  htmlFor: "version",
377
375
  className: "block text-sm font-medium text-text-primary mb-1",
378
- children: x("pressKit.fieldVersion", "Version")
379
- }), /* @__PURE__ */ p("input", {
376
+ children: S("pressKit.fieldVersion", "Version")
377
+ }), /* @__PURE__ */ m("input", {
380
378
  id: "version",
381
379
  type: "text",
382
- value: C.version,
383
- onChange: (e) => w({
384
- ...C,
380
+ value: w.version,
381
+ onChange: (e) => T({
382
+ ...w,
385
383
  version: e.target.value
386
384
  }),
387
- className: h,
385
+ className: g,
388
386
  placeholder: "v2",
389
- disabled: b
387
+ disabled: x
390
388
  })] })]
391
389
  }),
392
- /* @__PURE__ */ m("div", { children: [
393
- /* @__PURE__ */ p("label", {
390
+ /* @__PURE__ */ h("div", { children: [
391
+ /* @__PURE__ */ m("label", {
394
392
  htmlFor: "thumbnailUrl",
395
393
  className: "block text-sm font-medium text-text-primary mb-1",
396
- children: x("pressKit.fieldThumbnail", "Thumbnail / Preview URL")
394
+ children: S("pressKit.fieldThumbnail", "Thumbnail / Preview URL")
397
395
  }),
398
- /* @__PURE__ */ p("input", {
396
+ /* @__PURE__ */ m("input", {
399
397
  id: "thumbnailUrl",
400
398
  type: "url",
401
- value: C.thumbnailUrl,
402
- onChange: (e) => w({
403
- ...C,
399
+ value: w.thumbnailUrl,
400
+ onChange: (e) => T({
401
+ ...w,
404
402
  thumbnailUrl: e.target.value
405
403
  }),
406
- className: h,
404
+ className: g,
407
405
  placeholder: "https://cdn.example.com/press/logo-dark-preview.png",
408
- disabled: b
406
+ disabled: x
409
407
  }),
410
- C.thumbnailUrl && /* @__PURE__ */ p("div", {
408
+ w.thumbnailUrl && /* @__PURE__ */ m("div", {
411
409
  className: "mt-2 rounded-lg overflow-hidden border border-default",
412
410
  style: { maxWidth: 320 },
413
- children: /* @__PURE__ */ p("img", {
414
- src: C.thumbnailUrl,
411
+ children: /* @__PURE__ */ m("img", {
412
+ src: w.thumbnailUrl,
415
413
  alt: "Preview",
416
414
  className: "w-full h-auto"
417
415
  })
@@ -419,101 +417,101 @@ function g({ asset: g, onSubmit: v, onCancel: y, loading: b }) {
419
417
  ] })
420
418
  ]
421
419
  }),
422
- /* @__PURE__ */ m("div", {
420
+ /* @__PURE__ */ h("div", {
423
421
  className: "space-y-4 pt-4 border-t border-border-seam",
424
- children: [/* @__PURE__ */ p("h3", {
422
+ children: [/* @__PURE__ */ m("h3", {
425
423
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
426
- children: x("pressKit.publishing", "Publishing")
427
- }), /* @__PURE__ */ m("div", {
424
+ children: S("pressKit.publishing", "Publishing")
425
+ }), /* @__PURE__ */ h("div", {
428
426
  className: "grid grid-cols-2 gap-4",
429
- children: [/* @__PURE__ */ m("div", { children: [
430
- /* @__PURE__ */ p("label", {
427
+ children: [/* @__PURE__ */ h("div", { children: [
428
+ /* @__PURE__ */ m("label", {
431
429
  htmlFor: "visibility",
432
430
  className: "block text-sm font-medium text-text-primary mb-1",
433
- children: x("pressKit.fieldVisibility", "Visibility")
431
+ children: S("pressKit.fieldVisibility", "Visibility")
434
432
  }),
435
- /* @__PURE__ */ m("select", {
433
+ /* @__PURE__ */ h("select", {
436
434
  id: "visibility",
437
- value: C.visibility,
438
- onChange: (e) => w({
439
- ...C,
435
+ value: w.visibility,
436
+ onChange: (e) => T({
437
+ ...w,
440
438
  visibility: e.target.value
441
439
  }),
442
- className: h,
443
- disabled: b,
440
+ className: g,
441
+ disabled: x,
444
442
  children: [
445
- /* @__PURE__ */ p("option", {
443
+ /* @__PURE__ */ m("option", {
446
444
  value: "PUBLIC",
447
- children: x("pressKit.visPublic", "Public — everyone")
445
+ children: S("pressKit.visPublic", "Public — everyone")
448
446
  }),
449
- /* @__PURE__ */ p("option", {
447
+ /* @__PURE__ */ m("option", {
450
448
  value: "AUTHENTICATED",
451
- children: x("pressKit.visAuth", "Authenticated — signed-in")
449
+ children: S("pressKit.visAuth", "Authenticated — signed-in")
452
450
  }),
453
- /* @__PURE__ */ p("option", {
451
+ /* @__PURE__ */ m("option", {
454
452
  value: "INTERNAL",
455
- children: x("pressKit.visInternal", "Internal — staff")
453
+ children: S("pressKit.visInternal", "Internal — staff")
456
454
  })
457
455
  ]
458
456
  }),
459
- /* @__PURE__ */ p("p", {
457
+ /* @__PURE__ */ m("p", {
460
458
  className: "text-xs text-text-tertiary mt-1",
461
- children: x("pressKit.visHint", "Public is required to show on the website press page.")
459
+ children: S("pressKit.visHint", "Public is required to show on the website press page.")
462
460
  })
463
- ] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
461
+ ] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
464
462
  htmlFor: "sortOrder",
465
463
  className: "block text-sm font-medium text-text-primary mb-1",
466
- children: x("pressKit.fieldSortOrder", "Sort Order")
467
- }), /* @__PURE__ */ p("input", {
464
+ children: S("pressKit.fieldSortOrder", "Sort Order")
465
+ }), /* @__PURE__ */ m("input", {
468
466
  id: "sortOrder",
469
467
  type: "number",
470
468
  min: 0,
471
- value: C.sortOrder,
472
- onChange: (e) => w({
473
- ...C,
469
+ value: w.sortOrder,
470
+ onChange: (e) => T({
471
+ ...w,
474
472
  sortOrder: parseInt(e.target.value, 10) || 0
475
473
  }),
476
- className: h,
477
- disabled: b
474
+ className: g,
475
+ disabled: x
478
476
  })] })]
479
477
  })]
480
478
  }),
481
- /* @__PURE__ */ m("div", {
479
+ /* @__PURE__ */ h("div", {
482
480
  className: "space-y-4 pt-4 border-t border-border-seam",
483
- children: [/* @__PURE__ */ p("h3", {
481
+ children: [/* @__PURE__ */ m("h3", {
484
482
  className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
485
- children: x("pressKit.tags", "Tags")
486
- }), /* @__PURE__ */ p(t, {
487
- value: T,
488
- onChange: E,
489
- disabled: b
483
+ children: S("pressKit.tags", "Tags")
484
+ }), /* @__PURE__ */ m(n, {
485
+ value: E,
486
+ onChange: D,
487
+ disabled: x
490
488
  })]
491
489
  }),
492
- /* @__PURE__ */ m("div", {
490
+ /* @__PURE__ */ h("div", {
493
491
  className: "flex gap-3 pt-4 border-t border-border-seam",
494
- children: [/* @__PURE__ */ m("button", {
492
+ children: [/* @__PURE__ */ h("button", {
495
493
  type: "submit",
496
- disabled: b,
494
+ disabled: x,
497
495
  className: "inline-flex items-center gap-2 px-6 py-2.5 bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)] rounded-lg hover:opacity-90 transition-all duration-200 font-medium disabled:opacity-50 disabled:cursor-not-allowed",
498
- children: [b && /* @__PURE__ */ p(u, {
496
+ children: [x && /* @__PURE__ */ m(d, {
499
497
  size: 16,
500
498
  className: "animate-spin"
501
- }), S ? x("pressKit.updateAsset", "Update Asset") : x("pressKit.createAsset", "Create Asset")]
502
- }), /* @__PURE__ */ p("button", {
499
+ }), C ? S("pressKit.updateAsset", "Update Asset") : S("pressKit.createAsset", "Create Asset")]
500
+ }), /* @__PURE__ */ m("button", {
503
501
  type: "button",
504
- onClick: y,
505
- disabled: b,
502
+ onClick: b,
503
+ disabled: x,
506
504
  className: "px-6 py-2.5 bg-transparent text-text-primary border border-default rounded-lg hover:bg-bg-sunken transition-all duration-200 font-medium disabled:opacity-50 disabled:cursor-not-allowed",
507
- children: x("productCommon.cancel", "Cancel")
505
+ children: S("productCommon.cancel", "Cancel")
508
506
  })]
509
507
  })
510
508
  ]
511
509
  });
512
510
  }
513
- function _(e) {
511
+ function v(e) {
514
512
  return e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
515
513
  }
516
514
  //#endregion
517
- export { g as PressKitAssetForm };
515
+ export { _ as PressKitAssetForm };
518
516
 
519
517
  //# sourceMappingURL=PressKitAssetForm.js.map