@ascribed/elements 0.1.0 → 0.1.1
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 +5 -5
- package/package.json +1 -1
package/CONTRACT.md
CHANGED
|
@@ -16,7 +16,7 @@ A change to this contract changes the site emitter (`crates/tessera-emit`), the
|
|
|
16
16
|
|
|
17
17
|
## 0. Rules for every element
|
|
18
18
|
|
|
19
|
-
**Light DOM, CSS, no behavior.** Elements render into the light DOM, so site styles apply and content stays visible to search engines and assistive technology (SPEC §9.7). They're styled with CSS and themed with custom properties whose names start with `--ascribe-`;
|
|
19
|
+
**Light DOM, CSS, no behavior.** Elements render into the light DOM, so site styles apply and content stays visible to search engines and assistive technology (SPEC §9.7). They're styled with CSS and themed with custom properties whose names start with `--ascribe-`; the package README lists them. Only `<ascribe-tabs>` runs JavaScript. Everything else must render meaningfully with the library's CSS and no script, and must stay readable with neither.
|
|
20
20
|
|
|
21
21
|
**How the emitter writes elements.** Custom elements are raw HTML blocks in CommonMark, so the layout matters:
|
|
22
22
|
|
|
@@ -30,7 +30,7 @@ A change to this contract changes the site emitter (`crates/tessera-emit`), the
|
|
|
30
30
|
|
|
31
31
|
**Plain text of inline content.** Where an attribute holds a title or label written as inline markdown, its value is the inline content's text: phrases substituted (they already are, in the resolved page), code spans as their text, emphasis and links as their text, images as their alt text, raw inline HTML dropped, and line breaks as single spaces. So ``.Try the *new* `quill` CLI`` becomes `Try the new quill CLI`.
|
|
32
32
|
|
|
33
|
-
**Labels** come from the content model: note types' `label` (content-model.md §11), dimensions' and dimension values' `labels` (§7), and lifecycle states' `label` (§9). A value without a declared label is shown as itself.
|
|
33
|
+
**Labels** come from the content model: note types' `label` (docs/contracts/content-model.md §11), dimensions' and dimension values' `labels` (§7), and lifecycle states' `label` (§9). A value without a declared label is shown as itself.
|
|
34
34
|
|
|
35
35
|
## 1. `<ascribe-note>`
|
|
36
36
|
|
|
@@ -198,7 +198,7 @@ The element library may style `details` and `summary`, and implements no element
|
|
|
198
198
|
|
|
199
199
|
## 6. Project widgets
|
|
200
200
|
|
|
201
|
-
A project widget (SPEC §6) becomes a custom element whose tag is the widget's name (SPEC §9.4). Widget names are valid custom-element names: they contain a hyphen, and content-model.md §15 rejects names starting with `ascribe-` and HTML's reserved names. The project supplies the element's implementation; the element library doesn't.
|
|
201
|
+
A project widget (SPEC §6) becomes a custom element whose tag is the widget's name (SPEC §9.4). Widget names are valid custom-element names: they contain a hyphen, and docs/contracts/content-model.md §15 rejects names starting with `ascribe-` and HTML's reserved names. The project supplies the element's implementation; the element library doesn't.
|
|
202
202
|
|
|
203
203
|
**Attributes**, in this order:
|
|
204
204
|
|
|
@@ -206,7 +206,7 @@ A project widget (SPEC §6) becomes a custom element whose tag is the widget's n
|
|
|
206
206
|
2. `primary`: an identifier primary, if the widget takes one and it's given. A text primary is content instead (below).
|
|
207
207
|
3. Each attribute in the widget's declaration, in declared order, with the value given or, if absent, its declared default. A value set's members are joined by single spaces; booleans are `true` or `false`; other values are their text. An attribute with neither a value nor a default is left out. A declaration can't use `heading`, `primary`, or HTML's global or event-handler attribute names (SPEC §7.2; content-model.md, `model-attribute-reserved`), so these never clash.
|
|
208
208
|
|
|
209
|
-
**Children and placement**, by the widget's form and binding (content-model.md §15):
|
|
209
|
+
**Children and placement**, by the widget's form and binding (docs/contracts/content-model.md §15):
|
|
210
210
|
|
|
211
211
|
| Widget | Element |
|
|
212
212
|
|---|---|
|
|
@@ -222,4 +222,4 @@ A wrapping widget follows §0's layout for elements that wrap markdown; an empty
|
|
|
222
222
|
|
|
223
223
|
## 7. Glossary terms
|
|
224
224
|
|
|
225
|
-
There's no element for glossary terms. In the site output, an occurrence the glossary links (content-model.md §13) is an ordinary markdown link to the term's `link` target, as a route, with the term's definition as the link title: `[API key](/docs/reference/glossary/#api-key "A secret token that authenticates the Quill agent.")`. Terms without a `link` stay plain text (content-model.md Q7).
|
|
225
|
+
There's no element for glossary terms. In the site output, an occurrence the glossary links (docs/contracts/content-model.md §13) is an ordinary markdown link to the term's `link` target, as a route, with the term's definition as the link title: `[API key](/docs/reference/glossary/#api-key "A secret token that authenticates the Quill agent.")`. Terms without a `link` stay plain text (content-model.md Q7).
|