Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
node_modules/
/dist/


# local env files
.env.local
Expand Down
459 changes: 459 additions & 0 deletions dist/src/components/CalendarHeatmap.vue.d.ts

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions dist/src/components/Heatmap.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
export interface Value {
date: Date | string;
count: number;
[x: string | number | symbol]: unknown;
}
export interface Activity {
count: number;
colorIndex: number;
raw: unknown;
}
export declare type Activities = Map<string, Activity>;
export interface CalendarItem {
date: Date;
count?: number;
colorIndex: number;
raw?: unknown;
}
export declare type Calendar = CalendarItem[][];
export interface Month {
value: number;
index: number;
}
export interface Locale {
months: string[];
days: string[];
on: string;
less: string;
more: string;
}
export declare type TooltipFormatter = (item: CalendarItem, unit: string) => string;
export declare class Heatmap {
static readonly DEFAULT_RANGE_COLOR_LIGHT: string[];
static readonly DEFAULT_RANGE_COLOR_DARK: string[];
static readonly DEFAULT_LOCALE: Locale;
static readonly DEFAULT_TOOLTIP_UNIT = "contributions";
static readonly DAYS_IN_ONE_YEAR = 365;
static readonly DAYS_IN_WEEK = 7;
static readonly SQUARE_SIZE = 10;
startDate: Date;
endDate: Date;
max: number;
private _values;
private _firstFullWeekOfMonths?;
private _activities?;
private _calendar?;
constructor(endDate: Date | string, values: Value[], max?: number);
set values(v: Value[]);
get values(): Value[];
get activities(): Activities;
get weekCount(): number;
get calendar(): Calendar;
get firstFullWeekOfMonths(): Month[];
getColorIndex(count?: number): number;
getCountEmptyDaysAtStart(): number;
getCountEmptyDaysAtEnd(): number;
getDaysCount(): number;
private shiftDate;
private parseDate;
private keyDayParser;
}
8 changes: 8 additions & 0 deletions dist/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { App } from 'vue';
declare function install(Vue: App): void;
declare const _default: {
install: typeof install;
};
export default _default;
export * from './components/Heatmap';
export { default as CalendarHeatmap } from './components/CalendarHeatmap.vue';
1 change: 1 addition & 0 deletions dist/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading