@contraagent/elements 0.1.0 → 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/README.md +16 -5
- package/custom-elements.json +1107 -345
- package/dist/code/code.d.ts +83 -0
- package/dist/code/code.d.ts.map +1 -0
- package/dist/code/code.js +206 -0
- package/dist/code/code.js.map +1 -0
- package/dist/code/highlight.d.ts +25 -0
- package/dist/code/highlight.d.ts.map +1 -0
- package/dist/code/highlight.js +312 -0
- package/dist/code/highlight.js.map +1 -0
- package/dist/code/index.d.ts +3 -0
- package/dist/code/index.d.ts.map +1 -0
- package/dist/code/index.js +5 -0
- package/dist/code/index.js.map +1 -0
- package/dist/define/all.d.ts +2 -0
- package/dist/define/all.d.ts.map +1 -1
- package/dist/define/all.js +2 -0
- package/dist/define/all.js.map +1 -1
- package/dist/define/code.d.ts +4 -0
- package/dist/define/code.d.ts.map +1 -0
- package/dist/define/code.js +7 -0
- package/dist/define/code.js.map +1 -0
- package/dist/define/tree.d.ts +4 -0
- package/dist/define/tree.d.ts.map +1 -0
- package/dist/define/tree.js +7 -0
- package/dist/define/tree.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/markdown/highlight.d.ts +1 -4
- package/dist/markdown/highlight.d.ts.map +1 -1
- package/dist/markdown/highlight.js +2 -85
- package/dist/markdown/highlight.js.map +1 -1
- package/dist/styles/prose.d.ts.map +1 -1
- package/dist/styles/prose.js +5 -0
- package/dist/styles/prose.js.map +1 -1
- package/dist/tree/index.d.ts +2 -0
- package/dist/tree/index.d.ts.map +1 -0
- package/dist/tree/index.js +4 -0
- package/dist/tree/index.js.map +1 -0
- package/dist/tree/tree.d.ts +83 -0
- package/dist/tree/tree.d.ts.map +1 -0
- package/dist/tree/tree.js +251 -0
- package/dist/tree/tree.js.map +1 -0
- package/docs/code.md +55 -0
- package/docs/examples/code.ts +28 -0
- package/docs/examples/tree.ts +44 -0
- package/docs/tree.md +44 -0
- package/package.json +19 -3
- package/src/code/code.ts +199 -0
- package/src/code/highlight.ts +378 -0
- package/src/code/index.ts +4 -0
- package/src/define/all.ts +2 -0
- package/src/define/code.ts +9 -0
- package/src/define/tree.ts +9 -0
- package/src/index.ts +2 -0
- package/src/markdown/highlight.ts +2 -94
- package/src/styles/prose.ts +5 -0
- package/src/tree/index.ts +3 -0
- package/src/tree/tree.ts +263 -0
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Generic web components (Lit) and the parts they are built from: the design
|
|
4
4
|
tokens and the built-in themes, status pills, legends, rows of facts, icons, a
|
|
5
5
|
segmented control, keyboard focus for a group of items, a data table, stat
|
|
6
|
-
tiles, time lanes, a check table, a transcript, and elements for a JSON tree, markdown and counters. Nothing here knows contraagent's data: an element
|
|
6
|
+
tiles, time lanes, a check table, a transcript, and elements for a JSON tree, markdown, code, a tree of items and counters. Nothing here knows contraagent's data: an element
|
|
7
7
|
takes plain data and its words, and reports what the reader did as a `cae-*`
|
|
8
8
|
event. `@contraagent/ui` builds the contraagent monitor from them.
|
|
9
9
|
|
|
@@ -22,19 +22,28 @@ import '@contraagent/elements/data-table/define'; // <cae-data-table>
|
|
|
22
22
|
import '@contraagent/elements/tiles/define'; // <cae-stat-tiles>
|
|
23
23
|
import '@contraagent/elements/graph/define'; // <cae-layered-graph>, <cae-mark-matrix>, <cae-segmented>
|
|
24
24
|
import '@contraagent/elements/charts/define'; // <cae-column-chart>, <cae-line-chart>, <cae-heatmap>, <cae-state-grid>, <cae-bar-chart>
|
|
25
|
+
import '@contraagent/elements/code/define'; // <cae-code>
|
|
26
|
+
import '@contraagent/elements/tree/define'; // <cae-tree>
|
|
25
27
|
import '@contraagent/elements/define'; // every cae-* element
|
|
26
28
|
import { pill, legend, base } from '@contraagent/elements';
|
|
27
29
|
```
|
|
28
30
|
|
|
29
31
|
The subpaths are `primitives`, `styles`, `themes`, `data-table`, `graph`,
|
|
30
32
|
`matrix`, `tiles`, `lanes`, `charts`, `check-table`, `transcript`, `json-tree`,
|
|
31
|
-
`markdown` and `count`, and a `define` entry for each element
|
|
33
|
+
`markdown`, `code`, `tree` and `count`, and a `define` entry for each element
|
|
32
34
|
(`segmented/define`, `data-table/define`, `graph/define`, `matrix/define`,
|
|
33
35
|
`tiles/define`, `lanes/define`, `charts/define`, `check-table/define`,
|
|
34
|
-
`transcript/define`, `json-tree/define`, `markdown/define`, `
|
|
36
|
+
`transcript/define`, `json-tree/define`, `markdown/define`, `code/define`, `tree/define`,
|
|
37
|
+
`count/define`).
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
Install the package from the npm registry:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
npm install @contraagent/elements
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
A checkout of the repository packs its own version ([Use it from a
|
|
46
|
+
checkout](#use-it-from-a-checkout)).
|
|
38
47
|
|
|
39
48
|
## Use it from a checkout
|
|
40
49
|
|
|
@@ -64,6 +73,8 @@ pnpm add <checkout>/web/tarballs/contraagent-elements-*.tgz
|
|
|
64
73
|
- [Lanes](docs/lanes.md): bars on a time axis, a lane per group, running bars growing until now.
|
|
65
74
|
- [Charts](docs/charts.md): columns (stacked or side by side), lines, a heatmap and horizontal bars of plain series, each with a legend, a tooltip and a table of its values.
|
|
66
75
|
- [Check table](docs/check-table.md): named values checked one by one, each with what it must be, what it is and the verdict.
|
|
76
|
+
- [Code](docs/code.md): a text highlighted by its language, its lines numbered and some marked, wrapped or scrolled, copied whole, and cut when long.
|
|
77
|
+
- [Tree](docs/tree.md): items in a tree, folded and opened with the mouse and the keyboard, one of them selected, each with an icon and a badge.
|
|
67
78
|
- [Transcript](docs/transcript.md): a conversation with an agent in sessions: bubbles, reasoning, tool cards and web searches, following the end as it grows.
|
|
68
79
|
- [Building a page](docs/page.md): a CI pipeline's page from several elements: a theme switch, stat tiles, a sortable table, a graph with shards and a retry loop, and a detail panel.
|
|
69
80
|
|