litecms 0.2.2 → 0.2.4

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.
@@ -18,7 +18,7 @@ import {
18
18
  useCmsLanguage,
19
19
  useCmsLanguageOptional,
20
20
  useForm
21
- } from "../index-c9btr14k.js";
21
+ } from "../index-qg9tzdst.js";
22
22
  import"../index-wmd953zf.js";
23
23
  import {
24
24
  createCmsConfig,
@@ -34,33 +34,33 @@ import * as React from "react";
34
34
  import { usePathname } from "next/navigation";
35
35
 
36
36
  // src/components/CmsNavSection.tsx
37
- import { jsxDEV } from "react/jsx-dev-runtime";
37
+ import { jsx, jsxs } from "react/jsx-runtime";
38
38
  function NavSection({
39
39
  group,
40
40
  basePath,
41
41
  currentSlug
42
42
  }) {
43
- return /* @__PURE__ */ jsxDEV("div", {
43
+ return /* @__PURE__ */ jsxs("div", {
44
44
  children: [
45
- /* @__PURE__ */ jsxDEV("div", {
45
+ /* @__PURE__ */ jsx("div", {
46
46
  className: "text-[10px] font-medium uppercase tracking-widest text-neutral-400 mb-4",
47
47
  children: group.name ?? "Pages"
48
- }, undefined, false, undefined, this),
49
- /* @__PURE__ */ jsxDEV("div", {
48
+ }),
49
+ /* @__PURE__ */ jsx("div", {
50
50
  className: "space-y-1",
51
- children: group.pages.map((page) => /* @__PURE__ */ jsxDEV("a", {
51
+ children: group.pages.map((page) => /* @__PURE__ */ jsx("a", {
52
52
  href: `${basePath}/${page.slug}`,
53
53
  className: `block py-1.5 text-sm transition-colors ${currentSlug === page.slug ? "text-neutral-900" : "text-neutral-400 hover:text-neutral-900"}`,
54
54
  "aria-current": currentSlug === page.slug ? "page" : undefined,
55
55
  children: page.title
56
- }, page.slug, false, undefined, this))
57
- }, undefined, false, undefined, this)
56
+ }, page.slug))
57
+ })
58
58
  ]
59
- }, undefined, true, undefined, this);
59
+ });
60
60
  }
61
61
 
62
62
  // src/admin/CmsAdminLayout.tsx
63
- import { jsxDEV as jsxDEV2, Fragment } from "react/jsx-dev-runtime";
63
+ import { jsx as jsx2, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
64
64
  function CmsAdminLayoutInner({
65
65
  adminTitle = "Content",
66
66
  siteName,
@@ -108,137 +108,137 @@ function CmsAdminLayoutInner({
108
108
  };
109
109
  return fallback[key] ?? key;
110
110
  });
111
- return /* @__PURE__ */ jsxDEV2("div", {
111
+ return /* @__PURE__ */ jsxs2("div", {
112
112
  className: "min-h-screen font-sans antialiased bg-neutral-50 text-neutral-900 selection:bg-neutral-200 selection:text-neutral-900 [--cms-accent:#171717] [--cms-accent-subtle:rgba(23,23,23,0.08)]",
113
113
  children: [
114
- /* @__PURE__ */ jsxDEV2("aside", {
114
+ /* @__PURE__ */ jsxs2("aside", {
115
115
  className: "fixed inset-y-0 left-0 z-50 hidden w-56 flex-col border-r border-neutral-200 bg-white md:flex",
116
116
  children: [
117
- /* @__PURE__ */ jsxDEV2("div", {
117
+ /* @__PURE__ */ jsx2("div", {
118
118
  className: "flex h-16 items-center px-6 border-b border-neutral-200",
119
- children: /* @__PURE__ */ jsxDEV2("a", {
119
+ children: /* @__PURE__ */ jsx2("a", {
120
120
  href: basePath,
121
121
  className: "text-xs tracking-widest uppercase text-neutral-900 hover:text-neutral-600 transition-colors",
122
122
  children: adminTitle
123
- }, undefined, false, undefined, this)
124
- }, undefined, false, undefined, this),
125
- /* @__PURE__ */ jsxDEV2("nav", {
123
+ })
124
+ }),
125
+ /* @__PURE__ */ jsxs2("nav", {
126
126
  className: "flex-1 overflow-y-auto px-6 py-8 space-y-8",
127
127
  children: [
128
- modules && modules.length > 0 && /* @__PURE__ */ jsxDEV2("div", {
128
+ modules && modules.length > 0 && /* @__PURE__ */ jsx2("div", {
129
129
  className: "space-y-2",
130
130
  children: modules.map((module) => {
131
131
  const isActive = currentModuleId === module.id;
132
- return /* @__PURE__ */ jsxDEV2("a", {
132
+ return /* @__PURE__ */ jsxs2("a", {
133
133
  href: module.href,
134
134
  className: `flex items-center gap-3 py-2 text-sm transition-colors ${isActive ? "text-neutral-900 font-medium" : "text-neutral-500 hover:text-neutral-900"}`,
135
135
  children: [
136
- module.icon && /* @__PURE__ */ jsxDEV2("span", {
136
+ module.icon && /* @__PURE__ */ jsx2("span", {
137
137
  className: isActive ? "text-neutral-900" : "text-neutral-400",
138
138
  children: module.icon
139
- }, undefined, false, undefined, this),
139
+ }),
140
140
  module.title
141
141
  ]
142
- }, module.id, true, undefined, this);
142
+ }, module.id);
143
143
  })
144
- }, undefined, false, undefined, this),
145
- (!modules || modules.length === 0) && groupedPages.length > 0 && /* @__PURE__ */ jsxDEV2(Fragment, {
146
- children: groupedPages.map((group) => /* @__PURE__ */ jsxDEV2(NavSection, {
144
+ }),
145
+ (!modules || modules.length === 0) && groupedPages.length > 0 && /* @__PURE__ */ jsx2(Fragment, {
146
+ children: groupedPages.map((group) => /* @__PURE__ */ jsx2(NavSection, {
147
147
  group,
148
148
  basePath,
149
149
  currentSlug
150
- }, group.name ?? "__default", false, undefined, this))
151
- }, undefined, false, undefined, this),
152
- modules && modules.length > 0 && currentModuleId === "content" && groupedPages.length > 0 && /* @__PURE__ */ jsxDEV2("div", {
150
+ }, group.name ?? "__default"))
151
+ }),
152
+ modules && modules.length > 0 && currentModuleId === "content" && groupedPages.length > 0 && /* @__PURE__ */ jsx2("div", {
153
153
  className: "pt-4 border-t border-neutral-100",
154
- children: groupedPages.map((group) => /* @__PURE__ */ jsxDEV2(NavSection, {
154
+ children: groupedPages.map((group) => /* @__PURE__ */ jsx2(NavSection, {
155
155
  group,
156
156
  basePath,
157
157
  currentSlug
158
- }, group.name ?? "__default", false, undefined, this))
159
- }, undefined, false, undefined, this)
158
+ }, group.name ?? "__default"))
159
+ })
160
160
  ]
161
- }, undefined, true, undefined, this),
162
- /* @__PURE__ */ jsxDEV2("div", {
161
+ }),
162
+ /* @__PURE__ */ jsxs2("div", {
163
163
  className: "border-t border-neutral-200 px-6 py-4 space-y-3",
164
164
  children: [
165
- langContext && /* @__PURE__ */ jsxDEV2(CmsLanguageSelector, {}, undefined, false, undefined, this),
166
- publicSiteUrl && /* @__PURE__ */ jsxDEV2("a", {
165
+ langContext && /* @__PURE__ */ jsx2(CmsLanguageSelector, {}),
166
+ publicSiteUrl && /* @__PURE__ */ jsxs2("a", {
167
167
  href: publicSiteUrl,
168
168
  className: "flex items-center gap-2 text-xs tracking-wide text-neutral-400 hover:text-neutral-900 transition-colors",
169
169
  target: "_blank",
170
170
  rel: "noopener noreferrer",
171
171
  children: [
172
- /* @__PURE__ */ jsxDEV2("span", {
172
+ /* @__PURE__ */ jsx2("span", {
173
173
  children: t("viewSite")
174
- }, undefined, false, undefined, this),
175
- /* @__PURE__ */ jsxDEV2("svg", {
174
+ }),
175
+ /* @__PURE__ */ jsx2("svg", {
176
176
  className: "h-3 w-3",
177
177
  viewBox: "0 0 24 24",
178
178
  fill: "none",
179
179
  stroke: "currentColor",
180
180
  strokeWidth: "1.5",
181
- children: /* @__PURE__ */ jsxDEV2("path", {
181
+ children: /* @__PURE__ */ jsx2("path", {
182
182
  strokeLinecap: "round",
183
183
  strokeLinejoin: "round",
184
184
  d: "M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"
185
- }, undefined, false, undefined, this)
186
- }, undefined, false, undefined, this)
185
+ })
186
+ })
187
187
  ]
188
- }, undefined, true, undefined, this),
189
- onLogout && /* @__PURE__ */ jsxDEV2("button", {
188
+ }),
189
+ onLogout && /* @__PURE__ */ jsx2("button", {
190
190
  onClick: onLogout,
191
191
  className: "text-xs tracking-wide text-neutral-400 hover:text-neutral-900 transition-colors cursor-pointer",
192
192
  children: t("signOut")
193
- }, undefined, false, undefined, this)
193
+ })
194
194
  ]
195
- }, undefined, true, undefined, this)
195
+ })
196
196
  ]
197
- }, undefined, true, undefined, this),
198
- /* @__PURE__ */ jsxDEV2("header", {
197
+ }),
198
+ /* @__PURE__ */ jsx2("header", {
199
199
  className: "sticky top-0 z-40 flex h-14 items-center gap-4 px-4 bg-white border-b border-neutral-200 md:hidden",
200
- children: /* @__PURE__ */ jsxDEV2("a", {
200
+ children: /* @__PURE__ */ jsx2("a", {
201
201
  href: basePath,
202
202
  className: "text-xs tracking-widest uppercase text-neutral-900",
203
203
  children: adminTitle
204
- }, undefined, false, undefined, this)
205
- }, undefined, false, undefined, this),
206
- /* @__PURE__ */ jsxDEV2("nav", {
204
+ })
205
+ }),
206
+ /* @__PURE__ */ jsx2("nav", {
207
207
  className: "flex gap-4 overflow-x-auto px-4 py-3 bg-white border-b border-neutral-200 md:hidden",
208
- children: modules && modules.length > 0 ? modules.map((module) => /* @__PURE__ */ jsxDEV2("a", {
208
+ children: modules && modules.length > 0 ? modules.map((module) => /* @__PURE__ */ jsx2("a", {
209
209
  href: module.href,
210
210
  className: `shrink-0 text-sm transition-colors ${currentModuleId === module.id ? "text-neutral-900 border-b border-neutral-900 pb-1" : "text-neutral-400 hover:text-neutral-900"}`,
211
211
  children: module.title
212
- }, module.id, false, undefined, this)) : pages.map((page) => /* @__PURE__ */ jsxDEV2("a", {
212
+ }, module.id)) : pages.map((page) => /* @__PURE__ */ jsx2("a", {
213
213
  href: `${basePath}/${page.slug}`,
214
214
  className: `shrink-0 text-sm transition-colors ${currentSlug === page.slug ? "text-neutral-900 border-b border-neutral-900 pb-1" : "text-neutral-400 hover:text-neutral-900"}`,
215
215
  children: page.title
216
- }, page.slug, false, undefined, this))
217
- }, undefined, false, undefined, this),
218
- /* @__PURE__ */ jsxDEV2("main", {
216
+ }, page.slug))
217
+ }),
218
+ /* @__PURE__ */ jsx2("main", {
219
219
  className: "md:ml-56 min-h-screen bg-white",
220
- children: /* @__PURE__ */ jsxDEV2("div", {
220
+ children: /* @__PURE__ */ jsx2("div", {
221
221
  className: "mx-auto h-full",
222
222
  children
223
- }, undefined, false, undefined, this)
224
- }, undefined, false, undefined, this)
223
+ })
224
+ })
225
225
  ]
226
- }, undefined, true, undefined, this);
226
+ });
227
227
  }
228
228
  function CmsAdminLayout({
229
229
  languageEndpoint,
230
230
  ...props
231
231
  }) {
232
- return /* @__PURE__ */ jsxDEV2(CmsLanguageProvider, {
232
+ return /* @__PURE__ */ jsx2(CmsLanguageProvider, {
233
233
  languageEndpoint,
234
- children: /* @__PURE__ */ jsxDEV2(CmsAdminLayoutInner, {
234
+ children: /* @__PURE__ */ jsx2(CmsAdminLayoutInner, {
235
235
  ...props
236
- }, undefined, false, undefined, this)
237
- }, undefined, false, undefined, this);
236
+ })
237
+ });
238
238
  }
239
239
  // src/components/CmsSimpleForm.tsx
240
240
  import * as React2 from "react";
241
- import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
241
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
242
242
  function CmsSimpleForm({
243
243
  fields,
244
244
  action,
@@ -334,73 +334,73 @@ function CmsSimpleForm({
334
334
  }
335
335
  };
336
336
  const groupedFields = groupFields(fields);
337
- return /* @__PURE__ */ jsxDEV3(FormProvider, {
337
+ return /* @__PURE__ */ jsx3(FormProvider, {
338
338
  ...form,
339
- children: /* @__PURE__ */ jsxDEV3("form", {
339
+ children: /* @__PURE__ */ jsxs3("form", {
340
340
  onSubmit: handleSubmit,
341
341
  children: [
342
- hiddenFieldEntries.map(([name, value]) => /* @__PURE__ */ jsxDEV3("input", {
342
+ hiddenFieldEntries.map(([name, value]) => /* @__PURE__ */ jsx3("input", {
343
343
  type: "hidden",
344
344
  name,
345
345
  value
346
- }, name, false, undefined, this)),
347
- /* @__PURE__ */ jsxDEV3("div", {
346
+ }, name)),
347
+ /* @__PURE__ */ jsxs3("div", {
348
348
  className: styles.wrapper ?? "",
349
349
  children: [
350
- /* @__PURE__ */ jsxDEV3("div", {
350
+ /* @__PURE__ */ jsx3("div", {
351
351
  className: "space-y-16",
352
- children: groupedFields.map((group, groupIndex) => /* @__PURE__ */ jsxDEV3(FieldGroup, {
352
+ children: groupedFields.map((group, groupIndex) => /* @__PURE__ */ jsx3(FieldGroup, {
353
353
  group,
354
354
  styles,
355
355
  storage
356
- }, group.name ?? `__ungrouped-${groupIndex}`, false, undefined, this))
357
- }, undefined, false, undefined, this),
358
- state.errors?.formError && /* @__PURE__ */ jsxDEV3("div", {
356
+ }, group.name ?? `__ungrouped-${groupIndex}`))
357
+ }),
358
+ state.errors?.formError && /* @__PURE__ */ jsx3("div", {
359
359
  className: "mt-12 py-4 px-5 border border-red-200 bg-red-50 text-red-900 text-sm",
360
360
  children: state.errors.formError
361
- }, undefined, false, undefined, this),
362
- showSuccess && /* @__PURE__ */ jsxDEV3("div", {
361
+ }),
362
+ showSuccess && /* @__PURE__ */ jsx3("div", {
363
363
  className: "mt-12 py-4 px-5 border border-green-200 bg-green-50 text-green-900 text-sm",
364
364
  children: resolvedSuccessMessage
365
- }, undefined, false, undefined, this),
366
- /* @__PURE__ */ jsxDEV3("div", {
365
+ }),
366
+ /* @__PURE__ */ jsxs3("div", {
367
367
  className: "mt-16 pt-8 border-t border-neutral-200 flex items-center justify-between",
368
368
  children: [
369
- /* @__PURE__ */ jsxDEV3("button", {
369
+ /* @__PURE__ */ jsx3("button", {
370
370
  type: "button",
371
371
  className: "text-sm text-neutral-400 hover:text-neutral-900 transition-colors cursor-pointer",
372
372
  onClick: () => form.reset(),
373
373
  disabled: isPending,
374
374
  children: t("reset")
375
- }, undefined, false, undefined, this),
376
- /* @__PURE__ */ jsxDEV3("button", {
375
+ }),
376
+ /* @__PURE__ */ jsxs3("button", {
377
377
  type: "submit",
378
378
  disabled: isPending,
379
379
  className: styles.submitButton ?? "inline-flex items-center gap-2 text-sm tracking-wide text-neutral-900 border-b border-neutral-900 pb-1 hover:pb-1.5 transition-all disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",
380
380
  children: [
381
- isPending && /* @__PURE__ */ jsxDEV3("svg", {
381
+ isPending && /* @__PURE__ */ jsx3("svg", {
382
382
  className: "h-3.5 w-3.5 animate-spin",
383
383
  viewBox: "0 0 24 24",
384
384
  fill: "none",
385
385
  stroke: "currentColor",
386
386
  strokeWidth: "2",
387
- children: /* @__PURE__ */ jsxDEV3("path", {
387
+ children: /* @__PURE__ */ jsx3("path", {
388
388
  d: "M21 12a9 9 0 1 1-6.219-8.56"
389
- }, undefined, false, undefined, this)
390
- }, undefined, false, undefined, this),
389
+ })
390
+ }),
391
391
  isPending ? resolvedSubmitPendingText : resolvedSubmitText,
392
- !isPending && /* @__PURE__ */ jsxDEV3("span", {
392
+ !isPending && /* @__PURE__ */ jsx3("span", {
393
393
  children: "→"
394
- }, undefined, false, undefined, this)
394
+ })
395
395
  ]
396
- }, undefined, true, undefined, this)
396
+ })
397
397
  ]
398
- }, undefined, true, undefined, this)
398
+ })
399
399
  ]
400
- }, undefined, true, undefined, this)
400
+ })
401
401
  ]
402
- }, undefined, true, undefined, this)
403
- }, undefined, false, undefined, this);
402
+ })
403
+ });
404
404
  }
405
405
  function FieldGroup({
406
406
  group,
@@ -408,32 +408,32 @@ function FieldGroup({
408
408
  storage
409
409
  }) {
410
410
  if (group.name) {
411
- return /* @__PURE__ */ jsxDEV3("fieldset", {
411
+ return /* @__PURE__ */ jsxs3("fieldset", {
412
412
  className: "space-y-8",
413
413
  children: [
414
- /* @__PURE__ */ jsxDEV3("legend", {
414
+ /* @__PURE__ */ jsx3("legend", {
415
415
  className: "text-xs font-medium uppercase tracking-widest text-neutral-400 pb-4 border-b border-neutral-200 w-full",
416
416
  children: group.name
417
- }, undefined, false, undefined, this),
418
- /* @__PURE__ */ jsxDEV3("div", {
417
+ }),
418
+ /* @__PURE__ */ jsx3("div", {
419
419
  className: "grid grid-cols-1 md:grid-cols-2 gap-8",
420
- children: group.fields.map((field) => /* @__PURE__ */ jsxDEV3(AutoField, {
420
+ children: group.fields.map((field) => /* @__PURE__ */ jsx3(AutoField, {
421
421
  field,
422
422
  styles,
423
423
  storage
424
- }, field.name, false, undefined, this))
425
- }, undefined, false, undefined, this)
424
+ }, field.name))
425
+ })
426
426
  ]
427
- }, undefined, true, undefined, this);
427
+ });
428
428
  }
429
- return /* @__PURE__ */ jsxDEV3("div", {
429
+ return /* @__PURE__ */ jsx3("div", {
430
430
  className: "grid grid-cols-1 md:grid-cols-2 gap-8",
431
- children: group.fields.map((field) => /* @__PURE__ */ jsxDEV3(AutoField, {
431
+ children: group.fields.map((field) => /* @__PURE__ */ jsx3(AutoField, {
432
432
  field,
433
433
  styles,
434
434
  storage
435
- }, field.name, false, undefined, this))
436
- }, undefined, false, undefined, this);
435
+ }, field.name))
436
+ });
437
437
  }
438
438
  function AutoField({
439
439
  field,
@@ -444,9 +444,9 @@ function AutoField({
444
444
  const isFullWidth = meta.type === "textarea" || meta.type === "image";
445
445
  const colSpan = isFullWidth ? "col-span-1 md:col-span-2" : "col-span-1";
446
446
  if (meta.type === "checkbox") {
447
- return /* @__PURE__ */ jsxDEV3("div", {
447
+ return /* @__PURE__ */ jsx3("div", {
448
448
  className: colSpan,
449
- children: /* @__PURE__ */ jsxDEV3(CmsCheckbox, {
449
+ children: /* @__PURE__ */ jsx3(CmsCheckbox, {
450
450
  name,
451
451
  label: meta.label,
452
452
  helpText: meta.helpText,
@@ -455,13 +455,13 @@ function AutoField({
455
455
  inputClassName: styles.input,
456
456
  errorClassName: styles.error,
457
457
  helpClassName: styles.help
458
- }, undefined, false, undefined, this)
459
- }, undefined, false, undefined, this);
458
+ })
459
+ });
460
460
  }
461
461
  if (meta.type === "image") {
462
- return /* @__PURE__ */ jsxDEV3("div", {
462
+ return /* @__PURE__ */ jsx3("div", {
463
463
  className: colSpan,
464
- children: /* @__PURE__ */ jsxDEV3(CmsImageField, {
464
+ children: /* @__PURE__ */ jsx3(CmsImageField, {
465
465
  name,
466
466
  label: meta.label,
467
467
  helpText: meta.helpText,
@@ -472,12 +472,12 @@ function AutoField({
472
472
  errorClassName: styles.error,
473
473
  helpClassName: styles.help,
474
474
  storage
475
- }, undefined, false, undefined, this)
476
- }, undefined, false, undefined, this);
475
+ })
476
+ });
477
477
  }
478
- return /* @__PURE__ */ jsxDEV3("div", {
478
+ return /* @__PURE__ */ jsx3("div", {
479
479
  className: colSpan,
480
- children: /* @__PURE__ */ jsxDEV3(CmsField, {
480
+ children: /* @__PURE__ */ jsx3(CmsField, {
481
481
  name,
482
482
  label: meta.label,
483
483
  type: meta.type ?? "text",
@@ -491,12 +491,12 @@ function AutoField({
491
491
  inputClassName: styles.input,
492
492
  errorClassName: styles.error,
493
493
  helpClassName: styles.help
494
- }, undefined, false, undefined, this)
495
- }, undefined, false, undefined, this);
494
+ })
495
+ });
496
496
  }
497
497
 
498
498
  // src/admin/CmsAdminPage.tsx
499
- import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
499
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
500
500
  function CmsAdminPage({
501
501
  title,
502
502
  description,
@@ -508,25 +508,25 @@ function CmsAdminPage({
508
508
  submitText,
509
509
  storage
510
510
  }) {
511
- return /* @__PURE__ */ jsxDEV4("div", {
511
+ return /* @__PURE__ */ jsxs4("div", {
512
512
  className: "space-y-12",
513
513
  children: [
514
- /* @__PURE__ */ jsxDEV4("header", {
514
+ /* @__PURE__ */ jsxs4("header", {
515
515
  className: "border-b border-neutral-200 h-16 px-8 flex items-center justify-between",
516
516
  children: [
517
- /* @__PURE__ */ jsxDEV4("h1", {
517
+ /* @__PURE__ */ jsx4("h1", {
518
518
  className: "text-2xl font-light tracking-tight text-neutral-900",
519
519
  children: title
520
- }, undefined, false, undefined, this),
521
- description && /* @__PURE__ */ jsxDEV4("p", {
520
+ }),
521
+ description && /* @__PURE__ */ jsx4("p", {
522
522
  className: "mt-3 text-sm text-neutral-500 max-w-xl leading-relaxed",
523
523
  children: description
524
- }, undefined, false, undefined, this)
524
+ })
525
525
  ]
526
- }, undefined, true, undefined, this),
527
- /* @__PURE__ */ jsxDEV4("div", {
526
+ }),
527
+ /* @__PURE__ */ jsx4("div", {
528
528
  className: "px-8 pb-12",
529
- children: /* @__PURE__ */ jsxDEV4(CmsSimpleForm, {
529
+ children: /* @__PURE__ */ jsx4(CmsSimpleForm, {
530
530
  fields,
531
531
  action,
532
532
  values,
@@ -534,92 +534,92 @@ function CmsAdminPage({
534
534
  successMessage,
535
535
  submitText,
536
536
  storage
537
- }, undefined, false, undefined, this)
538
- }, undefined, false, undefined, this)
537
+ })
538
+ })
539
539
  ]
540
- }, undefined, true, undefined, this);
540
+ });
541
541
  }
542
542
  // src/admin/CmsAdminLanding.tsx
543
- import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
543
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
544
544
  function EmptyState({ t }) {
545
- return /* @__PURE__ */ jsxDEV5("div", {
545
+ return /* @__PURE__ */ jsxs5("div", {
546
546
  className: "py-16 px-8 text-center flex flex-col items-center",
547
547
  children: [
548
- /* @__PURE__ */ jsxDEV5("div", {
548
+ /* @__PURE__ */ jsx5("div", {
549
549
  className: "w-12 h-12 rounded-lg flex items-center justify-center mb-4 bg-neutral-100",
550
- children: /* @__PURE__ */ jsxDEV5("svg", {
550
+ children: /* @__PURE__ */ jsx5("svg", {
551
551
  className: "w-6 h-6 text-neutral-400",
552
552
  viewBox: "0 0 24 24",
553
553
  fill: "none",
554
554
  stroke: "currentColor",
555
555
  strokeWidth: "1.5",
556
- children: /* @__PURE__ */ jsxDEV5("path", {
556
+ children: /* @__PURE__ */ jsx5("path", {
557
557
  strokeLinecap: "round",
558
558
  strokeLinejoin: "round",
559
559
  d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
560
- }, undefined, false, undefined, this)
561
- }, undefined, false, undefined, this)
562
- }, undefined, false, undefined, this),
563
- /* @__PURE__ */ jsxDEV5("h2", {
560
+ })
561
+ })
562
+ }),
563
+ /* @__PURE__ */ jsx5("h2", {
564
564
  className: "text-base font-medium mb-1 text-neutral-900",
565
565
  children: t("cmsNotConfigured")
566
- }, undefined, false, undefined, this),
567
- /* @__PURE__ */ jsxDEV5("p", {
566
+ }),
567
+ /* @__PURE__ */ jsx5("p", {
568
568
  className: "text-sm max-w-sm leading-relaxed text-neutral-500",
569
569
  children: t("cmsNotConfiguredDesc")
570
- }, undefined, false, undefined, this)
570
+ })
571
571
  ]
572
- }, undefined, true, undefined, this);
572
+ });
573
573
  }
574
574
  var CmsModuleIcons = {
575
- pages: /* @__PURE__ */ jsxDEV5("svg", {
575
+ pages: /* @__PURE__ */ jsx5("svg", {
576
576
  className: "w-5 h-5",
577
577
  viewBox: "0 0 24 24",
578
578
  fill: "none",
579
579
  stroke: "currentColor",
580
580
  strokeWidth: "1.5",
581
- children: /* @__PURE__ */ jsxDEV5("path", {
581
+ children: /* @__PURE__ */ jsx5("path", {
582
582
  strokeLinecap: "round",
583
583
  strokeLinejoin: "round",
584
584
  d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
585
- }, undefined, false, undefined, this)
586
- }, undefined, false, undefined, this),
587
- blog: /* @__PURE__ */ jsxDEV5("svg", {
585
+ })
586
+ }),
587
+ blog: /* @__PURE__ */ jsx5("svg", {
588
588
  className: "w-5 h-5",
589
589
  viewBox: "0 0 24 24",
590
590
  fill: "none",
591
591
  stroke: "currentColor",
592
592
  strokeWidth: "1.5",
593
- children: /* @__PURE__ */ jsxDEV5("path", {
593
+ children: /* @__PURE__ */ jsx5("path", {
594
594
  strokeLinecap: "round",
595
595
  strokeLinejoin: "round",
596
596
  d: "M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z"
597
- }, undefined, false, undefined, this)
598
- }, undefined, false, undefined, this),
599
- email: /* @__PURE__ */ jsxDEV5("svg", {
597
+ })
598
+ }),
599
+ email: /* @__PURE__ */ jsx5("svg", {
600
600
  className: "w-5 h-5",
601
601
  viewBox: "0 0 24 24",
602
602
  fill: "none",
603
603
  stroke: "currentColor",
604
604
  strokeWidth: "1.5",
605
- children: /* @__PURE__ */ jsxDEV5("path", {
605
+ children: /* @__PURE__ */ jsx5("path", {
606
606
  strokeLinecap: "round",
607
607
  strokeLinejoin: "round",
608
608
  d: "M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"
609
- }, undefined, false, undefined, this)
610
- }, undefined, false, undefined, this),
611
- analytics: /* @__PURE__ */ jsxDEV5("svg", {
609
+ })
610
+ }),
611
+ analytics: /* @__PURE__ */ jsx5("svg", {
612
612
  className: "w-5 h-5",
613
613
  viewBox: "0 0 24 24",
614
614
  fill: "none",
615
615
  stroke: "currentColor",
616
616
  strokeWidth: "1.5",
617
- children: /* @__PURE__ */ jsxDEV5("path", {
617
+ children: /* @__PURE__ */ jsx5("path", {
618
618
  strokeLinecap: "round",
619
619
  strokeLinejoin: "round",
620
620
  d: "M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"
621
- }, undefined, false, undefined, this)
622
- }, undefined, false, undefined, this)
621
+ })
622
+ })
623
623
  };
624
624
  function ModuleCard({
625
625
  title,
@@ -629,60 +629,60 @@ function ModuleCard({
629
629
  disabled = false,
630
630
  badge
631
631
  }) {
632
- const content = /* @__PURE__ */ jsxDEV5("div", {
632
+ const content = /* @__PURE__ */ jsxs5("div", {
633
633
  className: "flex items-start gap-4",
634
634
  children: [
635
- /* @__PURE__ */ jsxDEV5("div", {
635
+ /* @__PURE__ */ jsx5("div", {
636
636
  className: `w-10 h-10 flex items-center justify-center shrink-0 transition-colors ${disabled ? "bg-neutral-50 text-neutral-300" : "bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200"}`,
637
637
  children: icon
638
- }, undefined, false, undefined, this),
639
- /* @__PURE__ */ jsxDEV5("div", {
638
+ }),
639
+ /* @__PURE__ */ jsxs5("div", {
640
640
  className: "flex-1 min-w-0",
641
641
  children: [
642
- /* @__PURE__ */ jsxDEV5("div", {
642
+ /* @__PURE__ */ jsxs5("div", {
643
643
  className: "flex items-center gap-2",
644
644
  children: [
645
- /* @__PURE__ */ jsxDEV5("h3", {
645
+ /* @__PURE__ */ jsx5("h3", {
646
646
  className: `text-base font-medium transition-colors ${disabled ? "text-neutral-400" : "text-neutral-900 group-hover:text-neutral-700"}`,
647
647
  children: title
648
- }, undefined, false, undefined, this),
649
- badge && /* @__PURE__ */ jsxDEV5("span", {
648
+ }),
649
+ badge && /* @__PURE__ */ jsx5("span", {
650
650
  className: "px-1.5 py-0.5 text-xs rounded bg-neutral-100 text-neutral-400",
651
651
  children: badge
652
- }, undefined, false, undefined, this)
652
+ })
653
653
  ]
654
- }, undefined, true, undefined, this),
655
- /* @__PURE__ */ jsxDEV5("p", {
654
+ }),
655
+ /* @__PURE__ */ jsx5("p", {
656
656
  className: `mt-0.5 text-sm ${disabled ? "text-neutral-300" : "text-neutral-500"}`,
657
657
  children: description
658
- }, undefined, false, undefined, this)
658
+ })
659
659
  ]
660
- }, undefined, true, undefined, this),
661
- !disabled && /* @__PURE__ */ jsxDEV5("svg", {
660
+ }),
661
+ !disabled && /* @__PURE__ */ jsx5("svg", {
662
662
  className: "w-5 h-5 text-neutral-300 group-hover:text-neutral-500 group-hover:translate-x-0.5 transition-all shrink-0",
663
663
  viewBox: "0 0 24 24",
664
664
  fill: "none",
665
665
  stroke: "currentColor",
666
666
  strokeWidth: "1.5",
667
- children: /* @__PURE__ */ jsxDEV5("path", {
667
+ children: /* @__PURE__ */ jsx5("path", {
668
668
  strokeLinecap: "round",
669
669
  strokeLinejoin: "round",
670
670
  d: "M8.25 4.5l7.5 7.5-7.5 7.5"
671
- }, undefined, false, undefined, this)
672
- }, undefined, false, undefined, this)
671
+ })
672
+ })
673
673
  ]
674
- }, undefined, true, undefined, this);
674
+ });
675
675
  if (disabled) {
676
- return /* @__PURE__ */ jsxDEV5("div", {
676
+ return /* @__PURE__ */ jsx5("div", {
677
677
  className: "block p-5 bg-neutral-50 border border-neutral-100 cursor-not-allowed",
678
678
  children: content
679
- }, undefined, false, undefined, this);
679
+ });
680
680
  }
681
- return /* @__PURE__ */ jsxDEV5("a", {
681
+ return /* @__PURE__ */ jsx5("a", {
682
682
  href,
683
683
  className: "group block p-5 bg-white border border-neutral-200 hover:border-neutral-300 transition-colors",
684
684
  children: content
685
- }, undefined, false, undefined, this);
685
+ });
686
686
  }
687
687
  function CmsAdminLanding({
688
688
  basePath = "/admin",
@@ -701,52 +701,52 @@ function CmsAdminLanding({
701
701
  return fallback[key] ?? key;
702
702
  });
703
703
  if (pages.length === 0 && modules.length === 0) {
704
- return /* @__PURE__ */ jsxDEV5(EmptyState, {
704
+ return /* @__PURE__ */ jsx5(EmptyState, {
705
705
  t
706
- }, undefined, false, undefined, this);
706
+ });
707
707
  }
708
708
  const firstPageSlug = pages[0]?.slug;
709
- return /* @__PURE__ */ jsxDEV5("div", {
709
+ return /* @__PURE__ */ jsxs5("div", {
710
710
  className: "space-y-8",
711
711
  children: [
712
- /* @__PURE__ */ jsxDEV5("header", {
712
+ /* @__PURE__ */ jsx5("header", {
713
713
  className: "border-b border-neutral-200 h-16 px-8 flex items-center",
714
- children: /* @__PURE__ */ jsxDEV5("h1", {
714
+ children: /* @__PURE__ */ jsx5("h1", {
715
715
  className: "text-2xl font-light tracking-tight text-neutral-900",
716
716
  children: t("dashboard")
717
- }, undefined, false, undefined, this)
718
- }, undefined, false, undefined, this),
719
- /* @__PURE__ */ jsxDEV5("div", {
717
+ })
718
+ }),
719
+ /* @__PURE__ */ jsx5("div", {
720
720
  className: "px-8 pb-12",
721
- children: /* @__PURE__ */ jsxDEV5("div", {
721
+ children: /* @__PURE__ */ jsxs5("div", {
722
722
  className: "grid gap-4 xl:grid-cols-2",
723
723
  children: [
724
- pages.length > 0 && /* @__PURE__ */ jsxDEV5(ModuleCard, {
724
+ pages.length > 0 && /* @__PURE__ */ jsx5(ModuleCard, {
725
725
  title: t("modulePages"),
726
726
  description: t("modulePagesDesc"),
727
727
  icon: CmsModuleIcons.pages,
728
728
  href: firstPageSlug ? `${basePath}/${firstPageSlug}` : undefined,
729
729
  disabled: !firstPageSlug
730
- }, undefined, false, undefined, this),
731
- modules.map((module) => /* @__PURE__ */ jsxDEV5(ModuleCard, {
730
+ }),
731
+ modules.map((module) => /* @__PURE__ */ jsx5(ModuleCard, {
732
732
  title: module.title,
733
733
  description: module.description,
734
734
  icon: module.icon,
735
735
  href: module.href,
736
736
  disabled: module.disabled,
737
737
  badge: module.badge
738
- }, module.id, false, undefined, this))
738
+ }, module.id))
739
739
  ]
740
- }, undefined, true, undefined, this)
741
- }, undefined, false, undefined, this)
740
+ })
741
+ })
742
742
  ]
743
- }, undefined, true, undefined, this);
743
+ });
744
744
  }
745
745
  // src/admin/CmsBlogAdmin.tsx
746
746
  import * as React3 from "react";
747
747
  import ReactMarkdown from "react-markdown";
748
748
  import remarkGfm from "remark-gfm";
749
- import { jsxDEV as jsxDEV6, Fragment as Fragment2 } from "react/jsx-dev-runtime";
749
+ import { jsx as jsx6, jsxs as jsxs6, Fragment as Fragment2 } from "react/jsx-runtime";
750
750
  function generateId() {
751
751
  return crypto.randomUUID();
752
752
  }
@@ -760,329 +760,338 @@ function formatDate(dateString) {
760
760
  day: "numeric"
761
761
  });
762
762
  }
763
+ function toDateTimeLocalValue(dateString) {
764
+ if (!dateString)
765
+ return "";
766
+ const date = new Date(dateString);
767
+ if (Number.isNaN(date.getTime()))
768
+ return "";
769
+ const pad = (value) => String(value).padStart(2, "0");
770
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`;
771
+ }
763
772
  var Icons = {
764
- back: /* @__PURE__ */ jsxDEV6("svg", {
773
+ back: /* @__PURE__ */ jsx6("svg", {
765
774
  className: "w-4 h-4",
766
775
  viewBox: "0 0 24 24",
767
776
  fill: "none",
768
777
  stroke: "currentColor",
769
778
  strokeWidth: "2",
770
- children: /* @__PURE__ */ jsxDEV6("path", {
779
+ children: /* @__PURE__ */ jsx6("path", {
771
780
  strokeLinecap: "round",
772
781
  strokeLinejoin: "round",
773
782
  d: "M15.75 19.5L8.25 12l7.5-7.5"
774
- }, undefined, false, undefined, this)
775
- }, undefined, false, undefined, this),
776
- plus: /* @__PURE__ */ jsxDEV6("svg", {
783
+ })
784
+ }),
785
+ plus: /* @__PURE__ */ jsxs6("svg", {
777
786
  className: "w-4 h-4",
778
787
  viewBox: "0 0 24 24",
779
788
  fill: "none",
780
789
  stroke: "currentColor",
781
790
  strokeWidth: "2",
782
791
  children: [
783
- /* @__PURE__ */ jsxDEV6("line", {
792
+ /* @__PURE__ */ jsx6("line", {
784
793
  x1: "12",
785
794
  y1: "5",
786
795
  x2: "12",
787
796
  y2: "19"
788
- }, undefined, false, undefined, this),
789
- /* @__PURE__ */ jsxDEV6("line", {
797
+ }),
798
+ /* @__PURE__ */ jsx6("line", {
790
799
  x1: "5",
791
800
  y1: "12",
792
801
  x2: "19",
793
802
  y2: "12"
794
- }, undefined, false, undefined, this)
803
+ })
795
804
  ]
796
- }, undefined, true, undefined, this),
797
- image: /* @__PURE__ */ jsxDEV6("svg", {
805
+ }),
806
+ image: /* @__PURE__ */ jsxs6("svg", {
798
807
  className: "w-4 h-4",
799
808
  viewBox: "0 0 24 24",
800
809
  fill: "none",
801
810
  stroke: "currentColor",
802
811
  strokeWidth: "2",
803
812
  children: [
804
- /* @__PURE__ */ jsxDEV6("rect", {
813
+ /* @__PURE__ */ jsx6("rect", {
805
814
  x: "3",
806
815
  y: "3",
807
816
  width: "18",
808
817
  height: "18",
809
818
  rx: "2",
810
819
  ry: "2"
811
- }, undefined, false, undefined, this),
812
- /* @__PURE__ */ jsxDEV6("circle", {
820
+ }),
821
+ /* @__PURE__ */ jsx6("circle", {
813
822
  cx: "8.5",
814
823
  cy: "8.5",
815
824
  r: "1.5"
816
- }, undefined, false, undefined, this),
817
- /* @__PURE__ */ jsxDEV6("polyline", {
825
+ }),
826
+ /* @__PURE__ */ jsx6("polyline", {
818
827
  points: "21,15 16,10 5,21"
819
- }, undefined, false, undefined, this)
828
+ })
820
829
  ]
821
- }, undefined, true, undefined, this),
822
- bold: /* @__PURE__ */ jsxDEV6("svg", {
830
+ }),
831
+ bold: /* @__PURE__ */ jsxs6("svg", {
823
832
  className: "w-4 h-4",
824
833
  viewBox: "0 0 24 24",
825
834
  fill: "none",
826
835
  stroke: "currentColor",
827
836
  strokeWidth: "2",
828
837
  children: [
829
- /* @__PURE__ */ jsxDEV6("path", {
838
+ /* @__PURE__ */ jsx6("path", {
830
839
  d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"
831
- }, undefined, false, undefined, this),
832
- /* @__PURE__ */ jsxDEV6("path", {
840
+ }),
841
+ /* @__PURE__ */ jsx6("path", {
833
842
  d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"
834
- }, undefined, false, undefined, this)
843
+ })
835
844
  ]
836
- }, undefined, true, undefined, this),
837
- italic: /* @__PURE__ */ jsxDEV6("svg", {
845
+ }),
846
+ italic: /* @__PURE__ */ jsxs6("svg", {
838
847
  className: "w-4 h-4",
839
848
  viewBox: "0 0 24 24",
840
849
  fill: "none",
841
850
  stroke: "currentColor",
842
851
  strokeWidth: "2",
843
852
  children: [
844
- /* @__PURE__ */ jsxDEV6("line", {
853
+ /* @__PURE__ */ jsx6("line", {
845
854
  x1: "19",
846
855
  y1: "4",
847
856
  x2: "10",
848
857
  y2: "4"
849
- }, undefined, false, undefined, this),
850
- /* @__PURE__ */ jsxDEV6("line", {
858
+ }),
859
+ /* @__PURE__ */ jsx6("line", {
851
860
  x1: "14",
852
861
  y1: "20",
853
862
  x2: "5",
854
863
  y2: "20"
855
- }, undefined, false, undefined, this),
856
- /* @__PURE__ */ jsxDEV6("line", {
864
+ }),
865
+ /* @__PURE__ */ jsx6("line", {
857
866
  x1: "15",
858
867
  y1: "4",
859
868
  x2: "9",
860
869
  y2: "20"
861
- }, undefined, false, undefined, this)
870
+ })
862
871
  ]
863
- }, undefined, true, undefined, this),
864
- heading: /* @__PURE__ */ jsxDEV6("svg", {
872
+ }),
873
+ heading: /* @__PURE__ */ jsxs6("svg", {
865
874
  className: "w-4 h-4",
866
875
  viewBox: "0 0 24 24",
867
876
  fill: "none",
868
877
  stroke: "currentColor",
869
878
  strokeWidth: "2",
870
879
  children: [
871
- /* @__PURE__ */ jsxDEV6("path", {
880
+ /* @__PURE__ */ jsx6("path", {
872
881
  d: "M4 12h8"
873
- }, undefined, false, undefined, this),
874
- /* @__PURE__ */ jsxDEV6("path", {
882
+ }),
883
+ /* @__PURE__ */ jsx6("path", {
875
884
  d: "M4 18V6"
876
- }, undefined, false, undefined, this),
877
- /* @__PURE__ */ jsxDEV6("path", {
885
+ }),
886
+ /* @__PURE__ */ jsx6("path", {
878
887
  d: "M12 18V6"
879
- }, undefined, false, undefined, this),
880
- /* @__PURE__ */ jsxDEV6("path", {
888
+ }),
889
+ /* @__PURE__ */ jsx6("path", {
881
890
  d: "M17 10v4h4"
882
- }, undefined, false, undefined, this),
883
- /* @__PURE__ */ jsxDEV6("path", {
891
+ }),
892
+ /* @__PURE__ */ jsx6("path", {
884
893
  d: "M21 10v8"
885
- }, undefined, false, undefined, this)
894
+ })
886
895
  ]
887
- }, undefined, true, undefined, this),
888
- list: /* @__PURE__ */ jsxDEV6("svg", {
896
+ }),
897
+ list: /* @__PURE__ */ jsxs6("svg", {
889
898
  className: "w-4 h-4",
890
899
  viewBox: "0 0 24 24",
891
900
  fill: "none",
892
901
  stroke: "currentColor",
893
902
  strokeWidth: "2",
894
903
  children: [
895
- /* @__PURE__ */ jsxDEV6("line", {
904
+ /* @__PURE__ */ jsx6("line", {
896
905
  x1: "8",
897
906
  y1: "6",
898
907
  x2: "21",
899
908
  y2: "6"
900
- }, undefined, false, undefined, this),
901
- /* @__PURE__ */ jsxDEV6("line", {
909
+ }),
910
+ /* @__PURE__ */ jsx6("line", {
902
911
  x1: "8",
903
912
  y1: "12",
904
913
  x2: "21",
905
914
  y2: "12"
906
- }, undefined, false, undefined, this),
907
- /* @__PURE__ */ jsxDEV6("line", {
915
+ }),
916
+ /* @__PURE__ */ jsx6("line", {
908
917
  x1: "8",
909
918
  y1: "18",
910
919
  x2: "21",
911
920
  y2: "18"
912
- }, undefined, false, undefined, this),
913
- /* @__PURE__ */ jsxDEV6("line", {
921
+ }),
922
+ /* @__PURE__ */ jsx6("line", {
914
923
  x1: "3",
915
924
  y1: "6",
916
925
  x2: "3.01",
917
926
  y2: "6"
918
- }, undefined, false, undefined, this),
919
- /* @__PURE__ */ jsxDEV6("line", {
927
+ }),
928
+ /* @__PURE__ */ jsx6("line", {
920
929
  x1: "3",
921
930
  y1: "12",
922
931
  x2: "3.01",
923
932
  y2: "12"
924
- }, undefined, false, undefined, this),
925
- /* @__PURE__ */ jsxDEV6("line", {
933
+ }),
934
+ /* @__PURE__ */ jsx6("line", {
926
935
  x1: "3",
927
936
  y1: "18",
928
937
  x2: "3.01",
929
938
  y2: "18"
930
- }, undefined, false, undefined, this)
939
+ })
931
940
  ]
932
- }, undefined, true, undefined, this),
933
- link: /* @__PURE__ */ jsxDEV6("svg", {
941
+ }),
942
+ link: /* @__PURE__ */ jsxs6("svg", {
934
943
  className: "w-4 h-4",
935
944
  viewBox: "0 0 24 24",
936
945
  fill: "none",
937
946
  stroke: "currentColor",
938
947
  strokeWidth: "2",
939
948
  children: [
940
- /* @__PURE__ */ jsxDEV6("path", {
949
+ /* @__PURE__ */ jsx6("path", {
941
950
  d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"
942
- }, undefined, false, undefined, this),
943
- /* @__PURE__ */ jsxDEV6("path", {
951
+ }),
952
+ /* @__PURE__ */ jsx6("path", {
944
953
  d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
945
- }, undefined, false, undefined, this)
954
+ })
946
955
  ]
947
- }, undefined, true, undefined, this),
948
- code: /* @__PURE__ */ jsxDEV6("svg", {
956
+ }),
957
+ code: /* @__PURE__ */ jsxs6("svg", {
949
958
  className: "w-4 h-4",
950
959
  viewBox: "0 0 24 24",
951
960
  fill: "none",
952
961
  stroke: "currentColor",
953
962
  strokeWidth: "2",
954
963
  children: [
955
- /* @__PURE__ */ jsxDEV6("polyline", {
964
+ /* @__PURE__ */ jsx6("polyline", {
956
965
  points: "16,18 22,12 16,6"
957
- }, undefined, false, undefined, this),
958
- /* @__PURE__ */ jsxDEV6("polyline", {
966
+ }),
967
+ /* @__PURE__ */ jsx6("polyline", {
959
968
  points: "8,6 2,12 8,18"
960
- }, undefined, false, undefined, this)
969
+ })
961
970
  ]
962
- }, undefined, true, undefined, this),
963
- quote: /* @__PURE__ */ jsxDEV6("svg", {
971
+ }),
972
+ quote: /* @__PURE__ */ jsxs6("svg", {
964
973
  className: "w-4 h-4",
965
974
  viewBox: "0 0 24 24",
966
975
  fill: "none",
967
976
  stroke: "currentColor",
968
977
  strokeWidth: "2",
969
978
  children: [
970
- /* @__PURE__ */ jsxDEV6("path", {
979
+ /* @__PURE__ */ jsx6("path", {
971
980
  d: "M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21z"
972
- }, undefined, false, undefined, this),
973
- /* @__PURE__ */ jsxDEV6("path", {
981
+ }),
982
+ /* @__PURE__ */ jsx6("path", {
974
983
  d: "M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21z"
975
- }, undefined, false, undefined, this)
984
+ })
976
985
  ]
977
- }, undefined, true, undefined, this),
978
- document: /* @__PURE__ */ jsxDEV6("svg", {
986
+ }),
987
+ document: /* @__PURE__ */ jsx6("svg", {
979
988
  className: "w-5 h-5",
980
989
  viewBox: "0 0 24 24",
981
990
  fill: "none",
982
991
  stroke: "currentColor",
983
992
  strokeWidth: "1.5",
984
- children: /* @__PURE__ */ jsxDEV6("path", {
993
+ children: /* @__PURE__ */ jsx6("path", {
985
994
  strokeLinecap: "round",
986
995
  strokeLinejoin: "round",
987
996
  d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
988
- }, undefined, false, undefined, this)
989
- }, undefined, false, undefined, this)
997
+ })
998
+ })
990
999
  };
991
1000
  function PostCard({
992
1001
  post,
993
1002
  onClick,
994
1003
  t
995
1004
  }) {
996
- return /* @__PURE__ */ jsxDEV6("button", {
1005
+ return /* @__PURE__ */ jsx6("button", {
997
1006
  onClick,
998
1007
  className: "w-full text-left p-4 bg-white border border-neutral-200 hover:border-neutral-300 transition-colors group",
999
- children: /* @__PURE__ */ jsxDEV6("div", {
1008
+ children: /* @__PURE__ */ jsxs6("div", {
1000
1009
  className: "flex items-start gap-4",
1001
1010
  children: [
1002
- post.coverImage ? /* @__PURE__ */ jsxDEV6("img", {
1011
+ post.coverImage ? /* @__PURE__ */ jsx6("img", {
1003
1012
  src: post.coverImage,
1004
1013
  alt: "",
1005
1014
  className: "w-20 h-20 object-cover shrink-0"
1006
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV6("div", {
1015
+ }) : /* @__PURE__ */ jsx6("div", {
1007
1016
  className: "w-20 h-20 bg-neutral-100 flex items-center justify-center shrink-0",
1008
1017
  children: Icons.document
1009
- }, undefined, false, undefined, this),
1010
- /* @__PURE__ */ jsxDEV6("div", {
1018
+ }),
1019
+ /* @__PURE__ */ jsxs6("div", {
1011
1020
  className: "flex-1 min-w-0",
1012
1021
  children: [
1013
- /* @__PURE__ */ jsxDEV6("div", {
1022
+ /* @__PURE__ */ jsxs6("div", {
1014
1023
  className: "flex items-center gap-2 mb-1",
1015
1024
  children: [
1016
- /* @__PURE__ */ jsxDEV6("h3", {
1025
+ /* @__PURE__ */ jsx6("h3", {
1017
1026
  className: "text-sm font-medium text-neutral-900 truncate group-hover:text-neutral-600 transition-colors",
1018
1027
  children: post.title || t("blogUntitled")
1019
- }, undefined, false, undefined, this),
1020
- /* @__PURE__ */ jsxDEV6("span", {
1028
+ }),
1029
+ /* @__PURE__ */ jsx6("span", {
1021
1030
  className: `shrink-0 px-1.5 py-0.5 text-xs rounded ${post.status === "published" ? "bg-green-100 text-green-700" : "bg-neutral-100 text-neutral-500"}`,
1022
1031
  children: post.status === "published" ? t("blogPublished") : t("blogDraft")
1023
- }, undefined, false, undefined, this)
1032
+ })
1024
1033
  ]
1025
- }, undefined, true, undefined, this),
1026
- /* @__PURE__ */ jsxDEV6("p", {
1034
+ }),
1035
+ /* @__PURE__ */ jsxs6("p", {
1027
1036
  className: "text-xs text-neutral-500 mb-2",
1028
1037
  children: [
1029
1038
  post.authorName,
1030
1039
  " · ",
1031
1040
  formatDate(post.updatedAt)
1032
1041
  ]
1033
- }, undefined, true, undefined, this),
1034
- post.excerpt && /* @__PURE__ */ jsxDEV6("p", {
1042
+ }),
1043
+ post.excerpt && /* @__PURE__ */ jsx6("p", {
1035
1044
  className: "text-sm text-neutral-600 line-clamp-2",
1036
1045
  children: post.excerpt
1037
- }, undefined, false, undefined, this)
1046
+ })
1038
1047
  ]
1039
- }, undefined, true, undefined, this)
1048
+ })
1040
1049
  ]
1041
- }, undefined, true, undefined, this)
1042
- }, undefined, false, undefined, this);
1050
+ })
1051
+ });
1043
1052
  }
1044
1053
  function EmptyState2({
1045
1054
  t,
1046
1055
  onCreate
1047
1056
  }) {
1048
- return /* @__PURE__ */ jsxDEV6("div", {
1057
+ return /* @__PURE__ */ jsxs6("div", {
1049
1058
  className: "flex flex-col items-center justify-center py-24 text-center",
1050
1059
  children: [
1051
- /* @__PURE__ */ jsxDEV6("div", {
1060
+ /* @__PURE__ */ jsx6("div", {
1052
1061
  className: "w-16 h-16 rounded-lg flex items-center justify-center mb-4 bg-neutral-100",
1053
1062
  children: Icons.document
1054
- }, undefined, false, undefined, this),
1055
- /* @__PURE__ */ jsxDEV6("h3", {
1063
+ }),
1064
+ /* @__PURE__ */ jsx6("h3", {
1056
1065
  className: "text-lg font-medium text-neutral-900 mb-2",
1057
1066
  children: t("blogNoPostsYet")
1058
- }, undefined, false, undefined, this),
1059
- /* @__PURE__ */ jsxDEV6("p", {
1067
+ }),
1068
+ /* @__PURE__ */ jsx6("p", {
1060
1069
  className: "text-sm text-neutral-500 mb-6 max-w-sm",
1061
1070
  children: t("blogCreateFirstPost")
1062
- }, undefined, false, undefined, this),
1063
- /* @__PURE__ */ jsxDEV6("button", {
1071
+ }),
1072
+ /* @__PURE__ */ jsxs6("button", {
1064
1073
  onClick: onCreate,
1065
1074
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm bg-neutral-900 text-white rounded hover:bg-neutral-800 transition-colors",
1066
1075
  children: [
1067
1076
  Icons.plus,
1068
1077
  t("blogNewPost")
1069
1078
  ]
1070
- }, undefined, true, undefined, this)
1079
+ })
1071
1080
  ]
1072
- }, undefined, true, undefined, this);
1081
+ });
1073
1082
  }
1074
1083
  function MarkdownPreview({
1075
1084
  content,
1076
1085
  t
1077
1086
  }) {
1078
1087
  if (!content.trim()) {
1079
- return /* @__PURE__ */ jsxDEV6("div", {
1088
+ return /* @__PURE__ */ jsx6("div", {
1080
1089
  className: "h-full flex items-center justify-center text-neutral-400 text-sm",
1081
1090
  children: t("blogPreviewPlaceholder")
1082
- }, undefined, false, undefined, this);
1091
+ });
1083
1092
  }
1084
1093
  const markdownComponents = {
1085
- h1: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("h1", {
1094
+ h1: ({ children, ...props }) => /* @__PURE__ */ jsx6("h1", {
1086
1095
  ...props,
1087
1096
  className: "text-2xl font-semibold text-neutral-900 mt-6 mb-3",
1088
1097
  style: {
@@ -1091,8 +1100,8 @@ function MarkdownPreview({
1091
1100
  lineHeight: "2rem"
1092
1101
  },
1093
1102
  children
1094
- }, undefined, false, undefined, this),
1095
- h2: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("h2", {
1103
+ }),
1104
+ h2: ({ children, ...props }) => /* @__PURE__ */ jsx6("h2", {
1096
1105
  ...props,
1097
1106
  className: "text-xl font-semibold text-neutral-900 mt-5 mb-3",
1098
1107
  style: {
@@ -1101,8 +1110,8 @@ function MarkdownPreview({
1101
1110
  lineHeight: "1.75rem"
1102
1111
  },
1103
1112
  children
1104
- }, undefined, false, undefined, this),
1105
- h3: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("h3", {
1113
+ }),
1114
+ h3: ({ children, ...props }) => /* @__PURE__ */ jsx6("h3", {
1106
1115
  ...props,
1107
1116
  className: "text-lg font-semibold text-neutral-900 mt-4 mb-2",
1108
1117
  style: {
@@ -1111,8 +1120,8 @@ function MarkdownPreview({
1111
1120
  lineHeight: "1.5rem"
1112
1121
  },
1113
1122
  children
1114
- }, undefined, false, undefined, this),
1115
- h4: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("h4", {
1123
+ }),
1124
+ h4: ({ children, ...props }) => /* @__PURE__ */ jsx6("h4", {
1116
1125
  ...props,
1117
1126
  className: "text-base font-semibold text-neutral-900 mt-4 mb-2",
1118
1127
  style: {
@@ -1121,61 +1130,61 @@ function MarkdownPreview({
1121
1130
  lineHeight: "1.5rem"
1122
1131
  },
1123
1132
  children
1124
- }, undefined, false, undefined, this),
1125
- p: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("p", {
1133
+ }),
1134
+ p: ({ children, ...props }) => /* @__PURE__ */ jsx6("p", {
1126
1135
  ...props,
1127
1136
  className: "text-sm text-neutral-700 leading-6 mb-3",
1128
1137
  children
1129
- }, undefined, false, undefined, this),
1130
- a: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("a", {
1138
+ }),
1139
+ a: ({ children, ...props }) => /* @__PURE__ */ jsx6("a", {
1131
1140
  ...props,
1132
1141
  className: "text-blue-600 hover:text-blue-700 underline underline-offset-2",
1133
1142
  children
1134
- }, undefined, false, undefined, this),
1135
- ul: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("ul", {
1143
+ }),
1144
+ ul: ({ children, ...props }) => /* @__PURE__ */ jsx6("ul", {
1136
1145
  ...props,
1137
1146
  className: "list-disc pl-5 text-sm text-neutral-700 mb-3",
1138
1147
  children
1139
- }, undefined, false, undefined, this),
1140
- ol: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("ol", {
1148
+ }),
1149
+ ol: ({ children, ...props }) => /* @__PURE__ */ jsx6("ol", {
1141
1150
  ...props,
1142
1151
  className: "list-decimal pl-5 text-sm text-neutral-700 mb-3",
1143
1152
  children
1144
- }, undefined, false, undefined, this),
1145
- li: ({ children, ...props }) => /* @__PURE__ */ jsxDEV6("li", {
1153
+ }),
1154
+ li: ({ children, ...props }) => /* @__PURE__ */ jsx6("li", {
1146
1155
  ...props,
1147
1156
  className: "mb-1",
1148
1157
  children
1149
- }, undefined, false, undefined, this),
1158
+ }),
1150
1159
  blockquote: ({
1151
1160
  children,
1152
1161
  ...props
1153
- }) => /* @__PURE__ */ jsxDEV6("blockquote", {
1162
+ }) => /* @__PURE__ */ jsx6("blockquote", {
1154
1163
  ...props,
1155
1164
  className: "border-l-4 border-neutral-200 pl-4 italic text-neutral-600 my-4",
1156
1165
  children
1157
- }, undefined, false, undefined, this),
1166
+ }),
1158
1167
  code: (props) => {
1159
1168
  const { children, inline, ...rest } = props;
1160
- return inline ? /* @__PURE__ */ jsxDEV6("code", {
1169
+ return inline ? /* @__PURE__ */ jsx6("code", {
1161
1170
  ...rest,
1162
1171
  className: "px-1 py-0.5 rounded bg-neutral-100 text-neutral-800 font-mono text-xs",
1163
1172
  children
1164
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV6("code", {
1173
+ }) : /* @__PURE__ */ jsx6("code", {
1165
1174
  ...rest,
1166
1175
  className: "block w-full overflow-x-auto rounded bg-neutral-900 text-neutral-100 p-3 text-xs font-mono",
1167
1176
  children
1168
- }, undefined, false, undefined, this);
1177
+ });
1169
1178
  }
1170
1179
  };
1171
- return /* @__PURE__ */ jsxDEV6("div", {
1180
+ return /* @__PURE__ */ jsx6("div", {
1172
1181
  className: "max-w-none p-6",
1173
- children: /* @__PURE__ */ jsxDEV6(ReactMarkdown, {
1182
+ children: /* @__PURE__ */ jsx6(ReactMarkdown, {
1174
1183
  remarkPlugins: [remarkGfm],
1175
1184
  components: markdownComponents,
1176
1185
  children: content
1177
- }, undefined, false, undefined, this)
1178
- }, undefined, false, undefined, this);
1186
+ })
1187
+ });
1179
1188
  }
1180
1189
  function MarkdownToolbar({
1181
1190
  textareaRef,
@@ -1242,16 +1251,16 @@ function MarkdownToolbar({
1242
1251
  title: t("blogInsertImage")
1243
1252
  }
1244
1253
  ];
1245
- return /* @__PURE__ */ jsxDEV6("div", {
1254
+ return /* @__PURE__ */ jsx6("div", {
1246
1255
  className: "flex items-center gap-1 px-2 py-1.5 border-b border-neutral-200 bg-neutral-50",
1247
- children: buttons.map((btn, i) => /* @__PURE__ */ jsxDEV6("button", {
1256
+ children: buttons.map((btn, i) => /* @__PURE__ */ jsx6("button", {
1248
1257
  type: "button",
1249
1258
  onClick: btn.action,
1250
1259
  title: btn.title,
1251
1260
  className: "p-1.5 text-neutral-500 hover:text-neutral-900 hover:bg-neutral-200 rounded transition-colors",
1252
1261
  children: btn.icon
1253
- }, i, false, undefined, this))
1254
- }, undefined, false, undefined, this);
1262
+ }, i))
1263
+ });
1255
1264
  }
1256
1265
  function BlogListView({
1257
1266
  posts,
@@ -1260,48 +1269,48 @@ function BlogListView({
1260
1269
  onNewPost,
1261
1270
  t
1262
1271
  }) {
1263
- return /* @__PURE__ */ jsxDEV6("div", {
1272
+ return /* @__PURE__ */ jsxs6("div", {
1264
1273
  className: "h-full flex flex-col",
1265
1274
  children: [
1266
- /* @__PURE__ */ jsxDEV6("header", {
1275
+ /* @__PURE__ */ jsxs6("header", {
1267
1276
  className: "border-b border-neutral-200 h-16 px-8 flex items-center justify-between shrink-0",
1268
1277
  children: [
1269
- /* @__PURE__ */ jsxDEV6("h1", {
1278
+ /* @__PURE__ */ jsx6("h1", {
1270
1279
  className: "text-2xl font-light tracking-tight text-neutral-900",
1271
1280
  children: t("blogPosts")
1272
- }, undefined, false, undefined, this),
1273
- /* @__PURE__ */ jsxDEV6("button", {
1281
+ }),
1282
+ /* @__PURE__ */ jsxs6("button", {
1274
1283
  onClick: onNewPost,
1275
1284
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm bg-neutral-900 text-white rounded hover:bg-neutral-800 transition-colors",
1276
1285
  children: [
1277
1286
  Icons.plus,
1278
1287
  t("blogNewPost")
1279
1288
  ]
1280
- }, undefined, true, undefined, this)
1289
+ })
1281
1290
  ]
1282
- }, undefined, true, undefined, this),
1283
- /* @__PURE__ */ jsxDEV6("div", {
1291
+ }),
1292
+ /* @__PURE__ */ jsx6("div", {
1284
1293
  className: "flex-1 overflow-y-auto p-8",
1285
- children: isLoading ? /* @__PURE__ */ jsxDEV6("div", {
1294
+ children: isLoading ? /* @__PURE__ */ jsx6("div", {
1286
1295
  className: "flex items-center justify-center py-24",
1287
- children: /* @__PURE__ */ jsxDEV6("div", {
1296
+ children: /* @__PURE__ */ jsx6("div", {
1288
1297
  className: "text-neutral-500 text-sm",
1289
1298
  children: t("loading")
1290
- }, undefined, false, undefined, this)
1291
- }, undefined, false, undefined, this) : posts.length === 0 ? /* @__PURE__ */ jsxDEV6(EmptyState2, {
1299
+ })
1300
+ }) : posts.length === 0 ? /* @__PURE__ */ jsx6(EmptyState2, {
1292
1301
  t,
1293
1302
  onCreate: onNewPost
1294
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV6("div", {
1303
+ }) : /* @__PURE__ */ jsx6("div", {
1295
1304
  className: "grid gap-4 max-w-4xl",
1296
- children: posts.map((post) => /* @__PURE__ */ jsxDEV6(PostCard, {
1305
+ children: posts.map((post) => /* @__PURE__ */ jsx6(PostCard, {
1297
1306
  post,
1298
1307
  onClick: () => onSelectPost(post),
1299
1308
  t
1300
- }, post.id, false, undefined, this))
1301
- }, undefined, false, undefined, this)
1302
- }, undefined, false, undefined, this)
1309
+ }, post.id))
1310
+ })
1311
+ })
1303
1312
  ]
1304
- }, undefined, true, undefined, this);
1313
+ });
1305
1314
  }
1306
1315
  function BlogEditorView({
1307
1316
  post,
@@ -1321,6 +1330,7 @@ function BlogEditorView({
1321
1330
  const [tagsInput, setTagsInput] = React3.useState(post?.tags?.join(", ") ?? "");
1322
1331
  const [authorName, setAuthorName] = React3.useState(post?.authorName ?? defaultAuthorName);
1323
1332
  const [status, setStatus] = React3.useState(post?.status ?? "draft");
1333
+ const [publishedAt, setPublishedAt] = React3.useState(toDateTimeLocalValue(post?.publishedAt));
1324
1334
  const [isSaving, setIsSaving] = React3.useState(false);
1325
1335
  const [isDeleting, setIsDeleting] = React3.useState(false);
1326
1336
  const [error, setError] = React3.useState(null);
@@ -1342,6 +1352,7 @@ function BlogEditorView({
1342
1352
  setTagsInput(post.tags?.join(", ") ?? "");
1343
1353
  setAuthorName(post.authorName);
1344
1354
  setStatus(post.status);
1355
+ setPublishedAt(toDateTimeLocalValue(post.publishedAt));
1345
1356
  }
1346
1357
  }, [post]);
1347
1358
  async function handleSave(publish = false) {
@@ -1360,11 +1371,13 @@ function BlogEditorView({
1360
1371
  coverImage: coverImage || undefined,
1361
1372
  content,
1362
1373
  tags,
1363
- authorName
1374
+ authorName,
1375
+ publishedAt: publishedAt ? new Date(publishedAt).toISOString() : undefined
1364
1376
  }, publish);
1365
1377
  setIsSaving(false);
1366
1378
  if (result) {
1367
1379
  setStatus(result.status);
1380
+ setPublishedAt(toDateTimeLocalValue(result.publishedAt));
1368
1381
  }
1369
1382
  }
1370
1383
  async function handleDelete() {
@@ -1445,262 +1458,280 @@ function BlogEditorView({
1445
1458
  console.error("[litecms] Drop upload failed:", err);
1446
1459
  }
1447
1460
  }
1448
- return /* @__PURE__ */ jsxDEV6("div", {
1461
+ return /* @__PURE__ */ jsxs6("div", {
1449
1462
  className: "h-full flex flex-col",
1450
1463
  children: [
1451
- /* @__PURE__ */ jsxDEV6("header", {
1464
+ /* @__PURE__ */ jsxs6("header", {
1452
1465
  className: "border-b border-neutral-200 h-16 px-8 flex items-center justify-between shrink-0",
1453
1466
  children: [
1454
- /* @__PURE__ */ jsxDEV6("button", {
1467
+ /* @__PURE__ */ jsxs6("button", {
1455
1468
  onClick: onBack,
1456
1469
  className: "inline-flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-900 transition-colors",
1457
1470
  children: [
1458
1471
  Icons.back,
1459
1472
  t("blogBackToList")
1460
1473
  ]
1461
- }, undefined, true, undefined, this),
1462
- /* @__PURE__ */ jsxDEV6("div", {
1474
+ }),
1475
+ /* @__PURE__ */ jsxs6("div", {
1463
1476
  className: "flex items-center gap-2",
1464
1477
  children: [
1465
- /* @__PURE__ */ jsxDEV6("button", {
1478
+ /* @__PURE__ */ jsx6("button", {
1466
1479
  onClick: () => handleSave(false),
1467
1480
  disabled: isSaving || isDeleting,
1468
1481
  className: "px-3 py-1.5 text-sm border border-neutral-200 rounded hover:bg-neutral-50 transition-colors disabled:opacity-50",
1469
1482
  children: isSaving ? t("blogSaving") : t("blogSaveDraft")
1470
- }, undefined, false, undefined, this),
1471
- status === "published" ? /* @__PURE__ */ jsxDEV6("button", {
1483
+ }),
1484
+ status === "published" ? /* @__PURE__ */ jsx6("button", {
1472
1485
  onClick: () => handleSave(false),
1473
1486
  disabled: isSaving || isDeleting,
1474
1487
  className: "px-3 py-1.5 text-sm bg-neutral-900 text-white rounded hover:bg-neutral-800 transition-colors disabled:opacity-50",
1475
1488
  children: t("blogUpdate")
1476
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV6("button", {
1489
+ }) : /* @__PURE__ */ jsx6("button", {
1477
1490
  onClick: () => handleSave(true),
1478
1491
  disabled: isSaving || isDeleting,
1479
1492
  className: "px-3 py-1.5 text-sm bg-neutral-900 text-white rounded hover:bg-neutral-800 transition-colors disabled:opacity-50",
1480
1493
  children: t("blogPublish")
1481
- }, undefined, false, undefined, this)
1494
+ })
1482
1495
  ]
1483
- }, undefined, true, undefined, this)
1496
+ })
1484
1497
  ]
1485
- }, undefined, true, undefined, this),
1486
- error && /* @__PURE__ */ jsxDEV6("div", {
1498
+ }),
1499
+ error && /* @__PURE__ */ jsx6("div", {
1487
1500
  className: "px-8 py-2 bg-red-50 text-red-600 text-sm",
1488
1501
  children: error
1489
- }, undefined, false, undefined, this),
1490
- /* @__PURE__ */ jsxDEV6("div", {
1502
+ }),
1503
+ /* @__PURE__ */ jsxs6("div", {
1491
1504
  className: "flex-1 flex min-h-0",
1492
1505
  children: [
1493
- /* @__PURE__ */ jsxDEV6("div", {
1506
+ /* @__PURE__ */ jsxs6("div", {
1494
1507
  className: "w-1/2 flex flex-col border-r border-neutral-200 overflow-hidden",
1495
1508
  children: [
1496
- /* @__PURE__ */ jsxDEV6("div", {
1509
+ /* @__PURE__ */ jsx6("div", {
1497
1510
  className: "px-4 py-2 border-b border-neutral-100 text-xs font-medium text-neutral-500 uppercase tracking-wider",
1498
1511
  children: t("blogEditor")
1499
- }, undefined, false, undefined, this),
1500
- /* @__PURE__ */ jsxDEV6("div", {
1512
+ }),
1513
+ /* @__PURE__ */ jsxs6("div", {
1501
1514
  className: "flex-1 overflow-y-auto p-4 space-y-4",
1502
1515
  children: [
1503
- /* @__PURE__ */ jsxDEV6("div", {
1516
+ /* @__PURE__ */ jsxs6("div", {
1504
1517
  children: [
1505
- /* @__PURE__ */ jsxDEV6("label", {
1518
+ /* @__PURE__ */ jsx6("label", {
1506
1519
  className: "block text-sm font-medium text-neutral-700 mb-1",
1507
1520
  children: t("blogTitle")
1508
- }, undefined, false, undefined, this),
1509
- /* @__PURE__ */ jsxDEV6("input", {
1521
+ }),
1522
+ /* @__PURE__ */ jsx6("input", {
1510
1523
  type: "text",
1511
1524
  value: title,
1512
1525
  onChange: (e) => setTitle(e.target.value),
1513
1526
  className: "w-full px-3 py-2 border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-400",
1514
1527
  placeholder: "Post title..."
1515
- }, undefined, false, undefined, this)
1528
+ })
1516
1529
  ]
1517
- }, undefined, true, undefined, this),
1518
- /* @__PURE__ */ jsxDEV6("div", {
1530
+ }),
1531
+ /* @__PURE__ */ jsxs6("div", {
1519
1532
  children: [
1520
- /* @__PURE__ */ jsxDEV6("label", {
1533
+ /* @__PURE__ */ jsx6("label", {
1521
1534
  className: "block text-sm font-medium text-neutral-700 mb-1",
1522
1535
  children: t("blogSlug")
1523
- }, undefined, false, undefined, this),
1524
- /* @__PURE__ */ jsxDEV6("input", {
1536
+ }),
1537
+ /* @__PURE__ */ jsx6("input", {
1525
1538
  type: "text",
1526
1539
  value: slug,
1527
1540
  onChange: (e) => setSlug(e.target.value),
1528
1541
  className: "w-full px-3 py-2 border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-400",
1529
1542
  placeholder: "post-slug"
1530
- }, undefined, false, undefined, this)
1543
+ })
1531
1544
  ]
1532
- }, undefined, true, undefined, this),
1533
- /* @__PURE__ */ jsxDEV6("div", {
1545
+ }),
1546
+ /* @__PURE__ */ jsxs6("div", {
1534
1547
  children: [
1535
- /* @__PURE__ */ jsxDEV6("label", {
1548
+ /* @__PURE__ */ jsx6("label", {
1536
1549
  className: "block text-sm font-medium text-neutral-700 mb-1",
1537
1550
  children: t("blogAuthor")
1538
- }, undefined, false, undefined, this),
1539
- /* @__PURE__ */ jsxDEV6("input", {
1551
+ }),
1552
+ /* @__PURE__ */ jsx6("input", {
1540
1553
  type: "text",
1541
1554
  value: authorName,
1542
1555
  onChange: (e) => setAuthorName(e.target.value),
1543
1556
  className: "w-full px-3 py-2 border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-400"
1544
- }, undefined, false, undefined, this)
1557
+ })
1545
1558
  ]
1546
- }, undefined, true, undefined, this),
1547
- /* @__PURE__ */ jsxDEV6("div", {
1559
+ }),
1560
+ /* @__PURE__ */ jsxs6("div", {
1548
1561
  children: [
1549
- /* @__PURE__ */ jsxDEV6("label", {
1562
+ /* @__PURE__ */ jsx6("label", {
1550
1563
  className: "block text-sm font-medium text-neutral-700 mb-1",
1551
1564
  children: t("blogExcerpt")
1552
- }, undefined, false, undefined, this),
1553
- /* @__PURE__ */ jsxDEV6("textarea", {
1565
+ }),
1566
+ /* @__PURE__ */ jsx6("textarea", {
1554
1567
  value: excerpt,
1555
1568
  onChange: (e) => setExcerpt(e.target.value),
1556
1569
  rows: 2,
1557
1570
  className: "w-full px-3 py-2 border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-400 resize-none",
1558
1571
  placeholder: "Brief summary..."
1559
- }, undefined, false, undefined, this)
1572
+ })
1560
1573
  ]
1561
- }, undefined, true, undefined, this),
1562
- /* @__PURE__ */ jsxDEV6("div", {
1574
+ }),
1575
+ /* @__PURE__ */ jsxs6("div", {
1563
1576
  children: [
1564
- /* @__PURE__ */ jsxDEV6("label", {
1577
+ /* @__PURE__ */ jsx6("label", {
1565
1578
  className: "block text-sm font-medium text-neutral-700 mb-1",
1566
1579
  children: t("blogTags")
1567
- }, undefined, false, undefined, this),
1568
- /* @__PURE__ */ jsxDEV6("input", {
1580
+ }),
1581
+ /* @__PURE__ */ jsx6("input", {
1569
1582
  type: "text",
1570
1583
  value: tagsInput,
1571
1584
  onChange: (e) => setTagsInput(e.target.value),
1572
1585
  className: "w-full px-3 py-2 border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-400",
1573
1586
  placeholder: "tag1, tag2, tag3"
1574
- }, undefined, false, undefined, this),
1575
- /* @__PURE__ */ jsxDEV6("p", {
1587
+ }),
1588
+ /* @__PURE__ */ jsx6("p", {
1576
1589
  className: "text-xs text-neutral-400 mt-1",
1577
1590
  children: t("blogTagsHelp")
1578
- }, undefined, false, undefined, this)
1591
+ })
1579
1592
  ]
1580
- }, undefined, true, undefined, this),
1581
- /* @__PURE__ */ jsxDEV6("div", {
1593
+ }),
1594
+ /* @__PURE__ */ jsxs6("div", {
1582
1595
  children: [
1583
- /* @__PURE__ */ jsxDEV6("label", {
1596
+ /* @__PURE__ */ jsx6("label", {
1597
+ className: "block text-sm font-medium text-neutral-700 mb-1",
1598
+ children: t("blogPublishDate")
1599
+ }),
1600
+ /* @__PURE__ */ jsx6("input", {
1601
+ type: "datetime-local",
1602
+ value: publishedAt,
1603
+ onChange: (e) => setPublishedAt(e.target.value),
1604
+ className: "w-full px-3 py-2 border border-neutral-200 rounded text-sm focus:outline-none focus:border-neutral-400"
1605
+ }),
1606
+ /* @__PURE__ */ jsx6("p", {
1607
+ className: "text-xs text-neutral-400 mt-1",
1608
+ children: t("blogPublishDateHelp")
1609
+ })
1610
+ ]
1611
+ }),
1612
+ /* @__PURE__ */ jsxs6("div", {
1613
+ children: [
1614
+ /* @__PURE__ */ jsx6("label", {
1584
1615
  className: "block text-sm font-medium text-neutral-700 mb-1",
1585
1616
  children: t("blogCoverImage")
1586
- }, undefined, false, undefined, this),
1587
- coverImage ? /* @__PURE__ */ jsxDEV6("div", {
1617
+ }),
1618
+ coverImage ? /* @__PURE__ */ jsxs6("div", {
1588
1619
  className: "relative group",
1589
1620
  children: [
1590
- /* @__PURE__ */ jsxDEV6("img", {
1621
+ /* @__PURE__ */ jsx6("img", {
1591
1622
  src: coverImage,
1592
1623
  alt: "Cover",
1593
1624
  className: "w-full h-32 object-cover border border-neutral-200"
1594
- }, undefined, false, undefined, this),
1595
- /* @__PURE__ */ jsxDEV6("div", {
1625
+ }),
1626
+ /* @__PURE__ */ jsxs6("div", {
1596
1627
  className: "absolute inset-0 flex items-center justify-center gap-4 opacity-0 group-hover:opacity-100 transition-opacity bg-black/50",
1597
1628
  children: [
1598
- /* @__PURE__ */ jsxDEV6("button", {
1629
+ /* @__PURE__ */ jsx6("button", {
1599
1630
  type: "button",
1600
1631
  onClick: openImagePickerForCover,
1601
1632
  className: "text-xs text-white border-b border-white",
1602
1633
  children: t("replace")
1603
- }, undefined, false, undefined, this),
1604
- /* @__PURE__ */ jsxDEV6("button", {
1634
+ }),
1635
+ /* @__PURE__ */ jsx6("button", {
1605
1636
  type: "button",
1606
1637
  onClick: () => setCoverImage(""),
1607
1638
  className: "text-xs text-white/70 hover:text-white",
1608
1639
  children: t("remove")
1609
- }, undefined, false, undefined, this)
1640
+ })
1610
1641
  ]
1611
- }, undefined, true, undefined, this)
1642
+ })
1612
1643
  ]
1613
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV6("button", {
1644
+ }) : /* @__PURE__ */ jsx6("button", {
1614
1645
  type: "button",
1615
1646
  onClick: openImagePickerForCover,
1616
1647
  className: "w-full h-24 border border-dashed border-neutral-200 flex items-center justify-center text-neutral-400 text-sm hover:bg-neutral-50 transition-colors",
1617
1648
  children: t("clickToSelectImage")
1618
- }, undefined, false, undefined, this)
1649
+ })
1619
1650
  ]
1620
- }, undefined, true, undefined, this),
1621
- /* @__PURE__ */ jsxDEV6("div", {
1651
+ }),
1652
+ /* @__PURE__ */ jsxs6("div", {
1622
1653
  className: "flex-1",
1623
1654
  children: [
1624
- /* @__PURE__ */ jsxDEV6("label", {
1655
+ /* @__PURE__ */ jsx6("label", {
1625
1656
  className: "block text-sm font-medium text-neutral-700 mb-1",
1626
1657
  children: t("blogContent")
1627
- }, undefined, false, undefined, this),
1628
- /* @__PURE__ */ jsxDEV6("div", {
1658
+ }),
1659
+ /* @__PURE__ */ jsxs6("div", {
1629
1660
  className: `border rounded overflow-hidden transition-colors ${isDragging ? "border-blue-400 bg-blue-50" : "border-neutral-200"}`,
1630
1661
  onDragOver: handleDragOver,
1631
1662
  onDragLeave: handleDragLeave,
1632
1663
  onDrop: handleDrop,
1633
1664
  children: [
1634
- /* @__PURE__ */ jsxDEV6(MarkdownToolbar, {
1665
+ /* @__PURE__ */ jsx6(MarkdownToolbar, {
1635
1666
  textareaRef: contentTextareaRef,
1636
1667
  content,
1637
1668
  setContent,
1638
1669
  onImageClick: openImagePickerForContent,
1639
1670
  t
1640
- }, undefined, false, undefined, this),
1641
- /* @__PURE__ */ jsxDEV6("div", {
1671
+ }),
1672
+ /* @__PURE__ */ jsxs6("div", {
1642
1673
  className: "relative",
1643
1674
  children: [
1644
- /* @__PURE__ */ jsxDEV6("textarea", {
1675
+ /* @__PURE__ */ jsx6("textarea", {
1645
1676
  ref: contentTextareaRef,
1646
1677
  value: content,
1647
1678
  onChange: (e) => setContent(e.target.value),
1648
1679
  rows: 12,
1649
1680
  className: "w-full px-3 py-2 text-sm font-mono focus:outline-none resize-none border-0",
1650
1681
  placeholder: "Write your post in Markdown..."
1651
- }, undefined, false, undefined, this),
1652
- isDragging && /* @__PURE__ */ jsxDEV6("div", {
1682
+ }),
1683
+ isDragging && /* @__PURE__ */ jsx6("div", {
1653
1684
  className: "absolute inset-0 flex items-center justify-center bg-blue-50/90 pointer-events-none",
1654
- children: /* @__PURE__ */ jsxDEV6("div", {
1685
+ children: /* @__PURE__ */ jsx6("div", {
1655
1686
  className: "text-blue-600 text-sm font-medium",
1656
1687
  children: t("blogDropImageHere")
1657
- }, undefined, false, undefined, this)
1658
- }, undefined, false, undefined, this)
1688
+ })
1689
+ })
1659
1690
  ]
1660
- }, undefined, true, undefined, this)
1691
+ })
1661
1692
  ]
1662
- }, undefined, true, undefined, this)
1693
+ })
1663
1694
  ]
1664
- }, undefined, true, undefined, this),
1665
- post && /* @__PURE__ */ jsxDEV6("div", {
1695
+ }),
1696
+ post && /* @__PURE__ */ jsx6("div", {
1666
1697
  className: "pt-4 border-t border-neutral-200",
1667
- children: /* @__PURE__ */ jsxDEV6("button", {
1698
+ children: /* @__PURE__ */ jsx6("button", {
1668
1699
  onClick: handleDelete,
1669
1700
  disabled: isSaving || isDeleting,
1670
1701
  className: "text-sm text-red-600 hover:text-red-700 disabled:opacity-50",
1671
1702
  children: isDeleting ? t("blogDeleting") : t("blogDelete")
1672
- }, undefined, false, undefined, this)
1673
- }, undefined, false, undefined, this)
1703
+ })
1704
+ })
1674
1705
  ]
1675
- }, undefined, true, undefined, this)
1706
+ })
1676
1707
  ]
1677
- }, undefined, true, undefined, this),
1678
- /* @__PURE__ */ jsxDEV6("div", {
1708
+ }),
1709
+ /* @__PURE__ */ jsxs6("div", {
1679
1710
  className: "w-1/2 flex flex-col bg-neutral-50 overflow-hidden",
1680
1711
  children: [
1681
- /* @__PURE__ */ jsxDEV6("div", {
1712
+ /* @__PURE__ */ jsx6("div", {
1682
1713
  className: "px-4 py-2 border-b border-neutral-100 text-xs font-medium text-neutral-500 uppercase tracking-wider",
1683
1714
  children: t("blogPreview")
1684
- }, undefined, false, undefined, this),
1685
- /* @__PURE__ */ jsxDEV6("div", {
1715
+ }),
1716
+ /* @__PURE__ */ jsx6("div", {
1686
1717
  className: "flex-1 overflow-y-auto",
1687
- children: /* @__PURE__ */ jsxDEV6(MarkdownPreview, {
1718
+ children: /* @__PURE__ */ jsx6(MarkdownPreview, {
1688
1719
  content,
1689
1720
  t
1690
- }, undefined, false, undefined, this)
1691
- }, undefined, false, undefined, this)
1721
+ })
1722
+ })
1692
1723
  ]
1693
- }, undefined, true, undefined, this)
1724
+ })
1694
1725
  ]
1695
- }, undefined, true, undefined, this),
1696
- showImagePicker && /* @__PURE__ */ jsxDEV6(CmsImagePickerModal, {
1726
+ }),
1727
+ showImagePicker && /* @__PURE__ */ jsx6(CmsImagePickerModal, {
1697
1728
  storage,
1698
1729
  onSelect: handleImageSelect,
1699
1730
  onClose: () => setShowImagePicker(false),
1700
1731
  currentValue: imagePickerTarget === "cover" ? coverImage : undefined
1701
- }, undefined, false, undefined, this)
1732
+ })
1702
1733
  ]
1703
- }, undefined, true, undefined, this);
1734
+ });
1704
1735
  }
1705
1736
  function CmsBlogAdmin({
1706
1737
  postsEndpoint = "/api/admin/blog/posts",
@@ -1724,6 +1755,8 @@ function CmsBlogAdmin({
1724
1755
  blogContent: "Content",
1725
1756
  blogTags: "Tags",
1726
1757
  blogAuthor: "Author",
1758
+ blogPublishDate: "Publish date",
1759
+ blogPublishDateHelp: "Set any past date or schedule a future publish.",
1727
1760
  blogSaveDraft: "Save Draft",
1728
1761
  blogPublish: "Publish",
1729
1762
  blogUnpublish: "Unpublish",
@@ -1842,7 +1875,7 @@ function CmsBlogAdmin({
1842
1875
  }
1843
1876
  }
1844
1877
  if (isEditorOpen) {
1845
- return /* @__PURE__ */ jsxDEV6(BlogEditorView, {
1878
+ return /* @__PURE__ */ jsx6(BlogEditorView, {
1846
1879
  post: selectedPost,
1847
1880
  onBack: handleBack,
1848
1881
  onSave: handleSave,
@@ -1850,23 +1883,23 @@ function CmsBlogAdmin({
1850
1883
  storage,
1851
1884
  defaultAuthorName,
1852
1885
  t
1853
- }, undefined, false, undefined, this);
1886
+ });
1854
1887
  }
1855
- return /* @__PURE__ */ jsxDEV6(Fragment2, {
1888
+ return /* @__PURE__ */ jsxs6(Fragment2, {
1856
1889
  children: [
1857
- error && /* @__PURE__ */ jsxDEV6("div", {
1890
+ error && /* @__PURE__ */ jsx6("div", {
1858
1891
  className: "px-8 py-2 bg-red-50 text-red-600 text-sm",
1859
1892
  children: error
1860
- }, undefined, false, undefined, this),
1861
- /* @__PURE__ */ jsxDEV6(BlogListView, {
1893
+ }),
1894
+ /* @__PURE__ */ jsx6(BlogListView, {
1862
1895
  posts,
1863
1896
  isLoading,
1864
1897
  onSelectPost: handleSelectPost,
1865
1898
  onNewPost: handleNewPost,
1866
1899
  t
1867
- }, undefined, false, undefined, this)
1900
+ })
1868
1901
  ]
1869
- }, undefined, true, undefined, this);
1902
+ });
1870
1903
  }
1871
1904
 
1872
1905
  // src/admin/exports.ts