PluginProbe
Code Snippets / 4.0.0-beta.3
Code Snippets v4.0.0-beta.3
4.0.0-beta.3 4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 All 66 releases
code-snippets / js / types / Stats.ts

Stats.ts in Code Snippets 4.0.0-beta.3, at js/types/Stats.ts

35 lines 1009 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import type { SnippetScope, SnippetType } from './Snippet'
2
3 export type StatsChartKey = 'total' | StatsConfigurableChartKey
4
5 export type StatsConfigurableChartKey = 'type' | 'activation' | 'conditions' | 'location' | 'tags'
6
7 export type StatsChartView = 'pie' | 'bar' | 'cloud'
8
9 export type StatsChartViews = Readonly<{
10 type: 'pie' | 'bar'
11 activation: 'pie' | 'bar'
12 conditions: 'pie' | 'bar'
13 location: 'pie' | 'bar'
14 tags: 'bar' | 'cloud'
15 }>
16
17 export interface StatsChartEntry {
18 readonly label: string
19 readonly count: number | string
20 readonly url?: string
21 }
22
23 export interface StatsSummary {
24 readonly active: number | string
25 readonly inactive: number | string
26 readonly typeCounts: Readonly<Record<SnippetType, StatsChartEntry>>
27 readonly conditionCounts: Readonly<Record<string, StatsChartEntry>>
28 readonly locationCounts: Readonly<Record<SnippetScope, number>>
29 readonly tagCounts: Readonly<Record<string, StatsChartEntry>>
30 }
31
32 export interface StatsChartPreferencesSchema {
33 views: StatsChartViews
34 }
35