Skip to content

Commit

Permalink
ntp: favorites schemas+icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Osbourne committed Nov 4, 2024
1 parent 627d1c1 commit 93f09e0
Show file tree
Hide file tree
Showing 43 changed files with 396 additions and 17 deletions.
3 changes: 2 additions & 1 deletion special-pages/messages/new-tab/examples/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const privacyStatsData = {
* @type {import("../../../types/new-tab").StatsConfig}
*/
const minimumConfig = {
expansion: "expanded"
expansion: "expanded",
animation: { kind: "none" }
}

/**
Expand Down
3 changes: 3 additions & 0 deletions special-pages/messages/new-tab/favorites_add.notify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "./types/favorites-config.json"
}
]
}
3 changes: 3 additions & 0 deletions special-pages/messages/new-tab/favorites_getData.request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "http://json-schema.org/draft-07/schema#"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "types/favorites-data.json"
}
]
}
19 changes: 19 additions & 0 deletions special-pages/messages/new-tab/favorites_move.notify.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "./types/favorites-config.json"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "types/favorites-data.json"
}
]
}
19 changes: 19 additions & 0 deletions special-pages/messages/new-tab/favorites_open.notify.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "./types/favorites-config.json"
}
]
}
10 changes: 10 additions & 0 deletions special-pages/messages/new-tab/types/favorites-config.json
Original file line number Diff line number Diff line change
@@ -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" }
}
}
47 changes: 47 additions & 0 deletions special-pages/messages/new-tab/types/favorites-data.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
]
}
}
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/a.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/c.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/e.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/g.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/h.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/i.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/j.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/k.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/l.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/m.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/n.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions special-pages/pages/new-tab/src/letters/o.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions special-pages/pages/new-tab/src/letters/p.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions special-pages/pages/new-tab/src/letters/q.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/r.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/s.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/t.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/u.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/v.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/w.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/x.svg
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/y.svg
3 changes: 3 additions & 0 deletions special-pages/pages/new-tab/src/letters/z.svg
Loading

0 comments on commit 93f09e0

Please sign in to comment.