@a83/orbiter-admin 0.3.31 → 0.3.32

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.31",
3
+ "version": "0.3.32",
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,19 +1994,6 @@ 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 {
1998
- height: 1px; background: var(--line); margin: 4px 6px;
1999
- }
2000
- .xfce-tools-palette {
2001
- width: 100%; background: none; border: none; cursor: pointer;
2002
- text-align: left; font-family: inherit;
2003
- }
2004
- .xfce-tools-kbd {
2005
- margin-left: auto; font-family: var(--mono);
2006
- font-size: 8px; color: var(--muted);
2007
- background: color-mix(in srgb, var(--mid) 14%, transparent);
2008
- padding: 2px 5px; border-radius: 3px; border: none; font-style: normal;
2009
- }
2010
1997
 
2011
1998
  /* Status bar links & logout */
2012
1999
  a.xfce-sb-logo { text-decoration: none; color: var(--accent); }
@@ -2019,12 +2006,6 @@ a.xfce-sb-logo:hover { opacity: .8; }
2019
2006
  font-family: var(--mono); transition: color .15s;
2020
2007
  }
2021
2008
  .xfce-sb-logout:hover { color: var(--red); }
2022
- .xfce-sb-palette-btn {
2023
- background: none; border: none; cursor: pointer; padding: 0 3px;
2024
- font-size: 14px; color: var(--mid); line-height: 1;
2025
- font-family: var(--mono); transition: color .15s;
2026
- }
2027
- .xfce-sb-palette-btn:hover { color: var(--accent); }
2028
2009
 
2029
2010
  /* Draft badge on dock items */
2030
2011
  .xfce-dock-badge {
@@ -2037,82 +2018,48 @@ a.xfce-sb-logo:hover { opacity: .8; }
2037
2018
  }
2038
2019
  .xfce-dock-item { position: relative; }
2039
2020
 
