diff --git a/special-pages/messages/new-tab/examples/stats.js b/special-pages/messages/new-tab/examples/stats.js
index 4d23135c7..f6ec1244b 100644
--- a/special-pages/messages/new-tab/examples/stats.js
+++ b/special-pages/messages/new-tab/examples/stats.js
@@ -14,7 +14,8 @@ const privacyStatsData = {
* @type {import("../../../types/new-tab").StatsConfig}
*/
const minimumConfig = {
- expansion: "expanded"
+ expansion: "expanded",
+ animation: { kind: "none" }
}
/**
diff --git a/special-pages/messages/new-tab/favorites_add.notify.json b/special-pages/messages/new-tab/favorites_add.notify.json
new file mode 100644
index 000000000..0af74a319
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_add.notify.json
@@ -0,0 +1,3 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#"
+}
diff --git a/special-pages/messages/new-tab/favorites_getConfig.request.json b/special-pages/messages/new-tab/favorites_getConfig.request.json
new file mode 100644
index 000000000..0af74a319
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_getConfig.request.json
@@ -0,0 +1,3 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#"
+}
diff --git a/special-pages/messages/new-tab/favorites_getConfig.response.json b/special-pages/messages/new-tab/favorites_getConfig.response.json
new file mode 100644
index 000000000..cba463319
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_getConfig.response.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "allOf": [
+ {
+ "$ref": "./types/favorites-config.json"
+ }
+ ]
+}
diff --git a/special-pages/messages/new-tab/favorites_getData.request.json b/special-pages/messages/new-tab/favorites_getData.request.json
new file mode 100644
index 000000000..0af74a319
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_getData.request.json
@@ -0,0 +1,3 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#"
+}
diff --git a/special-pages/messages/new-tab/favorites_getData.response.json b/special-pages/messages/new-tab/favorites_getData.response.json
new file mode 100644
index 000000000..9f5d7f273
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_getData.response.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "allOf": [
+ {
+ "$ref": "types/favorites-data.json"
+ }
+ ]
+}
diff --git a/special-pages/messages/new-tab/favorites_move.notify.json b/special-pages/messages/new-tab/favorites_move.notify.json
new file mode 100644
index 000000000..b728005c1
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_move.notify.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Favorites Move Action",
+ "type": "object",
+ "required": [
+ "id",
+ "targetIndex"
+ ],
+ "properties": {
+ "id": {
+ "description": "Entity ID",
+ "type": "string"
+ },
+ "targetIndex": {
+ "description": "zero-indexed target",
+ "type": "number"
+ }
+ }
+}
diff --git a/special-pages/messages/new-tab/favorites_onConfigUpdate.subscribe.json b/special-pages/messages/new-tab/favorites_onConfigUpdate.subscribe.json
new file mode 100644
index 000000000..cba463319
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_onConfigUpdate.subscribe.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "allOf": [
+ {
+ "$ref": "./types/favorites-config.json"
+ }
+ ]
+}
diff --git a/special-pages/messages/new-tab/favorites_onDataUpdate.subscribe.json b/special-pages/messages/new-tab/favorites_onDataUpdate.subscribe.json
new file mode 100644
index 000000000..9f5d7f273
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_onDataUpdate.subscribe.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "allOf": [
+ {
+ "$ref": "types/favorites-data.json"
+ }
+ ]
+}
diff --git a/special-pages/messages/new-tab/favorites_open.notify.json b/special-pages/messages/new-tab/favorites_open.notify.json
new file mode 100644
index 000000000..9519d74d3
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_open.notify.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Favorites Open Action",
+ "type": "object",
+ "required": [
+ "id",
+ "target"
+ ],
+ "properties": {
+ "id": {
+ "description": "Entity ID",
+ "type": "string"
+ },
+ "target": {
+ "type": "string",
+ "enum": ["same-tab", "new-tab", "new-window"]
+ }
+ }
+}
diff --git a/special-pages/messages/new-tab/favorites_openContextMenu.notify.json b/special-pages/messages/new-tab/favorites_openContextMenu.notify.json
new file mode 100644
index 000000000..977717a80
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_openContextMenu.notify.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Favorites Open Context Menu Action",
+ "type": "object",
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "description": "Entity ID",
+ "type": "string"
+ }
+ }
+}
diff --git a/special-pages/messages/new-tab/favorites_setConfig.notify.json b/special-pages/messages/new-tab/favorites_setConfig.notify.json
new file mode 100644
index 000000000..cba463319
--- /dev/null
+++ b/special-pages/messages/new-tab/favorites_setConfig.notify.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "allOf": [
+ {
+ "$ref": "./types/favorites-config.json"
+ }
+ ]
+}
diff --git a/special-pages/messages/new-tab/types/favorites-config.json b/special-pages/messages/new-tab/types/favorites-config.json
new file mode 100644
index 000000000..ec073b2d5
--- /dev/null
+++ b/special-pages/messages/new-tab/types/favorites-config.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "FavoritesConfig",
+ "type": "object",
+ "required": ["expansion"],
+ "properties": {
+ "expansion": { "$ref": "./expansion.json" },
+ "animation": { "$ref": "./animation.json" }
+ }
+}
diff --git a/special-pages/messages/new-tab/types/favorites-data.json b/special-pages/messages/new-tab/types/favorites-data.json
new file mode 100644
index 000000000..e60a9d2da
--- /dev/null
+++ b/special-pages/messages/new-tab/types/favorites-data.json
@@ -0,0 +1,47 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "Favorites Data",
+ "type": "object",
+ "required": ["favorites"],
+ "properties": {
+ "favorites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "title": "Favorite",
+ "required": ["url", "id", "title", "favicon"],
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "favicon": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "object",
+ "title": "Favorite Favicon",
+ "required": ["src", "maxAvailableSize"],
+ "properties": {
+ "src": {
+ "type": "string"
+ },
+ "maxAvailableSize": {
+ "type": "number"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/special-pages/pages/new-tab/src/icons/ddg-favicon.png b/special-pages/pages/new-tab/src/icons/ddg-favicon.png
new file mode 100644
index 000000000..944f29d8c
Binary files /dev/null and b/special-pages/pages/new-tab/src/icons/ddg-favicon.png differ
diff --git a/special-pages/pages/new-tab/src/icons/favicon@2x.png b/special-pages/pages/new-tab/src/icons/favicon@2x.png
new file mode 100644
index 000000000..39f1168e1
Binary files /dev/null and b/special-pages/pages/new-tab/src/icons/favicon@2x.png differ
diff --git a/special-pages/pages/new-tab/src/letters/a.svg b/special-pages/pages/new-tab/src/letters/a.svg
new file mode 100644
index 000000000..5d9adf93a
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/a.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/b.svg b/special-pages/pages/new-tab/src/letters/b.svg
new file mode 100644
index 000000000..32c3d3b0e
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/b.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/c.svg b/special-pages/pages/new-tab/src/letters/c.svg
new file mode 100644
index 000000000..34da132f8
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/c.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/d.svg b/special-pages/pages/new-tab/src/letters/d.svg
new file mode 100644
index 000000000..af928aa9c
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/d.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/e.svg b/special-pages/pages/new-tab/src/letters/e.svg
new file mode 100644
index 000000000..b380439c1
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/e.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/f.svg b/special-pages/pages/new-tab/src/letters/f.svg
new file mode 100644
index 000000000..025bdf884
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/f.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/g.svg b/special-pages/pages/new-tab/src/letters/g.svg
new file mode 100644
index 000000000..d909c1309
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/g.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/h.svg b/special-pages/pages/new-tab/src/letters/h.svg
new file mode 100644
index 000000000..a7e4be16f
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/h.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/i.svg b/special-pages/pages/new-tab/src/letters/i.svg
new file mode 100644
index 000000000..7dace40ec
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/i.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/j.svg b/special-pages/pages/new-tab/src/letters/j.svg
new file mode 100644
index 000000000..7a10a2573
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/j.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/k.svg b/special-pages/pages/new-tab/src/letters/k.svg
new file mode 100644
index 000000000..00a620413
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/k.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/l.svg b/special-pages/pages/new-tab/src/letters/l.svg
new file mode 100644
index 000000000..30fa9bf79
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/l.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/m.svg b/special-pages/pages/new-tab/src/letters/m.svg
new file mode 100644
index 000000000..7519256af
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/m.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/n.svg b/special-pages/pages/new-tab/src/letters/n.svg
new file mode 100644
index 000000000..885e1be08
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/n.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/o.svg b/special-pages/pages/new-tab/src/letters/o.svg
new file mode 100644
index 000000000..9280406e5
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/o.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/p.svg b/special-pages/pages/new-tab/src/letters/p.svg
new file mode 100644
index 000000000..48b6ac9cb
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/p.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/q.svg b/special-pages/pages/new-tab/src/letters/q.svg
new file mode 100644
index 000000000..f57317031
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/q.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/r.svg b/special-pages/pages/new-tab/src/letters/r.svg
new file mode 100644
index 000000000..756612ba3
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/r.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/s.svg b/special-pages/pages/new-tab/src/letters/s.svg
new file mode 100644
index 000000000..28df39fc6
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/s.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/t.svg b/special-pages/pages/new-tab/src/letters/t.svg
new file mode 100644
index 000000000..6a05c4f8c
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/t.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/u.svg b/special-pages/pages/new-tab/src/letters/u.svg
new file mode 100644
index 000000000..8cc89161e
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/u.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/v.svg b/special-pages/pages/new-tab/src/letters/v.svg
new file mode 100644
index 000000000..f2ffde362
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/v.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/w.svg b/special-pages/pages/new-tab/src/letters/w.svg
new file mode 100644
index 000000000..21770684b
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/w.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/x.svg b/special-pages/pages/new-tab/src/letters/x.svg
new file mode 100644
index 000000000..eae7c6206
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/x.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/y.svg b/special-pages/pages/new-tab/src/letters/y.svg
new file mode 100644
index 000000000..c8da8d8b7
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/y.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/pages/new-tab/src/letters/z.svg b/special-pages/pages/new-tab/src/letters/z.svg
new file mode 100644
index 000000000..848704780
--- /dev/null
+++ b/special-pages/pages/new-tab/src/letters/z.svg
@@ -0,0 +1,3 @@
+
diff --git a/special-pages/types/new-tab.ts b/special-pages/types/new-tab.ts
index 3d87d9ebf..05258421e 100644
--- a/special-pages/types/new-tab.ts
+++ b/special-pages/types/new-tab.ts
@@ -35,6 +35,11 @@ export type RMFIcon = "Announce" | "DDGAnnounce" | "CriticalUpdate" | "AppUpdate
export interface NewTabMessages {
notifications:
| ContextMenuNotification
+ | FavoritesAddNotification
+ | FavoritesMoveNotification
+ | FavoritesOpenNotification
+ | FavoritesOpenContextMenuNotification
+ | FavoritesSetConfigNotification
| ReportInitExceptionNotification
| ReportPageExceptionNotification
| RmfDismissNotification
@@ -43,8 +48,16 @@ export interface NewTabMessages {
| StatsSetConfigNotification
| UpdateNotificationDismissNotification
| WidgetsSetConfigNotification;
- requests: InitialSetupRequest | RmfGetDataRequest | StatsGetConfigRequest | StatsGetDataRequest;
+ requests:
+ | FavoritesGetConfigRequest
+ | FavoritesGetDataRequest
+ | InitialSetupRequest
+ | RmfGetDataRequest
+ | StatsGetConfigRequest
+ | StatsGetDataRequest;
subscriptions:
+ | FavoritesOnConfigUpdateSubscription
+ | FavoritesOnDataUpdateSubscription
| RmfOnDataUpdateSubscription
| StatsOnConfigUpdateSubscription
| StatsOnDataUpdateSubscription
@@ -68,6 +81,82 @@ export interface VisibilityMenuItem {
*/
title: string;
}
+/**
+ * Generated from @see "../messages/new-tab/favorites_add.notify.json"
+ */
+export interface FavoritesAddNotification {
+ method: "favorites_add";
+}
+/**
+ * Generated from @see "../messages/new-tab/favorites_move.notify.json"
+ */
+export interface FavoritesMoveNotification {
+ method: "favorites_move";
+ params: FavoritesMoveAction;
+}
+export interface FavoritesMoveAction {
+ /**
+ * Entity ID
+ */
+ id: string;
+ /**
+ * zero-indexed target
+ */
+ targetIndex: number;
+}
+/**
+ * Generated from @see "../messages/new-tab/favorites_open.notify.json"
+ */
+export interface FavoritesOpenNotification {
+ method: "favorites_open";
+ params: FavoritesOpenAction;
+}
+export interface FavoritesOpenAction {
+ /**
+ * Entity ID
+ */
+ id: string;
+ target: "same-tab" | "new-tab" | "new-window";
+}
+/**
+ * Generated from @see "../messages/new-tab/favorites_openContextMenu.notify.json"
+ */
+export interface FavoritesOpenContextMenuNotification {
+ method: "favorites_openContextMenu";
+ params: FavoritesOpenContextMenuAction;
+}
+export interface FavoritesOpenContextMenuAction {
+ /**
+ * Entity ID
+ */
+ id: string;
+}
+/**
+ * Generated from @see "../messages/new-tab/favorites_setConfig.notify.json"
+ */
+export interface FavoritesSetConfigNotification {
+ method: "favorites_setConfig";
+ params: FavoritesConfig;
+}
+export interface FavoritesConfig {
+ expansion: Expansion;
+ animation?: Animation;
+}
+export interface None {
+ kind: "none";
+}
+/**
+ * Use CSS view transitions where available
+ */
+export interface ViewTransitions {
+ kind: "view-transitions";
+}
+/**
+ * Use the auto-animate library to provide default animation styles
+ */
+export interface Auto {
+ kind: "auto-animate";
+}
/**
* Generated from @see "../messages/new-tab/reportInitException.notify.json"
*/
@@ -129,21 +218,6 @@ export interface StatsConfig {
expansion: Expansion;
animation?: Animation;
}
-export interface None {
- kind: "none";
-}
-/**
- * Use CSS view transitions where available
- */
-export interface ViewTransitions {
- kind: "view-transitions";
-}
-/**
- * Use the auto-animate library to provide default animation styles
- */
-export interface Auto {
- kind: "auto-animate";
-}
/**
* Generated from @see "../messages/new-tab/updateNotification_dismiss.notify.json"
*/
@@ -164,6 +238,33 @@ export interface WidgetConfigItem {
id: string;
visibility: WidgetVisibility;
}
+/**
+ * Generated from @see "../messages/new-tab/favorites_getConfig.request.json"
+ */
+export interface FavoritesGetConfigRequest {
+ method: "favorites_getConfig";
+ result: FavoritesConfig;
+}
+/**
+ * Generated from @see "../messages/new-tab/favorites_getData.request.json"
+ */
+export interface FavoritesGetDataRequest {
+ method: "favorites_getData";
+ result: FavoritesData;
+}
+export interface FavoritesData {
+ favorites: Favorite[];
+}
+export interface Favorite {
+ url: string;
+ id: string;
+ title: string;
+ favicon: null | FavoriteFavicon;
+}
+export interface FavoriteFavicon {
+ src: string;
+ maxAvailableSize: number;
+}
/**
* Generated from @see "../messages/new-tab/initialSetup.request.json"
*/
@@ -262,6 +363,20 @@ export interface TrackerCompany {
displayName: string;
count: number;
}
+/**
+ * Generated from @see "../messages/new-tab/favorites_onConfigUpdate.subscribe.json"
+ */
+export interface FavoritesOnConfigUpdateSubscription {
+ subscriptionEvent: "favorites_onConfigUpdate";
+ params: FavoritesConfig;
+}
+/**
+ * Generated from @see "../messages/new-tab/favorites_onDataUpdate.subscribe.json"
+ */
+export interface FavoritesOnDataUpdateSubscription {
+ subscriptionEvent: "favorites_onDataUpdate";
+ params: FavoritesData;
+}
/**
* Generated from @see "../messages/new-tab/rmf_onDataUpdate.subscribe.json"
*/