diff --git a/bower.json b/bower.json
index 3b428c9..ac4dbd5 100644
--- a/bower.json
+++ b/bower.json
@@ -3,7 +3,6 @@
"private": true,
"dependencies": {
"platform": "Polymer/platform#master",
- "core-action-icons": "Polymer/core-action-icons#master",
- "polymer-ui-action-icons": "Polymer/polymer-ui-action-icons#master"
+ "core-action-icons": "Polymer/core-action-icons#master"
}
}
\ No newline at end of file
diff --git a/core-component-page.html b/core-component-page.html
index 627e6ce..6904d07 100644
--- a/core-component-page.html
+++ b/core-component-page.html
@@ -1,3712 +1,1423 @@
-
-
-
+ });
+
-
-
-
-
-
-
-
-
-
+
- var utils = {
- /**
- * Invokes a function asynchronously. The context of the callback
- * function is bound to 'this' automatically.
- * @method async
- * @param {Function|String} method
- * @param {any|Array} args
- * @param {number} timeout
- */
- async: function(method, args, timeout) {
- // when polyfilling Object.observe, ensure changes
- // propagate before executing the async method
- Platform.flush();
- // second argument to `apply` must be an array
- args = (args && args.length) ? args : [args];
- // function to invoke
- var fn = function() {
- (this[method] || method).apply(this, args);
- }.bind(this);
- // execute `fn` sooner or later
- var handle = timeout ? setTimeout(fn, timeout) :
- requestAnimationFrame(fn);
- // NOTE: switch on inverting handle to determine which time is used.
- return timeout ? handle : ~handle;
- },
- cancelAsync: function(handle) {
- if (handle < 0) {
- cancelAnimationFrame(~handle);
- } else {
- clearTimeout(handle);
- }
- },
- /**
- * Fire an event.
- * @method fire
- * @returns {Object} event
- * @param {string} type An event name.
- * @param {any} detail
- * @param {Node} onNode Target node.
- */
- fire: function(type, detail, onNode, bubbles, cancelable) {
- var node = onNode || this;
- var detail = detail || {};
- var event = new CustomEvent(type, {
- bubbles: (bubbles !== undefined ? bubbles : true),
- cancelable: (cancelable !== undefined ? cancelable : true),
- detail: detail
- });
- node.dispatchEvent(event);
- return event;
- },
- /**
- * Fire an event asynchronously.
- * @method asyncFire
- * @param {string} type An event name.
- * @param detail
- * @param {Node} toNode Target node.
- */
- asyncFire: function(/*inType, inDetail*/) {
- this.async("fire", arguments);
- },
- /**
- * Remove class from old, add class to anew, if they exist
- * @param classFollows
- * @param anew A node.
- * @param old A node
- * @param className
- */
- classFollows: function(anew, old, className) {
- if (old) {
- old.classList.remove(className);
- }
- if (anew) {
- anew.classList.add(className);
- }
- }
- };
+
+
- // no-operation function for handy stubs
- var nop = function() {};
+
- scope.api.instance.utils = utils;
- scope.nop = nop;
- scope.nob = nob;
-})(Polymer);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ *
+ *
+ *
+ * Red
+ * Green
+ * Blue
+ *
+ *
+ * @element core-selection
+ */
+ /**
+ * Fired when an item's selection state is changed. This event is fired both
+ * when an item is selected or deselected. The `isSelected` detail property
+ * contains the selection state.
+ *
+ * @event core-select
+ * @param {Object} detail
+ * @param {boolean} detail.isSelected true for selection and false for deselection
+ * @param {Object} detail.item the item element
+ */
+-->
- // upgrade polymer-body last so that it can contain other imported elements
- document.addEventListener('polymer-ready', function() {
-
- Polymer('polymer-body', Platform.mixin({
- created: function() {
- this.template = document.createElement('template');
- var body = wrap(document).body;
- var c$ = body.childNodes.array();
- for (var i=0, c; (c=c$[i]); i++) {
- if (c.localName !== 'script') {
- this.template.content.appendChild(c);
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Polymer('core-selector', {
+ publish: {
+ /**
+ * Gets or sets the selected element. Default to use the index
+ * of the item element.
+ *
+ * If you want a specific attribute value of the element to be
+ * used instead of index, set "valueattr" to that attribute name.
+ *
+ * Example:
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * In multi-selection this should be an array of values.
+ *
+ * Example:
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * this.$.selector.selected = ['foo', 'zot'];
+ *
+ * @attribute selected
+ * @type Object
+ * @default null
+ */
+ selected: -1,
+ /**
+ * If true, multiple selections are allowed.
+ *
+ * @attribute multi
+ * @type boolean
+ * @default false
+ */
+ multi: false,
+
+ /**
+ * Specifies the attribute to be used for "selected" attribute.
+ *
+ * @attribute valueattr
+ * @type string
+ * @default 'name'
+ */
+ valueattr: 'name',
+
+ /**
+ * Specifies the CSS class to be used to add to the selected element.
+ *
+ * @attribute selectedClass
+ * @type string
+ * @default 'core-selected'
+ */
+ selectedClass: 'core-selected',
+
+ /**
+ * Specifies the property to be used to set on the selected element
+ * to indicate its active state.
+ *
+ * @attribute selectedProperty
+ * @type string
+ * @default ''
+ */
+ selectedProperty: '',
+
+ /**
+ * Specifies the property to be used to set on the selected element
+ * to indicate its active state.
+ *
+ * @attribute selectedProperty
+ * @type string
+ * @default 'active'
+ */
+ selectedAttribute: 'active',
+
+ /**
+ * Returns the currently selected element. In multi-selection this returns
+ * an array of selected elements.
+ *
+ * @attribute selectedItem
+ * @type Object
+ * @default null
+ */
+ selectedItem: null,
+
+ /**
+ * In single selection, this returns the model associated with the
+ * selected element.
+ *
+ * @attribute selectedModel
+ * @type Object
+ * @default null
+ */
+ selectedModel: null,
+
+ /**
+ * In single selection, this returns the selected index.
+ *
+ * @attribute selectedIndex
+ * @type number
+ * @default -1
+ */
+ selectedIndex: -1,
+
+ /**
+ * The target element that contains items. If this is not set
+ * core-selector is the container.
+ *
+ * @attribute target
+ * @type Object
+ * @default null
+ */
+ target: null,
+
+ /**
+ * This can be used to query nodes from the target node to be used for
+ * selection items. Note this only works if the 'target' property is set.
+ *
+ * Example:
+ *
+ *
+ *
+ *
+ * @attribute itemSelector
+ * @type string
+ * @default ''
+ */
+ itemsSelector: '',
+
+ /**
+ * The event that would be fired from the item element to indicate
+ * it is being selected.
+ *
+ * @attribute activateEvent
+ * @type string
+ * @default 'tap'
+ */
+ activateEvent: 'tap',
+
+ /**
+ * Set this to true to disallow changing the selection via the
+ * `activateEvent`.
+ *
+ * @attribute notap
+ * @type boolean
+ * @default false
+ */
+ notap: false,
+ },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
-
+
+ };
-
+ Polymer('core-theme-aware', Platform.mixin({
-
-
-
+ attached: function() {
+ this.validateTheme();
+ }
+
+ }, Polymer.ThemeAware));
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+ }
+
+ }, Polymer.ThemeAware));
+
+
+
-
-
-
-
- {{label}}
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+@group Polymer Core Elements
+core-item is a simple line-item object: a label and/or an icon that can also act as a link.
+Example:
+
+@element core-item
+-->
-
-
-
-
-
-
-
-
+ },
+
+ getItemHeight: function() {
+ return this.offsetHeight;
+ }
+
+ });
+
+
+
-
+
+
+
-
+core-icon {
+ display: block;
+ vertical-align: middle;
+}
+
+
+
+
+
+
-
-
+var block = {
+ newline: /^\n+/,
+ code: /^( {4}[^\n]+\n*)+/,
+ fences: noop,
+ hr: /^( *[-*_]){3,} *(?:\n+|$)/,
+ heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
+ nptable: noop,
+ lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
+ blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
+ list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
+ html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,
+ def: /^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
+ table: noop,
+ paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,
+ text: /^[^\n]+/
+};
+block.bullet = /(?:[*+-]|\d+\.)/;
+block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
+block.item = replace(block.item, 'gm')
+ (/bull/g, block.bullet)
+ ();
-
+block.list = replace(block.list)
+ (/bull/g, block.bullet)
+ ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))')
+ ('def', '\\n+(?=' + block.def.source + ')')
+ ();
-
+block.blockquote = replace(block.blockquote)
+ ('def', block.def)
+ ();
-
+block._tag = '(?!(?:'
+ + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
+ + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
+ + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';
-
+block.html = replace(block.html)
+ ('comment', //)
+ ('closed', /<(tag)[\s\S]+?<\/\1>/)
+ ('closing', /])*?>/)
+ (/tag/g, block._tag)
+ ();
-
-
-
-
-
-
+Lexer.prototype.lex = function(src) {
+ src = src
+ .replace(/\r\n|\r/g, '\n')
+ .replace(/\t/g, ' ')
+ .replace(/\u00a0/g, ' ')
+ .replace(/\u2424/g, '\n');
+
+ return this.token(src, true);
+};
+
+/**
+ * Lexing
+ */
+
+Lexer.prototype.token = function(src, top, bq) {
+ var src = src.replace(/^ +$/gm, '')
+ , next
+ , loose
+ , cap
+ , bull
+ , b
+ , item
+ , space
+ , i
+ , l;
+
+ while (src) {
+ // newline
+ if (cap = this.rules.newline.exec(src)) {
+ src = src.substring(cap[0].length);
+ if (cap[0].length > 1) {
+ this.tokens.push({
+ type: 'space'
+ });
+ }
+ }
+
+ // code
+ if (cap = this.rules.code.exec(src)) {
+ src = src.substring(cap[0].length);
+ cap = cap[0].replace(/^ {4}/gm, '');
+ this.tokens.push({
+ type: 'code',
+ text: !this.options.pedantic
+ ? cap.replace(/\n+$/, '')
+ : cap
+ });
+ continue;
+ }
+
+ // fences (gfm)
+ if (cap = this.rules.fences.exec(src)) {
+ src = src.substring(cap[0].length);
+ this.tokens.push({
+ type: 'code',
+ lang: cap[2],
+ text: cap[3]
+ });
+ continue;
+ }
+ // heading
+ if (cap = this.rules.heading.exec(src)) {
+ src = src.substring(cap[0].length);
+ this.tokens.push({
+ type: 'heading',
+ depth: cap[1].length,
+ text: cap[2]
+ });
+ continue;
+ }
-
+ // table no leading pipe (gfm)
+ if (top && (cap = this.rules.nptable.exec(src))) {
+ src = src.substring(cap[0].length);
-
-
-
-
+ this.tokens.push({
+ type: 'list_end'
+ });
+ continue;
+ }
-
+ // html
+ if (cap = this.rules.html.exec(src)) {
+ src = src.substring(cap[0].length);
+ this.tokens.push({
+ type: this.options.sanitize
+ ? 'paragraph'
+ : 'html',
+ pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',
+ text: cap[0]
+ });
+ continue;
+ }
-
+ // def
+ if ((!bq && top) && (cap = this.rules.def.exec(src))) {
+ src = src.substring(cap[0].length);
+ this.tokens.links[cap[1].toLowerCase()] = {
+ href: cap[2],
+ title: cap[3]
+ };
+ continue;
+ }
-
+ // table (gfm)
+ if (top && (cap = this.rules.table.exec(src))) {
+ src = src.substring(cap[0].length);
-
+ item = {
+ type: 'table',
+ header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
+ align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
+ cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')
+ };
-
+inline.breaks = merge({}, inline.gfm, {
+ br: replace(inline.br)('{2,}', '*')(),
+ text: replace(inline.gfm.text)('{2,}', '*')()
+});
-
-
-
+/**
+ * Inline Lexer & Compiler
+ */
-
+
+
- // strong
- if (cap = this.rules.strong.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.strong(this.output(cap[2] || cap[1]));
- continue;
- }
- // em
- if (cap = this.rules.em.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.em(this.output(cap[2] || cap[1]));
- continue;
- }
- // code
- if (cap = this.rules.code.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.codespan(escape(cap[2], true));
- continue;
- }
- // br
- if (cap = this.rules.br.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.br();
- continue;
- }
+
- // del (gfm)
- if (cap = this.rules.del.exec(src)) {
- src = src.substring(cap[0].length);
- out += this.renderer.del(this.output(cap[1]));
- continue;
- }
+
-InlineLexer.prototype.smartypants = function(text) {
- if (!this.options.smartypants) return text;
- return text
- // em-dashes
- .replace(/--/g, '\u2014')
- // opening singles
- .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
- // closing singles & apostrophes
- .replace(/'/g, '\u2019')
- // opening doubles
- .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
- // closing doubles
- .replace(/"/g, '\u201d')
- // ellipses
- .replace(/\.{3}/g, '\u2026');
-};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-Renderer.prototype.em = function(text) {
- return '' + text + '';
-};
+
-Renderer.prototype.codespan = function(text) {
- return '' + text + '
';
-};
+
-Renderer.prototype.br = function() {
- return '
';
-};
+
+
+
+
+
-Parser.parse = function(src, options, renderer) {
- var parser = new Parser(options, renderer);
- return parser.parse(src);
-};
-/**
- * Parse Loop
- */
-Parser.prototype.parse = function(src) {
- this.inline = new InlineLexer(src.links, this.options, this.renderer);
- this.tokens = src.reverse();
+
- var out = '';
- while (this.next()) {
- out += this.tok();
- }
+
- return out;
-};
+
-/**
- * Next Token
- */
+
+
+
+
+
+
+
-Parser.prototype.parseText = function() {
- var body = this.token.text;
+
- for (i = 0; i < this.token.cells.length; i++) {
- row = this.token.cells[i];
- cell = '';
- for (j = 0; j < row.length; j++) {
- cell += this.renderer.tablecell(
- this.inline.output(row[j]),
- { header: false, align: this.token.align[j] }
- );
- }
- body += this.renderer.tablerow(cell);
- }
- return this.renderer.table(header, body);
- }
- case 'blockquote_start': {
- var body = '';
+
- while (this.next().type !== 'blockquote_end') {
- body += this.tok();
- }
+
- if (!highlight || highlight.length < 3) {
- return done();
- }
+
+
- delete opt.highlight;
- if (!pending) return done();
+
- for (; i < tokens.length; i++) {
- (function(token) {
- if (token.type !== 'code') {
- return --pending || done();
- }
- return highlight(token.text, token.lang, function(err, code) {
- if (code == null || code === token.text) {
- return --pending || done();
- }
- token.text = code;
- token.escaped = true;
- --pending || done();
- });
- })(tokens[i]);
- }
+
- return;
- }
- try {
- if (opt) opt = merge({}, marked.defaults, opt);
- return Parser.parse(Lexer.lex(src, opt), opt);
- } catch (e) {
- e.message += '\nPlease report this to https://github.com/chjj/marked.';
- if ((opt || marked.defaults).silent) {
- return 'An error occured:
'
- + escape(e.message + '', true)
- + '
';
- }
- throw e;
- }
-}
+
-/**
- * Options
- */
+
-marked.options =
-marked.setOptions = function(opt) {
- merge(marked.defaults, opt);
- return marked;
-};
+
+ // each match represents a single block of doc comments
+ docComments.forEach(function(m) {
+ // unify line ends, remove all comment characters, split into individual lines
+ var lines = m.replace(/\r\n/g, '\n').replace(/^\s*\/\*\*|^\s*\*\/|^\s*\* ?|^\s*\<\!-\-|^s*\-\-\>/gm, '').split('\n');
-
+ // pragmas (@-rules) must occur on a line by themselves
+ var pragmas = [];
+ // filter lines whose first non-whitespace character is @ into the pragma list
+ // (and out of the `lines` array)
+ lines = lines.filter(function(l) {
+ var m = l.match(/\s*@([\w-]*) (.*)/);
+ if (!m) {
+ return true;
+ }
+ pragmas.push(m);
+ });
-
-
@@ -7106,169 +5014,181 @@
-
-
-
-
+
+
-
+
-
-
-
+
+
+
-
-
-
+
-
-
-
+
+
-
-
-
+
-
+
-
+
-
-
+
+
+
+
-
+
+
+ Methods
+
+ {{name}}
+
+
+
+
+
+
+ Attributes
+
+ {{name}}
+
+
+
+
+
+
+ Events
+
+ {{name}}
+
+
+
+
+
+
+
+
+
+
+
+
Methods
- {{name}}
+ {{name}}
+
@@ -7450,7 +5410,8 @@
Attributes
- {{name}}
+ {{name}}{{type}}
+
@@ -7459,157 +5420,139 @@
Events
- {{name}}
+ {{name}}
+
+
+
+
-
-
-
- Methods
-
- {{name}}
-
-
-
-
+
+
+ },
+
+ parserDataReady: function(event) {
+ this.assimilateData(event.target.data);
+ },
+
+ dataChanged: function() {
+ this.assimilateData(this.data);
+ },
+
+ assimilateData: function(data) {
+ this.classes = this.classes.concat(data.classes);
+ this.classes.sort(function(a, b) {
+ var na = a.name.toLowerCase(), nb = b.name.toLowerCase();
+ return (na < nb) ? -1 : (na == nb) ? 0 : 1;
+ });
+ }
+
+ });
+
+