@gemboss/ui 0.46.0 → 0.47.0
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/CHANGELOG.md +35 -0
- package/README.md +24 -1
- package/catalog/editor.html +1 -1
- package/catalog/index.html +1 -1
- package/gemboss-ui.css +2 -2
- package/package.json +5 -1
- package/parts/components.css +1 -1
- package/parts/core.css +1 -1
- package/parts/shell.css +1 -1
- package/src/assistant-plain.js +1 -1
- package/src/index.ts +2 -0
- package/src/logo-sheet.css +1 -0
- package/src/logo-sheet.tsx +63 -0
- package/src/question-card.css +1 -1
- package/src/question-card.tsx +19 -4
- package/src/session-rail-plain.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
Versions up to 0.9.0 are described in the README, each in the section that introduced it.
|
|
4
4
|
|
|
5
|
+
## 0.47.0 (21/10/2026)
|
|
6
|
+
|
|
7
|
+
**A choice made by looking, and a logo sheet** (GemBoss Brand › Logo, 21/10/2026: the seller picks one of three AI logos from
|
|
8
|
+
GemMedia, sees each the way it will be used, and confirms one).
|
|
9
|
+
|
|
10
|
+
Added
|
|
11
|
+
- `QuestionCard`: a choice's `media` (a picture across the top of the choice, before its dot and words), `layout="tiles"`
|
|
12
|
+
(the choices side by side, as many as fit at 200px: three on a card, one on a phone) and a choice's `disabled` (shown greyed,
|
|
13
|
+
its radio off, never the confirmed value: the confirm stays off while a disabled choice is the value). Rows stay the default.
|
|
14
|
+
`question-card.css` +3 rules (`.ui-qcard__media`, `.ui-qcard--tiles …`), within its ceiling.
|
|
15
|
+
- `LogoSheet` (`packages/ui/src/logo-sheet.tsx`, `@gemboss/ui/logo-sheet.css`, its own entry): the mark on a checkerboard, the
|
|
16
|
+
name lockup on a light and on a dark header, the favicon at its real 32px beside the name. Spans and images only, so it sits
|
|
17
|
+
inside a choice. 0.5 KB gzip minified (ceiling 1,057 in `weight-budget.json`).
|
|
18
|
+
- `logo-sheet.test.tsx`, and `question-card.test.tsx` for tiles and a disabled choice.
|
|
19
|
+
|
|
20
|
+
**The thread rail for a page with no React** (GemFactory's full-screen Factory Assistant, 21/10/2026: the plain frame had no
|
|
21
|
+
way back to an earlier conversation).
|
|
22
|
+
|
|
23
|
+
Added
|
|
24
|
+
- `session-rail-plain.js`, `gembossUI.sessionRail(opts)` → `{ el, update, focusSearch, destroy }`: `SessionRail` in ES5, the
|
|
25
|
+
same markup and classes, the same search (marks folded), recency groups, inline rename, ⋯ menu and two-step delete; the
|
|
26
|
+
helpers as `gembossUI.assistantSessions` (`relativeTime`, `normalizeForSearch`, `groupSessions`). With no
|
|
27
|
+
`onToggleCollapsed` it keeps its own collapse, in localStorage under `storageKey`. Its own entry: 4.5 KB gzip minified
|
|
28
|
+
(ceiling 5,115 in `weight-budget.json`).
|
|
29
|
+
- `assistantFrame({ rail })`: the admin's `AssistantWorkspaceLayout` around the body (the rail in full screen only,
|
|
30
|
+
`is-dock` in every other shape, the body never moved) and `frame.setSwitching(on)`. Without `rail` the frame's markup is
|
|
31
|
+
as before. `assistant-plain.js` stays inside its ceiling.
|
|
32
|
+
- `gembossUI.fullChromeRoom(chatEl)` (`assistant-plain.js`): `chat.tsx`'s `useFullChromeRoom` for a page with no React. In full
|
|
33
|
+
screen the frame's floated buttons sat over the first message of a chat column (GemFactory `/assistant` with the rail, 1440);
|
|
34
|
+
how far they reach into the `.gb-chat` is written as `--gb-chat-chrome-w` / `-h` + `data-chrome`, which assistant-chat.css
|
|
35
|
+
already pads by. Cleared outside full screen and when they do not overlap.
|
|
36
|
+
- `assistant-plain-browser.test.ts`: the helpers against `sessions.tsx`; in Chromium the plain rail against `SessionRail`
|
|
37
|
+
over 20 steps at 1440 and 900 (the tree, the focus, the menu's place and every callback after each), the framed layout
|
|
38
|
+
against `AssistantHost` + `AssistantWorkspaceLayout` over 10 shapes, and two negative controls.
|
|
39
|
+
|
|
5
40
|
## 0.46.0 (21/10/2026)
|
|
6
41
|
|
|
7
42
|
**`.gemboss-page-section-content` is gone** (gemboss one panel P2b, 21/10/2026).
|
package/README.md
CHANGED
|
@@ -80,6 +80,7 @@ its CSS out of the build with it (`sideEffects`). gzip of the minified file, as
|
|
|
80
80
|
| range-bar | `@gemboss/ui/range-bar.css` | `packages/ui/src/range-bar.css` | `RangeBar`: a value against a market's spread on one axis (0.43.0) | 0.6 KB | `RangeBar` imports it |
|
|
81
81
|
| progress-ring | `@gemboss/ui/progress-ring.css` | `packages/ui/src/progress-ring.css` | `ProgressRing`: "3 of 5" as a ring (0.43.0) | 0.2 KB | `ProgressRing` imports it |
|
|
82
82
|
| spot-art | `@gemboss/ui/spot-art.css` | `packages/ui/src/spot-art.css` | `SpotArt`: six brand pictures for pauses and empty states (0.43.0) | 0.4 KB | `SpotArt` imports it |
|
|
83
|
+
| logo-sheet | `@gemboss/ui/logo-sheet.css` | `packages/ui/src/logo-sheet.css` | `LogoSheet`: one logo as a person judges it, the mark on a checkerboard, the lockup on a light and a dark header, the favicon at its real 32px (unreleased) | 0.5 KB | `LogoSheet` imports it |
|
|
83
84
|
| bundle | `@gemboss/ui/gemboss-ui.css` | `gemboss-ui.css` | core + components + shell + auth + assistant + chat + portal + theme-dark | 21.9 KB | compatibility only (see CHANGELOG 0.23.0) |
|
|
84
85
|
|
|
85
86
|
The core alone is 14.7 KB against 21.7 for the bundle (each part opens with a short header naming the gemboss commit, kept through minify, so a surface serving the parts can still say which commit its CSS is); a list page adds collections (4.6), a sign-in page auth (2.6).
|
|
@@ -333,7 +334,27 @@ The page reloads on every click, so the frame keeps the shape on screen for the
|
|
|
333
334
|
`<prefix>.presentation`, `keepAcrossPages: false` to turn it off): open on one page, open on the next. A run does not
|
|
334
335
|
survive the reload, and leaving the full-screen page leaves the status bar, as `leave-full` does. The full-screen page
|
|
335
336
|
is yours (`fullHref`); the frame enters full there by itself. `launchers` are hidden while the frame is up and open it.
|
|
336
|
-
Not in the plain frame yet: `secondTab
|
|
337
|
+
Not in the plain frame yet: `secondTab`, page facts and the popup's open-chat tabs (`OpenChatTabs`).
|
|
338
|
+
|
|
339
|
+
**The thread rail, with no React (0.47.0): `session-rail-plain.js`.** `SessionRail` for the same pages: the same
|
|
340
|
+
markup and classes (shell.css draws both), the search box (case and Vietnamese marks folded), the recency groups, inline
|
|
341
|
+
rename, the ⋯ menu and its two-step delete. The sessions, and what opening, renaming, pinning or deleting one does, stay
|
|
342
|
+
the page's. Hand it to the frame as `rail` and the frame builds the admin's `AssistantWorkspaceLayout` around the body:
|
|
343
|
+
the rail in full screen only, `is-dock` in the popup and the panel, the body never moved. `frame.setSwitching(true)` dims
|
|
344
|
+
the page while the next thread loads; `gembossUI.fullChromeRoom(chatEl)` keeps the first message out from under the
|
|
345
|
+
full-screen buttons (as `useFullChromeRoom` does for `AssistantChat`). The rail is its own file and its own ceiling (4.5 KB gzip), so a page with no full-screen
|
|
346
|
+
assistant does not pay for it. `assistant-plain-browser.test.ts` holds it to `SessionRail` over 20 steps (typing, Escape,
|
|
347
|
+
the menu, rename, pin, delete, collapse, an empty list) and the framed layout to `AssistantHost` + `AssistantWorkspaceLayout`.
|
|
348
|
+
|
|
349
|
+
```html
|
|
350
|
+
<script src="kit-plain.js"></script><script src="session-rail-plain.js"></script><script src="assistant-plain.js"></script>
|
|
351
|
+
<script>
|
|
352
|
+
const rail = gembossUI.sessionRail({ sessions, activeId, onNewChat, onOpen: openThread, onRename: rename,
|
|
353
|
+
onDelete: remove, titleMaxLength: 120, storageKey: "gemfactory.assistant.railCollapsed" });
|
|
354
|
+
const frame = gembossUI.assistantFrame({ title: "Factory Assistant", body: chatElement, rail, fullHref: "/assistant" });
|
|
355
|
+
rail.update({ sessions: fresh, activeId: id }); // after a turn, a rename, a delete
|
|
356
|
+
</script>
|
|
357
|
+
```
|
|
337
358
|
|
|
338
359
|
## The engine picker (0.25.0): `EnginePicker`, `BridgeNotice`
|
|
339
360
|
|
|
@@ -2456,6 +2477,8 @@ entry, each presentational and server-renderable (no state, no effect):
|
|
|
2456
2477
|
| `RangeBar` | a value against a market's spread on one axis: `band` (where half of it sits), `mid`, `you`, `ticks`. `size="sm"` is the shape for a metric tile; `size="lg"` adds the labels. The surface passes the words and the numbers (`labels`, `format`): the bar does no money maths. `rangeBarGeometry` is the pure part, for a plain-HTML page. |
|
|
2457
2478
|
| `ProgressRing` | "3 of 5" as a ring with the count inside. `progressRingGeometry` is the pure arc. A `max` that is not a positive number is an empty ring, never NaN. |
|
|
2458
2479
|
| `SpotArt` | six pictures in the brand's gem drawing style (`gem-radar`, `orbit`, `people`, `page`, `plug`, `price`) for the pauses and empty states a text-only screen lacks. Painted by tokens, decorative by default, an image only when given a `title`. |
|
|
2480
|
+
| `QuestionCard` choices made by looking (unreleased) | a choice's `media` is a picture across the top of it (spans and images: the choice is a `<label>`), `layout="tiles"` puts the choices side by side (three on a card, one column on a phone), and a choice's `disabled` shows it greyed with its radio off (an option that failed its checks: seen, not choosable); the confirm stays off while a disabled choice is the value. GemBoss Brand › Logo is the first surface: three AI logos, one confirmed. |
|
|
2481
|
+
| `LogoSheet` (unreleased) | one logo the way it has to be judged before it becomes a store's: the mark on a checkerboard (a white box around it shows), the name lockup on a light header and on a dark one (`lockup`, `lockupDark`), and the favicon at 32 × 32 CSS px beside the name, as a tab shows it. Every picture is a file the surface already has; nothing is drawn or scaled. Spans only, so it can be a `QuestionCard` choice's `media`. |
|
|
2459
2482
|
| `question-card.css`, `briefing-card.css`, `range-bar.css`, `progress-ring.css`, `spot-art.css` | one entry each, loaded by its component; a plain-HTML surface links `@gemboss/ui/<name>.css` and writes the classes listed at the top of each file |
|
|
2460
2483
|
|
|
2461
2484
|
Three lighter steps of iris came with them, because a wash, a band and an art stroke need more than `--gemboss-accent-soft`:
|
package/catalog/editor.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.cat-code summary{padding:10px 16px;font-size:13px;cursor:pointer;color:var(--gemboss-text-muted);border-top:1px solid var(--gemboss-divider);min-height:24px}
|
|
9
9
|
.cat-code pre,.cat-api{margin:0;padding:12px 16px;overflow:auto;background:#0f1012;color:#e8e8e6;font-size:12px;line-height:1.5;border-radius:0}
|
|
10
10
|
.cat-api{border-radius:12px;margin:0 0 16px}</style></head><body><div class="cat">
|
|
11
|
-
<h1>@gemboss/ui 0.
|
|
11
|
+
<h1>@gemboss/ui 0.47.0 · Editor</h1>
|
|
12
12
|
<p>Khung của mọi editor: <code>EditorFrame</code> (cột trái · khe kéo · preview · cột phải dock trên mép phải preview) và <code>EditorTopbar</code> (← · tiêu đề · cụm giữa · cụm phải · dòng trạng thái). Là đúng khung của theme / page / section editor trong admin. Gói chỉ vẽ KHUNG; chat, Configure, canvas, page picker, menu, Publish là của editor, đi vào bằng slot. Trang HTML thuần nạp <code>editor.css</code> + <code>editor-plain.js</code> rồi gọi <code>gembossUI.initEditorFrame()</code>: kéo khe (chuột, chạm, phím mũi tên / Home / End), đổi thiết bị, mở ⋯ và Publish ▾, ẩn cột trái, Chat | Preview trên điện thoại. <a href="index.html">← Catalog</a></p>
|
|
13
13
|
<h2>React</h2><pre class="cat-api"><code>import "@gemboss/ui/editor.css";
|
|
14
14
|
import { EditorFrame, EditorTopbar, EditorBack, EditorChatToggle, EditorPaneTabs, EditorSaveState, DeviceToggle } from "@gemboss/ui/editor";
|
package/catalog/index.html
CHANGED
|
@@ -27,7 +27,7 @@ body{margin:0;background:var(--gemboss-app-bg,#f1f1f1);color:var(--gemboss-text)
|
|
|
27
27
|
@media (max-width:760px){.cat{grid-template-columns:1fr;padding:16px}.cat-nav{position:static;flex-direction:row;flex-wrap:wrap}}
|
|
28
28
|
</style></head><body>
|
|
29
29
|
<div class="cat"><nav class="cat-nav" aria-label="Mục"><a href="#tokens">Token</a><a href="#buttons">Nút</a><a href="#fields">Ô nhập</a><a href="#choice">Tab, nhóm nút, thẻ</a><a href="#surfaces">Thẻ, số liệu, bảng, trạng thái trống</a><a href="#report">Báo cáo</a><a href="#collections">Bảng, list, lưới, board</a><a href="#resizer">Thanh kéo giữa hai cột</a><a href="#modal">Hộp thoại, toast, menu (JS thuần)</a><a href="#sheet">Ngăn trượt cạnh phải</a><a href="#reader">Hộp đọc tài liệu</a><a href="#settings">Hộp cài đặt</a><a href="#switcher">Chuyển dịch vụ</a><a href="#shell">Khung app</a><a href="#nav">Chờ điều hướng</a><a href="#page">Bề rộng nội dung</a><a href="#portal">Cổng công khai: tab trên topbar, tìm kiếm, sáng / tối, người dẫn đầu</a><a href="#site">Trang công khai: thanh trên, logo cỡ site, nút, chân trang</a><a href="#auth">Đăng nhập</a><a href="#setup">Hướng dẫn thiết lập</a><a href="#chat">Thân chat</a><a href="#reactions">Reactions</a><a href="#team-chat">Chat đội</a><a href="#action-card">Thẻ hành động</a><a href="#assistant-engine">Trợ lý: chọn engine</a><a href="#assistant-bridge">Trợ lý: cầu nối trên máy (0.32.0)</a><a href="#assistant-chat">Trợ lý: khung chat (0.29.0)</a><a href="#assistant">Trợ lý: cột phiên</a><a href="#icons">Icon</a><a href="#editor">Editor</a></nav>
|
|
30
|
-
<main><header class="cat-head"><h1>@gemboss/ui 0.
|
|
30
|
+
<main><header class="cat-head"><h1>@gemboss/ui 0.47.0</h1><p>Ngôn ngữ thiết kế chung của các công cụ GemBoss. Markup dưới mỗi ví dụ là đúng thứ package render ra; bề mặt không dùng React (HTML tĩnh, Python) chép markup này và nạp <code>gemboss-ui.css</code>. Dựng từ gemboss <code>0f08408af446</code>.</p></header>
|
|
31
31
|
<section id="tokens"><h2>Token</h2><p>Đổi giao diện một bề mặt bằng cách đặt lại token, không viết đè class. Tên và giá trị đọc thẳng từ gemboss-ui.css.</p><div class="cat-swatches"><div class="cat-swatch"><i style="background:var(--gemboss-primary)"></i><code>--gemboss-primary</code><span>#1b1c1e</span></div><div class="cat-swatch"><i style="background:var(--gemboss-primary-dark)"></i><code>--gemboss-primary-dark</code><span>#000000</span></div><div class="cat-swatch"><i style="background:var(--gemboss-primary-soft)"></i><code>--gemboss-primary-soft</code><span>#f2f3f5</span></div><div class="cat-swatch"><i style="background:var(--gemboss-accent)"></i><code>--gemboss-accent</code><span>#5661f5</span></div><div class="cat-swatch"><i style="background:var(--gemboss-accent-strong)"></i><code>--gemboss-accent-strong</code><span>#3a44de</span></div><div class="cat-swatch"><i style="background:var(--gemboss-accent-soft)"></i><code>--gemboss-accent-soft</code><span>#eef0fe</span></div><div class="cat-swatch"><i style="background:var(--gemboss-accent-wash)"></i><code>--gemboss-accent-wash</code><span>#f7f8ff</span></div><div class="cat-swatch"><i style="background:var(--gemboss-accent-tint)"></i><code>--gemboss-accent-tint</code><span>#dfe2ff</span></div><div class="cat-swatch"><i style="background:var(--gemboss-accent-mid)"></i><code>--gemboss-accent-mid</code><span>#c9cffd</span></div><div class="cat-swatch"><i style="background:var(--gemboss-text-strong)"></i><code>--gemboss-text-strong</code><span>#1b1c1e</span></div><div class="cat-swatch"><i style="background:var(--gemboss-text)"></i><code>--gemboss-text</code><span>#1b1c1e</span></div><div class="cat-swatch"><i style="background:var(--gemboss-text-muted)"></i><code>--gemboss-text-muted</code><span>#686b71</span></div><div class="cat-swatch"><i style="background:var(--gemboss-surface)"></i><code>--gemboss-surface</code><span>#ffffff</span></div><div class="cat-swatch"><i style="background:var(--gemboss-canvas)"></i><code>--gemboss-canvas</code><span>#ffffff</span></div><div class="cat-swatch"><i style="background:var(--gemboss-preview-canvas)"></i><code>--gemboss-preview-canvas</code><span>#eceef1</span></div><div class="cat-swatch"><i style="background:var(--gemboss-rail-bg)"></i><code>--gemboss-rail-bg</code><span>#ffffff</span></div><div class="cat-swatch"><i style="background:var(--gemboss-panel-bg)"></i><code>--gemboss-panel-bg</code><span>#ffffff</span></div><div class="cat-swatch"><i style="background:var(--gemboss-divider)"></i><code>--gemboss-divider</code><span>#e5e7ea</span></div><div class="cat-swatch"><i style="background:var(--gemboss-divider-soft)"></i><code>--gemboss-divider-soft</code><span>#edeff2</span></div><div class="cat-swatch"><i style="background:var(--gemboss-hover)"></i><code>--gemboss-hover</code><span>#eceef2</span></div><div class="cat-swatch"><i style="background:var(--gemboss-active-bg)"></i><code>--gemboss-active-bg</code><span>#f0f1f4</span></div><div class="cat-swatch"><i style="background:var(--gemboss-active-fg)"></i><code>--gemboss-active-fg</code><span>#1b1c1e</span></div><div class="cat-swatch"><i style="background:var(--gemboss-danger)"></i><code>--gemboss-danger</code><span>#d72c0d</span></div><div class="cat-swatch"><i style="background:var(--gemboss-danger-strong)"></i><code>--gemboss-danger-strong</code><span>#b42318</span></div><div class="cat-swatch"><i style="background:var(--gemboss-danger-soft)"></i><code>--gemboss-danger-soft</code><span>#fff0e9</span></div><div class="cat-swatch"><i style="background:var(--gemboss-danger-border)"></i><code>--gemboss-danger-border</code><span>#f5c9bc</span></div><div class="cat-swatch"><i style="background:var(--gemboss-success)"></i><code>--gemboss-success</code><span>#007f5f</span></div><div class="cat-swatch"><i style="background:var(--gemboss-success-strong)"></i><code>--gemboss-success-strong</code><span>#0a6a4c</span></div><div class="cat-swatch"><i style="background:var(--gemboss-success-soft)"></i><code>--gemboss-success-soft</code><span>#e3f1df</span></div><div class="cat-swatch"><i style="background:var(--gemboss-success-border)"></i><code>--gemboss-success-border</code><span>#b7dfcd</span></div><div class="cat-swatch"><i style="background:var(--gemboss-warning)"></i><code>--gemboss-warning</code><span>#9a6700</span></div><div class="cat-swatch"><i style="background:var(--gemboss-warning-soft)"></i><code>--gemboss-warning-soft</code><span>#fff8e0</span></div><div class="cat-swatch"><i style="background:var(--gemboss-warning-border)"></i><code>--gemboss-warning-border</code><span>#f5d569</span></div><div class="cat-swatch"><i style="background:var(--gemboss-dark-bg)"></i><code>--gemboss-dark-bg</code><span>#0a0a0c</span></div><div class="cat-swatch"><i style="background:var(--gemboss-dark-rail)"></i><code>--gemboss-dark-rail</code><span>#0e0e11</span></div><div class="cat-swatch"><i style="background:var(--gemboss-dark-surface)"></i><code>--gemboss-dark-surface</code><span>#16161a</span></div><div class="cat-swatch"><i style="background:var(--gemboss-dark-surface-2)"></i><code>--gemboss-dark-surface-2</code><span>#1e1e24</span></div><div class="cat-swatch"><i style="background:var(--gemboss-dark-divider)"></i><code>--gemboss-dark-divider</code><span>#2a2a31</span></div><div class="cat-swatch"><i style="background:var(--gemboss-dark-text)"></i><code>--gemboss-dark-text</code><span>#ededf0</span></div><div class="cat-swatch"><i style="background:var(--gemboss-dark-muted)"></i><code>--gemboss-dark-muted</code><span>#9a9aa4</span></div><div class="cat-swatch"><i style="background:var(--gemboss-field-bg)"></i><code>--gemboss-field-bg</code><span>#fdfdfd</span></div><div class="cat-swatch"><i style="background:var(--gemboss-field-bg-hover)"></i><code>--gemboss-field-bg-hover</code><span>#fafafa</span></div><div class="cat-swatch"><i style="background:var(--gemboss-field-ink)"></i><code>--gemboss-field-ink</code><span>#303030</span></div><div class="cat-swatch"><i style="background:var(--gemboss-field-placeholder)"></i><code>--gemboss-field-placeholder</code><span>#616161</span></div><div class="cat-swatch"><i style="background:var(--gemboss-field-line)"></i><code>--gemboss-field-line</code><span>#8a8a8a</span></div><div class="cat-swatch"><i style="background:var(--gemboss-field-line-hover)"></i><code>--gemboss-field-line-hover</code><span>#616161</span></div><div class="cat-swatch"><i style="background:var(--gemboss-field-line-active)"></i><code>--gemboss-field-line-active</code><span>#1a1a1a</span></div><div class="cat-swatch"><i style="background:var(--gemboss-chip-ink)"></i><code>--gemboss-chip-ink</code><span>#303633</span></div><div class="cat-swatch"><i style="background:var(--gemboss-chip-line)"></i><code>--gemboss-chip-line</code><span>#cfd6ce</span></div><div class="cat-swatch"><i style="background:var(--gemboss-chip-line-hover)"></i><code>--gemboss-chip-line-hover</code><span>#aab4ad</span></div><div class="cat-swatch"><i style="background:var(--gemboss-chip-bg-hover)"></i><code>--gemboss-chip-bg-hover</code><span>#f6f7f5</span></div><div class="cat-swatch"><i style="background:var(--gemboss-on-primary)"></i><code>--gemboss-on-primary</code><span>#ffffff</span></div><div class="cat-swatch"><i style="background:var(--gemboss-app-bg)"></i><code>--gemboss-app-bg</code><span>#ffffff</span></div></div><table class="ui-table cat-scale"><thead><tr><th>Token</th><th>Giá trị</th><th>Mẫu</th></tr></thead><tbody><tr><td><code>--gemboss-fs-micro</code></td><td>11px</td><td style="font-size:var(--gemboss-fs-micro)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-fs-caption</code></td><td>12px</td><td style="font-size:var(--gemboss-fs-caption)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-fs-body</code></td><td>14px</td><td style="font-size:var(--gemboss-fs-body)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-fs-body-lg</code></td><td>16px</td><td style="font-size:var(--gemboss-fs-body-lg)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-fs-h3</code></td><td>16px</td><td style="font-size:var(--gemboss-fs-h3)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-fs-h2</code></td><td>20px</td><td style="font-size:var(--gemboss-fs-h2)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-fs-h1</code></td><td>24px</td><td style="font-size:var(--gemboss-fs-h1)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-fs-display</code></td><td>30px</td><td style="font-size:var(--gemboss-fs-display)">Ngôn ngữ thiết kế chung</td></tr><tr><td><code>--gemboss-radius-xs</code></td><td>4px</td><td><i class="cat-radius" style="border-radius:var(--gemboss-radius-xs)"></i></td></tr><tr><td><code>--gemboss-radius-sm</code></td><td>6px</td><td><i class="cat-radius" style="border-radius:var(--gemboss-radius-sm)"></i></td></tr><tr><td><code>--gemboss-radius-md</code></td><td>8px</td><td><i class="cat-radius" style="border-radius:var(--gemboss-radius-md)"></i></td></tr><tr><td><code>--gemboss-radius-lg</code></td><td>12px</td><td><i class="cat-radius" style="border-radius:var(--gemboss-radius-lg)"></i></td></tr><tr><td><code>--gemboss-radius-xl</code></td><td>16px</td><td><i class="cat-radius" style="border-radius:var(--gemboss-radius-xl)"></i></td></tr><tr><td><code>--gemboss-radius-2xl</code></td><td>20px</td><td><i class="cat-radius" style="border-radius:var(--gemboss-radius-2xl)"></i></td></tr><tr><td><code>--gemboss-radius-full</code></td><td>999px</td><td><i class="cat-radius" style="border-radius:var(--gemboss-radius-full)"></i></td></tr><tr><td><code>--gemboss-shadow-resting</code></td><td class="cat-small">0 1px 2px rgba(31, 30, 29, 0.04), 0 2px 6px rgba(31, 30, 29, 0.06)</td><td><i class="cat-radius" style="box-shadow:var(--gemboss-shadow-resting);border:0"></i></td></tr><tr><td><code>--gemboss-shadow-raised</code></td><td class="cat-small">0 4px 16px rgba(31, 30, 29, 0.10)</td><td><i class="cat-radius" style="box-shadow:var(--gemboss-shadow-raised);border:0"></i></td></tr><tr><td><code>--gemboss-shadow-overlay</code></td><td class="cat-small">0 16px 48px rgba(31, 30, 29, 0.18)</td><td><i class="cat-radius" style="box-shadow:var(--gemboss-shadow-overlay);border:0"></i></td></tr></tbody></table></section>
|
|
32
32
|
<section id="buttons"><h2>Nút</h2><p>Một lớp <code>ui-btn</code>, ba biến thể, tông đỏ, một cỡ nhỏ. Cao 28px dưới chuột như Button của Polaris (ô nhập và ô chọn 32, như TextField), 44px dưới ngón tay và ở khổ điện thoại, cỡ nhỏ cũng vậy. Dùng được trên <code><button></code> lẫn <code><a></code> (căn giữa sẵn).</p><figure class="cat-demo"><figcaption>Mặc định · chính · ghost · nhỏ · tắt</figcaption><div class="cat-live"><div class="cat-row"><button type="button" class="ui-btn">Lưu nháp</button><button type="button" class="ui-btn ui-btn--primary">Xuất bản</button><button type="button" class="ui-btn ui-btn--ghost">Huỷ</button><button type="button" class="ui-btn ui-btn--sm">Nhỏ</button><button type="button" class="ui-btn ui-btn--primary" disabled>Đang lưu…</button><a class="ui-btn" href="#buttons">Link dạng nút</a></div></div><details class="cat-code"><summary>Markup</summary><pre><code><div class="cat-row">
|
|
33
33
|
<button type="button" class="ui-btn">Lưu nháp</button>
|
package/gemboss-ui.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* GemBoss admin design system — GENERATED — do not edit; regenerate from gemboss:
|
|
3
3
|
* node apps/admin/scripts/export-ui-css.mjs --out <path> (npm run export:ui-css)
|
|
4
|
-
* gemboss commit:
|
|
5
|
-
* sources sha256:
|
|
4
|
+
* gemboss commit: 0f08408af446364b67b8792547f31a7991eb639f
|
|
5
|
+
* sources sha256: ac10b29a54ec2d8bbf3e03e009e66162275ababdb1d7c1d74ce6dfa0f751e3b4
|
|
6
6
|
* contents: 1 allow-listed rule from apps/admin/src/app/globals.css + packages/ui/src/gemboss-tokens.css
|
|
7
7
|
* (verbatim) + packages/ui/src/ui.css (verbatim) + packages/ui/src/gemboss-field.css (verbatim)
|
|
8
8
|
* + 182 rules from packages/ui/src/shell.css (the shared shell)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gemboss/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "GemBoss design system for every surface in the fleet: the admin shell (topbar + rail + drawer) as React components, and the admin stylesheet exported as one CSS file.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"./src/auth-sso-plain.js",
|
|
16
16
|
"./src/team-chat-plain.js",
|
|
17
17
|
"./src/assistant-plain.js",
|
|
18
|
+
"./src/session-rail-plain.js",
|
|
18
19
|
"./src/language-switcher-plain.js"
|
|
19
20
|
],
|
|
20
21
|
"main": "./src/index.ts",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"./range-bar.css": "./src/range-bar.css",
|
|
44
45
|
"./progress-ring.css": "./src/progress-ring.css",
|
|
45
46
|
"./spot-art.css": "./src/spot-art.css",
|
|
47
|
+
"./logo-sheet.css": "./src/logo-sheet.css",
|
|
46
48
|
"./minichart.css": "./src/minichart.css",
|
|
47
49
|
"./setup-guide.css": "./src/setup-guide.css",
|
|
48
50
|
"./sheet.css": "./src/sheet.css",
|
|
@@ -72,6 +74,7 @@
|
|
|
72
74
|
"./team-chat.css": "./src/team-chat.css",
|
|
73
75
|
"./team-chat-plain.js": "./src/team-chat-plain.js",
|
|
74
76
|
"./assistant-plain.js": "./src/assistant-plain.js",
|
|
77
|
+
"./session-rail-plain.js": "./src/session-rail-plain.js",
|
|
75
78
|
"./assistant": "./src/assistant/index.ts",
|
|
76
79
|
"./assistant/dock": "./src/assistant/dock.ts",
|
|
77
80
|
"./assistant/markdown": "./src/assistant/chat-markdown.ts",
|
|
@@ -98,6 +101,7 @@
|
|
|
98
101
|
"src/auth-sso-plain.js",
|
|
99
102
|
"src/team-chat-plain.js",
|
|
100
103
|
"src/assistant-plain.js",
|
|
104
|
+
"src/session-rail-plain.js",
|
|
101
105
|
"src/language-switcher-plain.js",
|
|
102
106
|
"src/icon.svg",
|
|
103
107
|
"!src/**/*.test.*",
|
package/parts/components.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @gemboss/ui components.css — GENERATED by packages/ui/scripts/build-css.mjs from export:ui + export:field + src/kit-plain.css; do not edit
|
|
3
|
-
* gemboss commit:
|
|
3
|
+
* gemboss commit: 0f08408af446364b67b8792547f31a7991eb639f
|
|
4
4
|
*/
|
|
5
5
|
:root{--ui-surface: #ffffff;--ui-surface: var(--gemboss-surface, #ffffff);--ui-surface-2: var(--gemboss-hover, #eceef2);--ui-text: var(--gemboss-text, #1b1c1e);--ui-text-muted: var(--gemboss-text-muted, #686b71);--ui-border: var(--gemboss-divider, #e5e7ea);--ui-accent: var(--gemboss-primary, #1b1c1e);--ui-accent-hover: var(--gemboss-primary-dark, #000000);--ui-accent-fg: #ffffff;--ui-accent-soft: var(--gemboss-active-bg, #f0f1f4);--ui-accent-strong: var(--gemboss-active-fg, #1b1c1e);--ui-text-strong: var(--gemboss-text-strong, #1b1c1e);--ui-success-fg: var(--gemboss-success);--ui-warning-fg: var(--gemboss-primary-dark);--ui-danger-fg: var(--gemboss-danger-strong);--ui-focus: var(--gemboss-accent, #5661f5);--ui-radius-sm: 6px;--ui-radius-md: 8px;--ui-radius-lg: 12px;--ui-space-1: 4px;--ui-space-2: 8px;--ui-space-3: 12px;--ui-space-4: 16px;--ui-control-h: 32px;--ui-btn-h: 28px;--ui-card-shadow: 0 1px 0 rgba(26,26,26,.07);--ui-fs-body: 13px;--ui-fs-caption: 12px;--ui-content-max: 900px}.gemboss-admin-shell{--ui-surface: var(--adm-surface);--ui-surface-2: var(--adm-surface-2);--ui-text: var(--adm-text);--ui-text-muted: var(--adm-muted);--ui-border: var(--adm-divider);--ui-accent: var(--adm-accent);--ui-accent-hover: var(--gemboss-primary-dark, #000000);--ui-accent-fg: #ffffff;--ui-accent-soft: var(--adm-accent-soft);--ui-accent-strong: var(--adm-accent-fg);--ui-text-strong: var(--adm-text-strong);--ui-success-fg: color-mix(in srgb, var(--gemboss-success) 70%, #ffffff);--ui-warning-fg: color-mix(in srgb, #c99a2e 70%, #ffffff);--ui-danger-fg: color-mix(in srgb, var(--gemboss-danger-strong) 70%, #ffffff);--ui-focus: var(--adm-accent);--ui-card-shadow: none}.ui-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--ui-space-2);height:var(--ui-btn-h);padding:0 var(--ui-space-3);box-sizing:border-box;line-height:1;white-space:nowrap;vertical-align:middle;border-radius:var(--ui-radius-md);font-family:inherit;font-size:var(--ui-fs-caption);font-weight:550;cursor:pointer;text-decoration:none;user-select:none;border:1px solid var(--ui-border);background:transparent;color:var(--ui-text);transition:background .12s ease,border-color .12s ease}.ui-btn:hover{background:var(--ui-surface-2);text-decoration:none}.ui-btn:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}.ui-btn[disabled],.ui-btn[aria-disabled=true]{opacity:.5;cursor:not-allowed}.ui-btn--primary{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-accent-fg)}.ui-btn--primary:hover{background:var(--ui-accent-hover);border-color:var(--ui-accent-hover)}.ui-btn--ghost{border-color:transparent;background:transparent;color:var(--ui-text-muted)}.ui-btn--ghost:hover{background:var(--ui-surface-2);color:var(--ui-text)}.ui-btn--on,.ui-btn--on:hover{background:var(--ui-accent-soft);border-color:var(--ui-accent);color:var(--ui-accent-strong)}.ui-card{background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius-lg);box-shadow:var(--ui-card-shadow);padding:var(--ui-space-4);color:var(--ui-text)}.ui-card__title{font-size:14px;line-height:20px;font-weight:650;margin:0 0 var(--ui-space-2)}.ui-card__head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--ui-space-2);margin-bottom:var(--ui-space-2)}.ui-card__head>.ui-card__title{margin:0}.ui-card__head>:last-child:not(.ui-card__title){display:flex;flex-wrap:wrap;gap:var(--ui-space-2)}.ui-select{height:var(--ui-control-h);padding:0 32px 0 12px;max-width:100%;background:var(--gemboss-field-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'><path fill='%239a9aa4' d='M5 7l5 5 5-5z'/></svg>") no-repeat right 10px center;border:1px solid var(--gemboss-field-line);border-radius:var(--ui-radius-md);color:var(--gemboss-field-ink);font-family:inherit;font-size:var(--ui-fs-body);font-weight:450;appearance:none;-webkit-appearance:none;cursor:pointer}.ui-select:hover:not(:disabled){border-color:var(--gemboss-field-line-hover);background-color:var(--gemboss-field-bg-hover)}.ui-select:focus{outline:none}.ui-select:focus-visible:not(:disabled){outline:2px solid var(--ui-focus);outline-offset:1px;border-color:var(--gemboss-field-line-active)}.ui-select:disabled{opacity:.5;cursor:not-allowed}.ui-select--slim{height:30px;font-size:var(--ui-fs-caption)}.ui-tag{display:inline-flex;align-items:center;gap:6px;font-size:var(--ui-fs-caption);line-height:20px;font-weight:450;padding:0 6px;border-radius:var(--ui-radius-md);background:var(--ui-surface-2);color:var(--ui-text-muted)}.ui-tag--accent{background:var(--adm-accent-soft, rgba(20,22,26,.05));color:var(--adm-accent-fg, var(--ui-accent))}.ui-tag--chip{text-transform:none;letter-spacing:0;font-size:11px;font-weight:500;padding:2px 8px;background:transparent;border:1px solid var(--ui-border);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.ui-tag--chip.ui-tag--accent{color:var(--adm-accent-fg, var(--ui-accent));border-color:var(--ui-accent);background:transparent}.ui-chips{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px);margin:0;padding:0;list-style:none}.ui-chips>a.ui-tag--chip{min-height:28px;padding:4px 12px;border-radius:var(--ui-radius-md, 8px);font-family:inherit;font-size:var(--gemboss-fs-caption, 12px);color:var(--ui-text);text-decoration:none}.ui-chips>a.ui-tag--chip:hover{background:var(--ui-surface-2);border-color:var(--ui-text-muted)}.ui-chips>a.ui-tag--chip:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-chips>a.ui-tag--chip[aria-current=page]{background:var(--ui-accent-soft);border-color:var(--ui-accent);color:var(--ui-accent-strong);font-weight:600}.ui-tag--success{background:var(--gemboss-success-soft);color:var(--gemboss-success-strong, var(--gemboss-success))}.ui-tag--warning{background:var(--gemboss-warning-soft);color:var(--gemboss-warning)}.ui-tag--danger{background:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong, var(--gemboss-danger))}.ui-muted{color:var(--ui-text-muted);font-size:var(--ui-fs-caption)}.ui-page-head{margin-bottom:20px}.ui-page-head h1{color:var(--ui-text-strong);font-size:20px;line-height:24px;font-weight:700;letter-spacing:-.01em}.ui-page-head p{color:var(--ui-text-muted);font-size:var(--ui-fs-body);margin-top:4px}.ui-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:20px}.ui-metrics{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0}.ui-metric{display:flex;flex-direction:column;gap:1px;min-width:78px;padding:8px 12px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:12px}a.ui-metric{text-decoration:none;color:inherit}a.ui-metric:hover{border-color:var(--ui-text-muted)}a.ui-metric:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-metric__val{font-size:17px;font-weight:700;color:var(--ui-text);font-variant-numeric:tabular-nums;line-height:1.15}.ui-metric__lbl{font-size:var(--ui-fs-caption);font-weight:500;color:var(--ui-text-muted)}.ui-metric--success{border-color:color-mix(in srgb,var(--gemboss-success) 40%,transparent)}.ui-metric--success .ui-metric__val{color:var(--ui-success-fg)}.ui-metric--warning{border-color:color-mix(in srgb,#c99a2e 40%,transparent)}.ui-metric--warning .ui-metric__val{color:var(--ui-warning-fg)}.ui-metric--danger{border-color:color-mix(in srgb,var(--gemboss-danger-strong) 40%,transparent)}.ui-metric--danger .ui-metric__val{color:var(--ui-danger-fg)}.ui-dl{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px 16px;margin:0}.ui-dl>div{min-width:0}.ui-dl dt{font-size:var(--ui-fs-caption);color:var(--ui-text-muted)}.ui-dl dd{margin:4px 0 0;font-weight:600;color:var(--ui-text);overflow-wrap:anywhere}.ui-notice{padding:12px 16px;border-radius:var(--ui-radius-md);border:1px solid var(--ui-border);background:var(--ui-surface-2);color:var(--ui-text);font-size:var(--ui-fs-body);overflow-wrap:anywhere}.ui-notice--warning{background:var(--gemboss-warning-soft);border-color:var(--gemboss-warning-border);color:var(--gemboss-warning)}.ui-notice--danger{background:var(--gemboss-danger-soft);border-color:var(--gemboss-danger-border);color:var(--gemboss-danger-strong)}.ui-notice--success{background:var(--gemboss-success-soft);border-color:var(--gemboss-success-border);color:var(--gemboss-success-strong)}.ui-pager{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:16px 0}.ui-pager>a{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);color:var(--ui-text);text-decoration:none;font-size:var(--ui-fs-body)}.ui-pager>a:hover{background:var(--ui-surface-2)}.ui-pager>a:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-pager>[aria-current=page]{color:var(--ui-text-muted);font-size:var(--ui-fs-caption)}.ui-badge{display:inline-flex;align-items:center;gap:4px;font-size:var(--ui-fs-caption);line-height:16px;font-weight:450;white-space:nowrap;padding:2px 8px;border-radius:var(--ui-radius-md);background:color-mix(in srgb,var(--ui-text) 8%,transparent);color:var(--ui-text-muted)}.ui-overlay{position:fixed;inset:0;z-index:500;background:#00000080;display:grid;place-items:center;padding:20px}.ui-modal{width:min(460px,100%);background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:16px;box-shadow:var(--gemboss-shadow-overlay, 0 20px 60px rgba(0, 0, 0, .4));overflow:hidden}.ui-modal:focus{outline:none}.ui-modal__head{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--ui-border);font-size:14px;line-height:20px;font-weight:650;color:var(--ui-text)}.ui-modal__title{min-width:0;flex:1 1 auto}.ui-modal__close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:var(--ui-radius-md, 8px);background:transparent;color:var(--ui-text-muted);cursor:pointer}.ui-modal__close svg{width:20px;height:20px}.ui-modal__close:hover{background:var(--ui-surface-2);color:var(--ui-text)}.ui-modal__close:focus-visible{outline:2px solid var(--ui-focus);outline-offset:-2px}.ui-modal__body{padding:16px}.ui-modal__foot{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;padding:12px 16px;border-top:1px solid var(--ui-border)}@media (pointer: coarse),(max-width: 47.9975em){.ui-modal__close{width:44px;height:44px;margin:-8px -8px -8px 0}:is(.ui-modal__head,.ui-modal__foot) .ui-btn{min-height:44px}}.ui-modal--lg{position:relative}.ui-textarea{width:100%;min-height:96px;resize:vertical;box-sizing:border-box;background:var(--gemboss-field-bg);border:1px solid var(--gemboss-field-line);border-radius:var(--ui-radius-md);padding:12px;color:var(--gemboss-field-ink);font-size:var(--ui-fs-body);line-height:1.5;font-family:inherit}.ui-textarea::placeholder{color:var(--gemboss-field-placeholder)}.ui-textarea:hover:not(:disabled){border-color:var(--gemboss-field-line-hover);background-color:var(--gemboss-field-bg-hover)}.ui-textarea:focus{outline:none}.ui-textarea:focus-visible:not(:disabled){outline:2px solid var(--ui-focus);outline-offset:1px;border-color:var(--gemboss-field-line-active)}.ui-textarea:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 47.9975em){.ui-select.ui-select,.ui-textarea{font-size:16px}.ui-select:not(.ui-select--slim){min-height:44px}}.ui-seg{display:inline-flex;border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);overflow:hidden;overflow:clip;min-width:0}.ui-seg :is(button,a){display:inline-grid;place-items:center;width:calc(var(--ui-btn-h) - 2px);height:calc(var(--ui-btn-h) - 2px);border:0;background:transparent;color:var(--ui-text-muted);cursor:pointer;font-family:inherit}.ui-seg :is(button,a).is-text{width:auto;padding:0 12px;font-size:var(--ui-fs-caption);font-weight:550;grid-auto-flow:column;column-gap:2px}.ui-seg :is(button,a)+:is(button,a){border-left:1px solid var(--ui-border)}.ui-seg :is(button,a):hover{background:var(--ui-surface-2);color:var(--ui-text)}.ui-seg :is(button,a):focus-visible{outline:2px solid var(--ui-focus);outline-offset:-2px}.ui-seg a{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:var(--ui-text-muted)}.ui-seg a[aria-current=page],.ui-seg button.active{background:var(--ui-accent-soft);color:var(--ui-accent-strong)}.ui-seg svg{width:16px;height:16px;fill:currentColor}.ui-seg svg[fill=none]{fill:none}.ui-seg :is(button,a):is(:disabled,[aria-disabled=true]){opacity:.45;cursor:not-allowed}.ui-seg :is(button,a):is(:disabled,[aria-disabled=true]):not(.active):hover{background:transparent;color:var(--ui-text-muted)}.ui-seg--fill{display:flex;width:100%}.ui-seg.ui-seg--fill>:is(button,a).is-text{flex:1 1 0;min-width:0}.ui-seg-n{margin-left:6px;font-variant-numeric:tabular-nums;color:var(--ui-text-muted);font-weight:450}.ui-stats{display:flex;flex-wrap:wrap;gap:var(--ui-space-2);margin-bottom:24px}.ui-stat{display:inline-flex;align-items:center;gap:var(--ui-space-2);padding:6px 12px;border-radius:999px;font-family:inherit;background:var(--ui-surface);border:1px solid var(--ui-border);font-size:var(--ui-fs-caption);color:var(--ui-text-muted)}.ui-stat b{color:var(--ui-text-strong);font-weight:650}.ui-stat.is-clickable{cursor:pointer;transition:border-color .14s ease,background-color .14s ease}.ui-stat.is-clickable:hover{border-color:var(--ui-text-muted);background:var(--ui-surface-2)}.ui-stat.is-clickable.active{border-color:var(--ui-accent);background:var(--ui-accent-soft);color:var(--ui-accent-strong)}.ui-stat.is-clickable.active b{color:var(--ui-accent-strong)}.gemboss-toast-viewport{position:fixed;left:50%;bottom:24px;transform:translate(-50%);z-index:2147483000;display:flex;flex-direction:column;align-items:center;gap:12px;width:max-content;max-width:min(560px,calc(100vw - 32px));pointer-events:none}.gemboss-toast{pointer-events:auto;display:flex;align-items:center;gap:12px;min-width:220px;max-width:100%;padding:12px 12px 12px 16px;background:var(--ui-text-strong, #1a1917);color:var(--gemboss-on-primary, #fff);border-radius:12px;font-size:var(--ui-fs-body, 13px);line-height:1.4;font-weight:500;box-shadow:var(--gemboss-shadow-overlay, 0 8px 28px rgba(0, 0, 0, .24));animation:gemboss-toast-in .24s cubic-bezier(.16,1,.3,1)}.gemboss-toast.is-error{background:var(--gemboss-danger, #d72c0d)}.gemboss-toast-text{flex:1 1 auto;min-width:0}.gemboss-toast-action{flex:0 0 auto;border:0;background:transparent;color:var(--gemboss-on-primary, #fff);cursor:pointer;padding:4px 8px;border-radius:8px;font:inherit;font-weight:650;text-decoration:underline;text-underline-offset:2px;transition:background .14s ease}.gemboss-toast-action:hover{background:#ffffff29}.gemboss-toast-dismiss{flex:0 0 auto;display:inline-grid;place-items:center;width:24px;height:24px;border:0;border-radius:8px;cursor:pointer;background:#ffffff1f;color:var(--gemboss-on-primary, #fff);transition:background .14s ease}.gemboss-toast-dismiss:hover{background:#ffffff42}.gemboss-toast-action:focus-visible,.gemboss-toast-dismiss:focus-visible{outline:2px solid var(--gemboss-on-primary, #fff);outline-offset:2px}@keyframes gemboss-toast-in{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion: reduce){.gemboss-toast{animation:none}}@media (max-width: 47.9975em){.ui-btn:not(.ui-btn--sm),.ui-seg :is(button,a){min-height:44px}.ui-seg :is(button,a):not(.is-text){min-width:44px}}@media (pointer: coarse){.ui-btn:not(.ui-btn--sm),.ui-stat.is-clickable,.ui-chips>a.ui-tag--chip,.ui-pager>a,.ui-seg :is(button,a){min-height:44px}.ui-stat.is-clickable{min-width:44px;justify-content:center}.ui-chips>a.ui-tag--chip{min-width:44px;justify-content:center}.ui-select.ui-select,.ui-select--slim.ui-select--slim{min-height:44px}.ui-seg :is(button,a){min-width:44px}}.ui-skeleton{display:flex;flex-direction:column;gap:var(--ui-space-2)}.ui-skeleton__line{display:block;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--ui-surface-2) 25%,var(--ui-border) 37%,var(--ui-surface-2) 63%);background-size:400% 100%;animation:ui-skeleton-sheen 1.4s ease-in-out infinite}@keyframes ui-skeleton-sheen{0%{background-position:100% 50%}to{background-position:0 50%}}@media (prefers-reduced-motion: reduce){.ui-skeleton__line{animation:none;background:var(--ui-surface-2)}}.ui-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.ui-resizer{cursor:col-resize;position:relative;touch-action:none;outline:none}.ui-resizer:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:4px;height:44px;border-radius:var(--gemboss-radius-full);background:var(--gemboss-primary);opacity:0;transition:opacity .14s ease,height .14s ease}.ui-resizer:hover:before,.ui-resizer:focus-visible:before,.ui-resizer.dragging:before,body.ui-resizing .ui-resizer:before{opacity:1;height:52px}@media (pointer: coarse){.ui-resizer:after{content:"";position:absolute;inset:0 -14px;touch-action:none;z-index:2}}body.ui-resizing,body.ui-resizing *{cursor:col-resize!important;user-select:none!important}body.ui-resizing:after{content:"";position:fixed;inset:0;z-index:9999;cursor:col-resize}.ui-tabs{display:flex;gap:var(--ui-space-2);border-bottom:1px solid var(--ui-border);overflow-x:auto;scrollbar-width:none}.ui-tabs>button,.ui-tabs>a{position:relative;flex:0 0 auto;display:inline-flex;align-items:center;gap:var(--ui-space-2);min-height:var(--ui-btn-h);padding:0 var(--ui-space-3);border:0;background:transparent;cursor:pointer;border-radius:var(--ui-radius-sm) var(--ui-radius-sm) 0 0;font-family:inherit;font-size:var(--ui-fs-caption);font-weight:550;white-space:nowrap;color:var(--ui-text-muted);transition:color var(--gemboss-transition-fast) ease,background-color var(--gemboss-transition-fast) ease}.ui-tabs>button:hover,.ui-tabs>a:hover{color:var(--ui-text);background:var(--ui-surface-2)}.ui-tabs>button:focus-visible,.ui-tabs>a:focus-visible{outline:2px solid var(--ui-focus);outline-offset:-2px}.ui-tabs>a{text-decoration:none}.ui-tabs>a[aria-current=page],.ui-tabs>button[aria-selected=true]{color:var(--ui-text-strong)}.ui-tabs>a[aria-current=page]:after,.ui-tabs>button[aria-selected=true]:after{content:"";position:absolute;left:var(--ui-space-3);right:var(--ui-space-3);bottom:0;height:2px;border-radius:var(--gemboss-radius-full);background:var(--ui-accent)}.ui-tabs>button:disabled{opacity:.5;cursor:not-allowed}@media (pointer: coarse),(max-width: 47.9975em){.ui-tabs>:is(button,a){min-height:44px}}.ui-table-wrap{overflow-x:auto;max-width:100%;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius-lg);box-shadow:var(--ui-card-shadow)}.ui-table{width:100%;border-collapse:collapse;font-size:var(--ui-fs-body);color:var(--ui-text)}.ui-table th,.ui-table td{padding:var(--ui-space-2) 6px;text-align:left;vertical-align:middle;border-bottom:1px solid var(--ui-border)}.ui-table :is(th,td):where(:first-child){padding-left:var(--ui-space-3)}.ui-table :is(th,td):where(:last-child){padding-right:var(--ui-space-3)}.ui-table th{font-weight:450;color:var(--ui-text-muted);white-space:nowrap}.ui-table thead th{padding-block:var(--ui-space-3)}.ui-table tbody tr:last-child>:is(td,th){border-bottom:0}.ui-table tbody tr:hover{background:var(--ui-surface-2)}.ui-table .is-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.ui-table td>a{display:inline-flex;align-items:center;min-height:24px}.ui-table .ui-sub{display:block;margin-top:2px;font-size:var(--ui-fs-caption);color:var(--ui-text-muted);font-weight:400}.ui-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--ui-space-2);padding:var(--ui-space-4);padding-block:40px;text-align:center;color:var(--ui-text-muted);font-size:var(--ui-fs-body)}.ui-empty__title{margin:0;font-size:14px;line-height:20px;font-weight:650;color:var(--ui-text-strong)}.ui-empty__body{margin:0;max-width:48ch;line-height:1.5}.ui-empty>.ui-btn{margin-top:var(--ui-space-2)}.gemboss-field,.gemboss-control{box-sizing:border-box;height:32px;min-width:0;padding:0 12px;font:inherit;font-size:13px;line-height:20px;color:var(--gemboss-field-ink);background-color:var(--gemboss-field-bg);border:1px solid var(--gemboss-field-line);border-radius:8px}input[type=search]:is(.gemboss-field,.gemboss-field__bare){-webkit-appearance:none;appearance:none}.gemboss-field::placeholder{color:var(--gemboss-field-placeholder)}.gemboss-field--tall{min-height:44px}.gemboss-field--narrow{padding:0 6px;appearance:textfield;-moz-appearance:textfield}.gemboss-field--narrow::-webkit-outer-spin-button,.gemboss-field--narrow::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.gemboss-field:hover:not(:disabled):not(:has(>.gemboss-field__bare:disabled)),.gemboss-control:hover:not(:disabled){border-color:var(--gemboss-field-line-hover);background-color:var(--gemboss-field-bg-hover)}.gemboss-field:focus-visible,.gemboss-control:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px;border-color:var(--gemboss-field-line-active)}.gemboss-field:disabled,.gemboss-control:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 47.9975em){.gemboss-field,.gemboss-control{font-size:16px;min-height:44px}}textarea.gemboss-field{height:auto;padding:6px 12px;resize:vertical}.gemboss-field--group{display:flex;align-items:center;gap:6px;height:auto;min-height:32px;padding-right:0;overflow:hidden}@media (max-width: 47.9975em){.gemboss-field--group{min-height:44px}}.gemboss-field--group:focus-within{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px;border-color:var(--gemboss-field-line-active)}.gemboss-field--group input[type=color]{flex:none;align-self:stretch;width:44px;min-width:44px;height:auto;min-height:0;margin:-1px 0 -1px -12px;padding:0;border:0;border-right:1px solid var(--gemboss-field-line);border-radius:0;background:none;cursor:pointer}.gemboss-field--group input[type=color]::-webkit-color-swatch-wrapper{padding:0}.gemboss-field--group input[type=color]::-webkit-color-swatch{border:0;border-radius:0}.gemboss-field__bare{flex:1;min-width:0;align-self:stretch;margin-block:-1px;padding:0 12px 0 0;border:0;border-radius:0;outline:none;background:transparent;color:inherit;font:inherit}.gemboss-field__bare::placeholder{color:var(--gemboss-field-placeholder)}.gemboss-field__suffix{flex:none;padding-right:12px;color:var(--gemboss-field-placeholder)}.gemboss-field__bare:has(+.gemboss-field__suffix){padding-right:0}.gemboss-field--group:has(>.gemboss-field__bare:disabled){opacity:.5;cursor:not-allowed}.gemboss-field__bare:disabled{cursor:not-allowed}@media (pointer: coarse){.gemboss-field,.gemboss-control{height:auto;min-height:44px}}.gemboss-control{cursor:pointer}.gemboss-control.gemboss-control--icon{width:32px;flex:0 0 auto;padding:0}@media (pointer: coarse){.gemboss-control.gemboss-control--icon{width:44px;min-width:44px}}.ui-btn--icon{flex:none;width:var(--ui-btn-h);padding:0}.ui-btn--icon svg{width:18px;height:18px}.ui-menu{position:relative;display:inline-block}.ui-menu>summary{list-style:none;cursor:pointer}.ui-menu>summary::-webkit-details-marker{display:none}.ui-menu__list{position:absolute;z-index:20;top:calc(100% + 4px);left:0;display:grid;min-width:220px;padding:var(--ui-space-1);box-sizing:border-box}.ui-menu--end .ui-menu__list{left:auto;right:0}.ui-menu__list[popover]{position:fixed;inset:auto;margin:0;overflow:auto}.ui-menu__list[popover]:not(:popover-open){display:none}:where(.ui-menu__list[popover]){border:0;background:none;color:inherit}:root[data-gb-menus=float] .ui-menu[open]>.ui-menu__list:not([popover]){visibility:hidden}.ui-menu__item:is([disabled],[aria-disabled=true]){opacity:.5;cursor:not-allowed;pointer-events:none}.ui-menu__hint{margin-left:auto;padding-left:var(--ui-space-4);color:var(--ui-text-muted);font-size:var(--ui-fs-caption)}.ui-menu__sep{height:1px;margin:var(--ui-space-1) 0;border:0;background:var(--ui-border)}.ui-check{display:inline-flex;align-items:center;gap:var(--ui-space-2);min-height:44px;max-width:100%;overflow-wrap:break-word;cursor:pointer;font-size:var(--ui-fs-body);color:var(--ui-text)}.ui-check>input{flex:none;width:18px;height:18px;margin:0;accent-color:var(--ui-accent);cursor:inherit}.ui-check>input:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}.ui-check:has(>input:disabled){opacity:.5;cursor:not-allowed}.ui-check>:last-child:not(input){min-width:0}.ui-label{display:block;margin:0 0 var(--ui-space-1);font-size:var(--ui-fs-caption);font-weight:600;color:var(--ui-text-muted)}.ui-kv{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:var(--ui-space-2) var(--ui-space-4);margin:0;font-size:var(--ui-fs-body)}.ui-kv>dt{color:var(--ui-text-muted)}.ui-kv>dd{margin:0;min-width:0;overflow-wrap:anywhere;color:var(--ui-text)}@media (pointer: coarse){.ui-btn--icon:not(.ui-btn--sm){min-width:44px}}@media (max-width: 47.9975em){.ui-btn--icon:not(.ui-btn--sm){min-width:44px;min-height:44px}}.ui-link,.ui-prose :where(a:not([class])){color:var(--gemboss-accent-strong, #3a44de);text-decoration:underline;text-decoration-thickness:from-font;text-underline-offset:2px}.ui-link:visited,.ui-prose :where(a:not([class])):visited{color:var(--gemboss-accent-strong, #3a44de)}.ui-link:hover,.ui-prose :where(a:not([class])):hover{color:var(--gemboss-accent, #5661f5);text-decoration-thickness:2px}.ui-link:focus-visible,.ui-prose :where(a:not([class])):focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px;border-radius:2px}.ui-card--media{position:relative;padding:0;overflow:hidden;display:flex;flex-direction:column}.ui-card__link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;color:var(--ui-text);font-size:var(--ui-fs-body);line-height:20px;font-weight:650;text-decoration:none;overflow-wrap:anywhere}.ui-card__link:after{content:"";position:absolute;inset:0;z-index:0}.ui-card__link:focus-visible{outline:none}.ui-card--media:has(.ui-card__link){cursor:pointer}.ui-card--media:has(.ui-card__link:hover){border-color:var(--ui-text-muted)}.ui-card--media:has(.ui-card__link:focus-visible){outline:2px solid var(--ui-focus);outline-offset:1px}.ui-card--media :is(.ui-card__foot button,.ui-card__foot a,.ui-card__body a:not(.ui-card__link),.ui-card__body button,select,input,summary){position:relative;z-index:1}.ui-card__menu{position:absolute;top:8px;right:8px;z-index:2}.ui-card--media:has(>.ui-card__menu){overflow:visible}.ui-card--media:has(>.ui-card__menu)>.ui-card__media{border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}.ui-card__meta{color:var(--ui-text-muted);font-size:var(--ui-fs-caption);line-height:16px}.ui-card--media[data-ratio="4/3"]>.ui-card__media{aspect-ratio:4 / 3}.ui-card--media[data-ratio="1/1"]>.ui-card__media{aspect-ratio:1 / 1}.ui-card__media{display:block;width:100%;aspect-ratio:16 / 10;margin:0;padding:0;border:0;border-bottom:1px solid var(--ui-border);background:var(--ui-surface-2);overflow:hidden;color:inherit}.ui-card__media>img{display:block;width:100%;height:100%;object-fit:cover}button.ui-card__media,a.ui-card__media{cursor:pointer}.ui-card__media:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:-2px}.ui-card__body{display:grid;justify-items:start;gap:var(--ui-space-2, 8px);padding:var(--ui-space-3, 12px) var(--ui-space-4, 16px);min-width:0}.ui-card__foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--ui-space-2, 8px);margin-top:auto;padding:0 var(--ui-space-4, 16px) var(--ui-space-3, 12px);color:var(--ui-text-muted);font-size:var(--ui-fs-caption, 13px)}.ui-modal__subtitle{display:block;margin-top:2px;font-size:var(--ui-fs-caption);line-height:16px;font-weight:450;color:var(--ui-text-muted);overflow-wrap:anywhere}.ui-modal__actions{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-space-2)}.ui-overlay>.ui-modal{display:flex;flex-direction:column;max-height:calc(100dvh - 40px)}.ui-modal>.ui-modal__head,.ui-modal>.ui-modal__foot{flex:none}.ui-modal>.ui-modal__body{flex:1 1 auto;min-height:0;overflow:auto}:root{--ui-series-1: var(--gemboss-accent, #5661f5);--ui-series-2: #0f9f8f;--ui-series-3: #d9822b;--ui-series-4: #c2417a;--ui-series-5: #6b7280}.ui-delta{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:2px;font-size:var(--gemboss-fs-caption);font-weight:600;color:var(--ui-text-muted);font-variant-numeric:tabular-nums}.ui-delta--good{color:var(--ui-success-fg)}.ui-delta--bad{color:var(--ui-danger-fg)}.ui-metrics--grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:var(--ui-space-3);margin:0}.ui-metric--lg{gap:4px;padding:var(--ui-space-3) var(--ui-space-4)}.ui-metric--lg .ui-metric__val{font-size:24px;line-height:32px}.ui-metric--lg .ui-metric__lbl{order:-1;font-size:var(--ui-fs-body)}.ui-metric__foot{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}@media (max-width: 520px){.ui-metrics--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.ui-barlist{display:grid;gap:var(--ui-space-3);margin:0;padding:0;list-style:none;font-size:var(--ui-fs-body, 13px)}.ui-barlist>li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:4px var(--ui-space-3)}.ui-barlist__label{min-width:0;overflow-wrap:anywhere;color:var(--ui-text)}.ui-barlist__label a{color:inherit}.ui-barlist__val{font-weight:600;color:var(--ui-text);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}.ui-barlist__share{margin-left:6px;font-weight:400;color:var(--ui-text-muted)}.ui-barlist__note{grid-column:1 / -1;margin-top:-2px;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}.ui-barlist__bar{grid-column:1 / -1;position:relative;height:6px;border-radius:999px;background:var(--ui-surface-2);overflow:hidden}.ui-barlist__bar:after{content:"";position:absolute;inset:0 auto 0 0;width:calc(var(--v, 0) * 100%);min-width:3px;border-radius:inherit;background:var(--c, var(--ui-series-1))}.ui-chart{margin:0}.ui-chart__plot{position:relative;display:flex;align-items:flex-end;justify-content:space-between;gap:3px;height:180px;padding-top:18px;border-bottom:1px solid var(--ui-border);background:linear-gradient(to top,var(--ui-border) 1px,transparent 1px) 0 0 / 100% 25% repeat-y;background-origin:content-box;background-clip:content-box}.ui-chart__plot[data-max]:before{content:attr(data-max);position:absolute;top:0;left:0;font-size:var(--gemboss-fs-micro, 11px);line-height:1;color:var(--ui-text-muted);font-variant-numeric:tabular-nums}.ui-chart__col{position:relative;flex:1 1 0;min-width:0;max-width:48px;height:100%;display:flex;flex-direction:column-reverse}.ui-chart__col:hover{background:color-mix(in srgb,var(--ui-text) 6%,transparent)}.ui-chart__seg{display:block;flex:none;height:calc(var(--v, 0) * 100%);background:var(--c, var(--ui-series-1))}.ui-chart__dot{position:absolute;left:50%;bottom:calc(var(--v, 0) * 100%);width:8px;height:8px;margin:0 0 -4px -4px;box-sizing:border-box;border-radius:50%;background:var(--ui-surface);border:2px solid var(--c, var(--ui-text-strong, var(--ui-text)))}.ui-chart__axis{display:flex;justify-content:space-between;gap:var(--ui-space-2);margin-top:6px;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted);font-variant-numeric:tabular-nums}.ui-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:var(--ui-space-2) 0 0;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}.ui-legend__item{display:inline-flex;align-items:center;gap:6px}.ui-legend__item>i{display:inline-block;width:10px;height:10px;border-radius:2px;background:var(--c, var(--ui-series-1))}.ui-legend__item--dot>i{border-radius:50%;background:var(--ui-surface);border:2px solid var(--c, var(--ui-text-strong, var(--ui-text)));box-sizing:border-box}.ui-funnel{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:var(--ui-space-2);margin:0;padding:0;list-style:none}.ui-funnel>li{position:relative;display:flex;flex-direction:column;gap:2px;padding:var(--ui-space-3);border-radius:var(--ui-radius-md);background:var(--ui-surface-2);min-width:0}.ui-funnel__val{font-size:20px;font-weight:700;color:var(--ui-text);font-variant-numeric:tabular-nums;line-height:24px}.ui-funnel__lbl{font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted);overflow-wrap:anywhere}.ui-funnel__rate{order:-1;font-size:var(--gemboss-fs-caption);font-weight:600;color:var(--ui-series-1);font-variant-numeric:tabular-nums}@media (max-width: 520px){.ui-funnel{grid-auto-flow:row}}.ui-grid{display:grid;gap:var(--ui-space-4);align-items:start}.ui-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}.ui-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width: 1100px){.ui-grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 960px){.ui-grid--2{grid-template-columns:minmax(0,1fr)}}@media (max-width: 720px){.ui-grid--3{grid-template-columns:minmax(0,1fr)}}.ui-section-head{margin:var(--ui-space-4) 0 0}.ui-section-head>h2{margin:0;font-size:14px;line-height:20px;font-weight:650;color:var(--ui-text)}.ui-section-head>p{margin:2px 0 0;font-size:var(--gemboss-fs-caption);color:var(--ui-text-muted)}.ui-seg{max-width:100%;overflow-x:auto}.ui-seg :is(button,a).is-text{flex:none;white-space:nowrap}@media (max-width: 360px){.ui-seg :is(button,a).is-text{padding:0 9px}}@media (pointer: coarse),(max-width: 47.9975em){.ui-seg :is(button,a){height:44px;min-height:44px}}.ui-btn--critical{color:var(--gemboss-danger-strong)}.ui-btn--critical:hover{background:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong)}.ui-btn--primary.ui-btn--critical{background:var(--gemboss-danger);border-color:var(--gemboss-danger);color:var(--gemboss-on-primary)}.ui-btn--primary.ui-btn--critical:hover{background:var(--gemboss-danger-strong);border-color:var(--gemboss-danger-strong);color:var(--gemboss-on-primary)}.ui-btn--critical:focus-visible{outline-color:var(--gemboss-danger-strong)}@media (pointer: coarse),(max-width: 47.9975em){.ui-btn,.ui-btn.ui-btn--sm,.ui-select.ui-select{min-height:44px}.ui-btn--icon.ui-btn--sm,.ui-seg :is(button,a):not(.is-text){min-width:44px}}.ui-badge--success{background:var(--gemboss-success-soft);color:var(--gemboss-success-strong)}.ui-badge--warning{background:var(--gemboss-warning-soft);color:var(--gemboss-warning)}.ui-badge--critical{background:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong)}.ui-badge--info{background:var(--gemboss-accent-soft);color:var(--gemboss-accent-strong)}.ui-badge--dot:before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:currentColor}.ui-banner{--ui-banner-bg: var(--ui-surface-2);--ui-banner-fg: var(--ui-text);border-radius:var(--ui-radius-lg);overflow:hidden;background:var(--ui-surface);color:var(--ui-text);box-shadow:0 0 0 1px var(--ui-border),0 3px 1px -1px #1a1a1a12;font-size:var(--ui-fs-body);line-height:20px}.ui-banner--success{--ui-banner-bg: var(--gemboss-success-soft);--ui-banner-fg: var(--gemboss-success-strong)}.ui-banner--warning{--ui-banner-bg: var(--gemboss-warning-soft);--ui-banner-fg: var(--gemboss-warning)}.ui-banner--critical{--ui-banner-bg: var(--gemboss-danger-soft);--ui-banner-fg: var(--gemboss-danger-strong)}.ui-banner--info{--ui-banner-bg: var(--gemboss-accent-soft);--ui-banner-fg: var(--gemboss-accent-strong)}.ui-banner__head{display:flex;align-items:center;gap:var(--ui-space-2);min-height:32px;padding:6px var(--ui-space-3);background:var(--ui-banner-bg);color:var(--ui-banner-fg)}.ui-banner__icon{flex:none;width:20px;height:20px;fill:currentColor}.ui-banner__title{flex:1 1 auto;min-width:0;margin:0;font-size:var(--ui-fs-body);font-weight:650;line-height:20px}.ui-banner__close{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;margin:-6px -8px -6px 0;border:0;border-radius:var(--ui-radius-md);background:transparent;color:inherit;cursor:pointer}.ui-banner__close:hover{background:color-mix(in srgb,currentColor 10%,transparent)}.ui-banner__close:focus-visible{outline:2px solid var(--ui-focus);outline-offset:-2px}.ui-banner__close svg{width:16px;height:16px}.ui-banner__body{padding:var(--ui-space-3) var(--ui-space-4)}.ui-banner__body>:first-child{margin-top:0}.ui-banner__body>:last-child{margin-bottom:0}.ui-banner__actions{display:flex;flex-wrap:wrap;gap:var(--ui-space-2);margin-top:var(--ui-space-3)}@media (pointer: coarse),(max-width: 47.9975em){.ui-banner__close{width:44px;height:44px;margin:-12px -12px -12px 0}}.ui-help{margin:var(--ui-space-1) 0 0;font-size:var(--ui-fs-body);line-height:20px;color:var(--ui-text-muted)}.ui-error:empty{display:none}.ui-error{display:flex;gap:6px;margin:var(--ui-space-1) 0 0;font-size:var(--ui-fs-body);line-height:20px;color:var(--gemboss-danger-strong)}.ui-error:before{content:"";flex:none;width:16px;height:16px;margin-top:2px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 4h1.5v5.5h-1.5V6Zm.75 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/></svg>") center / contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 4h1.5v5.5h-1.5V6Zm.75 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/></svg>") center / contain no-repeat}.gemboss-field[aria-invalid=true],.gemboss-field--group:has([aria-invalid=true]),.ui-select[aria-invalid=true],.ui-textarea[aria-invalid=true]{border-color:var(--gemboss-danger-strong);background-color:var(--gemboss-danger-soft)}.ui-choices{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:0;padding:0;border:0;min-width:0}.ui-choices>legend{padding:0}.ui-switch>input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;width:32px;height:20px;margin:0;border-radius:var(--gemboss-radius-full);background:var(--gemboss-field-line);transition:background-color var(--gemboss-transition-fast) ease}.ui-switch>input[type=checkbox]:before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--gemboss-surface);box-shadow:0 1px 2px #0003;transition:transform var(--gemboss-transition-fast) ease}.ui-switch>input[type=checkbox]:checked{background:var(--ui-accent)}.ui-switch>input[type=checkbox]:checked:before{transform:translate(12px)}@media (prefers-reduced-motion: reduce){.ui-switch>input[type=checkbox],.ui-switch>input[type=checkbox]:before{transition:none}}.ui-tooltip{position:relative;display:inline-flex}.ui-tooltip__bubble{position:absolute;z-index:30;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);width:max-content;max-width:240px;padding:4px 8px;border-radius:var(--ui-radius-md);background:var(--ui-surface);color:var(--ui-text);font-size:var(--ui-fs-body);line-height:20px;font-weight:450;box-shadow:0 8px 16px -4px #1a1a1a38,0 0 0 1px var(--ui-border);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--gemboss-transition-fast) ease}.ui-tooltip--end .ui-tooltip__bubble{left:auto;right:0;transform:none}.ui-tooltip:hover>.ui-tooltip__bubble,.ui-tooltip:focus-within>.ui-tooltip__bubble{opacity:1;visibility:visible}.ui-spinner{display:inline-block;flex:none;width:20px;height:20px;box-sizing:border-box;border-radius:50%;border:2px solid color-mix(in srgb,var(--ui-text) 18%,transparent);border-top-color:var(--ui-text);animation:ui-spin .7s linear infinite;vertical-align:middle}.ui-spinner--lg{width:44px;height:44px;border-width:4px}@keyframes ui-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.ui-spinner{animation-duration:2s}}.ui-progress{appearance:none;-webkit-appearance:none;display:block;width:100%;height:8px;border:0;border-radius:var(--gemboss-radius-full);overflow:hidden;background:var(--gemboss-divider);color:var(--ui-accent)}.ui-progress::-webkit-progress-bar{background:var(--gemboss-divider);border-radius:inherit}.ui-progress::-webkit-progress-value{background:currentColor;border-radius:inherit}.ui-progress::-moz-progress-bar{background:currentColor;border-radius:inherit}.ui-progress--success{color:var(--gemboss-success)}.ui-progress--critical{color:var(--gemboss-danger)}.ui-modal--wide{width:min(620px,100%)}dialog.ui-modal{padding:0;max-width:calc(100% - 40px);max-height:calc(100dvh - 40px);color:var(--ui-text)}dialog.ui-modal[open]{display:flex;flex-direction:column}dialog.ui-modal::backdrop{background:#00000080}html:has(dialog.ui-modal:modal){overflow:hidden}@media (pointer: coarse),(max-width: 47.9975em){.ui-btn.ui-btn--sm{min-width:44px}}.ui-badge--wrap{white-space:normal;overflow-wrap:anywhere;line-height:16px}.ui-page-head--actions{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 16px}.ui-page-head--actions>:first-child{min-width:0}.ui-page-head__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ui-space-2)}.ui-chips>button.ui-tag--chip{min-height:28px;padding:4px 12px;border-radius:var(--ui-radius-md, 8px);cursor:pointer;font-family:inherit;font-size:var(--gemboss-fs-caption, 12px);color:var(--ui-text)}.ui-chips>button.ui-tag--chip:hover{background:var(--ui-surface-2);border-color:var(--ui-text-muted)}.ui-chips>button.ui-tag--chip:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px}.ui-chips>button.ui-tag--chip[aria-pressed=true]{background:var(--ui-accent-soft);border-color:var(--ui-accent);color:var(--ui-accent-strong);font-weight:600}@media (pointer: coarse),(max-width: 47.9975em){.ui-chips>button.ui-tag--chip{min-height:44px;min-width:44px;justify-content:center}}@media (max-width: 47.9975em){.gemboss-ec-input.gemboss-ec-input textarea{font-size:16px}}.ui-seg button[aria-pressed=true]{background:var(--ui-accent-soft);color:var(--ui-accent-strong)}:is(.gemboss-field,.ui-textarea)[readonly][readonly]{background:var(--ui-surface-2);border-color:var(--ui-border);cursor:default}.ui-modal>form{display:contents}.ui-modal>form>.ui-modal__head,.ui-modal>form>.ui-modal__foot{flex:none}.ui-modal>form>.ui-modal__body{flex:1 1 auto;min-height:0;overflow:auto}button.ui-metric{font:inherit;text-align:left;color:inherit;cursor:pointer}button.ui-metric:hover{border-color:var(--ui-text-muted)}button.ui-metric:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-metric.ui-metric:is([aria-pressed=true],[aria-current=page]){border-color:var(--gemboss-accent);box-shadow:inset 0 0 0 1px var(--gemboss-accent)}.ui-pager>a,.ui-pager>[aria-disabled=true]{min-width:32px;justify-content:center;box-sizing:border-box;gap:4px}.ui-pager>a[aria-current=page]{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-surface);font-size:var(--ui-fs-body);font-weight:600}.ui-pager>a[aria-current=page]:hover{background:var(--ui-text)}.ui-pager>[aria-disabled=true]{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border:1px solid var(--ui-border);border-radius:var(--ui-radius-md);color:var(--ui-text-muted);font-size:var(--ui-fs-body);opacity:.55;cursor:default}.ui-pager>[aria-disabled=true]:hover{background:none}.ui-pager__gap{min-width:16px;text-align:center;color:var(--ui-text-muted)}.ui-pager__range{margin-left:auto;color:var(--ui-text-muted);font-size:var(--ui-fs-body);font-variant-numeric:tabular-nums}.ui-more{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;padding:16px 0;color:var(--ui-text-muted);font-size:var(--ui-fs-body);text-align:center}.ui-more[hidden]{display:none}@media (pointer: coarse),(max-width: 47.9975em){.ui-pager>a,.ui-pager>[aria-disabled=true]{min-width:44px;min-height:44px}}@media (max-width: 35.9975em){.ui-pager>a:not([rel]):not([aria-current]):not([aria-disabled]),.ui-pager__gap{display:none}}.ui-chip{display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;height:var(--ui-btn-h, 28px);padding:0 12px;border:1px dashed var(--ui-border);border-radius:var(--ui-radius-md);background:var(--ui-surface);color:var(--ui-text);font:inherit;font-size:var(--ui-fs-caption);font-weight:550;line-height:16px;white-space:nowrap;text-decoration:none;cursor:pointer}.ui-chip:hover{border-style:solid;background:var(--ui-surface-2)}.ui-chip:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}.ui-chip:is([aria-pressed=true],[aria-current=page],[aria-current=true]){border-style:solid;border-color:var(--ui-accent);background:var(--ui-accent-soft);color:var(--ui-accent-strong)}@media (pointer: coarse),(max-width: 47.9975em){.ui-chip{height:auto;min-height:44px;min-width:44px}}.ui-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--ui-space-4)}.ui-stack--tight{gap:var(--ui-space-2)}
|
package/parts/core.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @gemboss/ui core.css — GENERATED by packages/ui/scripts/build-css.mjs from export:globals + export:tokens; do not edit
|
|
3
|
-
* gemboss commit:
|
|
3
|
+
* gemboss commit: 0f08408af446364b67b8792547f31a7991eb639f
|
|
4
4
|
*/
|
|
5
5
|
*{box-sizing:border-box}:root{--gemboss-primary: #1b1c1e;--gemboss-primary-dark: #000000;--gemboss-primary-soft: #f2f3f5;--gemboss-accent: #5661f5;--gemboss-accent-strong: #3a44de;--gemboss-accent-soft: #eef0fe;--gemboss-accent-wash: #f7f8ff;--gemboss-accent-tint: #dfe2ff;--gemboss-accent-mid: #c9cffd;--gemboss-text-strong: #1b1c1e;--gemboss-text: #1b1c1e;--gemboss-text-muted: #686b71;--gemboss-surface: #ffffff;--gemboss-canvas: #ffffff;--gemboss-preview-canvas: #eceef1;--gemboss-rail-bg: #ffffff;--gemboss-panel-bg: #ffffff;--gemboss-divider: #e5e7ea;--gemboss-invite-h: 0px;--gemboss-divider-soft: #edeff2;--gemboss-hover: #eceef2;--gemboss-active-bg: #f0f1f4;--gemboss-active-fg: #1b1c1e;--gemboss-danger: #d72c0d;--gemboss-danger-strong: #b42318;--gemboss-danger-soft: #fff0e9;--gemboss-danger-border: #f5c9bc;--gemboss-success: #007f5f;--gemboss-success-strong: #0a6a4c;--gemboss-success-soft: #e3f1df;--gemboss-success-border: #b7dfcd;--gemboss-warning: #9a6700;--gemboss-warning-soft: #fff8e0;--gemboss-warning-border: #f5d569;--gemboss-radius-xs: 4px;--gemboss-radius-sm: 6px;--gemboss-radius-md: 8px;--gemboss-radius-lg: 12px;--gemboss-radius-xl: 16px;--gemboss-radius-2xl: 20px;--gemboss-radius-full: 999px;--gemboss-shadow-resting: 0 1px 2px rgba(31, 30, 29, .04), 0 2px 6px rgba(31, 30, 29, .06);--gemboss-shadow-raised: 0 4px 16px rgba(31, 30, 29, .1);--gemboss-shadow-overlay: 0 16px 48px rgba(31, 30, 29, .18);--gemboss-transition-fast: .12s;--gemboss-transition-base: .15s;--gemboss-fs-micro: 11px;--gemboss-fs-caption: 12px;--gemboss-fs-body: 14px;--gemboss-fs-body-lg: 16px;--gemboss-fs-h3: 16px;--gemboss-fs-h2: 20px;--gemboss-fs-h1: 24px;--gemboss-fs-display: 30px;--gemboss-dark-bg: #0a0a0c;--gemboss-dark-rail: #0e0e11;--gemboss-dark-surface: #16161a;--gemboss-dark-surface-2: #1e1e24;--gemboss-dark-divider: #2a2a31;--gemboss-dark-text: #ededf0;--gemboss-dark-muted: #9a9aa4;--gemboss-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--gemboss-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;--gemboss-field-bg: #fdfdfd;--gemboss-field-bg-hover: #fafafa;--gemboss-field-ink: #303030;--gemboss-field-placeholder: #616161;--gemboss-field-line: #8a8a8a;--gemboss-field-line-hover: #616161;--gemboss-field-line-active: #1a1a1a;--gemboss-chip-ink: #303633;--gemboss-chip-line: #cfd6ce;--gemboss-chip-line-hover: #aab4ad;--gemboss-chip-bg-hover: #f6f7f5;--gemboss-on-primary: #ffffff;--gemboss-topbar-bg: rgba(255, 255, 255, .98);--gemboss-nav-bg: var(--gemboss-surface);--gemboss-nav-hover: rgba(20, 19, 18, .045)}:root{--gemboss-primary: #1b1c1e;--gemboss-primary-dark: #000000;--gemboss-primary-soft: #f2f3f5;--gemboss-accent: #5661f5;--gemboss-accent-strong: #3a44de;--gemboss-accent-soft: #eef0fe;--gemboss-active-bg: #f0f1f4;--gemboss-active-fg: #1b1c1e;--gemboss-app-bg: #ffffff}
|
package/parts/shell.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @gemboss/ui shell.css — GENERATED by packages/ui/scripts/build-css.mjs from export:shell + src/app-shell.css; do not edit
|
|
3
|
-
* gemboss commit:
|
|
3
|
+
* gemboss commit: 0f08408af446364b67b8792547f31a7991eb639f
|
|
4
4
|
*/
|
|
5
5
|
.gemboss-popover-surface{background:var(--gemboss-surface);background:color-mix(in srgb,var(--gemboss-surface) 93%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);border:1px solid var(--gemboss-divider);border-radius:var(--gemboss-radius-lg);box-shadow:var(--gemboss-shadow-raised)}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.gemboss-popover-surface{background:var(--gemboss-surface)}}.icon-nav{position:fixed;top:56px;left:0;z-index:200;height:calc(100dvh - 56px);background:var(--gemboss-rail-bg);border-right:1px solid var(--gemboss-divider);display:flex;flex-direction:column;padding-top:8px;overflow:hidden}.gemboss-account-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:220px;z-index:320;overflow:hidden}.gemboss-account-menu-item,.ui-menu__item{display:block;width:100%;min-height:44px;padding:12px 16px;border:0;background:transparent;font:inherit;font-size:13px;color:var(--gemboss-text);text-align:left;text-decoration:none;cursor:pointer;transition:background var(--gemboss-transition-fast) ease,color var(--gemboss-transition-fast) ease}.gemboss-account-menu-item:hover,.ui-menu__item:hover{background:var(--gemboss-hover)}.gemboss-account-menu-item:focus-visible,.ui-menu__item:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:-2px;background:var(--gemboss-hover)}.gemboss-account-menu-item.danger,.ui-menu__item--danger{color:var(--gemboss-danger-strong)}.gemboss-account-chip{width:30px;height:30px;border:1px solid #cfd6ce;border-radius:var(--gemboss-radius-full);background:#f5f7f4;color:#303633;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:11px;font-weight:700;cursor:pointer}.gemboss-platform-main{box-sizing:border-box;min-height:100dvh;padding-top:56px;background:var(--gemboss-app-bg)}.icon-nav{top:56px;height:calc(100dvh - 56px);background:var(--gemboss-nav-bg);border-right-color:var(--gemboss-divider)}@media (max-width: 1040px){.gemboss-platform-topbar{grid-template-columns:minmax(120px,1fr) minmax(220px,520px) minmax(120px,1fr)}}@media (max-width: 760px){.gemboss-platform-main{margin-left:0}}.gemboss-account-chip{width:32px;height:32px;border-radius:50%;background:var(--gemboss-primary);color:#fff;font-weight:600;font-size:12px;display:inline-flex;align-items:center;justify-content:center;border:none;cursor:pointer;transition:transform var(--gemboss-transition-base) ease}.gemboss-account-chip:hover{transform:scale(1.05)}.gemboss-account-chip:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:2px}.gemboss-platform-main{margin-top:56px;min-height:calc(100vh - 56px);padding:24px;background:#fafafb}@media (max-width: 768px){.gemboss-platform-main{margin-left:0;padding:16px}}.gemboss-platform-shell{display:block;min-height:100vh;background:var(--gemboss-app-bg)}.gemboss-platform-topbar{position:fixed;inset:0 0 auto;z-index:300;height:56px;border-bottom:1px solid var(--gemboss-divider);background:var(--gemboss-topbar-bg);display:grid;grid-template-columns:minmax(200px,1fr) minmax(280px,560px) minmax(200px,1fr);align-items:center;gap:16px;padding:0 16px;box-shadow:var(--gemboss-shadow-resting)}:root:has(.gemboss-platform-topbar){scroll-padding-top:64px}.gemboss-account-chip{width:32px;height:32px;border:1px solid var(--gemboss-chip-line);border-radius:var(--gemboss-radius-full);background:var(--gemboss-surface);color:var(--gemboss-chip-ink);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:11px;font-weight:700;cursor:pointer;transition:border-color var(--gemboss-transition-base) ease,background-color var(--gemboss-transition-base) ease}.gemboss-account-chip:hover{border-color:var(--gemboss-chip-line-hover);background:var(--gemboss-chip-bg-hover);transform:none}.icon-nav{position:fixed;top:56px;left:0;z-index:200;height:calc(100dvh - 56px);border-right:1px solid var(--gemboss-divider);background:var(--gemboss-nav-bg);padding-top:12px}.gemboss-platform-main{min-height:calc(100vh - 56px);margin-top:56px;background:var(--gemboss-app-bg);padding:24px}@media (max-width: 1120px){.gemboss-platform-topbar{grid-template-columns:220px minmax(220px,1fr) auto;gap:12px}}@media (max-width: 760px){.gemboss-platform-topbar{height:auto;min-height:56px;grid-template-columns:minmax(0,1fr) auto;padding:12px}.gemboss-account-chip,.icon-nav{display:none}.gemboss-platform-main{margin-left:0;padding:16px}}.gnav-scroll{scrollbar-width:thin;scrollbar-color:rgba(31,30,29,.22) transparent}.gemboss-assistant-railfoot.is-button{width:100%;border:none;background:none;cursor:pointer;text-align:left;font:inherit;border-radius:8px;transition:background .12s ease,color .12s ease}.gemboss-assistant-railfoot.is-button:hover{background:var(--gemboss-primary-soft);color:var(--gemboss-primary-dark)}.gemboss-assistant-empty{padding:24px 20px;color:var(--gemboss-text-muted);font-size:13px}@media (max-width: 760px){.gemboss-platform-topbar{display:flex;align-items:center;gap:8px;height:56px;min-height:56px;padding:0 12px}.gemboss-account-chip{display:inline-flex}.gemboss-platform-main{padding-top:16px;padding-bottom:calc(56px + env(safe-area-inset-bottom))}}@media (pointer: coarse){.gemboss-account-chip{width:44px;height:44px}.gnav-item{min-height:44px}.gemboss-assistant-collapse,.gemboss-assistant-newchat{min-height:44px;min-width:44px}}.icon-nav{width:240px;padding:12px 0 0;overflow:hidden;background:var(--gemboss-nav-bg);display:flex;flex-direction:column}.gnav-scroll{flex:1;overflow-y:auto;overflow-x:hidden;padding-inline:12px}.gnav-bottom{padding:0 12px 12px}.gnav-item{display:flex;align-items:center;gap:12px;width:100%;padding:8px 12px;margin:1px 0;border:0;background:transparent;cursor:pointer;text-align:left;border-radius:var(--gemboss-radius-md);text-decoration:none;font-family:inherit;color:var(--gemboss-text);font-size:var(--gemboss-fs-body);font-weight:500;line-height:1.2;transition:background-color var(--gemboss-transition-fast) ease,color var(--gemboss-transition-fast) ease}.gnav-item:hover{background:var(--gemboss-nav-hover)}.gnav-item:focus-visible{outline:2px solid var(--gemboss-accent);outline-offset:-2px}.gnav-item.active{color:var(--gemboss-active-fg);font-weight:600}.gnav-group:not(.has-active-child)>.gnav-item.active{background:var(--gemboss-active-bg)}.gnav-group:not(.has-active-child)>.gnav-item.active:hover{background:var(--gemboss-active-bg)}.gnav-group.has-active-child>.gnav-item.active:hover{background:var(--gemboss-nav-hover)}.gnav-ico{flex:0 0 20px;width:20px;height:20px;display:grid;place-items:center}.gnav-ico svg{width:20px;height:20px;fill:currentColor}.gnav-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gnav-sub{list-style:none;margin:1px 0 6px;padding:0}.gnav-subitem{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px 6px 44px;margin:1px 0;border-radius:var(--gemboss-radius-sm);color:var(--gemboss-text-muted);font-size:13px;line-height:1.2;text-decoration:none;white-space:nowrap;transition:background-color var(--gemboss-transition-fast) ease,color var(--gemboss-transition-fast) ease}@media (pointer: coarse){.gnav-subitem{min-height:44px}}.gnav-subitem:hover{background:var(--gemboss-nav-hover);color:var(--gemboss-text)}.gnav-subitem.active{color:var(--gemboss-active-fg);font-weight:600;background:var(--gemboss-active-bg)}.gnav-subitem.active:hover{background:var(--gemboss-active-bg);color:var(--gemboss-active-fg)}.gnav-subitem.active:before{content:"";position:absolute;left:20px;top:50%;transform:translateY(-50%);width:3px;height:15px;border-radius:2px;background:var(--gemboss-primary)}.gnav-subitem.is-soon{opacity:.5;cursor:default}.gnav-subitem em{font-style:normal;font-size:var(--gemboss-fs-micro);font-weight:600;letter-spacing:.04em;text-transform:uppercase;border:1px solid var(--gemboss-divider);border-radius:var(--gemboss-radius-sm);padding:1px 6px}.gnav-sep{height:1px;background:var(--gemboss-divider);margin:8px 6px}.gnav-item.gnav-assistant{color:var(--gemboss-accent-strong);font-weight:600;background:var(--gemboss-accent-soft)}.gnav-item.gnav-assistant .gnav-ico svg{fill:var(--gemboss-accent)}.gnav-item.gnav-assistant:hover{background:color-mix(in srgb,var(--gemboss-accent) 16%,var(--gemboss-surface))}.gnav-item.gnav-assistant.active{background:var(--gemboss-active-bg);color:var(--gemboss-active-fg)}.gnav-item.gnav-assistant.active .gnav-ico svg{fill:var(--gemboss-active-fg)}.gemboss-platform-main{margin-left:240px}.gemboss-mobile-menu-btn,.gemboss-mobile-nav-backdrop{display:none}@media (max-width: 760px){.gemboss-platform-main{margin-left:0;padding-bottom:env(safe-area-inset-bottom)}.gemboss-mobile-menu-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:38px;height:38px;margin-left:-2px;border:0;border-radius:8px;background:transparent;cursor:pointer;color:var(--gemboss-text)}.gemboss-mobile-menu-btn:active{background:var(--gemboss-hover)}.icon-nav{display:flex;width:min(82vw,300px);transform:translate(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1),box-shadow .26s cubic-bezier(.4,0,.2,1);z-index:1000;box-shadow:none}.gemboss-platform-shell.is-mobile-nav-open .icon-nav{transform:translate(0);box-shadow:2px 0 26px #1f1e1d33}.gemboss-mobile-nav-backdrop{display:block;position:fixed;inset:56px 0 0;width:100%;border:0;padding:0;background:#14131261;opacity:0;pointer-events:none;transition:opacity .22s ease;z-index:999}.gemboss-platform-shell.is-mobile-nav-open .gemboss-mobile-nav-backdrop{opacity:1;pointer-events:auto}}@media (max-width: 305.98px){.gemboss-platform-topbar{padding:0 8px}}@media (min-width: 306px) and (max-width: 460px){.gemboss-platform-topbar{padding:0 8px}.gemboss-mobile-menu-btn,.gemboss-account-chip{width:44px;height:44px}}.gemboss-assistant-chatslot{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;min-width:0}.gemboss-assistant-chatslot[hidden]{display:none}.gemboss-assistant-page>.gemboss-assistant-tabs{flex:0 0 auto;display:flex;align-items:center;gap:4px;padding:4px 8px 0;overflow-x:auto;scrollbar-width:none}.gemboss-assistant-tabs::-webkit-scrollbar{display:none}.gemboss-assistant-tab{display:flex;align-items:center;flex:0 1 auto;min-width:0;max-width:190px;border:1px solid var(--gemboss-divider);border-radius:var(--gemboss-radius-md);background:transparent}.gemboss-assistant-tab.active{background:var(--gemboss-active-bg);border-color:var(--gemboss-active-bg)}.gemboss-assistant-tab-main{display:flex;align-items:center;gap:6px;min-width:0;min-height:44px;padding:0 4px 0 8px;border:0;background:transparent;font:inherit;font-size:var(--gemboss-fs-caption);color:var(--gemboss-text-muted);cursor:pointer}.gemboss-assistant-tab.active .gemboss-assistant-tab-main{color:var(--gemboss-text-strong)}.gemboss-assistant-tab-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gemboss-assistant-tab-dot{flex:0 0 auto;width:6px;height:6px;border-radius:var(--gemboss-radius-full);background:var(--gemboss-divider)}.gemboss-assistant-tab-dot.is-running{background:var(--gemboss-primary);animation:gemboss-assistant-pulse 1.4s ease-in-out infinite}.gemboss-assistant-tab-close{flex:0 0 auto;width:44px;height:44px;display:grid;place-items:center;border:0;background:transparent;color:var(--gemboss-text-muted);cursor:pointer;padding:0}.gemboss-assistant-tab-close:hover{color:var(--gemboss-text-strong)}.gemboss-assistant-tab-close svg{width:14px;height:14px}.gemboss-assistant-sronly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.gemboss-assistant-thread-running{flex:0 0 auto;width:6px;height:6px;border-radius:var(--gemboss-radius-full);background:var(--gemboss-primary);animation:gemboss-assistant-pulse 1.4s ease-in-out infinite}@media (prefers-reduced-motion: reduce){.gemboss-assistant-tab-dot.is-running,.gemboss-assistant-thread-running{animation:none}}.gemboss-assistant-route-claim{display:block;height:100%}.gemboss-assistant-layout.is-dock{height:auto;min-height:0}.gemboss-assistant-layout.is-dock .gemboss-assistant-page{height:auto;max-width:none;padding:4px 0 8px}.gnav-item.gnav-assistant{position:relative}body.gemboss-assistant-busy .gnav-item.gnav-assistant:after,body.gemboss-assistant-unread .gnav-item.gnav-assistant:after{content:"";position:absolute;top:6px;left:26px;width:8px;height:8px;border-radius:50%;border:2px solid var(--gemboss-surface)}body.gemboss-assistant-busy .gnav-item.gnav-assistant:after{background:var(--gemboss-primary);animation:gemboss-assistant-pulse 1.4s ease-in-out infinite}body.gemboss-assistant-unread .gnav-item.gnav-assistant:after{background:var(--gemboss-success-strong)}@media (prefers-reduced-motion: reduce){body.gemboss-assistant-busy .gnav-item.gnav-assistant:after{animation:none}}.gemboss-assistant-layout{display:flex;height:calc(100dvh - 56px);width:100%;min-height:0}.gemboss-assistant-rail{flex:0 0 264px;width:264px;display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--gemboss-divider);background:transparent;padding:16px 12px 12px;gap:12px;transition:flex-basis .18s ease,width .18s ease}.gemboss-assistant-rail-top{display:flex;align-items:center;gap:6px}.gemboss-assistant-newchat{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;padding:12px;border:1px solid var(--gemboss-divider);border-radius:12px;background:transparent;color:var(--gemboss-text);font-size:var(--gemboss-fs-body);font-weight:600;cursor:pointer;transition:background .12s ease,border-color .12s ease}.gemboss-assistant-newchat:hover{background:#00000009;border-color:var(--gemboss-text-muted)}.gemboss-assistant-newchat svg{width:17px;height:17px;fill:currentColor;flex:0 0 auto}.gemboss-assistant-newchat span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto}.gemboss-assistant-kbd{flex:0 0 auto;font-size:var(--gemboss-fs-micro);font-weight:600;line-height:1;padding:4px 6px;border:1px solid var(--gemboss-divider);border-radius:6px;background:transparent;color:var(--gemboss-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.gemboss-assistant-search:focus-within .gemboss-assistant-kbd{display:none}.gemboss-assistant-collapse{flex:0 0 auto;display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--gemboss-text-muted);cursor:pointer;transition:background .12s ease,color .12s ease}.gemboss-assistant-collapse:hover{background:#0000000d;color:var(--gemboss-text)}.gemboss-assistant-collapse svg{width:16px;height:16px;fill:currentColor}.gemboss-assistant-search{gap:6px}.gemboss-assistant-search>svg{width:15px;height:15px;fill:var(--gemboss-text-muted);flex:0 0 auto}.gemboss-assistant-search-clear{display:grid;place-items:center;width:20px;height:20px;border:0;border-radius:6px;background:transparent;color:var(--gemboss-text-muted);cursor:pointer}.gemboss-assistant-search-clear:hover{background:#00000012;color:var(--gemboss-text)}.gemboss-assistant-search-clear svg{width:13px;height:13px;fill:currentColor}.gemboss-assistant-railfoot{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:8px 12px 2px;border-top:1px solid var(--gemboss-divider);margin-top:4px;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption);line-height:1.35}.gemboss-assistant-railfoot svg{width:13px;height:13px;flex:0 0 auto;fill:currentColor;opacity:.8}.gemboss-assistant-threads{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:2px}.gemboss-assistant-threads-empty{padding:16px 8px;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption)}.gemboss-assistant-group{display:flex;flex-direction:column;gap:2px}.gemboss-assistant-group+.gemboss-assistant-group{margin-top:12px}.gemboss-assistant-group-label{padding:4px 12px;font-size:11px;font-weight:600;letter-spacing:.02em;color:var(--gemboss-text-muted);text-transform:uppercase}.gemboss-assistant-thread{position:relative;display:flex;align-items:center;border-radius:8px;transition:background .12s ease}.gemboss-assistant-thread:hover{background:var(--gemboss-hover, rgba(0,0,0,.04))}.gemboss-assistant-thread.active{background:#00000012}.gemboss-assistant-thread-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px;border:0;background:transparent;text-align:left;cursor:pointer}.gemboss-assistant-thread-titlerow{display:flex;align-items:center;gap:6px;width:100%;min-width:0}.gemboss-assistant-pin-dot{width:12px;height:12px;flex:0 0 auto;fill:var(--gemboss-text-muted)}.gemboss-assistant-thread-title{flex:1 1 auto;min-width:0;font-size:13px;font-weight:500;color:var(--gemboss-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gemboss-assistant-thread-meta{font-size:var(--gemboss-fs-caption);color:var(--gemboss-text-muted)}.gemboss-assistant-thread.menu-open{background:#00000012}.gemboss-assistant-thread.menu-open .gemboss-assistant-thread-actions{opacity:1}.gemboss-assistant-menu{z-index:60;width:184px;padding:6px;display:flex;flex-direction:column}.gemboss-assistant-menu-confirm{padding:8px 12px 6px;font-size:var(--gemboss-fs-caption);font-weight:600;color:var(--gemboss-text)}.gemboss-assistant-menu button{display:flex;align-items:center;gap:8px;width:100%;padding:8px 12px;border:0;border-radius:8px;background:transparent;text-align:left;font-size:13px;color:var(--gemboss-text);cursor:pointer}.gemboss-assistant-menu button:hover{background:var(--gemboss-hover, rgba(0,0,0,.05))}.gemboss-assistant-menu button.danger{color:var(--gemboss-danger-strong)}.gemboss-assistant-menu button svg{width:15px;height:15px;fill:currentColor;flex:0 0 auto}.gemboss-assistant-thread-actions{position:absolute;right:6px;display:flex;gap:2px;opacity:0;transition:opacity .12s ease}.gemboss-assistant-thread:hover .gemboss-assistant-thread-actions,.gemboss-assistant-thread:focus-within .gemboss-assistant-thread-actions{opacity:1}.gemboss-assistant-thread-act{display:grid;place-items:center;width:26px;height:26px;border:0;border-radius:8px;background:transparent;color:var(--gemboss-text-muted);cursor:pointer;transition:background .12s ease,color .12s ease}.gemboss-assistant-thread-act:hover{background:#00000012;color:var(--gemboss-text)}.gemboss-assistant-thread-act.danger:hover{color:var(--gemboss-danger-strong)}.gemboss-assistant-thread-act svg{width:15px;height:15px;fill:currentColor}.gemboss-assistant-thread.editing{background:#00000012}.gemboss-assistant-thread-edit{display:flex;align-items:center;gap:2px;width:100%;padding:6px}.gemboss-assistant-thread-edit input{flex:1 1 auto;min-width:0}.gemboss-assistant-layout .gemboss-assistant-page{height:100%;max-width:820px;flex:1 1 auto;min-width:0;padding-top:16px}.gemboss-assistant-layout .gemboss-assistant-page.is-switching{opacity:.55;transition:opacity .12s ease;pointer-events:none}.gemboss-assistant-rail.is-collapsed{flex-basis:60px;width:60px;padding:16px 8px 12px}.gemboss-assistant-rail.is-collapsed .gemboss-assistant-rail-top{flex-direction:column;gap:8px}.gemboss-assistant-rail.is-collapsed .gemboss-assistant-newchat{justify-content:center;padding:8px;flex:0 0 auto}.gemboss-assistant-rail.is-collapsed .gemboss-assistant-newchat span,.gemboss-assistant-rail.is-collapsed .gemboss-assistant-search,.gemboss-assistant-rail.is-collapsed .gemboss-assistant-railfoot,.gemboss-assistant-rail.is-collapsed .gemboss-assistant-threads{display:none}@media (max-width: 760px){.gemboss-assistant-rail{flex-basis:60px;width:60px;padding:16px 8px 12px}.gemboss-assistant-rail .gemboss-assistant-rail-top{flex-direction:column;gap:8px}.gemboss-assistant-newchat{justify-content:center;padding:8px;flex:0 0 auto}.gemboss-assistant-newchat span,.gemboss-assistant-search,.gemboss-assistant-railfoot,.gemboss-assistant-threads,.gemboss-assistant-collapse{display:none}}.gemboss-assistant-page{height:calc(100dvh - 56px);width:100%;max-width:760px;margin:0 auto;padding:24px 0 16px;display:flex;flex-direction:column;min-height:0}.gemboss-assistant-page>*{flex:1 1 auto;min-height:0}.gemboss-assistant-empty{flex:1;display:grid;place-items:center;color:var(--gemboss-text-muted);font-size:14px}.gemboss-platform-shell{display:flow-root}.gemboss-platform-main{padding-bottom:calc(24px + var(--gemboss-invite-h, 0px))}.gb-account{position:relative}.gb-account>summary{list-style:none}.gb-account>summary::-webkit-details-marker{display:none}.gb-account-head{padding:12px 16px;border-bottom:1px solid var(--gemboss-divider)}.gb-account-name{font-size:13px;font-weight:600;color:var(--gemboss-text-strong)}.gb-account-email{font-size:12px;color:var(--gemboss-text-muted)}.gb-account-role{display:inline-block;margin-top:4px;padding:1px 6px;border-radius:4px;font-size:11px;font-weight:600;color:var(--gemboss-active-fg);background:var(--gemboss-active-bg)}.gb-account-form{margin:0}.gnav-scroll::-webkit-scrollbar{width:9px}.gnav-scroll::-webkit-scrollbar-track{background:transparent}.gnav-scroll::-webkit-scrollbar-thumb{background:#1f1e1d33;border-radius:6px;border:2px solid transparent;background-clip:content-box}@keyframes gemboss-assistant-pulse{0%,to{opacity:1}50%{opacity:.35}}:where(html,body,button){font-family:var(--gemboss-font-sans)}:where(body){font-size:13px;line-height:20px;font-weight:450;color:var(--gemboss-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:where(h1,h2,h3){letter-spacing:-.01em;line-height:1.3}:where(.gemboss-platform-shell) :where(h1,h2,h3,h4,h5,h6,p):where(:not([class])):not(:where(.ui-prose,[data-content],[class*=prose i],[class*=markdown i],.md-body,.recap-md,.asst-md,.article-body) *){margin:0;font-size:1em;font-weight:inherit;line-height:inherit}.gemboss-topbar-start{display:flex;align-items:center;gap:8px;min-width:0}.gemboss-topbar-center{display:flex;justify-content:center;min-width:0}.gemboss-topbar-end{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}@media (max-width: 760px){.gemboss-topbar-center{flex:1 1 0;min-width:96px;justify-content:flex-start}.gemboss-topbar-center:empty{min-width:0}.gemboss-topbar-end:empty{display:none}.gemboss-topbar-end{flex:0 0 auto}.gemboss-topbar-start{flex:0 1 auto}.gemboss-topbar-start>.gemboss-mobile-menu-btn{flex:0 0 auto}.gemboss-topbar-start>.gb-brand{min-width:44px}}.gnav-heading{padding:10px 12px 4px;font-size:var(--gemboss-fs-micro);font-weight:600;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--gemboss-text-muted)}.gnav-scroll>.gnav-heading:first-child,.gnav-scroll>.gnav-section:first-child>.gnav-heading:first-child{padding-top:2px}.gnav-count{margin-left:auto;flex:0 0 auto;min-width:20px;padding:0 6px;border-radius:var(--gemboss-radius-full);background:var(--gemboss-hover);color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-micro);font-weight:700;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}.gnav-item.active .gnav-count{background:var(--gemboss-primary);color:var(--gemboss-on-primary)}.gnav-item:is([aria-busy=true],:has(>.gnav-pending)),.gnav-subitem:is([aria-busy=true],:has(>.gnav-pending)){cursor:progress}.gnav-item:is([aria-busy=true],:has(>.gnav-pending))>.gnav-ico>*{visibility:hidden}.gnav-item:is([aria-busy=true],:has(>.gnav-pending))>.gnav-ico:after,.gnav-subitem:is([aria-busy=true],:has(>.gnav-pending)):after,.gb-pending-mark{content:"";display:inline-block;vertical-align:middle;grid-area:1 / 1;flex:none;box-sizing:border-box;width:20px;height:20px;border-radius:50%;border:2px solid color-mix(in srgb,currentColor 18%,transparent);border-top-color:currentColor;animation:gnav-spin .7s linear infinite}.gnav-subitem:is([aria-busy=true],:has(>.gnav-pending)):after{position:absolute;left:22px;top:50%;margin-top:-6px;width:12px;height:12px;border-width:1.5px}@keyframes gnav-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.gnav-item:is([aria-busy=true],:has(>.gnav-pending))>.gnav-ico:after,.gnav-subitem:is([aria-busy=true],:has(>.gnav-pending)):after,.gb-pending-mark{animation-duration:2s}}a[data-gb-pending]:has(>.gb-pending-mark),a[data-gb-pending][aria-busy=true]{cursor:progress}a[data-gb-pending]>.gb-pending-mark{display:inline-block;width:12px;height:12px;border-width:1.5px;margin-left:6px;vertical-align:-1px}a[data-gb-pending=corner]{position:relative}a[data-gb-pending=corner]>.gb-pending-mark{position:absolute;top:12px;right:12px;width:16px;height:16px;margin:0}.gb-route-holding{padding-top:4px}.gb-route-holding .ui-skeleton{gap:16px}.gb-route-holding__heading{margin:0 0 20px;font-size:20px;font-weight:650;line-height:1.3;color:var(--gemboss-text)}.gb-route-holding .ui-skeleton__line{height:10px}.gb-route-holding .ui-skeleton__line.gb-route-holding__title{height:20px;width:34%;margin-bottom:8px}.gb-route-holding .ui-skeleton__line:nth-last-child(4){width:46%}.gb-route-holding .ui-skeleton__line:nth-last-child(3){width:92%}.gb-route-holding .ui-skeleton__line:nth-last-child(2){width:78%}.gb-route-holding .ui-skeleton__line:nth-last-child(1){width:61%}.gb-route-cover{display:none}html[data-gb-navigating] .gb-route-cover{display:block;position:fixed;inset:56px 0 0 240px;z-index:5;overflow:hidden;box-sizing:border-box;padding:24px;background:var(--gemboss-app-bg);pointer-events:none;animation:gb-route-cover-in .08s ease-out both}@keyframes gb-route-cover-in{0%{opacity:0}to{opacity:1}}@media (max-width: 760px){html[data-gb-navigating] .gb-route-cover{left:0;padding:16px}}@media (prefers-reduced-motion: reduce){html[data-gb-navigating] .gb-route-cover{animation-duration:0s}}.gnav-pending{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.gb-brand{min-width:0;height:40px;margin:0;padding:0 8px;border-radius:var(--gemboss-radius-md);display:inline-flex;align-items:center;gap:4.5px;color:var(--gb-brand-ink, #14151a);text-decoration:none;transition:background-color var(--gemboss-transition-base) ease}.gb-brand:hover{background:var(--gemboss-hover)}.gb-brand:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:2px}.gb-brand-gem{display:block;flex:0 0 auto}.gb-brand-name{font-family:Inter,var(--gemboss-font-sans);font-size:13.3px;font-weight:700;letter-spacing:-.13px;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}@media (max-width: 460px){.gb-brand-name{display:none}.gb-brand{min-width:44px;height:44px;justify-content:center}}.gemboss-topbar-search{width:100%;max-width:560px;height:36px;min-width:0;margin:0 auto;border:1px solid var(--gemboss-field-line);border-radius:var(--gemboss-radius-md);background:var(--gemboss-field-bg);padding:0 8px 0 12px;display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:8px;align-items:center;color:var(--gemboss-text-muted)}.gemboss-topbar-search:hover{border-color:var(--gemboss-field-line-hover);background:var(--gemboss-field-bg-hover)}.gemboss-topbar-search:focus-within{border-color:var(--gemboss-field-line-active);background:var(--gemboss-surface)}.gemboss-topbar-search-icon{width:18px;height:18px;color:currentColor}.gemboss-topbar-search-input{min-width:0;height:calc(100% + 2px);border:0;background:transparent;padding:0;margin:-1px 0;font:inherit;font-size:var(--gemboss-fs-body);line-height:18px;color:var(--gemboss-field-ink);outline:none}.gemboss-topbar-search-input::placeholder{color:var(--gemboss-field-placeholder);opacity:1}.gemboss-topbar-search-kbd{border:1px solid var(--gemboss-field-line);border-radius:var(--gemboss-radius-sm);background:var(--gemboss-surface);padding:1px 6px;color:var(--gemboss-text-muted);font-family:inherit;font-size:var(--gemboss-fs-micro);line-height:16px}.gemboss-topbar-search:focus-within .gemboss-topbar-search-kbd{display:none}@media (pointer: coarse),(max-width: 47.9975em){.gemboss-topbar-search{height:44px}}@media (max-width: 460px){.gemboss-topbar-search-kbd{display:none}}.ui-page{box-sizing:border-box;width:100%;min-width:0;max-width:var(--ui-content-max, 900px);margin-inline:auto}.ui-page--feed{max-width:720px}.ui-page--form{max-width:662px}.ui-page--canvas{max-width:1440px}.ui-page--full{max-width:none}.ui-menu__item{display:flex;align-items:center;gap:var(--ui-space-2);white-space:nowrap;border-radius:var(--ui-radius-sm)}@media (max-width: 47.9975em){.gemboss-assistant-collapse,.gemboss-assistant-newchat{min-height:44px;min-width:44px}}
|
package/src/assistant-plain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(d){"use strict";var G=d.gembossUI;if(!G){d.console&&d.console.error("@gemboss/ui assistant-plain.js: load kit-plain.js first (it defines gembossUI)");return}if(G.assistantFrame)return;var _=280,Ae=480,Ve=56,je=12,De=Ve+je,oe=24,T=380,se=400,le=720,Ne=480,He="(min-width: 1100px)",de="--gb-assistant-side-w",K=9007199254740991;function ue(n,i){var r=isFinite(i)&&i>0?Math.max(T,Math.min(le,i-Ne)):le;return Math.min(Math.max(Math.round(n),T),r)}function Me(n,i,r){return r<i?i:Math.min(Math.max(Math.round(n),i),r)}function P(n,i){var r=Math.max(_,i-De);return Math.min(Math.max(Math.round(n),_),r)}function U(n,i){var r=n!==null&&isFinite(n)&&n>0?n:1/0;return P(r,i)}var Ie={presentation:"hidden",mounted:!1,busy:!1,unread:!1,dockHeight:Ae,dockOffsetRight:oe,openNonce:0,sideWidth:se,floatShape:"side",sideAllowed:!1};function h(n,i){var r={},p;for(p in n)r[p]=n[p];for(p in i)r[p]=i[p];return r}function X(n){return n.sideAllowed?n.floatShape:"dock"}function ce(n,i){switch(i.type){case"enter-full":return h(n,{presentation:"full",mounted:!0,unread:!1,openNonce:n.openNonce+1});case"leave-full":return n.presentation!=="full"?n:h(n,{presentation:n.busy?X(n):"mini"});case"dock":return h(n,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:n.openNonce+1});case"side":return n.sideAllowed?h(n,{presentation:"side",floatShape:"side",mounted:!0,unread:!1,openNonce:n.openNonce+1}):h(n,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:n.openNonce+1});case"reopen":return h(n,{presentation:X(n),mounted:!0,unread:!1,openNonce:n.openNonce+1});case"side-allowed":return i.allowed===n.sideAllowed?n:i.allowed?h(n,{sideAllowed:!0,presentation:n.presentation==="dock"&&n.floatShape==="side"?"side":n.presentation}):h(n,{sideAllowed:!1,presentation:n.presentation==="side"?"dock":n.presentation});case"restore-float":return h(n,{floatShape:i.shape});case"minimize":return h(n,{presentation:"mini"});case"dismiss":return n.busy?h(n,{presentation:n.presentation==="mini"?X(n):"mini"}):h(n,{presentation:"hidden"});case"busy":{if(i.busy===n.busy)return n;var r=n.presentation==="mini"||n.presentation==="hidden";return h(n,{busy:i.busy,unread:!i.busy&&r?!0:n.unread})}case"resize":return h(n,{dockHeight:P(i.height,i.viewport)});case"slide":return h(n,{dockOffsetRight:Me(i.offsetRight,i.min,i.max)});case"side-resize":return h(n,{sideWidth:ue(i.width,i.available)});default:return n}}G.assistantDock={reducer:ce,initial:Ie,clampSideWidth:ue,clampDockOffset:Me,clampDockHeight:P,openingDockHeight:U,DOCK_MIN_HEIGHT:_,DOCK_DEFAULT_HEIGHT:Ae,DOCK_VIEWPORT_RESERVE:De,DOCK_DEFAULT_OFFSET_RIGHT:oe,SIDE_MIN_WIDTH:T,SIDE_DEFAULT_WIDTH:se,SIDE_MAX_WIDTH:le,SIDE_PAGE_MIN:Ne,SIDE_FITS_QUERY:He};var Ye={ready:"Ready",working:"Working",done:"Done \u2014 tap to see it",answerWaiting:"An answer is waiting",askAboutScreen:"Ask about this screen",reopen:"Reopen the {title}",hide:"Hide the assistant",hideTitle:"Hide the assistant",openInstead:"Open the assistant",openInsteadTitle:"Still working \u2014 open it",grip:"Drag to resize the assistant; left and right arrows move it sideways",headerTitle:"Drag this bar to move the popup left or right",newChat:"New chat",openFull:"Open full screen",minimize:"Minimise",minimizeTitle:"Shrink to a bar",close:"Close the assistant",closeBusy:"Shrink to a bar",closeBusyTitle:"Still working \u2014 shrink it to a bar",shrinkToPopup:"Shrink to popup",tablist:"Assistant or a person",primaryTab:"Assistant",pinSide:"Pin to the side",floatPopup:"Float as a popup",sideGrip:"Drag to resize the assistant; left and right arrows work too",backToSide:"Back to the side panel",more:"More",clearHistory:"Clear history"},Le={hidden:"gb-dock-hidden",mini:"gb-dock-mini",dock:"gb-dock-dock",side:"gb-dock-side",full:"gb-dock-full"},_e="http://www.w3.org/2000/svg",Te=function(n){return typeof Node<"u"&&n instanceof Node};function u(n,i,r){var p=document.createElement(n);if(i)for(var y in i){var k=i[y];k==null||k===!1||(y==="text"?p.textContent=String(k):y==="className"?p.className=k:p.setAttribute(y,k===!0?"":String(k)))}return fe(p,r),p}function fe(n,i){return i==null||i===!1?n:Array.isArray(i)?(i.forEach(function(r){fe(n,r)}),n):(n.appendChild(Te(i)?i:document.createTextNode(String(i))),n)}function R(n){var i=document.createElementNS(_e,"svg");return i.setAttribute("viewBox","0 0 20 20"),i.setAttribute("aria-hidden","true"),n.forEach(function(r){var p=document.createElementNS(_e,r.tag||"path");for(var y in r)y!=="tag"&&p.setAttribute(y,r[y]);i.appendChild(p)}),i}var A={close:function(){return R([{d:"M6 6l8 8M14 6l-8 8",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round"}])},plus:function(){return R([{d:"M10 4.5v11M4.5 10h11",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round"}])},expand:function(){return R([{d:"M11 9l5-5M16 4h-3.5M16 4v3.5M9 11l-5 5M4 16h3.5M4 16v-3.5",stroke:"currentColor","stroke-width":"1.6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}])},shrink:function(){return R([{d:"M16 4l-5 5M11 9h3.5M11 9V5.5M4 16l5-5M9 11H5.5M9 11v3.5",stroke:"currentColor","stroke-width":"1.6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}])},more:function(){return R([{tag:"circle",cx:"5",cy:"10",r:"1.5",fill:"currentColor"},{tag:"circle",cx:"10",cy:"10",r:"1.5",fill:"currentColor"},{tag:"circle",cx:"15",cy:"10",r:"1.5",fill:"currentColor"}])}};function Qe(n){var i=Math.max(0,Math.floor((Date.now()-n)/1e3)),r=i%60;return Math.floor(i/60)+":"+(r<10?"0":"")+r}function Pe(n){try{return n==="session"?d.sessionStorage:d.localStorage}catch{return null}}function D(n,i){var r=Pe(n);try{return r?r.getItem(i):null}catch{return null}}function E(n,i,r){var p=Pe(n);try{p&&(r===null?p.removeItem(i):p.setItem(i,r))}catch{}}function x(){var n=document.querySelector(".gemboss-platform-main"),i=n?n.getBoundingClientRect().left:0;return(document.documentElement.clientWidth||d.innerWidth)-i}G.assistantFrame=function(n){n=n||{};var i={title:n.title||"Assistant",storagePrefix:n.storagePrefix||"gemboss.assistant",bodyClassPrefix:n.bodyClassPrefix||"gemboss-assistant",dockedEvent:n.dockedEvent||"gemboss:assistant-docked",allowSide:n.allowSide!==!1,keepAcrossPages:n.keepAcrossPages!==!1,fullHref:n.fullHref||"",miniHint:n.miniHint||"",canClearHistory:n.canClearHistory!==!1},r=h(Ye,n.labels||{}),p=function(){try{return i.fullHref?new URL(i.fullHref,d.location.href).pathname:""}catch{return""}},y=n.isFullLink||function(e){return!!p()&&e.pathname===p()},k=n.isOnFullPage||function(){return!!p()&&d.location.pathname===p()},Je=n.onExpand||function(){i.fullHref&&(d.location.href=i.fullHref)},Ze=n.onShrink||function(){E("session",b("presentation"),X(a));var e=document.referrer,t=!1;try{t=!!e&&new URL(e).origin===d.location.origin&&new URL(e).pathname!==d.location.pathname}catch{t=!1}t?d.history.back():m({type:"reopen"})},pe=n.onNewChat||null,me=n.onClearHistory||null,he=n.menuItems||null,ve=n.fullActions||null,b=function(e){return i.storagePrefix+"."+e},a=Ie,q=[],V=[],N=function(e,t,l,o){e.addEventListener(t,l,o),V.push(function(){e.removeEventListener(t,l,o)})},j=null,be=oe,Y=se,Q=null,Re=!1,C=0,f=u("div",{className:"gb-dock "+Le.hidden}),J=u("div",{className:"gb-dock-body"}),ge=u("div",{className:"gb-dock-pane",id:"gem-dock-pane-assistant"});n.body&&ge.appendChild(n.body),J.appendChild(ge),f.appendChild(J);var s={},ye="";function xe(){var e=document.querySelector(".gemboss-platform-main"),t=e?e.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth,l=Math.min(460,Math.max(0,t-48));return{min:8,max:Math.max(8,Math.floor(t-l-8))}}function Z(){var e=Math.ceil(f.getBoundingClientRect().width||600),t=document.querySelector(".gemboss-platform-main"),l=t?t.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth;return{min:8,max:Math.max(8,Math.floor(l-e-8))}}function m(e){var t=a;a=ce(a,e),a!==t&&(t.presentation!==a.presentation&&((a.presentation==="full"||a.presentation==="dock"||a.presentation==="side")&&E("local",b("lastMode"),a.presentation),a.presentation==="side"&&(a=ce(a,{type:"side-resize",width:Y,available:x()})),i.keepAcrossPages&&E("session",b("presentation"),a.presentation)),t.busy!==a.busy&&(Q=a.busy?Date.now():null),te(),q.slice().forEach(function(l){try{l(Ke.state())}catch(o){d.console&&d.console.error(o)}}))}function Oe(e){E("local",b("shape"),e)}function H(e){var t=d.innerHeight,l=Math.round(e)>=U(null,t);j=l?null:Math.round(e),m({type:"resize",height:e,viewport:t}),E("local",b("dockHeight"),l?null:String(Math.round(e)))}function $(e,t,l){be=Math.round(e),m({type:"slide",offsetRight:e,min:t,max:l}),E("local",b("dockOffsetRight"),String(Math.round(e)))}function M(e){Y=Math.round(e),m({type:"side-resize",width:e,available:x()}),E("local",b("sideWidth"),String(Math.round(e)))}var We=function(){m({type:"dock"}),Oe("dock")},Fe=function(){m({type:"side"}),a.sideAllowed&&Oe("side")},I=function(){m({type:"reopen"})},ze=function(){m({type:"minimize"})},ee=function(){m({type:"dismiss"})};function O(e,t,l){l=l||{};var o=u("button",{type:"button",className:["ui-menu__item",l.danger?"ui-menu__item--danger":"",l.className||""].filter(Boolean).join(" "),disabled:!!l.disabled},e);return o.addEventListener("click",function(c){var g=o.closest("details");if(g){g.removeAttribute("open");var v=g.querySelector("summary");v&&v.focus()}t&&t(c)}),o}function Be(e,t,l){var o=u("details",{className:"gb-dock-menu"}),c=u("summary",{className:t,title:e,"aria-label":e});return c.appendChild(A.more()),o.appendChild(c),o.appendChild(u("div",{className:"gemboss-popover-surface gb-dock-menu-list",title:""},l)),o}function $e(){var e=[];return(he||[]).forEach(function(t){Te(t)?e.push(t):t&&e.push(O(t.label,t.onClick,{danger:t.danger,disabled:t.disabled,className:t.className}))}),me&&e.push(O(r.clearHistory,function(){me()},{danger:!0,disabled:!i.canClearHistory})),e}N(d,"keydown",function(e){var t=f.querySelector("details.gb-dock-menu[open]");if(!(!t||e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)){var l=document.activeElement,o=l&&l.closest?l.closest('dialog[open], [aria-modal="true"]'):null;if(!(o&&!t.contains(o)))if(e.preventDefault(),t.contains(l)){e.stopPropagation(),t.open=!1;var c=t.querySelector("summary");c&&c.focus()}else t.open=!1}},!0),N(document,"pointerdown",function(e){Array.prototype.forEach.call(f.querySelectorAll("details.gb-dock-menu[open]"),function(t){t.contains(e.target)||(t.open=!1)})},!0),N(d,"blur",function(){Array.prototype.forEach.call(f.querySelectorAll("details.gb-dock-menu[open]"),function(e){e.open=!1})});function L(e){Re=e,f.classList.toggle("gb-dock-dragging",e)}function et(e){var t=null;e.addEventListener("pointerdown",function(o){o.preventDefault(),e.setPointerCapture(o.pointerId),L(!0),t={startY:o.clientY,startH:a.dockHeight}}),e.addEventListener("pointermove",function(o){t&&H(t.startH+(t.startY-o.clientY))});var l=function(o){t=null,L(!1);try{e.releasePointerCapture(o.pointerId)}catch{}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l),e.addEventListener("keydown",function(o){var c=o.shiftKey?96:32,g=P(K,d.innerHeight),v;o.key==="ArrowUp"?(o.preventDefault(),H(a.dockHeight+c)):o.key==="ArrowDown"?(o.preventDefault(),H(a.dockHeight-c)):o.key==="ArrowLeft"?(v=Z(),o.preventDefault(),$(a.dockOffsetRight+c,v.min,v.max)):o.key==="ArrowRight"?(v=Z(),o.preventDefault(),$(a.dockOffsetRight-c,v.min,v.max)):o.key==="Home"?(o.preventDefault(),H(g)):o.key==="End"&&(o.preventDefault(),H(_))})}function tt(e){var t=null;e.addEventListener("pointerdown",function(o){a.presentation!=="dock"||o.target.closest&&o.target.closest("button, summary, .gb-dock-menu")||(e.setPointerCapture(o.pointerId),L(!0),t={startX:o.clientX,startOffset:a.dockOffsetRight,moved:!1})}),e.addEventListener("pointermove",function(o){if(t&&!(!t.moved&&Math.abs(o.clientX-t.startX)<4)){t.moved=!0;var c=Z();$(t.startOffset-(o.clientX-t.startX),c.min,c.max)}});var l=function(o){if(t){t=null,L(!1);try{e.releasePointerCapture(o.pointerId)}catch{}}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l)}var S=null;function W(e,t){if(S=null,L(!1),document.body.classList.remove("ui-resizing"),e&&t)try{e.releasePointerCapture(t.pointerId)}catch{}}function nt(e){e.addEventListener("pointerdown",function(t){t.button!==0||t.pointerType==="mouse"&&t.ctrlKey||(t.preventDefault(),e.setPointerCapture(t.pointerId),L(!0),document.body.classList.add("ui-resizing"),S={startX:t.clientX,startW:a.sideWidth,id:t.pointerId})}),e.addEventListener("pointermove",function(t){if(!(!S||t.pointerId!==S.id)){if(t.pointerType==="mouse"&&t.buttons===0){W(e,t);return}M(S.startW+(S.startX-t.clientX))}}),e.addEventListener("pointerup",function(t){W(e,t)}),e.addEventListener("pointercancel",function(t){W(e,t)}),e.addEventListener("lostpointercapture",function(){S&&W()}),e.addEventListener("keydown",function(t){if(!(t.altKey||t.metaKey||t.ctrlKey)){var l=t.shiftKey?64:16;t.key==="ArrowLeft"?(t.preventDefault(),M(a.sideWidth+l)):t.key==="ArrowRight"?(t.preventDefault(),M(a.sideWidth-l)):t.key==="Home"?(t.preventDefault(),M(T)):t.key==="End"&&(t.preventDefault(),M(K))}})}function it(e){Array.prototype.slice.call(f.childNodes).forEach(function(ae){ae!==J&&f.removeChild(ae)}),s={};var t=function(ae){f.insertBefore(ae,J)},l=e==="dock",o=e==="side",c=$e();if(e==="full"){var g=u("div",{className:"gb-dock-fullchrome","data-gb-dock-chrome":""});fe(g,ve),c.length&&g.appendChild(Be(r.more,"gb-dock-shrink gb-dock-menu-pill",c)),s.shrinkLabel=u("span");var v=u("button",{type:"button",className:"gb-dock-shrink"},[A.shrink(),s.shrinkLabel]);v.addEventListener("click",function(){Ze()}),g.appendChild(v),t(g)}if(e==="mini"&&(s.miniDot=u("span",{className:"gb-dock-dot","aria-hidden":"true"}),s.miniStatus=u("span",{className:"gb-dock-ministatus"}),s.miniBar=u("button",{type:"button",className:"gb-dock-minibar"},[s.miniDot,u("strong",null,i.title),s.miniStatus,u("span",{className:"gb-dock-minichevron","aria-hidden":"true"},"\u25B2")]),s.miniBar.addEventListener("click",I),s.miniClose=u("button",{type:"button",className:"gb-dock-icon"}),s.miniCloseSr=u("span",{className:"gb-dock-sr"}),s.miniClose.appendChild(A.close()),s.miniClose.appendChild(s.miniCloseSr),s.miniClose.addEventListener("click",ee),t(u("div",{className:"gb-dock-minirow"},[s.miniBar,s.miniClose]))),o&&(s.sideGrip=u("div",{className:"ui-resizer gb-dock-sidegrip",role:"separator","aria-orientation":"vertical","aria-label":r.sideGrip,tabindex:"0"}),nt(s.sideGrip),t(s.sideGrip)),l||o){l&&(s.grip=u("div",{className:"gb-dock-grip",role:"separator","aria-orientation":"horizontal","aria-label":r.grip,tabindex:"0"},u("span",{"aria-hidden":"true"})),et(s.grip),t(s.grip)),s.dot=u("span",{className:"gb-dock-dot","aria-hidden":"true"}),s.status=u("span",{className:"gb-dock-status"});var z=u("div",{className:"gb-dock-actions"});if(pe){var Ue=u("button",{type:"button",className:"gb-dock-icon gb-dock-action",title:r.newChat},[A.plus(),u("span",{className:"gb-dock-sr"},r.newChat)]);Ue.addEventListener("click",function(){pe()}),z.appendChild(Ue)}var Xe=u("button",{type:"button",className:"gb-dock-icon",title:r.openFull},[A.expand(),u("span",{className:"gb-dock-sr"},r.openFull)]);Xe.addEventListener("click",function(){Je()}),z.appendChild(Xe);var B=c.slice();c.length&&B.push(u("hr",{className:"gb-dock-menu-sep"})),l&&a.sideAllowed&&B.push(O(r.pinSide,Fe,{className:"gb-dock-pinside"})),o&&B.push(O(r.floatPopup,We)),B.push(O(r.minimizeTitle,ze)),z.appendChild(Be(r.more,"gb-dock-icon",B)),s.close=u("button",{type:"button",className:"gb-dock-icon"}),s.closeSr=u("span",{className:"gb-dock-sr"}),s.close.appendChild(A.close()),s.close.appendChild(s.closeSr),s.close.addEventListener("click",ee),z.appendChild(s.close);var qe=u("header",{className:"gb-dock-header",title:l?r.headerTitle:null},[s.dot,u("span",{className:"gb-dock-title"},i.title),s.status,z]);l&&tt(qe),t(qe)}}function te(){var e=a.presentation,t=[a.mounted?e:"unmounted",a.sideAllowed,!!pe,!!me,i.canClearHistory,i.title,(he||[]).length,(ve||[]).length].join("|");t!==ye&&(it(a.mounted?e:"hidden"),ye=t),a.mounted&&!f.parentNode&&(n.container||document.body).appendChild(f),f.className="gb-dock "+Le[e]+(Re?" gb-dock-dragging":""),e==="hidden"?(f.removeAttribute("role"),f.removeAttribute("aria-label"),f.setAttribute("inert","")):(f.setAttribute("role","region"),f.setAttribute("aria-label",i.title),f.removeAttribute("inert")),f.style.removeProperty("height"),f.style.removeProperty("right"),f.style.removeProperty("--gb-dock-side-w"),e==="dock"&&(f.style.height=a.dockHeight+"px",f.style.right=a.dockOffsetRight+"px"),e==="side"&&f.style.setProperty("--gb-dock-side-w",a.sideWidth+"px");var l=a.busy?r.working:a.unread?r.done:r.ready;s.dot&&(s.dot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":"")),s.status&&(s.status.textContent=l),s.close&&(s.close.title=a.busy?r.closeBusyTitle:r.close,s.closeSr.textContent=a.busy?r.closeBusy:r.close),s.grip&&(s.grip.setAttribute("aria-valuenow",String(a.dockHeight)),s.grip.setAttribute("aria-valuemin",String(_)),s.grip.setAttribute("aria-valuemax",String(P(K,d.innerHeight)))),s.sideGrip&&(s.sideGrip.setAttribute("aria-valuenow",String(a.sideWidth)),s.sideGrip.setAttribute("aria-valuemin",String(T)),s.sideGrip.setAttribute("aria-valuemax",String(ue(K,x())))),s.miniBar&&(s.miniBar.setAttribute("aria-label",r.reopen.replace("{title}",i.title)),s.miniDot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":a.unread?" gb-dock-dot-unread":""),s.miniStatus.textContent=a.busy&&Q?r.working+" \xB7 "+Qe(Q):a.unread?r.answerWaiting:i.miniHint||r.askAboutScreen,s.miniClose.title=a.busy?r.openInsteadTitle:r.hideTitle,s.miniCloseSr.textContent=a.busy?r.openInstead:r.hide),s.shrinkLabel&&(s.shrinkLabel.textContent=a.sideAllowed&&a.floatShape==="side"?r.backToSide:r.shrinkToPopup),a.busy&&Q&&e==="mini"?C||(C=d.setInterval(te,1e3)):C&&(d.clearInterval(C),C=0);var o=i.bodyClassPrefix,c=document.body;c.classList.toggle(o+"-busy",a.busy),c.classList.toggle(o+"-unread",a.unread&&!a.busy),c.classList.toggle(o+"-side",e==="side"),e==="side"?c.style.setProperty(de,a.sideWidth+"px"):c.style.removeProperty(de),e!=="side"&&S&&W(),ke().forEach(function(g){var v=e!=="hidden";g.hidden=v,g.style.display=v?"none":""})}function ke(){var e=n.launchers;return e?typeof e=="string"?Array.prototype.slice.call(document.querySelectorAll(e)):Array.prototype.slice.call(e.length!==void 0?e:[e]):[]}N(document,"click",function(e){if(!(!n.launchers||e.defaultPrevented)){var t=e.target&&e.target.closest?e.target.closest("button"):null;t&&ke().indexOf(t)>=0&&(e.preventDefault(),I())}}),N(document,"click",function(e){if(!(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)){var t=e.target&&e.target.closest?e.target.closest("a"):null;if(!(!t||t.target==="_blank")){var l;try{l=new URL(t.href,d.location.origin)}catch{return}if(!(!y(l)||k())){var o=D("local",b("lastMode"))||"",c=!!t.closest(".gnav-assistant");(c?o==="full":o!=="dock"&&o!=="side")||(e.preventDefault(),e.stopPropagation(),I(),d.dispatchEvent(new CustomEvent(i.dockedEvent)))}}}},!0);var w=d.matchMedia?d.matchMedia(He):null,F=function(){m({type:"side-allowed",allowed:i.allowSide&&(!w||w.matches)})};w&&(w.addEventListener?(w.addEventListener("change",F),V.push(function(){w.removeEventListener("change",F)})):(w.addListener(F),V.push(function(){w.removeListener(F)}))),N(d,"resize",function(){m({type:"resize",height:U(j,d.innerHeight),viewport:d.innerHeight});var e=xe();m({type:"slide",offsetRight:be,min:e.min,max:e.max}),m({type:"side-resize",width:Y,available:x()})}),F();var Ee=D("local",b("dockHeight")),Se=Ee===null||Ee===""?NaN:Number(Ee);j=isFinite(Se)&&Se>0?Se:null,m({type:"resize",height:U(j,d.innerHeight),viewport:d.innerHeight});var we=D("local",b("dockOffsetRight")),ne=Number(we);if(we!==null&&we!==""&&isFinite(ne)&&ne>=0){be=ne;var Ge=xe();m({type:"slide",offsetRight:ne,min:Ge.min,max:Ge.max})}var Ce=D("local",b("shape"));(Ce==="side"||Ce==="dock")&&m({type:"restore-float",shape:Ce}),E("local",b("floatShape"),null);var ie=Number(D("local",b("sideWidth")));if(isFinite(ie)&&ie>0&&(Y=ie,m({type:"side-resize",width:ie,available:x()})),k())m({type:"enter-full"});else if(i.keepAcrossPages){var re=D("session",b("presentation"));re==="dock"||re==="side"?m({type:"reopen"}):(re==="mini"||re==="full")&&(m({type:"reopen"}),m({type:"minimize"}))}te();var Ke={el:f,pane:ge,state:function(){return h(a,{})},open:I,reopen:I,openDock:We,openSide:Fe,minimize:ze,dismiss:ee,toggle:function(){a.presentation==="hidden"||a.presentation==="mini"?I():ee()},enterFull:function(){m({type:"enter-full"})},leaveFull:function(){m({type:"leave-full"})},setBusy:function(e){m({type:"busy",busy:!!e})},setDockHeight:H,setSideWidth:M,setDockOffsetRight:function(e){var t=Z();$(e,t.min,t.max)},onChange:function(e){return q.push(e),function(){q=q.filter(function(t){return t!==e})}},update:function(e){e=e||{},e.title!==void 0&&(i.title=e.title),e.miniHint!==void 0&&(i.miniHint=e.miniHint),e.canClearHistory!==void 0&&(i.canClearHistory=e.canClearHistory!==!1),e.menuItems!==void 0&&(he=e.menuItems),e.fullActions!==void 0&&(ve=e.fullActions),e.labels&&(r=h(r,e.labels)),ye="",te()},destroy:function(){V.forEach(function(t){t()}),C&&d.clearInterval(C);var e=i.bodyClassPrefix;document.body.classList.remove(e+"-busy",e+"-unread",e+"-side"),document.body.style.removeProperty(de),ke().forEach(function(t){t.hidden=!1,t.style.display=""}),f.parentNode&&f.parentNode.removeChild(f)}};return Ke}})(typeof globalThis<"u"?globalThis:this);
|
|
1
|
+
(function(d){"use strict";var x=d.gembossUI;if(!x){d.console&&d.console.error("@gemboss/ui assistant-plain.js: load kit-plain.js first (it defines gembossUI)");return}if(x.assistantFrame)return;var W=280,Le=480,$e=56,et=12,_e=$e+et,me=24,F=380,he=400,ve=720,Te=480,Pe="(min-width: 1100px)",be="--gb-assistant-side-w",Q=9007199254740991;function ge(t,i){var r=isFinite(i)&&i>0?Math.max(F,Math.min(ve,i-Te)):ve;return Math.min(Math.max(Math.round(t),F),r)}function Re(t,i,r){return r<i?i:Math.min(Math.max(Math.round(t),i),r)}function z(t,i){var r=Math.max(W,i-_e);return Math.min(Math.max(Math.round(t),W),r)}function J(t,i){var r=t!==null&&isFinite(t)&&t>0?t:1/0;return z(r,i)}var Oe={presentation:"hidden",mounted:!1,busy:!1,unread:!1,dockHeight:Le,dockOffsetRight:me,openNonce:0,sideWidth:he,floatShape:"side",sideAllowed:!1};function h(t,i){var r={},c;for(c in t)r[c]=t[c];for(c in i)r[c]=i[c];return r}function Z(t){return t.sideAllowed?t.floatShape:"dock"}function ye(t,i){switch(i.type){case"enter-full":return h(t,{presentation:"full",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"leave-full":return t.presentation!=="full"?t:h(t,{presentation:t.busy?Z(t):"mini"});case"dock":return h(t,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"side":return t.sideAllowed?h(t,{presentation:"side",floatShape:"side",mounted:!0,unread:!1,openNonce:t.openNonce+1}):h(t,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"reopen":return h(t,{presentation:Z(t),mounted:!0,unread:!1,openNonce:t.openNonce+1});case"side-allowed":return i.allowed===t.sideAllowed?t:i.allowed?h(t,{sideAllowed:!0,presentation:t.presentation==="dock"&&t.floatShape==="side"?"side":t.presentation}):h(t,{sideAllowed:!1,presentation:t.presentation==="side"?"dock":t.presentation});case"restore-float":return h(t,{floatShape:i.shape});case"minimize":return h(t,{presentation:"mini"});case"dismiss":return t.busy?h(t,{presentation:t.presentation==="mini"?Z(t):"mini"}):h(t,{presentation:"hidden"});case"busy":{if(i.busy===t.busy)return t;var r=t.presentation==="mini"||t.presentation==="hidden";return h(t,{busy:i.busy,unread:!i.busy&&r?!0:t.unread})}case"resize":return h(t,{dockHeight:z(i.height,i.viewport)});case"slide":return h(t,{dockOffsetRight:Re(i.offsetRight,i.min,i.max)});case"side-resize":return h(t,{sideWidth:ge(i.width,i.available)});default:return t}}x.assistantDock={reducer:ye,initial:Oe,clampSideWidth:ge,clampDockOffset:Re,clampDockHeight:z,openingDockHeight:J,DOCK_MIN_HEIGHT:W,DOCK_DEFAULT_HEIGHT:Le,DOCK_VIEWPORT_RESERVE:_e,DOCK_DEFAULT_OFFSET_RIGHT:me,SIDE_MIN_WIDTH:F,SIDE_DEFAULT_WIDTH:he,SIDE_MAX_WIDTH:ve,SIDE_PAGE_MIN:Te,SIDE_FITS_QUERY:Pe};var tt={ready:"Ready",working:"Working",done:"Done \u2014 tap to see it",answerWaiting:"An answer is waiting",askAboutScreen:"Ask about this screen",reopen:"Reopen the {title}",hide:"Hide the assistant",hideTitle:"Hide the assistant",openInstead:"Open the assistant",openInsteadTitle:"Still working \u2014 open it",grip:"Drag to resize the assistant; left and right arrows move it sideways",headerTitle:"Drag this bar to move the popup left or right",newChat:"New chat",openFull:"Open full screen",minimize:"Minimise",minimizeTitle:"Shrink to a bar",close:"Close the assistant",closeBusy:"Shrink to a bar",closeBusyTitle:"Still working \u2014 shrink it to a bar",shrinkToPopup:"Shrink to popup",tablist:"Assistant or a person",primaryTab:"Assistant",pinSide:"Pin to the side",floatPopup:"Float as a popup",sideGrip:"Drag to resize the assistant; left and right arrows work too",backToSide:"Back to the side panel",more:"More",clearHistory:"Clear history"},xe={hidden:"gb-dock-hidden",mini:"gb-dock-mini",dock:"gb-dock-dock",side:"gb-dock-side",full:"gb-dock-full"},We="http://www.w3.org/2000/svg",ke=function(t){return typeof Node<"u"&&t instanceof Node};function u(t,i,r){var c=document.createElement(t);if(i)for(var v in i){var y=i[v];y==null||y===!1||(v==="text"?c.textContent=String(y):v==="className"?c.className=y:c.setAttribute(v,y===!0?"":String(y)))}return we(c,r),c}function we(t,i){return i==null||i===!1?t:Array.isArray(i)?(i.forEach(function(r){we(t,r)}),t):(t.appendChild(ke(i)?i:document.createTextNode(String(i))),t)}function B(t){var i=document.createElementNS(We,"svg");return i.setAttribute("viewBox","0 0 20 20"),i.setAttribute("aria-hidden","true"),t.forEach(function(r){var c=document.createElementNS(We,r.tag||"path");for(var v in r)v!=="tag"&&c.setAttribute(v,r[v]);i.appendChild(c)}),i}var I={close:function(){return B([{d:"M6 6l8 8M14 6l-8 8",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round"}])},plus:function(){return B([{d:"M10 4.5v11M4.5 10h11",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round"}])},expand:function(){return B([{d:"M11 9l5-5M16 4h-3.5M16 4v3.5M9 11l-5 5M4 16h3.5M4 16v-3.5",stroke:"currentColor","stroke-width":"1.6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}])},shrink:function(){return B([{d:"M16 4l-5 5M11 9h3.5M11 9V5.5M4 16l5-5M9 11H5.5M9 11v3.5",stroke:"currentColor","stroke-width":"1.6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}])},more:function(){return B([{tag:"circle",cx:"5",cy:"10",r:"1.5",fill:"currentColor"},{tag:"circle",cx:"10",cy:"10",r:"1.5",fill:"currentColor"},{tag:"circle",cx:"15",cy:"10",r:"1.5",fill:"currentColor"}])}};function nt(t){var i=Math.max(0,Math.floor((Date.now()-t)/1e3)),r=i%60;return Math.floor(i/60)+":"+(r<10?"0":"")+r}function Fe(t){try{return t==="session"?d.sessionStorage:d.localStorage}catch{return null}}function L(t,i){var r=Fe(t);try{return r?r.getItem(i):null}catch{return null}}function N(t,i,r){var c=Fe(t);try{c&&(r===null?c.removeItem(i):c.setItem(i,r))}catch{}}function G(){var t=document.querySelector(".gemboss-platform-main"),i=t?t.getBoundingClientRect().left:0;return(document.documentElement.clientWidth||d.innerWidth)-i}x.fullChromeRoom=function(t){var i=t&&t.closest?t.closest(".gb-dock"):null;if(!i||typeof d.ResizeObserver>"u")return function(){};var r=null,c=function(){t.removeAttribute("data-chrome"),t.style.removeProperty("--gb-chat-chrome-w"),t.style.removeProperty("--gb-chat-chrome-h")},v=new d.ResizeObserver(function(){y()});function y(){var w=i.querySelector(":scope > [data-gb-dock-chrome]");if(w!==r&&(r&&v.unobserve(r),w&&v.observe(w),r=w),!w||getComputedStyle(w).position!=="absolute")return c();var C=w.getBoundingClientRect(),S=t.getBoundingClientRect();if(C.left>=S.right||C.bottom<=S.top||C.right<=S.left)return c();t.style.setProperty("--gb-chat-chrome-w",Math.ceil(S.right-C.left+8)+"px"),t.style.setProperty("--gb-chat-chrome-h",Math.ceil(C.bottom-S.top+8)+"px"),t.setAttribute("data-chrome","")}y(),v.observe(t),v.observe(i);var $=new MutationObserver(y);return $.observe(i,{childList:!0,attributes:!0,attributeFilter:["class"]}),function(){v.disconnect(),$.disconnect()}},x.assistantFrame=function(t){t=t||{};var i={title:t.title||"Assistant",storagePrefix:t.storagePrefix||"gemboss.assistant",bodyClassPrefix:t.bodyClassPrefix||"gemboss-assistant",dockedEvent:t.dockedEvent||"gemboss:assistant-docked",allowSide:t.allowSide!==!1,keepAcrossPages:t.keepAcrossPages!==!1,fullHref:t.fullHref||"",miniHint:t.miniHint||"",canClearHistory:t.canClearHistory!==!1},r=h(tt,t.labels||{}),c=function(){try{return i.fullHref?new URL(i.fullHref,d.location.href).pathname:""}catch{return""}},v=t.isFullLink||function(e){return!!c()&&e.pathname===c()},y=t.isOnFullPage||function(){return!!c()&&d.location.pathname===c()},$=t.onExpand||function(){i.fullHref&&(d.location.href=i.fullHref)},w=t.onShrink||function(){N("session",k("presentation"),Z(a));var e=document.referrer,n=!1;try{n=!!e&&new URL(e).origin===d.location.origin&&new URL(e).pathname!==d.location.pathname}catch{n=!1}n?d.history.back():m({type:"reopen"})},C=t.onNewChat||null,S=t.onClearHistory||null,Ce=t.menuItems||null,Se=t.fullActions||null,k=function(e){return i.storagePrefix+"."+e},a=Oe,ee=[],te=[],_=function(e,n,l,s){e.addEventListener(n,l,s),te.push(function(){e.removeEventListener(n,l,s)})},ne=null,Ee=me,ie=he,re=null,ze=!1,M=0,f=u("div",{className:"gb-dock "+xe.hidden}),ae=u("div",{className:"gb-dock-body"}),oe=u("div",{className:"gb-dock-pane",id:"gem-dock-pane-assistant"}),K=t.rail?ke(t.rail)?t.rail:t.rail.el:null,E=null,U=null,Be=!1;K?(E=u("div",{className:"gemboss-assistant-layout is-dock"}),U=u("div",{className:"gemboss-assistant-page"}),t.body&&U.appendChild(t.body),E.appendChild(U),oe.appendChild(E)):t.body&&oe.appendChild(t.body),ae.appendChild(oe),f.appendChild(ae);var o={},Ne="";function Ge(){var e=document.querySelector(".gemboss-platform-main"),n=e?e.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth,l=Math.min(460,Math.max(0,n-48));return{min:8,max:Math.max(8,Math.floor(n-l-8))}}function se(){var e=Math.ceil(f.getBoundingClientRect().width||600),n=document.querySelector(".gemboss-platform-main"),l=n?n.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth;return{min:8,max:Math.max(8,Math.floor(l-e-8))}}function m(e){var n=a;a=ye(a,e),a!==n&&(n.presentation!==a.presentation&&((a.presentation==="full"||a.presentation==="dock"||a.presentation==="side")&&N("local",k("lastMode"),a.presentation),a.presentation==="side"&&(a=ye(a,{type:"side-resize",width:ie,available:G()})),i.keepAcrossPages&&N("session",k("presentation"),a.presentation)),n.busy!==a.busy&&(re=a.busy?Date.now():null),V(),ee.slice().forEach(function(l){try{l(Ye.state())}catch(s){d.console&&d.console.error(s)}}))}function Ke(e){N("local",k("shape"),e)}function T(e){var n=d.innerHeight,l=Math.round(e)>=J(null,n);ne=l?null:Math.round(e),m({type:"resize",height:e,viewport:n}),N("local",k("dockHeight"),l?null:String(Math.round(e)))}function le(e,n,l){Ee=Math.round(e),m({type:"slide",offsetRight:e,min:n,max:l}),N("local",k("dockOffsetRight"),String(Math.round(e)))}function P(e){ie=Math.round(e),m({type:"side-resize",width:e,available:G()}),N("local",k("sideWidth"),String(Math.round(e)))}var Ue=function(){m({type:"dock"}),Ke("dock")},Xe=function(){m({type:"side"}),a.sideAllowed&&Ke("side")},R=function(){m({type:"reopen"})},qe=function(){m({type:"minimize"})},de=function(){m({type:"dismiss"})};function X(e,n,l){l=l||{};var s=u("button",{type:"button",className:["ui-menu__item",l.danger?"ui-menu__item--danger":"",l.className||""].filter(Boolean).join(" "),disabled:!!l.disabled},e);return s.addEventListener("click",function(p){var b=s.closest("details");if(b){b.removeAttribute("open");var g=b.querySelector("summary");g&&g.focus()}n&&n(p)}),s}function Ve(e,n,l){var s=u("details",{className:"gb-dock-menu"}),p=u("summary",{className:n,title:e,"aria-label":e});return p.appendChild(I.more()),s.appendChild(p),s.appendChild(u("div",{className:"gemboss-popover-surface gb-dock-menu-list",title:""},l)),s}function it(){var e=[];return(Ce||[]).forEach(function(n){ke(n)?e.push(n):n&&e.push(X(n.label,n.onClick,{danger:n.danger,disabled:n.disabled,className:n.className}))}),S&&e.push(X(r.clearHistory,function(){S()},{danger:!0,disabled:!i.canClearHistory})),e}_(d,"keydown",function(e){var n=f.querySelector("details.gb-dock-menu[open]");if(!(!n||e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)){var l=document.activeElement,s=l&&l.closest?l.closest('dialog[open], [aria-modal="true"]'):null;if(!(s&&!n.contains(s)))if(e.preventDefault(),n.contains(l)){e.stopPropagation(),n.open=!1;var p=n.querySelector("summary");p&&p.focus()}else n.open=!1}},!0),_(document,"pointerdown",function(e){Array.prototype.forEach.call(f.querySelectorAll("details.gb-dock-menu[open]"),function(n){n.contains(e.target)||(n.open=!1)})},!0),_(d,"blur",function(){Array.prototype.forEach.call(f.querySelectorAll("details.gb-dock-menu[open]"),function(e){e.open=!1})});function O(e){ze=e,f.classList.toggle("gb-dock-dragging",e)}function rt(e){var n=null;e.addEventListener("pointerdown",function(s){s.preventDefault(),e.setPointerCapture(s.pointerId),O(!0),n={startY:s.clientY,startH:a.dockHeight}}),e.addEventListener("pointermove",function(s){n&&T(n.startH+(n.startY-s.clientY))});var l=function(s){n=null,O(!1);try{e.releasePointerCapture(s.pointerId)}catch{}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l),e.addEventListener("keydown",function(s){var p=s.shiftKey?96:32,b=z(Q,d.innerHeight),g;s.key==="ArrowUp"?(s.preventDefault(),T(a.dockHeight+p)):s.key==="ArrowDown"?(s.preventDefault(),T(a.dockHeight-p)):s.key==="ArrowLeft"?(g=se(),s.preventDefault(),le(a.dockOffsetRight+p,g.min,g.max)):s.key==="ArrowRight"?(g=se(),s.preventDefault(),le(a.dockOffsetRight-p,g.min,g.max)):s.key==="Home"?(s.preventDefault(),T(b)):s.key==="End"&&(s.preventDefault(),T(W))})}function at(e){var n=null;e.addEventListener("pointerdown",function(s){a.presentation!=="dock"||s.target.closest&&s.target.closest("button, summary, .gb-dock-menu")||(e.setPointerCapture(s.pointerId),O(!0),n={startX:s.clientX,startOffset:a.dockOffsetRight,moved:!1})}),e.addEventListener("pointermove",function(s){if(n&&!(!n.moved&&Math.abs(s.clientX-n.startX)<4)){n.moved=!0;var p=se();le(n.startOffset-(s.clientX-n.startX),p.min,p.max)}});var l=function(s){if(n){n=null,O(!1);try{e.releasePointerCapture(s.pointerId)}catch{}}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l)}var A=null;function q(e,n){if(A=null,O(!1),document.body.classList.remove("ui-resizing"),e&&n)try{e.releasePointerCapture(n.pointerId)}catch{}}function ot(e){e.addEventListener("pointerdown",function(n){n.button!==0||n.pointerType==="mouse"&&n.ctrlKey||(n.preventDefault(),e.setPointerCapture(n.pointerId),O(!0),document.body.classList.add("ui-resizing"),A={startX:n.clientX,startW:a.sideWidth,id:n.pointerId})}),e.addEventListener("pointermove",function(n){if(!(!A||n.pointerId!==A.id)){if(n.pointerType==="mouse"&&n.buttons===0){q(e,n);return}P(A.startW+(A.startX-n.clientX))}}),e.addEventListener("pointerup",function(n){q(e,n)}),e.addEventListener("pointercancel",function(n){q(e,n)}),e.addEventListener("lostpointercapture",function(){A&&q()}),e.addEventListener("keydown",function(n){if(!(n.altKey||n.metaKey||n.ctrlKey)){var l=n.shiftKey?64:16;n.key==="ArrowLeft"?(n.preventDefault(),P(a.sideWidth+l)):n.key==="ArrowRight"?(n.preventDefault(),P(a.sideWidth-l)):n.key==="Home"?(n.preventDefault(),P(F)):n.key==="End"&&(n.preventDefault(),P(Q))}})}function st(e){Array.prototype.slice.call(f.childNodes).forEach(function(pe){pe!==ae&&f.removeChild(pe)}),o={};var n=function(pe){f.insertBefore(pe,ae)},l=e==="dock",s=e==="side",p=it();if(e==="full"){var b=u("div",{className:"gb-dock-fullchrome","data-gb-dock-chrome":""});we(b,Se),p.length&&b.appendChild(Ve(r.more,"gb-dock-shrink gb-dock-menu-pill",p)),o.shrinkLabel=u("span");var g=u("button",{type:"button",className:"gb-dock-shrink"},[I.shrink(),o.shrinkLabel]);g.addEventListener("click",function(){w()}),b.appendChild(g),n(b)}if(e==="mini"&&(o.miniDot=u("span",{className:"gb-dock-dot","aria-hidden":"true"}),o.miniStatus=u("span",{className:"gb-dock-ministatus"}),o.miniBar=u("button",{type:"button",className:"gb-dock-minibar"},[o.miniDot,u("strong",null,i.title),o.miniStatus,u("span",{className:"gb-dock-minichevron","aria-hidden":"true"},"\u25B2")]),o.miniBar.addEventListener("click",R),o.miniClose=u("button",{type:"button",className:"gb-dock-icon"}),o.miniCloseSr=u("span",{className:"gb-dock-sr"}),o.miniClose.appendChild(I.close()),o.miniClose.appendChild(o.miniCloseSr),o.miniClose.addEventListener("click",de),n(u("div",{className:"gb-dock-minirow"},[o.miniBar,o.miniClose]))),s&&(o.sideGrip=u("div",{className:"ui-resizer gb-dock-sidegrip",role:"separator","aria-orientation":"vertical","aria-label":r.sideGrip,tabindex:"0"}),ot(o.sideGrip),n(o.sideGrip)),l||s){l&&(o.grip=u("div",{className:"gb-dock-grip",role:"separator","aria-orientation":"horizontal","aria-label":r.grip,tabindex:"0"},u("span",{"aria-hidden":"true"})),rt(o.grip),n(o.grip)),o.dot=u("span",{className:"gb-dock-dot","aria-hidden":"true"}),o.status=u("span",{className:"gb-dock-status"});var H=u("div",{className:"gb-dock-actions"});if(C){var Qe=u("button",{type:"button",className:"gb-dock-icon gb-dock-action",title:r.newChat},[I.plus(),u("span",{className:"gb-dock-sr"},r.newChat)]);Qe.addEventListener("click",function(){C()}),H.appendChild(Qe)}var Je=u("button",{type:"button",className:"gb-dock-icon",title:r.openFull},[I.expand(),u("span",{className:"gb-dock-sr"},r.openFull)]);Je.addEventListener("click",function(){$()}),H.appendChild(Je);var Y=p.slice();p.length&&Y.push(u("hr",{className:"gb-dock-menu-sep"})),l&&a.sideAllowed&&Y.push(X(r.pinSide,Xe,{className:"gb-dock-pinside"})),s&&Y.push(X(r.floatPopup,Ue)),Y.push(X(r.minimizeTitle,qe)),H.appendChild(Ve(r.more,"gb-dock-icon",Y)),o.close=u("button",{type:"button",className:"gb-dock-icon"}),o.closeSr=u("span",{className:"gb-dock-sr"}),o.close.appendChild(I.close()),o.close.appendChild(o.closeSr),o.close.addEventListener("click",de),H.appendChild(o.close);var Ze=u("header",{className:"gb-dock-header",title:l?r.headerTitle:null},[o.dot,u("span",{className:"gb-dock-title"},i.title),o.status,H]);l&&at(Ze),n(Ze)}}function V(){var e=a.presentation,n=[a.mounted?e:"unmounted",a.sideAllowed,!!C,!!S,i.canClearHistory,i.title,(Ce||[]).length,(Se||[]).length].join("|");if(n!==Ne&&(st(a.mounted?e:"hidden"),Ne=n),a.mounted&&!f.parentNode&&(t.container||document.body).appendChild(f),f.className="gb-dock "+xe[e]+(ze?" gb-dock-dragging":""),E){var l=e==="full";E.className="gemboss-assistant-layout"+(l?"":" is-dock"),l&&K.parentNode!==E?E.insertBefore(K,U):!l&&K.parentNode===E&&E.removeChild(K),U.className="gemboss-assistant-page"+(Be?" is-switching":"")}e==="hidden"?(f.removeAttribute("role"),f.removeAttribute("aria-label"),f.setAttribute("inert","")):(f.setAttribute("role","region"),f.setAttribute("aria-label",i.title),f.removeAttribute("inert")),f.style.removeProperty("height"),f.style.removeProperty("right"),f.style.removeProperty("--gb-dock-side-w"),e==="dock"&&(f.style.height=a.dockHeight+"px",f.style.right=a.dockOffsetRight+"px"),e==="side"&&f.style.setProperty("--gb-dock-side-w",a.sideWidth+"px");var s=a.busy?r.working:a.unread?r.done:r.ready;o.dot&&(o.dot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":"")),o.status&&(o.status.textContent=s),o.close&&(o.close.title=a.busy?r.closeBusyTitle:r.close,o.closeSr.textContent=a.busy?r.closeBusy:r.close),o.grip&&(o.grip.setAttribute("aria-valuenow",String(a.dockHeight)),o.grip.setAttribute("aria-valuemin",String(W)),o.grip.setAttribute("aria-valuemax",String(z(Q,d.innerHeight)))),o.sideGrip&&(o.sideGrip.setAttribute("aria-valuenow",String(a.sideWidth)),o.sideGrip.setAttribute("aria-valuemin",String(F)),o.sideGrip.setAttribute("aria-valuemax",String(ge(Q,G())))),o.miniBar&&(o.miniBar.setAttribute("aria-label",r.reopen.replace("{title}",i.title)),o.miniDot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":a.unread?" gb-dock-dot-unread":""),o.miniStatus.textContent=a.busy&&re?r.working+" \xB7 "+nt(re):a.unread?r.answerWaiting:i.miniHint||r.askAboutScreen,o.miniClose.title=a.busy?r.openInsteadTitle:r.hideTitle,o.miniCloseSr.textContent=a.busy?r.openInstead:r.hide),o.shrinkLabel&&(o.shrinkLabel.textContent=a.sideAllowed&&a.floatShape==="side"?r.backToSide:r.shrinkToPopup),a.busy&&re&&e==="mini"?M||(M=d.setInterval(V,1e3)):M&&(d.clearInterval(M),M=0);var p=i.bodyClassPrefix,b=document.body;b.classList.toggle(p+"-busy",a.busy),b.classList.toggle(p+"-unread",a.unread&&!a.busy),b.classList.toggle(p+"-side",e==="side"),e==="side"?b.style.setProperty(be,a.sideWidth+"px"):b.style.removeProperty(be),e!=="side"&&A&&q(),Ae().forEach(function(g){var H=e!=="hidden";g.hidden=H,g.style.display=H?"none":""})}function Ae(){var e=t.launchers;return e?typeof e=="string"?Array.prototype.slice.call(document.querySelectorAll(e)):Array.prototype.slice.call(e.length!==void 0?e:[e]):[]}_(document,"click",function(e){if(!(!t.launchers||e.defaultPrevented)){var n=e.target&&e.target.closest?e.target.closest("button"):null;n&&Ae().indexOf(n)>=0&&(e.preventDefault(),R())}}),_(document,"click",function(e){if(!(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)){var n=e.target&&e.target.closest?e.target.closest("a"):null;if(!(!n||n.target==="_blank")){var l;try{l=new URL(n.href,d.location.origin)}catch{return}if(!(!v(l)||y())){var s=L("local",k("lastMode"))||"",p=!!n.closest(".gnav-assistant");(p?s==="full":s!=="dock"&&s!=="side")||(e.preventDefault(),e.stopPropagation(),R(),d.dispatchEvent(new CustomEvent(i.dockedEvent)))}}}},!0);var D=d.matchMedia?d.matchMedia(Pe):null,j=function(){m({type:"side-allowed",allowed:i.allowSide&&(!D||D.matches)})};D&&(D.addEventListener?(D.addEventListener("change",j),te.push(function(){D.removeEventListener("change",j)})):(D.addListener(j),te.push(function(){D.removeListener(j)}))),_(d,"resize",function(){m({type:"resize",height:J(ne,d.innerHeight),viewport:d.innerHeight});var e=Ge();m({type:"slide",offsetRight:Ee,min:e.min,max:e.max}),m({type:"side-resize",width:ie,available:G()})}),j();var De=L("local",k("dockHeight")),He=De===null||De===""?NaN:Number(De);ne=isFinite(He)&&He>0?He:null,m({type:"resize",height:J(ne,d.innerHeight),viewport:d.innerHeight});var Me=L("local",k("dockOffsetRight")),ue=Number(Me);if(Me!==null&&Me!==""&&isFinite(ue)&&ue>=0){Ee=ue;var je=Ge();m({type:"slide",offsetRight:ue,min:je.min,max:je.max})}var Ie=L("local",k("shape"));(Ie==="side"||Ie==="dock")&&m({type:"restore-float",shape:Ie}),N("local",k("floatShape"),null);var ce=Number(L("local",k("sideWidth")));if(isFinite(ce)&&ce>0&&(ie=ce,m({type:"side-resize",width:ce,available:G()})),y())m({type:"enter-full"});else if(i.keepAcrossPages){var fe=L("session",k("presentation"));fe==="dock"||fe==="side"?m({type:"reopen"}):(fe==="mini"||fe==="full")&&(m({type:"reopen"}),m({type:"minimize"}))}V();var Ye={el:f,pane:oe,state:function(){return h(a,{})},open:R,reopen:R,openDock:Ue,openSide:Xe,minimize:qe,dismiss:de,toggle:function(){a.presentation==="hidden"||a.presentation==="mini"?R():de()},enterFull:function(){m({type:"enter-full"})},leaveFull:function(){m({type:"leave-full"})},setBusy:function(e){m({type:"busy",busy:!!e})},setSwitching:function(e){Be=!!e,V()},setDockHeight:T,setSideWidth:P,setDockOffsetRight:function(e){var n=se();le(e,n.min,n.max)},onChange:function(e){return ee.push(e),function(){ee=ee.filter(function(n){return n!==e})}},update:function(e){e=e||{},e.title!==void 0&&(i.title=e.title),e.miniHint!==void 0&&(i.miniHint=e.miniHint),e.canClearHistory!==void 0&&(i.canClearHistory=e.canClearHistory!==!1),e.menuItems!==void 0&&(Ce=e.menuItems),e.fullActions!==void 0&&(Se=e.fullActions),e.labels&&(r=h(r,e.labels)),Ne="",V()},destroy:function(){te.forEach(function(n){n()}),M&&d.clearInterval(M);var e=i.bodyClassPrefix;document.body.classList.remove(e+"-busy",e+"-unread",e+"-side"),document.body.style.removeProperty(be),Ae().forEach(function(n){n.hidden=!1,n.style.display=""}),f.parentNode&&f.parentNode.removeChild(f)}};return Ye}})(typeof globalThis<"u"?globalThis:this);
|
package/src/index.ts
CHANGED
|
@@ -68,6 +68,8 @@ export { BriefingCard, type BriefingCardProps } from "./briefing-card";
|
|
|
68
68
|
export { RangeBar, rangeBarGeometry, type RangeBarGeometry, type RangeBarProps } from "./range-bar";
|
|
69
69
|
export { ProgressRing, progressRingGeometry, RING_BOX, type ProgressRingGeometry, type ProgressRingProps } from "./progress-ring";
|
|
70
70
|
export { SpotArt, SPOT_ART_NAMES, type SpotArtName, type SpotArtProps } from "./spot-art";
|
|
71
|
+
// After 0.46.0 (GemBoss Brand › Logo, 21/10/2026): one logo as a person judges it before it becomes a store's.
|
|
72
|
+
export { LogoSheet, LOGO_SHEET_FAVICON_PX, type LogoSheetProps } from "./logo-sheet";
|
|
71
73
|
export { FREQUENT_MAX, frequentReactions, isReactionEmoji, QUICK_REACTIONS, REACTION_EMOJI, REACTION_GROUPS, reactionLabel, reactionWords, searchReactions, SUGGESTED_REACTIONS, toggleReaction, type Reaction } from "./reactions-data";
|
|
72
74
|
// The team chat layer (20/10/2026, README "The team chat layer"): GemCare's channel chat for every surface, with
|
|
73
75
|
// team-chat.css its own entry. The row rules (turns, day separators, the "New messages" line) are plain data.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ui-logo-sheet{display:grid;gap:8px;min-width:0;max-width:320px}.ui-logo-sheet img{display:block;max-width:100%}.ui-logo-sheet__mark{display:grid;place-items:center;aspect-ratio:1;padding:14%;border-radius:var(--gemboss-radius-md, 8px);background:repeating-conic-gradient(var(--gemboss-divider-soft, #edeff2) 0 25%,var(--gemboss-surface, #ffffff) 0 50%) 0 0 / 16px 16px}.ui-logo-sheet__mark img{width:100%;height:auto}.ui-logo-sheet__lockups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,96px),1fr));gap:8px}.ui-logo-sheet__lockup{display:grid;place-items:center;min-height:48px;padding:8px;border:1px solid var(--ui-border);border-radius:var(--gemboss-radius-md, 8px);background:#fff}.ui-logo-sheet__lockup--dark{border-color:var(--gemboss-dark-surface, #16161a);background:var(--gemboss-dark-surface, #16161a)}.ui-logo-sheet__lockup img{width:auto;height:24px;object-fit:contain}.ui-logo-sheet__tab{display:flex;align-items:center;gap:8px;min-width:0;padding:4px 12px 4px 4px;border-radius:var(--gemboss-radius-md, 8px);background:var(--gemboss-primary-soft, #f2f3f5)}.ui-logo-sheet__favicon{flex:none;width:32px;height:32px}.ui-logo-sheet__tab-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--gemboss-fs-caption, 12px);line-height:16px;color:var(--ui-text-muted)}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logo sheet — @gemboss/ui, unreleased (after 0.46.0). One logo the way a person has to see it before it becomes a store's (GemBoss
|
|
3
|
+
* Brand › Logo, 21/10/2026, GemMedia's M9 logos): the mark on a checkerboard, so a transparent background reads as transparent and
|
|
4
|
+
* a white box around the mark shows as one; the name lockup on a light header AND on a dark one, because a mark that is right on
|
|
5
|
+
* white can vanish on black; and the favicon at its real size, 32 × 32 CSS pixels, beside the name the way a browser tab shows it,
|
|
6
|
+
* because a mark with too much detail is only found out at that size.
|
|
7
|
+
*
|
|
8
|
+
* Every picture is an image the surface already has (GemMedia makes each file: master, lockups, the dark lockups, favicon_32), so
|
|
9
|
+
* nothing here draws or scales a logo. Spans only, so a sheet can sit inside a `<label>` (a `QuestionCard` choice's `media`).
|
|
10
|
+
* Presentational, server-renderable. Its stylesheet travels with it (`logo-sheet.css`, its own entry).
|
|
11
|
+
*/
|
|
12
|
+
import "./logo-sheet.css";
|
|
13
|
+
import React from "react";
|
|
14
|
+
|
|
15
|
+
const cx = (...p: Array<string | false | null | undefined>) => p.filter(Boolean).join(" ");
|
|
16
|
+
|
|
17
|
+
/** The favicon's size on the sheet, in CSS pixels: the file's own size, never scaled. */
|
|
18
|
+
export const LOGO_SHEET_FAVICON_PX = 32;
|
|
19
|
+
|
|
20
|
+
export interface LogoSheetProps {
|
|
21
|
+
/** The brand's name: the alt text of every picture, and the tab's title beside the favicon. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** The mark alone, square, transparent. */
|
|
24
|
+
mark: string;
|
|
25
|
+
/** The mark with the name beside it, the name dark: for a light header. */
|
|
26
|
+
lockup?: string | null;
|
|
27
|
+
/** The same lockup with the name light: for a dark header. */
|
|
28
|
+
lockupDark?: string | null;
|
|
29
|
+
/** The 32 px favicon. */
|
|
30
|
+
favicon?: string | null;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function LogoSheet({ name, mark, lockup, lockupDark, favicon, className }: LogoSheetProps) {
|
|
35
|
+
return (
|
|
36
|
+
<span className={cx("ui-logo-sheet", className)}>
|
|
37
|
+
<span className="ui-logo-sheet__mark">
|
|
38
|
+
<img src={mark} alt={`${name} logo`} loading="lazy" decoding="async" />
|
|
39
|
+
</span>
|
|
40
|
+
{lockup || lockupDark ? (
|
|
41
|
+
<span className="ui-logo-sheet__lockups">
|
|
42
|
+
{lockup ? (
|
|
43
|
+
<span className="ui-logo-sheet__lockup">
|
|
44
|
+
<img src={lockup} alt={`${name} logo with its name, on a light header`} loading="lazy" decoding="async" />
|
|
45
|
+
</span>
|
|
46
|
+
) : null}
|
|
47
|
+
{lockupDark ? (
|
|
48
|
+
<span className="ui-logo-sheet__lockup ui-logo-sheet__lockup--dark">
|
|
49
|
+
<img src={lockupDark} alt={`${name} logo with its name, on a dark header`} loading="lazy" decoding="async" />
|
|
50
|
+
</span>
|
|
51
|
+
) : null}
|
|
52
|
+
</span>
|
|
53
|
+
) : null}
|
|
54
|
+
{favicon ? (
|
|
55
|
+
<span className="ui-logo-sheet__tab">
|
|
56
|
+
<img className="ui-logo-sheet__favicon" src={favicon} width={LOGO_SHEET_FAVICON_PX} height={LOGO_SHEET_FAVICON_PX}
|
|
57
|
+
alt={`${name} favicon, real size`} loading="lazy" decoding="async" />
|
|
58
|
+
<span className="ui-logo-sheet__tab-name">{name}</span>
|
|
59
|
+
</span>
|
|
60
|
+
) : null}
|
|
61
|
+
</span>
|
|
62
|
+
);
|
|
63
|
+
}
|
package/src/question-card.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ui-qcard{display:grid;gap:24px;min-width:0;padding:28px;border:1px solid var(--ui-border);border-radius:var(--gemboss-radius-xl, 16px);background:var(--ui-surface);box-shadow:var(--gemboss-shadow-resting, 0 1px 2px rgba(31, 30, 29, .04), 0 2px 6px rgba(31, 30, 29, .06))}.ui-qcard__head{display:flex;align-items:center;gap:24px;min-width:0}.ui-qcard__art{flex:none}.ui-qcard__ask{display:grid;gap:6px;min-width:0}.ui-qcard__eyebrow{margin:0;font-size:var(--gemboss-fs-caption, 12px);line-height:16px;color:var(--ui-text-muted)}.ui-qcard__question{margin:0;font-size:var(--gemboss-fs-h2, 20px);line-height:28px;font-weight:650;letter-spacing:-.01em;color:var(--ui-text-strong);overflow-wrap:anywhere}.ui-qcard__evidence{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}.ui-qcard__choices{display:grid;gap:10px;min-width:0}.ui-qcard__choice{position:relative;display:flex;align-items:center;gap:14px;min-width:0;min-height:44px;box-sizing:border-box;padding:14px 16px;border:1px solid var(--ui-border);border-radius:var(--gemboss-radius-lg, 12px);background:var(--ui-surface);cursor:pointer;transition:border-color var(--gemboss-transition-fast, .12s),background-color var(--gemboss-transition-fast, .12s)}.ui-qcard__choice:hover{border-color:var(--ui-text-muted)}.ui-qcard__input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}.ui-qcard__choice:has(>input:checked){border-color:var(--gemboss-accent, #5661f5);background:var(--gemboss-accent-wash, #f7f8ff);box-shadow:0 0 0 3px var(--gemboss-accent-soft, #eef0fe)}.ui-qcard__choice:has(>input:focus-visible){outline:2px solid var(--ui-focus);outline-offset:2px}.ui-qcard__choice:has(>input:disabled){cursor:default;opacity:.6}.ui-qcard__dot{flex:none;display:inline-grid;place-content:center;width:18px;height:18px;box-sizing:border-box;border:1.5px solid var(--ui-text-muted);border-radius:50%}.ui-qcard__choice:has(>input:checked) .ui-qcard__dot{border-color:var(--gemboss-accent, #5661f5);background:var(--gemboss-accent, #5661f5)}.ui-qcard__choice:has(>input:checked) .ui-qcard__dot:after{content:"";width:6px;height:6px;border-radius:50%;background:var(--gemboss-surface, #fff)}.ui-qcard__text{display:grid;flex:1;gap:2px;min-width:0}.ui-qcard__label{font-weight:600;color:var(--ui-text-strong);overflow-wrap:anywhere}.ui-qcard__note{font-size:var(--gemboss-fs-caption, 12px);line-height:16px;color:var(--ui-text-muted)}.ui-qcard__pick{flex:none;background:var(--gemboss-accent-soft, #eef0fe);color:var(--gemboss-accent-strong, #3a44de)}.ui-qcard__foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.ui-qcard__confirm{min-height:36px;padding-inline:22px}.ui-qcard__fine{flex-basis:100%;margin:0;font-size:var(--gemboss-fs-caption, 12px);line-height:16px;color:var(--ui-text-muted)}@media (pointer: coarse),(max-width: 47.9975em){.ui-qcard{padding:20px}.ui-qcard__choice{min-height:48px}.ui-qcard__confirm{min-height:44px}}
|
|
1
|
+
.ui-qcard{display:grid;gap:24px;min-width:0;padding:28px;border:1px solid var(--ui-border);border-radius:var(--gemboss-radius-xl, 16px);background:var(--ui-surface);box-shadow:var(--gemboss-shadow-resting, 0 1px 2px rgba(31, 30, 29, .04), 0 2px 6px rgba(31, 30, 29, .06))}.ui-qcard__head{display:flex;align-items:center;gap:24px;min-width:0}.ui-qcard__art{flex:none}.ui-qcard__ask{display:grid;gap:6px;min-width:0}.ui-qcard__eyebrow{margin:0;font-size:var(--gemboss-fs-caption, 12px);line-height:16px;color:var(--ui-text-muted)}.ui-qcard__question{margin:0;font-size:var(--gemboss-fs-h2, 20px);line-height:28px;font-weight:650;letter-spacing:-.01em;color:var(--ui-text-strong);overflow-wrap:anywhere}.ui-qcard__evidence{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}.ui-qcard__choices{display:grid;gap:10px;min-width:0}.ui-qcard__choice{position:relative;display:flex;align-items:center;gap:14px;min-width:0;min-height:44px;box-sizing:border-box;padding:14px 16px;border:1px solid var(--ui-border);border-radius:var(--gemboss-radius-lg, 12px);background:var(--ui-surface);cursor:pointer;transition:border-color var(--gemboss-transition-fast, .12s),background-color var(--gemboss-transition-fast, .12s)}.ui-qcard__choice:hover{border-color:var(--ui-text-muted)}.ui-qcard__input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}.ui-qcard__choice:has(>input:checked){border-color:var(--gemboss-accent, #5661f5);background:var(--gemboss-accent-wash, #f7f8ff);box-shadow:0 0 0 3px var(--gemboss-accent-soft, #eef0fe)}.ui-qcard__choice:has(>input:focus-visible){outline:2px solid var(--ui-focus);outline-offset:2px}.ui-qcard__choice:has(>input:disabled){cursor:default;opacity:.6}.ui-qcard__dot{flex:none;display:inline-grid;place-content:center;width:18px;height:18px;box-sizing:border-box;border:1.5px solid var(--ui-text-muted);border-radius:50%}.ui-qcard__choice:has(>input:checked) .ui-qcard__dot{border-color:var(--gemboss-accent, #5661f5);background:var(--gemboss-accent, #5661f5)}.ui-qcard__choice:has(>input:checked) .ui-qcard__dot:after{content:"";width:6px;height:6px;border-radius:50%;background:var(--gemboss-surface, #fff)}.ui-qcard__text{display:grid;flex:1;gap:2px;min-width:0}.ui-qcard__label{font-weight:600;color:var(--ui-text-strong);overflow-wrap:anywhere}.ui-qcard__note{font-size:var(--gemboss-fs-caption, 12px);line-height:16px;color:var(--ui-text-muted)}.ui-qcard__pick{flex:none;background:var(--gemboss-accent-soft, #eef0fe);color:var(--gemboss-accent-strong, #3a44de)}.ui-qcard__media{display:block;flex:1 0 100%;min-width:0}.ui-qcard--tiles .ui-qcard__choices{grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:12px}.ui-qcard--tiles .ui-qcard__choice{flex-wrap:wrap;align-items:flex-start;align-content:flex-start;gap:12px 10px}.ui-qcard__foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.ui-qcard__confirm{min-height:36px;padding-inline:22px}.ui-qcard__fine{flex-basis:100%;margin:0;font-size:var(--gemboss-fs-caption, 12px);line-height:16px;color:var(--ui-text-muted)}@media (pointer: coarse),(max-width: 47.9975em){.ui-qcard{padding:20px}.ui-qcard__choice{min-height:48px}.ui-qcard__confirm{min-height:44px}}
|
package/src/question-card.tsx
CHANGED
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Presentational and controlled: no state of its own, so it renders on the server. The choices are real radio inputs (a keyboard
|
|
18
18
|
* and a screen reader get a radio group, the arrow keys move the selection); the dot and the highlight are drawn by the card.
|
|
19
|
+
*
|
|
20
|
+
* A choice made by LOOKING (unreleased, after 0.46.0; the store's logo, GemBoss Brand): `media` draws a picture above the choice's
|
|
21
|
+
* words, `layout="tiles"` puts the choices side by side (one column on a phone), and `disabled` shows a choice that cannot be taken
|
|
22
|
+
* (an option that failed its checks: seen, greyed, its radio off, and the confirm stays off while it is the value).
|
|
19
23
|
* Its stylesheet travels with it (`question-card.css`, own entry; `@gemboss/ui/question-card.css` for a plain-HTML surface that
|
|
20
24
|
* writes the same classes).
|
|
21
25
|
*/
|
|
@@ -35,6 +39,12 @@ export interface QuestionChoice {
|
|
|
35
39
|
note?: ReactNode;
|
|
36
40
|
/** The assistant's best guess: gets the pick tag. At most one choice should carry it, and it goes first. */
|
|
37
41
|
pick?: boolean;
|
|
42
|
+
/** A picture of the choice, above its words: for a choice a person makes by looking (a logo, a layout). Phrasing content only
|
|
43
|
+
* (spans, images): the choice is a `<label>`. */
|
|
44
|
+
media?: ReactNode;
|
|
45
|
+
/** Shown but not choosable (an option that failed): its radio is disabled, the row greyed, and the confirm stays off while it is
|
|
46
|
+
* the value. A surface should not make a disabled choice the `pick` or the starting `value`. */
|
|
47
|
+
disabled?: boolean;
|
|
38
48
|
}
|
|
39
49
|
|
|
40
50
|
/** One, two or three choices. A fourth does not type-check. */
|
|
@@ -71,17 +81,21 @@ export interface QuestionCardProps {
|
|
|
71
81
|
fine?: ReactNode;
|
|
72
82
|
/** While the confirm is being saved: the card stops taking input. */
|
|
73
83
|
busy?: boolean;
|
|
84
|
+
/** `rows` (default): one choice under the other. `tiles`: side by side, each with its `media` on top; one column on a phone. */
|
|
85
|
+
layout?: "rows" | "tiles";
|
|
74
86
|
className?: string;
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
export function QuestionCard({
|
|
78
90
|
id, question, eyebrow, evidence, art, choices, value, onChange, confirmLabel, onConfirm, pickLabel = "Gem's pick",
|
|
79
|
-
onOther, otherLabel = "Type my own", onSkip, skipLabel = "Skip", fine, busy, className,
|
|
91
|
+
onOther, otherLabel = "Type my own", onSkip, skipLabel = "Skip", fine, busy, layout = "rows", className,
|
|
80
92
|
}: QuestionCardProps) {
|
|
81
93
|
const list: readonly QuestionChoice[] = choices.slice(0, MAX_QUESTION_CHOICES);
|
|
82
94
|
const qid = `${id}-q`;
|
|
95
|
+
// The confirm commits the value only when it is a choice that can be taken: never a disabled one, never one that is not listed.
|
|
96
|
+
const confirmable = list.some((c) => c.id === value && !c.disabled);
|
|
83
97
|
return (
|
|
84
|
-
<section className={cx("ui-qcard", className)} aria-labelledby={qid} aria-busy={busy || undefined}>
|
|
98
|
+
<section className={cx("ui-qcard", layout === "tiles" && "ui-qcard--tiles", className)} aria-labelledby={qid} aria-busy={busy || undefined}>
|
|
85
99
|
<header className="ui-qcard__head">
|
|
86
100
|
{art ? <div className="ui-qcard__art" aria-hidden>{art}</div> : null}
|
|
87
101
|
<div className="ui-qcard__ask">
|
|
@@ -93,8 +107,9 @@ export function QuestionCard({
|
|
|
93
107
|
<div className="ui-qcard__choices" role="radiogroup" aria-labelledby={qid}>
|
|
94
108
|
{list.map((c) => (
|
|
95
109
|
<label className="ui-qcard__choice" key={c.id}>
|
|
96
|
-
<input className="ui-qcard__input" type="radio" name={id} value={c.id} checked={value === c.id} disabled={busy}
|
|
110
|
+
<input className="ui-qcard__input" type="radio" name={id} value={c.id} checked={value === c.id} disabled={busy || c.disabled}
|
|
97
111
|
onChange={() => onChange(c.id)} />
|
|
112
|
+
{c.media ? <span className="ui-qcard__media">{c.media}</span> : null}
|
|
98
113
|
<span className="ui-qcard__dot" aria-hidden />
|
|
99
114
|
<span className="ui-qcard__text">
|
|
100
115
|
<span className="ui-qcard__label">{c.label}</span>
|
|
@@ -105,7 +120,7 @@ export function QuestionCard({
|
|
|
105
120
|
))}
|
|
106
121
|
</div>
|
|
107
122
|
<div className="ui-qcard__foot">
|
|
108
|
-
<button type="button" className="ui-btn ui-btn--primary ui-qcard__confirm" disabled={busy || !
|
|
123
|
+
<button type="button" className="ui-btn ui-btn--primary ui-qcard__confirm" disabled={busy || !confirmable}
|
|
109
124
|
onClick={() => onConfirm(value)}>{confirmLabel}</button>
|
|
110
125
|
{onOther ? <button type="button" className="ui-btn ui-btn--ghost" disabled={busy} onClick={onOther}>{otherLabel}</button> : null}
|
|
111
126
|
{onSkip ? <button type="button" className="ui-btn ui-btn--ghost" disabled={busy} onClick={onSkip}>{skipLabel}</button> : null}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(g){"use strict";var q=g.gembossUI;if(!q){g.console&&g.console.error("@gemboss/ui session-rail-plain.js: load kit-plain.js first (it defines gembossUI)");return}if(q.sessionRail)return;var S="http://www.w3.org/2000/svg",j=function(r){return typeof Node<"u"&&r instanceof Node};function B(r,t){var i={},n;for(n in r)i[n]=r[n];for(n in t)i[n]=t[n];return i}function l(r,t,i){var n=document.createElement(r);if(t)for(var o in t){var d=t[o];d==null||d===!1||(o==="className"?n.className=d:n.setAttribute(o,d===!0?"":String(d)))}return(Array.isArray(i)?i:i==null?[]:[i]).forEach(function(a){n.appendChild(j(a)?a:document.createTextNode(String(a)))}),n}function Q(r){try{return g.localStorage.getItem(r)}catch{return null}}function J(r,t){try{g.localStorage.setItem(r,t)}catch{}}var O={newChat:"New chat",expand:"Expand sidebar",collapse:"Collapse sidebar",expandTitle:"Expand",collapseTitle:"Collapse",searchPlaceholder:"Search conversations\u2026",searchLabel:"Search history",clearSearch:"Clear search",noneFound:"No conversations found",noneYet:"No conversations yet",openNow:"Open now",pinned:"Pinned",today:"Today",yesterday:"Yesterday",previous7:"Previous 7 days",previous30:"Previous 30 days",older:"Older",working:"working",options:"Options",save:"Save",cancel:"Cancel",pin:"Pin",unpin:"Unpin",rename:"Rename",exportMarkdown:"Export Markdown",remove:"Delete",confirmRemove:"Delete this chat?",justNow:"just now",minutesAgo:function(r){return r+" min ago"},hoursAgo:function(r){return r+" hr ago"},daysAgo:function(r){return r+" day"+(r>1?"s":"")+" ago"},dateLocale:"en-US"};function H(r,t,i){t=t||O;var n=Math.floor(((i===void 0?Date.now():i)-r)/6e4);if(n<1)return t.justNow;if(n<60)return t.minutesAgo(n);var o=Math.floor(n/60);if(o<24)return t.hoursAgo(o);var d=Math.floor(o/24);return d<7?t.daysAgo(d):new Date(r).toLocaleDateString(t.dateLocale)}function P(r){return String(r).toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/đ/g,"d")}function _(r,t,i){t=t||O;var n=r.filter(function(p){return p.pinned}),o=r.filter(function(p){return!p.pinned}),d=new Date(i===void 0?Date.now():i),a=new Date(d.getFullYear(),d.getMonth(),d.getDate()).getTime(),A=864e5,T=[{label:t.today,min:a},{label:t.yesterday,min:a-A},{label:t.previous7,min:a-7*A},{label:t.previous30,min:a-30*A},{label:t.older,min:-1/0}],f=T.map(function(p){return{label:p.label,items:[]}});o.forEach(function(p){for(var v=-1,L=0;L<T.length;L++)if(p.updatedAt>=T[L].min){v=L;break}f[v===-1?f.length-1:v].items.push(p)});var w=n.length?[{label:t.pinned,items:n}]:[];return w.concat(f.filter(function(p){return p.items.length>0}))}q.assistantSessions={relativeTime:H,normalizeForSearch:P,groupSessions:_,labels:O};function b(r){return function(t){var i=document.createElementNS(S,"svg");i.setAttribute("viewBox","0 0 20 20"),t&&i.setAttribute("class",t),i.setAttribute("aria-hidden","true"),i.setAttribute("focusable","false");var n=document.createElementNS(S,"g");return[["fill","none"],["stroke","currentColor"],["stroke-width","1.6"],["stroke-linecap","round"],["stroke-linejoin","round"]].forEach(function(o){n.setAttribute(o[0],o[1])}),r.forEach(function(o){var d=document.createElementNS(S,o.tag||"path");for(var a in o)a!=="tag"&&d.setAttribute(a,o[a]);n.appendChild(d)}),i.appendChild(n),i}}var X={compose:b([{d:"M11 4H5.5A1.5 1.5 0 0 0 4 5.5v9A1.5 1.5 0 0 0 5.5 16h9a1.5 1.5 0 0 0 1.5-1.5V9"},{d:"M14.5 3.5l2 2L10 12H8v-2z"}]),chevronLeft:b([{d:"M12 5l-5 5 5 5"}]),chevronRight:b([{d:"M8 5l5 5-5 5"}]),search:b([{tag:"circle",cx:"9",cy:"9",r:"5"},{d:"M13 13l3.5 3.5"}]),close:b([{d:"M6 6l8 8M14 6l-8 8"}]),check:b([{d:"M4.5 10.5l3.5 3.5 7.5-8"}]),more:b([{tag:"circle",cx:"5",cy:"10",r:".8"},{tag:"circle",cx:"10",cy:"10",r:".8"},{tag:"circle",cx:"15",cy:"10",r:".8"}]),pin:b([{d:"M8 3.5h4l-.5 5 2.5 2.5H6l2.5-2.5z"},{d:"M10 11v5.5"}]),pinFilled:function(r){var t=document.createElementNS(S,"svg");t.setAttribute("viewBox","0 0 20 20"),r&&t.setAttribute("class",r),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false");var i=document.createElementNS(S,"path");i.setAttribute("d","M8 3.5h4l-.5 5 2.5 2.5H6l2.5-2.5z"),i.setAttribute("fill","currentColor");var n=document.createElementNS(S,"path");return n.setAttribute("d","M10 11v5.5"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","1.6"),n.setAttribute("stroke-linecap","round"),t.appendChild(i),t.appendChild(n),t},edit:b([{d:"M4 16h3l8.5-8.5-3-3L4 13z"}]),exportIcon:b([{d:"M10 3.5v9M6.5 7L10 3.5 13.5 7"},{d:"M4 12.5v3h12v-3"}]),remove:b([{d:"M5 6h10M8 6V4.5h4V6M6.5 6l.7 9.5h5.6l.7-9.5"}])};q.sessionRail=function(r){r=r||{};var t={sessions:[],unlistedIds:[],activeId:void 0,pendingId:null,busyIds:[],collapsed:!1,footer:null,titleMaxLength:200,newChatTitle:void 0},i={},n=O,o=X,d=r.storageKey||"",a={query:"",editingId:null,editValue:"",menuId:null,menuTop:0,menuLeft:0,confirmDeleteId:null},A=[];function T(e){["sessions","unlistedIds","busyIds"].forEach(function(s){e[s]!==void 0&&(t[s]=e[s]||[])}),["activeId","pendingId","footer","newChatTitle"].forEach(function(s){e[s]!==void 0&&(t[s]=e[s])}),e.collapsed!==void 0&&(t.collapsed=!!e.collapsed),e.titleMaxLength!==void 0&&(t.titleMaxLength=e.titleMaxLength||200),e.labels&&(n=B(n,e.labels)),e.icons&&(o=B(o,e.icons)),["onToggleCollapsed","onNewChat","onOpen","onRename","onTogglePin","onDelete","onExport"].forEach(function(s){e[s]!==void 0&&(i[s]=e[s])})}T(r),r.collapsed===void 0&&d&&(t.collapsed=Q(d)==="1");var f=l("aside",{className:"gemboss-assistant-rail"}),w=l("button",{type:"button",className:"gemboss-assistant-newchat"});w.addEventListener("click",function(){i.onNewChat&&i.onNewChat()});var p=l("button",{type:"button",className:"gemboss-assistant-collapse"});p.addEventListener("click",function(){if(i.onToggleCollapsed){i.onToggleCollapsed();return}t.collapsed=!t.collapsed,d&&J(d,t.collapsed?"1":"0"),K()}),f.appendChild(l("div",{className:"gemboss-assistant-rail-top"},[w,p]));var v=l("div",{className:"gemboss-assistant-search gemboss-field gemboss-field--group"}),L=o.search(),y=l("input",{className:"gemboss-field__bare"}),V=null;y.addEventListener("input",function(){a.query=y.value,F(),E()}),y.addEventListener("keydown",function(e){e.key==="Escape"&&(e.preventDefault(),Y(""),y.blur())}),v.appendChild(L),v.appendChild(y);var C=l("div",{className:"gemboss-assistant-threads"});f.appendChild(C);var z=[];function Y(e){a.query=e,y.value=e,F(),E()}function F(){var e;a.query?(e=l("button",{type:"button",className:"gemboss-assistant-search-clear","aria-label":n.clearSearch},o.close()),e.addEventListener("click",function(){Y("")})):e=l("kbd",{className:"gemboss-assistant-kbd"},"/"),V?v.replaceChild(e,V):v.appendChild(e),V=e}function M(){a.menuId!==null&&(a.menuId=null,U(),E())}function U(){A.forEach(function(e){e()}),A=[]}function Z(){U();var e=function(u){var m=C.querySelector(".gemboss-assistant-menu");(!m||!m.contains(u.target))&&M()},s=function(){M()};document.addEventListener("mousedown",e),g.addEventListener("scroll",s,!0),g.addEventListener("resize",s),A.push(function(){document.removeEventListener("mousedown",e),g.removeEventListener("scroll",s,!0),g.removeEventListener("resize",s)})}function $(e,s){if(a.menuId===s){M();return}var u=e.getBoundingClientRect(),m=184,c=200,h=u.bottom+c+8>g.innerHeight;a.menuLeft=Math.max(8,Math.min(u.right-m,g.innerWidth-m-8)),a.menuTop=h?Math.max(8,u.top-6-c):u.bottom+6,a.confirmDeleteId=null,a.menuId=s,Z(),E()}function ee(e){a.editingId=e.id,a.editValue=e.title,E()}function W(){a.editingId=null,a.editValue="",E()}function G(e){var s=a.editValue.trim();a.editingId=null,E(),!(!s||s===e.title)&&i.onRename&&i.onRename(e.id,s)}function D(e,s,u,m){var c=l("button",{type:"button",role:"menuitem",className:m?"danger":null},[e,l("span",null,s)]);return c.addEventListener("click",u),c}function te(e){var s=a.editingId===e.id,u=l("div",{className:"gemboss-assistant-thread"+(e.id===t.activeId||e.id===t.pendingId?" active":"")+(s?" editing":"")+(a.menuId===e.id?" menu-open":"")});if(s){var m=l("input",{className:"gemboss-field",maxlength:String(t.titleMaxLength)});m.value=a.editValue,m.addEventListener("input",function(){a.editValue=m.value}),m.addEventListener("keydown",function(x){x.key==="Enter"?(x.preventDefault(),G(e)):x.key==="Escape"&&(x.preventDefault(),W())});var c=l("button",{type:"button",className:"gemboss-assistant-thread-act","aria-label":n.save},o.check());c.addEventListener("click",function(){G(e)});var h=l("button",{type:"button",className:"gemboss-assistant-thread-act","aria-label":n.cancel},o.close());return h.addEventListener("click",W),u.appendChild(l("div",{className:"gemboss-assistant-thread-edit"},[m,c,h])),u}var I=l("span",{className:"gemboss-assistant-thread-titlerow"});t.busyIds.indexOf(e.id)>=0&&I.appendChild(l("span",{className:"gemboss-assistant-thread-running","aria-label":n.working})),e.pinned&&I.appendChild(o.pinFilled("gemboss-assistant-pin-dot")),I.appendChild(l("span",{className:"gemboss-assistant-thread-title"},e.title));var k=l("button",{type:"button",className:"gemboss-assistant-thread-main",title:e.title},[I,l("span",{className:"gemboss-assistant-thread-meta"},H(e.updatedAt,n))]);k.addEventListener("click",function(){i.onOpen&&i.onOpen(e.id)}),k.gbRailKey=e.id+":main";var R=l("button",{type:"button",className:"gemboss-assistant-thread-act","aria-label":n.options},o.more());if(R.addEventListener("mousedown",function(x){x.stopPropagation()}),R.addEventListener("click",function(){$(R,e.id)}),R.gbRailKey=e.id+":more",u.appendChild(k),u.appendChild(l("div",{className:"gemboss-assistant-thread-actions"},R)),a.menuId===e.id){var N=l("div",{className:"gemboss-popover-surface gemboss-assistant-menu",role:"menu"});N.style.position="fixed",N.style.top=a.menuTop+"px",N.style.left=a.menuLeft+"px",a.confirmDeleteId===e.id?(N.appendChild(l("div",{className:"gemboss-assistant-menu-confirm"},n.confirmRemove)),N.appendChild(D(o.remove(),n.remove,function(){M(),i.onDelete&&i.onDelete(e.id)},!0)),N.appendChild(D(o.close(),n.cancel,function(){a.confirmDeleteId=null,E()}))):(i.onTogglePin&&N.appendChild(D(e.pinned?o.pin():o.pinFilled(),e.pinned?n.unpin:n.pin,function(){M(),i.onTogglePin(e)})),N.appendChild(D(o.edit(),n.rename,function(){M(),ee(e)})),i.onExport&&N.appendChild(D(o.exportIcon(),n.exportMarkdown,function(){M(),i.onExport(e.id)})),N.appendChild(D(o.remove(),n.remove,function(){a.confirmDeleteId=e.id,E()},!0))),u.appendChild(N)}return u}function ne(){var e=P(a.query.trim());if(e){var s=t.sessions.filter(function(c){return P(c.title+" "+(c.preview||"")).indexOf(e)>=0});return s.length?[{label:"",items:s}]:[]}var u=_(t.sessions,n),m=t.unlistedIds.filter(function(c){return!t.sessions.some(function(h){return h.id===c})}).map(function(c){return{id:c,title:n.newChat,updatedAt:Date.now(),pinned:!1}});return m.length?[{label:n.openNow,items:m}].concat(u):u}function E(){for(var e=document.activeElement&&C.contains(document.activeElement)?document.activeElement:null,s=!!e&&e.tagName==="INPUT",u=e?e.gbRailKey:null;C.firstChild;)C.removeChild(C.firstChild);var m=ne();m.length?m.forEach(function(h){var I=l("div",{className:"gemboss-assistant-group"});h.label&&I.appendChild(l("div",{className:"gemboss-assistant-group-label"},h.label)),h.items.forEach(function(k){I.appendChild(te(k))}),C.appendChild(I)}):C.appendChild(l("div",{className:"gemboss-assistant-threads-empty"},a.query?n.noneFound:n.noneYet)),u&&Array.prototype.some.call(C.querySelectorAll("button"),function(h){return h.gbRailKey!==u?!1:(h.focus({preventScroll:!0}),!0)});var c=C.querySelector(".gemboss-assistant-thread-edit input");if(c&&(s||a.editingId!==null)){c.focus();try{c.setSelectionRange(c.value.length,c.value.length)}catch{}}}function K(){for(f.className="gemboss-assistant-rail"+(t.collapsed?" is-collapsed":"");w.firstChild;)w.removeChild(w.firstChild);for(w.title=t.newChatTitle!==void 0&&t.newChatTitle!==null?t.newChatTitle:n.newChat,w.appendChild(o.compose()),w.appendChild(l("span",null,n.newChat));p.firstChild;)p.removeChild(p.firstChild);p.setAttribute("aria-label",t.collapsed?n.expand:n.collapse),p.title=t.collapsed?n.expandTitle:n.collapseTitle,p.appendChild(t.collapsed?o.chevronRight():o.chevronLeft()),t.sessions.length>0?(y.setAttribute("placeholder",n.searchPlaceholder),y.setAttribute("aria-label",n.searchLabel),y.value!==a.query&&(y.value=a.query),F(),v.parentNode!==f&&f.insertBefore(v,C)):v.parentNode===f&&f.removeChild(v),E(),z.forEach(function(e){e.parentNode===f&&f.removeChild(e)}),z=t.footer?(Array.isArray(t.footer)?t.footer:[t.footer]).filter(j):[],z.forEach(function(e){f.appendChild(e)})}return K(),{el:f,update:function(e){T(e||{}),K()},focusSearch:function(){v.parentNode===f&&y.focus()},destroy:function(){U(),f.parentNode&&f.parentNode.removeChild(f)}}}})(typeof globalThis<"u"?globalThis:this);
|