@ascribed/elements 0.4.2-next.29 → 0.4.2
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 +7 -2
- package/package.json +1 -2
package/CONTRACT.md
CHANGED
|
@@ -24,7 +24,7 @@ A change to this contract changes the site emitter (`crates/ascribe-emit`), the
|
|
|
24
24
|
**How the emitter writes elements.** Custom elements are raw HTML blocks in CommonMark, so the layout matters:
|
|
25
25
|
|
|
26
26
|
- An element that **wraps markdown** is written as its opening tag alone on a line, a blank line, the markdown, a blank line, and its closing tag alone on a line (SPEC §9.4). Nested wrapping elements follow the same rule.
|
|
27
|
-
- An element that holds **no markdown** (`<ascribe-availability>`, an empty widget) is written as one HTML block: its lines are consecutive, with no blank line inside.
|
|
27
|
+
- An element that holds **no markdown** (`<ascribe-availability>`, an empty widget) is written as one HTML block: its lines are consecutive, with no blank line inside, and its opening tag is alone on the first line. An element with nothing inside is its opening tag on one line and its closing tag on the next. A custom element's tags on one line aren't an HTML block to CommonMark, which reads them as inline HTML and wraps them in a paragraph; an opening tag alone on its line starts a block (CommonMark's HTML block kind 7).
|
|
28
28
|
- Every element is separated from the blocks around it by a blank line, or starts or ends its container.
|
|
29
29
|
- Inside a list item or blockquote, every line carries the container's indentation or `>` markers, like any other block there.
|
|
30
30
|
- A list whose items hold an element is written loose, whatever it was in the source, because an element needs a blank line before it and CommonMark then reads the list as loose: its items render `<p>`. A list whose items hold no element keeps its tightness.
|
|
@@ -224,7 +224,12 @@ A project widget (SPEC §6) becomes a custom element whose tag is the widget's n
|
|
|
224
224
|
| `binding = "heading"`, or `"heading-or-block"` at a section's top | Empty, directly after the section's heading |
|
|
225
225
|
| `binding = "self"` | Empty, where the directive was |
|
|
226
226
|
|
|
227
|
-
A wrapping widget follows §0's layout for elements that wrap markdown; an empty one
|
|
227
|
+
A wrapping widget follows §0's layout for elements that wrap markdown; an empty one follows its layout for elements with nothing inside, the opening tag on one line and the closing tag on the next, so it's an HTML block, never in a paragraph:
|
|
228
|
+
|
|
229
|
+
```html
|
|
230
|
+
<quill-labspace lab="first-sync">
|
|
231
|
+
</quill-labspace>
|
|
232
|
+
```
|
|
228
233
|
|
|
229
234
|
**Groups:** the arms of a groupable widget's group become one element per arm, as above, wrapped in `<ascribe-group widget="<name>">`, which follows §0's layout. `<ascribe-group>` is part of the element library: it has no behavior and no styling beyond `display: block`, and exists so a project's CSS or script can find a group's arms together.
|
|
230
235
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ascribed/elements",
|
|
3
|
-
"version": "0.4.2
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "A toolchain for documentation written as code. This package is the web components its site output uses.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "dbe916f4a1448d9587e1185c32399b422da94607",
|
|
48
47
|
"scripts": {
|
|
49
48
|
"build": "tsc -p tsconfig.build.json",
|
|
50
49
|
"typecheck": "tsc --noEmit",
|