@kidecms/core 0.29.2 → 0.29.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -599,6 +599,10 @@ export default function ContentEditor({
599
599
  document.documentElement.classList.remove("cms-fullscreen-restoring");
600
600
  const prevOverflow = document.body.style.overflow;
601
601
  document.body.style.overflow = "hidden";
602
+ // Entering fullscreen is an explicit "I want to write" gesture — put the caret in the
603
+ // editor rather than making it a second click. Deferred a frame so the overlay has laid
604
+ // out before the browser scrolls to the selection.
605
+ const focusFrame = requestAnimationFrame(() => editor?.commands.focus());
602
606
  const onKeyDown = (e: KeyboardEvent) => {
603
607
  if (e.key === "Escape") setIsFullscreen(false);
604
608
  };
@@ -611,11 +615,12 @@ export default function ContentEditor({
611
615
  };
612
616
  form?.addEventListener("submit", onSubmit);
613
617
  return () => {
618
+ cancelAnimationFrame(focusFrame);
614
619
  document.body.style.overflow = prevOverflow;
615
620
  window.removeEventListener("keydown", onKeyDown);
616
621
  form?.removeEventListener("submit", onSubmit);
617
622
  };
618
- }, [isFullscreen, restoreKey]);
623
+ }, [isFullscreen, restoreKey, editor]);
619
624
 
620
625
  const openLinkDialog = () => {
621
626
  if (!editor) return;
@@ -645,23 +645,23 @@ const publishBlocked =
645
645
  <dl class="text-muted-foreground grid gap-1 text-xs">
646
646
  {doc._status === "scheduled" && doc._publishAt && (
647
647
  <>
648
- <div class="flex justify-between gap-2">
648
+ <div class="flex gap-2 lg:justify-between">
649
649
  <dt>Publishes</dt>
650
650
  <dd class="text-foreground/70">{formatDate(doc._publishAt)}</dd>
651
651
  </div>
652
652
  {doc._unpublishAt && (
653
- <div class="flex justify-between gap-2">
653
+ <div class="flex gap-2 lg:justify-between">
654
654
  <dt>Unpublishes</dt>
655
655
  <dd class="text-foreground/70">{formatDate(doc._unpublishAt)}</dd>
656
656
  </div>
657
657
  )}
658
658
  </>
659
659
  )}
660
- <div class="flex justify-between gap-2">
660
+ <div class="flex gap-2 lg:justify-between">
661
661
  <dt>Created</dt>
662
662
  <dd class="text-foreground/70">{formatDate(doc._createdAt)}</dd>
663
663
  </div>
664
- <div class="flex justify-between gap-2">
664
+ <div class="flex gap-2 lg:justify-between">
665
665
  <dt>Updated</dt>
666
666
  <dd class="text-foreground/70">{formatDate(doc._updatedAt)}</dd>
667
667
  </div>
@@ -26,7 +26,7 @@ const hidden = allDocs.slice(30);
26
26
  <>
27
27
  <ul class="grid gap-1">
28
28
  {visible.map((d) => (
29
- <li class="flex min-w-0 items-baseline justify-between gap-2">
29
+ <li class="flex min-w-0 items-baseline gap-2 lg:justify-between">
30
30
  <a
31
31
  href={`/admin/${d.collectionSlug}/${d._id}`}
32
32
  target="_blank"
@@ -45,7 +45,7 @@ const hidden = allDocs.slice(30);
45
45
  </summary>
46
46
  <ul class="mt-1 grid gap-1">
47
47
  {hidden.map((d) => (
48
- <li class="flex min-w-0 items-baseline justify-between gap-2">
48
+ <li class="flex min-w-0 items-baseline gap-2 lg:justify-between">
49
49
  <a
50
50
  href={`/admin/${d.collectionSlug}/${d._id}`}
51
51
  class="text-foreground/70 hover:text-foreground truncate text-sm transition-colors hover:underline"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kidecms/core",
3
- "version": "0.29.2",
3
+ "version": "0.29.3",
4
4
  "description": "Kide CMS runtime — core library, admin UI, routes, and middleware for Astro. Shipped as TypeScript source.",
5
5
  "keywords": [
6
6
  "cms",