@gemboss/ui 0.71.0 → 0.73.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 +377 -2
- package/README.md +145 -2
- package/catalog/editor.html +1 -1
- package/catalog/index.html +3 -3
- package/gemboss-ui.css +4 -4
- package/package.json +16 -1
- package/parts/components.css +3 -3
- package/parts/core.css +1 -1
- package/parts/shell.css +2 -2
- package/src/app-nav.css +1 -1
- package/src/assistant/chat-cards.tsx +118 -19
- package/src/assistant/chat.tsx +97 -12
- package/src/assistant/figures.tsx +119 -0
- package/src/assistant/gallery.tsx +67 -0
- package/src/assistant/host.tsx +29 -15
- package/src/assistant/ideas.tsx +90 -0
- package/src/assistant/index.ts +8 -1
- package/src/assistant/plus.tsx +61 -0
- package/src/assistant-chat.css +1 -1
- package/src/assistant-figures.css +1 -0
- package/src/assistant-plus.css +1 -0
- package/src/assistant.css +1 -1
- package/src/board-move.ts +2 -1
- package/src/chat-cards-drawn.css +1 -0
- package/src/chat-cards-float.css +1 -0
- package/src/chat-cards.css +1 -1
- package/src/chat-composer-menus.css +1 -1
- package/src/chat-composer.css +1 -1
- package/src/chat-shortcuts.css +1 -0
- package/src/chat-voice.css +1 -1
- package/src/chat.css +1 -1
- package/src/chips-drawn.css +1 -0
- package/src/collections.tsx +4 -2
- package/src/dialog.css +1 -1
- package/src/editor/choice-cards.tsx +8 -5
- package/src/editor/controls.tsx +8 -5
- package/src/editor/field-control.tsx +8 -3
- package/src/editor/field-spec.ts +12 -3
- package/src/editor/index.ts +2 -0
- package/src/editor/media-words.ts +21 -0
- package/src/editor-empty.css +1 -1
- package/src/editor-media.css +1 -1
- package/src/editor.css +1 -1
- package/src/email-canvas.css +1 -0
- package/src/email-card.tsx +44 -0
- package/src/email-editor/canvas.tsx +109 -0
- package/src/email-editor/editor.tsx +45 -4
- package/src/email-editor/index.ts +2 -1
- package/src/email-editor/model.ts +9 -1
- package/src/email-parts.css +1 -0
- package/src/email-parts.tsx +81 -0
- package/src/email-thumb.css +1 -0
- package/src/email-thumb.tsx +206 -0
- package/src/flow-strip.css +1 -0
- package/src/flow-strip.tsx +50 -0
- package/src/gemboss-field-drawn.css +1 -0
- package/src/index.ts +11 -0
- package/src/kit-plain.css +1 -1
- package/src/kit-plain.js +1 -1
- package/src/list-page.tsx +6 -3
- package/src/media-card.css +1 -0
- package/src/menu-layer.ts +2 -0
- package/src/menu-select.css +1 -1
- package/src/menu.css +1 -1
- package/src/picture-actions.css +1 -0
- package/src/picture-actions.tsx +23 -0
- package/src/reader-dialog.css +1 -1
- package/src/segmented.tsx +6 -0
- package/src/settings-dialog.css +1 -1
- package/src/sheet.css +1 -1
- package/src/shell.css +1 -1
- package/src/shell.tsx +9 -2
- package/src/stat-tile.css +1 -0
- package/src/stat-tile.tsx +39 -0
- package/src/ui.css +1 -1
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ its CSS out of the build with it (`sideEffects`). gzip of the minified file, as
|
|
|
77
77
|
| editor-inspector-frame | `@gemboss/ui/editor-inspector-frame.css` | `packages/ui/src/editor-inspector-frame.css` | `InspectorFrame`, `InspectorFrameGroup`: the settings frame every settings surface draws (search, the index of clusters, a cluster's name, a group open, a + line, added with a −) | 1.0 KB | `InspectorFrame` imports it |
|
|
78
78
|
| editor-insert | `@gemboss/ui/editor-insert.css` | `packages/ui/src/editor-insert.css` | the page editor's insert menu (the + on a picked element) | 0.6 KB | admin `InsertElementMenu` imports it |
|
|
79
79
|
| email-editor | `@gemboss/ui/email-editor.css` | `packages/ui/src/email-editor.css` | `EmailEditor` and `EmailPreview`: the email editor's column, rows, picker, checks pill and the mail itself (05/11/2026, unreleased) | 2.2 KB | `EmailEditor` / `EmailPreview` import it (with editor.css) |
|
|
80
|
+
| email-canvas | `@gemboss/ui/email-canvas.css` | `packages/ui/src/email-canvas.css` | `EmailCanvas`, the email editor's stage drawn from the real email with a block picked on it, and the brand row over the blocks (15/11/2026, unreleased) | 0.7 KB | `EmailCanvas` / `EmailEditor` import it |
|
|
80
81
|
| narration | `@gemboss/ui/narration.css` | `packages/ui/src/narration.css` | the narration timeline's own: a step that selects its section, its Undo from here, the plan card pinned at the top of a turn | 0.6 KB | admin `NarrationTimeline` imports it |
|
|
81
82
|
| editor-rail | `@gemboss/ui/editor-rail.css` | `packages/ui/src/editor-rail.css` | the page editor's 56px rail: the editor frame 56px in, the shell's rail beside it as icons, opened to 240px over the editor (unreleased) | 0.9 KB | admin `EditorRailToggle` imports it |
|
|
82
83
|
| rail-mini | `@gemboss/ui/rail-mini.css` | `packages/ui/src/rail-mini.css` | the rail folded to 56px of icons (`railMode="mini"`, 0.62.0): rows as icons with their names out of sight, counts as dots, main at 56 | 0.6 KB | `AppNav` imports it; a surface that folds the rail without one links it |
|
|
@@ -122,6 +123,15 @@ its CSS out of the build with it (`sideEffects`). gzip of the minified file, as
|
|
|
122
123
|
| members | `@gemboss/ui/members.css` | `packages/ui/src/members.css` | `MembersPage`: the members list of every service (chips with counts, the table with a role select per scope and the inline confirm, the drawer, Invite and the CSV check, the phone cards); the `gb-members-*` classes a plain-HTML page writes (04/11/2026, unreleased) | 2.0 KB | `MembersPage` imports it (with list-page.css, sheet.css, portal.css through the kit parts it draws); a plain-HTML page links it (README "Members") |
|
|
123
124
|
| gems | `@gemboss/ui/gems.css` | `packages/ui/src/gems.css` | The four gems: `--gemboss-gem-emerald` / `-ruby` / `-amber` (sapphire is the iris accent) and the rail count in ruby. Colour with a job: ruby = look here, emerald = it is working, amber = connect and wait; never a button fill (unreleased) | 0.1 KB | the surface links it beside its core (the bundle is frozen) |
|
|
124
125
|
| gem-holo | `@gemboss/ui/gem-holo.css` | `packages/ui/src/gem-holo.css` | `GemHolo`: Gem, alive, the four gems as one light that morphs and turns while Gem works; CSS only, still under reduced motion (unreleased) | 0.5 KB | `GemHolo` imports it; `@gemboss/ui/gem-holo` loads it after the page |
|
|
126
|
+
| media-card | `@gemboss/ui/media-card.css` | `packages/ui/src/media-card.css` | the media card (`MediaCard`, `ui-card--media`): moved out of `kit-plain.css` (15/11/2026, waits on Chris's OK, same rules, same order), part of the core AND its own file | 0.8 KB | `EmailCard` imports it; an admin page that draws `MediaCard` imports it (the admin never loads kit-plain.css) |
|
|
127
|
+
| email-thumb | `@gemboss/ui/email-thumb.css` | `packages/ui/src/email-thumb.css` | `EmailThumb`, an email drawn as itself in a sandboxed frame and scaled into a card, a 96×72 row or a 56×42 one; `ThumbCell`, a cell with a picture and words (15/11/2026, unreleased) | 0.6 KB | `EmailThumb` / `ThumbCell` import it |
|
|
128
|
+
| picture-actions | `@gemboss/ui/picture-actions.css` | `packages/ui/src/picture-actions.css` | `PictureActions`: a picture's actions on a light scrim on hover, the button on a picture (15/11/2026, unreleased) | 0.4 KB | `PictureActions` (and `EmailCard` through it) imports it |
|
|
129
|
+
| flow-strip | `@gemboss/ui/flow-strip.css` | `packages/ui/src/flow-strip.css` | `FlowStrip`: a flow's steps in one row, joined by arrows (15/11/2026, unreleased) | 0.5 KB | `FlowStrip` imports it |
|
|
130
|
+
| stat-tile | `@gemboss/ui/stat-tile.css` | `packages/ui/src/stat-tile.css` | `StatTile`, `StatTiles`: a home page's number as a card, its line and its sparkline (15/11/2026, unreleased) | 0.3 KB | `StatTile` imports it (and minichart.css through Sparkline) |
|
|
131
|
+
| email-parts | `@gemboss/ui/email-parts.css` | `packages/ui/src/email-parts.css` | `EmailParts`: the top and the foot of the real email beside a brand setting (15/11/2026, unreleased) | 0.5 KB | `EmailParts` imports it |
|
|
132
|
+
| gemboss-field-drawn | `@gemboss/ui/gemboss-field-drawn.css` | `packages/ui/src/gemboss-field-drawn.css` | a field made of parts (`.gemboss-field--group`) under a thumb or at a phone's width drawn at a Polaris field's size in its 44px box: 36, 32 from 48em under a finger (15/11/2026, its own entry: gemboss-field.css is in the frozen bundle) | 0.4 KB | a surface that draws a group links it (the admin's SettingsDialog imports it) |
|
|
133
|
+
| chat-cards-drawn | `@gemboss/ui/chat-cards-drawn.css` | `packages/ui/src/chat-cards-drawn.css` | a chat CTA and a page card's Open under a thumb drawn at their mouse size, 38 and 32, in their 44px box; the glow on the drawing (15/11/2026, its own entry: chat-cards.css is at its ceiling) | 0.4 KB | `chat-cards.tsx` imports it after chat-cards.css |
|
|
134
|
+
| chips-drawn | `@gemboss/ui/chips-drawn.css` | `packages/ui/src/chips-drawn.css` | every chip in `.ui-chips` (a link, a toggle, a static one) in the finger tier drawn at its mouse 30 in its 44px box (15/11/2026, its own entry: ui.css is in the frozen bundle) | 0.3 KB | a surface that draws `.ui-chips` links it after gemboss-ui.css (or the parts) |
|
|
125
135
|
| 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) |
|
|
126
136
|
|
|
127
137
|
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).
|
|
@@ -1485,10 +1495,31 @@ smaller and save room (GemFeedback #1099). Measured at 1280 with a mouse:
|
|
|
1485
1495
|
| Title | 14px / 650 | 15px / 620 | **14px / 650** |
|
|
1486
1496
|
| `ui-btn` in `__head` / `__foot` | 28 tall, 12px, padding 0/12 | 32, 13px, 0/16 | **28, 12px, 0/12**; 44 under a thumb or ≤ 767px |
|
|
1487
1497
|
| Body / foot padding | 16 / 16 | 16/20 / 12/20 | **16 / 12/16** |
|
|
1488
|
-
| Scrim | rgba(0,0,0,.5), no blur | .6, blur 2px | **.5, no blur** (`::backdrop` too) |
|
|
1498
|
+
| Scrim | rgba(0,0,0,.5), no blur | .6, blur 2px | **.5, no blur** (`::backdrop` too) until 13/11/2026; now "What lies behind a popup", below |
|
|
1489
1499
|
|
|
1490
1500
|
Popup only: `--ui-control-h` stays 32, and a button outside a popup is still 32 tall.
|
|
1491
1501
|
|
|
1502
|
+
### What lies behind a popup (13/11/2026)
|
|
1503
|
+
|
|
1504
|
+
Chris, 13/11/2026: "the design system has a frosted glass background under an overlay". The density above stays Polaris's; the
|
|
1505
|
+
scrim is the kit's own. Black .5 with no blur left the page's text as sharp as the popup's.
|
|
1506
|
+
|
|
1507
|
+
| Shape | Behind it | Rule |
|
|
1508
|
+
|---|---|---|
|
|
1509
|
+
| Centred, at a popup's width (460, `wide` 620, a picker's 960): `Dialog`, `ConfirmDialog`, `FeedbackDialog`, the portal's search, `openModal` (`.ui-overlay`) | the ink at .22, `rgba(31,30,29,.22)`, under the kit's frost, `blur(14px) saturate(1.4)` (the one the menus and the top bar wear) | `dialog.ui-modal::backdrop` in `dialog.css` and `kit-plain.css`; `.ui-overlay` in `ui.css` |
|
|
1510
|
+
| Beside the page: `Sheet` | `rgba(0,0,0,.3)`, no frost: the list it was opened from stays readable | `sheet.css` |
|
|
1511
|
+
| The size of a screen: `ReaderDialog`, `SettingsDialog` | `rgba(0,0,0,.5)`, no frost: the page is a thin frame there, so the frost would not be seen while the whole window is blurred under it for as long as it is open | `reader-dialog.css`, `settings-dialog.css` |
|
|
1512
|
+
|
|
1513
|
+
A popup built on `dialog.ui-modal`, or opened in `.ui-overlay`, is frosted unless the surface's own sheet turns the frost off by
|
|
1514
|
+
name for it (`backdrop-filter: none`, and the `-webkit-` one: Safari before 18 reads only that). A surface with a side panel or a
|
|
1515
|
+
screen-sized popup of its own does so: on the dialog's `::backdrop`, or on the overlay through `openModal({ overlayClass: "x" })` and
|
|
1516
|
+
`.ui-overlay.x { background: rgba(0,0,0,.5); -webkit-backdrop-filter: none; backdrop-filter: none; }` (the admin's Modal at
|
|
1517
|
+
`size="lg"` is the example). The fill is for a light page: the kit has no dark theme, and a dark surface keeps a darker fill in
|
|
1518
|
+
its own sheet (the admin's console does). Where `backdrop-filter` is missing the scrim is the ink at .22 alone. Held in
|
|
1519
|
+
Chromium by `modal-density.test.ts`, `kit-look.test.ts`, `confirm-dialog-browser.test.tsx` (frosted) and by the Sheet's, the
|
|
1520
|
+
reader's and the settings' browser tests (not frosted; each one's control runs without its sheet and finds the frost);
|
|
1521
|
+
`dialog-frame-one-copy.test.ts` holds the two copies of the dialog's rule equal.
|
|
1522
|
+
|
|
1492
1523
|
`.ui-modal__body` and `.ui-modal__foot` moved from `kit-plain.css` to `ui.css`. The admin loads `ui.css` and not
|
|
1493
1524
|
`kit-plain.css`, so before 0.7.3 its kit popups drew a body with no padding and two foot buttons touching
|
|
1494
1525
|
(AutopilotConfirmModal). The scrolling layout of a tall popup stays in `kit-plain.css`.
|
|
@@ -1536,7 +1567,7 @@ does: keep it idempotent. A route that draws the sheet (Next's intercepting rout
|
|
|
1536
1567
|
| Behaviour | It is `Dialog` with `ui-sheet` on it (one render tree, one hook, `useModalDialog`): Escape, ✕ and a click on the backdrop close it (a press that STARTED on the backdrop: a selection dragged out of the panel does not), `onClose` hears each once, the page behind is inert and holds still (`html:has(dialog.ui-modal:modal) { overflow: hidden }` in kit-plain.css, one rule for every modal kit popup), the panel itself takes focus on open (not the head's first link), focus goes back to the row. The subtitle describes the popup (`aria-describedby`); the name is the title alone |
|
|
1537
1568
|
| Size | the full height; 560 wide, `wide` 760, from 768px up; the whole screen below that; head, ✕ and buttons at the popup's density (README "Popup density") |
|
|
1538
1569
|
| Motion | slides in from the right (200 ms); none under `prefers-reduced-motion` |
|
|
1539
|
-
| Scrim | `rgba(0,0,0,.3)
|
|
1570
|
+
| Scrim | `rgba(0,0,0,.3)` and no frost (the centred popup frosts the page behind it, "What lies behind a popup"): the list stays readable beside it |
|
|
1540
1571
|
| CSS | `sheet.css`, its own entry, loaded by the component. Every selector is `dialog.ui-modal.ui-sheet…` ((0,2,1), so it holds whatever order the sheets load in) or the page lock. It lays itself out (no padding, border-box, a column whose body scrolls), so it works on a surface that loads `ui.css` alone; the head's subtitle and actions are styled by `kit-plain.css`. A plain-HTML surface links `@gemboss/ui/sheet.css` beside `gemboss-ui.css` and opens the markup with `showModal()`, never the `open` attribute (no scrim, page not inert) |
|
|
1541
1572
|
|
|
1542
1573
|
The body scrolls under a head that stays, and scrolling past its end does not scroll the list (`overscroll-behavior:
|
|
@@ -2031,6 +2062,77 @@ The surface owns where the seam sits and what it does. Five rules, each paid for
|
|
|
2031
2062
|
React surfaces: `useResizableChatPanel` in the admin is the reference. Others write the same markup and
|
|
2032
2063
|
the five rules by hand; the catalog's "Thanh kéo giữa hai cột" shows the markup.
|
|
2033
2064
|
|
|
2065
|
+
## Figures under an answer: `ChatFigures` (13/11/2026, unreleased)
|
|
2066
|
+
|
|
2067
|
+
Numbers drawn under the words of a chat answer, with the line that says where they come from (Gem Plus slice 2, boards artifact
|
|
2068
|
+
DmPeQEJDAZXdiTxzmFv5UL: "stats, chart, source line"). The answer names one or two; the figures carry the rest. Built from the report's
|
|
2069
|
+
vocabulary (`ui-metrics` from ui.css, `ui-barlist` from report-charts.css, which it imports), so a report drawn later from the same
|
|
2070
|
+
figures looks the same. Its frame is its own entry, `@gemboss/ui/assistant-figures.css` (0.2 KB gzip).
|
|
2071
|
+
|
|
2072
|
+
```tsx
|
|
2073
|
+
import { ChatFigures } from "@gemboss/ui/assistant";
|
|
2074
|
+
<ChatFigures title="Skincare & beauty" source="From pages and ads live in this niche…" figures={[
|
|
2075
|
+
{ id: "carry", title: "What pages behind long-running ads carry", sub: "…", brands: "100+",
|
|
2076
|
+
rows: [{ key: "guarantee", label: "Money-back guarantee", proven: 60, all: 31 }] }, // bar = proven, "all pages 31%" beside it
|
|
2077
|
+
{ id: "lands", title: "Where long-running ads land", brands: "50+", rows: [{ key: "product", label: "Product page", share: 54 }] },
|
|
2078
|
+
{ id: "tiers", title: "Landing pages with three price cards", brands: "20+", value: 24.1, rows: [] }, // a number tile
|
|
2079
|
+
]} />
|
|
2080
|
+
```
|
|
2081
|
+
|
|
2082
|
+
- Shares only: every number it prints is a percentage (`figurePct`: whole from 10 up, one decimal below). The base is said as the
|
|
2083
|
+
surface gives it (`from 100+ brands`); the component adds no total and no date.
|
|
2084
|
+
- `labels` takes the surface's words (`from`, `vsAll`, `region`); English by default.
|
|
2085
|
+
- Colours are the chat's tokens, so the Gem Plus panel (`gb-dock--plus`) draws it in its own look.
|
|
2086
|
+
|
|
2087
|
+
### "/" in the message box: ChatComposer `shortcuts` (13/11/2026, unreleased)
|
|
2088
|
+
|
|
2089
|
+
Questions a surface offers behind a "/" (Gem Plus slice 4: the question library). Typing "/" lists them over the text box, filtered by
|
|
2090
|
+
every word after the slash (the question or what it `sub` says it gets), six at most. ↑/↓ move, Enter or Tab (or a press) put the
|
|
2091
|
+
question in the box to edit or send, Escape closes the list. No `shortcuts`: "/" is a character, nothing changes.
|
|
2092
|
+
|
|
2093
|
+
```tsx
|
|
2094
|
+
<ChatComposer value={draft} onChange={setDraft} onSend={send}
|
|
2095
|
+
shortcuts={[{ label: "How is my market moving this month?", sub: "Gets: numbers", prompt: "How is my market moving this month?" }]} />
|
|
2096
|
+
```
|
|
2097
|
+
|
|
2098
|
+
### Real pages under an answer: `ChatPageGallery` (13/11/2026, unreleased)
|
|
2099
|
+
|
|
2100
|
+
Pictures to choose by, two to a row, each with its label, a line of what it shows and one **Use this layout** link (Gem Plus slice 3).
|
|
2101
|
+
Same entry as `ChatFigures` (`assistant-figures.css`, 0.45 KB gzip with both).
|
|
2102
|
+
|
|
2103
|
+
```tsx
|
|
2104
|
+
import { ChatPageGallery } from "@gemboss/ui/assistant";
|
|
2105
|
+
<ChatPageGallery title="Advertorials that work in Pet" onUse={(href) => navigate(href)}
|
|
2106
|
+
pages={[{ label: "Real advertorial 1", meta: "Advertorial · 3 ads seen in the last 30 days", thumb_url, href }]} />
|
|
2107
|
+
```
|
|
2108
|
+
|
|
2109
|
+
- The button is a real link (`href`): a plain press calls `onUse(href)`, a modified click opens a new tab.
|
|
2110
|
+
- A tall page's picture shows its top, cropped at 4:5. The component says only what it is given: whether a card may name whose page
|
|
2111
|
+
it is, is the surface's call (the admin never does).
|
|
2112
|
+
|
|
2113
|
+
## Gem Plus: `ChatPlusChip` and AssistantHost `plus` (13/11/2026, unreleased)
|
|
2114
|
+
|
|
2115
|
+
A mode switch for a chat that can answer about the market as well as the store (Gem Plus boards, artifact
|
|
2116
|
+
DmPeQEJDAZXdiTxzmFv5UL; Chris: "đúng chính xác rồi làm đi"). Its own entry, `@gemboss/ui/assistant-plus.css`, imported by both
|
|
2117
|
+
pieces: every surface that draws AssistantHost loads it (1.1 KB gzip, the host writes `gb-dock--plus`).
|
|
2118
|
+
|
|
2119
|
+
```tsx
|
|
2120
|
+
import { AssistantHost, ChatPlusChip } from "@gemboss/ui/assistant";
|
|
2121
|
+
<ChatComposer stacked rows={1} tools={<ChatPlusChip state={locked ? "locked" : on ? "on" : "off"} onPress={press} />} … />
|
|
2122
|
+
<AssistantHost plus={on} gold={hasPlan && !on} …>…</AssistantHost>
|
|
2123
|
+
```
|
|
2124
|
+
|
|
2125
|
+
- `ChatPlusChip` sits in the composer's `tools`, on the right beside the microphone and send, with the box `stacked` so the words keep
|
|
2126
|
+
their whole row (13/11/2026; it was in `leading`, where it took the words' room): 28px under a mouse, 44px under a finger or below
|
|
2127
|
+
768. `locked` is a door (`aria-haspopup="dialog"`, a lock, no `aria-pressed`): the surface opens its way up; `off` / `on` are a
|
|
2128
|
+
switch. Its words are props (`labels`); what Plus does and who may have it are the surface's.
|
|
2129
|
+
- The chip says Research (Chris 13/11/2026: Gem Plus's mode, "bật lên là nó thành màu đen"). `AssistantHost gold` adds `gb-dock--gold`:
|
|
2130
|
+
the plan's chat while Research is off, light on an ivory ground with gold trim (accents, primary button, header rule, the chip's
|
|
2131
|
+
outline). `plus` wins over `gold`.
|
|
2132
|
+
- `AssistantHost plus` adds `gb-dock--plus`: the panel restates its tokens (obsidian and gold), both `--gemboss-*` and `--ui-*` (the
|
|
2133
|
+
kit computes `--ui-*` once on `:root`, so they would not follow), so every part of the chat follows without a rule of its own. Only
|
|
2134
|
+
colours written as literals elsewhere get a rule: the seller's bubble, the answer's primary button, the header's switch.
|
|
2135
|
+
|
|
2034
2136
|
## The assistant launcher (0.4.2; not floating since 0.6.0)
|
|
2035
2137
|
|
|
2036
2138
|
The top-right corner of the topbar is the ACCOUNT (`AccountMenu`). The assistant button is NOT a floating button: 0.4.2
|
|
@@ -3322,6 +3424,47 @@ import { emailChecks, type EmailDraft } from "@gemboss/ui/email-editor/model"; /
|
|
|
3322
3424
|
- Classes: `gb-emailed-*` (the editor), `gb-email-*` (the mail); every one drawn is styled by `email-editor.css`
|
|
3323
3425
|
(`email-editor.test.tsx`).
|
|
3324
3426
|
|
|
3427
|
+
## Emails as themselves (15/11/2026, unreleased): `EmailThumb`, `EmailCard`, `PictureActions`, `ThumbCell`, `FlowStrip`, `StatTile`, `EmailParts`
|
|
3428
|
+
|
|
3429
|
+
GemBoss Reach and GemReach's Ops console show a store's emails as the emails they are (canvas NqQGmVzRJMjv536LLbMGaT, Chris
|
|
3430
|
+
15/11/2026: rows K–U, J2 Q9 "an iframe first, a PNG later"). The pieces the boards marked "kit cần thêm":
|
|
3431
|
+
|
|
3432
|
+
- **`EmailThumb`** draws one email's HTML (GemReach's `GET /t/v1/templates/:id/thumbnail`: the store's brand kit, a sample person,
|
|
3433
|
+
the marketing footer) in an iframe with `srcdoc` and `sandbox=""` (no script runs), laid out at 664px (GemReach's mail turns
|
|
3434
|
+
into its phone layout at 620 and under) and scaled into its box with a transform. `size`: `fill` (a card's 4:3 picture), `list`
|
|
3435
|
+
(96×72), `sm` (56×42). With `load`, nothing is asked until the box is within 200px of the screen, at most four at a time on a
|
|
3436
|
+
page, and `cacheKey` keeps the answer for the page. While it comes: the skeleton sheen; an email that does not draw: an envelope.
|
|
3437
|
+
`frameCss` (default `EMAIL_THUMB_FRAME`) puts it on white from the top of its card.
|
|
3438
|
+
|
|
3439
|
+
```tsx
|
|
3440
|
+
<EmailThumb title="Welcome to Lumen" cacheKey={`${id}@${version}`} load={() => fetch(url).then((r) => r.ok ? r.json() : null).then((b) => b?.html ?? null)} />
|
|
3441
|
+
```
|
|
3442
|
+
- **`EmailCard`**: the kit's `MediaCard` at 4:3 with an `EmailThumb` as its picture, its name as the link, ONE meta line ("Welcome
|
|
3443
|
+
flow"; "· Transactional" there, never a chip), its state as a tag, and `actions` on the picture on hover. `frame` puts a Stage
|
|
3444
|
+
around the email (a recipe card). It imports `media-card.css`, since the admin never loads kit-plain.css.
|
|
3445
|
+
- **`PictureActions`**: two or three buttons on a light scrim (`rgba(27, 28, 30, .07)`) over the whole picture, in MediaCard's `menu`
|
|
3446
|
+
slot, shown on hover or when a key reaches them. A secondary `ui-btn` in it is white with a small shadow: the button on a picture.
|
|
3447
|
+
Not drawn under a finger (`hover: none`): the tap opens the card.
|
|
3448
|
+
- **`ThumbCell`**: a table cell or a row's start with a picture: the thumb, the name in bold with its context muted after a middle
|
|
3449
|
+
dot, one line under it (a `FlowStrip`, a subject).
|
|
3450
|
+
- **`FlowStrip`**: a flow's steps as an ordered list of 24px pills joined by arrows: `start` in ink, `wait` grey, `email` on the
|
|
3451
|
+
iris tint (its words for a screen reader only), `split` white; `max` ends in "+N"; `md` a size up.
|
|
3452
|
+
- **`StatTile` / `StatTiles`**: a label, the number (24/32 bold), one line (`tone="up"` in the success colour), the sparkline when
|
|
3453
|
+
there is a series; three in a row, one column on a phone. The kit's `ui-stat` stays the pill in a row of figures.
|
|
3454
|
+
- **`EmailParts`**: "In every email · as sent": the email's first row (the logo) and its last (the address, the links), each in its
|
|
3455
|
+
own frame, `sandbox="allow-same-origin"` only so the page can read the part's height (still no script); `mark` rings the foot in
|
|
3456
|
+
the warning tone, `note` says why.
|
|
3457
|
+
|
|
3458
|
+
`email-thumb-browser.test.tsx` holds the drawing to Chromium: the frame fills its box, the grey is gone, a far card does not ask,
|
|
3459
|
+
and no script in an email runs (with its negative controls).
|
|
3460
|
+
|
|
3461
|
+
### The stage is the real email (15/11/2026, unreleased): `EmailCanvas`, `EmailEditor canvas="real"`
|
|
3462
|
+
|
|
3463
|
+
`EmailEditor` with `canvas="real"` draws its stage from `sent.html` (the sender's preview of the unsaved words, with `data-gr-block` marks) in
|
|
3464
|
+
`EmailCanvas`: an iframe with `sandbox="allow-same-origin"` only (no script runs; the editor reads the frame's layout and hears its clicks), a
|
|
3465
|
+
click picks a block, the picked block is ringed on its own box with its name and Edit · ↑ · ↓ · Delete outside it, Desktop (640) or Mobile
|
|
3466
|
+
(390 in a phone's frame), Dark. `brandRow` (`logo`, `color`, `edit`) tops Sections with what the brand kit puts in every email.
|
|
3467
|
+
|
|
3325
3468
|
## Members (04/11/2026, unreleased): `MembersPage`, one members list for every service
|
|
3326
3469
|
|
|
3327
3470
|
Chris approved the pattern on 04/11/2026 (design "GemBoss Members Pattern"): GemCommunity Admin › Members, GemCare People and
|
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.73.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.73.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>eeb223ede856</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 class="cat-swatch"><i style="background:var(--gemboss-fill-tertiary)"></i><code>--gemboss-fill-tertiary</code><span>#2a2b33</span></div><div class="cat-swatch"><i style="background:var(--gemboss-fill-tertiary-hover)"></i><code>--gemboss-fill-tertiary-hover</code><span>#33353f</span></div><div class="cat-swatch"><i style="background:var(--gemboss-fill-tertiary-active)"></i><code>--gemboss-fill-tertiary-active</code><span>#3a3c46</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>
|
|
@@ -13083,7 +13083,7 @@ document.querySelector(".gb-tc-body").append(tc.jumpToLatest({ count:
|
|
|
13083
13083
|
</section>
|
|
13084
13084
|
</div>
|
|
13085
13085
|
</div></code></pre></details></figure></section>
|
|
13086
|
-
<section id="assistant"><h2>Trợ lý: cột phiên</h2><p><code>SessionRail</code> (React). Mép phải là đường kéo của khay (<code>tray.css</code>; trang không React nạp <code>tray-plain.js</code>): kéo hoặc phím mũi tên, 240–480, nhớ theo trình duyệt. Khung toàn màn hình / cửa sổ nổi / cột phải cao hết màn (<code>allowSide</code>) / cột trái (<code>allowLeft</code>) / nút chat khi thu gọn là <code>AssistantHost</code>, cần React vì có trạng thái.</p><figure class="cat-demo"><figcaption>SessionRail</figcaption><div class="cat-live"><div style="height:360px;display:flex"><aside class="gemboss-assistant-rail" style="--gb-tray-w:264px;--gb-tray-min:240px"><div class="gemboss-assistant-rail-top"><button type="button" class="gemboss-assistant-newchat" title="Phiên mới"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path 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"></path><path d="M14.5 3.5l2 2L10 12H8v-2z"></path></g></svg><span>Phiên mới</span></button><button type="button" class="gemboss-assistant-collapse" aria-label="Collapse sidebar" title="Collapse"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5l-5 5 5 5"></path></g></svg></button></div><div class="gemboss-assistant-search gemboss-field gemboss-field--group"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="9" r="5"></circle><path d="M13 13l3.5 3.5"></path></g></svg><input class="gemboss-field__bare" placeholder="Tìm phiên…" aria-label="Search history" value=""/><kbd class="gemboss-assistant-kbd">/</kbd></div><div class="gemboss-assistant-threads"><div class="gemboss-assistant-group"><div class="gemboss-assistant-group-label">Đã ghim</div><div class="gemboss-assistant-thread"><button type="button" class="gemboss-assistant-thread-main" title="So sánh advertorial với listicle"><span class="gemboss-assistant-thread-titlerow"><svg viewBox="0 0 20 20" class="gemboss-assistant-pin-dot" aria-hidden="true" focusable="false"><path d="M8 3.5h4l-.5 5 2.5 2.5H6l2.5-2.5z" fill="currentColor"></path><path d="M10 11v5.5" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path></svg><span class="gemboss-assistant-thread-title">So sánh advertorial với listicle</span></span><span class="gemboss-assistant-thread-meta">
|
|
13086
|
+
<section id="assistant"><h2>Trợ lý: cột phiên</h2><p><code>SessionRail</code> (React). Mép phải là đường kéo của khay (<code>tray.css</code>; trang không React nạp <code>tray-plain.js</code>): kéo hoặc phím mũi tên, 240–480, nhớ theo trình duyệt. Khung toàn màn hình / cửa sổ nổi / cột phải cao hết màn (<code>allowSide</code>) / cột trái (<code>allowLeft</code>) / nút chat khi thu gọn là <code>AssistantHost</code>, cần React vì có trạng thái.</p><figure class="cat-demo"><figcaption>SessionRail</figcaption><div class="cat-live"><div style="height:360px;display:flex"><aside class="gemboss-assistant-rail" style="--gb-tray-w:264px;--gb-tray-min:240px"><div class="gemboss-assistant-rail-top"><button type="button" class="gemboss-assistant-newchat" title="Phiên mới"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path 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"></path><path d="M14.5 3.5l2 2L10 12H8v-2z"></path></g></svg><span>Phiên mới</span></button><button type="button" class="gemboss-assistant-collapse" aria-label="Collapse sidebar" title="Collapse"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5l-5 5 5 5"></path></g></svg></button></div><div class="gemboss-assistant-search gemboss-field gemboss-field--group"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="9" r="5"></circle><path d="M13 13l3.5 3.5"></path></g></svg><input class="gemboss-field__bare" placeholder="Tìm phiên…" aria-label="Search history" value=""/><kbd class="gemboss-assistant-kbd">/</kbd></div><div class="gemboss-assistant-threads"><div class="gemboss-assistant-group"><div class="gemboss-assistant-group-label">Đã ghim</div><div class="gemboss-assistant-thread"><button type="button" class="gemboss-assistant-thread-main" title="So sánh advertorial với listicle"><span class="gemboss-assistant-thread-titlerow"><svg viewBox="0 0 20 20" class="gemboss-assistant-pin-dot" aria-hidden="true" focusable="false"><path d="M8 3.5h4l-.5 5 2.5 2.5H6l2.5-2.5z" fill="currentColor"></path><path d="M10 11v5.5" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path></svg><span class="gemboss-assistant-thread-title">So sánh advertorial với listicle</span></span><span class="gemboss-assistant-thread-meta">7/10/2026</span></button><div class="gemboss-assistant-thread-actions"><button type="button" class="gemboss-assistant-thread-act" aria-label="Options"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="10" r=".8"></circle><circle cx="10" cy="10" r=".8"></circle><circle cx="15" cy="10" r=".8"></circle></g></svg></button></div></div></div><div class="gemboss-assistant-group"><div class="gemboss-assistant-group-label">Hôm nay</div><div class="gemboss-assistant-thread active"><button type="button" class="gemboss-assistant-thread-main" title="Store nào đang dựng loạt landing?"><span class="gemboss-assistant-thread-titlerow"><span class="gemboss-assistant-thread-title">Store nào đang dựng loạt landing?</span></span><span class="gemboss-assistant-thread-meta">3 giờ trước</span></button><div class="gemboss-assistant-thread-actions"><button type="button" class="gemboss-assistant-thread-act" aria-label="Options"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="10" r=".8"></circle><circle cx="10" cy="10" r=".8"></circle><circle cx="15" cy="10" r=".8"></circle></g></svg></button></div></div></div><div class="gemboss-assistant-group"><div class="gemboss-assistant-group-label">Hôm qua</div><div class="gemboss-assistant-thread"><button type="button" class="gemboss-assistant-thread-main" title="Landing điểm cao nhất của corpus"><span class="gemboss-assistant-thread-titlerow"><span class="gemboss-assistant-thread-title">Landing điểm cao nhất của corpus</span></span><span class="gemboss-assistant-thread-meta">1 ngày trước</span></button><div class="gemboss-assistant-thread-actions"><button type="button" class="gemboss-assistant-thread-act" aria-label="Options"><svg viewBox="0 0 20 20" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="10" r=".8"></circle><circle cx="10" cy="10" r=".8"></circle><circle cx="15" cy="10" r=".8"></circle></g></svg></button></div></div></div></div><div class="ui-resizer gb-tray-edge" role="separator" aria-orientation="vertical" aria-label="Resize the list" aria-valuenow="264" aria-valuemin="240" aria-valuemax="480" tabindex="0"></div></aside></div></div><details class="cat-code"><summary>Markup</summary><pre><code><div style="height:360px;display:flex">
|
|
13087
13087
|
<aside class="gemboss-assistant-rail" style="--gb-tray-w:264px;--gb-tray-min:240px">
|
|
13088
13088
|
<div class="gemboss-assistant-rail-top">
|
|
13089
13089
|
<button type="button" class="gemboss-assistant-newchat" title="Phiên mới">
|
|
@@ -13132,7 +13132,7 @@ document.querySelector(".gb-tc-body").append(tc.jumpToLatest({ count:
|
|
|
13132
13132
|
</svg>
|
|
13133
13133
|
<span class="gemboss-assistant-thread-title">So sánh advertorial với listicle</span>
|
|
13134
13134
|
</span>
|
|
13135
|
-
<span class="gemboss-assistant-thread-meta">
|
|
13135
|
+
<span class="gemboss-assistant-thread-meta">7/10/2026</span>
|
|
13136
13136
|
</button>
|
|
13137
13137
|
<div class="gemboss-assistant-thread-actions">
|
|
13138
13138
|
<button type="button" class="gemboss-assistant-thread-act" aria-label="Options">
|