Skip to content

Commit

Permalink
Merge pull request #1484 from palantir/release-v0.40.0
Browse files Browse the repository at this point in the history
Release v0.40.0 (--> master)
  • Loading branch information
jtlan committed Dec 20, 2014
2 parents 0488fb1 + d743155 commit 22974cc
Show file tree
Hide file tree
Showing 111 changed files with 5,738 additions and 2,809 deletions.
7 changes: 6 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = function(grunt) {
}
},
verify_d_ts: {
src: ["typings/d3/d3.d.ts", "plottable.d.ts"]
src: ["typings/d3/d3.d.ts", "plottable.d.ts", "bower_components/svg-typewriter/svgtypewriter.d.ts"]
}
};

Expand Down Expand Up @@ -174,6 +174,10 @@ module.exports = function(grunt) {
}),
dest: "build/plottable.d.ts",
},
svgtypewriter: {
src: ["plottable.js", "bower_components/svg-typewriter/svgtypewriter.js"],
dest: "plottable.js",
},
},
ts: tsJSON,
tslint: {
Expand Down Expand Up @@ -328,6 +332,7 @@ module.exports = function(grunt) {
"update_test_ts_files",
"ts:dev",
"concat:plottable",
"concat:svgtypewriter",
"concat:definitions",
"sed:definitions",
"sed:private_definitions",
Expand Down
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "plottable",
"description": "A library for creating charts out of D3",
"version": "0.39.0",
"version": "0.40.0",
"main": ["plottable.js", "plottable.css"],
"license": "MIT",
"ignore": [
Expand All @@ -28,7 +28,8 @@
"plots"
],
"dependencies": {
"d3": "3.4.13"
"d3": "3.4.13",
"svg-typewriter": "0.1.10"
},
"homepage": "plottablejs.org",
"repository": {
Expand Down
51 changes: 51 additions & 0 deletions bower_components/svg-typewriter/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "svg-typewriter",
"description": "A library for measuring, manipulating, and writing text on SVG.",
"version": "0.1.10",
"main": [
"svgtypewriter.js"
],
"license": "MIT",
"ignore": [
"**/*",
"!bower.json",
"!svgtypewriter.js",
"!svgtypewriter.min.js",
"!svgtypewriter.d.ts"
],
"keywords": [
"svgtypewriter",
"svgtypewriterjs",
"svgtypewriter.js",
"d3",
"text",
"measurer",
"wrapper",
"animation",
"visualization"
],
"dependencies": {
"d3": "3.4.13"
},
"homepage": "http://palantir.github.io/svg-typewriter/",
"repository": {
"type": "git",
"url": "git://github.com/palantir/svg-typewriter.git"
},
"devDependencies": {
"chai": "1.9.0",
"mocha": "1.17.1",
"jQuery": "2.1.0",
"jquery.simulate": "1.2.0",
"lodash": "~2.4.1"
},
"_release": "0.1.10",
"_resolution": {
"type": "version",
"tag": "v0.1.10",
"commit": "6514676473d32d44081018e1219aa8b7596c68c1"
},
"_source": "git://github.com/palantir/svg-typewriter.git",
"_target": "0.1.10",
"_originalSource": "svg-typewriter"
}
40 changes: 40 additions & 0 deletions bower_components/svg-typewriter/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "svg-typewriter",
"description": "A library for measuring, manipulating, and writing text on SVG.",
"version": "0.1.10",
"main": ["svgtypewriter.js"],
"license": "MIT",
"ignore": [
"**/*",
"!bower.json",
"!svgtypewriter.js",
"!svgtypewriter.min.js",
"!svgtypewriter.d.ts"
],
"keywords": [
"svgtypewriter",
"svgtypewriterjs",
"svgtypewriter.js",
"d3",
"text",
"measurer",
"wrapper",
"animation",
"visualization"
],
"dependencies": {
"d3": "3.4.13"
},
"homepage": "http://palantir.github.io/svg-typewriter/",
"repository": {
"type": "git",
"url": "git://github.com/palantir/svg-typewriter.git"
},
"devDependencies": {
"chai": "1.9.0",
"mocha": "1.17.1",
"jQuery": "2.1.0",
"jquery.simulate": "1.2.0",
"lodash": "~2.4.1"
}
}
211 changes: 211 additions & 0 deletions bower_components/svg-typewriter/svgtypewriter.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@

declare module SVGTypewriter.Utils.Methods {
/**
* Check if two arrays are equal by strict equality.
*/
function arrayEq<T>(a: T[], b: T[]): boolean;
/**
* @param {any} a Object to check against b for equality.
* @param {any} b Object to check against a for equality.
*
* @returns {boolean} whether or not two objects share the same keys, and
* values associated with those keys. Values will be compared
* with ===.
*/
function objEq(a: any, b: any): boolean;
}

declare module SVGTypewriter.Utils.DOM {
function transform(s: D3.Selection, x?: number, y?: number): any;
function getBBox(element: D3.Selection): SVGRect;
}


declare module SVGTypewriter.Utils {
class Cache<T> {
/**
* @constructor
*
* @param {string} compute The function whose results will be cached.
* @param {(v: T, w: T) => boolean} [valueEq]
* Used to determine if the value of canonicalKey has changed.
* If omitted, defaults to === comparision.
*/
constructor(compute: (k: string) => T, valueEq?: (v: T, w: T) => boolean);
/**
* Attempt to look up k in the cache, computing the result if it isn't
* found.
*
* @param {string} k The key to look up in the cache.
* @return {T} The value associated with k; the result of compute(k).
*/
get(k: string): T;
/**
* Reset the cache empty.
*
* @return {Cache<T>} The calling Cache.
*/
clear(): Cache<T>;
}
}


declare module SVGTypewriter.Utils {
class Tokenizer {
tokenize(line: string): string[];
}
}


declare module SVGTypewriter.Utils.StringMethods {
/**
* Treat all sequences of consecutive whitespace as a single " ".
*/
function combineWhitespace(str: string): string;
function isNotEmptyString(str: string): boolean;
function trimStart(str: string, c?: string): string;
function trimEnd(str: string, c?: string): string;
}


declare module SVGTypewriter.Animators {
class BaseAnimator {
/**
* The default duration of the animation in milliseconds
*/
static DEFAULT_DURATION_MILLISECONDS: number;
/**
* The default easing of the animation
*/
static DEFAULT_EASING: string;
constructor();
animate(selection: D3.Selection): any;
_animate(selection: D3.Selection, attr: any): D3.Transition.Transition;
duration(): number;
duration(duration: number): BaseAnimator;
moveX(): number;
moveX(shift: number): BaseAnimator;
moveY(): number;
moveY(shift: number): BaseAnimator;
delay(): number;
delay(delay: number): BaseAnimator;
easing(): string;
easing(easing: string): BaseAnimator;
}
}


declare module SVGTypewriter.Animators {
class UnveilAnimator extends BaseAnimator {
constructor();
direction(): string;
direction(direction: string): UnveilAnimator;
animate(selection: any): any;
}
}


declare module SVGTypewriter.Animators {
class OpacityAnimator extends BaseAnimator {
animate(selection: D3.Selection): any;
}
}


declare module SVGTypewriter.Wrappers {
interface WrappingResult {
originalText: string;
wrappedText: string;
noLines: number;
noBrokeWords: number;
truncatedText: string;
}
class Wrapper {
_breakingCharacter: string;
constructor();
maxLines(): number;
maxLines(noLines: number): Wrapper;
textTrimming(): string;
textTrimming(option: string): Wrapper;
allowBreakingWords(): boolean;
allowBreakingWords(allow: boolean): Wrapper;
wrap(text: string, measurer: Measurers.AbstractMeasurer, width: number, height?: number): WrappingResult;
}
}


declare module SVGTypewriter.Wrappers {
class SingleLineWrapper extends Wrapper {
wrap(text: string, measurer: Measurers.AbstractMeasurer, width: number, height?: number): WrappingResult;
}
}


declare module SVGTypewriter.Writers {
interface WriteOptions {
selection: D3.Selection;
xAlign: string;
yAlign: string;
textRotation: number;
animator?: Animators.BaseAnimator;
}
class Writer {
_writerID: number;
_elementID: number;
constructor(measurer: Measurers.AbstractMeasurer, wrapper?: Wrappers.Wrapper);
measurer(newMeasurer: Measurers.AbstractMeasurer): Writer;
wrapper(newWrapper: Wrappers.Wrapper): Writer;
addTitleElement(add: boolean): Writer;
write(text: string, width: number, height: number, options: WriteOptions): void;
}
}


declare module SVGTypewriter.Measurers {
/**
* Dimension of area's BBox.
*/
interface Dimensions {
width: number;
height: number;
}
class AbstractMeasurer {
static HEIGHT_TEXT: string;
constructor(area: D3.Selection, className?: string);
measure(text?: string): Dimensions;
}
}


declare module SVGTypewriter.Measurers {
class Measurer extends AbstractMeasurer {
constructor(area: D3.Selection, className?: string, useGuards?: boolean);
_addGuards(text: string): string;
_measureLine(line: string): Dimensions;
measure(text?: string): {
width: number;
height: number;
};
}
}


declare module SVGTypewriter.Measurers {
class CharacterMeasurer extends Measurer {
_measureCharacter(c: string): Dimensions;
_measureLine(line: string): {
width: number;
height: number;
};
}
}


declare module SVGTypewriter.Measurers {
class CacheCharacterMeasurer extends CharacterMeasurer {
constructor(area: D3.Selection, className?: string);
_measureCharacterNotFromCache(c: string): Dimensions;
_measureCharacter(c: string): Dimensions;
reset(): void;
}
}
Loading

0 comments on commit 22974cc

Please sign in to comment.