@a83/orbiter-admin 0.3.32 → 0.3.34

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a83/orbiter-admin",
3
- "version": "0.3.32",
3
+ "version": "0.3.34",
4
4
  "description": "Standalone admin server for Orbiter CMS",
5
5
  "type": "module",
6
6
  "main": "./src/server.js",
package/public/style.css CHANGED
@@ -1994,6 +1994,9 @@ html[data-style="xfce"] .xfce-in-focus .xfce-focus-trigger::after {
1994
1994
  text-align: center;
1995
1995
  flex-shrink: 0;
1996
1996
  }
1997
+ .xfce-tools-sep { height: 1px; background: var(--line); margin: 4px 6px; }
1998
+ .xfce-tools-palette { width: 100%; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; }
1999
+ .xfce-tools-kbd { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--muted); background: color-mix(in srgb, var(--mid) 14%, transparent); padding: 2px 5px; border-radius: 3px; border: none; font-style: normal; }
1997
2000
 
1998
2001
  /* Status bar links & logout */
1999
2002
  a.xfce-sb-logo { text-decoration: none; color: var(--accent); }
@@ -2006,6 +2009,13 @@ a.xfce-sb-logo:hover { opacity: .8; }
2006
2009
  font-family: var(--mono); transition: color .15s;
2007
2010
  }
2008
2011
  .xfce-sb-logout:hover { color: var(--red); }
2012
+ .xfce-sb-palette-btn {
2013
+ background: none; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
2014
+ border-radius: 4px; cursor: pointer; padding: 1px 6px;
2015
+ font-size: 13px; color: var(--accent); line-height: 1.4;
2016
+ font-family: var(--mono); transition: background .15s;
2017
+ }
2018
+ .xfce-sb-palette-btn:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
2009
2019
 
2010
2020
  /* Draft badge on dock items */
2011
2021
  .xfce-dock-badge {
@@ -2018,28 +2028,51 @@ a.xfce-sb-logo:hover { opacity: .8; }
2018
2028
  }
2019
2029
  .xfce-dock-item { position: relative; }
2020
2030
 