2040
- /* Hover + badge above collection dock items */
2041
- .xfce-col-create {
2042
- position: fixed;
2043
- z-index: 99990;
2044
- width: 22px; height: 22px;
2045
- border-radius: 50%;
2046
- background: var(--accent);
2047
- color: color-mix(in srgb, var(--bg1) 15%, #000);
2048
- font-size: 17px; line-height: 22px; font-weight: 300;
2049
- text-align: center; text-decoration: none;
2050
- transform: translateX(-50%) translateY(6px);
2051
- opacity: 0; pointer-events: none;
2052
- transition: opacity .13s, transform .13s cubic-bezier(.34,1.5,.64,1);
2053
- box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
2054
- user-select: none;
2055
- }
2056
- .xfce-col-create.visible {
2057
- opacity: 1;
2058
- transform: translateX(-50%) translateY(0);
2059
- pointer-events: auto;
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;
2060
2025
  }
2061
2026
 
2062
2027
  /* ── Command Palette ─────────────────────────────────────── */
2063
2028
  .xfce-palette {
2064
2029
  display: none; position: fixed; inset: 0; z-index: 10000;
2065
- background: rgba(0,0,0,0);
2066
- align-items: flex-end; justify-content: center;
2067
- padding-bottom: calc(var(--dock-h, 76px) + 28px);
2068
- transition: background .2s;
2069
- }
2070
- .xfce-palette.open {
2071
- display: flex;
2072
- background: rgba(0,0,0,.72);
2073
- backdrop-filter: blur(4px);
2074
- -webkit-backdrop-filter: blur(4px);
2030
+ background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
2031
+ align-items: flex-start; justify-content: center;
2032
+ padding-top: 12vh;
2075
2033
  }
2034
+ .xfce-palette.open { display: flex; }
2076
2035
 
2077
- /* Palette inner — always dark, space aesthetic regardless of page theme */
2078
2036
  .xfce-palette-inner {
2079
2037
  width: min(560px, 92vw);
2080
- background: #0c0c1c;
2081
- border: 1px solid rgba(120,90,210,.22);
2082
- border-top: 2px solid var(--accent, #7c6fcd);
2038
+ background: var(--glass-bg, color-mix(in srgb, var(--bg1) 90%, transparent));
2039
+ border: 1px solid var(--line);
2083
2040
  border-radius: 12px;
2084
- box-shadow:
2085
- 0 0 0 1px rgba(100,70,190,.1),
2086
- 0 16px 56px rgba(0,0,0,.8),
2087
- 0 0 80px rgba(90,60,180,.18);
2041
+ box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px color-mix(in srgb,var(--accent) 20%,transparent);
2088
2042
  overflow: hidden;
2089
- transform: translateY(16px);
2090
- opacity: 0;
2091
- transition: transform .22s cubic-bezier(.34,1.15,.64,1), opacity .16s;
2092
- }
2093
- .xfce-palette.open .xfce-palette-inner {
2094
- transform: translateY(0);
2095
- opacity: 1;
2096
2043
  }
2097
2044
 
2098
2045
  .xfce-palette-bar {
2099
2046
  display: flex; align-items: center; gap: 8px;
2100
- padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.06);
2047
+ padding: 10px 14px; border-bottom: 1px solid var(--line);
2101
2048
  }
2102
- .xfce-palette-cmd { color: var(--accent, #7c6fcd); font-size: 14px; flex-shrink: 0; opacity: .8; }
2049
+ .xfce-palette-cmd { color: var(--accent); font-size: 13px; flex-shrink: 0; }
2103
2050
  .xfce-palette-inp {
2104
2051
  flex: 1; background: none; border: none; outline: none;
2105
- font-family: var(--mono); font-size: 13px; color: #dde0ff;
2052
+ font-family: var(--mono); font-size: 13px; color: var(--heading);
2106
2053
  }
2107
- .xfce-palette-inp::placeholder { color: rgba(160,160,200,.35); }
2108
- .xfce-palette-hint { font-size: 8px; color: rgba(150,150,195,.35); font-family: var(--mono); white-space: nowrap; }
2054
+ .xfce-palette-inp::placeholder { color: var(--muted); }
2055
+ .xfce-palette-hint { font-size: 8px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
2109
2056
 
2110
2057
  .xfce-palette-results {
2111
- max-height: 380px; overflow-y: auto; padding: 6px 0;
2058
+ max-height: 360px; overflow-y: auto; padding: 6px 0;
2112
2059
  }
2113
2060
  .xfce-pal-group {
2114
- font-size: 8px; font-family: var(--mono); color: rgba(140,140,190,.5);
2115
- letter-spacing: .1em; text-transform: uppercase;
2061
+ font-size: 8px; font-family: var(--mono); color: var(--muted);
2062
+ letter-spacing: .08em; text-transform: uppercase;
2116
2063
  padding: 8px 14px 4px;
2117
2064
  }
2118
2065
  .xfce-pal-item {
@@ -2120,11 +2067,11 @@ a.xfce-sb-logo:hover { opacity: .8; }
2120
2067
  padding: 7px 14px; cursor: pointer; transition: background .1s;
2121
2068
  }
2122
2069
  .xfce-pal-item:hover, .xfce-pal-item.pal-active {
2123
- background: rgba(110,80,210,.16);
2070
+ background: color-mix(in srgb, var(--accent) 12%, transparent);
2124
2071
  }
2125
- .xfce-pal-icon { width: 20px; text-align: center; font-size: 13px; color: var(--accent, #7c6fcd); flex-shrink: 0; opacity: .85; }
2126
- .xfce-pal-label { font-size: 12px; color: rgba(215,215,255,.88); font-family: var(--mono); }
2127
- .xfce-pal-empty { padding: 20px 14px; color: rgba(140,140,190,.5); font-size: 11px; font-family: var(--mono); }
2072
+ .xfce-pal-icon { width: 20px; text-align: center; font-size: 13px; color: var(--accent); flex-shrink: 0; }
2073
+ .xfce-pal-label { font-size: 12px; color: var(--heading); font-family: var(--mono); }
2074
+ .xfce-pal-empty { padding: 20px 14px; color: var(--muted); font-size: 11px; font-family: var(--mono); }
2128
2075
 
2129
2076
  /* ── Toast host (above dock) ─────────────────────────────── */
2130
2077
  .xfce-toast-host {
package/public/xfce.js CHANGED
@@ -62,8 +62,6 @@
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>',
67
65
  '<a id="xfce-sb-user" href="/account.html" class="xfce-sb-user-link"></a>',
68
66
  '<span class="xfce-sb-div">·</span>',
69
67
  '<button id="xfce-sb-logout" class="xfce-sb-logout" title="Log out">⏻</button>',
@@ -92,12 +90,6 @@
92
90
  fetch('/api/auth/logout', { method: 'POST', credentials: 'include' })
93
91
  .finally(function () { location.href = '/login.html'; });
94
92
  });
95
-
96
- // Palette trigger in status bar
97
- document.getElementById('xfce-sb-palette-btn').addEventListener('click', function (e) {
98
- e.stopPropagation();
99
- openPalette();
100
- });
101
93
  }
102
94
 
103
95
  // ── HUD Meta Panel ────────────────────────────────────────────────────
@@ -154,19 +146,6 @@
154
146
  a.innerHTML = '<span class="xfce-tools-icon">' + t.icon + '</span><span>' + t.label + '</span>';
155
147
  toolsPopup.appendChild(a);
156
148
  });
157
- // Separator
158
- var sep = document.createElement('div');
159
- sep.className = 'xfce-tools-sep';
160
- toolsPopup.appendChild(sep);
161
- // Command palette shortcut
162
- var palBtn = el('button', 'xfce-tools-item xfce-tools-palette');
163
- palBtn.innerHTML = '<span class="xfce-tools-icon">⌘</span><span>Palette</span><kbd class="xfce-tools-kbd">⌘K</kbd>';
164
- palBtn.addEventListener('click', function (e) {
165
- e.stopPropagation();
166
- toolsPopup.classList.remove('open');
167
- openPalette();
168
- });
169
- toolsPopup.appendChild(palBtn);
170
149
  document.body.appendChild(toolsPopup);
171
150
  document.addEventListener('click', function () {
172
151
  toolsPopup.classList.remove('open');
@@ -186,38 +165,6 @@
186
165
  toolsPopup.classList.toggle('open');
187
166
  }
188
167
 
189
- // ── Hover + badge above collection items ─────────────────────────────
190
- var colCreateEl, colCreateTimer;
191
-
192
- function buildColCreate() {
193
- colCreateEl = el('a', 'xfce-col-create');
194
- colCreateEl.id = 'xfce-col-create';
195
- colCreateEl.textContent = '+';
196
- colCreateEl.addEventListener('mouseenter', function () {
197
- clearTimeout(colCreateTimer);
198
- });
199
- colCreateEl.addEventListener('mouseleave', function () {
200
- colCreateTimer = setTimeout(hideColCreate, 120);
201
- });
202
- document.body.appendChild(colCreateEl);
203
- }
204
-
205
- function showColCreate(href, itemEl) {
206
- if (!colCreateEl) buildColCreate();
207
- clearTimeout(colCreateTimer);
208
- var dock = document.getElementById('xfce-dock');
209
- var dockTop = dock ? dock.getBoundingClientRect().top : 0;
210
- var itemRect = itemEl.getBoundingClientRect();
211
- colCreateEl.href = href;
212
- colCreateEl.style.left = Math.round(itemRect.left + itemRect.width / 2) + 'px';
213
- colCreateEl.style.top = Math.round(dockTop - 34) + 'px';
214
- colCreateEl.classList.add('visible');
215
- }
216
-
217
- function hideColCreate() {
218
- if (colCreateEl) colCreateEl.classList.remove('visible');
219
- }
220
-
221
168
  // ── Command Palette ───────────────────────────────────────────────────
222
169
  var palette, paletteInp, paletteResults, palActive = -1;
223
170
 
@@ -323,25 +270,15 @@
323
270
 
324
271
  function openPalette() {
325
272
  if (!palette) buildPalette();
326
- palette.style.display = 'flex';
273
+ palette.classList.add('open');
327
274
  paletteInp.value = '';
328
275
  palActive = -1;
329
276
  renderPalette('');
330
- // double rAF so display:flex has rendered before the transition fires
331
- requestAnimationFrame(function () {
332
- requestAnimationFrame(function () {
333
- palette.classList.add('open');
334
- setTimeout(function () { paletteInp.focus(); }, 40);
335
- });
336
- });
277
+ setTimeout(function () { paletteInp.focus(); }, 30);
337
278
  }
338
279
 
339
280
  function closePalette() {
340
- if (!palette) return;
341
- palette.classList.remove('open');
342
- setTimeout(function () {
343
- if (!palette.classList.contains('open')) palette.style.display = 'none';
344
- }, 220);
281
+ if (palette) palette.classList.remove('open');
345
282
  }
346
283
 
347
284
  // ── Toast system ──────────────────────────────────────────────────────
@@ -808,7 +745,7 @@
808
745
  : page === 'entries' && activeCol === col.id;
809
746
  var abbr = col.label.substring(0, 2);
810
747
  var item = makeDockItem(abbr, col.label, href, isActive, false);
811
- 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;';
748
+ item.querySelector('.xfce-dock-icon').style.cssText = 'font-size:9px;font-family:var(--mono);letter-spacing:-.02em;line-height:1;';
812
749
  item.dataset.dockIdx = idx + 1;
813
750
 
814
751
  // Draft badge
@@ -819,20 +756,19 @@
819
756
  item.appendChild(badge);
820
757
  }
821
758
 
822
- // Hover shows + badge above this item
823
- var createHref = col.singleton
824
- ? '/editor.html?collection=' + encodeURIComponent(col.id) + '&singleton=1'
825
- : '/editor.html?collection=' + encodeURIComponent(col.id);
826
- item.addEventListener('mouseenter', function () { showColCreate(createHref, item); });
827
- item.addEventListener('mouseleave', function () {
828
- colCreateTimer = setTimeout(hideColCreate, 120);
829
- });
830
-
831
759
  colGroup.appendChild(item);
832
760
 
833
761
  // Add to palette
834
762
  _palItems.push({ icon: abbr, label: col.label, href: href, group: 'Collections' });
835
763
  });
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
+ }
836
772
  }
837
773
 
838
774
  // HUD pod section