forked from Robert-Fairley/apple-news-format
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove deprecated and unsupported interfaces
* Add new interfaces and previously missed interfaces * Update URI validation method, wraps around native URL class and references supported extensions list * Add changelog
- Loading branch information
1 parent
97a5075
commit 10c1871
Showing
36 changed files
with
227 additions
and
142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Changelog | ||
|
||
## v0.3.0 - December 4, 2021 | ||
|
||
This should bring the individual components more or less up to date, but what's lacking is a more thorough audit to be certain. | ||
|
||
Some components may still not be exposed at the root level except through the global namespace `Component`. | ||
|
||
#### Changes: | ||
* Globally exposed component renamed `Facebook` -> `FacebookPost` to match Apple's spec | ||
* Updated URI validation method. Now wraps around native URL class and checks against a list of valid file extensions - these may need updating. Couldn't find a canonical list of all valid file types | ||
* Added `ColorSchema` interface. | ||
* Removed unsupported advertisement classes: `MediumRectangleAdvertisement` and `BannerAdvertisment` | ||
* Add missing fields to several A/V components | ||
* Other minor housecleaning changes |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Object containing information about document color scheme and dark mode. | ||
* @see https://developer.apple.com/documentation/apple_news/articledocument/colorscheme | ||
*/ | ||
export interface ColorScheme { | ||
automaticDarkModeEnabled?: boolean; | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
export { BannerAdvertisement } from "./banner-advertisement"; | ||
export { MediumRectangleAdvertisement } from "./medium-rectangle-advertisement"; | ||
export { ReplicaAdvertisement } from "./replica-advertisement"; |
10 changes: 0 additions & 10 deletions
10
src/components/advertisements/medium-rectangle-advertisement.ts
This file was deleted.
Oops, something went wrong.
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 @@ | ||
import { Component, ComponentLink } from ".."; | ||
import { URI } from "../../primitives"; | ||
|
||
export interface ReplicaAdvertisement extends Component { | ||
role: "replica_advertisement"; | ||
URL: URI; | ||
accessibilityCaption?: string; | ||
additions?: ComponentLink[]; | ||
caption?: string; | ||
explicitContent?: boolean; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component } from ".."; | ||
import { URI } from "../../primitives"; | ||
import { ComponentStyle } from "../../styles/component-styles"; | ||
import { ComponentTextStyle } from "../../styles/text-styles"; | ||
|
||
/** | ||
* @see https://developer.apple.com/documentation/apple_news/linkbutton | ||
*/ | ||
export interface LinkButton extends Component { | ||
role: "link_button"; | ||
URL: URI; | ||
accessibilityLabel?: string; | ||
text?: string; | ||
textStyle?: ComponentTextStyle | string; | ||
} |
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { Audio } from "./audio"; | ||
export { EmbedWebVideo } from "./embed-web-video"; | ||
export { Music } from "./music"; | ||
export { Podcast } from "./podcast"; | ||
export { Video } from "./video"; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { AudioVideoComponent } from "./audio-video-component"; | ||
|
||
export type PodcastOrientation | ||
= "horizontal" | ||
| "automatic"; | ||
|
||
export type PodcastTheme | ||
= "light" | ||
| "dark" | ||
| "automatic"; | ||
|
||
export interface Podcast extends AudioVideoComponent { | ||
orientation: PodcastOrientation; | ||
theme: PodcastTheme; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { SocialMediaComponent } from "./social-media-component"; | ||
|
||
/** | ||
* @see https://developer.apple.com/documentation/apple_news/facebookpost | ||
*/ | ||
export interface FacebookPost extends SocialMediaComponent { | ||
role: "facebook_post"; | ||
} |
Oops, something went wrong.