anentrypoint-design 1.0.13 → 1.0.15
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 +20 -12
- package/dist/247420.js +26 -26
- package/package.json +1 -1
- package/src/components/shell/app-shell.js +12 -10
- package/src/css/app-shell/catalog-theme.css +6 -10
- package/src/css/app-shell/topbar.css +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anentrypoint-design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
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",
|
|
@@ -15,9 +15,18 @@ const h = webjsx.createElement;
|
|
|
15
15
|
// call site having to remember to wire ThemeToggle() in by hand. Pass
|
|
16
16
|
// `themeToggle: false` to opt a shell out (e.g. a kit that renders its own).
|
|
17
17
|
export function Topbar({ brand = '247420', leaf = '', items = [], active = '', onNav, search, themeToggle = true } = {}) {
|
|
18
|
+
// `search` is either a plain placeholder string (Topbar renders the
|
|
19
|
+
// default uncontrolled input itself, and owns the icon below) or a
|
|
20
|
+
// caller-built VElement (has .type/.props — e.g. SearchInput(), a
|
|
21
|
+
// component that already renders its own icon + input + clear button).
|
|
22
|
+
// A VElement renders as-is with NO extra wrapper: SearchInput's own
|
|
23
|
+
// markup already covers the icon and the field, so wrapping it in
|
|
24
|
+
// Topbar's own '.app-search' icon+label previously doubled the search
|
|
25
|
+
// glyph (one from Topbar, one from inside SearchInput).
|
|
26
|
+
const isElement = search && typeof search === 'object' && 'type' in search;
|
|
18
27
|
return h('header', { class: 'app-topbar', role: 'banner' },
|
|
19
28
|
Brand({ name: brand, leaf }),
|
|
20
|
-
search ? h('label', { class: 'app-search' },
|
|
29
|
+
isElement ? search : (search ? h('label', { class: 'app-search' },
|
|
21
30
|
// Line-icon, not the literal word "search" as a pseudo-glyph: the
|
|
22
31
|
// text stand-in inherited .app-search .icon's 0.6 opacity, which
|
|
23
32
|
// dropped --fg-3 to 3.74:1 on --bg-2 and failed AA as real text.
|
|
@@ -25,15 +34,8 @@ export function Topbar({ brand = '247420', leaf = '', items = [], active = '', o
|
|
|
25
34
|
// contrast rule no longer applies to it and the affordance stops
|
|
26
35
|
// depending on a colour value at all.
|
|
27
36
|
h('span', { class: 'icon', 'aria-hidden': 'true' }, Icon('search', { size: 15 })),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// .type/.props — e.g. a controlled <input> wired to app state)
|
|
31
|
-
// rendered as-is. Stringifying a VElement into placeholder/
|
|
32
|
-
// aria-label previously produced literal "[object Object]" text.
|
|
33
|
-
(search && typeof search === 'object' && 'type' in search)
|
|
34
|
-
? search
|
|
35
|
-
: h('input', { type: 'search', name: 'q', placeholder: search, 'aria-label': `search ${search}` })
|
|
36
|
-
) : null,
|
|
37
|
+
h('input', { type: 'search', name: 'q', placeholder: search, 'aria-label': `search ${search}` })
|
|
38
|
+
) : null),
|
|
37
39
|
h('nav', { 'aria-label': 'main navigation' }, ...items.map(([label, href]) => {
|
|
38
40
|
const cleanLabel = String(label).replace(' ->', '');
|
|
39
41
|
return h('a', {
|
|
@@ -143,16 +143,12 @@
|
|
|
143
143
|
font-family: var(--ff-mono); font-size: var(--fs-xs);
|
|
144
144
|
display: inline-flex; align-items: center; gap: 6px;
|
|
145
145
|
}
|
|
146
|
-
/* CSS-drawn disc mark on the compact theme toggle:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
border: var(--bw-hair) solid var(--fg-3);
|
|
153
|
-
/* auto: half-and-half, matches default (no data-mode) for safety */
|
|
154
|
-
background: linear-gradient(90deg, var(--fg-3) 0 50%, transparent 50% 100%);
|
|
155
|
-
}
|
|
146
|
+
/* CSS-drawn disc mark on the compact theme toggle: legibility fallback for
|
|
147
|
+
when BOTH the SVG glyph and text label are hidden (icon-only rail strip).
|
|
148
|
+
The glyph (.ds-theme-toggle-icon) already conveys mode whenever it is
|
|
149
|
+
visible, so the disc stays hidden alongside it and only shows in the
|
|
150
|
+
rail-collapsed state where responsive2-workspace.css hides the icon too. */
|
|
151
|
+
.ds-theme-disc { display: none; }
|
|
156
152
|
.ds-theme-disc[data-mode="auto"] {
|
|
157
153
|
background: linear-gradient(90deg, var(--fg-3) 0 50%, transparent 50% 100%);
|
|
158
154
|
}
|
|
@@ -79,6 +79,14 @@ body.canvas-host { background: transparent !important; }
|
|
|
79
79
|
.app-chrome > .app-crumb > .crumb-right { margin-left: auto; }
|
|
80
80
|
.app-topbar > .brand { flex: 0 0 auto; }
|
|
81
81
|
.app-topbar > .app-search { flex: 1 1 auto; }
|
|
82
|
+
/* SearchInput() passed directly as Topbar's search prop renders with no
|
|
83
|
+
Topbar-owned wrapper (see Topbar's isElement branch). Its own outer span
|
|
84
|
+
(.ds-search-input-wrap) is display:contents, so .ds-search-field becomes
|
|
85
|
+
the actual direct .app-topbar flex-item child — an inline-flex box that
|
|
86
|
+
otherwise shrinks to its content and starves the input's own width:100%
|
|
87
|
+
of anything to grow into, truncating the placeholder. Matches
|
|
88
|
+
.app-search's flex-basis above so both search-slot shapes size the same. */
|
|
89
|
+
.app-topbar > .ds-search-field { flex: 1 1 auto; max-width: 360px; min-width: 0; }
|
|
82
90
|
.app-topbar > nav { margin-left: auto; }
|
|
83
91
|
/* Utility cluster grouping: the theme toggle sits after the repo-info nav
|
|
84
92
|
links with no visual separation between the two groups, so the row read
|
|
@@ -410,8 +418,12 @@ body.canvas-host { background: transparent !important; }
|
|
|
410
418
|
1400-2200px viewport band (matches .ws-shell's 1920px ultrawide cap below)
|
|
411
419
|
instead of freezing at 1400px and leaving >1000px dead margin on a 2560px+
|
|
412
420
|
display. Row/prose measure caps (--measure-wide etc.) still own line-length
|
|
413
|
-
readability, so widening the shell itself does not create unreadable rows.
|
|
414
|
-
|
|
421
|
+
readability, so widening the shell itself does not create unreadable rows.
|
|
422
|
+
100vw (not 92vw): a stock 1920px monitor sat at 92vw = 1766px, leaving a
|
|
423
|
+
visible ~154px dead margin on the single most common desktop resolution —
|
|
424
|
+
the ceiling now reaches full width exactly at 1920px instead of falling
|
|
425
|
+
short of it. */
|
|
426
|
+
.app { max-width: clamp(1400px, 100vw, 1920px); margin-left: auto; margin-right: auto; }
|
|
415
427
|
.app-main .chat,
|
|
416
428
|
.app-main > .chat-area,
|
|
417
429
|
.app-main > .main-content { max-width: none; margin: 0; width: 100%; }
|