@offorte/show-doc 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ import { LitElement } from "lit";
2
+ import type { ShwTone } from "../shw-tone";
3
+ /**
4
+ * Shows a short status or category label.
5
+ *
6
+ * @element shw-badge
7
+ * @slot - Short status or category text.
8
+ */
9
+ export declare class ShwBadge extends LitElement {
10
+ static properties: {
11
+ tone: {
12
+ type: StringConstructor;
13
+ reflect: boolean;
14
+ };
15
+ };
16
+ static styles: import("lit").CSSResult[];
17
+ /** Visual meaning of the badge. */
18
+ tone: ShwTone;
19
+ protected render(): import("lit").TemplateResult<1>;
20
+ }
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ "shw-badge": ShwBadge;
24
+ }
25
+ }
@@ -0,0 +1,31 @@
1
+ import { LitElement } from "lit";
2
+ import type { ShwTone } from "../shw-tone";
3
+ import "./shw-markdown";
4
+ /**
5
+ * Highlights a short Markdown message.
6
+ *
7
+ * @element shw-callout
8
+ */
9
+ export declare class ShwCallout extends LitElement {
10
+ #private;
11
+ static properties: {
12
+ heading: {
13
+ type: StringConstructor;
14
+ };
15
+ tone: {
16
+ type: StringConstructor;
17
+ reflect: boolean;
18
+ };
19
+ };
20
+ static styles: import("lit").CSSResult[];
21
+ /** Optional callout heading. */
22
+ heading: string;
23
+ /** Visual meaning of the callout. */
24
+ tone: ShwTone;
25
+ protected render(): import("lit").TemplateResult<1>;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ "shw-callout": ShwCallout;
30
+ }
31
+ }
@@ -0,0 +1,37 @@
1
+ import { LitElement } from "lit";
2
+ import type { ShwTone } from "../shw-tone";
3
+ import "./shw-badge";
4
+ import "./shw-markdown";
5
+ /**
6
+ * Groups one focused idea in a bordered card with an optional badge.
7
+ *
8
+ * @element shw-card
9
+ */
10
+ export declare class ShwCard extends LitElement {
11
+ #private;
12
+ static properties: {
13
+ heading: {
14
+ type: StringConstructor;
15
+ };
16
+ label: {
17
+ type: StringConstructor;
18
+ };
19
+ tone: {
20
+ type: StringConstructor;
21
+ reflect: boolean;
22
+ };
23
+ };
24
+ static styles: import("lit").CSSResult[];
25
+ /** Optional card heading. */
26
+ heading: string;
27
+ /** Optional short badge label above the heading. */
28
+ label: string;
29
+ /** Visual meaning of the optional badge. */
30
+ tone: ShwTone;
31
+ protected render(): import("lit").TemplateResult<1>;
32
+ }
33
+ declare global {
34
+ interface HTMLElementTagNameMap {
35
+ "shw-card": ShwCard;
36
+ }
37
+ }
@@ -0,0 +1,28 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Shows a syntax-highlighted code block with an optional filename.
4
+ *
5
+ * @element shw-code
6
+ */
7
+ export declare class ShwCode extends LitElement {
8
+ #private;
9
+ static properties: {
10
+ filename: {
11
+ type: StringConstructor;
12
+ };
13
+ language: {
14
+ type: StringConstructor;
15
+ };
16
+ };
17
+ static styles: import("lit").CSSResult[];
18
+ /** Optional filename shown above the code. */
19
+ filename: string;
20
+ /** Syntax language. Supported values are html, js, ts, and json. */
21
+ language: string;
22
+ protected render(): import("lit").TemplateResult<1>;
23
+ }
24
+ declare global {
25
+ interface HTMLElementTagNameMap {
26
+ "shw-code": ShwCode;
27
+ }
28
+ }
@@ -0,0 +1,30 @@
1
+ import { LitElement } from "lit";
2
+ import "./shw-markdown";
3
+ /**
4
+ * Hides optional Markdown details behind a native disclosure control.
5
+ *
6
+ * @element shw-collapsible
7
+ */
8
+ export declare class ShwCollapsible extends LitElement {
9
+ #private;
10
+ static properties: {
11
+ open: {
12
+ type: BooleanConstructor;
13
+ reflect: boolean;
14
+ };
15
+ summary: {
16
+ type: StringConstructor;
17
+ };
18
+ };
19
+ static styles: import("lit").CSSResult[];
20
+ /** Whether the disclosure starts open. */
21
+ open: boolean;
22
+ /** Label for the disclosure control. */
23
+ summary: string;
24
+ protected render(): import("lit").TemplateResult<1>;
25
+ }
26
+ declare global {
27
+ interface HTMLElementTagNameMap {
28
+ "shw-collapsible": ShwCollapsible;
29
+ }
30
+ }
@@ -0,0 +1,16 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Provides the page and document canvas for a ShowDoc artifact.
4
+ *
5
+ * @element shw-doc
6
+ * @slot - The complete visible document.
7
+ */
8
+ export declare class ShwDoc extends LitElement {
9
+ static styles: import("lit").CSSResult[];
10
+ protected render(): import("lit").TemplateResult<1>;
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ "shw-doc": ShwDoc;
15
+ }
16
+ }
@@ -0,0 +1,23 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Frames an image, SVG, or diagram with an optional caption.
4
+ *
5
+ * @element shw-figure
6
+ * @slot - The image, SVG, or diagram.
7
+ */
8
+ export declare class ShwFigure extends LitElement {
9
+ static properties: {
10
+ caption: {
11
+ type: StringConstructor;
12
+ };
13
+ };
14
+ static styles: import("lit").CSSResult[];
15
+ /** Optional plain-text caption below the visual. */
16
+ caption: string;
17
+ protected render(): import("lit").TemplateResult<1>;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ "shw-figure": ShwFigure;
22
+ }
23
+ }
@@ -0,0 +1,24 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Arranges child blocks in one to four responsive columns.
4
+ *
5
+ * @element shw-grid
6
+ * @slot - The blocks arranged by the grid.
7
+ */
8
+ export declare class ShwGrid extends LitElement {
9
+ static properties: {
10
+ columns: {
11
+ type: NumberConstructor;
12
+ reflect: boolean;
13
+ };
14
+ };
15
+ static styles: import("lit").CSSResult[];
16
+ /** Number of columns. Supported values are 1, 2, 3, and 4. */
17
+ columns: 1 | 2 | 3 | 4;
18
+ protected render(): import("lit").TemplateResult<1>;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ "shw-grid": ShwGrid;
23
+ }
24
+ }
@@ -0,0 +1,29 @@
1
+ import { LitElement } from "lit";
2
+ import "./shw-markdown";
3
+ /**
4
+ * Renders a document title and an optional Markdown introduction.
5
+ *
6
+ * @element shw-header
7
+ */
8
+ export declare class ShwHeader extends LitElement {
9
+ #private;
10
+ static properties: {
11
+ eyebrow: {
12
+ type: StringConstructor;
13
+ };
14
+ heading: {
15
+ type: StringConstructor;
16
+ };
17
+ };
18
+ static styles: import("lit").CSSResult[];
19
+ /** Short label above the main heading. */
20
+ eyebrow: string;
21
+ /** Main document heading. */
22
+ heading: string;
23
+ protected render(): import("lit").TemplateResult<1>;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ "shw-header": ShwHeader;
28
+ }
29
+ }
@@ -0,0 +1,16 @@
1
+ import { LitElement, nothing } from "lit";
2
+ /**
3
+ * Renders safe CommonMark from its light DOM text.
4
+ *
5
+ * @element shw-markdown
6
+ */
7
+ export declare class ShwMarkdown extends LitElement {
8
+ #private;
9
+ static styles: import("lit").CSSResult[];
10
+ protected render(): typeof nothing | import("lit").TemplateResult<1>;
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ "shw-markdown": ShwMarkdown;
15
+ }
16
+ }
@@ -0,0 +1,26 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Renders Mermaid source as a responsive diagram.
4
+ *
5
+ * @element shw-mermaid
6
+ */
7
+ export declare class ShwMermaid extends LitElement {
8
+ #private;
9
+ static properties: {
10
+ label: {
11
+ type: StringConstructor;
12
+ };
13
+ };
14
+ static styles: import("lit").CSSResult[];
15
+ /** Accessible name for the rendered diagram. */
16
+ label: string;
17
+ connectedCallback(): void;
18
+ disconnectedCallback(): void;
19
+ protected render(): import("lit").TemplateResult<1>;
20
+ protected updated(): void;
21
+ }
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ "shw-mermaid": ShwMermaid;
25
+ }
26
+ }
@@ -0,0 +1,34 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Groups related document blocks under a heading divider and optional short introduction.
4
+ *
5
+ * @element shw-section
6
+ * @slot - The document blocks in the section.
7
+ */
8
+ export declare class ShwSection extends LitElement {
9
+ #private;
10
+ static properties: {
11
+ heading: {
12
+ type: StringConstructor;
13
+ };
14
+ intro: {
15
+ type: StringConstructor;
16
+ };
17
+ level: {
18
+ type: NumberConstructor;
19
+ };
20
+ };
21
+ static styles: import("lit").CSSResult[];
22
+ /** Optional section heading. */
23
+ heading: string;
24
+ /** Optional short context beside the section heading. */
25
+ intro: string;
26
+ /** Heading level. Supported values are 2 and 3. */
27
+ level: 2 | 3;
28
+ protected render(): import("lit").TemplateResult<1>;
29
+ }
30
+ declare global {
31
+ interface HTMLElementTagNameMap {
32
+ "shw-section": ShwSection;
33
+ }
34
+ }
@@ -0,0 +1,39 @@
1
+ import { LitElement } from "lit";
2
+ import type { ShwTone } from "../shw-tone";
3
+ /**
4
+ * Shows one prominent value with a label and optional change.
5
+ *
6
+ * @element shw-stat
7
+ */
8
+ export declare class ShwStat extends LitElement {
9
+ static properties: {
10
+ change: {
11
+ type: StringConstructor;
12
+ };
13
+ label: {
14
+ type: StringConstructor;
15
+ };
16
+ tone: {
17
+ type: StringConstructor;
18
+ reflect: boolean;
19
+ };
20
+ value: {
21
+ type: StringConstructor;
22
+ };
23
+ };
24
+ static styles: import("lit").CSSResult[];
25
+ /** Optional short change or context below the value. */
26
+ change: string;
27
+ /** Short description of the value. */
28
+ label: string;
29
+ /** Visual meaning of the change. */
30
+ tone: ShwTone;
31
+ /** Prominent value. */
32
+ value: string;
33
+ protected render(): import("lit").TemplateResult<1>;
34
+ }
35
+ declare global {
36
+ interface HTMLElementTagNameMap {
37
+ "shw-stat": ShwStat;
38
+ }
39
+ }
@@ -0,0 +1,17 @@
1
+ import { LitElement } from "lit";
2
+ import "./shw-markdown";
3
+ /**
4
+ * Turns a compact numbered Markdown list into a visual sequence.
5
+ *
6
+ * @element shw-steps
7
+ */
8
+ export declare class ShwSteps extends LitElement {
9
+ #private;
10
+ static styles: import("lit").CSSResult[];
11
+ protected render(): import("lit").TemplateResult<1>;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ "shw-steps": ShwSteps;
16
+ }
17
+ }
@@ -0,0 +1,24 @@
1
+ import { LitElement } from "lit";
2
+ import "./shw-markdown";
3
+ /**
4
+ * Presents a short Markdown overview before the document details.
5
+ *
6
+ * @element shw-summary
7
+ */
8
+ export declare class ShwSummary extends LitElement {
9
+ #private;
10
+ static properties: {
11
+ heading: {
12
+ type: StringConstructor;
13
+ };
14
+ };
15
+ static styles: import("lit").CSSResult[];
16
+ /** Short label above the overview. */
17
+ heading: string;
18
+ protected render(): import("lit").TemplateResult<1>;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ "shw-summary": ShwSummary;
23
+ }
24
+ }
@@ -0,0 +1,23 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Renders pipe-separated light DOM text as a semantic table.
4
+ *
5
+ * @element shw-table
6
+ */
7
+ export declare class ShwTable extends LitElement {
8
+ #private;
9
+ static properties: {
10
+ caption: {
11
+ type: StringConstructor;
12
+ };
13
+ };
14
+ static styles: import("lit").CSSResult[];
15
+ /** Optional accessible table caption. */
16
+ caption: string;
17
+ protected render(): import("lit").TemplateResult<1>;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ "shw-table": ShwTable;
22
+ }
23
+ }
@@ -0,0 +1,16 @@
1
+ export { ShwBadge } from "./components/shw-badge";
2
+ export { ShwCallout } from "./components/shw-callout";
3
+ export { ShwCard } from "./components/shw-card";
4
+ export { ShwCollapsible } from "./components/shw-collapsible";
5
+ export { ShwCode } from "./components/shw-code";
6
+ export { ShwDoc } from "./components/shw-doc";
7
+ export { ShwFigure } from "./components/shw-figure";
8
+ export { ShwGrid } from "./components/shw-grid";
9
+ export { ShwHeader } from "./components/shw-header";
10
+ export { ShwMarkdown } from "./components/shw-markdown";
11
+ export { ShwSection } from "./components/shw-section";
12
+ export { ShwStat } from "./components/shw-stat";
13
+ export { ShwSteps } from "./components/shw-steps";
14
+ export { ShwSummary } from "./components/shw-summary";
15
+ export { ShwTable } from "./components/shw-table";
16
+ export type { ShwTone } from "./shw-tone";
@@ -0,0 +1,2 @@
1
+ export * from "./index";
2
+ export { ShwMermaid } from "./components/shw-mermaid";
@@ -0,0 +1 @@
1
+ export type ShwTone = "info" | "success" | "warning" | "danger" | "neutral";
package/package.json ADDED
@@ -0,0 +1,106 @@
1
+ {
2
+ "name": "@offorte/show-doc",
3
+ "version": "0.0.1",
4
+ "description": "Agent skill and web components for polished, human-readable HTML documents.",
5
+ "keywords": [
6
+ "documentation",
7
+ "html-artifacts",
8
+ "lit",
9
+ "markdown",
10
+ "tailwindcss",
11
+ "web-components"
12
+ ],
13
+ "homepage": "https://github.com/offorte/show-doc#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/offorte/show-doc/issues"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Offorte",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/offorte/show-doc.git"
22
+ },
23
+ "files": [
24
+ "dist/THIRD_PARTY_LICENSES.md",
25
+ "dist/showdoc.js",
26
+ "dist/showdoc-mermaid.js",
27
+ "dist/types/components",
28
+ "dist/types/index.d.ts",
29
+ "dist/types/mermaid.d.ts",
30
+ "dist/types/shw-tone.d.ts",
31
+ "custom-elements.json",
32
+ "skills",
33
+ "README.md",
34
+ "LICENSE"
35
+ ],
36
+ "type": "module",
37
+ "sideEffects": [
38
+ "./dist/showdoc.js",
39
+ "./dist/showdoc-mermaid.js"
40
+ ],
41
+ "main": "./dist/showdoc.js",
42
+ "module": "./dist/showdoc.js",
43
+ "types": "./dist/types/index.d.ts",
44
+ "exports": {
45
+ ".": {
46
+ "types": "./dist/types/index.d.ts",
47
+ "import": "./dist/showdoc.js"
48
+ },
49
+ "./mermaid": {
50
+ "types": "./dist/types/mermaid.d.ts",
51
+ "import": "./dist/showdoc-mermaid.js"
52
+ },
53
+ "./custom-elements.json": "./custom-elements.json",
54
+ "./skill": "./skills/show-doc/SKILL.md"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "scripts": {
60
+ "dev": "vite --host 127.0.0.1",
61
+ "serve": "pnpm build && node scripts/prepare-preview.mjs && vite preview --host 127.0.0.1 --port 4173 --strictPort --outDir .preview",
62
+ "build": "vite build && vite build --mode mermaid && tsc -p tsconfig.build.json",
63
+ "check:build": "node scripts/check-build.mjs",
64
+ "check:package": "node scripts/check-package.mjs",
65
+ "manifest": "cem analyze --litelement --globs \"src/components/*.ts\"",
66
+ "manifest:check": "pnpm manifest && node scripts/check-manifest.mjs",
67
+ "lint": "oxlint src test scripts vite.config.ts web-test-runner.config.mjs custom-elements-manifest.config.mjs",
68
+ "format": "oxfmt . --write --ignore-path .oxfmtignore",
69
+ "format:check": "oxfmt . --check --ignore-path .oxfmtignore",
70
+ "typecheck": "tsc --noEmit",
71
+ "test": "pnpm build && pnpm test:browser",
72
+ "test:browser": "web-test-runner \"test/**/*.test.js\" --config web-test-runner.config.mjs",
73
+ "fallow:check": "fallow --format compact --fail-on-issues --summary",
74
+ "verify:source": "pnpm format:check && pnpm lint && pnpm typecheck",
75
+ "verify:build": "pnpm test:browser && pnpm manifest:check && pnpm check:build && pnpm check:package && pnpm fallow:check",
76
+ "agent:verify": "pnpm verify:source && pnpm build && pnpm verify:build",
77
+ "prepack": "pnpm build && pnpm manifest:check && pnpm check:build && pnpm check:package"
78
+ },
79
+ "dependencies": {
80
+ "lit": "3.3.3"
81
+ },
82
+ "devDependencies": {
83
+ "@custom-elements-manifest/analyzer": "0.11.0",
84
+ "@open-wc/testing": "5.0.0",
85
+ "@tailwindcss/typography": "0.5.20",
86
+ "@tailwindcss/vite": "4.3.3",
87
+ "@types/node": "26.3.0",
88
+ "@types/prismjs": "1.26.6",
89
+ "@web/test-runner": "1.0.0",
90
+ "@web/test-runner-playwright": "1.0.0",
91
+ "fallow": "3.18.0",
92
+ "mermaid": "11.17.2",
93
+ "micromark": "4.0.2",
94
+ "micromark-extension-gfm-strikethrough": "2.1.0",
95
+ "micromark-extension-gfm-task-list-item": "2.1.0",
96
+ "oxfmt": "0.65.0",
97
+ "oxlint": "1.80.0",
98
+ "playwright": "1.62.1",
99
+ "prismjs": "1.30.0",
100
+ "tailwindcss": "4.3.3",
101
+ "typescript": "7.0.2",
102
+ "vite": "8.2.2"
103
+ },
104
+ "packageManager": "pnpm@10.30.0",
105
+ "customElements": "custom-elements.json"
106
+ }