@realiizlabs/admin 0.15.0 → 0.15.2

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.
@@ -102,7 +102,7 @@ function isActive(item, activeHref, basePath) {
102
102
  if (item.href === basePath) return activeHref === basePath || activeHref === `${basePath}/`;
103
103
  return activeHref === item.href || activeHref.startsWith(`${item.href}/`);
104
104
  }
105
- function Sidebar({ items, pinned = [], activeHref, basePath }) {
105
+ function Sidebar({ items, pinned = [], activeHref, basePath, version }) {
106
106
  const [collapsed, setCollapsed] = react.useState(false);
107
107
  react.useEffect(() => {
108
108
  try {
@@ -157,7 +157,11 @@ function Sidebar({ items, pinned = [], activeHref, basePath }) {
157
157
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-sidebar__label", children: "Collapse" })
158
158
  ]
159
159
  }
160
- )
160
+ ),
161
+ version && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rz-sidebar__version", title: `Studio ${version}`, children: [
162
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-sidebar__label", children: "Studio " }),
163
+ version
164
+ ] })
161
165
  ] });
162
166
  }
163
167
  function buttonClass(variant = "secondary", size = "md", extra) {
@@ -405,6 +409,8 @@ var SHELL_CSS = `
405
409
  .rz-sidebar__collapse:hover { color: var(--text-primary); }
406
410
  .rz-sidebar__collapse svg { flex-shrink: 0; }
407
411
  .rz-sidebar--collapsed .rz-sidebar__collapse { justify-content: center; padding: .6rem 0; }
412
+ .rz-sidebar__version { display: block; padding: 0 1rem .75rem; font-family: var(--rz-font-mono); font-size: .6875rem; letter-spacing: .04em; color: var(--text-muted); opacity: .8; white-space: nowrap; }
413
+ .rz-sidebar--collapsed .rz-sidebar__version { padding: 0 0 .75rem; text-align: center; }
408
414
  .rz-main { flex: 1; min-width: 0; }
409
415
  .rz-content { max-width: 1400px; margin: 0; padding: 28px 32px 80px; }
410
416
  .rz-content .realiiz-form { max-width: none; }
@@ -600,6 +606,7 @@ function AdminShell({
600
606
  siteUrl,
601
607
  branding,
602
608
  defaultTheme = "light",
609
+ version,
603
610
  children
604
611
  }) {
605
612
  const [theme, setTheme] = useTheme(defaultTheme);
@@ -626,7 +633,7 @@ function AdminShell({
626
633
  }
627
634
  ),
628
635
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-body", children: [
629
- showNav && /* @__PURE__ */ jsxRuntime.jsx(Sidebar, { items: nav, pinned: pinnedNav, activeHref, basePath }),
636
+ showNav && /* @__PURE__ */ jsxRuntime.jsx(Sidebar, { items: nav, pinned: pinnedNav, activeHref, basePath, version }),
630
637
  /* @__PURE__ */ jsxRuntime.jsx("main", { className: "rz-main", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-content", children }) })
631
638
  ] })
632
639
  ] });
@@ -708,6 +715,9 @@ function Tabs({ options, value, onChange, label = "Sections" }) {
708
715
  }) });
709
716
  }
710
717
 
718
+ // src/version.ts
719
+ var ADMIN_VERSION = "0.15.2" ;
720
+
711
721
  // src/studio-ui/css.ts
712
722
  var STUDIO_CSS = `
713
723
  /*
@@ -896,10 +906,11 @@ var STUDIO_CSS = `
896
906
  @media (prefers-reduced-motion: no-preference) { .rz-admin a:hover .rz-arrow--back { transform: translateX(-4px); } }
897
907
 
898
908
  /* ---- Studio update strip / Settings \u2192 Studio ---------------------------- */
899
- .rz-admin .rz-update { border: 1px solid var(--border); border-left: 3px solid var(--signal); border-radius: var(--rz-radius); background: var(--surface-1); padding: .7rem 1rem; }
900
- .rz-admin .rz-update--strip { margin: 0 0 1.25rem; }
901
- .rz-admin .rz-update__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
902
- .rz-admin .rz-update__title { font-weight: 600; color: var(--text-primary); }
909
+ .rz-admin .rz-update { border: 1px solid color-mix(in srgb, var(--signal) 22%, var(--border)); border-radius: 8px; background: color-mix(in srgb, var(--signal) 5%, var(--surface-1)); padding: .75rem 1.1rem; }
910
+ .rz-admin .rz-update--strip { margin: 0 0 1.5rem; }
911
+ .rz-admin .rz-update__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; }
912
+ .rz-admin .rz-update__title { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; color: var(--text-primary); }
913
+ .rz-admin .rz-update__title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 18%, transparent); }
903
914
  .rz-admin .rz-update__link { display: inline-flex; align-items: center; gap: .3rem; background: none; border: 0; padding: 0; font: inherit; font-size: .875rem; color: var(--signal); cursor: pointer; text-decoration: none; }
904
915
  .rz-admin .rz-update__link:hover { color: var(--text-primary); }
905
916
  .rz-admin .rz-update__later { margin-left: auto; background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; color: var(--text-muted); cursor: pointer; }
@@ -999,11 +1010,7 @@ function UpdateBody({ update, onLater, compact = false }) {
999
1010
  ];
1000
1011
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `rz-update${compact ? " rz-update--strip" : ""}`, role: "status", children: [
1001
1012
  /* @__PURE__ */ jsxRuntime.jsx(Steps, { steps }),
1002
- live && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rz-update__done", children: [
1003
- "Studio updated to ",
1004
- update.version,
1005
- ". Reload to see it."
1006
- ] })
1013
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-update__done", children: live ? `Studio ${update.version} is live. Reload and the version at the foot of the sidebar will change.` : "The version shown in Studio changes once the site has rebuilt." })
1007
1014
  ] });
1008
1015
  }
1009
1016
  const problem = outcome && outcome.state !== "pending" ? outcome.state === "stale" ? "The site changed since the checks ran. Try again in a minute." : outcome.state === "red" ? `The checks failed${outcome.failingCheck ? ` (${outcome.failingCheck})` : ""}. Your web team has been able to see this.` : outcome.state === "error" ? outcome.message : null : null;
@@ -1033,7 +1040,7 @@ function StudioShellFrame({ siteName, logoUrl, siteUrl = "/", user, role, nav, p
1033
1040
  }, [user]);
1034
1041
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1035
1042
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: STUDIO_CSS }),
1036
- /* @__PURE__ */ jsxRuntime.jsxs(AdminShell, { siteName, logoUrl: logoUrl ?? void 0, siteUrl, user, role, nav, pinnedNav, branding, accountHref: null, activeHref: pathname, children: [
1043
+ /* @__PURE__ */ jsxRuntime.jsxs(AdminShell, { siteName, logoUrl: logoUrl ?? void 0, siteUrl, user, role, nav, pinnedNav, branding, accountHref: null, activeHref: pathname, version: ADMIN_VERSION, children: [
1037
1044
  /* @__PURE__ */ jsxRuntime.jsx(UpdateStrip, { update, role }),
1038
1045
  children
1039
1046
  ] })
@@ -5452,9 +5459,6 @@ function BackArrow() {
5452
5459
  ] });
5453
5460
  }
5454
5461
 
5455
- // src/version.ts
5456
- var ADMIN_VERSION = "0.15.0" ;
5457
-
5458
5462
  // src/studio-ui/types.ts
5459
5463
  var ACTION_NAMES = [
5460
5464
  "updateStudio",