Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wsick/Fayde
Browse files Browse the repository at this point in the history
Conflicts:
	dist/fayde.js
	dist/fayde.js.map
  • Loading branch information
BSick7 committed Feb 25, 2015
1 parent d1723f6 commit 09a9005
Show file tree
Hide file tree
Showing 18 changed files with 267 additions and 98 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ before_install:
- npm install -g grunt-cli
- npm install -g bower
- npm install -g fayde-unify
before_script: grunt symlink:test
script: grunt test --verbose
install:
- npm install
- bower install
- bower install
before_script: grunt symlink:test
script: grunt test --verbose
5 changes: 0 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ module.exports = function (grunt) {
directory: "lib"
}
},
setup: {
fayde: {
cwd: '.'
}
},
symlink: {
options: {
overwrite: true
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 BSick7

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Fayde

[![Build Status](https://travis-ci.org/wsick/Fayde.svg?branch=master)](https://travis-ci.org/wsick/Fayde)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/wsick/Fayde?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fayde",
"version": "0.16.15",
"version": "0.16.18",
"main": "dist/fayde.js",
"homepage": "http://fayde.wsick.com",
"authors": [
Expand Down Expand Up @@ -28,4 +28,4 @@
"devDependencies": {
"qunit": "~1.15.0"
}
}
}
11 changes: 8 additions & 3 deletions dist/fayde.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3666,6 +3666,12 @@ declare module Fayde.Input {
constructor(position: Point, force: number);
}
}
declare module Fayde.Input {
class VirtualKeyboard {
static Init(): void;
static Launch(): void;
}
}
declare class TimeSpan {
static _TicksPerMillisecond: number;
static _TicksPerSecond: number;
Expand Down Expand Up @@ -3718,8 +3724,8 @@ declare enum DayOfWeek {
Saturday = 6,
}
declare enum DateTimeKind {
Local = 0,
Unspecified = 1,
Unspecified = 0,
Local = 1,
Utc = 2,
}
declare class DateTime {
Expand All @@ -3735,7 +3741,6 @@ declare class DateTime {
private _Kind;
constructor();
constructor(ticks: number);
constructor(ticks: number, kind: DateTimeKind);
constructor(year: number, month: number, day: number);
constructor(year: number, month: number, day: number, hour: number, minute: number, second: number);
constructor(year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number);
Expand Down
111 changes: 80 additions & 31 deletions dist/fayde.js
Original file line number Diff line number Diff line change
Expand Up @@ -6469,7 +6469,7 @@ var Fayde;
}
Markup.Load = Load;
function LoadImpl(app, xm, resources, bindingSource) {
perfex.timer.start('MarkupLoad', xm.uri);
perfex.timer.start('MarkupLoad', xm.uri.toString());
var oresolve = {
isPrimitive: false,
type: undefined
Expand Down Expand Up @@ -9118,7 +9118,8 @@ var Fayde;
start = this.$Advancer.CursorPrevChar(cursor);
length = cursor - start;
}
return proxy.removeText(start, length);
proxy.removeText(start, length);
return true;
};
TextBoxBase.prototype._KeyDownDelete = function (modifiers) {
if (modifiers.Shift || modifiers.Alt)
Expand Down Expand Up @@ -16093,7 +16094,7 @@ var Fayde;
return args;
};
IEKeyInterop.prototype.CreateArgsDown = function (e) {
if (e["char"] && e.keyCode !== 8)
if (e["char"] && e.keyCode !== 8 && e.keyCode !== 9)
return;
var modifiers = {
Shift: e.shiftKey,
Expand Down Expand Up @@ -16920,6 +16921,34 @@ var Fayde;
Fayde.CoreLibrary.add(TouchPoint);
})(Input = Fayde.Input || (Fayde.Input = {}));
})(Fayde || (Fayde = {}));
var Fayde;
(function (Fayde) {
var Input;
(function (Input) {
var keyboardInput;
var VirtualKeyboard = (function () {
function VirtualKeyboard() {
}
VirtualKeyboard.Init = function () {
keyboardInput = document.createElement('input');
keyboardInput.type = "text";
var style = keyboardInput.style;
style.opacity = "0";
style.cssFloat = "left";
style.width = "0";
style.height = "0";
style.borderWidth = "0";
document.body.insertBefore(keyboardInput, document.body.firstElementChild);
};
VirtualKeyboard.Launch = function () {
console.log("Launch");
keyboardInput.focus();
};
return VirtualKeyboard;
})();
Input.VirtualKeyboard = VirtualKeyboard;
})(Input = Fayde.Input || (Fayde.Input = {}));
})(Fayde || (Fayde = {}));
var TimeSpan = (function () {
function TimeSpan() {
var args = [];
Expand Down Expand Up @@ -17182,8 +17211,8 @@ var DayOfWeek;
Fayde.CoreLibrary.addEnum(DayOfWeek, "DayOfWeek");
var DateTimeKind;
(function (DateTimeKind) {
DateTimeKind[DateTimeKind["Local"] = 0] = "Local";
DateTimeKind[DateTimeKind["Unspecified"] = 1] = "Unspecified";
DateTimeKind[DateTimeKind["Unspecified"] = 0] = "Unspecified";
DateTimeKind[DateTimeKind["Local"] = 1] = "Local";
DateTimeKind[DateTimeKind["Utc"] = 2] = "Utc";
})(DateTimeKind || (DateTimeKind = {}));
Fayde.CoreLibrary.addEnum(DateTimeKind, "DateTimeKind");
Expand All @@ -17195,7 +17224,7 @@ var DateTime = (function () {
}
this._InternalDate = null;
var ticks = null;
var kind = 1 /* Unspecified */;
var kind = 0 /* Unspecified */;
var year = 0;
var month = 0;
var day = 0;
Expand All @@ -17205,10 +17234,7 @@ var DateTime = (function () {
var millisecond = 0;
if (args.length === 1) {
ticks = args[0];
}
else if (args.length === 2) {
ticks = args[0];
kind = args[1];
kind = 2 /* Utc */;
}
else if (args.length === 3) {
year = args[0];
Expand Down Expand Up @@ -17245,29 +17271,26 @@ var DateTime = (function () {
else {
ticks = 0;
}
this._Kind = kind == null ? 0 /* Unspecified */ : kind;
if (ticks != null) {
this._InternalDate = new Date(ticks);
return;
}
var id = this._InternalDate = new Date();
if (kind === 2 /* Utc */) {
id.setUTCFullYear(year, month - 1, day);
id.setUTCHours(hour);
id.setUTCMinutes(minute);
id.setUTCSeconds(second);
id.setMilliseconds(millisecond);
}
else {
var id = this._InternalDate = new Date();
id.setFullYear(year, month - 1, day);
id.setHours(hour);
id.setMinutes(minute);
id.setSeconds(second);
id.setMilliseconds(millisecond);
}
switch (kind) {
case 0:
this._Kind = 0 /* Local */;
break;
default:
case 1:
this._Kind = 1 /* Unspecified */;
break;
case 2:
this._Kind = 2 /* Utc */;
break;
}
}
Object.defineProperty(DateTime, "MinValue", {
get: function () {
Expand Down Expand Up @@ -17329,26 +17352,38 @@ var DateTime = (function () {
get: function () {
var t = this._InternalDate.getTime();
if (t <= DateTime._MinDateTicks)
return new DateTime(DateTime._MinDateTicks, this.Kind);
return new DateTime(DateTime._MinDateTicks);
var d = new Date(t);
d.setHours(0);
d.setMinutes(0);
d.setSeconds(0);
d.setMilliseconds(0);
return new DateTime(d.getTime(), this.Kind);
if (this._Kind === 2 /* Utc */) {
d.setUTCHours(0);
d.setUTCMinutes(0);
d.setUTCSeconds(0);
d.setUTCMilliseconds(0);
}
else {
d.setHours(0);
d.setMinutes(0);
d.setSeconds(0);
d.setMilliseconds(0);
}
return new DateTime(d.getTime());
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateTime.prototype, "Day", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCDate();
return this._InternalDate.getDate();
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateTime.prototype, "DayOfWeek", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCDay();
return this._InternalDate.getDay();
},
enumerable: true,
Expand All @@ -17366,34 +17401,44 @@ var DateTime = (function () {
});
Object.defineProperty(DateTime.prototype, "Hour", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCHours();
return this._InternalDate.getHours();
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateTime.prototype, "Millisecond", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCMilliseconds();
return this._InternalDate.getMilliseconds();
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateTime.prototype, "Minute", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCMinutes();
return this._InternalDate.getMinutes();
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateTime.prototype, "Month", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCMonth() + 1;
return this._InternalDate.getMonth() + 1;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateTime.prototype, "Second", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCSeconds();
return this._InternalDate.getSeconds();
},
enumerable: true,
Expand All @@ -17402,13 +17447,17 @@ var DateTime = (function () {
Object.defineProperty(DateTime.prototype, "TimeOfDay", {
get: function () {
var id = this._InternalDate;
if (this._Kind === 2 /* Utc */)
return new TimeSpan(0, id.getUTCHours(), id.getUTCMinutes(), id.getUTCSeconds(), id.getUTCMilliseconds());
return new TimeSpan(0, id.getHours(), id.getMinutes(), id.getSeconds(), id.getMilliseconds());
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateTime.prototype, "Year", {
get: function () {
if (this._Kind === 2 /* Utc */)
return this._InternalDate.getUTCFullYear();
return this._InternalDate.getFullYear();
},
enumerable: true,
Expand Down Expand Up @@ -17461,7 +17510,7 @@ var DateTime = (function () {
};
DateTime.prototype.ToUniversalTime = function () {
if (this.Kind === 2 /* Utc */)
return new DateTime(this.Ticks, 2 /* Utc */);
return new DateTime(this.Ticks);
var id = this._InternalDate;
return new DateTime(id.getUTCFullYear(), id.getUTCMonth() + 1, id.getUTCDate(), id.getUTCHours(), id.getUTCMinutes(), id.getUTCSeconds(), id.getUTCMilliseconds(), 2 /* Utc */);
};
Expand All @@ -17473,7 +17522,7 @@ var DateTime = (function () {
DateTime.prototype.valueOf = function () {
return this.Ticks;
};
DateTime._MinDateTicks = -8640000000000000 + (TimeSpan._TicksPerHour * 4);
DateTime._MinDateTicks = -8640000000000000;
DateTime._MaxDateTicks = 8640000000000000;
return DateTime;
})();
Expand Down
2 changes: 1 addition & 1 deletion dist/fayde.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fayde",
"version": "0.16.15",
"version": "0.16.18",
"description": "Cross-platform/cross-browser XAML framework",
"main": "Gruntfile.js",
"directories": {
Expand Down Expand Up @@ -41,4 +41,4 @@
"grunt-typescript": "^0.4.6",
"grunt-version-ts": "^0.1.0"
}
}
}
Loading

0 comments on commit 09a9005

Please sign in to comment.