@ovalbee/reportifact 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.
- package/README.md +841 -0
- package/dist/Chart.vue_vue_type_style_index_0_lang-B4novMFC.cjs +1 -0
- package/dist/Chart.vue_vue_type_style_index_0_lang-BYILFTfl.js +5895 -0
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-BB4dG0CB.cjs +1 -0
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-DPY6mSdA.js +191 -0
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-BZbc-Wkf.js +49 -0
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-WpuALh8Z.cjs +1 -0
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-CDPSu7no.cjs +1 -0
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-CfxCCXmB.js +33 -0
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-BzrxoJW4.cjs +1 -0
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-CO9HvYfr.js +132 -0
- package/dist/Reportifact.vue.d.ts +40 -0
- package/dist/ReportifactWidgetHost-A73gQ3bT.cjs +1 -0
- package/dist/ReportifactWidgetHost-BjKBwCWI.js +17 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BIyC7N9b.cjs +2 -0
- package/dist/Timeline.vue_vue_type_style_index_0_lang-BnrgKBMh.js +2598 -0
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs +1 -0
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-D-oXqmI2.js +59 -0
- package/dist/components/TableOfContents.vue.d.ts +15 -0
- package/dist/composables/useDelayedLoading.d.ts +6 -0
- package/dist/composables/useFetch.d.ts +13 -0
- package/dist/customWidgets.d.ts +18 -0
- package/dist/entries/chart.d.ts +3 -0
- package/dist/entries/contracts.d.ts +3 -0
- package/dist/entries/figure.d.ts +1 -0
- package/dist/entries/host.d.ts +1 -0
- package/dist/entries/imageGallery.d.ts +3 -0
- package/dist/entries/metricCallout.d.ts +2 -0
- package/dist/entries/metricCards.d.ts +2 -0
- package/dist/entries/metricsTable.d.ts +2 -0
- package/dist/entries/timeline.d.ts +2 -0
- package/dist/index-DFz2A8yJ.js +21229 -0
- package/dist/index-DmTzvbys.cjs +47 -0
- package/dist/index.d.ts +6 -0
- package/dist/markdownTable-B5207r3E.js +32 -0
- package/dist/markdownTable-Cbn1Du3L.cjs +2 -0
- package/dist/mediaResolver.d.ts +18 -0
- package/dist/middleware.cjs +1 -0
- package/dist/middleware.d.ts +21 -0
- package/dist/middleware.js +177 -0
- package/dist/portable/ReportifactFigure.vue.d.ts +36 -0
- package/dist/portable/ReportifactWidgetHost.vue.d.ts +17 -0
- package/dist/portable/contracts.d.ts +54 -0
- package/dist/reportifact.cjs +67 -0
- package/dist/reportifact.d.ts +2 -0
- package/dist/reportifact.js +5272 -0
- package/dist/style.css +13 -0
- package/dist/useFetch-BfOAq-Kg.cjs +1 -0
- package/dist/useFetch-CHQm_TmB.js +35 -0
- package/dist/utils/createMarked.d.ts +7 -0
- package/dist/utils/parseIndexMd.d.ts +29 -0
- package/dist/utils/tfeventsParser.cjs +1 -0
- package/dist/utils/tfeventsParser.d.ts +21 -0
- package/dist/utils/tfeventsParser.js +336 -0
- package/dist/widgets/Card.vue.d.ts +6 -0
- package/dist/widgets/Chart.vue.d.ts +26 -0
- package/dist/widgets/HelpTooltip.vue.d.ts +5 -0
- package/dist/widgets/ImageGallery.vue.d.ts +26 -0
- package/dist/widgets/Markdown.vue.d.ts +8 -0
- package/dist/widgets/MetricCallout.vue.d.ts +19 -0
- package/dist/widgets/MetricCards.vue.d.ts +13 -0
- package/dist/widgets/MetricTable.vue.d.ts +6 -0
- package/dist/widgets/MetricsTable.vue.d.ts +17 -0
- package/dist/widgets/ModelClassComparison.vue.d.ts +7 -0
- package/dist/widgets/ModelComparisonGallery.vue.d.ts +15 -0
- package/dist/widgets/Notice.vue.d.ts +6 -0
- package/dist/widgets/ReportifactWidget.vue.d.ts +23 -0
- package/dist/widgets/Scope.vue.d.ts +8 -0
- package/dist/widgets/Table.vue.d.ts +18 -0
- package/dist/widgets/Tensorboard.vue.d.ts +13 -0
- package/dist/widgets/Timeline.vue.d.ts +21 -0
- package/dist/widgets/WidgetWrapper.vue.d.ts +28 -0
- package/dist/widgets/chart-config/barGradient.d.ts +2 -0
- package/dist/widgets/chart-config/barGrouped.d.ts +2 -0
- package/dist/widgets/chart-config/barNormalized.d.ts +2 -0
- package/dist/widgets/chart-config/barStacked.d.ts +2 -0
- package/dist/widgets/chart-config/customGauge.d.ts +2 -0
- package/dist/widgets/chart-config/gaugeGrade.d.ts +2 -0
- package/dist/widgets/chart-config/heatmap.d.ts +2 -0
- package/dist/widgets/chart-config/index.d.ts +4 -0
- package/dist/widgets/chart-config/line.d.ts +2 -0
- package/dist/widgets/chart-config/pie.d.ts +2 -0
- package/dist/widgets/chart-config/radar.d.ts +2 -0
- package/dist/widgets/chart-config/shared.d.ts +15 -0
- package/dist/widgets/chart-config/types.d.ts +96 -0
- package/dist/widgets/chart.cjs +1 -0
- package/dist/widgets/chart.d.ts +6 -0
- package/dist/widgets/chart.js +5 -0
- package/dist/widgets/chartSizing.d.ts +1 -0
- package/dist/widgets/contracts.cjs +1 -0
- package/dist/widgets/contracts.d.ts +2 -0
- package/dist/widgets/contracts.js +1 -0
- package/dist/widgets/figure.cjs +1 -0
- package/dist/widgets/figure.d.ts +6 -0
- package/dist/widgets/figure.js +84 -0
- package/dist/widgets/host.cjs +1 -0
- package/dist/widgets/host.d.ts +6 -0
- package/dist/widgets/host.js +5 -0
- package/dist/widgets/image-gallery.cjs +1 -0
- package/dist/widgets/image-gallery.d.ts +6 -0
- package/dist/widgets/image-gallery.js +5 -0
- package/dist/widgets/markdownTable.d.ts +4 -0
- package/dist/widgets/metric-callout.cjs +1 -0
- package/dist/widgets/metric-callout.d.ts +6 -0
- package/dist/widgets/metric-callout.js +5 -0
- package/dist/widgets/metric-cards.cjs +1 -0
- package/dist/widgets/metric-cards.d.ts +6 -0
- package/dist/widgets/metric-cards.js +5 -0
- package/dist/widgets/metrics-table.cjs +1 -0
- package/dist/widgets/metrics-table.d.ts +6 -0
- package/dist/widgets/metrics-table.js +5 -0
- package/dist/widgets/scope.d.ts +77 -0
- package/dist/widgets/timeline.cjs +1 -0
- package/dist/widgets/timeline.d.ts +6 -0
- package/dist/widgets/timeline.js +5 -0
- package/package.json +125 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Support code for the `::scope` widget (see `Scope.vue`).
|
|
4
|
+
*
|
|
5
|
+
* A "scope" is a subset of the evaluated data identified by an asset tag value
|
|
6
|
+
* (e.g. `split.bad_weather`). The base scope id is `all` (whole dataset).
|
|
7
|
+
*
|
|
8
|
+
* The report ships, per scope, a `vars.<scopeId>.json` flat dictionary used to
|
|
9
|
+
* resolve `$placeholder` tokens in Markdown/widget text, and per-scope copies of
|
|
10
|
+
* file-backed widget sources (`outcome_counts.json` -> `outcome_counts.<scopeId>.json`).
|
|
11
|
+
*
|
|
12
|
+
* `scopes.json` describes the available tags and their values + per-scope counts.
|
|
13
|
+
* This file-naming / id convention mirrors the producing node (the eval nodes'
|
|
14
|
+
* `scope.py`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const BASE_SCOPE_ID = "all";
|
|
17
|
+
export interface ScopeValue {
|
|
18
|
+
/** Raw tag value, e.g. `bad_weather`. */
|
|
19
|
+
value: string;
|
|
20
|
+
/** Scope id used for file suffixes and vars, e.g. `split.bad_weather`. */
|
|
21
|
+
scopeId: string;
|
|
22
|
+
/** Number of assets in this scope (shown in the control caption). */
|
|
23
|
+
n?: number;
|
|
24
|
+
/** Optional display label; falls back to `value`. */
|
|
25
|
+
label?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ScopeTag {
|
|
28
|
+
/** Tag key, e.g. `split`. */
|
|
29
|
+
key: string;
|
|
30
|
+
/** Optional display label; falls back to `key`. */
|
|
31
|
+
label?: string;
|
|
32
|
+
values: ScopeValue[];
|
|
33
|
+
}
|
|
34
|
+
export interface ScopeManifest {
|
|
35
|
+
tags: ScopeTag[];
|
|
36
|
+
/** Metadata for the base (`all`) scope, mainly its asset count. */
|
|
37
|
+
all?: {
|
|
38
|
+
scopeId?: string;
|
|
39
|
+
n?: number;
|
|
40
|
+
label?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Per-scope variable dictionary used for placeholder substitution. */
|
|
44
|
+
export type ScopeVars = Record<string, unknown>;
|
|
45
|
+
/** Reactive active-scope state provided by the Reportifact root. */
|
|
46
|
+
export interface ScopeState {
|
|
47
|
+
/** Currently selected scope id (`all` for the whole dataset). */
|
|
48
|
+
activeScopeId: Ref<string>;
|
|
49
|
+
/** Merged variables for the active scope (base `vars.json` + scope overrides). */
|
|
50
|
+
activeVars: Ref<ScopeVars>;
|
|
51
|
+
/** Select a scope by id. */
|
|
52
|
+
selectScope: (scopeId: string) => void;
|
|
53
|
+
}
|
|
54
|
+
export declare const SCOPE_STATE: InjectionKey<ScopeState>;
|
|
55
|
+
/**
|
|
56
|
+
* Insert a scope suffix before the file extension.
|
|
57
|
+
* `outcome_counts.json` + `split.bad_weather` -> `outcome_counts.split.bad_weather.json`.
|
|
58
|
+
* The base scope (`all`) returns the source unchanged.
|
|
59
|
+
*/
|
|
60
|
+
export declare function withScopeSuffix(src: string, scopeId: string): string;
|
|
61
|
+
/** Filename for a scope's variable dictionary. */
|
|
62
|
+
export declare function varsFileName(scopeId: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* Replace `$name` / `${name}` tokens with values from `vars`. Tokens whose key is
|
|
65
|
+
* absent from `vars` are left untouched so legacy reports (already substituted at
|
|
66
|
+
* build time, no vars) and prose containing literal `$` are unaffected.
|
|
67
|
+
*/
|
|
68
|
+
export declare function substituteTokens(text: string, vars: ScopeVars): string;
|
|
69
|
+
/**
|
|
70
|
+
* Find the optional `::scope` directive in the report preamble (before the
|
|
71
|
+
* first `# H1`) and return its `src`. Supports both directive forms:
|
|
72
|
+
* ::scope\nsrc: scopes.json\n::
|
|
73
|
+
* ::scope{src="scopes.json"}
|
|
74
|
+
*/
|
|
75
|
+
export declare function parseScopeDirective(markdown: string): {
|
|
76
|
+
src: string;
|
|
77
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Timeline.vue_vue_type_style_index_0_lang-BIyC7N9b.cjs");exports.ReportifactTimeline=e._sfc_main;exports.default=e._sfc_main;
|
package/package.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ovalbee/reportifact",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Vue 3 component + Express middleware for reports from Parquet files via DuckDB",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/reportifact.js",
|
|
7
|
+
"module": "./dist/reportifact.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/reportifact.js",
|
|
13
|
+
"require": "./dist/reportifact.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./widgets/host": {
|
|
16
|
+
"types": "./dist/entries/host.d.ts",
|
|
17
|
+
"import": "./dist/widgets/host.js",
|
|
18
|
+
"require": "./dist/widgets/host.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./widgets/figure": {
|
|
21
|
+
"types": "./dist/entries/figure.d.ts",
|
|
22
|
+
"import": "./dist/widgets/figure.js",
|
|
23
|
+
"require": "./dist/widgets/figure.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./widgets/chart": {
|
|
26
|
+
"types": "./dist/entries/chart.d.ts",
|
|
27
|
+
"import": "./dist/widgets/chart.js",
|
|
28
|
+
"require": "./dist/widgets/chart.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./widgets/metric-cards": {
|
|
31
|
+
"types": "./dist/entries/metricCards.d.ts",
|
|
32
|
+
"import": "./dist/widgets/metric-cards.js",
|
|
33
|
+
"require": "./dist/widgets/metric-cards.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./widgets/metric-callout": {
|
|
36
|
+
"types": "./dist/entries/metricCallout.d.ts",
|
|
37
|
+
"import": "./dist/widgets/metric-callout.js",
|
|
38
|
+
"require": "./dist/widgets/metric-callout.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./widgets/metrics-table": {
|
|
41
|
+
"types": "./dist/entries/metricsTable.d.ts",
|
|
42
|
+
"import": "./dist/widgets/metrics-table.js",
|
|
43
|
+
"require": "./dist/widgets/metrics-table.cjs"
|
|
44
|
+
},
|
|
45
|
+
"./widgets/timeline": {
|
|
46
|
+
"types": "./dist/entries/timeline.d.ts",
|
|
47
|
+
"import": "./dist/widgets/timeline.js",
|
|
48
|
+
"require": "./dist/widgets/timeline.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./widgets/image-gallery": {
|
|
51
|
+
"types": "./dist/entries/imageGallery.d.ts",
|
|
52
|
+
"import": "./dist/widgets/image-gallery.js",
|
|
53
|
+
"require": "./dist/widgets/image-gallery.cjs"
|
|
54
|
+
},
|
|
55
|
+
"./widgets/contracts": {
|
|
56
|
+
"types": "./dist/entries/contracts.d.ts",
|
|
57
|
+
"import": "./dist/widgets/contracts.js",
|
|
58
|
+
"require": "./dist/widgets/contracts.cjs"
|
|
59
|
+
},
|
|
60
|
+
"./style.css": "./dist/style.css",
|
|
61
|
+
"./middleware": {
|
|
62
|
+
"types": "./dist/middleware.d.ts",
|
|
63
|
+
"import": "./dist/middleware.js",
|
|
64
|
+
"require": "./dist/middleware.cjs"
|
|
65
|
+
},
|
|
66
|
+
"./utils/tfeventsParser": {
|
|
67
|
+
"types": "./dist/utils/tfeventsParser.d.ts",
|
|
68
|
+
"import": "./dist/utils/tfeventsParser.js",
|
|
69
|
+
"require": "./dist/utils/tfeventsParser.cjs"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"dist"
|
|
74
|
+
],
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"duckdb": "^1.3.0",
|
|
77
|
+
"express": "^4.0.0 || ^5.0.0",
|
|
78
|
+
"vue": "^3.4.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependenciesMeta": {
|
|
81
|
+
"duckdb": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"vue": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"express": {
|
|
88
|
+
"optional": true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"echarts": "^6.0.0",
|
|
93
|
+
"highlight.js": "^11.11.1",
|
|
94
|
+
"marked": "^17.0.1",
|
|
95
|
+
"marked-highlight": "^2.2.3",
|
|
96
|
+
"vue-echarts": "^8.0.1",
|
|
97
|
+
"vue-use-active-scroll": "^1.1.3"
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@types/express": "^5.0.0",
|
|
101
|
+
"@types/node": "^25.0.8",
|
|
102
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
103
|
+
"duckdb": "^1.3.0",
|
|
104
|
+
"express": "^5.0.1",
|
|
105
|
+
"typescript": "~5.6.3",
|
|
106
|
+
"vite": "^6.0.3",
|
|
107
|
+
"vite-plugin-dts": "^4.3.0",
|
|
108
|
+
"vue": "^3.5.13",
|
|
109
|
+
"vue-tsc": "^2.2.0"
|
|
110
|
+
},
|
|
111
|
+
"keywords": [
|
|
112
|
+
"vue",
|
|
113
|
+
"vue3",
|
|
114
|
+
"express",
|
|
115
|
+
"middleware",
|
|
116
|
+
"reports",
|
|
117
|
+
"parquet",
|
|
118
|
+
"duckdb"
|
|
119
|
+
],
|
|
120
|
+
"license": "MIT",
|
|
121
|
+
"scripts": {
|
|
122
|
+
"dev": "vite build --watch",
|
|
123
|
+
"build": "vue-tsc -b && vite build"
|
|
124
|
+
}
|
|
125
|
+
}
|