Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
initial code
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Apr 4, 2017
1 parent 18b2ad9 commit 3051bea
Show file tree
Hide file tree
Showing 9 changed files with 766 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-w", "-p", "."],
"showOutput": "silent",
"isBackground": true,
"problemMatcher": "$tsc-watch"
}
69 changes: 69 additions & 0 deletions built/cardinal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
export declare type TwitterCard = SummaryCard | AppCard | PlayerCard | AmplifyCard;
export interface ValueOrId {
value?: string;
id?: string;
}
export declare function parse(html: string, origin: string): TwitterCard;
export interface SummaryCard {
card: "summary" | "summary_large_image";
origin: string;
/** The Twitter @username the card is attributed to. */
site: ValueOrId;
/** A concise title for the related content. */
title: string;
/** A description that concisely summarizes the content as appropriate for presentation within a Tweet. */
description: string;
/** A URL to a unique image representing the content of the page. */
image: string | null;
/** A text description of the image conveying the essential nature of an image to users who are visually impaired. */
imageAlt: string | null;
}
export interface AppCard {
card: "app";
site: ValueOrId;
description: string;
country: string;
appId: AppStoreData;
appUrl: AppStoreData;
}
export interface AppStoreData {
iphone: string;
ipad: string;
googleplay: string;
}
export interface PlayerCard {
card: "player";
/** The title of the content */
title: string;
/** The Twitter @username the card is attributed to */
site: ValueOrId;
/** A description of the content */
description: string;
player: string;
playerWidth: number;
playerHeight: number;
image: string;
imageAlt: string;
playerStream: string;
playerStreamContentType: string;
}
export interface AmplifyCard {
card: "amplify";
site: ValueOrId;
title: string;
description: string;
imageSrc: string;
imageWidth: number;
imageHeight: number;
amplifyVmap: string;
amplifyTeaserSegmentsStream: string;
amplifyContentId: string;
playerWidth: number;
playerHeight: number;
playerStreamContentType: string;
amplifyEmbeddable: boolean;
amplifyDynamicAds: boolean;
amplifyContentDurationSeconds: number;
amplifyShareId: string;
}
export declare function parseAmplify(head: HTMLHeadElement): AmplifyCard;
167 changes: 167 additions & 0 deletions built/cardinal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions built/cardinal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3051bea

Please sign in to comment.