2021
- /* Quick-create button */
2022
- .xfce-dock-create .xfce-dock-icon {
2023
- font-size: 16px !important; font-family: inherit !important;
2024
- color: var(--accent); font-weight: 300;
2031
+ /* Hover + badge above collection dock items */
2032
+ .xfce-col-create {
2033
+ position: fixed; z-index: 99990;
2034
+ width: 22px; height: 22px; border-radius: 50%;
2035
+ background: var(--accent);
2036
+ color: color-mix(in srgb, var(--bg1) 15%, #000);
2037
+ font-size: 17px; line-height: 22px; font-weight: 300;
2038
+ text-align: center; text-decoration: none;
2039
+ transform: translateX(-50%) translateY(6px);
2040
+ opacity: 0; pointer-events: none;
2041
+ transition: opacity .13s, transform .13s cubic-bezier(.34,1.5,.64,1);
2042
+ box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
2043
+ user-select: none;
2044
+ }
2045
+ .xfce-col-create.visible {
2046
+ opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
2025
2047
  }
2026
2048
 
2027
2049
  /* ── Command Palette ─────────────────────────────────────── */
2028
2050
  .xfce-palette {
2029
2051
  display: none; position: fixed; inset: 0; z-index: 10000;
2030
- background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
2031
- align-items: flex-start; justify-content: center;
2032
- padding-top: 12vh;
2052
+ background: rgba(0,0,0,0);
2053
+ align-items: flex-end; justify-content: center;
2054
+ padding-bottom: calc(var(--dock-h, 76px) + 20px);
2055
+ transition: background .18s;
2056
+ }
2057
+ .xfce-palette.open {
2058
+ display: flex;
2059
+ background: rgba(0,0,0,.28);
2033
2060
  }
2034
- .xfce-palette.open { display: flex; }
2035
2061
 
2036
2062
  .xfce-palette-inner {
2037
2063
  width: min(560px, 92vw);
2038
2064
  background: var(--glass-bg, color-mix(in srgb, var(--bg1) 90%, transparent));
2039
2065
  border: 1px solid var(--line);
2040
2066
  border-radius: 12px;
2041
- box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px color-mix(in srgb,var(--accent) 20%,transparent);
2067
+ box-shadow: 0 -2px 32px rgba(0,0,0,.25), 0 0 0 1px color-mix(in srgb,var(--accent) 20%,transparent);
2042
2068
  overflow: hidden;
2069
+ transform: translateY(14px);
2070
+ opacity: 0;
2071
+ transition: transform .2s cubic-bezier(.34,1.15,.64,1), opacity .15s;
2072
+ }
2073
+ .xfce-palette.open .xfce-palette-inner {
2074
+ transform: translateY(0);
2075
+ opacity: 1;
2043
2076
  }
2044
2077
 
2045
2078
  .xfce-palette-bar {
package/public/xfce.js CHANGED
@@ -62,6 +62,8 @@
62
62
  '</div>',
63
63
  '<div class="xfce-sb-center" id="xfce-sb-title"></div>',
64
64
  '<div class="xfce-sb-right">',
65
+ '<button id="xfce-sb-palette-btn" class="xfce-sb-palette-btn" title="Command palette (⌘K)">⌘</button>',
66
+ '<span class="xfce-sb-div">·</span>',
65
67
  '<a id="xfce-sb-user" href="/account.html" class="xfce-sb-user-link"></a>',
66
68
  '<span class="xfce-sb-div">·</span>',
67
69
  '<button id="xfce-sb-logout" class="xfce-sb-logout" title="Log out">⏻</button>',
@@ -90,6 +92,12 @@
90
92
  fetch('/api/auth/logout', { method: 'POST', credentials: 'include' })
91
93
  .finally(function () { location.href = '/login.html'; });
92
94
  });
95
+
96
+ // Palette trigger in status bar
97
+ document.getElementById('xfce-sb-palette-btn').addEventListener('click', function (e) {
98
+ e.stopPropagation();
99
+ openPalette();
100
+ });
93
101
  }
94
102
 
95
103
  // ── HUD Meta Panel ────────────────────────────────────────────────────
@@ -146,6 +154,17 @@
146
154
  a.innerHTML = '<span class="xfce-tools-icon">' + t.icon + '</span><span>' + t.label + '</span>';
147
155
  toolsPopup.appendChild(a);
148
156
  });
157
+ var sep = document.createElement('div');
158
+ sep.className = 'xfce-tools-sep';
159
+ toolsPopup.appendChild(sep);
160
+ var palBtn = el('button', 'xfce-tools-item xfce-tools-palette');
161
+ palBtn.innerHTML = '<span class="xfce-tools-icon">⌘</span><span>Palette</span><kbd class="xfce-tools-kbd">⌘K</kbd>';
162
+ palBtn.addEventListener('click', function (e) {
163
+ e.stopPropagation();
164
+ toolsPopup.classList.remove('open');
165
+ openPalette();
166
+ });
167
+ toolsPopup.appendChild(palBtn);
149
168
  document.body.appendChild(toolsPopup);
