@uniweb/kit 0.10.4 → 0.10.6
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/package.json +2 -2
- package/src/callout-tokens.css +24 -6
- package/src/prose-tokens.css +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/kit",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "Standard component library for Uniweb foundations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"fuse.js": "^7.0.0",
|
|
43
43
|
"shiki": "^3.0.0",
|
|
44
44
|
"tailwind-merge": "^3.6.0",
|
|
45
|
-
"@uniweb/semantic-parser": "1.2.0",
|
|
46
45
|
"@uniweb/core": "0.8.0",
|
|
46
|
+
"@uniweb/semantic-parser": "1.2.0",
|
|
47
47
|
"@uniweb/scene": "0.1.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
package/src/callout-tokens.css
CHANGED
|
@@ -6,10 +6,16 @@
|
|
|
6
6
|
* @import "@uniweb/kit/callout-tokens.css";
|
|
7
7
|
*
|
|
8
8
|
* OPT-IN, and that is the point. kit's render engine emits a concept block as
|
|
9
|
-
* a
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* a bare `<div data-concept="<tag>">` — no classes, no box, nothing decided,
|
|
10
|
+
* because what a callout looks like is a foundation's design. Without an
|
|
11
|
+
* import like this one a concept block is unstyled and reads as plain prose,
|
|
12
|
+
* which is the correct default for a tag nobody has designed for yet.
|
|
13
|
+
*
|
|
14
|
+
* So this file supplies the WHOLE look, not just the colours: the frame, the
|
|
15
|
+
* padding and the spacing as well as the tint. An earlier version set only
|
|
16
|
+
* `border-color` and `background-color`, which on a bare div with no border
|
|
17
|
+
* width and no padding rendered as a tinted band running edge to edge — the
|
|
18
|
+
* right hue and nothing else.
|
|
13
19
|
*
|
|
14
20
|
* ── Why five names may live here when they may not live in a component ──
|
|
15
21
|
*
|
|
@@ -38,13 +44,25 @@
|
|
|
38
44
|
*
|
|
39
45
|
* ── Tags with no rule ──
|
|
40
46
|
*
|
|
41
|
-
* A concept block whose tag is not one of the five
|
|
42
|
-
*
|
|
47
|
+
* A concept block whose tag is not one of the five gets the neutral frame
|
|
48
|
+
* above and no tint. That is deliberate: an unrecognized concept should look
|
|
43
49
|
* unremarkable rather than borrow a severity it was never given.
|
|
44
50
|
*/
|
|
45
51
|
|
|
52
|
+
/*
|
|
53
|
+
* The frame. `--border` is the neutral fallback, so a tag with no rule of its
|
|
54
|
+
* own below still reads as a deliberate box rather than as loose prose.
|
|
55
|
+
*
|
|
56
|
+
* The margin is stated here because the engine emits an unclassed div: a prose
|
|
57
|
+
* container styles the elements it knows, and this is not one of them, so
|
|
58
|
+
* without this a callout would sit flush against the paragraph above it and
|
|
59
|
+
* against the next callout.
|
|
60
|
+
*/
|
|
46
61
|
[data-concept] {
|
|
62
|
+
border: 1px solid var(--border);
|
|
47
63
|
border-radius: var(--radius, 0.5rem);
|
|
64
|
+
padding: 1rem 1.25rem;
|
|
65
|
+
margin: 1.5rem 0;
|
|
48
66
|
}
|
|
49
67
|
|
|
50
68
|
[data-concept="note"],
|
package/src/prose-tokens.css
CHANGED
|
@@ -101,3 +101,31 @@
|
|
|
101
101
|
.prose :is(h1, h2, h3, h4) {
|
|
102
102
|
scroll-margin-top: calc(var(--header-height, 4rem) + 1rem);
|
|
103
103
|
}
|
|
104
|
+
|
|
105
|
+
/* ─── Math (Temml → MathML) ────────────────────────────────────────────────────
|
|
106
|
+
Browsers render MathML natively, so it is easy to conclude math needs no CSS.
|
|
107
|
+
It needs these, for two separate reasons.
|
|
108
|
+
|
|
109
|
+
Temml emits class hooks and expects a stylesheet to define them: `tml-left`
|
|
110
|
+
and `tml-right` carry the `&` column alignment of an `aligned` environment,
|
|
111
|
+
`tml-jot` its extra row spacing. Undefined, a derivation's `=` signs drift
|
|
112
|
+
out of line and its rows sit flush. Those three declarations are Temml's own.
|
|
113
|
+
|
|
114
|
+
The `math mtd` rule is not. Temml's stylesheet only *adjusts* row spacing for
|
|
115
|
+
jot, on the stated assumption that mtd already gets 0.5ex of vertical padding
|
|
116
|
+
"per MathML-Core and user-agent CSS" — but a pristine mtd measures 0px in
|
|
117
|
+
Chrome (2026-07). A pmatrix or cases carries no tml-* class at all, so
|
|
118
|
+
Temml's stylesheet alone fixes the derivation and leaves the matrix touching.
|
|
119
|
+
|
|
120
|
+
These live here rather than in their own opt-in file because correct math
|
|
121
|
+
metrics are not a design choice the way callout colours are — a site that
|
|
122
|
+
sets its typography should not also have to know this.
|
|
123
|
+
|
|
124
|
+
press ships the same declarations to the EPUB and Paged.js lanes, which have
|
|
125
|
+
their own stylesheets and cannot import this one. That duplicate is pinned by
|
|
126
|
+
`framework/_contracts/math-css-parity.test.js`, not by trust. */
|
|
127
|
+
.tml-right { text-align: right; }
|
|
128
|
+
.tml-left { text-align: left; }
|
|
129
|
+
.tml-sml-pad { padding-left: 0.05em; }
|
|
130
|
+
math mtd { padding-top: 0.5ex; padding-bottom: 0.5ex; }
|
|
131
|
+
math mtable.tml-jot mtd { padding-top: 0.7ex; padding-bottom: 0.7ex; }
|