plotleaf 0.0.0-stage → 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.
@@ -0,0 +1,24 @@
1
+ [
2
+ { "date": "2026-02-01", "teams": 1113 },
3
+ { "date": "2026-02-08", "teams": 1118 },
4
+ { "date": "2026-02-15", "teams": 1145 },
5
+ { "date": "2026-02-22", "teams": 1116 },
6
+ { "date": "2026-03-01", "teams": 1121 },
7
+ { "date": "2026-03-08", "teams": 1140 },
8
+ { "date": "2026-03-15", "teams": 1189 },
9
+ { "date": "2026-03-22", "teams": 1166 },
10
+ { "date": "2026-03-29", "teams": 1190 },
11
+ { "date": "2026-04-05", "teams": 1194 },
12
+ { "date": "2026-04-12", "teams": 1160 },
13
+ { "date": "2026-04-19", "teams": 1182 },
14
+ { "date": "2026-04-26", "teams": 1244 },
15
+ { "date": "2026-05-03", "teams": 1218 },
16
+ { "date": "2026-05-10", "teams": 1226 },
17
+ { "date": "2026-05-17", "teams": 1263 },
18
+ { "date": "2026-05-24", "teams": 1289 },
19
+ { "date": "2026-05-31", "teams": 1340 },
20
+ { "date": "2026-06-07", "teams": 1307 },
21
+ { "date": "2026-06-14", "teams": 1352 },
22
+ { "date": "2026-06-21", "teams": 1404 },
23
+ { "date": "2026-06-28", "teams": 1492 }
24
+ ]
@@ -0,0 +1,5 @@
1
+ [
2
+ { "plan": "Pro", "teams": 884, "change": 0.41, "alerts": 2140 },
3
+ { "plan": "Team", "teams": 432, "change": 0.22, "alerts": 861 },
4
+ { "plan": "Free", "teams": 176, "change": 0.09, "alerts": 291 }
5
+ ]
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Feature Adoption — User Alerts
3
+ description: Adoption, team mix and the next growth milestone.
4
+ ---
5
+
6
+ # Feature Adoption: User Alerts
7
+
8
+ This fictional product report uses synthetic data for demonstration.
9
+
10
+ ## Summary
11
+
12
+ In this fictional launch scenario, User Alerts is leaving beta. **1,492** teams had configured at least one alert by the end of June, up **34%** over the quarter from **1,113**. Pro-plan teams account for most of the total.
13
+
14
+ ::area{data="./adoption.json" x="date" y="teams" xType="date" title="Teams with an alert configured" target="1600" targetLabel="Target"}
15
+
16
+ ## Adoption
17
+
18
+ Every plan picked it up through the beta, but the mix shifted toward Pro. Teams that set an alert in their first week stayed active at **61%**, the same rate as the existing base.
19
+
20
+ :::table{data="./plans.json" title="By plan"}
21
+ ::column{field="plan" label="Plan"}
22
+ ::column{field="teams" label="Teams" format="number"}
23
+ ::column{field="change" label="Δ QoQ" format="percent" sign="always" semantics="higher-is-better"}
24
+ ::column{field="alerts" label="Alerts set" format="number"}
25
+ :::
26
+
27
+ ### Key findings
28
+
29
+ Pro-plan teams led the expansion. Activation held steady at **61%** week over week. Churn fell to **2.1%**, the lowest this year.
30
+
31
+ All data, comparisons and findings are fictional and supplied by the example author.
@@ -0,0 +1,30 @@
1
+ [
2
+ {
3
+ "stage": "Visited",
4
+ "teams": 41200,
5
+ "baseline": 41200,
6
+ "share": 1.0,
7
+ "status": "on-target"
8
+ },
9
+ {
10
+ "stage": "Signed up",
11
+ "teams": 12480,
12
+ "baseline": 41200,
13
+ "share": 0.3029126213592233,
14
+ "status": "on-target"
15
+ },
16
+ {
17
+ "stage": "Activated",
18
+ "teams": 7612,
19
+ "baseline": 41200,
20
+ "share": 0.18475728155339805,
21
+ "status": "below-target"
22
+ },
23
+ {
24
+ "stage": "Converted",
25
+ "teams": 1284,
26
+ "baseline": 41200,
27
+ "share": 0.03116504854368932,
28
+ "status": "at-risk"
29
+ }
30
+ ]
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "plan": "Pro",
4
+ "teams": 5100
5
+ },
6
+ {
7
+ "plan": "Team",
8
+ "teams": 1900
9
+ },
10
+ {
11
+ "plan": "Free",
12
+ "teams": 612
13
+ }
14
+ ]
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: PLG Onboarding
3
+ description: A fictional product onboarding report with prepared funnel and plan data.
4
+ ---
5
+
6
+ # PLG Onboarding
7
+
8
+ A fictional product's onboarding performance, **6 April–28 June 2026**. All values and comparisons are synthetic, prepared by the example author.
9
+
10
+ :::grid{columns="4"}
11
+ ::metric{label="Signups" value="12480" comparison="18.2% vs previous quarter" direction="up" sentiment="positive"}
12
+ ::metric{label="Activated teams" value="7612" comparison="24.1% vs previous quarter" direction="up" sentiment="positive"}
13
+ ::metric{label="Converted" value="1284" comparison="11.4% vs previous quarter" direction="up" sentiment="positive"}
14
+ ::metric{label="Conversion rate" value="0.10288461538461538" format="percent" comparison="0.8 pt vs previous quarter" direction="up" sentiment="positive"}
15
+ :::
16
+
17
+ :::grid{columns="2"}
18
+ ::area{data="./signups.json" x="week" y="signups" xType="date" title="Signups by week"}
19
+ ::funnel{data="./funnel.json" stage="stage" value="teams" total="baseline" share="share" status="status" title="Funnel by stage"}
20
+ :::
21
+
22
+ ## Activation mix
23
+
24
+ **7,612 teams** activated. Pro accounts for the largest share; each category below is mutually exclusive. Funnel percentages use **41,200 visitors** as the explicit denominator. The KPI conversion rate uses **12,480 signups**, so it answers a different question.
25
+
26
+ ::::grid{columns="2"}
27
+ ::donut{data="./plans.json" category="plan" value="teams" title="Activated teams by plan"}
28
+ :::table{data="./plans.json" title="Activated teams"}
29
+ ::column{field="plan" label="Plan"}
30
+ ::column{field="teams" label="Teams" format="number"}
31
+ :::
32
+ ::::
33
+
34
+ ### Key findings
35
+
36
+ - **Activation is the next opportunity.** Its below-target status is supplied by the author; the renderer does not infer it from the rate.
37
+ - **Conversion needs attention.** The author marked this stage at risk against the fictional team's own operating targets.
38
+ - **Pro leads the mix.** Plan counts add to the same 7,612 activated teams shown in the KPI and funnel.
39
+
40
+ :::callout{title="About this example"}
41
+ All data, comparisons, statuses and findings are fictional. This report has no live filters or data connections. The funnel preserves the prepared stage order and never guesses a denominator or business status.
42
+ :::
@@ -0,0 +1,50 @@
1
+ [
2
+ {
3
+ "week": "2026-04-06",
4
+ "signups": 700
5
+ },
6
+ {
7
+ "week": "2026-04-13",
8
+ "signups": 800
9
+ },
10
+ {
11
+ "week": "2026-04-20",
12
+ "signups": 770
13
+ },
14
+ {
15
+ "week": "2026-04-27",
16
+ "signups": 850
17
+ },
18
+ {
19
+ "week": "2026-05-04",
20
+ "signups": 980
21
+ },
22
+ {
23
+ "week": "2026-05-11",
24
+ "signups": 1050
25
+ },
26
+ {
27
+ "week": "2026-05-18",
28
+ "signups": 1040
29
+ },
30
+ {
31
+ "week": "2026-05-25",
32
+ "signups": 1120
33
+ },
34
+ {
35
+ "week": "2026-06-01",
36
+ "signups": 1180
37
+ },
38
+ {
39
+ "week": "2026-06-08",
40
+ "signups": 1160
41
+ },
42
+ {
43
+ "week": "2026-06-15",
44
+ "signups": 1230
45
+ },
46
+ {
47
+ "week": "2026-06-22",
48
+ "signups": 1600
49
+ }
50
+ ]
@@ -0,0 +1,26 @@
1
+ [
2
+ {
3
+ "category": "Apparel",
4
+ "orders": 5680,
5
+ "revenue": 323760,
6
+ "change": 0.184
7
+ },
8
+ {
9
+ "category": "Home",
10
+ "orders": 3240,
11
+ "revenue": 252720,
12
+ "change": 0.123
13
+ },
14
+ {
15
+ "category": "Accessories",
16
+ "orders": 2360,
17
+ "revenue": 165200,
18
+ "change": 0.328
19
+ },
20
+ {
21
+ "category": "Outdoors",
22
+ "orders": 1200,
23
+ "revenue": 82480,
24
+ "change": 0.176
25
+ }
26
+ ]
@@ -0,0 +1,30 @@
1
+ [
2
+ {
3
+ "date": "2026-11-01",
4
+ "orders": 1420
5
+ },
6
+ {
7
+ "date": "2026-11-02",
8
+ "orders": 1630
9
+ },
10
+ {
11
+ "date": "2026-11-03",
12
+ "orders": 1740
13
+ },
14
+ {
15
+ "date": "2026-11-04",
16
+ "orders": 1890
17
+ },
18
+ {
19
+ "date": "2026-11-05",
20
+ "orders": 1610
21
+ },
22
+ {
23
+ "date": "2026-11-06",
24
+ "orders": 1950
25
+ },
26
+ {
27
+ "date": "2026-11-07",
28
+ "orders": 2240
29
+ }
30
+ ]
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Storefront Overview
3
+ description: A fictional weekly retail report demonstrating plotleaf components.
4
+ ---
5
+
6
+ # Storefront Overview
7
+
8
+ A fictional store's weekly performance, using synthetic data for demonstration. Orders grew **18.2%**, while returns fell **12%** from the previous period.
9
+
10
+ :::grid{columns="4"}
11
+ ::metric{label="Orders" value="12480" comparison="18.2% vs previous week" direction="up" sentiment="positive"}
12
+ ::metric{label="Revenue" value="824160" format="currency:USD" comparison="24.1% vs previous week" direction="up" sentiment="positive"}
13
+ ::metric{label="Returns" value="384" comparison="12% vs previous week" direction="down" sentiment="positive"}
14
+ ::metric{label="Return rate" value="0.03076923076923077" format="percent" comparison="0.4 pt vs previous week" direction="down" sentiment="positive"}
15
+ :::
16
+
17
+ ## Sales and returns
18
+
19
+ The store received **12,480 orders** over seven days. Size-related returns made up most of the **384 returns**, suggesting a useful area for clearer product guidance.
20
+
21
+ :::grid{columns="2"}
22
+ ::area{data="./orders.json" x="date" y="orders" xType="date" title="Orders by day" target="2000" targetLabel="Daily target"}
23
+ ::bar{data="./returns.json" x="reason" y="count" title="Returns by reason"}
24
+ :::
25
+
26
+ ## Sales by category
27
+
28
+ Apparel accounts for the largest share of orders. Accessories showed the strongest relative growth.
29
+
30
+ :::table{data="./categories.json" title="Category performance"}
31
+ ::column{field="category" label="Category"}
32
+ ::column{field="orders" label="Orders" format="number"}
33
+ ::column{field="revenue" label="Revenue" format="currency:USD"}
34
+ ::column{field="change" label="Δ week" format="percent" sign="always" semantics="higher-is-better"}
35
+ :::
36
+
37
+ ### Key findings
38
+
39
+ - **Growth spans every category.** All four categories increased orders over the previous week.
40
+ - **Returns declined.** The return count and rate both improved.
41
+ - **Size guidance is the next opportunity.** Review fit descriptions before changing the return policy.
42
+
43
+ :::callout{title="About this example"}
44
+ All data, comparisons and findings are fictional. This example covers 1–7 November 2026 and contains no customer or organization data. An author prepares the analysis; plotleaf renders it.
45
+ :::
@@ -0,0 +1,10 @@
1
+ [
2
+ {
3
+ "reason": "Wrong size",
4
+ "count": 228
5
+ },
6
+ {
7
+ "reason": "Changed mind",
8
+ "count": 156
9
+ }
10
+ ]
package/package.json CHANGED
@@ -1,6 +1,82 @@
1
1
  {
2
2
  "name": "plotleaf",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Beautiful, interactive reports from Markdown and JSON. Built for agents.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/LoueeD/plotleaf.git"
10
+ },
11
+ "homepage": "https://github.com/LoueeD/plotleaf#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/LoueeD/plotleaf/issues"
14
+ },
15
+ "bin": {
16
+ "plotleaf": "./dist/cli.js"
17
+ },
18
+ "engines": {
19
+ "node": ">=22"
20
+ },
21
+ "packageManager": "bun@1.4.4",
22
+ "files": [
23
+ "dist/cli.js",
24
+ "dist/assets/base.js",
25
+ "dist/assets/charts.js",
26
+ "dist/assets/styles.css",
27
+ "dist/assets/notices.txt",
28
+ "schema/components.json",
29
+ "examples/storefront/*.md",
30
+ "examples/storefront/*.json",
31
+ "examples/adoption/*.md",
32
+ "examples/adoption/*.json",
33
+ "examples/onboarding/*.md",
34
+ "examples/onboarding/*.json",
35
+ "skills/plotleaf/SKILL.md",
36
+ "README.md",
37
+ "LICENSE",
38
+ "THIRD_PARTY_NOTICES.txt"
39
+ ],
40
+ "scripts": {
41
+ "format": "bun fmt src scripts tests playwright.config.ts package.json tsconfig.json tsconfig.browser.json tsconfig.dev.json bunfig.toml .github/workflows/ci.yml",
42
+ "build": "bun scripts/build.ts",
43
+ "typecheck": "bun node_modules/typescript/bin/tsc --noEmit -p tsconfig.json && bun node_modules/typescript/bin/tsc --noEmit -p tsconfig.browser.json && bun node_modules/typescript/bin/tsc --noEmit -p tsconfig.dev.json",
44
+ "typecheck:tsrs": "bun node_modules/tsrs/bin/tsrs --noEmit --fast false -p tsconfig.json && bun node_modules/tsrs/bin/tsrs --noEmit --fast false -p tsconfig.browser.json && bun node_modules/tsrs/bin/tsrs --noEmit --fast false -p tsconfig.dev.json",
45
+ "test": "bun test",
46
+ "test:browser": "node node_modules/@playwright/test/cli.js test",
47
+ "test:consumer": "node tests/consumer/smoke.mjs",
48
+ "check": "bun run typecheck && bun run build && bun run test && bun run test:consumer",
49
+ "audit:package": "node scripts/audit-package.mjs"
50
+ },
51
+ "dependencies": {
52
+ "chokidar": "6.0.0",
53
+ "open": "11.0.4",
54
+ "rehype-sanitize": "6.0.0",
55
+ "rehype-stringify": "10.0.1",
56
+ "remark-directive": "4.0.0",
57
+ "remark-frontmatter": "5.0.0",
58
+ "remark-parse": "11.0.0",
59
+ "remark-rehype": "11.1.2",
60
+ "unified": "11.0.5",
61
+ "yaml": "2.9.1",
62
+ "zod": "4.6.7"
63
+ },
64
+ "devDependencies": {
65
+ "@playwright/test": "1.65.0",
66
+ "@types/bun": "1.4.4",
67
+ "@types/hast": "3.0.5",
68
+ "@types/mdast": "4.0.4",
69
+ "@types/node": "22.20.5",
70
+ "echarts": "6.1.0",
71
+ "tsrs": "0.23.0-ts7.1.0-beta",
72
+ "typescript": "7.0.2"
73
+ },
74
+ "keywords": [
75
+ "markdown",
76
+ "reports",
77
+ "data-visualization",
78
+ "charts",
79
+ "cli",
80
+ "agents"
81
+ ]
82
+ }