@a83/orbiter-admin 0.3.23 → 0.3.25

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.23",
3
+ "version": "0.3.25",
4
4
  "description": "Standalone admin server for Orbiter CMS",
5
5
  "type": "module",
6
6
  "main": "./src/server.js",
package/public/style.css CHANGED
@@ -2019,9 +2019,22 @@ a.xfce-sb-logo:hover { opacity: .8; }
2019
2019
  .xfce-dock-item { position: relative; }
2020
2020
 
2021
2021
  /* Quick-create button */
2022
+ .xfce-dock-create {
2023
+ background: color-mix(in srgb, var(--accent) 12%, transparent);
2024
+ border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent) !important;
2025
+ }
2022
2026
  .xfce-dock-create .xfce-dock-icon {
2023
- font-size: 16px !important; font-family: inherit !important;
2024
- color: var(--accent); font-weight: 300;
2027
+ font-size: 20px !important; font-family: inherit !important;
2028
+ color: var(--accent) !important; font-weight: 400; opacity: 1 !important;
2029
+ }
2030
+
2031
+ /* Create popup header row */
2032
+ .xfce-create-hdr {
2033
+ display: flex; align-items: center; gap: 10px;
2034
+ padding: 6px 12px 4px;
2035
+ font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
2036
+ color: var(--muted); cursor: default; pointer-events: none;
2037
+ border-bottom: 1px solid var(--line); margin-bottom: 2px;
2025
2038
  }
2026
2039
 
2027
2040
  /* ── Command Palette ─────────────────────────────────────── */
@@ -2035,7 +2048,9 @@ a.xfce-sb-logo:hover { opacity: .8; }
2035
2048
 
2036
2049
  .xfce-palette-inner {
2037
2050
  width: min(560px, 92vw);
2038
- background: var(--glass-bg, color-mix(in srgb, var(--bg1) 90%, transparent));
2051
+ background: color-mix(in srgb, var(--bg1) 97%, transparent);
2052
+ backdrop-filter: blur(8px) saturate(160%);
2053
+ -webkit-backdrop-filter: blur(8px) saturate(160%);
2039
2054
  border: 1px solid var(--line);
2040
2055
  border-radius: 12px;
2041
2056
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px color-mix(in srgb,var(--accent) 20%,transparent);
@@ -2055,10 +2070,10 @@ a.xfce-sb-logo:hover { opacity: .8; }
2055
2070
  .xfce-palette-hint { font-size: 8px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
2056
2071
 
2057
2072
  .xfce-palette-results {
2058
- max-height: 360px; overflow-y: auto; padding: 6px 0;
2073
+ max-height: 450px; overflow-y: auto; padding: 6px 0;
2059
2074
  }
2060
2075
  .xfce-pal-group {
2061
- font-size: 8px; font-family: var(--mono); color: var(--muted);
2076
+ font-size: 8px; font-family: var(--mono); color: var(--mid);
2062
2077
  letter-spacing: .08em; text-transform: uppercase;
2063
2078
  padding: 8px 14px 4px;
2064
2079
  }
package/public/xfce.js CHANGED
@@ -136,6 +136,8 @@
136
136
 
137
137
  // ── Tools popup ───────────────────────────────────────────────────────
138
138
  var toolsPopup;
139
+ var createPopup;
140
+ var _createCols = [];
139
141
 
140
142
  function buildToolsPopup() {
141
143
  toolsPopup = el('div', 'xfce-tools-popup');
@@ -165,6 +167,42 @@
165
167
  toolsPopup.classList.toggle('open');
166
168
  }
167
169
 
170
+ // ── Create popup (+ button) ───────────────────────────────────────────
171
+ function buildCreatePopup() {
172
+ createPopup = el('div', 'xfce-tools-popup');
173
+ createPopup.id = 'xfce-create-popup';
174
+
175
+ var hdr = el('div', 'xfce-create-hdr');
176
+ hdr.innerHTML = '<span class="xfce-tools-icon" style="font-family:var(--mono);font-size:13px">+</span><span>New entry in…</span>';
177
+ createPopup.appendChild(hdr);
178
+
179
+ _createCols.forEach(function (col) {
180
+ var abbr = col.label.substring(0, 2);
181
+ var isCurrent = (page === 'entries' && activeCol === col.id) || (page === 'editor' && activeCol === col.id);
182
+ var href = col.singleton
183
+ ? '/editor.html?collection=' + encodeURIComponent(col.id) + '&singleton=1'
184
+ : '/editor.html?collection=' + encodeURIComponent(col.id);
185
+ var a = el('a', 'xfce-tools-item' + (isCurrent ? ' active' : ''));
186
+ a.href = href;
187
+ a.innerHTML = '<span class="xfce-tools-icon" style="font-family:var(--mono);font-size:11px">' + abbr + '</span><span>' + col.label + '</span>';
188
+ createPopup.appendChild(a);
189
+ });
190
+
191
+ document.body.appendChild(createPopup);
192
+ document.addEventListener('click', function () { createPopup.classList.remove('open'); });
193
+ document.addEventListener('keydown', function (e) { if (e.key === 'Escape') createPopup.classList.remove('open'); });
194
+ }
195
+
196
+ function toggleCreatePopup() {
197
+ if (!createPopup) buildCreatePopup();
198
+ var btn = document.getElementById('xfce-create-btn');
199
+ if (btn) {
200
+ var rect = btn.getBoundingClientRect();
201
+ createPopup.style.left = Math.round(rect.left + rect.width / 2) + 'px';
202
+ }
203
+ createPopup.classList.toggle('open');
204
+ }
205
+
168
206
  // ── Command Palette ───────────────────────────────────────────────────
169
207
  var palette, paletteInp, paletteResults, palActive = -1;
170
208
 
@@ -745,7 +783,7 @@
745
783
  : page === 'entries' && activeCol === col.id;
746
784
  var abbr = col.label.substring(0, 2);
747
785
  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;';
786
+ item.querySelector('.xfce-dock-icon').style.cssText = 'font-size:11px;font-family:var(--mono);letter-spacing:-.02em;line-height:1;opacity:1;';
749
787
  item.dataset.dockIdx = idx + 1;
750
788
 
751
789
  // Draft badge
@@ -762,13 +800,18 @@
762
800
  _palItems.push({ icon: abbr, label: col.label, href: href, group: 'Collections' });
763
801
  });
764
802
 
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
- }
803
+ // Store for create popup
804
+ _createCols = topLevel;
805
+
806
+ // Always-visible + button opens the create popup
807
+ var createBtn = makeDockItem('+', 'New', null, false, true);
808
+ createBtn.id = 'xfce-create-btn';
809
+ createBtn.classList.add('xfce-dock-create');
810
+ createBtn.addEventListener('click', function (e) {
811
+ e.stopPropagation();
812
+ toggleCreatePopup();
813
+ });
814
+ colGroup.appendChild(createBtn);
772
815
  }
773
816
 
774
817
  // HUD pod section