@ascribed/elements 0.2.1-next.10 → 0.2.1-next.12
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 +18 -1
- package/README.md +21 -5
- package/css/style.css +105 -64
- package/dist/names.d.ts +5 -0
- package/dist/names.js +5 -0
- package/dist/names.js.map +1 -1
- package/package.json +3 -3
package/CONTRACT.md
CHANGED
|
@@ -11,12 +11,13 @@ The site output (SPEC §9.4) is markdown plus custom elements. This contract is
|
|
|
11
11
|
| `@details` | [`<details>`](#5-details) with `<summary>` | Optional CSS |
|
|
12
12
|
| Project widget | [An element named after the widget](#6-project-widgets), and `<ascribe-group>` for groups | The project's own; `<ascribe-group>` is the library's |
|
|
13
13
|
| Glossary term | [An ordinary link](#7-glossary-terms), marked with `data-ascribe-term` | Optional CSS |
|
|
14
|
+
| The pointer to `llms.txt`, with `[consumer] agents = true` | [`<ascribe-for-agents>`](#8-ascribe-for-agents) | CSS only |
|
|
14
15
|
|
|
15
16
|
A change to this contract changes the site emitter (`crates/ascribe-emit`), the element library, and the site-render fixtures (`tests/render/`) together.
|
|
16
17
|
|
|
17
18
|
## 0. Rules for every element
|
|
18
19
|
|
|
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
|
+
**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. The names are part of this contract; their default values aren't, and a release may change them, noting it in the changelog. 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
21
|
|
|
21
22
|
**How the emitter writes elements.** Custom elements are raw HTML blocks in CommonMark, so the layout matters:
|
|
22
23
|
|
|
@@ -236,3 +237,19 @@ There's no element for glossary terms. In the site output, an occurrence the glo
|
|
|
236
237
|
Terms without a `link` stay plain text (content-model.md Q7).
|
|
237
238
|
|
|
238
239
|
**Rendering:** a link, which the library's CSS underlines with dots (`a[data-ascribe-term]`). A site restyles it, or shows the definition as a popover, by selecting on the attribute.
|
|
240
|
+
|
|
241
|
+
## 8. `<ascribe-for-agents>`
|
|
242
|
+
|
|
243
|
+
With `[consumer] agents = true` (docs/content/contracts/content-model.md §16), each page of the site output opens with a pointer for AI agents: where the index of every page, `llms.txt`, is, and where this page's Markdown version is (SPEC §9.4). It has no attributes, and wraps one paragraph of markdown with two links, both root-relative like every link in the site output:
|
|
244
|
+
|
|
245
|
+
```markdown
|
|
246
|
+
<ascribe-for-agents>
|
|
247
|
+
|
|
248
|
+
For AI agents: the documentation index is at [llms.txt](/docs/llms.txt), and this page is available as [Markdown](/docs/guides/my-setup.md).
|
|
249
|
+
|
|
250
|
+
</ascribe-for-agents>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
It's the first block of the page's body, before any other content, so an agent that reads only the start of a page still finds it. Without `agents = true` the emitter writes no `<ascribe-for-agents>`.
|
|
254
|
+
|
|
255
|
+
**Rendering:** visually hidden: in the page, and read by an agent or a screen reader, but out of sight, as a site's "skip to content" link is (a clipped 1-pixel box, not `display: none`, which some readers skip). A site that wants readers to see it too restyles it.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The custom elements [Ascribe](https://github.com/ascribed-dev/ascribe)'s site output uses. They implement
|
|
4
4
|
[CONTRACT.md](CONTRACT.md) exactly: `<ascribe-note>`, `<ascribe-steps>`,
|
|
5
5
|
`<ascribe-tabs>` with `<ascribe-tab>`, `<ascribe-availability>` with
|
|
6
|
-
`<ascribe-availability-target>`, and `<ascribe-
|
|
6
|
+
`<ascribe-availability-target>`, `<ascribe-group>`, and `<ascribe-for-agents>`.
|
|
7
7
|
|
|
8
8
|
- Elements render into the light DOM and are styled by CSS.
|
|
9
9
|
- Only `<ascribe-tabs>` uses JavaScript. Without the script, every tab shows
|
|
@@ -29,6 +29,12 @@ directly.
|
|
|
29
29
|
Set any of these custom properties on `:root`, or on any ancestor of the
|
|
30
30
|
elements. Defaults are in `css/style.css`.
|
|
31
31
|
|
|
32
|
+
The names are part of the [contract](CONTRACT.md) and don't change. The
|
|
33
|
+
default values are Ascribe's design tokens, shared with review and the HTML
|
|
34
|
+
report, and a release may change them; the changelog says so under **Behavior
|
|
35
|
+
change**, with the previous values. A site that needs a fixed look sets the
|
|
36
|
+
properties itself.
|
|
37
|
+
|
|
32
38
|
| Group | Properties |
|
|
33
39
|
|---|---|
|
|
34
40
|
| Type | `--ascribe-font-family`, `--ascribe-font-size-small`, `--ascribe-font-weight-strong` |
|
|
@@ -70,6 +76,13 @@ A glossary link carries `data-ascribe-term` with the term's id, and its title
|
|
|
70
76
|
is the definition. The library underlines it with dots; restyle it by
|
|
71
77
|
selecting on the attribute, such as `a[data-ascribe-term]`.
|
|
72
78
|
|
|
79
|
+
### The pointer for agents
|
|
80
|
+
|
|
81
|
+
With `[consumer] agents = true`, each page opens with `<ascribe-for-agents>`,
|
|
82
|
+
which tells an AI agent where `llms.txt` and the page's Markdown are. The
|
|
83
|
+
library hides it from sight, not from the page's text; to show it, restyle
|
|
84
|
+
`ascribe-for-agents`.
|
|
85
|
+
|
|
73
86
|
### A project's own note types and lifecycle states
|
|
74
87
|
|
|
75
88
|
Notes and availability targets carry their type or states as attributes, so a
|
|
@@ -105,9 +118,12 @@ ascribe-availability::before {
|
|
|
105
118
|
|
|
106
119
|
## Tests
|
|
107
120
|
|
|
108
|
-
`pnpm --filter @ascribed/elements test` compiles the library and drives
|
|
109
|
-
through Playwright
|
|
121
|
+
`pnpm --filter @ascribed/elements test` compiles the library and drives it
|
|
122
|
+
through Playwright. Locally it runs Chromium alone; in CI (`CI` set, as Actions
|
|
123
|
+
sets it) it runs Chromium, Firefox, and WebKit, in Playwright's container
|
|
124
|
+
image, which has all three. `ASCRIBE_ENGINES=chromium,firefox,webkit` (any
|
|
125
|
+
comma-separated subset) chooses the engines either way; install them with
|
|
110
126
|
`pnpm --filter @ascribed/elements exec playwright-core install chromium firefox webkit`.
|
|
111
127
|
Chromium uses `/opt/pw-browsers/chromium` when present, or the binary in
|
|
112
|
-
`ASCRIBE_CHROMIUM`.
|
|
113
|
-
|
|
128
|
+
`ASCRIBE_CHROMIUM`. The compile is skipped when every file in `dist/` is newer
|
|
129
|
+
than every file in `src/` and both tsconfigs.
|
package/css/style.css
CHANGED
|
@@ -19,53 +19,65 @@
|
|
|
19
19
|
--ascribe-font-weight-strong: 600;
|
|
20
20
|
|
|
21
21
|
/* Spacing, borders */
|
|
22
|
+
--ascribe-border-width: 1px;
|
|
23
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: spacing, light. */
|
|
22
24
|
--ascribe-space: 1rem;
|
|
23
25
|
--ascribe-space-small: 0.5rem;
|
|
24
|
-
--ascribe-border-
|
|
25
|
-
--ascribe-border-color: #d0d7de;
|
|
26
|
+
--ascribe-border-color: #e3e6ec;
|
|
26
27
|
--ascribe-radius: 0.375rem;
|
|
28
|
+
/* End of generated spacing. */
|
|
27
29
|
|
|
28
30
|
/* Surfaces and text */
|
|
29
31
|
--ascribe-text-color: inherit;
|
|
30
|
-
--ascribe-muted-color: #57606a;
|
|
31
32
|
--ascribe-surface-color: transparent;
|
|
33
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: text, light. */
|
|
34
|
+
--ascribe-muted-color: #676c75;
|
|
35
|
+
/* End of generated text. */
|
|
32
36
|
|
|
33
37
|
/* Note types: an accent color and a tinted background each. */
|
|
34
|
-
|
|
35
|
-
--ascribe-note-
|
|
36
|
-
--ascribe-
|
|
37
|
-
--ascribe-tip-
|
|
38
|
-
--ascribe-
|
|
39
|
-
--ascribe-important-
|
|
40
|
-
--ascribe-
|
|
41
|
-
--ascribe-warning-
|
|
42
|
-
--ascribe-
|
|
43
|
-
--ascribe-caution-
|
|
38
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: notes, light. */
|
|
39
|
+
--ascribe-note-color: #474dc6;
|
|
40
|
+
--ascribe-note-background: #f5f6fe;
|
|
41
|
+
--ascribe-tip-color: #057256;
|
|
42
|
+
--ascribe-tip-background: #e1fff2;
|
|
43
|
+
--ascribe-important-color: #932f8e;
|
|
44
|
+
--ascribe-important-background: #fff2fd;
|
|
45
|
+
--ascribe-warning-color: #845502;
|
|
46
|
+
--ascribe-warning-background: #fef5eb;
|
|
47
|
+
--ascribe-caution-color: #a73303;
|
|
48
|
+
--ascribe-caution-background: #fef4f1;
|
|
49
|
+
/* End of generated notes. */
|
|
44
50
|
|
|
45
51
|
/* Steps */
|
|
46
|
-
--ascribe-steps-color: #0969da;
|
|
47
52
|
--ascribe-steps-marker-size: 1.75rem;
|
|
53
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: steps, light. */
|
|
54
|
+
--ascribe-steps-color: #5962e8;
|
|
48
55
|
--ascribe-steps-marker-text-color: #ffffff;
|
|
56
|
+
/* End of generated steps. */
|
|
49
57
|
|
|
50
58
|
/* Tabs */
|
|
51
|
-
|
|
52
|
-
--ascribe-tab-
|
|
53
|
-
--ascribe-tab-
|
|
54
|
-
--ascribe-tab-
|
|
59
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: tabs, light. */
|
|
60
|
+
--ascribe-tab-color: #676c75;
|
|
61
|
+
--ascribe-tab-active-color: #5962e8;
|
|
62
|
+
--ascribe-tab-focus-color: #5962e8;
|
|
63
|
+
--ascribe-tab-hover-background: #f7f9fd;
|
|
64
|
+
/* End of generated tabs. */
|
|
55
65
|
|
|
56
66
|
/* Availability lifecycle states: an accent color and a background each. */
|
|
57
|
-
|
|
58
|
-
--ascribe-state-
|
|
59
|
-
--ascribe-state-
|
|
60
|
-
--ascribe-state-ga-
|
|
61
|
-
--ascribe-state-
|
|
62
|
-
--ascribe-state-preview-
|
|
63
|
-
--ascribe-state-
|
|
64
|
-
--ascribe-state-beta-
|
|
65
|
-
--ascribe-state-
|
|
66
|
-
--ascribe-state-deprecated-
|
|
67
|
-
--ascribe-state-
|
|
68
|
-
--ascribe-state-removed-
|
|
67
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: states, light. */
|
|
68
|
+
--ascribe-state-color: #676c75;
|
|
69
|
+
--ascribe-state-background: #f0f3f7;
|
|
70
|
+
--ascribe-state-ga-color: #057256;
|
|
71
|
+
--ascribe-state-ga-background: #e1fff2;
|
|
72
|
+
--ascribe-state-preview-color: #932f8e;
|
|
73
|
+
--ascribe-state-preview-background: #fff2fd;
|
|
74
|
+
--ascribe-state-beta-color: #474dc6;
|
|
75
|
+
--ascribe-state-beta-background: #f5f6fe;
|
|
76
|
+
--ascribe-state-deprecated-color: #845502;
|
|
77
|
+
--ascribe-state-deprecated-background: #fef5eb;
|
|
78
|
+
--ascribe-state-removed-color: #a73303;
|
|
79
|
+
--ascribe-state-removed-background: #fef4f1;
|
|
80
|
+
/* End of generated states. */
|
|
69
81
|
}
|
|
70
82
|
|
|
71
83
|
/* The same colors, light and dark. `light-dark()` picks by the element's
|
|
@@ -73,40 +85,53 @@
|
|
|
73
85
|
`light-dark()` keeps the light colors above. */
|
|
74
86
|
@supports (color: light-dark(#000, #fff)) {
|
|
75
87
|
:root {
|
|
76
|
-
|
|
77
|
-
--ascribe-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
--ascribe-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
--ascribe-
|
|
86
|
-
--ascribe-
|
|
87
|
-
--ascribe-
|
|
88
|
-
--ascribe-
|
|
89
|
-
|
|
90
|
-
--ascribe-
|
|
91
|
-
--ascribe-
|
|
92
|
-
|
|
93
|
-
--ascribe-
|
|
94
|
-
--ascribe-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
--ascribe-
|
|
99
|
-
--ascribe-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
--ascribe-
|
|
104
|
-
--ascribe-
|
|
105
|
-
--ascribe-
|
|
106
|
-
--ascribe-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
88
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: spacing, light-dark. */
|
|
89
|
+
--ascribe-border-color: light-dark(#e3e6ec, #393d46);
|
|
90
|
+
/* End of generated spacing. */
|
|
91
|
+
|
|
92
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: text, light-dark. */
|
|
93
|
+
--ascribe-muted-color: light-dark(#676c75, #a5a9b2);
|
|
94
|
+
/* End of generated text. */
|
|
95
|
+
|
|
96
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: notes, light-dark. */
|
|
97
|
+
--ascribe-note-color: light-dark(#474dc6, #91a1fe);
|
|
98
|
+
--ascribe-note-background: light-dark(#f5f6fe, #161b3a);
|
|
99
|
+
--ascribe-tip-color: light-dark(#057256, #22c598);
|
|
100
|
+
--ascribe-tip-background: light-dark(#e1fff2, #02251a);
|
|
101
|
+
--ascribe-important-color: light-dark(#932f8e, #ffc8f9);
|
|
102
|
+
--ascribe-important-background: light-dark(#fff2fd, #2d132b);
|
|
103
|
+
--ascribe-warning-color: light-dark(#845502, #e0992e);
|
|
104
|
+
--ascribe-warning-background: light-dark(#fef5eb, #2b1a03);
|
|
105
|
+
--ascribe-caution-color: light-dark(#a73303, #fe7f57);
|
|
106
|
+
--ascribe-caution-background: light-dark(#fef4f1, #341308);
|
|
107
|
+
/* End of generated notes. */
|
|
108
|
+
|
|
109
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: steps, light-dark. */
|
|
110
|
+
--ascribe-steps-color: light-dark(#5962e8, #91a1fe);
|
|
111
|
+
--ascribe-steps-marker-text-color: light-dark(#ffffff, #0c0f16);
|
|
112
|
+
/* End of generated steps. */
|
|
113
|
+
|
|
114
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: tabs, light-dark. */
|
|
115
|
+
--ascribe-tab-color: light-dark(#676c75, #a5a9b2);
|
|
116
|
+
--ascribe-tab-active-color: light-dark(#5962e8, #91a1fe);
|
|
117
|
+
--ascribe-tab-focus-color: light-dark(#5962e8, #b3c0ff);
|
|
118
|
+
--ascribe-tab-hover-background: light-dark(#f7f9fd, #13171f);
|
|
119
|
+
/* End of generated tabs. */
|
|
120
|
+
|
|
121
|
+
/* Generated from design/tokens.toml by scripts/design/tokens.ts: states, light-dark. */
|
|
122
|
+
--ascribe-state-color: light-dark(#676c75, #a5a9b2);
|
|
123
|
+
--ascribe-state-background: light-dark(#f0f3f7, #22272e);
|
|
124
|
+
--ascribe-state-ga-color: light-dark(#057256, #22c598);
|
|
125
|
+
--ascribe-state-ga-background: light-dark(#e1fff2, #02251a);
|
|
126
|
+
--ascribe-state-preview-color: light-dark(#932f8e, #ffc8f9);
|
|
127
|
+
--ascribe-state-preview-background: light-dark(#fff2fd, #2d132b);
|
|
128
|
+
--ascribe-state-beta-color: light-dark(#474dc6, #91a1fe);
|
|
129
|
+
--ascribe-state-beta-background: light-dark(#f5f6fe, #161b3a);
|
|
130
|
+
--ascribe-state-deprecated-color: light-dark(#845502, #e0992e);
|
|
131
|
+
--ascribe-state-deprecated-background: light-dark(#fef5eb, #2b1a03);
|
|
132
|
+
--ascribe-state-removed-color: light-dark(#a73303, #fe7f57);
|
|
133
|
+
--ascribe-state-removed-background: light-dark(#fef4f1, #341308);
|
|
134
|
+
/* End of generated states. */
|
|
110
135
|
}
|
|
111
136
|
|
|
112
137
|
/* A page that says which it is. */
|
|
@@ -370,6 +395,22 @@ ascribe-group {
|
|
|
370
395
|
display: block;
|
|
371
396
|
}
|
|
372
397
|
|
|
398
|
+
/* <ascribe-for-agents> --------------------------------------------------- */
|
|
399
|
+
|
|
400
|
+
/* The pointer to llms.txt: out of sight, but in the page for an agent (and a
|
|
401
|
+
screen reader) to read. Not `display: none`, which some readers skip. */
|
|
402
|
+
ascribe-for-agents {
|
|
403
|
+
position: absolute;
|
|
404
|
+
width: 1px;
|
|
405
|
+
height: 1px;
|
|
406
|
+
margin: -1px;
|
|
407
|
+
padding: 0;
|
|
408
|
+
overflow: hidden;
|
|
409
|
+
clip-path: inset(50%);
|
|
410
|
+
white-space: nowrap;
|
|
411
|
+
border: 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
373
414
|
/* Glossary terms ---------------------------------------------------------- */
|
|
374
415
|
|
|
375
416
|
/* A link to a glossary term, whose title is the term's definition. */
|
package/dist/names.d.ts
CHANGED
|
@@ -15,6 +15,11 @@ export declare const ELEMENT_AVAILABILITY = "ascribe-availability";
|
|
|
15
15
|
export declare const ELEMENT_AVAILABILITY_TARGET = "ascribe-availability-target";
|
|
16
16
|
/** `<ascribe-group>`: a project widget's group (packages/elements/CONTRACT.md §6). */
|
|
17
17
|
export declare const ELEMENT_GROUP = "ascribe-group";
|
|
18
|
+
/**
|
|
19
|
+
* `<ascribe-for-agents>`: the visually hidden pointer to `llms.txt` at the top
|
|
20
|
+
* of a page, for agents (packages/elements/CONTRACT.md §8).
|
|
21
|
+
*/
|
|
22
|
+
export declare const ELEMENT_FOR_AGENTS = "ascribe-for-agents";
|
|
18
23
|
/** `<ascribe-attributes>`: the attribute marker (site-render contract §1). */
|
|
19
24
|
export declare const ELEMENT_ATTRIBUTES = "ascribe-attributes";
|
|
20
25
|
/** The name an anchor comment starts with, `<!--ascribe-anchor` (site-render contract §7.3). */
|
package/dist/names.js
CHANGED
|
@@ -18,6 +18,11 @@ export const ELEMENT_AVAILABILITY = "ascribe-availability";
|
|
|
18
18
|
export const ELEMENT_AVAILABILITY_TARGET = "ascribe-availability-target";
|
|
19
19
|
/** `<ascribe-group>`: a project widget's group (packages/elements/CONTRACT.md §6). */
|
|
20
20
|
export const ELEMENT_GROUP = "ascribe-group";
|
|
21
|
+
/**
|
|
22
|
+
* `<ascribe-for-agents>`: the visually hidden pointer to `llms.txt` at the top
|
|
23
|
+
* of a page, for agents (packages/elements/CONTRACT.md §8).
|
|
24
|
+
*/
|
|
25
|
+
export const ELEMENT_FOR_AGENTS = "ascribe-for-agents";
|
|
21
26
|
/** `<ascribe-attributes>`: the attribute marker (site-render contract §1). */
|
|
22
27
|
export const ELEMENT_ATTRIBUTES = "ascribe-attributes";
|
|
23
28
|
/** The name an anchor comment starts with, `<!--ascribe-anchor` (site-render contract §7.3). */
|
package/dist/names.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sourceRoot":"","sources":["../src/names.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,qDAAqD;AACrD,4EAA4E;AAE5E,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C,uFAAuF;AACvF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AAEzC,sFAAsF;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE,sFAAsF;AACtF,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD,gGAAgG;AAChG,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE/C,2DAA2D;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAEjD,qEAAqE;AACrE,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAE3C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAE7C,yCAAyC;AAC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AAC;AAEvC,uBAAuB;AACvB,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE/C,iCAAiC;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD,0DAA0D;AAC1D,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C,uCAAuC;AACvC,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC;AAEzC,2CAA2C;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAErD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAEnD,kDAAkD;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAErD,uDAAuD;AACvD,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAEnD,oDAAoD;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAEjD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC;AAEzC,yCAAyC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC","sourcesContent":["// The names Ascribe puts on a page: elements, attributes, classes, and ids.\n// Generated from crates/ascribe-core/src/names.rs by\n// `ASCRIBE_BLESS=1 cargo test -p ascribe-core --test names`. Don't edit it.\n\n/** `<ascribe-note>`: a note (packages/elements/CONTRACT.md §1). */\nexport const ELEMENT_NOTE = \"ascribe-note\";\n\n/** `<ascribe-steps>`: a procedure (packages/elements/CONTRACT.md §2). */\nexport const ELEMENT_STEPS = \"ascribe-steps\";\n\n/** `<ascribe-tabs>`: a variant group of several arms (packages/elements/CONTRACT.md §3). */\nexport const ELEMENT_TABS = \"ascribe-tabs\";\n\n/** `<ascribe-tab>`: one arm of `<ascribe-tabs>` (packages/elements/CONTRACT.md §3). */\nexport const ELEMENT_TAB = \"ascribe-tab\";\n\n/** `<ascribe-availability>`: a badge or filter (packages/elements/CONTRACT.md §4). */\nexport const ELEMENT_AVAILABILITY = \"ascribe-availability\";\n\n/**\n * `<ascribe-availability-target>`: one target of `<ascribe-availability>`\n * (packages/elements/CONTRACT.md §4).\n */\nexport const ELEMENT_AVAILABILITY_TARGET = \"ascribe-availability-target\";\n\n/** `<ascribe-group>`: a project widget's group (packages/elements/CONTRACT.md §6). */\nexport const ELEMENT_GROUP = \"ascribe-group\";\n\n/** `<ascribe-attributes>`: the attribute marker (site-render contract §1). */\nexport const ELEMENT_ATTRIBUTES = \"ascribe-attributes\";\n\n/** The name an anchor comment starts with, `<!--ascribe-anchor` (site-render contract §7.3). */\nexport const COMMENT_ANCHOR = \"ascribe-anchor\";\n\n/** A block's source anchor (site-render contract §7.1). */\nexport const DATA_SOURCE = \"data-ascribe-source\";\n\n/** The includes a block came through (site-render contract §7.1). */\nexport const DATA_VIA = \"data-ascribe-via\";\n\n/** A glossary term's id, on its link (packages/elements/CONTRACT.md §7). */\nexport const DATA_TERM = \"data-ascribe-term\";\n\n/** The element the report draws into. */\nexport const ID_REPORT = \"ascribe-review\";\n\n/** The `<script type=\"application/json\">` holding the report's data. */\nexport const ID_REPORT_DATA = \"ascribe-review-data\";\n\n/**\n * The page's light or dark scheme, `light` or `dark`, on the root\n * element (docs/content/guides/astro.md).\n */\nexport const DATA_SCHEME = \"data-ascribe-scheme\";\n\n/** On a marked page's root: what it shows, `changes`, `will`, or `was`. */\nexport const DATA_SHOW = \"data-ascribe-show\";\n\n/**\n * On a marked block: its change, `added`, `changed`, `removed`, `moved`,\n * or `moved-from`.\n */\nexport const DATA_CHANGE = \"data-ascribe-change\";\n\n/** On every element review adds to the page, so it can be taken away again. */\nexport const DATA_UI = \"data-ascribe-ui\";\n\n/** On a change's label: the change. */\nexport const DATA_LABEL = \"data-ascribe-label\";\n\n/** On a tab's hint: `added` or `changed`. */\nexport const DATA_HINT = \"data-ascribe-hint\";\n\n/** On a moved block: the id its \"moved from\" link points at. */\nexport const DATA_MOVE = \"data-ascribe-move\";\n\n/** On a changed block whose copy as it was follows it. */\nexport const DATA_HAS_WAS = \"data-ascribe-has-was\";\n\n/** On a copy of a block as it was, shown only with the page as it was. */\nexport const DATA_WAS_ONLY = \"data-ascribe-was-only\";\n\n/** On a changed, removed, or moved block: its source anchor as it was. */\nexport const DATA_WAS_SOURCE = \"data-ascribe-was-source\";\n\n/** On the elements that hold the threads' overlay. */\nexport const DATA_OVERLAY = \"data-ascribe-overlay\";\n\n/** On the style element the Astro dev toolbar adds for the marks. */\nexport const DATA_REVIEW = \"data-ascribe-review\";\n\n/** On the root of a page whose changes are marked. */\nexport const CLASS_MARKS = \"ascribe-marks\";\n\n/** A change's label. */\nexport const CLASS_LABEL = \"ascribe-label\";\n\n/** A label placed before its block rather than over it. */\nexport const CLASS_LABEL_BEFORE = \"ascribe-label-before\";\n\n/** Inserted text. */\nexport const CLASS_INS = \"ascribe-ins\";\n\n/** Deleted text. */\nexport const CLASS_DEL = \"ascribe-del\";\n\n/** A removed block. */\nexport const CLASS_REMOVED = \"ascribe-removed\";\n\n/** A removed block's content. */\nexport const CLASS_REMOVED_BODY = \"ascribe-removed-body\";\n\n/** The button that shows or collapses a removed block. */\nexport const CLASS_TOGGLE = \"ascribe-toggle\";\n\n/** On a removed block that's shown. */\nexport const CLASS_OPEN = \"ascribe-open\";\n\n/** What stands where a moved block was. */\nexport const CLASS_MOVED_FROM = \"ascribe-moved-from\";\n\n/** The note with a moved block's link. */\nexport const CLASS_MOVE_NOTE = \"ascribe-move-note\";\n\n/** A move note after its block, not inside it. */\nexport const CLASS_MOVE_AFTER = \"ascribe-move-after\";\n\n/** The link between a moved block and where it was. */\nexport const CLASS_MOVE_LINK = \"ascribe-move-link\";\n\n/** A moved block's copy as it was, where it was. */\nexport const CLASS_WAS_COPY = \"ascribe-was-copy\";\n\n/** A tab's hint that it holds changes. */\nexport const CLASS_HINT = \"ascribe-hint\";\n\n/** A block flashed after going to it. */\nexport const CLASS_FLASH = \"ascribe-flash\";\n\n/** The tip that shows a block's source on hover and focus. */\nexport const CLASS_WHERE = \"ascribe-where\";\n"]}
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../src/names.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,qDAAqD;AACrD,4EAA4E;AAE5E,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C,uFAAuF;AACvF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AAEzC,sFAAsF;AACtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE,sFAAsF;AACtF,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD,gGAAgG;AAChG,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE/C,2DAA2D;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAEjD,qEAAqE;AACrE,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAE3C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAE7C,yCAAyC;AACzC,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAE1C,wEAAwE;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAq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AAM,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD,0DAA0D;AAC1D,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C,uCAAuC;AACvC,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC;AAEzC,2CAA2C;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAErD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAEnD,kDAAkD;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAErD,uDAAuD;AACvD,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAEnD,oDAAoD;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAEjD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAC;AAEzC,yCAAyC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC","sourcesContent":["// The names Ascribe puts on a page: elements, attributes, classes, and ids.\n// Generated from crates/ascribe-core/src/names.rs by\n// `ASCRIBE_BLESS=1 cargo test -p ascribe-core --test names`. Don't edit it.\n\n/** `<ascribe-note>`: a note (packages/elements/CONTRACT.md §1). */\nexport const ELEMENT_NOTE = \"ascribe-note\";\n\n/** `<ascribe-steps>`: a procedure (packages/elements/CONTRACT.md §2). */\nexport const ELEMENT_STEPS = \"ascribe-steps\";\n\n/** `<ascribe-tabs>`: a variant group of several arms (packages/elements/CONTRACT.md §3). */\nexport const ELEMENT_TABS = \"ascribe-tabs\";\n\n/** `<ascribe-tab>`: one arm of `<ascribe-tabs>` (packages/elements/CONTRACT.md §3). */\nexport const ELEMENT_TAB = \"ascribe-tab\";\n\n/** `<ascribe-availability>`: a badge or filter (packages/elements/CONTRACT.md §4). */\nexport const ELEMENT_AVAILABILITY = \"ascribe-availability\";\n\n/**\n * `<ascribe-availability-target>`: one target of `<ascribe-availability>`\n * (packages/elements/CONTRACT.md §4).\n */\nexport const ELEMENT_AVAILABILITY_TARGET = \"ascribe-availability-target\";\n\n/** `<ascribe-group>`: a project widget's group (packages/elements/CONTRACT.md §6). */\nexport const ELEMENT_GROUP = \"ascribe-group\";\n\n/**\n * `<ascribe-for-agents>`: the visually hidden pointer to `llms.txt` at the top\n * of a page, for agents (packages/elements/CONTRACT.md §8).\n */\nexport const ELEMENT_FOR_AGENTS = \"ascribe-for-agents\";\n\n/** `<ascribe-attributes>`: the attribute marker (site-render contract §1). */\nexport const ELEMENT_ATTRIBUTES = \"ascribe-attributes\";\n\n/** The name an anchor comment starts with, `<!--ascribe-anchor` (site-render contract §7.3). */\nexport const COMMENT_ANCHOR = \"ascribe-anchor\";\n\n/** A block's source anchor (site-render contract §7.1). */\nexport const DATA_SOURCE = \"data-ascribe-source\";\n\n/** The includes a block came through (site-render contract §7.1). */\nexport const DATA_VIA = \"data-ascribe-via\";\n\n/** A glossary term's id, on its link (packages/elements/CONTRACT.md §7). */\nexport const DATA_TERM = \"data-ascribe-term\";\n\n/** The element the report draws into. */\nexport const ID_REPORT = \"ascribe-review\";\n\n/** The `<script type=\"application/json\">` holding the report's data. */\nexport const ID_REPORT_DATA = \"ascribe-review-data\";\n\n/**\n * The page's light or dark scheme, `light` or `dark`, on the root\n * element (docs/content/guides/astro.md).\n */\nexport const DATA_SCHEME = \"data-ascribe-scheme\";\n\n/** On a marked page's root: what it shows, `changes`, `will`, or `was`. */\nexport const DATA_SHOW = \"data-ascribe-show\";\n\n/**\n * On a marked block: its change, `added`, `changed`, `removed`, `moved`,\n * or `moved-from`.\n */\nexport const DATA_CHANGE = \"data-ascribe-change\";\n\n/** On every element review adds to the page, so it can be taken away again. */\nexport const DATA_UI = \"data-ascribe-ui\";\n\n/** On a change's label: the change. */\nexport const DATA_LABEL = \"data-ascribe-label\";\n\n/** On a tab's hint: `added` or `changed`. */\nexport const DATA_HINT = \"data-ascribe-hint\";\n\n/** On a moved block: the id its \"moved from\" link points at. */\nexport const DATA_MOVE = \"data-ascribe-move\";\n\n/** On a changed block whose copy as it was follows it. */\nexport const DATA_HAS_WAS = \"data-ascribe-has-was\";\n\n/** On a copy of a block as it was, shown only with the page as it was. */\nexport const DATA_WAS_ONLY = \"data-ascribe-was-only\";\n\n/** On a changed, removed, or moved block: its source anchor as it was. */\nexport const DATA_WAS_SOURCE = \"data-ascribe-was-source\";\n\n/** On the elements that hold the threads' overlay. */\nexport const DATA_OVERLAY = \"data-ascribe-overlay\";\n\n/** On the style element the Astro dev toolbar adds for the marks. */\nexport const DATA_REVIEW = \"data-ascribe-review\";\n\n/** On the root of a page whose changes are marked. */\nexport const CLASS_MARKS = \"ascribe-marks\";\n\n/** A change's label. */\nexport const CLASS_LABEL = \"ascribe-label\";\n\n/** A label placed before its block rather than over it. */\nexport const CLASS_LABEL_BEFORE = \"ascribe-label-before\";\n\n/** Inserted text. */\nexport const CLASS_INS = \"ascribe-ins\";\n\n/** Deleted text. */\nexport const CLASS_DEL = \"ascribe-del\";\n\n/** A removed block. */\nexport const CLASS_REMOVED = \"ascribe-removed\";\n\n/** A removed block's content. */\nexport const CLASS_REMOVED_BODY = \"ascribe-removed-body\";\n\n/** The button that shows or collapses a removed block. */\nexport const CLASS_TOGGLE = \"ascribe-toggle\";\n\n/** On a removed block that's shown. */\nexport const CLASS_OPEN = \"ascribe-open\";\n\n/** What stands where a moved block was. */\nexport const CLASS_MOVED_FROM = \"ascribe-moved-from\";\n\n/** The note with a moved block's link. */\nexport const CLASS_MOVE_NOTE = \"ascribe-move-note\";\n\n/** A move note after its block, not inside it. */\nexport const CLASS_MOVE_AFTER = \"ascribe-move-after\";\n\n/** The link between a moved block and where it was. */\nexport const CLASS_MOVE_LINK = \"ascribe-move-link\";\n\n/** A moved block's copy as it was, where it was. */\nexport const CLASS_WAS_COPY = \"ascribe-was-copy\";\n\n/** A tab's hint that it holds changes. */\nexport const CLASS_HINT = \"ascribe-hint\";\n\n/** A block flashed after going to it. */\nexport const CLASS_FLASH = \"ascribe-flash\";\n\n/** The tip that shows a block's source on hover and focus. */\nexport const CLASS_WHERE = \"ascribe-where\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ascribed/elements",
|
|
3
|
-
"version": "0.2.1-next.
|
|
3
|
+
"version": "0.2.1-next.12",
|
|
4
4
|
"description": "Ascribe's web component library for the site output.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^24.0.0",
|
|
33
|
-
"axe-core": "^4.
|
|
33
|
+
"axe-core": "^4.14.0",
|
|
34
34
|
"playwright-core": "^1.50.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "05055e771692b3f4d26eb99097258a30086a4b1b",
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc -p tsconfig.build.json",
|
|
42
42
|
"typecheck": "tsc --noEmit",
|