150
169
  document.addEventListener('click', function () {
151
170
  toolsPopup.classList.remove('open');
@@ -165,6 +184,34 @@
165
184
  toolsPopup.classList.toggle('open');
166
185
  }
167
186
 
187
+ // ── Hover + badge above collection items ─────────────────────────────
188
+ var colCreateEl, colCreateTimer;
189
+
190
+ function buildColCreate() {
191
+ colCreateEl = el('a', 'xfce-col-create');
192
+ colCreateEl.id = 'xfce-col-create';
193
+ colCreateEl.textContent = '+';
194
+ colCreateEl.addEventListener('mouseenter', function () { clearTimeout(colCreateTimer); });
195
+ colCreateEl.addEventListener('mouseleave', function () { colCreateTimer = setTimeout(hideColCreate, 120); });
196
+ document.body.appendChild(colCreateEl);
197
+ }
198
+
199
+ function showColCreate(href, itemEl) {
200
+ if (!colCreateEl) buildColCreate();
201
+ clearTimeout(colCreateTimer);
202
+ var dock = document.getElementById('xfce-dock');
203
+ var dockTop = dock ? dock.getBoundingClientRect().top : 0;
204
+ var itemRect = itemEl.getBoundingClientRect();
205
+ colCreateEl.href = href;
206
+ colCreateEl.style.left = Math.round(itemRect.left + itemRect.width / 2) + 'px';
207
+ colCreateEl.style.top = Math.round(dockTop - 34) + 'px';
208
+ colCreateEl.classList.add('visible');
209
+ }
210
+
211
+ function hideColCreate() {
212
+ if (colCreateEl) colCreateEl.classList.remove('visible');
213
+ }
214
+
168
215
  // ── Command Palette ───────────────────────────────────────────────────
169
216
  var palette, paletteInp, paletteResults, palActive = -1;
170
217
 
@@ -270,15 +317,24 @@
270
317
 
271
318
  function openPalette() {
272
319
  if (!palette) buildPalette();
273
- palette.classList.add('open');
320
+ palette.style.display = 'flex';
274
321
  paletteInp.value = '';
275
322
  palActive = -1;
276
323
  renderPalette('');
277
- setTimeout(function () { paletteInp.focus(); }, 30);
324
+ requestAnimationFrame(function () {
325
+ requestAnimationFrame(function () {
326
+ palette.classList.add('open');
327
+ setTimeout(function () { paletteInp.focus(); }, 40);
328
+ });
329
+ });
278
330
  }
279
331
 
280
332
  function closePalette() {
281
- if (palette) palette.classList.remove('open');
333
+ if (!palette) return;
334
+ palette.classList.remove('open');
335
+ setTimeout(function () {
336
+ if (!palette.classList.contains('open')) palette.style.display = 'none';
337
+ }, 200);
282
338
  }
283
339
 
284
340
  // ── Toast system ──────────────────────────────────────────────────────
@@ -745,7 +801,7 @@
745
801
  : page === 'entries' && activeCol === col.id;
746
802
  var abbr = col.label.substring(0, 2);
747
803
  var item = makeDockItem(abbr, col.label, href, isActive, false);
748
- item.querySelector('.xfce-dock-icon').style.cssText = 'font-size:9px;font-family:var(--mono);letter-spacing:-.02em;line-height:1;';
804
+ item.querySelector('.xfce-dock-icon').style.cssText = 'font-size:14px;font-weight:700;font-family:var(--mono);letter-spacing:-.03em;line-height:1;opacity:1;';
749
805
  item.dataset.dockIdx = idx + 1;
750
806
 
751
807
  // Draft badge
@@ -756,19 +812,18 @@
756
812
  item.appendChild(badge);
757
813
  }
758
814
 
815
+ // Hover shows + badge above this item
816
+ var createHref = col.singleton
817
+ ? '/editor.html?collection=' + encodeURIComponent(col.id) + '&singleton=1'
818
+ : '/editor.html?collection=' + encodeURIComponent(col.id);
819
+ item.addEventListener('mouseenter', function () { showColCreate(createHref, item); });
820
+ item.addEventListener('mouseleave', function () { colCreateTimer = setTimeout(hideColCreate, 120); });
821
+
759
822
  colGroup.appendChild(item);
760
823
 
761
824
  // Add to palette
762
825
  _palItems.push({ icon: abbr, label: col.label, href: href, group: 'Collections' });
763
826
  });
764
-
765
- // Quick-create: + button when viewing a collection's entries
766
- if (page === 'entries' && activeCol) {
767
- var createHref = '/editor.html?collection=' + encodeURIComponent(activeCol);
768
- var createBtn = makeDockItem('+', 'New entry', createHref, false, false);
769
- createBtn.classList.add('xfce-dock-create');
770
- colGroup.appendChild(createBtn);
771
- }
772
827
  }
773
828
 
774
829
  // HUD pod section