Commit 64ee2028 authored by Sindre Sorhus's avatar Sindre Sorhus

update YUI to 3.14.1

parent b0d79c03
/*
YUI 3.11.0 (build d549e5c)
YUI 3.14.1 (build 63049cb)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
......@@ -163,7 +163,7 @@ available.
(function() {
var proto, prop,
VERSION = '3.11.0',
VERSION = '3.14.1',
PERIOD = '.',
BASE = 'http://yui.yahooapis.com/',
/*
......@@ -202,6 +202,12 @@ available.
el.detachEvent('on' + type, fn);
}
},
handleReady = function() {
YUI.Env.DOMReady = true;
if (hasWin) {
remove(doc, 'DOMContentLoaded', handleReady);
}
},
handleLoad = function() {
YUI.Env.windowLoaded = true;
YUI.Env.DOMReady = true;
......@@ -355,6 +361,7 @@ proto = {
_idx: 0,
_used: {},
_attached: {},
_exported: {},
_missed: [],
_yidx: 0,
_uidx: 0,
......@@ -362,15 +369,15 @@ proto = {
_loaded: {},
// serviced: {},
// Regex in English:
// I'll start at the \b(simpleyui).
// 1. Look in the test string for "simpleyui" or "yui" or
// I'll start at the \b(yui).
// 1. Look in the test string for "yui" or
// "yui-base" or "yui-davglass" or "yui-foobar" that comes after a word break. That is, it
// can't match "foyui" or "i_heart_simpleyui". This can be anywhere in the string.
// can't match "foyui" or "i_heart_yui". This can be anywhere in the string.
// 2. After #1 must come a forward slash followed by the string matched in #1, so
// "yui-base/yui-base" or "simpleyui/simpleyui" or "yui-pants/yui-pants".
// "yui-base/yui-base" or "yui-pants/yui-pants".
// 3. The second occurence of the #1 token can optionally be followed by "-debug" or "-min",
// so "yui/yui-min", "yui/yui-debug", "yui-base/yui-base-debug". NOT "yui/yui-tshirt".
// 4. This is followed by ".js", so "yui/yui.js", "simpleyui/simpleyui-min.js"
// 4. This is followed by ".js", so "yui/yui.js".
// 0. Going back to the beginning, now. If all that stuff in 1-4 comes after a "?" in the string,
// then capture the junk between the LAST "&" and the string in 1-4. So
// "blah?foo/yui/yui.js" will capture "foo/" and "blah?some/thing.js&3.3.0/build/yui-davglass/yui-davglass.js"
......@@ -382,13 +389,13 @@ proto = {
// * in fact, find as many sets of characters followed by a & as you can
// ([^&]*) capture the stuff after the last & in \1
// )? but it's ok if all this ?junk&more_junk stuff isn't even there
// \b(simpleyui| after a word break find either the string "simpleyui" or
// yui(?:-\w+)? the string "yui" optionally followed by a -, then more characters
// ) and store the simpleyui or yui-* string in \2
// \/\2 then comes a / followed by the simpleyui or yui-* string in \2
// \b( after a word break find either the string
// yui(?:-\w+)? "yui" optionally followed by a -, then more characters
// ) and store the yui-* string in \2
// \/\2 then comes a / followed by the yui-* string in \2
// (?:-(min|debug))? optionally followed by "-min" or "-debug"
// .js and ending in ".js"
_BASE_RE: /(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,
_BASE_RE: /(?:\?(?:[^&]*&)*([^&]*))?\b(yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,
parseBasePath: function(src, pattern) {
var match = src.match(pattern),
path, filter;
......@@ -669,8 +676,11 @@ with any configuration info required for the module.
cache = YUI.Env._renderedMods,
loader = Y.Env._loader,
done = Y.Env._attached,
exported = Y.Env._exported,
len = r.length, loader, def, go,
c = [];
c = [],
modArgs, esCompat, reqlen,
__exports__, __imports__;
//Check for conditional modules (in a second+ instance) and add their requirements
//TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass
......@@ -746,6 +756,7 @@ with any configuration info required for the module.
details = mod.details;
req = details.requires;
esCompat = details.es;
use = details.use;
after = details.after;
//Force Intl load if there is a language (Loader logic) @todo fix this shit
......@@ -755,7 +766,8 @@ with any configuration info required for the module.
}
if (req) {
for (j = 0; j < req.length; j++) {
reqlen = req.length;
for (j = 0; j < reqlen; j++) {
if (!done[req[j]]) {
if (!Y._attach(req)) {
return false;
......@@ -777,16 +789,33 @@ with any configuration info required for the module.
}
if (mod.fn) {
modArgs = [Y, name];
if (esCompat) {
__imports__ = {};
__exports__ = {};
// passing `exports` and `imports` onto the module function
modArgs.push(__imports__, __exports__);
if (req) {
reqlen = req.length;
for (j = 0; j < reqlen; j++) {
__imports__[req[j]] = exported.hasOwnProperty(req[j]) ? exported[req[j]] : Y;
}
}
}
if (Y.config.throwFail) {
mod.fn(Y, name);
__exports__ = mod.fn.apply(mod, modArgs);
} else {
try {
mod.fn(Y, name);
__exports__ = mod.fn.apply(mod, modArgs);
} catch (e) {
Y.error('Attach error: ' + name, e, name);
return false;
}
}
if (esCompat) {
// store the `exports` in case others `es` modules requires it
exported[name] = __exports__;
}
}
if (use) {
......@@ -1466,11 +1495,14 @@ with any configuration info required for the module.
YUI._init();
if (hasWin) {
add(doc, 'DOMContentLoaded', handleReady);
// add a window load event at load time so we can capture
// the case where it fires before dynamic loading is
// complete.
add(window, 'load', handleLoad);
} else {
handleReady();
handleLoad();
}
......@@ -1507,6 +1539,7 @@ with any configuration info required for the module.
YUI._getLoadHook = null;
}
YUI.Env[VERSION] = {};
}());
......@@ -1956,6 +1989,17 @@ L.isObject = function(o, failfn) {
(!failfn && (t === 'function' || L.isFunction(o))))) || false;
};
/**
* Determines whether or not the provided value is a regexp.
* @method isRegExp
* @static
* @param value The value or object to test.
* @return {boolean} true if value is a regexp.
*/
L.isRegExp = function(value) {
return L.type(value) === 'regexp';
};
/**
* Determines whether or not the provided item is a string.
* @method isString
......@@ -2016,9 +2060,15 @@ L.now = Date.now || function () {
};
/**
* Lightweight version of <code>Y.substitute</code>. Uses the same template
* structure as <code>Y.substitute</code>, but doesn't support recursion,
* auto-object coersion, or formats.
* Performs `{placeholder}` substitution on a string. The object passed as the
* second parameter provides values to replace the `{placeholder}`s.
* `{placeholder}` token names must match property names of the object. For example,
*
*`var greeting = Y.Lang.sub("Hello, {who}!", { who: "World" });`
*
* `{placeholder}` tokens that are undefined on the object map will be left
* in tact (leaving unsightly `{placeholder}`'s in the output string).
*
* @method sub
* @param {string} s String to be modified.
* @param {object} o Object containing replacement values.
......@@ -3557,7 +3607,7 @@ YUI.Env.parseUA = function(subUA) {
o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
}
} else { // not opera or webkit
m = ua.match(/MSIE ([^;]*)|Trident.*; rv ([0-9.]+)/);
m = ua.match(/MSIE ([^;]*)|Trident.*; rv:([0-9.]+)/);
if (m && (m[1] || m[2])) {
o.ie = numberify(m[1] || m[2]);
......@@ -3659,7 +3709,7 @@ Y.UA.compareVersions = function (a, b) {
YUI.Env.aliases = {
"anim": ["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],
"anim-shape-transform": ["anim-shape"],
"app": ["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","router","view","view-node-map"],
"app": ["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","model-sync-local","router","view","view-node-map"],
"attribute": ["attribute-base","attribute-complex"],
"attribute-events": ["attribute-observable"],
"autocomplete": ["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],
......@@ -3702,7 +3752,7 @@ YUI.Env.aliases = {
};
}, '3.11.0', {
}, '3.14.1', {
"use": [
"yui-base",
"get",
......@@ -4988,7 +5038,7 @@ Transaction.prototype = {
};
}, '3.11.0', {"requires": ["yui-base"]});
}, '3.14.1', {"requires": ["yui-base"]});
YUI.add('features', function (Y, NAME) {
var feature_tests = {};
......@@ -5396,7 +5446,7 @@ add('load', '22', {
"when": "after"
});
}, '3.11.0', {"requires": ["yui-base"]});
}, '3.14.1', {"requires": ["yui-base"]});
YUI.add('intl-base', function (Y, NAME) {
/**
......@@ -5484,7 +5534,7 @@ Y.mix(Y.namespace('Intl'), {
});
}, '3.11.0', {"requires": ["yui-base"]});
}, '3.14.1', {"requires": ["yui-base"]});
YUI.add('yui-log', function (Y, NAME) {
/**
......@@ -5517,7 +5567,7 @@ var INSTANCE = Y,
* @for YUI
* @param {String} msg The message to log.
* @param {String} cat The log category for the message. Default
* categories are "info", "warn", "error", time".
* categories are "info", "warn", "error", "debug".
* Custom categories can be used as well. (opt).
* @param {String} src The source of the the message (opt).
* @param {boolean} silent If true, the log event won't fire.
......@@ -5593,7 +5643,7 @@ INSTANCE.log = function(msg, cat, src, silent) {
* @for YUI
* @param {String} msg The message to log.
* @param {String} cat The log category for the message. Default
* categories are "info", "warn", "error", time".
* categories are "info", "warn", "error", "debug".
* Custom categories can be used as well. (opt).
* @param {String} src The source of the the message (opt).
* @param {boolean} silent If true, the log event won't fire.
......@@ -5604,7 +5654,7 @@ INSTANCE.message = function() {
};
}, '3.11.0', {"requires": ["yui-base"]});
}, '3.14.1', {"requires": ["yui-base"]});
YUI.add('yui-later', function (Y, NAME) {
/**
......@@ -5623,7 +5673,7 @@ var NO_ARGS = [];
* single time unless periodic is set to true.
* @for YUI
* @method later
* @param when {int} the number of milliseconds to wait until the fn
* @param when {Number} the number of milliseconds to wait until the fn
* is executed.
* @param o the context object.
* @param fn {Function|String} the function to execute or the name of
......@@ -5682,7 +5732,7 @@ Y.Lang.later = Y.later;
}, '3.11.0', {"requires": ["yui-base"]});
}, '3.14.1', {"requires": ["yui-base"]});
YUI.add('loader-base', function (Y, NAME) {
/**
......@@ -5691,36 +5741,39 @@ YUI.add('loader-base', function (Y, NAME) {
* @submodule loader-base
*/
if (!YUI.Env[Y.version]) {
(function() {
(function() {
var VERSION = Y.version,
BUILD = '/build/',
ROOT = VERSION + '/',
CDN_BASE = Y.Env.base,
GALLERY_VERSION = 'gallery-2013.07.03-22-52',
GALLERY_VERSION = 'gallery-2013.12.12-21-06',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
COMBO_BASE = CDN_BASE + 'combo?',
META = { version: VERSION,
META = {
version: VERSION,
root: ROOT,
base: Y.Env.base,
comboBase: COMBO_BASE,
skin: { defaultSkin: 'sam',
skin: {
defaultSkin: 'sam',
base: 'assets/skins/',
path: 'skin.css',
after: ['cssreset',
after: [
'cssreset',
'cssfonts',
'cssgrids',
'cssbase',
'cssreset-context',
'cssfonts-context']},
'cssfonts-context'
]
},
groups: {},
patterns: {} },
patterns: {}
},
groups = META.groups,
yui2Update = function(tnt, yui2, config) {
var root = TNT + '.' +
(tnt || TNT_VERSION) + '/' +
(yui2 || YUI2_VERSION) + BUILD,
......@@ -5749,9 +5802,13 @@ if (!YUI.Env[Y.version]) {
combine: true,
comboBase: COMBO_BASE,
update: galleryUpdate,
patterns: { 'gallery-': { },
patterns: {
'gallery-': {},
'lang/gallery-': {},
'gallerycss-': { type: 'css' } }
'gallerycss-': {
type: 'css'
}
}
};
groups.yui2 = {
......@@ -5778,11 +5835,16 @@ if (!YUI.Env[Y.version]) {
galleryUpdate();
yui2Update();
YUI.Env[VERSION] = META;
}());
}
if (YUI.Env[VERSION]) {
Y.mix(META, YUI.Env[VERSION], false, [
'modules',
'groups',
'skin'
], 0, true);
}
YUI.Env[VERSION] = META;
}());
/*jslint forin: true, maxlen: 350 */
/**
......@@ -8461,7 +8523,7 @@ Y.Loader.prototype = {
}, '3.11.0', {"requires": ["get", "features"]});
}, '3.14.1', {"requires": ["get", "features"]});
YUI.add('loader-rollup', function (Y, NAME) {
/**
......@@ -8560,7 +8622,7 @@ Y.Loader.prototype._rollup = function() {
};
}, '3.11.0', {"requires": ["loader-base"]});
}, '3.14.1', {"requires": ["loader-base"]});
YUI.add('loader-yui3', function (Y, NAME) {
/* This file is auto-generated by (yogi.js loader --mix --yes) */
......@@ -8651,6 +8713,7 @@ Y.mix(YUI.Env[Y.version].modules, {
"model",
"model-list",
"model-sync-rest",
"model-sync-local",
"router",
"view",
"view-node-map"
......@@ -9006,7 +9069,8 @@ Y.mix(YUI.Env[Y.version].modules, {
"requires": [
"attribute-core",
"classnamemanager",
"node-base"
"node-base",
"escape"
]
},
"button-group": {
......@@ -9068,6 +9132,10 @@ Y.mix(YUI.Env[Y.version].modules, {
"nl",
"pt-BR",
"ru",
"zh-Hans",
"zh-Hans-CN",
"zh-Hant",
"zh-Hant-HK",
"zh-HANT-TW"
],
"requires": [
......@@ -9192,6 +9260,14 @@ Y.mix(YUI.Env[Y.version].modules, {
],
"skinnable": true
},
"content-editable": {
"requires": [
"node-base",
"editor-selection",
"stylesheet",
"plugin"
]
},
"controller": {
"use": [
"router"
......@@ -9465,6 +9541,18 @@ Y.mix(YUI.Env[Y.version].modules, {
"classnamemanager"
]
},
"datatable-highlight": {
"requires": [
"datatable-base",
"event-hover"
],
"skinnable": true
},
"datatable-keynav": {
"requires": [
"datatable-base"
]
},
"datatable-message": {
"lang": [
"en",
......@@ -9485,7 +9573,8 @@ Y.mix(YUI.Env[Y.version].modules, {
},
"datatable-paginator": {
"lang": [
"en"
"en",
"fr"
],
"requires": [
"model",
......@@ -9642,7 +9731,11 @@ Y.mix(YUI.Env[Y.version].modules, {
]
},
"datatype-number-format": {},
"datatype-number-parse": {},
"datatype-number-parse": {
"requires": [
"escape"
]
},
"datatype-xml": {
"use": [
"datatype-xml-parse",
......@@ -9779,11 +9872,6 @@ Y.mix(YUI.Env[Y.version].modules, {
"features"
]
},
"dom-deprecated": {
"requires": [
"dom-base"
]
},
"dom-screen": {
"requires": [
"dom-base",
......@@ -9868,6 +9956,12 @@ Y.mix(YUI.Env[Y.version].modules, {
"editor-base"
]
},
"editor-inline": {
"requires": [
"editor-base",
"content-editable"
]
},
"editor-lists": {
"requires": [
"editor-base"
......@@ -10098,6 +10192,7 @@ Y.mix(YUI.Env[Y.version].modules, {
"requires": [
"base",
"node",
"plugin",
"selector-css3",
"yui-throttle"
]
......@@ -10498,6 +10593,12 @@ Y.mix(YUI.Env[Y.version].modules, {
"model"
]
},
"model-sync-local": {
"requires": [
"model",
"json-stringify"
]
},
"model-sync-rest": {
"requires": [
"model",
......@@ -10518,7 +10619,8 @@ Y.mix(YUI.Env[Y.version].modules, {
"requires": [
"event-base",
"node-core",
"dom-base"
"dom-base",
"dom-style"
]
},
"node-core": {
......@@ -10527,11 +10629,6 @@ Y.mix(YUI.Env[Y.version].modules, {
"selector"
]
},
"node-deprecated": {
"requires": [
"node-base"
]
},
"node-event-delegate": {
"requires": [
"node-base",
......@@ -11291,13 +11388,13 @@ Y.mix(YUI.Env[Y.version].modules, {
},
"uploader-flash": {
"requires": [
"swf",
"swfdetect",
"escape",
"widget",
"base",
"cssbutton",
"node",
"event-custom",
"file-flash",
"uploader-queue"
]
},
......@@ -11388,11 +11485,6 @@ Y.mix(YUI.Env[Y.version].modules, {
"widget-base"
]
},
"widget-locale": {
"requires": [
"widget-base"
]
},
"widget-modality": {
"requires": [
"base-build",
......@@ -11505,11 +11597,11 @@ Y.mix(YUI.Env[Y.version].modules, {
]
}
});
YUI.Env[Y.version].md5 = 'b48f48e0499b41d980deaefd4100d336';
YUI.Env[Y.version].md5 = '7becfe88413f127e331d461de8ec774c';
}, '3.11.0', {"requires": ["loader-base"]});
YUI.add('yui', function (Y, NAME) {}, '3.11.0', {
}, '3.14.1', {"requires": ["loader-base"]});
YUI.add('yui', function (Y, NAME) {}, '3.14.1', {
"use": [
"yui-base",
"get",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment