@contraagent/elements 0.0.0-stage → 0.1.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 +72 -2
- package/custom-elements.json +4260 -0
- package/dist/charts/bar-chart.d.ts +32 -0
- package/dist/charts/bar-chart.d.ts.map +1 -0
- package/dist/charts/bar-chart.js +70 -0
- package/dist/charts/bar-chart.js.map +1 -0
- package/dist/charts/base.d.ts +48 -0
- package/dist/charts/base.d.ts.map +1 -0
- package/dist/charts/base.js +203 -0
- package/dist/charts/base.js.map +1 -0
- package/dist/charts/column-chart.d.ts +42 -0
- package/dist/charts/column-chart.d.ts.map +1 -0
- package/dist/charts/column-chart.js +146 -0
- package/dist/charts/column-chart.js.map +1 -0
- package/dist/charts/heatmap.d.ts +42 -0
- package/dist/charts/heatmap.d.ts.map +1 -0
- package/dist/charts/heatmap.js +124 -0
- package/dist/charts/heatmap.js.map +1 -0
- package/dist/charts/index.d.ts +9 -0
- package/dist/charts/index.d.ts.map +1 -0
- package/dist/charts/index.js +11 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/line-chart.d.ts +36 -0
- package/dist/charts/line-chart.d.ts.map +1 -0
- package/dist/charts/line-chart.js +118 -0
- package/dist/charts/line-chart.js.map +1 -0
- package/dist/charts/scale.d.ts +32 -0
- package/dist/charts/scale.d.ts.map +1 -0
- package/dist/charts/scale.js +50 -0
- package/dist/charts/scale.js.map +1 -0
- package/dist/charts/state-grid.d.ts +64 -0
- package/dist/charts/state-grid.d.ts.map +1 -0
- package/dist/charts/state-grid.js +223 -0
- package/dist/charts/state-grid.js.map +1 -0
- package/dist/charts/types.d.ts +34 -0
- package/dist/charts/types.d.ts.map +1 -0
- package/dist/charts/types.js +11 -0
- package/dist/charts/types.js.map +1 -0
- package/dist/checks/check-table.d.ts +32 -0
- package/dist/checks/check-table.d.ts.map +1 -0
- package/dist/checks/check-table.js +94 -0
- package/dist/checks/check-table.js.map +1 -0
- package/dist/checks/index.d.ts +4 -0
- package/dist/checks/index.d.ts.map +1 -0
- package/dist/checks/index.js +6 -0
- package/dist/checks/index.js.map +1 -0
- package/dist/checks/styles.d.ts +5 -0
- package/dist/checks/styles.d.ts.map +1 -0
- package/dist/checks/styles.js +30 -0
- package/dist/checks/styles.js.map +1 -0
- package/dist/checks/types.d.ts +35 -0
- package/dist/checks/types.d.ts.map +1 -0
- package/dist/checks/types.js +12 -0
- package/dist/checks/types.js.map +1 -0
- package/dist/core/clock.d.ts +20 -0
- package/dist/core/clock.d.ts.map +1 -0
- package/dist/core/clock.js +45 -0
- package/dist/core/clock.js.map +1 -0
- package/dist/core/define.d.ts +3 -0
- package/dist/core/define.d.ts.map +1 -0
- package/dist/core/define.js +8 -0
- package/dist/core/define.js.map +1 -0
- package/dist/core/events.d.ts +78 -0
- package/dist/core/events.d.ts.map +1 -0
- package/dist/core/events.js +8 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/format.d.ts +8 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/format.js +28 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/frame.d.ts +4 -0
- package/dist/core/frame.d.ts.map +1 -0
- package/dist/core/frame.js +5 -0
- package/dist/core/frame.js.map +1 -0
- package/dist/core/strings.d.ts +3 -0
- package/dist/core/strings.d.ts.map +1 -0
- package/dist/core/strings.js +14 -0
- package/dist/core/strings.js.map +1 -0
- package/dist/core/tone.d.ts +8 -0
- package/dist/core/tone.d.ts.map +1 -0
- package/dist/core/tone.js +9 -0
- package/dist/core/tone.js.map +1 -0
- package/dist/count/count.d.ts +22 -0
- package/dist/count/count.d.ts.map +1 -0
- package/dist/count/count.js +60 -0
- package/dist/count/count.js.map +1 -0
- package/dist/count/elapsed.d.ts +18 -0
- package/dist/count/elapsed.d.ts.map +1 -0
- package/dist/count/elapsed.js +33 -0
- package/dist/count/elapsed.js.map +1 -0
- package/dist/count/index.d.ts +3 -0
- package/dist/count/index.d.ts.map +1 -0
- package/dist/count/index.js +5 -0
- package/dist/count/index.js.map +1 -0
- package/dist/define/all.d.ts +13 -0
- package/dist/define/all.d.ts.map +1 -0
- package/dist/define/all.js +14 -0
- package/dist/define/all.js.map +1 -0
- package/dist/define/charts.d.ts +8 -0
- package/dist/define/charts.d.ts.map +1 -0
- package/dist/define/charts.js +15 -0
- package/dist/define/charts.js.map +1 -0
- package/dist/define/check-table.d.ts +4 -0
- package/dist/define/check-table.d.ts.map +1 -0
- package/dist/define/check-table.js +7 -0
- package/dist/define/check-table.js.map +1 -0
- package/dist/define/count.d.ts +5 -0
- package/dist/define/count.d.ts.map +1 -0
- package/dist/define/count.js +9 -0
- package/dist/define/count.js.map +1 -0
- package/dist/define/data-table.d.ts +4 -0
- package/dist/define/data-table.d.ts.map +1 -0
- package/dist/define/data-table.js +7 -0
- package/dist/define/data-table.js.map +1 -0
- package/dist/define/graph.d.ts +6 -0
- package/dist/define/graph.d.ts.map +1 -0
- package/dist/define/graph.js +9 -0
- package/dist/define/graph.js.map +1 -0
- package/dist/define/json-tree.d.ts +4 -0
- package/dist/define/json-tree.d.ts.map +1 -0
- package/dist/define/json-tree.js +7 -0
- package/dist/define/json-tree.js.map +1 -0
- package/dist/define/lanes.d.ts +4 -0
- package/dist/define/lanes.d.ts.map +1 -0
- package/dist/define/lanes.js +7 -0
- package/dist/define/lanes.js.map +1 -0
- package/dist/define/markdown.d.ts +4 -0
- package/dist/define/markdown.d.ts.map +1 -0
- package/dist/define/markdown.js +7 -0
- package/dist/define/markdown.js.map +1 -0
- package/dist/define/matrix.d.ts +4 -0
- package/dist/define/matrix.d.ts.map +1 -0
- package/dist/define/matrix.js +7 -0
- package/dist/define/matrix.js.map +1 -0
- package/dist/define/segmented.d.ts +4 -0
- package/dist/define/segmented.d.ts.map +1 -0
- package/dist/define/segmented.js +7 -0
- package/dist/define/segmented.js.map +1 -0
- package/dist/define/tiles.d.ts +5 -0
- package/dist/define/tiles.d.ts.map +1 -0
- package/dist/define/tiles.js +9 -0
- package/dist/define/tiles.js.map +1 -0
- package/dist/define/transcript.d.ts +4 -0
- package/dist/define/transcript.d.ts.map +1 -0
- package/dist/define/transcript.js +7 -0
- package/dist/define/transcript.js.map +1 -0
- package/dist/graph/arrange.d.ts +43 -0
- package/dist/graph/arrange.d.ts.map +1 -0
- package/dist/graph/arrange.js +390 -0
- package/dist/graph/arrange.js.map +1 -0
- package/dist/graph/card.d.ts +71 -0
- package/dist/graph/card.d.ts.map +1 -0
- package/dist/graph/card.js +185 -0
- package/dist/graph/card.js.map +1 -0
- package/dist/graph/host.d.ts +82 -0
- package/dist/graph/host.d.ts.map +1 -0
- package/dist/graph/host.js +21 -0
- package/dist/graph/host.js.map +1 -0
- package/dist/graph/icons.d.ts +7 -0
- package/dist/graph/icons.d.ts.map +1 -0
- package/dist/graph/icons.js +18 -0
- package/dist/graph/icons.js.map +1 -0
- package/dist/graph/index.d.ts +15 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +17 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/layered-graph.d.ts +226 -0
- package/dist/graph/layered-graph.d.ts.map +1 -0
- package/dist/graph/layered-graph.js +396 -0
- package/dist/graph/layered-graph.js.map +1 -0
- package/dist/graph/layout.d.ts +80 -0
- package/dist/graph/layout.d.ts.map +1 -0
- package/dist/graph/layout.js +264 -0
- package/dist/graph/layout.js.map +1 -0
- package/dist/graph/marks.d.ts +24 -0
- package/dist/graph/marks.d.ts.map +1 -0
- package/dist/graph/marks.js +38 -0
- package/dist/graph/marks.js.map +1 -0
- package/dist/graph/nav.d.ts +14 -0
- package/dist/graph/nav.d.ts.map +1 -0
- package/dist/graph/nav.js +14 -0
- package/dist/graph/nav.js.map +1 -0
- package/dist/graph/pan-zoom.d.ts +80 -0
- package/dist/graph/pan-zoom.d.ts.map +1 -0
- package/dist/graph/pan-zoom.js +191 -0
- package/dist/graph/pan-zoom.js.map +1 -0
- package/dist/graph/paths.d.ts +9 -0
- package/dist/graph/paths.d.ts.map +1 -0
- package/dist/graph/paths.js +44 -0
- package/dist/graph/paths.js.map +1 -0
- package/dist/graph/place-card.d.ts +36 -0
- package/dist/graph/place-card.d.ts.map +1 -0
- package/dist/graph/place-card.js +68 -0
- package/dist/graph/place-card.js.map +1 -0
- package/dist/graph/strings.d.ts +50 -0
- package/dist/graph/strings.d.ts.map +1 -0
- package/dist/graph/strings.js +37 -0
- package/dist/graph/strings.js.map +1 -0
- package/dist/graph/styles.d.ts +2 -0
- package/dist/graph/styles.d.ts.map +1 -0
- package/dist/graph/styles.js +203 -0
- package/dist/graph/styles.js.map +1 -0
- package/dist/graph/types.d.ts +184 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +2 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/graph/view.d.ts +17 -0
- package/dist/graph/view.d.ts.map +1 -0
- package/dist/graph/view.js +21 -0
- package/dist/graph/view.js.map +1 -0
- package/dist/graph/views/dag.d.ts +10 -0
- package/dist/graph/views/dag.d.ts.map +1 -0
- package/dist/graph/views/dag.js +292 -0
- package/dist/graph/views/dag.js.map +1 -0
- package/dist/graph/views/foot.d.ts +8 -0
- package/dist/graph/views/foot.d.ts.map +1 -0
- package/dist/graph/views/foot.js +103 -0
- package/dist/graph/views/foot.js.map +1 -0
- package/dist/graph/views/node-table.d.ts +17 -0
- package/dist/graph/views/node-table.d.ts.map +1 -0
- package/dist/graph/views/node-table.js +80 -0
- package/dist/graph/views/node-table.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/json/index.d.ts +2 -0
- package/dist/json/index.d.ts.map +1 -0
- package/dist/json/index.js +3 -0
- package/dist/json/index.js.map +1 -0
- package/dist/json/json-tree.d.ts +21 -0
- package/dist/json/json-tree.d.ts.map +1 -0
- package/dist/json/json-tree.js +51 -0
- package/dist/json/json-tree.js.map +1 -0
- package/dist/lanes/index.d.ts +5 -0
- package/dist/lanes/index.d.ts.map +1 -0
- package/dist/lanes/index.js +7 -0
- package/dist/lanes/index.js.map +1 -0
- package/dist/lanes/lanes.d.ts +56 -0
- package/dist/lanes/lanes.d.ts.map +1 -0
- package/dist/lanes/lanes.js +160 -0
- package/dist/lanes/lanes.js.map +1 -0
- package/dist/lanes/stack.d.ts +26 -0
- package/dist/lanes/stack.d.ts.map +1 -0
- package/dist/lanes/stack.js +43 -0
- package/dist/lanes/stack.js.map +1 -0
- package/dist/lanes/styles.d.ts +2 -0
- package/dist/lanes/styles.d.ts.map +1 -0
- package/dist/lanes/styles.js +30 -0
- package/dist/lanes/styles.js.map +1 -0
- package/dist/lanes/types.d.ts +41 -0
- package/dist/lanes/types.d.ts.map +1 -0
- package/dist/lanes/types.js +6 -0
- package/dist/lanes/types.js.map +1 -0
- package/dist/markdown/cae-markdown.d.ts +37 -0
- package/dist/markdown/cae-markdown.d.ts.map +1 -0
- package/dist/markdown/cae-markdown.js +68 -0
- package/dist/markdown/cae-markdown.js.map +1 -0
- package/dist/markdown/highlight.d.ts +5 -0
- package/dist/markdown/highlight.d.ts.map +1 -0
- package/dist/markdown/highlight.js +86 -0
- package/dist/markdown/highlight.js.map +1 -0
- package/dist/markdown/index.d.ts +4 -0
- package/dist/markdown/index.d.ts.map +1 -0
- package/dist/markdown/index.js +6 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/markdown/markdown.d.ts +4 -0
- package/dist/markdown/markdown.d.ts.map +1 -0
- package/dist/markdown/markdown.js +105 -0
- package/dist/markdown/markdown.js.map +1 -0
- package/dist/matrix/grid-step.d.ts +8 -0
- package/dist/matrix/grid-step.d.ts.map +1 -0
- package/dist/matrix/grid-step.js +69 -0
- package/dist/matrix/grid-step.js.map +1 -0
- package/dist/matrix/index.d.ts +5 -0
- package/dist/matrix/index.d.ts.map +1 -0
- package/dist/matrix/index.js +7 -0
- package/dist/matrix/index.js.map +1 -0
- package/dist/matrix/mark-matrix.d.ts +97 -0
- package/dist/matrix/mark-matrix.d.ts.map +1 -0
- package/dist/matrix/mark-matrix.js +272 -0
- package/dist/matrix/mark-matrix.js.map +1 -0
- package/dist/matrix/styles.d.ts +4 -0
- package/dist/matrix/styles.d.ts.map +1 -0
- package/dist/matrix/styles.js +47 -0
- package/dist/matrix/styles.js.map +1 -0
- package/dist/matrix/types.d.ts +79 -0
- package/dist/matrix/types.d.ts.map +1 -0
- package/dist/matrix/types.js +5 -0
- package/dist/matrix/types.js.map +1 -0
- package/dist/primitives/fact-line.d.ts +14 -0
- package/dist/primitives/fact-line.d.ts.map +1 -0
- package/dist/primitives/fact-line.js +18 -0
- package/dist/primitives/fact-line.js.map +1 -0
- package/dist/primitives/icon.d.ts +14 -0
- package/dist/primitives/icon.d.ts.map +1 -0
- package/dist/primitives/icon.js +19 -0
- package/dist/primitives/icon.js.map +1 -0
- package/dist/primitives/index.d.ts +10 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +13 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/legend.d.ts +28 -0
- package/dist/primitives/legend.d.ts.map +1 -0
- package/dist/primitives/legend.js +28 -0
- package/dist/primitives/legend.js.map +1 -0
- package/dist/primitives/pill.d.ts +23 -0
- package/dist/primitives/pill.d.ts.map +1 -0
- package/dist/primitives/pill.js +40 -0
- package/dist/primitives/pill.js.map +1 -0
- package/dist/primitives/roving-focus.d.ts +47 -0
- package/dist/primitives/roving-focus.d.ts.map +1 -0
- package/dist/primitives/roving-focus.js +111 -0
- package/dist/primitives/roving-focus.js.map +1 -0
- package/dist/primitives/segmented.d.ts +41 -0
- package/dist/primitives/segmented.d.ts.map +1 -0
- package/dist/primitives/segmented.js +88 -0
- package/dist/primitives/segmented.js.map +1 -0
- package/dist/primitives/share-bar.d.ts +37 -0
- package/dist/primitives/share-bar.d.ts.map +1 -0
- package/dist/primitives/share-bar.js +69 -0
- package/dist/primitives/share-bar.js.map +1 -0
- package/dist/primitives/states.d.ts +19 -0
- package/dist/primitives/states.d.ts.map +1 -0
- package/dist/primitives/states.js +11 -0
- package/dist/primitives/states.js.map +1 -0
- package/dist/primitives/window.d.ts +24 -0
- package/dist/primitives/window.d.ts.map +1 -0
- package/dist/primitives/window.js +56 -0
- package/dist/primitives/window.js.map +1 -0
- package/dist/styles/chips.d.ts +2 -0
- package/dist/styles/chips.d.ts.map +1 -0
- package/dist/styles/chips.js +18 -0
- package/dist/styles/chips.js.map +1 -0
- package/dist/styles/facts.d.ts +2 -0
- package/dist/styles/facts.d.ts.map +1 -0
- package/dist/styles/facts.js +7 -0
- package/dist/styles/facts.js.map +1 -0
- package/dist/styles/index.d.ts +16 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/index.js +15 -0
- package/dist/styles/index.js.map +1 -0
- package/dist/styles/layout.d.ts +2 -0
- package/dist/styles/layout.d.ts.map +1 -0
- package/dist/styles/layout.js +33 -0
- package/dist/styles/layout.js.map +1 -0
- package/dist/styles/marks.d.ts +2 -0
- package/dist/styles/marks.d.ts.map +1 -0
- package/dist/styles/marks.js +30 -0
- package/dist/styles/marks.js.map +1 -0
- package/dist/styles/meter.d.ts +3 -0
- package/dist/styles/meter.d.ts.map +1 -0
- package/dist/styles/meter.js +9 -0
- package/dist/styles/meter.js.map +1 -0
- package/dist/styles/motion.d.ts +2 -0
- package/dist/styles/motion.d.ts.map +1 -0
- package/dist/styles/motion.js +27 -0
- package/dist/styles/motion.js.map +1 -0
- package/dist/styles/prose.d.ts +3 -0
- package/dist/styles/prose.d.ts.map +1 -0
- package/dist/styles/prose.js +59 -0
- package/dist/styles/prose.js.map +1 -0
- package/dist/styles/reset.d.ts +2 -0
- package/dist/styles/reset.d.ts.map +1 -0
- package/dist/styles/reset.js +13 -0
- package/dist/styles/reset.js.map +1 -0
- package/dist/styles/status.d.ts +2 -0
- package/dist/styles/status.d.ts.map +1 -0
- package/dist/styles/status.js +52 -0
- package/dist/styles/status.js.map +1 -0
- package/dist/styles/text.d.ts +2 -0
- package/dist/styles/text.d.ts.map +1 -0
- package/dist/styles/text.js +21 -0
- package/dist/styles/text.js.map +1 -0
- package/dist/styles/tokens.d.ts +8 -0
- package/dist/styles/tokens.d.ts.map +1 -0
- package/dist/styles/tokens.js +32 -0
- package/dist/styles/tokens.js.map +1 -0
- package/dist/table/data-table.d.ts +106 -0
- package/dist/table/data-table.d.ts.map +1 -0
- package/dist/table/data-table.js +408 -0
- package/dist/table/data-table.js.map +1 -0
- package/dist/table/index.d.ts +4 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/index.js +6 -0
- package/dist/table/index.js.map +1 -0
- package/dist/table/styles.d.ts +2 -0
- package/dist/table/styles.d.ts.map +1 -0
- package/dist/table/styles.js +32 -0
- package/dist/table/styles.js.map +1 -0
- package/dist/table/types.d.ts +48 -0
- package/dist/table/types.d.ts.map +1 -0
- package/dist/table/types.js +30 -0
- package/dist/table/types.js.map +1 -0
- package/dist/themes/boot.d.ts +7 -0
- package/dist/themes/boot.d.ts.map +1 -0
- package/dist/themes/boot.js +14 -0
- package/dist/themes/boot.js.map +1 -0
- package/dist/themes/choice.d.ts +16 -0
- package/dist/themes/choice.d.ts.map +1 -0
- package/dist/themes/choice.js +45 -0
- package/dist/themes/choice.js.map +1 -0
- package/dist/themes/data.d.ts +43 -0
- package/dist/themes/data.d.ts.map +1 -0
- package/dist/themes/data.js +408 -0
- package/dist/themes/data.js.map +1 -0
- package/dist/themes/index.d.ts +7 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +11 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/sheet.d.ts +16 -0
- package/dist/themes/sheet.d.ts.map +1 -0
- package/dist/themes/sheet.js +28 -0
- package/dist/themes/sheet.js.map +1 -0
- package/dist/themes/token-meanings.d.ts +3 -0
- package/dist/themes/token-meanings.d.ts.map +1 -0
- package/dist/themes/token-meanings.js +67 -0
- package/dist/themes/token-meanings.js.map +1 -0
- package/dist/themes/tokens-list.d.ts +14 -0
- package/dist/themes/tokens-list.d.ts.map +1 -0
- package/dist/themes/tokens-list.js +69 -0
- package/dist/themes/tokens-list.js.map +1 -0
- package/dist/tiles/index.d.ts +4 -0
- package/dist/tiles/index.d.ts.map +1 -0
- package/dist/tiles/index.js +6 -0
- package/dist/tiles/index.js.map +1 -0
- package/dist/tiles/stat-tiles.d.ts +40 -0
- package/dist/tiles/stat-tiles.d.ts.map +1 -0
- package/dist/tiles/stat-tiles.js +99 -0
- package/dist/tiles/stat-tiles.js.map +1 -0
- package/dist/tiles/styles.d.ts +2 -0
- package/dist/tiles/styles.d.ts.map +1 -0
- package/dist/tiles/styles.js +23 -0
- package/dist/tiles/styles.js.map +1 -0
- package/dist/tiles/types.d.ts +22 -0
- package/dist/tiles/types.d.ts.map +1 -0
- package/dist/tiles/types.js +2 -0
- package/dist/tiles/types.js.map +1 -0
- package/dist/transcript/follow-scroll.d.ts +21 -0
- package/dist/transcript/follow-scroll.d.ts.map +1 -0
- package/dist/transcript/follow-scroll.js +76 -0
- package/dist/transcript/follow-scroll.js.map +1 -0
- package/dist/transcript/index.d.ts +5 -0
- package/dist/transcript/index.d.ts.map +1 -0
- package/dist/transcript/index.js +7 -0
- package/dist/transcript/index.js.map +1 -0
- package/dist/transcript/styles.d.ts +2 -0
- package/dist/transcript/styles.d.ts.map +1 -0
- package/dist/transcript/styles.js +114 -0
- package/dist/transcript/styles.js.map +1 -0
- package/dist/transcript/tags.d.ts +6 -0
- package/dist/transcript/tags.d.ts.map +1 -0
- package/dist/transcript/tags.js +13 -0
- package/dist/transcript/tags.js.map +1 -0
- package/dist/transcript/tool-card.d.ts +16 -0
- package/dist/transcript/tool-card.d.ts.map +1 -0
- package/dist/transcript/tool-card.js +87 -0
- package/dist/transcript/tool-card.js.map +1 -0
- package/dist/transcript/transcript.d.ts +103 -0
- package/dist/transcript/transcript.d.ts.map +1 -0
- package/dist/transcript/transcript.js +397 -0
- package/dist/transcript/transcript.js.map +1 -0
- package/dist/transcript/types.d.ts +161 -0
- package/dist/transcript/types.d.ts.map +1 -0
- package/dist/transcript/types.js +25 -0
- package/dist/transcript/types.js.map +1 -0
- package/docs/charts.md +58 -0
- package/docs/check-table.md +40 -0
- package/docs/data-table.md +57 -0
- package/docs/examples/charts.ts +61 -0
- package/docs/examples/check-table.ts +19 -0
- package/docs/examples/ci-pipeline.ts +271 -0
- package/docs/examples/data-table.ts +39 -0
- package/docs/examples/graph.ts +57 -0
- package/docs/examples/lanes.ts +40 -0
- package/docs/examples/matrix.ts +56 -0
- package/docs/examples/page.css +34 -0
- package/docs/examples/segmented.ts +18 -0
- package/docs/examples/status.ts +30 -0
- package/docs/examples/theme.css +54 -0
- package/docs/examples/tiles.ts +27 -0
- package/docs/examples/transcript.ts +59 -0
- package/docs/graph.md +112 -0
- package/docs/lanes.md +48 -0
- package/docs/matrix.md +34 -0
- package/docs/page.md +87 -0
- package/docs/primitives.md +57 -0
- package/docs/strings.md +16 -0
- package/docs/theming.md +147 -0
- package/docs/tiles.md +40 -0
- package/docs/transcript.md +73 -0
- package/docs/tsconfig.json +20 -0
- package/package.json +161 -4
- package/src/charts/bar-chart.ts +74 -0
- package/src/charts/base.ts +188 -0
- package/src/charts/column-chart.ts +153 -0
- package/src/charts/heatmap.ts +129 -0
- package/src/charts/index.ts +10 -0
- package/src/charts/line-chart.ts +128 -0
- package/src/charts/scale.ts +61 -0
- package/src/charts/state-grid.ts +245 -0
- package/src/charts/types.ts +48 -0
- package/src/checks/check-table.ts +85 -0
- package/src/checks/index.ts +5 -0
- package/src/checks/styles.ts +31 -0
- package/src/checks/types.ts +48 -0
- package/src/core/clock.ts +46 -0
- package/src/core/define.ts +7 -0
- package/src/core/events.ts +89 -0
- package/src/core/format.ts +25 -0
- package/src/core/frame.ts +5 -0
- package/src/core/strings.ts +11 -0
- package/src/core/tone.ts +14 -0
- package/src/count/count.ts +54 -0
- package/src/count/elapsed.ts +33 -0
- package/src/count/index.ts +4 -0
- package/src/define/all.ts +13 -0
- package/src/define/charts.ts +17 -0
- package/src/define/check-table.ts +9 -0
- package/src/define/count.ts +11 -0
- package/src/define/data-table.ts +9 -0
- package/src/define/graph.ts +11 -0
- package/src/define/json-tree.ts +9 -0
- package/src/define/lanes.ts +9 -0
- package/src/define/markdown.ts +9 -0
- package/src/define/matrix.ts +9 -0
- package/src/define/segmented.ts +9 -0
- package/src/define/tiles.ts +11 -0
- package/src/define/transcript.ts +9 -0
- package/src/graph/arrange.ts +399 -0
- package/src/graph/card.ts +209 -0
- package/src/graph/host.ts +100 -0
- package/src/graph/icons.ts +23 -0
- package/src/graph/index.ts +16 -0
- package/src/graph/layered-graph.ts +417 -0
- package/src/graph/layout.ts +331 -0
- package/src/graph/marks.ts +42 -0
- package/src/graph/nav.ts +19 -0
- package/src/graph/pan-zoom.ts +219 -0
- package/src/graph/paths.ts +41 -0
- package/src/graph/place-card.ts +93 -0
- package/src/graph/strings.ts +86 -0
- package/src/graph/styles.ts +204 -0
- package/src/graph/types.ts +202 -0
- package/src/graph/view.ts +28 -0
- package/src/graph/views/dag.ts +294 -0
- package/src/graph/views/foot.ts +109 -0
- package/src/graph/views/node-table.ts +90 -0
- package/src/index.ts +25 -0
- package/src/json/index.ts +2 -0
- package/src/json/json-tree.ts +49 -0
- package/src/lanes/index.ts +6 -0
- package/src/lanes/lanes.ts +143 -0
- package/src/lanes/stack.ts +51 -0
- package/src/lanes/styles.ts +30 -0
- package/src/lanes/types.ts +51 -0
- package/src/markdown/cae-markdown.ts +64 -0
- package/src/markdown/highlight.ts +94 -0
- package/src/markdown/index.ts +5 -0
- package/src/markdown/markdown.ts +110 -0
- package/src/matrix/grid-step.ts +58 -0
- package/src/matrix/index.ts +6 -0
- package/src/matrix/mark-matrix.ts +285 -0
- package/src/matrix/styles.ts +48 -0
- package/src/matrix/types.ts +83 -0
- package/src/primitives/fact-line.ts +26 -0
- package/src/primitives/icon.ts +26 -0
- package/src/primitives/index.ts +12 -0
- package/src/primitives/legend.ts +56 -0
- package/src/primitives/pill.ts +58 -0
- package/src/primitives/roving-focus.ts +138 -0
- package/src/primitives/segmented.ts +92 -0
- package/src/primitives/share-bar.ts +94 -0
- package/src/primitives/states.ts +28 -0
- package/src/primitives/window.ts +65 -0
- package/src/styles/chips.ts +18 -0
- package/src/styles/facts.ts +7 -0
- package/src/styles/index.ts +19 -0
- package/src/styles/layout.ts +33 -0
- package/src/styles/marks.ts +30 -0
- package/src/styles/meter.ts +9 -0
- package/src/styles/motion.ts +27 -0
- package/src/styles/prose.ts +59 -0
- package/src/styles/reset.ts +13 -0
- package/src/styles/status.ts +52 -0
- package/src/styles/text.ts +21 -0
- package/src/styles/tokens.ts +35 -0
- package/src/table/data-table.ts +367 -0
- package/src/table/index.ts +5 -0
- package/src/table/styles.ts +32 -0
- package/src/table/types.ts +73 -0
- package/src/themes/boot.ts +14 -0
- package/src/themes/choice.ts +47 -0
- package/src/themes/data.ts +433 -0
- package/src/themes/index.ts +10 -0
- package/src/themes/sheet.ts +29 -0
- package/src/themes/token-meanings.ts +67 -0
- package/src/themes/tokens-list.ts +82 -0
- package/src/tiles/index.ts +5 -0
- package/src/tiles/stat-tiles.ts +92 -0
- package/src/tiles/styles.ts +23 -0
- package/src/tiles/types.ts +20 -0
- package/src/transcript/follow-scroll.ts +72 -0
- package/src/transcript/index.ts +6 -0
- package/src/transcript/styles.ts +114 -0
- package/src/transcript/tags.ts +18 -0
- package/src/transcript/tool-card.ts +103 -0
- package/src/transcript/transcript.ts +358 -0
- package/src/transcript/types.ts +167 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// A mark matrix: a hand-written week of nightly checks, a row per service, a column
|
|
2
|
+
// per check under a group per night. The host sorts the rows and keeps the selection.
|
|
3
|
+
import '@contraagent/elements/matrix/define';
|
|
4
|
+
import type { MarkMatrixInput, MatrixRowInput } from '@contraagent/elements/matrix';
|
|
5
|
+
import type { StateStyles } from '@contraagent/elements/primitives';
|
|
6
|
+
|
|
7
|
+
const states: StateStyles = {
|
|
8
|
+
pass: { label: 'pass', tone: 'done', shape: 'round', rank: 0 },
|
|
9
|
+
fail: { label: 'fail', tone: 'failed', shape: 'square', rank: 2 },
|
|
10
|
+
skip: { label: 'skip', tone: 'muted', shape: 'round', rank: 1 },
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const nights = ['Mon', 'Tue'];
|
|
14
|
+
const checks = ['lint', 'unit'];
|
|
15
|
+
const results: Record<string, string[]> = { api: ['pass', 'pass', 'pass', 'fail'], web: ['pass', 'skip', 'pass', 'pass'], worker: ['fail', 'fail', 'pass', 'pass'] };
|
|
16
|
+
|
|
17
|
+
const rows: MatrixRowInput[] = Object.entries(results).map(([service, rs]) => ({
|
|
18
|
+
id: service,
|
|
19
|
+
label: service,
|
|
20
|
+
value: rs.filter((r) => r === 'fail').length,
|
|
21
|
+
strong: rs.includes('fail'),
|
|
22
|
+
cells: rs.map((state, i) => {
|
|
23
|
+
const at = `${nights[Math.floor(i / 2)]} ${checks[i % 2]}`;
|
|
24
|
+
return { id: `${service}|${i}`, state, label: `${service} | ${at} | ${state}`, tip: `${service}, ${at}` };
|
|
25
|
+
}),
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
const byFailures = (rs: readonly MatrixRowInput[]) => [...rs].sort((a, b) => Number(b.value) - Number(a.value));
|
|
29
|
+
|
|
30
|
+
const matrix = (sort: string): MarkMatrixInput => ({
|
|
31
|
+
caption: 'Nightly checks',
|
|
32
|
+
label: 'Nightly checks by service',
|
|
33
|
+
facts: ['2 nights', '3 services'],
|
|
34
|
+
head: [
|
|
35
|
+
nights.map((n) => ({ id: n, label: n, span: 2, rows: 1, type: 'group' as const })),
|
|
36
|
+
nights.flatMap((n) => checks.map((c) => ({ id: `${n}|${c}`, label: c, span: 1, rows: 1, type: 'column' as const }))),
|
|
37
|
+
],
|
|
38
|
+
columns: nights.flatMap((n) => checks.map((c) => ({ id: `${n}|${c}`, groups: [n] }))),
|
|
39
|
+
rows: sort === 'failures' ? byFailures(rows) : rows,
|
|
40
|
+
value: { label: 'Failures' },
|
|
41
|
+
sorts: [
|
|
42
|
+
{ id: 'name', label: 'Name' },
|
|
43
|
+
{ id: 'failures', label: 'Failures' },
|
|
44
|
+
],
|
|
45
|
+
sort,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function mount(host: HTMLElement): void {
|
|
49
|
+
const el = document.createElement('cae-mark-matrix');
|
|
50
|
+
el.matrix = matrix('name');
|
|
51
|
+
el.states = states;
|
|
52
|
+
el.strings = { rowsHeader: 'Service' };
|
|
53
|
+
el.addEventListener('cae-sort', (e) => (el.matrix = matrix(e.detail.id)));
|
|
54
|
+
el.addEventListener('cae-select', (e) => (el.selected = e.detail.id));
|
|
55
|
+
host.replaceChildren(el);
|
|
56
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* A page of your own in its elements' theme. With <html data-ca-theme="nord">
|
|
2
|
+
and the themes' rules in the document (adoptThemes(document)), the page's own
|
|
3
|
+
CSS reads the same --ca-* properties as the elements. */
|
|
4
|
+
body {
|
|
5
|
+
margin: 0;
|
|
6
|
+
color-scheme: var(--ca-color-scheme);
|
|
7
|
+
background: var(--ca-bg);
|
|
8
|
+
color: var(--ca-text);
|
|
9
|
+
font: 13px/1.5 system-ui, sans-serif;
|
|
10
|
+
}
|
|
11
|
+
.card {
|
|
12
|
+
background: var(--ca-card);
|
|
13
|
+
border: 1px solid var(--ca-line);
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
padding: 16px;
|
|
16
|
+
}
|
|
17
|
+
.caption {
|
|
18
|
+
color: var(--ca-text-secondary);
|
|
19
|
+
}
|
|
20
|
+
.unit {
|
|
21
|
+
color: var(--ca-text-muted);
|
|
22
|
+
}
|
|
23
|
+
a {
|
|
24
|
+
color: var(--ca-accent);
|
|
25
|
+
}
|
|
26
|
+
:focus-visible {
|
|
27
|
+
outline: var(--ca-focus-width) solid var(--ca-focus);
|
|
28
|
+
}
|
|
29
|
+
/* A property with one default for every theme (a tint, a type size) has its
|
|
30
|
+
value only inside the elements: compute it the way the elements do. */
|
|
31
|
+
.failed-badge {
|
|
32
|
+
color: var(--ca-status-failed);
|
|
33
|
+
background: color-mix(in srgb, var(--ca-status-failed) var(--ca-tint), transparent);
|
|
34
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// A segmented control: one choice among a few. The host holds the value and
|
|
2
|
+
// answers `cae-change`; the words are the host's.
|
|
3
|
+
import '@contraagent/elements/segmented/define';
|
|
4
|
+
|
|
5
|
+
export function mount(host: HTMLElement): void {
|
|
6
|
+
const control = document.createElement('cae-segmented');
|
|
7
|
+
control.label = 'Period';
|
|
8
|
+
control.options = [
|
|
9
|
+
{ value: 'day', label: 'Day' },
|
|
10
|
+
{ value: 'week', label: 'Week' },
|
|
11
|
+
{ value: 'month', label: 'Month', title: 'The last 30 days' },
|
|
12
|
+
];
|
|
13
|
+
control.value = 'week';
|
|
14
|
+
const shown = document.createElement('p');
|
|
15
|
+
shown.textContent = `Showing: ${control.value}`;
|
|
16
|
+
control.addEventListener('cae-change', (e) => (shown.textContent = `Showing: ${e.detail.value}`));
|
|
17
|
+
host.replaceChildren(control, shown);
|
|
18
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Statuses, a legend and a row of facts, drawn by the primitives into an element
|
|
2
|
+
// of your own: its styles start from `base` (the tokens and the status rules),
|
|
3
|
+
// plus `legendStyles` for the legend.
|
|
4
|
+
import { base, factLine, legend, legendStyles, pill, statusWord } from '@contraagent/elements';
|
|
5
|
+
import { LitElement, html } from 'lit';
|
|
6
|
+
|
|
7
|
+
class BuildSummary extends LitElement {
|
|
8
|
+
static override styles = [base, legendStyles];
|
|
9
|
+
|
|
10
|
+
override render() {
|
|
11
|
+
return html`<p>
|
|
12
|
+
${pill({ text: 'passed', tone: 'done' })} ${pill({ text: 'failed', tone: 'failed', title: 'exit code 2' })}
|
|
13
|
+
${pill({ text: 'running', tone: 'running' })} ${statusWord({ text: 'queued', tone: 'attention' })}
|
|
14
|
+
</p>
|
|
15
|
+
<p class="meta words">${factLine(['12 jobs', { text: '1 failed', tone: 'failed' }, '4m 05s'])}</p>
|
|
16
|
+
${legend(
|
|
17
|
+
[
|
|
18
|
+
{ label: 'passed', tone: 'done', shape: 'round' },
|
|
19
|
+
{ label: 'failed', tone: 'failed', shape: 'square' },
|
|
20
|
+
{ label: 'queued', tone: 'attention', shape: 'ring' },
|
|
21
|
+
],
|
|
22
|
+
{ label: 'Job states' },
|
|
23
|
+
)}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function mount(host: HTMLElement): void {
|
|
28
|
+
if (!customElements.get('build-summary')) customElements.define('build-summary', BuildSummary);
|
|
29
|
+
host.replaceChildren(document.createElement('build-summary'));
|
|
30
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* A theme of your own: Solarized Light (https://ethanschoonover.com/solarized/,
|
|
2
|
+
MIT, (c) Ethan Schoonover), built the way the built-in themes are.
|
|
3
|
+
Every colour is a --ca-* property, inherited through the elements' shadow
|
|
4
|
+
roots; one set here overrides the built-in theme's value, token by token.
|
|
5
|
+
|
|
6
|
+
Surfaces and text come from the palette's base tones, the accent is its blue,
|
|
7
|
+
the statuses its red, yellow, green and cyan, the code colours its syntax
|
|
8
|
+
colours. Solarized's accents are mid-tones: where one reads under 4.5:1 on
|
|
9
|
+
these surfaces, it is darkened in lightness only, with its hue kept. */
|
|
10
|
+
.solarized-light {
|
|
11
|
+
--ca-color-scheme: light;
|
|
12
|
+
/* surfaces and text: base3, base2 and base02 to base01 */
|
|
13
|
+
--ca-backdrop: #eee8d5;
|
|
14
|
+
--ca-bg: #eee8d5;
|
|
15
|
+
--ca-card: #fdf6e3;
|
|
16
|
+
--ca-panel: #fdf6e3;
|
|
17
|
+
--ca-panel2: #fdf6e3;
|
|
18
|
+
--ca-raise: #eee8d5;
|
|
19
|
+
--ca-well: #f5efdc;
|
|
20
|
+
--ca-track: #e4ddc8;
|
|
21
|
+
--ca-line: #e4ddc8;
|
|
22
|
+
--ca-line2: #93a1a1;
|
|
23
|
+
--ca-shadow: #586e7533;
|
|
24
|
+
--ca-text: #073642;
|
|
25
|
+
--ca-text-secondary: #365059;
|
|
26
|
+
--ca-text-muted: #4b6068;
|
|
27
|
+
/* interaction: blue */
|
|
28
|
+
--ca-accent: #02629b;
|
|
29
|
+
--ca-focus: #268bd2;
|
|
30
|
+
--ca-selection: #268bd233;
|
|
31
|
+
/* status: red, yellow, green, cyan, base01 */
|
|
32
|
+
--ca-status-failed: #bd0112;
|
|
33
|
+
--ca-status-attention: #7a5b01;
|
|
34
|
+
--ca-status-done: #586604;
|
|
35
|
+
--ca-status-running: #046b64;
|
|
36
|
+
--ca-status-muted: #4e646c;
|
|
37
|
+
--ca-tint: 10%;
|
|
38
|
+
/* identity: violet, and the token bars */
|
|
39
|
+
--ca-agent: #5a5eaf;
|
|
40
|
+
--ca-meter: #93a1a1;
|
|
41
|
+
--ca-tok-input: #268bd2;
|
|
42
|
+
--ca-tok-cache-read: #e4ddc8;
|
|
43
|
+
--ca-tok-cache-write: #93a1a1;
|
|
44
|
+
--ca-tok-output: #6c71c4;
|
|
45
|
+
/* code */
|
|
46
|
+
--ca-code-keyword: #657402;
|
|
47
|
+
--ca-code-string: #077a73;
|
|
48
|
+
--ca-code-number: #c82979;
|
|
49
|
+
--ca-code-constant: #c14204;
|
|
50
|
+
--ca-code-comment: #626f6f;
|
|
51
|
+
--ca-code-function: #0071b3;
|
|
52
|
+
--ca-code-type: #896705;
|
|
53
|
+
--ca-code-name: #0071b3;
|
|
54
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Stat tiles: hand-written figures, one with a tone and a link. The host holds
|
|
2
|
+
// the figures and answers `cae-action`.
|
|
3
|
+
import '@contraagent/elements/tiles/define';
|
|
4
|
+
import type { StatTile } from '@contraagent/elements/tiles';
|
|
5
|
+
|
|
6
|
+
const tiles: StatTile[] = [
|
|
7
|
+
{ id: 'jobs', label: 'Jobs', value: 24, sub: [[{ text: '22 passed' }, { text: '2 failed', tone: 'failed' }]] },
|
|
8
|
+
{
|
|
9
|
+
id: 'failed',
|
|
10
|
+
label: 'Failed jobs',
|
|
11
|
+
value: 2,
|
|
12
|
+
tone: 'failed',
|
|
13
|
+
sub: [['Unit tests', 'Lint']],
|
|
14
|
+
action: { id: 'list', label: 'Failed jobs in the log' },
|
|
15
|
+
},
|
|
16
|
+
{ id: 'time', label: 'Build time', value: '14m 05s', sub: [['Longest: Unit tests']], tip: 'Sum over all jobs' },
|
|
17
|
+
{ id: 'queued', label: 'Queued', value: 0, sub: [['No jobs waiting']] },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export function mount(host: HTMLElement): void {
|
|
21
|
+
const grid = document.createElement('cae-stat-tiles');
|
|
22
|
+
grid.columns = 4;
|
|
23
|
+
grid.tiles = tiles;
|
|
24
|
+
const shown = document.createElement('p');
|
|
25
|
+
grid.addEventListener('cae-action', (e) => (shown.textContent = `Action: ${e.detail.action} of ${e.detail.id}`));
|
|
26
|
+
host.replaceChildren(grid, shown);
|
|
27
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// A conversation with a support bot in two sessions: the first ended with a
|
|
2
|
+
// failed lookup, the second answered. The host holds the sections and decides
|
|
3
|
+
// what a reader's pick means: here the picked session is simply shown.
|
|
4
|
+
import '@contraagent/elements/transcript/define';
|
|
5
|
+
import { md } from '@contraagent/elements/markdown';
|
|
6
|
+
import type { TranscriptSection } from '@contraagent/elements/transcript';
|
|
7
|
+
|
|
8
|
+
const sections: TranscriptSection[] = [
|
|
9
|
+
{
|
|
10
|
+
id: 's1',
|
|
11
|
+
title: 'Session 1',
|
|
12
|
+
verdict: { tone: 'failed', text: 'failed', tip: 'The order service did not answer' },
|
|
13
|
+
tags: [
|
|
14
|
+
{ label: 'bot', value: 'helpdesk' },
|
|
15
|
+
{ label: 'model', value: 'small-2', look: 'mono' },
|
|
16
|
+
],
|
|
17
|
+
items: [
|
|
18
|
+
{ type: 'prompt', id: 'p1', text: 'Where is order 1042?' },
|
|
19
|
+
{ type: 'reasoning', id: 'r1', text: 'Look the order up first, then answer with its **status**.' },
|
|
20
|
+
{ type: 'tool', id: 't1', name: 'orders.get', icon: 'read', summary: 'order 1042', output: 'timeout after 30s', status: 'error' },
|
|
21
|
+
],
|
|
22
|
+
footer: { tone: 'failed', title: 'The order service did not answer' },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 's2',
|
|
26
|
+
title: 'Session 2',
|
|
27
|
+
facts: ['small-2'],
|
|
28
|
+
verdict: { tone: 'done', text: 'answered' },
|
|
29
|
+
items: [
|
|
30
|
+
{ type: 'event', id: 'e1', icon: '↻', title: 'Request sent again', text: 'after a timeout' },
|
|
31
|
+
{
|
|
32
|
+
type: 'tool',
|
|
33
|
+
id: 't2',
|
|
34
|
+
name: 'web_search',
|
|
35
|
+
icon: 'search',
|
|
36
|
+
summary: 'carrier tracking 1042',
|
|
37
|
+
query: 'carrier tracking 1042',
|
|
38
|
+
links: [
|
|
39
|
+
{ title: 'Track a parcel', url: 'https://example.com/track' },
|
|
40
|
+
{ title: 'Delivery times', url: 'https://example.org/delivery' },
|
|
41
|
+
],
|
|
42
|
+
output: 'Track a parcel https://example.com/track\nDelivery times https://example.org/delivery',
|
|
43
|
+
status: 'ok',
|
|
44
|
+
},
|
|
45
|
+
{ type: 'notice', id: 'n1', text: 'cache hit: orders/1042' },
|
|
46
|
+
{ type: 'message', id: 'm1', text: 'Order **1042** left the warehouse on Monday and arrives on *Thursday*.' },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
export function mount(host: HTMLElement): void {
|
|
52
|
+
const t = document.createElement('cae-transcript');
|
|
53
|
+
t.sections = sections;
|
|
54
|
+
t.markdown = md;
|
|
55
|
+
t.strings = { sections: 'Sessions', sectionsTip: 'One session per conversation with the bot' };
|
|
56
|
+
t.style.height = '420px';
|
|
57
|
+
t.addEventListener('cae-section-change', (e) => (t.shown = e.detail.index));
|
|
58
|
+
host.replaceChildren(t);
|
|
59
|
+
}
|
package/docs/graph.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Layered graph
|
|
2
|
+
|
|
3
|
+
`<cae-layered-graph>` draws nodes in layers, joined by edges, inside clusters: a
|
|
4
|
+
pipeline, a build, any flow of steps. Each node holds a group of marks, one per
|
|
5
|
+
series id, at the same place in every node, so one series can be followed across
|
|
6
|
+
the graph. Register it with `@contraagent/elements/graph/define` (it registers
|
|
7
|
+
`<cae-mark-matrix>` and `<cae-segmented>` too); the types, `arrange` and
|
|
8
|
+
`layoutGraph` are in `@contraagent/elements/graph`.
|
|
9
|
+
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
<!-- not on the site -->
|
|
13
|
+
Live on this topic's page of the documentation site (`pnpm run docs` in `web/`).
|
|
14
|
+
|
|
15
|
+
::code{file="examples/graph.ts"}
|
|
16
|
+
|
|
17
|
+
## The model
|
|
18
|
+
|
|
19
|
+
A `GraphInput` names the series, the nodes, the clusters, the edges and the stubs
|
|
20
|
+
(edges from outside the graph). A state is any id: `states` (`StateStyles`) gives
|
|
21
|
+
each its word, its tone and its shape, and its key order is the legend's.
|
|
22
|
+
|
|
23
|
+
A mark is in a series when the same item has a mark in several nodes: a service
|
|
24
|
+
built, tested and deployed is a series, and its marks line up across the steps.
|
|
25
|
+
A mark of one node only (a job of one CI step) is in that node's `loose`.
|
|
26
|
+
|
|
27
|
+
A node's `counts` (the bar of a node with many marks) and `progress` (the count
|
|
28
|
+
in its header, "2/3") default to what its marks say: its marks by state, and its
|
|
29
|
+
marks whose state has the tone `done` of all its marks, in the words of
|
|
30
|
+
`strings.progress`. Give them when a node stands for more items than it has marks.
|
|
31
|
+
|
|
32
|
+
::code{file="../src/graph/types.ts" from="export interface GraphNodeInput {" to="/** A node as the graph draws it"}
|
|
33
|
+
|
|
34
|
+
A cluster is a box of nodes (and of other clusters). A cluster that `cycle`s draws
|
|
35
|
+
a return from its last layer to its first; an edge with `ranks: false` closes that
|
|
36
|
+
cycle: it never sets the layers and is not drawn. An edge may join items in
|
|
37
|
+
different clusters, at any depth: it leaves and enters each box on its way.
|
|
38
|
+
|
|
39
|
+
An item the host can draw open or closed carries `toggle`: a node with `toggle:
|
|
40
|
+
'closed'` draws a control in its header (`strings.open`, "Show inside") and a
|
|
41
|
+
cluster with `toggle: 'open'` one in its corner (`strings.close`); either sends
|
|
42
|
+
`cae-toggle` with the item's id and whether it is to be open, and the host draws
|
|
43
|
+
the graph again. A cluster named by a `path` of parts shows them as "a › b › c":
|
|
44
|
+
the first part is its name, and each later part sends `cae-drill` with that part's
|
|
45
|
+
id. `focusToggle(id)` puts the focus on an item's control once it is drawn again.
|
|
46
|
+
|
|
47
|
+
`key` is the graph's identity. A new `key` is a new graph: the frame shows all of
|
|
48
|
+
it again, and the focused mark of each node is forgotten. Keep the `key` while the
|
|
49
|
+
same graph changes (a run in progress), so the reader's zoom and pan stay.
|
|
50
|
+
|
|
51
|
+
## Order and drawing
|
|
52
|
+
|
|
53
|
+
`arrange` gives each item its layer by the longest path to it, orders each layer to
|
|
54
|
+
reduce crossings, and gives each edge its edge path: a point on every layer it crosses.
|
|
55
|
+
The order depends on the structure only. Give the element the `order` of an earlier
|
|
56
|
+
drawing of the same graph to keep its items in place: an item that appears later is
|
|
57
|
+
added at the end of its layer. `layoutGraph` places everything from the measured
|
|
58
|
+
sizes; the element measures its nodes itself. Below 640 px of width, `direction:
|
|
59
|
+
'auto'` draws top to bottom. `extentOf(arrangement)` gives a drawing's shape before
|
|
60
|
+
it is measured: the layers it spans along the flow and the items it stacks across
|
|
61
|
+
it at most, a cluster counted as what it holds; a host can choose the direction,
|
|
62
|
+
or how much to draw, from it.
|
|
63
|
+
|
|
64
|
+
## Size
|
|
65
|
+
|
|
66
|
+
The element is as wide as its container. Without a height, the frame is as tall
|
|
67
|
+
as the whole drawing at that width (never scaled up), up to 70% of the window's
|
|
68
|
+
height or 360 px, whichever is more; top to bottom, as tall as the drawing. With a
|
|
69
|
+
height set on the element (or given by a flex or grid container), the `crumbs`
|
|
70
|
+
slot and the row under the frame keep their height, and the frame takes the rest,
|
|
71
|
+
with the whole drawing fitted and centred in it.
|
|
72
|
+
|
|
73
|
+
## Selection and events
|
|
74
|
+
|
|
75
|
+
A click selects a mark, a node or a cluster and sends `cae-select`; the element
|
|
76
|
+
does not select by itself: the host sets `selected`. Enter or a double click sends
|
|
77
|
+
`cae-activate`, or `cae-drill` for an item with `drill` (an inner view). "Graph |
|
|
78
|
+
Table" sends `cae-view-change`: the table is a row per node with the nodes it is
|
|
79
|
+
joined to. With `matrix`, the frame shows a [mark matrix](matrix.md) as the table.
|
|
80
|
+
|
|
81
|
+
The card of the selected item is the host's content in the `inspector` slot,
|
|
82
|
+
beside the item in the frame; its first heading and its `[data-status]` element
|
|
83
|
+
name the item to a screen reader. With nothing in the slot when the element
|
|
84
|
+
draws (a new `selected` draws it), there is no card: a page that shows the
|
|
85
|
+
selection elsewhere leaves the slot empty.
|
|
86
|
+
|
|
87
|
+
Hovering, focusing or selecting a mark highlights its series; `related` names more
|
|
88
|
+
marks to light (a mark's id, or a series id, to the ids of the marks it lights).
|
|
89
|
+
|
|
90
|
+
The line under the legend holds the key hints. It keeps its height at all times,
|
|
91
|
+
and shows its words while the graph has the focus. On a screen with touch alone
|
|
92
|
+
(no fine pointer) there is no line; `::part(keys) { display: none; }` removes it
|
|
93
|
+
everywhere.
|
|
94
|
+
|
|
95
|
+
## Look
|
|
96
|
+
|
|
97
|
+
The words are `strings` ([Strings](strings.md)). `renderIcon` draws the icons a
|
|
98
|
+
node names (`icons`), and `iconStyles` adds styles for them. A mark has the state's
|
|
99
|
+
look as `data-tone` and `data-shape`. The parts, for `::part()`:
|
|
100
|
+
|
|
101
|
+
| Part | What it is |
|
|
102
|
+
|---|---|
|
|
103
|
+
| `frame` | the frame every view is drawn in |
|
|
104
|
+
| `stage` | what pans and zooms |
|
|
105
|
+
| `node`, `node-header`, `node-name` | each node, its first line, its name |
|
|
106
|
+
| `mark` | each mark |
|
|
107
|
+
| `cluster`, `cluster-label` | each cluster, its header |
|
|
108
|
+
| `edge`, `stub` | each edge, each stub |
|
|
109
|
+
| `legend` | the legend |
|
|
110
|
+
| `keys` | the line of key hints |
|
|
111
|
+
| `inspector` | the selected item's card |
|
|
112
|
+
| `table`, `row` | the node table, each of its rows |
|
package/docs/lanes.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Lanes
|
|
2
|
+
|
|
3
|
+
`<cae-lanes>` shows bars on a time axis, a lane per group: each bar as long as
|
|
4
|
+
the thing it stands for took. Register it with
|
|
5
|
+
`@contraagent/elements/lanes/define`; the types and the placement functions are
|
|
6
|
+
in `@contraagent/elements/lanes`.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
<!-- not on the site -->
|
|
11
|
+
Live on this topic's page of the documentation site (`pnpm run docs` in `web/`).
|
|
12
|
+
|
|
13
|
+
::code{file="examples/lanes.ts"}
|
|
14
|
+
|
|
15
|
+
## Lanes and bars
|
|
16
|
+
|
|
17
|
+
A lane is a `Lane`, a bar a `LaneBar`: a start and an end in epoch
|
|
18
|
+
milliseconds, the key of its look and its tooltip. A bar with no end is
|
|
19
|
+
running: it grows until now, and a line marks now. Set `live` while a bar runs,
|
|
20
|
+
so the element draws again every second.
|
|
21
|
+
|
|
22
|
+
::code{file="../src/lanes/types.ts" from="/** Something that took time" to="/** A row of bars"}
|
|
23
|
+
|
|
24
|
+
The overlapping bars of a lane are stacked, each on the first row whose last
|
|
25
|
+
bar has ended (`stack`), so no bar hides another. The bars grow in when they
|
|
26
|
+
are first drawn.
|
|
27
|
+
|
|
28
|
+
## Looks and the legend
|
|
29
|
+
|
|
30
|
+
`barStyles` maps each key to a `LaneStyle`: a label, a colour, and a pattern
|
|
31
|
+
(`solid`, `hatched`, `striped`, which moves on a bar, or `outline`). Give a
|
|
32
|
+
status a pattern besides its colour, so it does not depend on colour alone. The
|
|
33
|
+
labels are the legend, a row per `group`, in key order; `omitted` adds a note
|
|
34
|
+
of the bars the host left out (`strings.omitted`).
|
|
35
|
+
|
|
36
|
+
## The axis
|
|
37
|
+
|
|
38
|
+
By default the axis fits the bars (`fitRange`): from the first start to the
|
|
39
|
+
last end; with a running bar, to now plus 20 seconds, rounded up to the minute.
|
|
40
|
+
Set `range` to fix it. The axis shows five times, with seconds when it spans
|
|
41
|
+
less than 10 minutes, in `locale` (by default the page's `lang`).
|
|
42
|
+
|
|
43
|
+
## Look
|
|
44
|
+
|
|
45
|
+
`--cae-lanes-label-width` sets the width of the lanes' labels (112px, 78px when
|
|
46
|
+
the element is narrower than 760 px). The parts are `axis`, `lane`, `lane-label`, `track`, `bar`,
|
|
47
|
+
`now`, `legend` and `empty`; with no bars the element shows `strings.empty`, or
|
|
48
|
+
the `empty` slot.
|
package/docs/matrix.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Mark matrix
|
|
2
|
+
|
|
3
|
+
`<cae-mark-matrix>` shows marks in a table: a row per series (its label, then a
|
|
4
|
+
value), a column per item, the columns under nested groups. Register it with
|
|
5
|
+
`@contraagent/elements/matrix/define`; the types are in
|
|
6
|
+
`@contraagent/elements/matrix`.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
<!-- not on the site -->
|
|
11
|
+
Live on this topic's page of the documentation site (`pnpm run docs` in `web/`).
|
|
12
|
+
|
|
13
|
+
::code{file="examples/matrix.ts"}
|
|
14
|
+
|
|
15
|
+
## The model
|
|
16
|
+
|
|
17
|
+
A `MarkMatrixInput` holds the header rows (outermost first), the columns, the rows
|
|
18
|
+
and the line above the table. A column names the groups it is under: a border marks
|
|
19
|
+
where a group starts. A mark is drawn in its state's look (`states`, as in the
|
|
20
|
+
[layered graph](graph.md)).
|
|
21
|
+
|
|
22
|
+
::code{file="../src/matrix/types.ts" from="export interface MatrixRowInput {" to="export interface MarkMatrixStrings {"}
|
|
23
|
+
|
|
24
|
+
## Keyboard and events
|
|
25
|
+
|
|
26
|
+
The marks are one tab stop. The arrow keys, Home, End, Page Up and Page Down move
|
|
27
|
+
between them (Ctrl with Home and End: the first and the last row). A click or the
|
|
28
|
+
focus sends `cae-select`; Enter or a double click sends `cae-activate`, or
|
|
29
|
+
`cae-drill` for a mark with `drill`. The sort control sends `cae-sort`: the host
|
|
30
|
+
sorts the rows and sets `sort`. Above `windowAt` rows (150), only the rows in view
|
|
31
|
+
are drawn.
|
|
32
|
+
|
|
33
|
+
The words are `strings` ([Strings](strings.md)): the sort control's label and the
|
|
34
|
+
header of the rows' labels.
|
package/docs/page.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Building a page
|
|
2
|
+
|
|
3
|
+
A page made of several elements: one run of a made-up CI pipeline, with a theme
|
|
4
|
+
switch, stat tiles, a sortable table of jobs, and a layered graph of the steps
|
|
5
|
+
beside a detail panel of the page's own. The whole example is
|
|
6
|
+
`docs/examples/ci-pipeline.ts`; it uses only the package's public entry points,
|
|
7
|
+
and `mount(host)` builds the page in any element.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
<!-- not on the site -->
|
|
12
|
+
Live on this topic's page of the documentation site (`pnpm run docs` in `web/`).
|
|
13
|
+
|
|
14
|
+
## What the page holds
|
|
15
|
+
|
|
16
|
+
The elements keep no state of their own that the page needs: each one draws
|
|
17
|
+
what its properties give it and sends a `cae-*` event for what the reader did.
|
|
18
|
+
The page holds the data, the theme, the selection and the order of the table,
|
|
19
|
+
and sets them back on the elements.
|
|
20
|
+
|
|
21
|
+
| The reader | The element sends | The page sets |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| picks a theme | `cae-change` from `<cae-segmented>` | `data-ca-theme` on the page's box, and the control's `value` |
|
|
24
|
+
| sorts a column | `cae-sort` from `<cae-data-table>` | the table's `sort`, and its `rows` in that order (`sortRows`) |
|
|
25
|
+
| opens a row | `cae-activate` from `<cae-data-table>` | the graph's `selected`, and the panel |
|
|
26
|
+
| selects a mark, a node or the loop | `cae-select` from `<cae-layered-graph>` | the graph's `selected`, and the panel |
|
|
27
|
+
|
|
28
|
+
## Registering and theming
|
|
29
|
+
|
|
30
|
+
Each `define` entry registers its elements; `adoptThemes(document)` adds the
|
|
31
|
+
themes' rules once, and `data-ca-theme` on any ancestor then picks a theme
|
|
32
|
+
([Theming](theming.md)).
|
|
33
|
+
|
|
34
|
+
::code{file="examples/ci-pipeline.ts" from="import '@contraagent/elements/segmented/define'" to="// ---- The data"}
|
|
35
|
+
|
|
36
|
+
## Widths
|
|
37
|
+
|
|
38
|
+
Each element is as wide as its container and lays itself out by its own width,
|
|
39
|
+
not the window's: its host is a CSS container (`container-type: inline-size`),
|
|
40
|
+
so the same element fits a sidebar, a column or a whole page. Its width does
|
|
41
|
+
not come from its content: in a flex row, give it a width or `flex: 1`. A table
|
|
42
|
+
wider than its element scrolls inside its own box. This page's two columns
|
|
43
|
+
become one below 760 px of the page's own width (`@container` in its stylesheet).
|
|
44
|
+
|
|
45
|
+
## The data
|
|
46
|
+
|
|
47
|
+
A step is a node of the graph and a job is one run of it, or of one of its
|
|
48
|
+
shards. The steps `e2e` and `triage` repeat in a retry loop.
|
|
49
|
+
|
|
50
|
+
::code{file="examples/ci-pipeline.ts" from="// ---- The data" to="// ---- What each state"}
|
|
51
|
+
|
|
52
|
+
## States
|
|
53
|
+
|
|
54
|
+
A state is the page's own word: `StateStyles` gives each one a tone, a shape
|
|
55
|
+
and a rank, and the legend follows its key order.
|
|
56
|
+
|
|
57
|
+
::code{file="examples/ci-pipeline.ts" from="// ---- What each state" to="// ---- The graph"}
|
|
58
|
+
|
|
59
|
+
## The graph
|
|
60
|
+
|
|
61
|
+
The shards are the graph's `series`, so shard 2 is at the same place in every
|
|
62
|
+
node that has shards; a step that runs once has one mark in `loose`. Each mark
|
|
63
|
+
shows the last pass of its job, and the number of passes as its `badge`. The
|
|
64
|
+
loop is a cluster that `cycle`s, closed by an edge with `ranks: false`. A
|
|
65
|
+
node's `counts` and `progress` follow from its marks. The page puts nothing in
|
|
66
|
+
the graph's `inspector` slot, so the graph draws no card beside the selection:
|
|
67
|
+
the panel beside the graph describes it.
|
|
68
|
+
|
|
69
|
+
::code{file="examples/ci-pipeline.ts" from="// ---- The graph" to="// ---- The table"}
|
|
70
|
+
|
|
71
|
+
## The table and the tiles
|
|
72
|
+
|
|
73
|
+
A column with `compare` sorts by it; a column with `sortable` and no `compare`
|
|
74
|
+
sorts by its cell, a string or a number.
|
|
75
|
+
|
|
76
|
+
::code{file="examples/ci-pipeline.ts" from="// ---- The table" to="// ---- The page's own styles"}
|
|
77
|
+
|
|
78
|
+
## The page's styles
|
|
79
|
+
|
|
80
|
+
The page's own text and boxes take the theme's colours (`--ca-*`), so they
|
|
81
|
+
change with the switch.
|
|
82
|
+
|
|
83
|
+
::code{file="examples/ci-pipeline.ts" from="// ---- The page's own styles" to="// ---- The page: build it"}
|
|
84
|
+
|
|
85
|
+
## The page
|
|
86
|
+
|
|
87
|
+
::code{file="examples/ci-pipeline.ts" from="// ---- The page: build it"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Primitives
|
|
2
|
+
|
|
3
|
+
The parts every element is built from, in `@contraagent/elements/primitives`.
|
|
4
|
+
Most are template functions that a Lit element calls in its `render()`; their
|
|
5
|
+
look comes from the element's styles, which start from `base`
|
|
6
|
+
(`@contraagent/elements/styles`: the tokens, the status rules, chips, layout
|
|
7
|
+
and motion).
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## Tones
|
|
12
|
+
|
|
13
|
+
A tone is the status colour a value takes: `failed`, `attention`, `done`,
|
|
14
|
+
`running`, `muted`, or `neutral` (the text colour). The names are the token
|
|
15
|
+
names (`--ca-status-<tone>`, [Theming](theming.md)). An element shows a tone as
|
|
16
|
+
`data-tone`, and `neutral` as no attribute (`toneAttr`).
|
|
17
|
+
|
|
18
|
+
::code{file="../src/core/tone.ts" from="/** A status colour" to="export const TONES"}
|
|
19
|
+
|
|
20
|
+
## Statuses, legends and facts
|
|
21
|
+
|
|
22
|
+
`pill` draws a status as a pill, `statusWord` as a word in a row, and
|
|
23
|
+
`statusChip` in a class the element styles. Each sets `data-tone` and, where a
|
|
24
|
+
mark belongs, `data-mark` (✓ done, ✕ failed, ◌ pending): the mark is drawn by
|
|
25
|
+
CSS and hidden from screen readers, which read the word. A pill also has the
|
|
26
|
+
parts `pill` and `tone-<tone>`.
|
|
27
|
+
|
|
28
|
+
`legend` draws a list of entries, each a swatch (a colour, a tone and a shape,
|
|
29
|
+
a class, or an icon of its own) and its word; add `legendStyles` to the
|
|
30
|
+
element's styles. `factLine` draws a row of facts separated by ` | ` that
|
|
31
|
+
breaks between facts, never inside one; a fact with a tone is in its status
|
|
32
|
+
colour.
|
|
33
|
+
|
|
34
|
+
::code{file="examples/status.ts"}
|
|
35
|
+
|
|
36
|
+
## Icons
|
|
37
|
+
|
|
38
|
+
`icon(name, label)` draws a glyph, or a template registered under `name` with
|
|
39
|
+
`registerIcon`. Without a label it is hidden from screen readers; with one, the
|
|
40
|
+
label is its tooltip and what a screen reader reads.
|
|
41
|
+
|
|
42
|
+
## The segmented control
|
|
43
|
+
|
|
44
|
+
`<cae-segmented>` is one choice among a few: a radio group, one tab stop, the
|
|
45
|
+
arrow keys, Home and End to choose. It sends `cae-change` with the chosen
|
|
46
|
+
value; the host keeps `value`.
|
|
47
|
+
|
|
48
|
+
::code{file="examples/segmented.ts"}
|
|
49
|
+
|
|
50
|
+
## Keyboard and long lists
|
|
51
|
+
|
|
52
|
+
`RovingFocusController` gives a group of items one tab stop and moves the
|
|
53
|
+
focus with the arrow keys, in a row, a column or a grid (`rovingStep` is the
|
|
54
|
+
rule). `windowRows` is the arithmetic for drawing only the rows of a long list
|
|
55
|
+
that are on screen.
|
|
56
|
+
|
|
57
|
+
::code{file="../src/primitives/window.ts" from="/**" to="export function windowRows"}
|
package/docs/strings.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Strings
|
|
2
|
+
|
|
3
|
+
An element shows words: a button's name, an empty state, a count. It takes
|
|
4
|
+
them from its `strings` property, a partial set of its `XStrings` interface,
|
|
5
|
+
and uses its English default (`DEFAULT_X_STRINGS`) for each word it is not
|
|
6
|
+
given. A word with a number is a function of the number, so the host decides
|
|
7
|
+
plural forms and word order. Nothing here depends on a localization library:
|
|
8
|
+
the host translates.
|
|
9
|
+
|
|
10
|
+
::code{file="../src/markdown/cae-markdown.ts" from="export interface MarkdownStrings" to="export const DEFAULT_MARKDOWN_STRINGS"}
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
markdown.strings = { showRendered: 'プレビューを表示', showSource: 'ソースを表示' };
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`withDefaults(defaults, given)` merges the two, as each element does.
|