-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ntp: customizer data/messages (#1328)
- Loading branch information
1 parent
1068bf5
commit 8a25d52
Showing
36 changed files
with
807 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
special-pages/pages/new-tab/messages/customizer_deleteImage.notify.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"required": [ | ||
"id" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
special-pages/pages/new-tab/messages/customizer_onBackgroundUpdate.subscribe.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/background-data.json" | ||
} | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
special-pages/pages/new-tab/messages/customizer_onColorUpdate.subscribe.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/user-color-data.json" | ||
} | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
special-pages/pages/new-tab/messages/customizer_onImagesUpdate.subscribe.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/user-image-data.json" | ||
} | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
special-pages/pages/new-tab/messages/customizer_onThemeUpdate.subscribe.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/theme-data.json" | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
special-pages/pages/new-tab/messages/customizer_setBackground.notify.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"required": [ | ||
"background" | ||
], | ||
"properties": { | ||
"background": { | ||
"$ref": "./types/background.json#/definitions/background-variant" | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
special-pages/pages/new-tab/messages/customizer_setTheme.notify.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"required": ["theme"], | ||
"properties": { | ||
"theme": { | ||
"$ref": "types/browser-theme.json" | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
special-pages/pages/new-tab/messages/customizer_upload.notify.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
special-pages/pages/new-tab/messages/types/background-data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Background Data", | ||
"type": "object", | ||
"required": ["background"], | ||
"properties": { | ||
"background": { | ||
"$ref": "./background.json#/definitions/background-variant" | ||
} | ||
} | ||
} |
101 changes: 101 additions & 0 deletions
101
special-pages/pages/new-tab/messages/types/background.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"background-variant": { | ||
"title": "Background Variant", | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/definitions/default" | ||
}, | ||
{ | ||
"$ref": "#/definitions/solid" | ||
}, | ||
{ | ||
"$ref": "#/definitions/hex" | ||
}, | ||
{ | ||
"$ref": "#/definitions/gradient" | ||
}, | ||
{ | ||
"$ref": "#/definitions/image" | ||
} | ||
] | ||
}, | ||
"default": { | ||
"type": "object", | ||
"required": [ | ||
"kind" | ||
], | ||
"title": "Default Background", | ||
"properties": { | ||
"kind": { | ||
"const": "default" | ||
} | ||
} | ||
}, | ||
"solid": { | ||
"type": "object", | ||
"required": [ | ||
"kind", | ||
"value" | ||
], | ||
"title": "Solid Color Background", | ||
"properties": { | ||
"kind": { | ||
"const": "color" | ||
}, | ||
"value": { | ||
"$ref": "./colors.json#/definitions/colors" | ||
} | ||
} | ||
}, | ||
"hex": { | ||
"type": "object", | ||
"required": [ | ||
"kind", | ||
"value" | ||
], | ||
"title": "Hex Value Background", | ||
"properties": { | ||
"kind": { | ||
"const": "hex" | ||
}, | ||
"value": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"gradient": { | ||
"type": "object", | ||
"required": [ | ||
"kind", | ||
"value" | ||
], | ||
"title": "Gradient Background", | ||
"properties": { | ||
"kind": { | ||
"const": "gradient" | ||
}, | ||
"value": { | ||
"$ref": "./colors.json#/definitions/gradients" | ||
} | ||
} | ||
}, | ||
"image": { | ||
"type": "object", | ||
"required": [ | ||
"kind", | ||
"value" | ||
], | ||
"title": "User Image Background", | ||
"properties": { | ||
"kind": { | ||
"const": "userImage" | ||
}, | ||
"value": { | ||
"$ref": "./user-image.json" | ||
} | ||
} | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
special-pages/pages/new-tab/messages/types/browser-theme.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Browser Theme", | ||
"enum": [ | ||
"light", | ||
"dark", | ||
"system" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"gradients": { | ||
"title": "Predefined Gradient", | ||
"enum": [ | ||
"gradient01", | ||
"gradient02", | ||
"gradient03", | ||
"gradient04", | ||
"gradient05", | ||
"gradient06", | ||
"gradient07", | ||
"gradient08" | ||
] | ||
}, | ||
"colors": { | ||
"title": "Predefined Color", | ||
"enum": [ | ||
"color01", | ||
"color02", | ||
"color03", | ||
"color04", | ||
"color05", | ||
"color06", | ||
"color07", | ||
"color08", | ||
"color09", | ||
"color10", | ||
"color11", | ||
"color12", | ||
"color13", | ||
"color14", | ||
"color15", | ||
"color16", | ||
"color17", | ||
"color18", | ||
"color19" | ||
] | ||
}, | ||
"colorScheme": { | ||
"title": "Background Color Scheme", | ||
"description": "Note: this is different to the Browser Theme", | ||
"enum": ["light", "dark"] | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
special-pages/pages/new-tab/messages/types/customizer-data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Customizer Data", | ||
"type": "object", | ||
"required": [ | ||
"background", | ||
"theme", | ||
"userImages", | ||
"userColor" | ||
], | ||
"properties": { | ||
"background": {"$ref": "./background.json#/definitions/background-variant"}, | ||
"theme": { "$ref": "./browser-theme.json" }, | ||
"userImages": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "./user-image.json" | ||
} | ||
}, | ||
"userColor": { | ||
"$ref": "./user-color-data.json#/definitions/userColor" | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
special-pages/pages/new-tab/messages/types/theme-data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"required": [ | ||
"theme" | ||
], | ||
"properties": { | ||
"theme": { | ||
"$ref": "./browser-theme.json" | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
special-pages/pages/new-tab/messages/types/user-color-data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "User Color Data", | ||
"type": "object", | ||
"required": [ | ||
"userColor" | ||
], | ||
"properties": { | ||
"userColor": {"$ref": "#/definitions/userColor"} | ||
}, | ||
"definitions": { | ||
"userColor": { | ||
"oneOf": [ | ||
{"type": "null"}, | ||
{"$ref": "./background.json#/definitions/hex"} | ||
] | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
special-pages/pages/new-tab/messages/types/user-image-data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "User Image Data", | ||
"type": "object", | ||
"required": [ | ||
"userImages" | ||
], | ||
"properties": { | ||
"userImages": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "./user-image.json" | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
special-pages/pages/new-tab/messages/types/user-image.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "UserImage", | ||
"type": "object", | ||
"required": ["id", "colorScheme", "src", "thumb"], | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"src": { | ||
"type": "string" | ||
}, | ||
"thumb": { | ||
"type": "string" | ||
}, | ||
"colorScheme": { | ||
"$ref": "./colors.json#/definitions/colorScheme" | ||
} | ||
} | ||
} |
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.
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.
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.
Oops, something went wrong.