@zccz14/ux 0.5.0 → 0.6.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/README.md +2 -2
- package/dist/styles.css +6 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -238,7 +238,7 @@ One prop, on purpose. There is no `math`, `mermaid`, `components`, `remarkPlugin
|
|
|
238
238
|
- **GitHub Flavored Markdown** — tables, task lists, strikethrough, autolinks.
|
|
239
239
|
, `$…$`, `\(…\)`, `\[…\]` and `math`-tagged code fences, because models emit all of them. The stylesheet and fonts are imported by the component itself, so a formula is never unstyled; the runtime (~76 KB gzipped) is fetched only by a surface whose content can actually contain a formula, and stays cached for the rest of the session. Until that chunk arrives — and always when rendering on a server — a formula shows as the source it was written as, the same state a still-streaming formula is in. Broken math degrades to one `.katex-error` span carrying the parser message.
|
|
240
240
|
- **Mermaid diagrams** — a `mermaid`-tagged fence becomes an SVG, loaded on demand: a surface without a diagram never downloads mermaid. The chart follows the current theme and the surrounding text size, and re-renders when `.dark` flips. An unparseable diagram falls back to its own source block.
|
|
241
|
-
- **Links** — absolute URLs open in a new tab with `rel="noopener noreferrer"` and an external marker; in-page anchors and relative paths stay in the app. Only `http(s)` and `mailto` survive: `javascript:`, `data:` and friends degrade to plain text.
|
|
241
|
+
- **Links** — absolute URLs open in a new tab with `rel="noopener noreferrer"` and an external marker; in-page anchors and relative paths stay in the app. Only `http(s)` and `mailto` survive: `javascript:`, `data:` and friends degrade to plain text. A link keeps the text colour and carries its weight in the underline: Markdown is quoted content, so it never introduces an accent of its own.
|
|
242
242
|
- **Tables and code** — a wide table or a long code block scrolls inside its own box, so the transcript or article around it never grows a horizontal scrollbar.
|
|
243
243
|
- **Raw HTML** — never rendered. The pipeline has no `rehype-raw`, so HTML in the source is shown as text.
|
|
244
244
|
|
|
@@ -259,7 +259,7 @@ The component wraps its content in `.ux-markdown`, and that block is the family'
|
|
|
259
259
|
|
|
260
260
|
## Styling
|
|
261
261
|
|
|
262
|
-
Import `@zccz14/ux/styles.css` once. It consumes the app's shadcn theme tokens and falls back to its own values, so the shell stays readable even when a token is missing: `--background`, `--foreground`, `--border`, `--accent`, `--muted`, `--ring`, `--sidebar`, `--sidebar-foreground`, `--sidebar-accent`, `--sidebar-accent-foreground`, `--sidebar-border`, `--sidebar-ring`. The Markdown layer reads `--muted`, `--muted-foreground
|
|
262
|
+
Import `@zccz14/ux/styles.css` once. It consumes the app's shadcn theme tokens and falls back to its own values, so the shell stays readable even when a token is missing: `--background`, `--foreground`, `--border`, `--accent`, `--muted`, `--ring`, `--sidebar`, `--sidebar-foreground`, `--sidebar-accent`, `--sidebar-accent-foreground`, `--sidebar-border`, `--sidebar-ring`. The Markdown layer reads `--muted`, `--muted-foreground` and `--destructive` through the same `--ux-*` layer (`--ux-muted`, `--ux-muted-foreground`, `--ux-destructive`).
|
|
263
263
|
|
|
264
264
|
Those tokens are read through a `--ux-*` layer declared twice — a light set on `:root` and a dark set on `.dark` — so every fallback has a dark counterpart. A missing `--sidebar` therefore renders dark in dark mode instead of a light sidebar. The shell also sets `color-scheme` per mode, so native scrollbars and controls follow the theme without help from a theme provider.
|
|
265
265
|
|
package/dist/styles.css
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
--ux-accent: var(--accent, var(--muted, #f1f5f9));
|
|
16
16
|
--ux-muted: var(--muted, #f1f5f9);
|
|
17
17
|
--ux-muted-foreground: var(--muted-foreground, #64748b);
|
|
18
|
-
--ux-primary: var(--primary, #2563eb);
|
|
19
18
|
--ux-destructive: var(--destructive, #dc2626);
|
|
20
19
|
--ux-ring: var(--ring, #2563eb);
|
|
21
20
|
--ux-sidebar: var(--sidebar, #fafafa);
|
|
@@ -33,7 +32,6 @@
|
|
|
33
32
|
--ux-accent: var(--accent, var(--muted, #303030));
|
|
34
33
|
--ux-muted: var(--muted, #262626);
|
|
35
34
|
--ux-muted-foreground: var(--muted-foreground, #a3a3a3);
|
|
36
|
-
--ux-primary: var(--primary, #60a5fa);
|
|
37
35
|
--ux-destructive: var(--destructive, #f87171);
|
|
38
36
|
--ux-ring: var(--ring, #d4d4d4);
|
|
39
37
|
--ux-sidebar: var(--sidebar, #161616);
|
|
@@ -593,8 +591,13 @@
|
|
|
593
591
|
border-top: 1px solid var(--ux-border);
|
|
594
592
|
}
|
|
595
593
|
|
|
594
|
+
/*
|
|
595
|
+
* A link keeps the text colour and carries its weight in the underline. Markdown is quoted
|
|
596
|
+
* content — model output, a manual, an article — so it never introduces an accent colour of its
|
|
597
|
+
* own; the family's coloured elements are actions, not text.
|
|
598
|
+
*/
|
|
596
599
|
.ux-markdown a {
|
|
597
|
-
color:
|
|
600
|
+
color: inherit;
|
|
598
601
|
text-decoration: underline;
|
|
599
602
|
text-underline-offset: 0.2em;
|
|
600
603
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zccz14/ux",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Unified app shell and Markdown renderer for the NTNL app family: one animated icon sidebar, a fixed-size logo that doubles as the page favicon, the Linkit-integrated AppHeader, and the single Markdown surface every app renders through.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|