@ascribed/elements 0.1.2-next.7 → 0.2.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/CONTRACT.md +3 -2
- package/css/style.css +10 -0
- package/package.json +1 -2
package/CONTRACT.md
CHANGED
|
@@ -139,7 +139,7 @@ An availability annotation (SPEC §4.4, §9.4), in badge builds and, for content
|
|
|
139
139
|
|
|
140
140
|
| Attribute | Required | Meaning |
|
|
141
141
|
|---|---|---|
|
|
142
|
-
| `scope` | yes | What the annotation applies to: `section` (an `@available` at the top of a section), `block` (one bound to a block), or `page`. |
|
|
142
|
+
| `scope` | yes | What the annotation applies to: `section` (an `@available` at the top of a section), `block` (one bound to a block), `row` (a table row's `available`), or `page`. |
|
|
143
143
|
|
|
144
144
|
**Children:** one `<ascribe-availability-target>` per target of the effective spec (feature keys resolved), in the spec's order, separated by the text `; `. No markdown.
|
|
145
145
|
|
|
@@ -147,6 +147,7 @@ An availability annotation (SPEC §4.4, §9.4), in badge builds and, for content
|
|
|
147
147
|
|
|
148
148
|
- `section`: directly after the section's heading, as the next block.
|
|
149
149
|
- `block`: directly before the block it annotates, where the `@available` line was.
|
|
150
|
+
- `row`: at the end of the row's first cell, after a space (or alone in an empty cell), all on one line: inside a table cell the element has no line breaks.
|
|
150
151
|
- `page`: the emitter doesn't write one. Page-level availability reaches the layout as frontmatter (SPEC §9.4, §9.6): `available` is a list with one entry per target, in the spec's order and with feature keys resolved, each holding this element's attributes and its text: `{ target, dimension, states: [...], versions: [...], text }`, with `versions` left out as the attribute is. A layout that shows it renders this element with `scope="page"`, one `<ascribe-availability-target>` per entry, joining `states` and `versions` with single spaces.
|
|
151
152
|
|
|
152
153
|
### `<ascribe-availability-target>`
|
|
@@ -175,7 +176,7 @@ That is: the target's label, then in parentheses either one state's label, follo
|
|
|
175
176
|
</ascribe-availability>
|
|
176
177
|
```
|
|
177
178
|
|
|
178
|
-
**Rendering, with or without JavaScript:** a line of badges styled by each target's last state (`[states$="deprecated"]` and so on), with a lead-in such as "Available:" from CSS generated content, which a site can restyle or translate. With no CSS, the text reads as a sentence: `Quill Cloud (GA); Self-managed (preview, 3.4+)`.
|
|
179
|
+
**Rendering, with or without JavaScript:** a line of badges styled by each target's last state (`[states$="deprecated"]` and so on), with a lead-in such as "Available:" from CSS generated content, which a site can restyle or translate. With `scope="row"`, the badges sit inline in the cell, with no lead-in. With no CSS, the text reads as a sentence: `Quill Cloud (GA); Self-managed (preview, 3.4+)`.
|
|
179
180
|
|
|
180
181
|
## 5. `<details>`
|
|
181
182
|
|
package/css/style.css
CHANGED
|
@@ -313,6 +313,16 @@ ascribe-availability::before {
|
|
|
313
313
|
color: var(--ascribe-muted-color);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
/* A table row's badges follow the first cell's text, on its line. */
|
|
317
|
+
ascribe-availability[scope="row"] {
|
|
318
|
+
display: inline;
|
|
319
|
+
margin: 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
ascribe-availability[scope="row"]::before {
|
|
323
|
+
content: none;
|
|
324
|
+
}
|
|
325
|
+
|
|
316
326
|
ascribe-availability-target {
|
|
317
327
|
--_color: var(--ascribe-state-color);
|
|
318
328
|
--_background: var(--ascribe-state-background);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ascribed/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Ascribe's web component library for the site output.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "0bd81c5fbd7e4fb79f501cb86a7b93beb3e1b421",
|
|
40
39
|
"scripts": {
|
|
41
40
|
"build": "tsc -p tsconfig.build.json",
|
|
42
41
|
"typecheck": "tsc --noEmit",
|