@gemboss/ui 0.71.0 → 0.74.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 +398 -2
- package/README.md +185 -2
- package/catalog/editor.html +1 -1
- package/catalog/index.html +50 -50
- package/gemboss-ui.css +4 -4
- package/package.json +17 -1
- package/parts/components.css +3 -3
- package/parts/core.css +1 -1
- package/parts/shell.css +2 -2
- package/src/GemMark.tsx +9 -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/auth.tsx +7 -3
- package/src/board-move.ts +2 -1
- package/src/brand-gem.tsx +10 -2
- package/src/brand.tsx +6 -3
- 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-frame.tsx +5 -3
- package/src/editor/field-spec.ts +12 -3
- package/src/editor/index.ts +2 -0
- package/src/editor/inspector-frame.tsx +3 -2
- package/src/editor/media-words.ts +21 -0
- package/src/editor-empty.css +1 -1
- package/src/editor-inspector-frame.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 +15 -2
- 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/metrics.css +1 -0
- package/src/metrics.tsx +59 -0
- 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/services.ts +17 -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/site.tsx +3 -3
- 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 |
|
|
@@ -102,6 +103,7 @@ its CSS out of the build with it (`sideEffects`). gzip of the minified file, as
|
|
|
102
103
|
| 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 |
|
|
103
104
|
| 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 |
|
|
104
105
|
| progress-bar | `@gemboss/ui/progress-bar.css` | `packages/ui/src/progress-bar.css` | `ProgressBar`: how far along, a thin bar a screen places anywhere (unreleased) | 0.3 KB | `ProgressBar` imports it |
|
|
106
|
+
| metrics | `@gemboss/ui/metrics.css` | `packages/ui/src/metrics.css` | `Metrics`, `Metric`: big numbers on cards in an even grid, the plain kit's `ui-metric--lg` for React hosts (unreleased) | 0.3 KB | `Metrics` / `Metric` import it |
|
|
105
107
|
| audiences-table | `@gemboss/ui/audiences-table.css` | `packages/ui/src/audiences-table.css` | `AudiencesTable`: a store's audiences (source chip, On site, Can email, 7 days, Used by), GemBoss Reach and GemReach's admin (unreleased) | 0.4 KB | `AudiencesTable` imports it, with IndexTable's collections.css |
|
|
106
108
|
| 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 |
|
|
107
109
|
| kind-art | `@gemboss/ui/kind-art.css` | `packages/ui/src/kind-art.css` | `KindArt`: the cream strip across the top of a "pick a kind" card, one bold drawing per kind (04/11/2026, unreleased) | 0.6 KB | `KindArt` imports it; a plain-HTML page links it |
|
|
@@ -122,6 +124,15 @@ its CSS out of the build with it (`sideEffects`). gzip of the minified file, as
|
|
|
122
124
|
| 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
125
|
| 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
126
|
| 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 |
|
|
127
|
+
| 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) |
|
|
128
|
+
| 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 |
|
|
129
|
+
| 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 |
|
|
130
|
+
| 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 |
|
|
131
|
+
| 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) |
|
|
132
|
+
| 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 |
|
|
133
|
+
| 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) |
|
|
134
|
+
| 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 |
|
|
135
|
+
| 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
136
|
| 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
137
|
|
|
127
138
|
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 +1496,31 @@ smaller and save room (GemFeedback #1099). Measured at 1280 with a mouse:
|
|
|
1485
1496
|
| Title | 14px / 650 | 15px / 620 | **14px / 650** |
|
|
1486
1497
|
| `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
1498
|
| 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) |
|
|
1499
|
+
| 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
1500
|
|
|
1490
1501
|
Popup only: `--ui-control-h` stays 32, and a button outside a popup is still 32 tall.
|
|
1491
1502
|
|
|
1503
|
+
### What lies behind a popup (13/11/2026)
|
|
1504
|
+
|
|
1505
|
+
Chris, 13/11/2026: "the design system has a frosted glass background under an overlay". The density above stays Polaris's; the
|
|
1506
|
+
scrim is the kit's own. Black .5 with no blur left the page's text as sharp as the popup's.
|
|
1507
|
+
|
|
1508
|
+
| Shape | Behind it | Rule |
|
|
1509
|
+
|---|---|---|
|
|
1510
|
+
| 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` |
|
|
1511
|
+
| Beside the page: `Sheet` | `rgba(0,0,0,.3)`, no frost: the list it was opened from stays readable | `sheet.css` |
|
|
1512
|
+
| 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` |
|
|
1513
|
+
|
|
1514
|
+
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
|
|
1515
|
+
name for it (`backdrop-filter: none`, and the `-webkit-` one: Safari before 18 reads only that). A surface with a side panel or a
|
|
1516
|
+
screen-sized popup of its own does so: on the dialog's `::backdrop`, or on the overlay through `openModal({ overlayClass: "x" })` and
|
|
1517
|
+
`.ui-overlay.x { background: rgba(0,0,0,.5); -webkit-backdrop-filter: none; backdrop-filter: none; }` (the admin's Modal at
|
|
1518
|
+
`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
|
|
1519
|
+
its own sheet (the admin's console does). Where `backdrop-filter` is missing the scrim is the ink at .22 alone. Held in
|
|
1520
|
+
Chromium by `modal-density.test.ts`, `kit-look.test.ts`, `confirm-dialog-browser.test.tsx` (frosted) and by the Sheet's, the
|
|
1521
|
+
reader's and the settings' browser tests (not frosted; each one's control runs without its sheet and finds the frost);
|
|
1522
|
+
`dialog-frame-one-copy.test.ts` holds the two copies of the dialog's rule equal.
|
|
1523
|
+
|
|
1492
1524
|
`.ui-modal__body` and `.ui-modal__foot` moved from `kit-plain.css` to `ui.css`. The admin loads `ui.css` and not
|
|
1493
1525
|
`kit-plain.css`, so before 0.7.3 its kit popups drew a body with no padding and two foot buttons touching
|
|
1494
1526
|
(AutopilotConfirmModal). The scrolling layout of a tall popup stays in `kit-plain.css`.
|
|
@@ -1536,7 +1568,7 @@ does: keep it idempotent. A route that draws the sheet (Next's intercepting rout
|
|
|
1536
1568
|
| 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
1569
|
| 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
1570
|
| Motion | slides in from the right (200 ms); none under `prefers-reduced-motion` |
|
|
1539
|
-
| Scrim | `rgba(0,0,0,.3)
|
|
1571
|
+
| 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
1572
|
| 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
1573
|
|
|
1542
1574
|
The body scrolls under a head that stays, and scrolling past its end does not scroll the list (`overscroll-behavior:
|
|
@@ -2031,6 +2063,77 @@ The surface owns where the seam sits and what it does. Five rules, each paid for
|
|
|
2031
2063
|
React surfaces: `useResizableChatPanel` in the admin is the reference. Others write the same markup and
|
|
2032
2064
|
the five rules by hand; the catalog's "Thanh kéo giữa hai cột" shows the markup.
|
|
2033
2065
|
|
|
2066
|
+
## Figures under an answer: `ChatFigures` (13/11/2026, unreleased)
|
|
2067
|
+
|
|
2068
|
+
Numbers drawn under the words of a chat answer, with the line that says where they come from (Gem Plus slice 2, boards artifact
|
|
2069
|
+
DmPeQEJDAZXdiTxzmFv5UL: "stats, chart, source line"). The answer names one or two; the figures carry the rest. Built from the report's
|
|
2070
|
+
vocabulary (`ui-metrics` from ui.css, `ui-barlist` from report-charts.css, which it imports), so a report drawn later from the same
|
|
2071
|
+
figures looks the same. Its frame is its own entry, `@gemboss/ui/assistant-figures.css` (0.2 KB gzip).
|
|
2072
|
+
|
|
2073
|
+
```tsx
|
|
2074
|
+
import { ChatFigures } from "@gemboss/ui/assistant";
|
|
2075
|
+
<ChatFigures title="Skincare & beauty" source="From pages and ads live in this niche…" figures={[
|
|
2076
|
+
{ id: "carry", title: "What pages behind long-running ads carry", sub: "…", brands: "100+",
|
|
2077
|
+
rows: [{ key: "guarantee", label: "Money-back guarantee", proven: 60, all: 31 }] }, // bar = proven, "all pages 31%" beside it
|
|
2078
|
+
{ id: "lands", title: "Where long-running ads land", brands: "50+", rows: [{ key: "product", label: "Product page", share: 54 }] },
|
|
2079
|
+
{ id: "tiers", title: "Landing pages with three price cards", brands: "20+", value: 24.1, rows: [] }, // a number tile
|
|
2080
|
+
]} />
|
|
2081
|
+
```
|
|
2082
|
+
|
|
2083
|
+
- Shares only: every number it prints is a percentage (`figurePct`: whole from 10 up, one decimal below). The base is said as the
|
|
2084
|
+
surface gives it (`from 100+ brands`); the component adds no total and no date.
|
|
2085
|
+
- `labels` takes the surface's words (`from`, `vsAll`, `region`); English by default.
|
|
2086
|
+
- Colours are the chat's tokens, so the Gem Plus panel (`gb-dock--plus`) draws it in its own look.
|
|
2087
|
+
|
|
2088
|
+
### "/" in the message box: ChatComposer `shortcuts` (13/11/2026, unreleased)
|
|
2089
|
+
|
|
2090
|
+
Questions a surface offers behind a "/" (Gem Plus slice 4: the question library). Typing "/" lists them over the text box, filtered by
|
|
2091
|
+
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
|
|
2092
|
+
question in the box to edit or send, Escape closes the list. No `shortcuts`: "/" is a character, nothing changes.
|
|
2093
|
+
|
|
2094
|
+
```tsx
|
|
2095
|
+
<ChatComposer value={draft} onChange={setDraft} onSend={send}
|
|
2096
|
+
shortcuts={[{ label: "How is my market moving this month?", sub: "Gets: numbers", prompt: "How is my market moving this month?" }]} />
|
|
2097
|
+
```
|
|
2098
|
+
|
|
2099
|
+
### Real pages under an answer: `ChatPageGallery` (13/11/2026, unreleased)
|
|
2100
|
+
|
|
2101
|
+
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).
|
|
2102
|
+
Same entry as `ChatFigures` (`assistant-figures.css`, 0.45 KB gzip with both).
|
|
2103
|
+
|
|
2104
|
+
```tsx
|
|
2105
|
+
import { ChatPageGallery } from "@gemboss/ui/assistant";
|
|
2106
|
+
<ChatPageGallery title="Advertorials that work in Pet" onUse={(href) => navigate(href)}
|
|
2107
|
+
pages={[{ label: "Real advertorial 1", meta: "Advertorial · 3 ads seen in the last 30 days", thumb_url, href }]} />
|
|
2108
|
+
```
|
|
2109
|
+
|
|
2110
|
+
- The button is a real link (`href`): a plain press calls `onUse(href)`, a modified click opens a new tab.
|
|
2111
|
+
- 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
|
|
2112
|
+
it is, is the surface's call (the admin never does).
|
|
2113
|
+
|
|
2114
|
+
## Gem Plus: `ChatPlusChip` and AssistantHost `plus` (13/11/2026, unreleased)
|
|
2115
|
+
|
|
2116
|
+
A mode switch for a chat that can answer about the market as well as the store (Gem Plus boards, artifact
|
|
2117
|
+
DmPeQEJDAZXdiTxzmFv5UL; Chris: "đúng chính xác rồi làm đi"). Its own entry, `@gemboss/ui/assistant-plus.css`, imported by both
|
|
2118
|
+
pieces: every surface that draws AssistantHost loads it (1.1 KB gzip, the host writes `gb-dock--plus`).
|
|
2119
|
+
|
|
2120
|
+
```tsx
|
|
2121
|
+
import { AssistantHost, ChatPlusChip } from "@gemboss/ui/assistant";
|
|
2122
|
+
<ChatComposer stacked rows={1} tools={<ChatPlusChip state={locked ? "locked" : on ? "on" : "off"} onPress={press} />} … />
|
|
2123
|
+
<AssistantHost plus={on} gold={hasPlan && !on} …>…</AssistantHost>
|
|
2124
|
+
```
|
|
2125
|
+
|
|
2126
|
+
- `ChatPlusChip` sits in the composer's `tools`, on the right beside the microphone and send, with the box `stacked` so the words keep
|
|
2127
|
+
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
|
|
2128
|
+
768. `locked` is a door (`aria-haspopup="dialog"`, a lock, no `aria-pressed`): the surface opens its way up; `off` / `on` are a
|
|
2129
|
+
switch. Its words are props (`labels`); what Plus does and who may have it are the surface's.
|
|
2130
|
+
- 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`:
|
|
2131
|
+
the plan's chat while Research is off, light on an ivory ground with gold trim (accents, primary button, header rule, the chip's
|
|
2132
|
+
outline). `plus` wins over `gold`.
|
|
2133
|
+
- `AssistantHost plus` adds `gb-dock--plus`: the panel restates its tokens (obsidian and gold), both `--gemboss-*` and `--ui-*` (the
|
|
2134
|
+
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
|
|
2135
|
+
colours written as literals elsewhere get a rule: the seller's bubble, the answer's primary button, the header's switch.
|
|
2136
|
+
|
|
2034
2137
|
## The assistant launcher (0.4.2; not floating since 0.6.0)
|
|
2035
2138
|
|
|
2036
2139
|
The top-right corner of the topbar is the ACCOUNT (`AccountMenu`). The assistant button is NOT a floating button: 0.4.2
|
|
@@ -2085,6 +2188,7 @@ import { AppShell, BrandLockup, AccountMenu, AccountMenuItem, Icon, RailItem } f
|
|
|
2085
2188
|
- `BrandLockup`: the admin wordmark's gem and proportions (26px tall, 13.3px/700 name) with your
|
|
2086
2189
|
product's name. The name hides below 460px, as the admin's wordmark does. `switcher={{ current: "gemfactory" }}`
|
|
2087
2190
|
(0.36.0) adds the button that opens every other Gem service right after it: README "ServiceSwitcher".
|
|
2191
|
+
`facet` (16/11/2026) colours the gem's table facet: README "The gem's facet" below.
|
|
2088
2192
|
- `AccountMenu`: the admin's 32px initials chip and popover (same CSS). A `<details>`, so it opens
|
|
2089
2193
|
without JavaScript on a page that never hydrates; with React it also closes on an outside click and
|
|
2090
2194
|
on Escape. `AccountMenuItem` is a link (`href`), a POST form (`formAction`), or a button; a caller's `className` is added to the
|
|
@@ -2132,6 +2236,33 @@ import { AppShell, BrandLockup, AccountMenu, AccountMenuItem, Icon, RailItem } f
|
|
|
2132
2236
|
stays a select. Off (`disabled`), it shows its choice with no hover and a quiet chevron: a field the screen shows and does not change
|
|
2133
2237
|
there (Who sees what's Everyone else, version A).
|
|
2134
2238
|
|
|
2239
|
+
### The gem's facet (16/11/2026, unreleased)
|
|
2240
|
+
|
|
2241
|
+
Every Gem's logo is the GemBoss gem; only the top "table" facet changes colour, by the role the Gem plays (Chris 15/11/2026;
|
|
2242
|
+
the set is gembusiness `strategy/2026-11-vision/logos`, and each service's favicon already draws it). `GEM_FACETS` (also on
|
|
2243
|
+
`@gemboss/ui/services`, plain data) holds the colours: `core` #5661F5 (GemBoss), `understand` #38A3F1, `build` #9B7BFF, `sell`
|
|
2244
|
+
#16B88A, `measure` #2CC5C5, `retain` #F0457E, `spread` #F5A524.
|
|
2245
|
+
|
|
2246
|
+
```css
|
|
2247
|
+
/* One line in the surface's own stylesheet colours every gem the kit draws there, the header's and the sign-in's: */
|
|
2248
|
+
:root { --gb-gem-facet: #38A3F1; }
|
|
2249
|
+
```
|
|
2250
|
+
|
|
2251
|
+
```tsx
|
|
2252
|
+
// …or per gem, which wins over the variable:
|
|
2253
|
+
<BrandLockup name="GemWatcher" href="/" facet={GEM_FACETS.understand} />
|
|
2254
|
+
<AuthLayout brand="GemWatcher" facet={GEM_FACETS.understand}>…</AuthLayout>
|
|
2255
|
+
```
|
|
2256
|
+
|
|
2257
|
+
| | |
|
|
2258
|
+
|---|---|
|
|
2259
|
+
| Who takes it | `BrandLockup`, `SiteBrand`, `AuthLayout` (its default mark; not a `mark` of your own) and `GemMark`, as `facet` (any CSS colour) |
|
|
2260
|
+
| With neither | what each drew before: the lockups' iris #5661F5, the tile's lighter #8a93ff |
|
|
2261
|
+
| How | the colour is the polygon's `fill` attribute AND its inline `style`: the style reads the variable (`var()` in a presentation attribute is not read by every browser), and the attribute is what is left where a CSP without `'unsafe-inline'` drops inline styles, so a strict page keeps iris or the prop's colour, never black. No new CSS |
|
|
2262
|
+
| GemBoss's own mark | "Continue with GemBoss" pins its `GemMark` to #8a93ff, so it stays GemBoss's on a Gem that set the variable. A surface that draws GemBoss's mark itself with `GemMark` does the same (`facet="#8a93ff"`) |
|
|
2263
|
+
| A plain-HTML page | writes the colour into its copy of the polygon (`fill="#38A3F1"`) |
|
|
2264
|
+
| Tests | `brand-gem.test.tsx` (the markup); `site-browser.test.tsx` "the gem's facet, painted" (the colour Chromium paints: nothing set, the variable, the prop over it, and under a CSP with the style dropped, with a negative control) |
|
|
2265
|
+
|
|
2135
2266
|
## Topbar search (0.6.3)
|
|
2136
2267
|
|
|
2137
2268
|
The admin's "Search ⌘K" box for every surface, as a real form (works with no JavaScript):
|
|
@@ -3267,6 +3398,17 @@ draw their pictures and figures from here, so one change moves both. Their own e
|
|
|
3267
3398
|
sentence, its one button at the end (`<Notice action={<button className="ui-btn">Turn off</button>}>… no difference for 30 days.</Notice>`).
|
|
3268
3399
|
No tone is a card on the page's ground; `tone` takes the core notice's colours.
|
|
3269
3400
|
|
|
3401
|
+
`Metrics` and `Metric` (their own entry, `@gemboss/ui/metrics.css`, unreleased) are the plain kit's large metric cards for a React host
|
|
3402
|
+
that never loads kit-plain.css: an even grid of cards, each its name above a big number and one muted line under it. With `href` the
|
|
3403
|
+
whole card is the link (`linkAs` for the app's Link). A number the screen does not know is not passed: leave the card out.
|
|
3404
|
+
|
|
3405
|
+
```tsx
|
|
3406
|
+
<Metrics label="Numbers">
|
|
3407
|
+
<Metric label="Live subscriptions" value="1,284" href="/app/plugins/gemloop?tab=subscriptions" linkAs={Link} />
|
|
3408
|
+
<Metric label="Next 7 days" value="$9,840" foot="286 charges" />
|
|
3409
|
+
</Metrics>
|
|
3410
|
+
```
|
|
3411
|
+
|
|
3270
3412
|
## Audiences (05/11/2026, unreleased): `AudiencesTable`, a store's audiences
|
|
3271
3413
|
|
|
3272
3414
|
The list of a store's audiences as GemBoss › Reach › Audiences draws it (board GroupsTable on the canvas "Một lõi, ba cửa"; Chris
|
|
@@ -3322,6 +3464,47 @@ import { emailChecks, type EmailDraft } from "@gemboss/ui/email-editor/model"; /
|
|
|
3322
3464
|
- Classes: `gb-emailed-*` (the editor), `gb-email-*` (the mail); every one drawn is styled by `email-editor.css`
|
|
3323
3465
|
(`email-editor.test.tsx`).
|
|
3324
3466
|
|
|
3467
|
+
## Emails as themselves (15/11/2026, unreleased): `EmailThumb`, `EmailCard`, `PictureActions`, `ThumbCell`, `FlowStrip`, `StatTile`, `EmailParts`
|
|
3468
|
+
|
|
3469
|
+
GemBoss Reach and GemReach's Ops console show a store's emails as the emails they are (canvas NqQGmVzRJMjv536LLbMGaT, Chris
|
|
3470
|
+
15/11/2026: rows K–U, J2 Q9 "an iframe first, a PNG later"). The pieces the boards marked "kit cần thêm":
|
|
3471
|
+
|
|
3472
|
+
- **`EmailThumb`** draws one email's HTML (GemReach's `GET /t/v1/templates/:id/thumbnail`: the store's brand kit, a sample person,
|
|
3473
|
+
the marketing footer) in an iframe with `srcdoc` and `sandbox=""` (no script runs), laid out at 664px (GemReach's mail turns
|
|
3474
|
+
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`
|
|
3475
|
+
(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
|
|
3476
|
+
page, and `cacheKey` keeps the answer for the page. While it comes: the skeleton sheen; an email that does not draw: an envelope.
|
|
3477
|
+
`frameCss` (default `EMAIL_THUMB_FRAME`) puts it on white from the top of its card.
|
|
3478
|
+
|
|
3479
|
+
```tsx
|
|
3480
|
+
<EmailThumb title="Welcome to Lumen" cacheKey={`${id}@${version}`} load={() => fetch(url).then((r) => r.ok ? r.json() : null).then((b) => b?.html ?? null)} />
|
|
3481
|
+
```
|
|
3482
|
+
- **`EmailCard`**: the kit's `MediaCard` at 4:3 with an `EmailThumb` as its picture, its name as the link, ONE meta line ("Welcome
|
|
3483
|
+
flow"; "· Transactional" there, never a chip), its state as a tag, and `actions` on the picture on hover. `frame` puts a Stage
|
|
3484
|
+
around the email (a recipe card). It imports `media-card.css`, since the admin never loads kit-plain.css.
|
|
3485
|
+
- **`PictureActions`**: two or three buttons on a light scrim (`rgba(27, 28, 30, .07)`) over the whole picture, in MediaCard's `menu`
|
|
3486
|
+
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.
|
|
3487
|
+
Not drawn under a finger (`hover: none`): the tap opens the card.
|
|
3488
|
+
- **`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
|
|
3489
|
+
dot, one line under it (a `FlowStrip`, a subject).
|
|
3490
|
+
- **`FlowStrip`**: a flow's steps as an ordered list of 24px pills joined by arrows: `start` in ink, `wait` grey, `email` on the
|
|
3491
|
+
iris tint (its words for a screen reader only), `split` white; `max` ends in "+N"; `md` a size up.
|
|
3492
|
+
- **`StatTile` / `StatTiles`**: a label, the number (24/32 bold), one line (`tone="up"` in the success colour), the sparkline when
|
|
3493
|
+
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.
|
|
3494
|
+
- **`EmailParts`**: "In every email · as sent": the email's first row (the logo) and its last (the address, the links), each in its
|
|
3495
|
+
own frame, `sandbox="allow-same-origin"` only so the page can read the part's height (still no script); `mark` rings the foot in
|
|
3496
|
+
the warning tone, `note` says why.
|
|
3497
|
+
|
|
3498
|
+
`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,
|
|
3499
|
+
and no script in an email runs (with its negative controls).
|
|
3500
|
+
|
|
3501
|
+
### The stage is the real email (15/11/2026, unreleased): `EmailCanvas`, `EmailEditor canvas="real"`
|
|
3502
|
+
|
|
3503
|
+
`EmailEditor` with `canvas="real"` draws its stage from `sent.html` (the sender's preview of the unsaved words, with `data-gr-block` marks) in
|
|
3504
|
+
`EmailCanvas`: an iframe with `sandbox="allow-same-origin"` only (no script runs; the editor reads the frame's layout and hears its clicks), a
|
|
3505
|
+
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
|
|
3506
|
+
(390 in a phone's frame), Dark. `brandRow` (`logo`, `color`, `edit`) tops Sections with what the brand kit puts in every email.
|
|
3507
|
+
|
|
3325
3508
|
## Members (04/11/2026, unreleased): `MembersPage`, one members list for every service
|
|
3326
3509
|
|
|
3327
3510
|
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.74.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";
|