anentrypoint-design 1.0.15 → 1.0.17

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": "anentrypoint-design",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
5
5
  "type": "module",
6
6
  "main": "./dist/247420.js",
@@ -151,8 +151,43 @@ export function Side({ sections = [] } = {}) {
151
151
  }));
152
152
  }
153
153
 
154
+ // Collapse state persists per-origin so the choice survives navigation
155
+ // between kit pages (the status bar is chrome, not per-page content).
156
+ const STATUS_COLLAPSE_KEY = 'ds-status-collapsed';
157
+ function isStatusCollapsed() {
158
+ try { return localStorage.getItem(STATUS_COLLAPSE_KEY) === '1'; } catch (_) { return false; }
159
+ }
160
+ function toggleStatusCollapsed(fromEl) {
161
+ const app = fromEl && fromEl.closest && fromEl.closest('.app');
162
+ const bar = app && app.querySelector('.app-status');
163
+ if (!bar) return;
164
+ const next = !bar.classList.contains('is-collapsed');
165
+ bar.classList.toggle('is-collapsed', next);
166
+ const btn = bar.querySelector('.app-status-toggle');
167
+ if (btn) btn.setAttribute('aria-expanded', next ? 'false' : 'true');
168
+ // .app-main's bottom padding mirrors the bar's real height via this var
169
+ // (set on .app, read by .app-main's padding-bottom) so collapsing frees
170
+ // the reserved clearance instead of leaving a dead gap.
171
+ if (app) app.style.setProperty('--app-status-h-live', next ? 'var(--space-4)' : 'var(--app-status-h)');
172
+ try { localStorage.setItem(STATUS_COLLAPSE_KEY, next ? '1' : '0'); } catch (_) { /* private mode: state just won't persist */ }
173
+ }
174
+
154
175
  export function Status({ left = [], right = [] } = {}) {
155
- return h('footer', { class: 'app-status', role: 'contentinfo' },
176
+ const collapsed = isStatusCollapsed();
177
+ // Sync .app-main's reserved clearance to the persisted collapse state on
178
+ // first render, matching what toggleStatusCollapsed sets on click -- the
179
+ // ref runs on mount, before paint, so there's no expanded-then-collapse flash.
180
+ const syncLiveVar = (el) => {
181
+ if (!el) return;
182
+ const app = el.closest('.app');
183
+ if (app) app.style.setProperty('--app-status-h-live', collapsed ? 'var(--space-4)' : 'var(--app-status-h)');
184
+ };
185
+ return h('footer', { class: 'app-status' + (collapsed ? ' is-collapsed' : ''), role: 'contentinfo', ref: syncLiveVar },
186
+ h('button', {
187
+ class: 'app-status-toggle', type: 'button',
188
+ 'aria-label': 'toggle status bar', 'aria-expanded': collapsed ? 'false' : 'true',
189
+ onclick: (e) => toggleStatusCollapsed(e.currentTarget),
190
+ }, Icon(collapsed ? 'chevron-up' : 'chevron-down', { size: 12 })),
156
191
  ...left.map((t, i) => h('span', { key: 'l' + i, class: 'item' }, t)),
157
192
  h('span', { key: 'spread', class: 'spread', 'aria-hidden': 'true' }),
158
193
  ...right.map((t, i) => h('span', { key: 'r' + i, class: 'item' }, t))
@@ -20,6 +20,7 @@ export const ICON_PATHS = {
20
20
  screen: '<rect x="3" y="4" width="18" height="13" rx="2"/><path d="M8 21h8M12 17v4"/>',
21
21
  phone: '<path d="M5 4h3l2 5-2 1a11 11 0 0 0 5 5l1-2 5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z"/>',
22
22
  members: '<circle cx="9" cy="8" r="3"/><path d="M3 20a6 6 0 0 1 12 0M16 6a3 3 0 0 1 0 6M21 20a6 6 0 0 0-4-5.7"/>',
23
+ user: '<circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/>',
23
24
  menu: '<path d="M4 6h16M4 12h16M4 18h16"/>',
24
25
  settings: '<circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M2 12h3M19 12h3M4.9 19.1 7 17M17 7l2.1-2.1"/>',
25
26
  paperclip: '<path d="M21 11.5 12.5 20a5 5 0 0 1-7-7l8-8a3.5 3.5 0 0 1 5 5l-8 8a2 2 0 0 1-3-3l7.5-7.5"/>',
@@ -280,6 +280,10 @@
280
280
  }
281
281
  .ds-err-numeral {
282
282
  font-family: var(--ff-mono); font-size: clamp(56px, 20vw, 120px);
283
+ /* Shares the headline's weight (base.css h1: font-weight:600) so the two
284
+ most important elements on the page read as one weight relationship
285
+ instead of a thin numeral against a bold headline. */
286
+ font-weight: 600;
283
287
  line-height: 1; color: var(--panel-text-3); letter-spacing: -0.03em;
284
288
  }
285
289
  .ds-err-path {
@@ -17,10 +17,10 @@
17
17
  .btn { background: var(--bg-2); color: var(--fg); border-color: var(--rule); }
18
18
  .btn:hover { background: var(--bg-3); color: var(--fg); transform: translateY(-1px); box-shadow: var(--shadow-1); }
19
19
  .btn-primary {
20
- background: var(--green); color: var(--on-color);
20
+ background: var(--accent); color: var(--accent-fg);
21
21
  font-weight: 700;
22
22
  }
23
- .btn-primary:hover { background: var(--fg); color: var(--green); transform: translateY(-1px); box-shadow: var(--shadow-2); }
23
+ .btn-primary:hover { background: var(--fg); color: var(--bg); transform: translateY(-1px); box-shadow: var(--shadow-2); }
24
24
  .btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
25
25
  .btn-ghost:hover { background: color-mix(in oklab, var(--fg) 12%, transparent); transform: translateY(-1px); }
26
26
  .btn:active, .btn-primary:active, .btn-ghost:active { transform: translateY(1px); box-shadow: none; }
@@ -222,6 +222,12 @@ body.canvas-host { background: transparent !important; }
222
222
  .app-side-shell {
223
223
  background: var(--bg); overflow-y: auto; min-height: 0;
224
224
  scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent;
225
+ /* A visible-only-while-scrolled thin scrollbar was the sole cue that this
226
+ and .app-main are two independent scroll regions -- easy to miss,
227
+ reading as a layout glitch (sidebar not moving) rather than an
228
+ intentional split view. A permanent hairline border reads at a glance
229
+ regardless of scroll/hover state. */
230
+ border-right: 1px solid var(--rule);
225
231
  /* Bottom-edge fade: a rail longer than the viewport otherwise shows only
226
232
  the thin scrollbar track as its sole "there is more below" cue. Mirrors
227
233
  the horizontal fade already used by .os-instances (src/kits/os/theme.css)
@@ -318,7 +324,13 @@ body.canvas-host { background: transparent !important; }
318
324
  }
319
325
 
320
326
  .app-main {
321
- padding: var(--space-5) var(--pad-x) 0;
327
+ /* Bottom padding reserves clearance equal to the status bar's own height so
328
+ the last scrolled child never sits flush behind .app-status (a flex
329
+ sibling pinned below .app-main in the .app column, not a child of it).
330
+ --app-status-h-live tracks the bar's collapsed/expanded state (set by
331
+ the toggle in app-shell.js) and falls back to the full bar height when
332
+ unset (bar starts expanded / JS hasn't run yet). */
333
+ padding: var(--space-5) var(--pad-x) var(--app-status-h-live, var(--app-status-h));
322
334
  min-width: 0;
323
335
  /* Full-height flex column so a single flex:1 child (e.g. .chat) fills the
324
336
  region between crumb and status instead of floating at content height. */
@@ -466,6 +478,25 @@ body.canvas-host { background: transparent !important; }
466
478
  agent target) drop in priority order instead of breaking mid-word onto a
467
479
  second line. */
468
480
  .app-status { flex-wrap: nowrap; overflow: hidden; }
481
+
482
+ /* Collapse control — the status bar permanently claims --app-status-h of
483
+ viewport on every page; this toggle lets it shrink to a thin reachable
484
+ strip instead. The bar itself stays a fixed-height flex child (never
485
+ display:none) so the toggle remains reachable to re-expand. */
486
+ .app-status-toggle {
487
+ flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
488
+ width: 18px; height: 18px; padding: 0; margin-right: var(--space-1);
489
+ background: transparent; border: none; color: var(--fg-3); cursor: pointer;
490
+ border-radius: var(--r-0);
491
+ }
492
+ .app-status-toggle:hover { color: var(--fg); background: var(--bg-3); }
493
+ .app-status-toggle:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
494
+ .app-status.is-collapsed {
495
+ height: var(--space-4); min-height: var(--space-4);
496
+ overflow: hidden;
497
+ }
498
+ .app-status.is-collapsed .item,
499
+ .app-status.is-collapsed .spread { display: none; }
469
500
  @media (max-width: 1100px) {
470
501
  .app-status .item:last-of-type:not(:only-of-type) { display: none; }
471
502
  }