anentrypoint-design 1.0.15 → 1.0.16
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/dist/247420.css +32 -3
- package/dist/247420.js +28 -28
- package/package.json +1 -1
- package/src/components/shell/app-shell.js +36 -1
- package/src/components/shell/icons.js +1 -0
- package/src/css/app-shell/kits-appended.css +4 -0
- package/src/css/app-shell/primitives.css +2 -2
- package/src/css/app-shell/topbar.css +26 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anentrypoint-design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
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
|
-
|
|
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(--
|
|
20
|
+
background: var(--accent); color: var(--accent-fg);
|
|
21
21
|
font-weight: 700;
|
|
22
22
|
}
|
|
23
|
-
.btn-primary:hover { background: var(--fg); color: var(--
|
|
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; }
|
|
@@ -318,7 +318,13 @@ body.canvas-host { background: transparent !important; }
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
.app-main {
|
|
321
|
-
padding
|
|
321
|
+
/* Bottom padding reserves clearance equal to the status bar's own height so
|
|
322
|
+
the last scrolled child never sits flush behind .app-status (a flex
|
|
323
|
+
sibling pinned below .app-main in the .app column, not a child of it).
|
|
324
|
+
--app-status-h-live tracks the bar's collapsed/expanded state (set by
|
|
325
|
+
the toggle in app-shell.js) and falls back to the full bar height when
|
|
326
|
+
unset (bar starts expanded / JS hasn't run yet). */
|
|
327
|
+
padding: var(--space-5) var(--pad-x) var(--app-status-h-live, var(--app-status-h));
|
|
322
328
|
min-width: 0;
|
|
323
329
|
/* Full-height flex column so a single flex:1 child (e.g. .chat) fills the
|
|
324
330
|
region between crumb and status instead of floating at content height. */
|
|
@@ -466,6 +472,25 @@ body.canvas-host { background: transparent !important; }
|
|
|
466
472
|
agent target) drop in priority order instead of breaking mid-word onto a
|
|
467
473
|
second line. */
|
|
468
474
|
.app-status { flex-wrap: nowrap; overflow: hidden; }
|
|
475
|
+
|
|
476
|
+
/* Collapse control — the status bar permanently claims --app-status-h of
|
|
477
|
+
viewport on every page; this toggle lets it shrink to a thin reachable
|
|
478
|
+
strip instead. The bar itself stays a fixed-height flex child (never
|
|
479
|
+
display:none) so the toggle remains reachable to re-expand. */
|
|
480
|
+
.app-status-toggle {
|
|
481
|
+
flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
|
|
482
|
+
width: 18px; height: 18px; padding: 0; margin-right: var(--space-1);
|
|
483
|
+
background: transparent; border: none; color: var(--fg-3); cursor: pointer;
|
|
484
|
+
border-radius: var(--r-0);
|
|
485
|
+
}
|
|
486
|
+
.app-status-toggle:hover { color: var(--fg); background: var(--bg-3); }
|
|
487
|
+
.app-status-toggle:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
|
|
488
|
+
.app-status.is-collapsed {
|
|
489
|
+
height: var(--space-4); min-height: var(--space-4);
|
|
490
|
+
overflow: hidden;
|
|
491
|
+
}
|
|
492
|
+
.app-status.is-collapsed .item,
|
|
493
|
+
.app-status.is-collapsed .spread { display: none; }
|
|
469
494
|
@media (max-width: 1100px) {
|
|
470
495
|
.app-status .item:last-of-type:not(:only-of-type) { display: none; }
|
|
471
496
|
}
|