-
Notifications
You must be signed in to change notification settings - Fork 279
Expand file tree
/
Copy pathFeature_Notification.rei
More file actions
124 lines (96 loc) · 2.11 KB
/
Copy pathFeature_Notification.rei
File metadata and controls
124 lines (96 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
open Oni_Core;
// MODEL
[@deriving show]
type kind =
| Info
| Warning
| Error;
[@deriving show]
type notification = {
id: int,
kind,
message: string,
source: option(string),
yOffset: float,
ephemeral: bool,
};
type model;
let initial: model;
let active: model => list(notification);
let all: model => list(notification);
let count: model => int;
let statusBarBackground:
(~theme: ColorTheme.Colors.t, model) => Revery.Color.t;
let statusBarForeground:
(~theme: ColorTheme.Colors.t, model) => Revery.Color.t;
// UPDATE
[@deriving show]
type msg;
module Msg: {let clear: int => msg;};
let update:
(
~theme: Oni_Core.ColorTheme.Colors.t,
~config: Oni_Core.Config.resolver,
model,
msg
) =>
model;
let changeTheme:
(
~config: Oni_Core.Config.resolver,
~theme: Oni_Core.ColorTheme.Colors.t,
model
) =>
model;
// EFFECTS
module Effects: {
let create:
(~ephemeral: bool=?, ~kind: kind=?, ~source: string=?, string) =>
Isolinear.Effect.t(msg);
let dismiss: notification => Isolinear.Effect.t(msg);
let clear: unit => Isolinear.Effect.t(msg);
};
// SUBSCRIPTION
let sub: model => Isolinear.Sub.t(msg);
// COLORS
module Colors: {
let backgroundFor: notification => ColorTheme.Schema.definition;
let foregroundFor: notification => ColorTheme.Schema.definition;
};
// ANIMATIONS
module Animations: {
let transitionDuration: Revery.Time.t;
let totalDuration: Revery.Time.t;
};
// VIEW
module View: {
open Revery;
open Revery.UI;
module Popup: {
let make:
(
~key: React.Key.t=?,
~model: notification,
~background: Color.t,
~foreground: Color.t,
~font: UiFont.t,
~onlyAnimation: bool,
~compact: bool,
unit
) =>
React.element(React.node);
};
module Item: {
let make:
(
~notification: notification,
~theme: ColorTheme.Colors.t,
~font: UiFont.t,
~onDismiss: unit => unit,
unit
) =>
React.element(React.node);
};
};
// CONTRIBUTIONS
module Contributions: {let colors: list(ColorTheme.Schema.definition);};