diff --git a/Gruntfile.js b/Gruntfile.js index ab1c4f2c..dc194a6a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -21,6 +21,7 @@ module.exports = function(grunt) { out: "res-min/main.js", mainConfigFile: 'res/main.js', optimize: "uglify2", + inlineText: true, uglify2: { output: { beautify: true, diff --git a/bower.json b/bower.json index a390fe4c..a62b8539 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "2.0.3", + "version": "2.1.0", "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "dependencies": { "bootstrap": "3.0.0", diff --git a/cache.manifest b/cache.manifest index 95a23d0c..f37dc56f 100644 --- a/cache.manifest +++ b/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Sat Sep 07 2013 23:38:12 +#Date Sat Sep 14 2013 17:58:48 CACHE: index.html diff --git a/package.json b/package.json index 990f0559..ccae1c78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "2.0.3", + "version": "2.1.0", "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "main": "res/main.js", "directories": { diff --git a/res-min/font/fontello.eot b/res-min/font/fontello.eot index 8e34d484..833234c0 100644 Binary files a/res-min/font/fontello.eot and b/res-min/font/fontello.eot differ diff --git a/res-min/font/fontello.svg b/res-min/font/fontello.svg index 6f46b053..b4b37e74 100644 --- a/res-min/font/fontello.svg +++ b/res-min/font/fontello.svg @@ -186,7 +186,7 @@ - + @@ -286,7 +286,7 @@ - + diff --git a/res-min/font/fontello.ttf b/res-min/font/fontello.ttf index 5a8e1716..285230a7 100644 Binary files a/res-min/font/fontello.ttf and b/res-min/font/fontello.ttf differ diff --git a/res-min/font/fontello.woff b/res-min/font/fontello.woff index 246f7c7b..0237315e 100644 Binary files a/res-min/font/fontello.woff and b/res-min/font/fontello.woff differ diff --git a/res-min/main.js b/res-min/main.js index cb566e3b..73a0c035 100644 --- a/res-min/main.js +++ b/res-min/main.js @@ -34,6 +34,184 @@ //The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +/* + * Based on code from: + * + * XRegExp 1.5.0 + * (c) 2007-2010 Steven Levithan + * MIT License + * + * Provides an augmented, extensible, cross-browser implementation of regular expressions, + * including support for additional syntax, flags, and methods + */ + +// https://github.com/kriskowal/es5-shim +// Copyright 2009-2012 by contributors, MIT License + +// vim:set ts=4 sts=4 sw=4 st: +// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License +// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project) +// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified +// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License +// -- Irakli Gozalishvili Copyright (C) 2010 MIT License + +/*! + Copyright (c) 2009, 280 North Inc. http://280north.com/ + MIT License. http://github.com/280north/narwhal/blob/master/README.md +*/ + +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +/*! @license +========================================================================== +SproutCore -- JavaScript Application Framework +copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors. + +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. + +SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc. + +For more information about SproutCore, visit http://www.sproutcore.com + + +========================================================================== +@license */ + +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * based on code from: + * + * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/requirejs for details + */ + +/* +XRegExp Unicode plugin pack: Categories 1.0 +(c) 2010 Steven Levithan +MIT License + +Uses the Unicode 5.2 character database + +This package for the XRegExp Unicode plugin enables the following Unicode categories (aka properties): + +L - Letter (the top-level Letter category is included in the Unicode plugin base script) + Ll - Lowercase letter + Lu - Uppercase letter + Lt - Titlecase letter + Lm - Modifier letter + Lo - Letter without case +M - Mark + Mn - Non-spacing mark + Mc - Spacing combining mark + Me - Enclosing mark +N - Number + Nd - Decimal digit + Nl - Letter number + No - Other number +P - Punctuation + Pd - Dash punctuation + Ps - Open punctuation + Pe - Close punctuation + Pi - Initial punctuation + Pf - Final punctuation + Pc - Connector punctuation + Po - Other punctuation +S - Symbol + Sm - Math symbol + Sc - Currency symbol + Sk - Modifier symbol + So - Other symbol +Z - Separator + Zs - Space separator + Zl - Line separator + Zp - Paragraph separator +C - Other + Cc - Control + Cf - Format + Co - Private use + Cs - Surrogate + Cn - Unassigned + +Example usage: + + \p{N} + \p{Cn} +*/ + /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ /** @@ -204,45 +382,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* -CSS Browser Selector v0.4.0 (Nov 02, 2010) -Rafael Lima (http://rafael.adm.br) -http://rafael.adm.br/css_browser_selector -License: http://creativecommons.org/licenses/by/2.5/ -Contributors: http://rafael.adm.br/css_browser_selector#contributors - -v0.5.0 2011-08-24 -andrew relkin - -modified, now detects: -any version of Firefox -more versions of Windows (Win8, Win7, Vista, XP, Win2k) -more versions of IE under unique conditions -more detailed support for Opera -if "no-js" in HTML class: removes and replaces with "js" () - -identifies - browsers: Firefox; IE; Opera; Safari; Chrome, Konqueror, Iron - browser versions: (most importantly: ie6, ie7, ie8, ie9) - rendering engines: Webkit; Mozilla; Gecko - platforms/OSes: Mac; Win: Win7, Vista, XP, Win2k; FreeBSD; Linux/x11 - devices: Ipod; Ipad; Iphone; WebTV; Blackberry; Android; J2me; mobile(generic) - enabled technology: JS - -*/ - -/*! Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net) - * Licensed under the MIT License (LICENSE.txt). - * - * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. - * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. - * Thanks to: Seamus Leahy for adding deltaX and deltaY - * - * Version: 3.1.3 - * - * Requires: 1.2.2+ - */ - /** * bootstrap.js v3.0.0 by @fat and @mdo * Copyright 2013 Twitter Inc. @@ -680,22 +819,14 @@ function runDelayedFunction() { void 0 !== delayedFunction && delayedFunction(); } -function css_browser_selector(e) { - var t = e.toLowerCase(), n = function(e) { - return t.indexOf(e) > -1; - }, i = "gecko", o = "webkit", r = "safari", a = "opera", s = "mobile", l = "firefox", c = document.documentElement, u = [ !/opera|webtv/i.test(t) && /msie\s(\d)/.test(t) ? "ie ie" + (/trident\/4\.0/.test(t) ? "8" : RegExp.$1) : n("firefox/") ? i + " " + l + (/firefox\/(\d+(\.?\d+)*)/.test(t) ? " " + l + RegExp.$1.replace(/\./g, "").substr(0, 2) : "") : n("gecko/") ? i : n("opera") ? a + (/version\/((\d+)(\.\d+)*)/.test(t) ? " " + a + RegExp.$2 + " " + a + RegExp.$2 + RegExp.$3.replace(".", "_").substr(0, 2) : /opera(\s|\/)(\d+)/.test(t) ? " " + a + RegExp.$2 : "") : n("konqueror") ? "konqueror" : n("blackberry") ? s + " blackberry" : n("android") ? s + " android" : n("chrome") ? o + " chrome" : n("iron") ? o + " iron" : n("applewebkit/") ? o + " " + r + (/version\/(\d+)/.test(t) ? " " + r + RegExp.$1 : "") : n("mozilla/") ? i : "", n("j2me") ? s + " j2me" : n("iphone") ? s + " iphone" : n("ipod") ? s + " ipod" : n("ipad") ? s + " ipad" : n("mac") ? "mac" : n("darwin") ? "mac" : n("webtv") ? "webtv" : n("win") ? "win" + (n("windows nt 6.2") ? " win8" : n("windows nt 6.1") ? " win7" : n("windows nt 6.0") ? " vista" : n("windows nt 5.2") || n("windows nt 5.1") ? " xp" : n("windows nt 5.0") ? " win2k" : "") : n("freebsd") ? "freebsd" : n("x11") || n("linux") ? "linux" : "", "js" ], d = u.join(" "); - return c.className = (c.className.replace(/no-?js/g, "") + " " + d).replace(/^ /, ""), - d; -} - (function(e, t) { function n(e) { var t = e.length, n = rt.type(e); return rt.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : "array" === n || "function" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e); } function i(e) { - var t = ht[e] = {}; - return rt.each(e.match(st) || [], function(e, n) { + var t = ft[e] = {}; + return rt.each(e.match(at) || [], function(e, n) { t[n] = !0; }), t; } @@ -713,19 +844,19 @@ function css_browser_selector(e) { try { i = "true" === i ? !0 : "false" === i ? !1 : "null" === i ? null : +i + "" === i ? +i : vt.test(i) ? JSON.parse(i) : i; } catch (r) {} - mt.set(e, n, i); + gt.set(e, n, i); } else i = t; return i; } - function a() { + function s() { return !0; } - function s() { + function a() { return !1; } function l() { try { - return G.activeElement; + return U.activeElement; } catch (e) {} } function c(e, t) { @@ -740,7 +871,7 @@ function css_browser_selector(e) { return e === t !== n; }); if ("string" == typeof t) { - if (Nt.test(t)) return rt.filter(t, e, n); + if (_t.test(t)) return rt.filter(t, e, n); t = rt.filter(t, e); } return rt.grep(e, function(e) { @@ -750,33 +881,33 @@ function css_browser_selector(e) { function d(e, t) { return rt.nodeName(e, "table") && rt.nodeName(1 === t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e; } - function p(e) { + function h(e) { return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e; } - function f(e) { - var t = Ot.exec(e.type); + function p(e) { + var t = zt.exec(e.type); return t ? e.type = t[1] : e.removeAttribute("type"), e; } - function h(e, t) { - for (var n = e.length, i = 0; n > i; i++) gt.set(e[i], "globalEval", !t || gt.get(t[i], "globalEval")); + function f(e, t) { + for (var n = e.length, i = 0; n > i; i++) mt.set(e[i], "globalEval", !t || mt.get(t[i], "globalEval")); } - function m(e, t) { - var n, i, o, r, a, s, l, c; + function g(e, t) { + var n, i, o, r, s, a, l, c; if (1 === t.nodeType) { - if (gt.hasData(e) && (r = gt.access(e), a = gt.set(t, r), c = r.events)) { - delete a.handle, a.events = {}; + if (mt.hasData(e) && (r = mt.access(e), s = mt.set(t, r), c = r.events)) { + delete s.handle, s.events = {}; for (o in c) for (n = 0, i = c[o].length; i > n; n++) rt.event.add(t, o, c[o][n]); } - mt.hasData(e) && (s = mt.access(e), l = rt.extend({}, s), mt.set(t, l)); + gt.hasData(e) && (a = gt.access(e), l = rt.extend({}, a), gt.set(t, l)); } } - function g(e, n) { + function m(e, n) { var i = e.getElementsByTagName ? e.getElementsByTagName(n || "*") : e.querySelectorAll ? e.querySelectorAll(n || "*") : []; return n === t || n && rt.nodeName(e, n) ? rt.merge([ e ], i) : i; } function v(e, t) { var n = t.nodeName.toLowerCase(); - "input" === n && Rt.test(e.type) ? t.checked = e.checked : ("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue); + "input" === n && It.test(e.type) ? t.checked = e.checked : ("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue); } function b(e, t) { if (t in e) return t; @@ -787,109 +918,109 @@ function css_browser_selector(e) { function y(e, t) { return e = t || e, "none" === rt.css(e, "display") || !rt.contains(e.ownerDocument, e); } - function x(t) { + function w(t) { return e.getComputedStyle(t, null); } - function w(e, t) { - for (var n, i, o, r = [], a = 0, s = e.length; s > a; a++) i = e[a], i.style && (r[a] = gt.get(i, "olddisplay"), - n = i.style.display, t ? (r[a] || "none" !== n || (i.style.display = ""), "" === i.style.display && y(i) && (r[a] = gt.access(i, "olddisplay", _(i.nodeName)))) : r[a] || (o = y(i), - (n && "none" !== n || !o) && gt.set(i, "olddisplay", o ? n : rt.css(i, "display")))); - for (a = 0; s > a; a++) i = e[a], i.style && (t && "none" !== i.style.display && "" !== i.style.display || (i.style.display = t ? r[a] || "" : "none")); + function C(e, t) { + for (var n, i, o, r = [], s = 0, a = e.length; a > s; s++) i = e[s], i.style && (r[s] = mt.get(i, "olddisplay"), + n = i.style.display, t ? (r[s] || "none" !== n || (i.style.display = ""), "" === i.style.display && y(i) && (r[s] = mt.access(i, "olddisplay", S(i.nodeName)))) : r[s] || (o = y(i), + (n && "none" !== n || !o) && mt.set(i, "olddisplay", o ? n : rt.css(i, "display")))); + for (s = 0; a > s; s++) i = e[s], i.style && (t && "none" !== i.style.display && "" !== i.style.display || (i.style.display = t ? r[s] || "" : "none")); return e; } - function C(e, t, n) { - var i = Wt.exec(t); + function x(e, t, n) { + var i = Gt.exec(t); return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : t; } - function k(e, t, n, i, o) { - for (var r = n === (i ? "border" : "content") ? 4 : "width" === t ? 1 : 0, a = 0; 4 > r; r += 2) "margin" === n && (a += rt.css(e, n + Jt[r], !0, o)), - i ? ("content" === n && (a -= rt.css(e, "padding" + Jt[r], !0, o)), "margin" !== n && (a -= rt.css(e, "border" + Jt[r] + "Width", !0, o))) : (a += rt.css(e, "padding" + Jt[r], !0, o), - "padding" !== n && (a += rt.css(e, "border" + Jt[r] + "Width", !0, o))); - return a; + function E(e, t, n, i, o) { + for (var r = n === (i ? "border" : "content") ? 4 : "width" === t ? 1 : 0, s = 0; 4 > r; r += 2) "margin" === n && (s += rt.css(e, n + Jt[r], !0, o)), + i ? ("content" === n && (s -= rt.css(e, "padding" + Jt[r], !0, o)), "margin" !== n && (s -= rt.css(e, "border" + Jt[r] + "Width", !0, o))) : (s += rt.css(e, "padding" + Jt[r], !0, o), + "padding" !== n && (s += rt.css(e, "border" + Jt[r] + "Width", !0, o))); + return s; } - function S(e, t, n) { - var i = !0, o = "width" === t ? e.offsetWidth : e.offsetHeight, r = x(e), a = rt.support.boxSizing && "border-box" === rt.css(e, "boxSizing", !1, r); + function A(e, t, n) { + var i = !0, o = "width" === t ? e.offsetWidth : e.offsetHeight, r = w(e), s = rt.support.boxSizing && "border-box" === rt.css(e, "boxSizing", !1, r); if (0 >= o || null == o) { if (o = Ht(e, t, r), (0 > o || null == o) && (o = e.style[t]), Vt.test(o)) return o; - i = a && (rt.support.boxSizingReliable || o === e.style[t]), o = parseFloat(o) || 0; + i = s && (rt.support.boxSizingReliable || o === e.style[t]), o = parseFloat(o) || 0; } - return o + k(e, t, n || (a ? "border" : "content"), i, r) + "px"; + return o + E(e, t, n || (s ? "border" : "content"), i, r) + "px"; } - function _(e) { - var t = G, n = Kt[e]; - return n || (n = T(e, t), "none" !== n && n || (Bt = (Bt || rt("