Commit b4f0f3511174b906c488a0f1d6586152ce4cf6c2
Merge branch 'master' of http://service.routetopa.eu:7480/WebCompDev/COMPONENTS
Showing
1736 changed files
with
12840 additions
and
1453 deletions
Too many changes.
To preserve performance only 1000 of 1736 files are displayed.
bower_components/google-apis/.bower.json
100644 → 100755
bower_components/google-apis/LICENSE
100644 → 100755
bower_components/google-apis/README.md
100644 → 100755
bower_components/google-apis/bower.json
100644 → 100755
bower_components/google-apis/demo/index.html
100644 → 100755
bower_components/google-apis/google-apis.html
100644 → 100755
bower_components/google-apis/google-client-loader.html
100644 → 100755
bower_components/google-apis/google-js-api.html
100644 → 100755
bower_components/google-apis/google-legacy-loader.html
100644 → 100755
bower_components/google-apis/google-maps-api.html
100644 → 100755
bower_components/google-apis/google-plusone-api.html
100644 → 100755
bower_components/google-apis/google-realtime-api.html
100644 → 100755
bower_components/google-apis/google-youtube-api.html
100644 → 100755
bower_components/google-apis/index.html
100644 → 100755
bower_components/google-map/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "google-map", | 2 | "name": "google-map", |
3 | - "version": "1.1.4", | 3 | + "version": "1.1.5", |
4 | "description": "Google Maps web components", | 4 | "description": "Google Maps web components", |
5 | "homepage": "https://elements.polymer-project.org/elements/google-map", | 5 | "homepage": "https://elements.polymer-project.org/elements/google-map", |
6 | "main": [ | 6 | "main": [ |
@@ -37,11 +37,11 @@ | @@ -37,11 +37,11 @@ | ||
37 | "web-component-tester": "*", | 37 | "web-component-tester": "*", |
38 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.2" | 38 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.2" |
39 | }, | 39 | }, |
40 | - "_release": "1.1.4", | 40 | + "_release": "1.1.5", |
41 | "_resolution": { | 41 | "_resolution": { |
42 | "type": "version", | 42 | "type": "version", |
43 | - "tag": "1.1.4", | ||
44 | - "commit": "571392000956d93dddd9e2f6d3eb9593a588f5f0" | 43 | + "tag": "1.1.5", |
44 | + "commit": "3ff5c11d7aa90874d7f0ac75e076f512981ffd26" | ||
45 | }, | 45 | }, |
46 | "_source": "git://github.com/GoogleWebComponents/google-map.git", | 46 | "_source": "git://github.com/GoogleWebComponents/google-map.git", |
47 | "_target": "^1.0.0", | 47 | "_target": "^1.0.0", |
bower_components/google-map/LICENSE
100644 → 100755
bower_components/google-map/README.md
100644 → 100755
bower_components/google-map/bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "google-map", | 2 | "name": "google-map", |
3 | - "version": "1.1.4", | 3 | + "version": "1.1.5", |
4 | "description": "Google Maps web components", | 4 | "description": "Google Maps web components", |
5 | "homepage": "https://elements.polymer-project.org/elements/google-map", | 5 | "homepage": "https://elements.polymer-project.org/elements/google-map", |
6 | "main": [ | 6 | "main": [ |
bower_components/google-map/demo/index.html
100644 → 100755
bower_components/google-map/demo/polys.html
100644 → 100755
bower_components/google-map/google-map-directions.html
100644 → 100755
bower_components/google-map/google-map-marker.html
100644 → 100755
bower_components/google-map/google-map-point.html
100644 → 100755
bower_components/google-map/google-map-poly.html
100644 → 100755
bower_components/google-map/google-map-search.html
100644 → 100755
bower_components/google-map/google-map.html
100644 → 100755
@@ -330,6 +330,11 @@ The `google-map` element renders a Google Map. | @@ -330,6 +330,11 @@ The `google-map` element renders a Google Map. | ||
330 | * Use to specify additional options we do not expose as | 330 | * Use to specify additional options we do not expose as |
331 | * properties. | 331 | * properties. |
332 | * Ex: `<google-map additional-map-options='{"mapTypeId":"satellite"}'>` | 332 | * Ex: `<google-map additional-map-options='{"mapTypeId":"satellite"}'>` |
333 | + * | ||
334 | + * Note, you can't use API enums like `google.maps.ControlPosition.TOP_RIGHT` | ||
335 | + * when using this property as an HTML attribute. Instead, use the actual | ||
336 | + * value (e.g. `3`) or set `.additionalMapOptions` in JS rather than using | ||
337 | + * the attribute. | ||
333 | */ | 338 | */ |
334 | additionalMapOptions: { | 339 | additionalMapOptions: { |
335 | type: Object, | 340 | type: Object, |
bower_components/google-map/index.html
100644 → 100755
bower_components/google-map/metadata.html
100644 → 100755
bower_components/hydrolysis/.bower.json
100644 → 100755
bower_components/hydrolysis/.editorconfig
100644 → 100755
bower_components/hydrolysis/.gitattributes
100644 → 100755
bower_components/hydrolysis/.travis.yml
100644 → 100755
bower_components/hydrolysis/API.md
100644 → 100755
bower_components/hydrolysis/LICENSE
100644 → 100755
bower_components/hydrolysis/README.md
100644 → 100755
bower_components/hydrolysis/bower.json
100644 → 100755
bower_components/hydrolysis/hydrolysis-analyzer.html
100644 → 100755
bower_components/hydrolysis/hydrolysis.html
100644 → 100755
bower_components/hydrolysis/hydrolysis.js
100644 → 100755
bower_components/hydrolysis/index.js
100644 → 100755
bower_components/iron-a11y-keys-behavior/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-a11y-keys-behavior", | 2 | "name": "iron-a11y-keys-behavior", |
3 | - "version": "1.0.7", | 3 | + "version": "1.0.8", |
4 | "description": "A behavior that enables keybindings for greater a11y.", | 4 | "description": "A behavior that enables keybindings for greater a11y.", |
5 | "keywords": [ | 5 | "keywords": [ |
6 | "web-components", | 6 | "web-components", |
@@ -30,11 +30,11 @@ | @@ -30,11 +30,11 @@ | ||
30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | 30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" |
31 | }, | 31 | }, |
32 | "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", | 32 | "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", |
33 | - "_release": "1.0.7", | 33 | + "_release": "1.0.8", |
34 | "_resolution": { | 34 | "_resolution": { |
35 | "type": "version", | 35 | "type": "version", |
36 | - "tag": "v1.0.7", | ||
37 | - "commit": "4dfdd8cca76eabe12245e86deb9d5da3cd717460" | 36 | + "tag": "v1.0.8", |
37 | + "commit": "df29a9edcff3b4693707f1e3eebce5a1dc46e946" | ||
38 | }, | 38 | }, |
39 | "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", | 39 | "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", |
40 | "_target": "^1.0.0", | 40 | "_target": "^1.0.0", |
bower_components/iron-a11y-keys-behavior/.gitignore
100644 → 100755
bower_components/iron-a11y-keys-behavior/README.md
100644 → 100755
bower_components/iron-a11y-keys-behavior/bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-a11y-keys-behavior", | 2 | "name": "iron-a11y-keys-behavior", |
3 | - "version": "1.0.7", | 3 | + "version": "1.0.8", |
4 | "description": "A behavior that enables keybindings for greater a11y.", | 4 | "description": "A behavior that enables keybindings for greater a11y.", |
5 | "keywords": [ | 5 | "keywords": [ |
6 | "web-components", | 6 | "web-components", |
bower_components/iron-a11y-keys-behavior/demo/index.html
100644 → 100755
bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html
100644 → 100755
bower_components/iron-a11y-keys-behavior/index.html
100644 → 100755
bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
100644 → 100755
@@ -424,10 +424,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -424,10 +424,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
424 | _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) { | 424 | _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) { |
425 | var detail = Object.create(keyCombo); | 425 | var detail = Object.create(keyCombo); |
426 | detail.keyboardEvent = keyboardEvent; | 426 | detail.keyboardEvent = keyboardEvent; |
427 | - | ||
428 | - this[handlerName].call(this, new CustomEvent(keyCombo.event, { | ||
429 | - detail: detail | ||
430 | - })); | 427 | + var event = new CustomEvent(keyCombo.event, { |
428 | + detail: detail, | ||
429 | + cancelable: true | ||
430 | + }); | ||
431 | + this[handlerName].call(this, event); | ||
432 | + if (event.defaultPrevented) { | ||
433 | + keyboardEvent.preventDefault(); | ||
434 | + } | ||
431 | } | 435 | } |
432 | }; | 436 | }; |
433 | })(); | 437 | })(); |
bower_components/iron-a11y-keys-behavior/test/basic-test.html
100644 → 100755
@@ -70,6 +70,9 @@ suite('Polymer.IronA11yKeysBehavior', function() { | @@ -70,6 +70,9 @@ suite('Polymer.IronA11yKeysBehavior', function() { | ||
70 | _keyHandler: function(event) { | 70 | _keyHandler: function(event) { |
71 | this.keyCount++; | 71 | this.keyCount++; |
72 | this.lastEvent = event; | 72 | this.lastEvent = event; |
73 | + }, | ||
74 | + _preventDefaultHandler: function(event) { | ||
75 | + event.preventDefault(); | ||
73 | } | 76 | } |
74 | }]; | 77 | }]; |
75 | 78 | ||
@@ -124,7 +127,8 @@ suite('Polymer.IronA11yKeysBehavior', function() { | @@ -124,7 +127,8 @@ suite('Polymer.IronA11yKeysBehavior', function() { | ||
124 | ], | 127 | ], |
125 | 128 | ||
126 | keyBindings: { | 129 | keyBindings: { |
127 | - 'space': '_keyHandler' | 130 | + 'space': '_keyHandler', |
131 | + 'enter': '_preventDefaultHandler' | ||
128 | } | 132 | } |
129 | }); | 133 | }); |
130 | }); | 134 | }); |
@@ -273,6 +277,21 @@ suite('Polymer.IronA11yKeysBehavior', function() { | @@ -273,6 +277,21 @@ suite('Polymer.IronA11yKeysBehavior', function() { | ||
273 | }); | 277 | }); |
274 | }); | 278 | }); |
275 | 279 | ||
280 | + suite('prevent default behavior of event', function() { | ||
281 | + setup(function() { | ||
282 | + keys = fixture('BehaviorKeys'); | ||
283 | + }); | ||
284 | + test('defaultPrevented is correctly set', function() { | ||
285 | + var keySpy = sinon.spy(); | ||
286 | + | ||
287 | + document.addEventListener('keydown', keySpy); | ||
288 | + | ||
289 | + MockInteractions.pressEnter(keys); | ||
290 | + | ||
291 | + expect(keySpy.getCall(0).args[0].defaultPrevented).to.be.equal(true); | ||
292 | + }); | ||
293 | + }); | ||
294 | + | ||
276 | }); | 295 | }); |
277 | </script> | 296 | </script> |
278 | </body> | 297 | </body> |
bower_components/iron-ajax/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-ajax", | 2 | "name": "iron-ajax", |
3 | - "version": "1.0.6", | 3 | + "version": "1.0.7", |
4 | "description": "Makes it easy to make ajax calls and parse the response", | 4 | "description": "Makes it easy to make ajax calls and parse the response", |
5 | "private": true, | 5 | "private": true, |
6 | "authors": [ | 6 | "authors": [ |
@@ -32,11 +32,11 @@ | @@ -32,11 +32,11 @@ | ||
32 | "web-component-tester": "*", | 32 | "web-component-tester": "*", |
33 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | 33 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" |
34 | }, | 34 | }, |
35 | - "_release": "1.0.6", | 35 | + "_release": "1.0.7", |
36 | "_resolution": { | 36 | "_resolution": { |
37 | "type": "version", | 37 | "type": "version", |
38 | - "tag": "v1.0.6", | ||
39 | - "commit": "72f463a166013e12880bb881d680adf386520c49" | 38 | + "tag": "v1.0.7", |
39 | + "commit": "dc3dda81a963e9fd788ed69ed350c5f4cf84d857" | ||
40 | }, | 40 | }, |
41 | "_source": "git://github.com/PolymerElements/iron-ajax.git", | 41 | "_source": "git://github.com/PolymerElements/iron-ajax.git", |
42 | "_target": "^1.0.0", | 42 | "_target": "^1.0.0", |
bower_components/iron-ajax/.gitignore
100644 → 100755
bower_components/iron-ajax/README.md
100644 → 100755
bower_components/iron-ajax/bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-ajax", | 2 | "name": "iron-ajax", |
3 | - "version": "1.0.6", | 3 | + "version": "1.0.7", |
4 | "description": "Makes it easy to make ajax calls and parse the response", | 4 | "description": "Makes it easy to make ajax calls and parse the response", |
5 | "private": true, | 5 | "private": true, |
6 | "authors": [ | 6 | "authors": [ |
bower_components/iron-ajax/demo/index.html
100644 → 100755
bower_components/iron-ajax/hero.svg
100644 → 100755
bower_components/iron-ajax/index.html
100644 → 100755
bower_components/iron-ajax/iron-ajax.html
100644 → 100755
@@ -69,8 +69,7 @@ element. | @@ -69,8 +69,7 @@ element. | ||
69 | * The URL target of the request. | 69 | * The URL target of the request. |
70 | */ | 70 | */ |
71 | url: { | 71 | url: { |
72 | - type: String, | ||
73 | - value: '' | 72 | + type: String |
74 | }, | 73 | }, |
75 | 74 | ||
76 | /** | 75 | /** |
@@ -242,6 +241,8 @@ element. | @@ -242,6 +241,8 @@ element. | ||
242 | * | 241 | * |
243 | * The type of the response is determined by the value of `handleAs` at | 242 | * The type of the response is determined by the value of `handleAs` at |
244 | * the time that the request was generated. | 243 | * the time that the request was generated. |
244 | + * | ||
245 | + * @type {Object} | ||
245 | */ | 246 | */ |
246 | lastResponse: { | 247 | lastResponse: { |
247 | type: Object, | 248 | type: Object, |
@@ -251,6 +252,8 @@ element. | @@ -251,6 +252,8 @@ element. | ||
251 | 252 | ||
252 | /** | 253 | /** |
253 | * lastRequest's error, if any. | 254 | * lastRequest's error, if any. |
255 | + * | ||
256 | + * @type {Object} | ||
254 | */ | 257 | */ |
255 | lastError: { | 258 | lastError: { |
256 | type: Object, | 259 | type: Object, |
@@ -353,13 +356,15 @@ element. | @@ -353,13 +356,15 @@ element. | ||
353 | contentType = 'application/x-www-form-urlencoded'; | 356 | contentType = 'application/x-www-form-urlencoded'; |
354 | } | 357 | } |
355 | if (contentType) { | 358 | if (contentType) { |
356 | - headers['Content-Type'] = contentType; | 359 | + headers['content-type'] = contentType; |
357 | } | 360 | } |
358 | var header; | 361 | var header; |
359 | 362 | ||
360 | if (this.headers instanceof Object) { | 363 | if (this.headers instanceof Object) { |
361 | for (header in this.headers) { | 364 | for (header in this.headers) { |
362 | - headers[header] = this.headers[header].toString(); | 365 | + // Normalize headers in lower case to make it easier for iron-request |
366 | + // to reason about them. | ||
367 | + headers[header.toLowerCase()] = this.headers[header].toString(); | ||
363 | } | 368 | } |
364 | } | 369 | } |
365 | 370 | ||
@@ -381,7 +386,7 @@ element. | @@ -381,7 +386,7 @@ element. | ||
381 | */ | 386 | */ |
382 | toRequestOptions: function() { | 387 | toRequestOptions: function() { |
383 | return { | 388 | return { |
384 | - url: this.requestUrl, | 389 | + url: this.requestUrl || '', |
385 | method: this.method, | 390 | method: this.method, |
386 | headers: this.requestHeaders, | 391 | headers: this.requestHeaders, |
387 | body: this.body, | 392 | body: this.body, |
@@ -462,7 +467,7 @@ element. | @@ -462,7 +467,7 @@ element. | ||
462 | 467 | ||
463 | _requestOptionsChanged: function() { | 468 | _requestOptionsChanged: function() { |
464 | this.debounce('generate-request', function() { | 469 | this.debounce('generate-request', function() { |
465 | - if (!this.url && this.url !== '') { | 470 | + if (this.url == null) { |
466 | return; | 471 | return; |
467 | } | 472 | } |
468 | 473 |
bower_components/iron-ajax/iron-request.html
100644 → 100755
@@ -183,7 +183,7 @@ iron-request can be used to perform XMLHttpRequests. | @@ -183,7 +183,7 @@ iron-request can be used to perform XMLHttpRequests. | ||
183 | * async By default, all requests are sent asynchronously. To send synchronous requests, | 183 | * async By default, all requests are sent asynchronously. To send synchronous requests, |
184 | * set to true. | 184 | * set to true. |
185 | * body The content for the request body for POST method. | 185 | * body The content for the request body for POST method. |
186 | - * headers HTTP request headers. | 186 | + * headers HTTP request headers. All keys must be lower case. |
187 | * handleAs The response type. Default is 'text'. | 187 | * handleAs The response type. Default is 'text'. |
188 | * withCredentials Whether or not to send credentials on the request. Default is false. | 188 | * withCredentials Whether or not to send credentials on the request. Default is false. |
189 | * timeout: (Number|undefined) | 189 | * timeout: (Number|undefined) |
@@ -241,20 +241,28 @@ iron-request can be used to perform XMLHttpRequests. | @@ -241,20 +241,28 @@ iron-request can be used to perform XMLHttpRequests. | ||
241 | options.async !== false | 241 | options.async !== false |
242 | ); | 242 | ); |
243 | 243 | ||
244 | - if (options.headers) { | ||
245 | - Object.keys(options.headers).forEach(function (requestHeader) { | ||
246 | - xhr.setRequestHeader( | ||
247 | - requestHeader, | ||
248 | - options.headers[requestHeader] | ||
249 | - ); | ||
250 | - }, this); | 244 | + var acceptType = { |
245 | + 'json': 'application/json', | ||
246 | + 'text': 'text/plain', | ||
247 | + 'html': 'text/html', | ||
248 | + 'xml': 'application/xml', | ||
249 | + 'arraybuffer': 'application/octet-stream' | ||
250 | + }[options.handleAs]; | ||
251 | + var headers = options.headers || {}; | ||
252 | + if (acceptType && !headers['accept']) { | ||
253 | + headers['accept'] = acceptType; | ||
251 | } | 254 | } |
255 | + Object.keys(headers).forEach(function (requestHeader) { | ||
256 | + if (/[A-Z]/.test(requestHeader)) { | ||
257 | + console.error('Headers must be lower case, got', requestHeader); | ||
258 | + } | ||
259 | + xhr.setRequestHeader( | ||
260 | + requestHeader, | ||
261 | + headers[requestHeader] | ||
262 | + ); | ||
263 | + }, this); | ||
252 | 264 | ||
253 | - var contentType; | ||
254 | - if (options.headers) { | ||
255 | - contentType = options.headers['Content-Type']; | ||
256 | - } | ||
257 | - var body = this._encodeBodyObject(options.body, contentType); | 265 | + var body = this._encodeBodyObject(options.body, headers['content-type']); |
258 | 266 | ||
259 | // In IE, `xhr.responseType` is an empty string when the response | 267 | // In IE, `xhr.responseType` is an empty string when the response |
260 | // returns. Hence, caching it as `xhr._responseType`. | 268 | // returns. Hence, caching it as `xhr._responseType`. |
bower_components/iron-ajax/test/index.html
100644 → 100755
bower_components/iron-ajax/test/iron-ajax.html
100644 → 100755
@@ -55,6 +55,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -55,6 +55,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
55 | debounce-duration="150"></iron-ajax> | 55 | debounce-duration="150"></iron-ajax> |
56 | </template> | 56 | </template> |
57 | </test-fixture> | 57 | </test-fixture> |
58 | + <test-fixture id='BlankUrl'> | ||
59 | + <template> | ||
60 | + <iron-ajax auto handle-as='text'></iron-ajax> | ||
61 | + </template> | ||
62 | + </test-fixture> | ||
58 | <!-- note(rictic): | 63 | <!-- note(rictic): |
59 | This makes us dependent on a third-party server, but we need to be able | 64 | This makes us dependent on a third-party server, but we need to be able |
60 | to check what headers the browser actually sends on the wire. | 65 | to check what headers the browser actually sends on the wire. |
@@ -197,6 +202,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -197,6 +202,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
197 | }); | 202 | }); |
198 | }); | 203 | }); |
199 | 204 | ||
205 | + suite('when url isn\'t set yet', function() { | ||
206 | + test('we don\'t fire any automatic requests', function() { | ||
207 | + expect(server.requests.length).to.be.equal(0); | ||
208 | + ajax = fixture('BlankUrl'); | ||
209 | + | ||
210 | + return timePasses(1).then(function() { | ||
211 | + // We don't make any requests. | ||
212 | + expect(server.requests.length).to.be.equal(0); | ||
213 | + | ||
214 | + // Explicitly asking for the request to fire works. | ||
215 | + ajax.generateRequest(); | ||
216 | + expect(server.requests.length).to.be.equal(1); | ||
217 | + server.requests = []; | ||
218 | + | ||
219 | + // Explicitly setting url to '' works too. | ||
220 | + ajax = fixture('BlankUrl'); | ||
221 | + ajax.url = ''; | ||
222 | + return timePasses(1); | ||
223 | + }).then(function() { | ||
224 | + expect(server.requests.length).to.be.equal(1); | ||
225 | + }); | ||
226 | + }); | ||
227 | + }); | ||
228 | + | ||
200 | suite('when properties are changed', function() { | 229 | suite('when properties are changed', function() { |
201 | test('generates simple-request elements that reflect the change', function() { | 230 | test('generates simple-request elements that reflect the change', function() { |
202 | request = ajax.generateRequest(); | 231 | request = ajax.generateRequest(); |
@@ -590,6 +619,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -590,6 +619,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
590 | expect(typeof(ajax.lastResponse)).to.be.equal('string'); | 619 | expect(typeof(ajax.lastResponse)).to.be.equal('string'); |
591 | }); | 620 | }); |
592 | 621 | ||
622 | + expect(server.requests.length).to.be.equal(1); | ||
623 | + expect(server.requests[0].requestHeaders['accept']).to.be.equal( | ||
624 | + 'text/plain'); | ||
593 | server.respond(); | 625 | server.respond(); |
594 | 626 | ||
595 | return promise; | 627 | return promise; |
@@ -662,6 +694,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -662,6 +694,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
662 | expect(typeof(ajax.lastResponse)).to.be.equal('object'); | 694 | expect(typeof(ajax.lastResponse)).to.be.equal('object'); |
663 | }); | 695 | }); |
664 | 696 | ||
697 | + expect(server.requests.length).to.be.equal(1); | ||
698 | + expect(server.requests[0].requestHeaders['accept']).to.be.equal( | ||
699 | + 'application/json'); | ||
700 | + | ||
665 | server.respond(); | 701 | server.respond(); |
666 | 702 | ||
667 | return promise; | 703 | return promise; |
bower_components/iron-ajax/test/iron-request.html
100644 → 100755
@@ -126,6 +126,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -126,6 +126,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
126 | options.handleAs = 'json'; | 126 | options.handleAs = 'json'; |
127 | 127 | ||
128 | request.send(options); | 128 | request.send(options); |
129 | + expect(server.requests.length).to.be.equal(1); | ||
130 | + expect(server.requests[0].requestHeaders['accept']).to.be.equal( | ||
131 | + 'application/json'); | ||
129 | server.respond(); | 132 | server.respond(); |
130 | 133 | ||
131 | return request.completes.then(function() { | 134 | return request.completes.then(function() { |
@@ -139,6 +142,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -139,6 +142,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
139 | options.async = false; | 142 | options.async = false; |
140 | 143 | ||
141 | request.send(options); | 144 | request.send(options); |
145 | + expect(server.requests.length).to.be.equal(1); | ||
146 | + expect(server.requests[0].requestHeaders['accept']).to.be.equal( | ||
147 | + 'application/json'); | ||
142 | server.respond(); | 148 | server.respond(); |
143 | 149 | ||
144 | return request.completes.then(function() { | 150 | return request.completes.then(function() { |
bower_components/iron-autogrow-textarea/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-autogrow-textarea", | 2 | "name": "iron-autogrow-textarea", |
3 | - "version": "1.0.7", | 3 | + "version": "1.0.8", |
4 | "description": "A textarea element that automatically grows with input", | 4 | "description": "A textarea element that automatically grows with input", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
@@ -37,11 +37,11 @@ | @@ -37,11 +37,11 @@ | ||
37 | "paper-styles": "PolymerElements/paper-styles#^1.0.0", | 37 | "paper-styles": "PolymerElements/paper-styles#^1.0.0", |
38 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | 38 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" |
39 | }, | 39 | }, |
40 | - "_release": "1.0.7", | 40 | + "_release": "1.0.8", |
41 | "_resolution": { | 41 | "_resolution": { |
42 | "type": "version", | 42 | "type": "version", |
43 | - "tag": "v1.0.7", | ||
44 | - "commit": "f31131a9c45af7845780f94ec7e69816929ac6cc" | 43 | + "tag": "v1.0.8", |
44 | + "commit": "ea7fb14d8038ccbedc6e85b9c4842b68c659a503" | ||
45 | }, | 45 | }, |
46 | "_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git", | 46 | "_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git", |
47 | "_target": "^1.0.0", | 47 | "_target": "^1.0.0", |
bower_components/iron-autogrow-textarea/.gitignore
100644 → 100755
bower_components/iron-autogrow-textarea/README.md
100644 → 100755
bower_components/iron-autogrow-textarea/bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-autogrow-textarea", | 2 | "name": "iron-autogrow-textarea", |
3 | - "version": "1.0.7", | 3 | + "version": "1.0.8", |
4 | "description": "A textarea element that automatically grows with input", | 4 | "description": "A textarea element that automatically grows with input", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
bower_components/iron-autogrow-textarea/demo/index.html
100644 → 100755
bower_components/iron-autogrow-textarea/index.html
100644 → 100755
bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html
100644 → 100755
@@ -10,7 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -10,7 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
10 | 10 | ||
11 | <link rel="import" href="../polymer/polymer.html"> | 11 | <link rel="import" href="../polymer/polymer.html"> |
12 | <link rel="import" href="../iron-behaviors/iron-control-state.html"> | 12 | <link rel="import" href="../iron-behaviors/iron-control-state.html"> |
13 | -<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html"> | 13 | +<link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> |
14 | <link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html"> | 14 | <link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html"> |
15 | <link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html"> | 15 | <link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html"> |
16 | 16 | ||
@@ -55,6 +55,10 @@ Custom property | Description | Default | @@ -55,6 +55,10 @@ Custom property | Description | Default | ||
55 | word-wrap: break-word; | 55 | word-wrap: break-word; |
56 | } | 56 | } |
57 | 57 | ||
58 | + .fit { | ||
59 | + @apply(--layout-fit); | ||
60 | + } | ||
61 | + | ||
58 | textarea { | 62 | textarea { |
59 | position: relative; | 63 | position: relative; |
60 | outline: none; | 64 | outline: none; |
@@ -68,6 +72,7 @@ Custom property | Description | Default | @@ -68,6 +72,7 @@ Custom property | Description | Default | ||
68 | font-size: inherit; | 72 | font-size: inherit; |
69 | font-family: inherit; | 73 | font-family: inherit; |
70 | line-height: inherit; | 74 | line-height: inherit; |
75 | + text-align: inherit; | ||
71 | @apply(--iron-autogrow-textarea); | 76 | @apply(--iron-autogrow-textarea); |
72 | } | 77 | } |
73 | 78 | ||
@@ -78,7 +83,8 @@ Custom property | Description | Default | @@ -78,7 +83,8 @@ Custom property | Description | Default | ||
78 | </style> | 83 | </style> |
79 | <template> | 84 | <template> |
80 | <!-- the mirror sizes the input/textarea so it grows with typing --> | 85 | <!-- the mirror sizes the input/textarea so it grows with typing --> |
81 | - <div id="mirror" class="mirror-text" aria-hidden="true"> </div> | 86 | + <!-- use   instead of to allow this element to be used in XHTML --> |
87 | + <div id="mirror" class="mirror-text" aria-hidden="true"> </div> | ||
82 | 88 | ||
83 | <!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --> | 89 | <!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --> |
84 | <div class="textarea-container fit"> | 90 | <div class="textarea-container fit"> |
@@ -112,6 +118,8 @@ Custom property | Description | Default | @@ -112,6 +118,8 @@ Custom property | Description | Default | ||
112 | 118 | ||
113 | /** | 119 | /** |
114 | * Use this property instead of `value` for two-way data binding. | 120 | * Use this property instead of `value` for two-way data binding. |
121 | + * | ||
122 | + * @type {string|number|undefined|null} | ||
115 | */ | 123 | */ |
116 | bindValue: { | 124 | bindValue: { |
117 | observer: '_bindValueChanged', | 125 | observer: '_bindValueChanged', |
@@ -315,7 +323,8 @@ Custom property | Description | Default | @@ -315,7 +323,8 @@ Custom property | Description | Default | ||
315 | while (this.rows > 0 && _tokens.length < this.rows) { | 323 | while (this.rows > 0 && _tokens.length < this.rows) { |
316 | _tokens.push(''); | 324 | _tokens.push(''); |
317 | } | 325 | } |
318 | - return _tokens.join('<br>') + ' '; | 326 | + // Use   instead of to allow this element to be used in XHTML. |
327 | + return _tokens.join('<br/>') + ' '; | ||
319 | }, | 328 | }, |
320 | 329 | ||
321 | _valueForMirror: function() { | 330 | _valueForMirror: function() { |
bower_components/iron-autogrow-textarea/test/basic.html
100644 → 100755
bower_components/iron-autogrow-textarea/test/index.html
100644 → 100755
bower_components/iron-behaviors/.bower.json
100644 → 100755
bower_components/iron-behaviors/.gitignore
100644 → 100755
bower_components/iron-behaviors/README.md
100644 → 100755
bower_components/iron-behaviors/bower.json
100644 → 100755
bower_components/iron-behaviors/demo/index.html
100644 → 100755
bower_components/iron-behaviors/demo/simple-button.html
100644 → 100755
bower_components/iron-behaviors/index.html
100644 → 100755
bower_components/iron-behaviors/iron-button-state.html
100644 → 100755
bower_components/iron-behaviors/iron-control-state.html
100644 → 100755
bower_components/iron-behaviors/test/active-state.html
100644 → 100755
bower_components/iron-behaviors/test/disabled-state.html
100644 → 100755
bower_components/iron-behaviors/test/focused-state.html
100644 → 100755
bower_components/iron-behaviors/test/index.html
100644 → 100755
bower_components/iron-behaviors/test/test-elements.html
100644 → 100755
bower_components/iron-collapse/.bower.json
100644 → 100755
bower_components/iron-collapse/.gitignore
100644 → 100755
bower_components/iron-collapse/README.md
100644 → 100755
bower_components/iron-collapse/bower.json
100644 → 100755
bower_components/iron-collapse/demo/index.html
100644 → 100755
bower_components/iron-collapse/index.html
100644 → 100755
bower_components/iron-collapse/iron-collapse.html
100644 → 100755
bower_components/iron-collapse/test/a11y.html
100644 → 100755
bower_components/iron-collapse/test/basic.html
100644 → 100755
bower_components/iron-collapse/test/horizontal.html
100644 → 100755
bower_components/iron-collapse/test/index.html
100644 → 100755
bower_components/iron-component-page/.bower.json
100644 → 100755
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | "type": "git", | 13 | "type": "git", |
14 | "url": "git://github.com/PolymerElements/iron-component-page.git" | 14 | "url": "git://github.com/PolymerElements/iron-component-page.git" |
15 | }, | 15 | }, |
16 | - "version": "1.0.7", | 16 | + "version": "1.0.8", |
17 | "private": true, | 17 | "private": true, |
18 | "license": "http://polymer.github.io/LICENSE.txt", | 18 | "license": "http://polymer.github.io/LICENSE.txt", |
19 | "dependencies": { | 19 | "dependencies": { |
@@ -34,11 +34,11 @@ | @@ -34,11 +34,11 @@ | ||
34 | "web-component-tester": "*" | 34 | "web-component-tester": "*" |
35 | }, | 35 | }, |
36 | "homepage": "https://github.com/PolymerElements/iron-component-page", | 36 | "homepage": "https://github.com/PolymerElements/iron-component-page", |
37 | - "_release": "1.0.7", | 37 | + "_release": "1.0.8", |
38 | "_resolution": { | 38 | "_resolution": { |
39 | "type": "version", | 39 | "type": "version", |
40 | - "tag": "v1.0.7", | ||
41 | - "commit": "77a463d00fcf0f00a764dd01fd01a6f21bd40745" | 40 | + "tag": "v1.0.8", |
41 | + "commit": "62c6498987e17b5480d8d05ddcaf2fa9ef8525a0" | ||
42 | }, | 42 | }, |
43 | "_source": "git://github.com/PolymerElements/iron-component-page.git", | 43 | "_source": "git://github.com/PolymerElements/iron-component-page.git", |
44 | "_target": "^1.0.0", | 44 | "_target": "^1.0.0", |
bower_components/iron-component-page/.gitignore
100644 → 100755
bower_components/iron-component-page/README.md
100644 → 100755
bower_components/iron-component-page/bower.json
100644 → 100755
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | "type": "git", | 13 | "type": "git", |
14 | "url": "git://github.com/PolymerElements/iron-component-page.git" | 14 | "url": "git://github.com/PolymerElements/iron-component-page.git" |
15 | }, | 15 | }, |
16 | - "version": "1.0.7", | 16 | + "version": "1.0.8", |
17 | "private": true, | 17 | "private": true, |
18 | "license": "http://polymer.github.io/LICENSE.txt", | 18 | "license": "http://polymer.github.io/LICENSE.txt", |
19 | "dependencies": { | 19 | "dependencies": { |
bower_components/iron-component-page/demo/index.html
100644 → 100755
bower_components/iron-component-page/demo/json-descriptor.json
100644 → 100755
bower_components/iron-component-page/index.html
100644 → 100755
bower_components/iron-component-page/iron-component-page.css
100644 → 100755
@@ -98,8 +98,9 @@ paper-toolbar a:hover, paper-toolbar a:hover iron-icon, paper-toolbar a.iron-sel | @@ -98,8 +98,9 @@ paper-toolbar a:hover, paper-toolbar a:hover iron-icon, paper-toolbar a.iron-sel | ||
98 | } | 98 | } |
99 | 99 | ||
100 | #docs { | 100 | #docs { |
101 | + max-width: var(--iron-component-page-max-width, 48em); | ||
102 | + @apply(--iron-component-page-container); | ||
101 | padding: 20px; | 103 | padding: 20px; |
102 | - max-width: 48em; | ||
103 | margin: 0 auto; | 104 | margin: 0 auto; |
104 | } | 105 | } |
105 | 106 |
bower_components/iron-component-page/iron-component-page.html
100644 → 100755
bower_components/iron-component-page/test/index.html
100644 → 100755
bower_components/iron-component-page/test/iron-component-page.html
100644 → 100755
bower_components/iron-component-page/test/test-element.html
100644 → 100755
bower_components/iron-doc-viewer/.bower.json
100644 → 100755
bower_components/iron-doc-viewer/README.md
100644 → 100755
bower_components/iron-doc-viewer/bower.json
100644 → 100755
bower_components/iron-doc-viewer/demo/index.html
100644 → 100755
bower_components/iron-doc-viewer/index.html
100644 → 100755
bower_components/iron-doc-viewer/iron-doc-property.css
100644 → 100755
bower_components/iron-doc-viewer/iron-doc-property.html
100644 → 100755
bower_components/iron-doc-viewer/iron-doc-viewer.css
100644 → 100755
bower_components/iron-doc-viewer/iron-doc-viewer.html
100644 → 100755
bower_components/iron-doc-viewer/test/index.html
100644 → 100755
bower_components/iron-doc-viewer/test/iron-doc-viewer.html
100644 → 100755
bower_components/iron-dropdown/.bower.json
100644 → 100755
bower_components/iron-dropdown/.gitignore
100644 → 100755
bower_components/iron-dropdown/README.md
100644 → 100755
bower_components/iron-dropdown/bower.json
100644 → 100755
bower_components/iron-dropdown/demo/grow-height-animation.html
100644 → 100755
bower_components/iron-dropdown/demo/index.html
100644 → 100755
bower_components/iron-dropdown/demo/x-select.html
100644 → 100755
bower_components/iron-dropdown/index.html
100644 → 100755
bower_components/iron-dropdown/iron-dropdown-scroll-manager.html
100644 → 100755
bower_components/iron-dropdown/iron-dropdown.html
100644 → 100755
bower_components/iron-dropdown/test/index.html
100644 → 100755
bower_components/iron-dropdown/test/iron-dropdown-scroll-manager.html
100644 → 100755
bower_components/iron-dropdown/test/iron-dropdown.html
100644 → 100755
bower_components/iron-form-element-behavior/.bower.json
100644 → 100755
bower_components/iron-form-element-behavior/.gitignore
100644 → 100755
bower_components/iron-form-element-behavior/README.md
100644 → 100755
bower_components/iron-form-element-behavior/bower.json
100644 → 100755
bower_components/iron-form-element-behavior/demo/index.html
100644 → 100755
bower_components/iron-form-element-behavior/demo/simple-element.html
100644 → 100755
bower_components/iron-form-element-behavior/demo/simple-form.html
100644 → 100755
bower_components/iron-form-element-behavior/index.html
100644 → 100755
bower_components/iron-form-element-behavior/iron-form-element-behavior.html
100644 → 100755
bower_components/iron-form/.bower.json
100644 → 100755
bower_components/iron-form/.gitignore
100644 → 100755
bower_components/iron-form/README.md
100644 → 100755
bower_components/iron-form/bower.json
100644 → 100755
bower_components/iron-form/demo/index.html
100644 → 100755
bower_components/iron-form/demo/simple-element.html
100644 → 100755
bower_components/iron-form/index.html
100644 → 100755
bower_components/iron-form/iron-form.html
100644 → 100755
bower_components/iron-form/test/basic.html
100644 → 100755
bower_components/iron-form/test/index.html
100644 → 100755
bower_components/iron-form/test/simple-element.html
100644 → 100755
bower_components/iron-icon/.bower.json
100644 → 100755
bower_components/iron-icon/.gitignore
100644 → 100755
bower_components/iron-icon/README.md
100644 → 100755
bower_components/iron-icon/bower.json
100644 → 100755
bower_components/iron-icon/demo/async.html
100644 → 100755
bower_components/iron-icon/demo/index.html
100644 → 100755
bower_components/iron-icon/demo/location.png
100644 → 100755
bower_components/iron-icon/index.html
100644 → 100755
bower_components/iron-icon/iron-icon.html
100644 → 100755
bower_components/iron-icon/test/index.html
100644 → 100755
bower_components/iron-icon/test/iron-icon.html
100644 → 100755
bower_components/iron-iconset-svg/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-iconset-svg", | 2 | "name": "iron-iconset-svg", |
3 | "description": "Manages a set of svg icons", | 3 | "description": "Manages a set of svg icons", |
4 | - "version": "1.0.7", | 4 | + "version": "1.0.8", |
5 | "keywords": [ | 5 | "keywords": [ |
6 | "web-components", | 6 | "web-components", |
7 | "polymer", | 7 | "polymer", |
@@ -30,11 +30,11 @@ | @@ -30,11 +30,11 @@ | ||
30 | "web-component-tester": "*" | 30 | "web-component-tester": "*" |
31 | }, | 31 | }, |
32 | "homepage": "https://github.com/PolymerElements/iron-iconset-svg", | 32 | "homepage": "https://github.com/PolymerElements/iron-iconset-svg", |
33 | - "_release": "1.0.7", | 33 | + "_release": "1.0.8", |
34 | "_resolution": { | 34 | "_resolution": { |
35 | "type": "version", | 35 | "type": "version", |
36 | - "tag": "v1.0.7", | ||
37 | - "commit": "e34ed33838b872d38753eefec2e697d8adb8662d" | 36 | + "tag": "v1.0.8", |
37 | + "commit": "7f8b0a5800254247cb518356aee983155374f519" | ||
38 | }, | 38 | }, |
39 | "_source": "git://github.com/PolymerElements/iron-iconset-svg.git", | 39 | "_source": "git://github.com/PolymerElements/iron-iconset-svg.git", |
40 | "_target": "^1.0.0", | 40 | "_target": "^1.0.0", |
bower_components/iron-iconset-svg/.gitignore
100644 → 100755
bower_components/iron-iconset-svg/README.md
100644 → 100755
bower_components/iron-iconset-svg/bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-iconset-svg", | 2 | "name": "iron-iconset-svg", |
3 | "description": "Manages a set of svg icons", | 3 | "description": "Manages a set of svg icons", |
4 | - "version": "1.0.7", | 4 | + "version": "1.0.8", |
5 | "keywords": [ | 5 | "keywords": [ |
6 | "web-components", | 6 | "web-components", |
7 | "polymer", | 7 | "polymer", |
bower_components/iron-iconset-svg/demo/index.html
100644 → 100755
bower_components/iron-iconset-svg/demo/svg-sample-icons.html
100644 → 100755
bower_components/iron-iconset-svg/index.html
100644 → 100755
bower_components/iron-iconset-svg/iron-iconset-svg.html
100644 → 100755
@@ -69,6 +69,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -69,6 +69,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
69 | } | 69 | } |
70 | 70 | ||
71 | }, | 71 | }, |
72 | + | ||
73 | + attached: function() { | ||
74 | + this.style.display = 'none'; | ||
75 | + }, | ||
72 | 76 | ||
73 | /** | 77 | /** |
74 | * Construct an array of all icon names in this iconset. | 78 | * Construct an array of all icon names in this iconset. |
bower_components/iron-iconset-svg/test/index.html
100644 → 100755
bower_components/iron-iconset-svg/test/iron-iconset-svg.html
100644 → 100755
@@ -78,6 +78,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -78,6 +78,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
78 | expect(meta.byKey('foo')).to.be.equal(iconset); | 78 | expect(meta.byKey('foo')).to.be.equal(iconset); |
79 | }); | 79 | }); |
80 | 80 | ||
81 | + test('it does not have a size', function () { | ||
82 | + var rect = iconset.getBoundingClientRect(); | ||
83 | + expect(rect.width).to.be.equal(0); | ||
84 | + expect(rect.height).to.be.equal(0); | ||
85 | + }); | ||
86 | + | ||
81 | test('it fires an iron-iconset-added event on the window', function() { | 87 | test('it fires an iron-iconset-added event on the window', function() { |
82 | return loadedPromise; | 88 | return loadedPromise; |
83 | }); | 89 | }); |
@@ -93,6 +99,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -93,6 +99,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
93 | div = elements[1]; | 99 | div = elements[1]; |
94 | }); | 100 | }); |
95 | 101 | ||
102 | + test('it does not have a size', function () { | ||
103 | + var rect = iconset.getBoundingClientRect(); | ||
104 | + expect(rect.width).to.be.equal(0); | ||
105 | + expect(rect.height).to.be.equal(0); | ||
106 | + }); | ||
107 | + | ||
96 | test('appends a child to the target element', function () { | 108 | test('appends a child to the target element', function () { |
97 | expect(div.firstElementChild).to.not.be.ok; | 109 | expect(div.firstElementChild).to.not.be.ok; |
98 | iconset.applyIcon(div, 'circle'); | 110 | iconset.applyIcon(div, 'circle'); |
bower_components/iron-iconset/.bower.json
100644 → 100755
bower_components/iron-iconset/.gitignore
100644 → 100755
bower_components/iron-iconset/README.md
100644 → 100755
bower_components/iron-iconset/bower.json
100644 → 100755
bower_components/iron-iconset/demo/index.html
100644 → 100755
bower_components/iron-iconset/demo/my-icons-big.png
100644 → 100755
bower_components/iron-iconset/demo/my-icons.png
100644 → 100755
bower_components/iron-iconset/index.html
100644 → 100755
bower_components/iron-iconset/iron-iconset.html
100644 → 100755
bower_components/iron-iconset/test/index.html
100644 → 100755
bower_components/iron-iconset/test/iron-iconset.html
100644 → 100755
bower_components/iron-list/.bower.json
100644 → 100755
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | "list", | 7 | "list", |
8 | "virtual-list" | 8 | "virtual-list" |
9 | ], | 9 | ], |
10 | - "version": "1.1.4", | 10 | + "version": "1.1.5", |
11 | "homepage": "https://github.com/PolymerElements/iron-list", | 11 | "homepage": "https://github.com/PolymerElements/iron-list", |
12 | "authors": [ | 12 | "authors": [ |
13 | "The Polymer Authors" | 13 | "The Polymer Authors" |
@@ -37,11 +37,11 @@ | @@ -37,11 +37,11 @@ | ||
37 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.2", | 37 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.2", |
38 | "web-component-tester": "*" | 38 | "web-component-tester": "*" |
39 | }, | 39 | }, |
40 | - "_release": "1.1.4", | 40 | + "_release": "1.1.5", |
41 | "_resolution": { | 41 | "_resolution": { |
42 | "type": "version", | 42 | "type": "version", |
43 | - "tag": "v1.1.4", | ||
44 | - "commit": "7f1b6c05d96c2655ad138e99f3ee44d074f8df7b" | 43 | + "tag": "v1.1.5", |
44 | + "commit": "c6bf7caf1745cc3bed0769d41ac405476ef981b8" | ||
45 | }, | 45 | }, |
46 | "_source": "git://github.com/PolymerElements/iron-list.git", | 46 | "_source": "git://github.com/PolymerElements/iron-list.git", |
47 | "_target": "^1.0.0", | 47 | "_target": "^1.0.0", |
bower_components/iron-list/.gitignore
100644 → 100755
bower_components/iron-list/README.md
100644 → 100755
bower_components/iron-list/bower.json
100644 → 100755
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | "list", | 7 | "list", |
8 | "virtual-list" | 8 | "virtual-list" |
9 | ], | 9 | ], |
10 | - "version": "1.1.4", | 10 | + "version": "1.1.5", |
11 | "homepage": "https://github.com/PolymerElements/iron-list", | 11 | "homepage": "https://github.com/PolymerElements/iron-list", |
12 | "authors": [ | 12 | "authors": [ |
13 | "The Polymer Authors" | 13 | "The Polymer Authors" |
bower_components/iron-list/demo/collapse.html
100644 → 100755
bower_components/iron-list/demo/data/contacts.json
100644 → 100755
bower_components/iron-list/demo/demo1.html
0 → 100644
1 | +<!-- | ||
2 | +@license | ||
3 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
4 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
5 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
6 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
7 | +Code distributed by Google as part of the polymer project is also | ||
8 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
9 | +--> | ||
10 | + | ||
11 | +<!doctype html> | ||
12 | +<html> | ||
13 | +<head> | ||
14 | + | ||
15 | + <title>iron-list demo</title> | ||
16 | + | ||
17 | + <meta charset="utf-8"> | ||
18 | + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> | ||
19 | + <meta name="mobile-web-app-capable" content="yes"> | ||
20 | + <meta name="apple-mobile-web-app-capable" content="yes"> | ||
21 | + | ||
22 | + <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
23 | + | ||
24 | + <link rel="import" href="../../polymer/polymer.html"> | ||
25 | + <link rel="import" href="../../iron-flex-layout/iron-flex-layout.html"> | ||
26 | + <link rel="import" href="../iron-list.html"> | ||
27 | + | ||
28 | + <link rel="import" href="../../iron-ajax/iron-ajax.html"> | ||
29 | + <link rel="import" href="../../iron-icon/iron-icon.html"> | ||
30 | + <link rel="import" href="../../iron-icons/iron-icons.html"> | ||
31 | + <link rel="import" href="../../paper-toolbar/paper-toolbar.html"> | ||
32 | + | ||
33 | + <dom-module id="x-app"> | ||
34 | + | ||
35 | + <style> | ||
36 | + | ||
37 | + :host { | ||
38 | + @apply(--layout-fit); | ||
39 | + @apply(--layout-vertical); | ||
40 | + | ||
41 | + display: block; | ||
42 | + font-family: sans-serif; | ||
43 | + } | ||
44 | + | ||
45 | + .toolbar { | ||
46 | + background: #E91E63; | ||
47 | + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); | ||
48 | + color: white; | ||
49 | + } | ||
50 | + | ||
51 | + #list { | ||
52 | + @apply(--layout-flex); | ||
53 | + } | ||
54 | + | ||
55 | + .item { | ||
56 | + padding: 16px; | ||
57 | + @apply(--layout-horizontal); | ||
58 | + } | ||
59 | + | ||
60 | + .avatar { | ||
61 | + height: 40px; | ||
62 | + width: 40px; | ||
63 | + border-radius: 20px; | ||
64 | + box-sizing: border-box; | ||
65 | + border: 1px solid #DDD; | ||
66 | + background-color: #DDD; | ||
67 | + } | ||
68 | + | ||
69 | + .pad { | ||
70 | + padding: 0 16px; | ||
71 | + @apply(--layout-flex); | ||
72 | + @apply(--layout-vertical); | ||
73 | + } | ||
74 | + | ||
75 | + .primary { | ||
76 | + font-size: 16px; | ||
77 | + } | ||
78 | + | ||
79 | + .secondary { | ||
80 | + font-size: 14px; | ||
81 | + } | ||
82 | + | ||
83 | + .dim { | ||
84 | + color: gray; | ||
85 | + } | ||
86 | + | ||
87 | + .border { | ||
88 | + margin-left: 72px; | ||
89 | + border-bottom: 1px solid #DDD; | ||
90 | + } | ||
91 | + | ||
92 | + iron-icon { | ||
93 | + width: 24px; | ||
94 | + height: 24px; | ||
95 | + } | ||
96 | + | ||
97 | + </style> | ||
98 | + | ||
99 | + <template> | ||
100 | + | ||
101 | + <iron-ajax url="data/contacts.json" last-response="{{data}}" auto></iron-ajax> | ||
102 | + | ||
103 | + <paper-toolbar class="toolbar"> | ||
104 | + <div>Inbox</div> | ||
105 | + </paper-toolbar> | ||
106 | + | ||
107 | + <iron-list id="list" items="[[data]]" as="item"> | ||
108 | + <template> | ||
109 | + <div> | ||
110 | + <div class="item"> | ||
111 | + <img class="avatar" src="[[item.image]]"> | ||
112 | + <div class="pad"> | ||
113 | + <div class="primary"> | ||
114 | + <span>[[index]]</span> | ||
115 | + <span>[[item.name]]</span> | ||
116 | + </div> | ||
117 | + <div class="secondary">[[item.shortText]]</div> | ||
118 | + <div class="secondary dim">[[item.longText]]</div> | ||
119 | + </div> | ||
120 | + <iron-icon icon$="[[iconForItem(item)]]"></iron-icon> | ||
121 | + </div> | ||
122 | + <div class="border"></div> | ||
123 | + </div> | ||
124 | + </template> | ||
125 | + </iron-list> | ||
126 | + | ||
127 | + </template> | ||
128 | + </dom-module> | ||
129 | + | ||
130 | + <script> | ||
131 | + | ||
132 | + HTMLImports.whenReady(function() { | ||
133 | + | ||
134 | + Polymer({ | ||
135 | + | ||
136 | + is: 'x-app', | ||
137 | + | ||
138 | + iconForItem: function(item) { | ||
139 | + return item ? (item.integer < 50 ? 'star-border' : 'star') : ''; | ||
140 | + } | ||
141 | + | ||
142 | + }); | ||
143 | + | ||
144 | + }); | ||
145 | + | ||
146 | + </script> | ||
147 | + | ||
148 | +</head> | ||
149 | +<body unresolved> | ||
150 | + | ||
151 | + <x-app></x-app> | ||
152 | + | ||
153 | +</body> | ||
154 | +</html> |
bower_components/iron-list/demo/external-content.html
100644 → 100755
bower_components/iron-list/demo/index.html
100644 → 100755
@@ -117,7 +117,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -117,7 +117,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
117 | <iron-list items="[[data]]" as="item"> | 117 | <iron-list items="[[data]]" as="item"> |
118 | <template> | 118 | <template> |
119 | <div> | 119 | <div> |
120 | - <div class="item" tabindex="0"> | 120 | + <div class="item"> |
121 | <img class="avatar" src="[[item.image]]"> | 121 | <img class="avatar" src="[[item.image]]"> |
122 | <div class="pad"> | 122 | <div class="pad"> |
123 | <div class="primary">[[item.name]]</div> | 123 | <div class="primary">[[item.name]]</div> |
bower_components/iron-list/demo/selection.html
100644 → 100755
bower_components/iron-list/index.html
100644 → 100755
bower_components/iron-list/iron-list.html
100644 → 100755
@@ -371,6 +371,13 @@ after the list became visible again. e.g. | @@ -371,6 +371,13 @@ after the list became visible again. e.g. | ||
371 | }, | 371 | }, |
372 | 372 | ||
373 | /** | 373 | /** |
374 | + * The bottom of the scroll. | ||
375 | + */ | ||
376 | + get _scrollBottom() { | ||
377 | + return this._scrollPosition + this._viewportSize; | ||
378 | + }, | ||
379 | + | ||
380 | + /** | ||
374 | * The n-th item rendered in the last physical item. | 381 | * The n-th item rendered in the last physical item. |
375 | */ | 382 | */ |
376 | get _virtualEnd() { | 383 | get _virtualEnd() { |
@@ -525,19 +532,13 @@ after the list became visible again. e.g. | @@ -525,19 +532,13 @@ after the list became visible again. e.g. | ||
525 | * items in the viewport and recycle tiles as needed. | 532 | * items in the viewport and recycle tiles as needed. |
526 | */ | 533 | */ |
527 | _refresh: function() { | 534 | _refresh: function() { |
528 | - var SCROLL_DIRECTION_UP = -1; | ||
529 | - var SCROLL_DIRECTION_DOWN = 1; | ||
530 | - var SCROLL_DIRECTION_NONE = 0; | ||
531 | - | ||
532 | // clamp the `scrollTop` value | 535 | // clamp the `scrollTop` value |
533 | // IE 10|11 scrollTop may go above `_maxScrollTop` | 536 | // IE 10|11 scrollTop may go above `_maxScrollTop` |
534 | // iOS `scrollTop` may go below 0 and above `_maxScrollTop` | 537 | // iOS `scrollTop` may go below 0 and above `_maxScrollTop` |
535 | var scrollTop = Math.max(0, Math.min(this._maxScrollTop, this._scroller.scrollTop)); | 538 | var scrollTop = Math.max(0, Math.min(this._maxScrollTop, this._scroller.scrollTop)); |
536 | - | ||
537 | - var tileHeight, kth, recycledTileSet; | 539 | + var tileHeight, tileTop, kth, recycledTileSet, scrollBottom; |
538 | var ratio = this._ratio; | 540 | var ratio = this._ratio; |
539 | var delta = scrollTop - this._scrollPosition; | 541 | var delta = scrollTop - this._scrollPosition; |
540 | - var direction = SCROLL_DIRECTION_NONE; | ||
541 | var recycledTiles = 0; | 542 | var recycledTiles = 0; |
542 | var hiddenContentSize = this._hiddenContentSize; | 543 | var hiddenContentSize = this._hiddenContentSize; |
543 | var currentRatio = ratio; | 544 | var currentRatio = ratio; |
@@ -549,18 +550,19 @@ after the list became visible again. e.g. | @@ -549,18 +550,19 @@ after the list became visible again. e.g. | ||
549 | // clear cached visible index | 550 | // clear cached visible index |
550 | this._firstVisibleIndexVal = null; | 551 | this._firstVisibleIndexVal = null; |
551 | 552 | ||
553 | + scrollBottom = this._scrollBottom; | ||
554 | + | ||
552 | // random access | 555 | // random access |
553 | if (Math.abs(delta) > this._physicalSize) { | 556 | if (Math.abs(delta) > this._physicalSize) { |
554 | this._physicalTop += delta; | 557 | this._physicalTop += delta; |
555 | - direction = SCROLL_DIRECTION_NONE; | ||
556 | recycledTiles = Math.round(delta / this._physicalAverage); | 558 | recycledTiles = Math.round(delta / this._physicalAverage); |
557 | } | 559 | } |
558 | // scroll up | 560 | // scroll up |
559 | else if (delta < 0) { | 561 | else if (delta < 0) { |
560 | var topSpace = scrollTop - this._physicalTop; | 562 | var topSpace = scrollTop - this._physicalTop; |
561 | var virtualStart = this._virtualStart; | 563 | var virtualStart = this._virtualStart; |
564 | + var physicalBottom = this._physicalBottom; | ||
562 | 565 | ||
563 | - direction = SCROLL_DIRECTION_UP; | ||
564 | recycledTileSet = []; | 566 | recycledTileSet = []; |
565 | 567 | ||
566 | kth = this._physicalEnd; | 568 | kth = this._physicalEnd; |
@@ -573,12 +575,14 @@ after the list became visible again. e.g. | @@ -573,12 +575,14 @@ after the list became visible again. e.g. | ||
573 | // recycle less physical items than the total | 575 | // recycle less physical items than the total |
574 | recycledTiles < this._physicalCount && | 576 | recycledTiles < this._physicalCount && |
575 | // ensure that these recycled tiles are needed | 577 | // ensure that these recycled tiles are needed |
576 | - virtualStart - recycledTiles > 0 | 578 | + virtualStart - recycledTiles > 0 && |
579 | + // ensure that the tile is not visible | ||
580 | + physicalBottom - this._physicalSizes[kth] > scrollBottom | ||
577 | ) { | 581 | ) { |
578 | 582 | ||
579 | - tileHeight = this._physicalSizes[kth] || this._physicalAverage; | 583 | + tileHeight = this._physicalSizes[kth]; |
580 | currentRatio += tileHeight / hiddenContentSize; | 584 | currentRatio += tileHeight / hiddenContentSize; |
581 | - | 585 | + physicalBottom -= tileHeight; |
582 | recycledTileSet.push(kth); | 586 | recycledTileSet.push(kth); |
583 | recycledTiles++; | 587 | recycledTiles++; |
584 | kth = (kth === 0) ? this._physicalCount - 1 : kth - 1; | 588 | kth = (kth === 0) ? this._physicalCount - 1 : kth - 1; |
@@ -586,15 +590,13 @@ after the list became visible again. e.g. | @@ -586,15 +590,13 @@ after the list became visible again. e.g. | ||
586 | 590 | ||
587 | movingUp = recycledTileSet; | 591 | movingUp = recycledTileSet; |
588 | recycledTiles = -recycledTiles; | 592 | recycledTiles = -recycledTiles; |
589 | - | ||
590 | } | 593 | } |
591 | // scroll down | 594 | // scroll down |
592 | else if (delta > 0) { | 595 | else if (delta > 0) { |
593 | - var bottomSpace = this._physicalBottom - (scrollTop + this._viewportSize); | 596 | + var bottomSpace = this._physicalBottom - scrollBottom; |
594 | var virtualEnd = this._virtualEnd; | 597 | var virtualEnd = this._virtualEnd; |
595 | var lastVirtualItemIndex = this._virtualCount-1; | 598 | var lastVirtualItemIndex = this._virtualCount-1; |
596 | 599 | ||
597 | - direction = SCROLL_DIRECTION_DOWN; | ||
598 | recycledTileSet = []; | 600 | recycledTileSet = []; |
599 | 601 | ||
600 | kth = this._physicalStart; | 602 | kth = this._physicalStart; |
@@ -607,10 +609,12 @@ after the list became visible again. e.g. | @@ -607,10 +609,12 @@ after the list became visible again. e.g. | ||
607 | // recycle less physical items than the total | 609 | // recycle less physical items than the total |
608 | recycledTiles < this._physicalCount && | 610 | recycledTiles < this._physicalCount && |
609 | // ensure that these recycled tiles are needed | 611 | // ensure that these recycled tiles are needed |
610 | - virtualEnd + recycledTiles < lastVirtualItemIndex | 612 | + virtualEnd + recycledTiles < lastVirtualItemIndex && |
613 | + // ensure that the tile is not visible | ||
614 | + this._physicalTop + this._physicalSizes[kth] < scrollTop | ||
611 | ) { | 615 | ) { |
612 | 616 | ||
613 | - tileHeight = this._physicalSizes[kth] || this._physicalAverage; | 617 | + tileHeight = this._physicalSizes[kth]; |
614 | currentRatio += tileHeight / hiddenContentSize; | 618 | currentRatio += tileHeight / hiddenContentSize; |
615 | 619 | ||
616 | this._physicalTop += tileHeight; | 620 | this._physicalTop += tileHeight; |
@@ -620,7 +624,15 @@ after the list became visible again. e.g. | @@ -620,7 +624,15 @@ after the list became visible again. e.g. | ||
620 | } | 624 | } |
621 | } | 625 | } |
622 | 626 | ||
623 | - if (recycledTiles !== 0) { | 627 | + if (recycledTiles === 0) { |
628 | + // If the list ever reach this case, the physical average is not significant enough | ||
629 | + // to create all the items needed to cover the entire viewport. | ||
630 | + // e.g. A few items have a height that differs from the average by serveral order of magnitude. | ||
631 | + if (this._increasePoolIfNeeded()) { | ||
632 | + // yield and set models to the new items | ||
633 | + this.async(this._update); | ||
634 | + } | ||
635 | + } else { | ||
624 | this._virtualStart = this._virtualStart + recycledTiles; | 636 | this._virtualStart = this._virtualStart + recycledTiles; |
625 | this._update(recycledTileSet, movingUp); | 637 | this._update(recycledTileSet, movingUp); |
626 | } | 638 | } |
@@ -652,7 +664,7 @@ after the list became visible again. e.g. | @@ -652,7 +664,7 @@ after the list became visible again. e.g. | ||
652 | 664 | ||
653 | // increase the pool of physical items if needed | 665 | // increase the pool of physical items if needed |
654 | if (this._increasePoolIfNeeded()) { | 666 | if (this._increasePoolIfNeeded()) { |
655 | - // set models to the new items | 667 | + // yield set models to the new items |
656 | this.async(this._update); | 668 | this.async(this._update); |
657 | } | 669 | } |
658 | }, | 670 | }, |
@@ -678,7 +690,7 @@ after the list became visible again. e.g. | @@ -678,7 +690,7 @@ after the list became visible again. e.g. | ||
678 | }, | 690 | }, |
679 | 691 | ||
680 | /** | 692 | /** |
681 | - * Increases the pool size. That is, the physical items in the DOM. | 693 | + * Increases the pool of physical items only if needed. |
682 | * This function will allocate additional physical items | 694 | * This function will allocate additional physical items |
683 | * (limited by `MAX_PHYSICAL_COUNT`) if the content size is shorter than | 695 | * (limited by `MAX_PHYSICAL_COUNT`) if the content size is shorter than |
684 | * `_optPhysicalSize` | 696 | * `_optPhysicalSize` |
@@ -686,16 +698,22 @@ after the list became visible again. e.g. | @@ -686,16 +698,22 @@ after the list became visible again. e.g. | ||
686 | * @return boolean | 698 | * @return boolean |
687 | */ | 699 | */ |
688 | _increasePoolIfNeeded: function() { | 700 | _increasePoolIfNeeded: function() { |
689 | - if (this._physicalSize >= this._optPhysicalSize || this._physicalAverage === 0) { | 701 | + if (this._physicalAverage === 0) { |
690 | return false; | 702 | return false; |
691 | } | 703 | } |
704 | + if (this._physicalBottom < this._scrollBottom || this._physicalTop > this._scrollPosition) { | ||
705 | + return this._increasePool(1); | ||
706 | + } | ||
707 | + if (this._physicalSize < this._optPhysicalSize) { | ||
708 | + return this._increasePool(Math.round((this._optPhysicalSize - this._physicalSize) * 1.2 / this._physicalAverage)); | ||
709 | + } | ||
710 | + return false; | ||
711 | + }, | ||
692 | 712 | ||
693 | - // the estimated number of physical items that we will need to reach | ||
694 | - // the cap established by `_optPhysicalSize`. | ||
695 | - var missingItems = Math.round( | ||
696 | - (this._optPhysicalSize - this._physicalSize) * 1.2 / this._physicalAverage | ||
697 | - ); | ||
698 | - | 713 | + /** |
714 | + * Increases the pool size. | ||
715 | + */ | ||
716 | + _increasePool: function(missingItems) { | ||
699 | // limit the size | 717 | // limit the size |
700 | var nextPhysicalCount = Math.min( | 718 | var nextPhysicalCount = Math.min( |
701 | this._physicalCount + missingItems, | 719 | this._physicalCount + missingItems, |
@@ -710,11 +728,8 @@ after the list became visible again. e.g. | @@ -710,11 +728,8 @@ after the list became visible again. e.g. | ||
710 | return false; | 728 | return false; |
711 | } | 729 | } |
712 | 730 | ||
713 | - var newPhysicalItems = this._createPool(delta); | ||
714 | - var emptyArray = new Array(delta); | ||
715 | - | ||
716 | - [].push.apply(this._physicalItems, newPhysicalItems); | ||
717 | - [].push.apply(this._physicalSizes, emptyArray); | 731 | + [].push.apply(this._physicalItems, this._createPool(delta)); |
732 | + [].push.apply(this._physicalSizes, new Array(delta)); | ||
718 | 733 | ||
719 | this._physicalCount = prevPhysicalCount + delta; | 734 | this._physicalCount = prevPhysicalCount + delta; |
720 | 735 | ||
@@ -1109,10 +1124,9 @@ after the list became visible again. e.g. | @@ -1109,10 +1124,9 @@ after the list became visible again. e.g. | ||
1109 | 1124 | ||
1110 | // increase the pool of physical items if needed | 1125 | // increase the pool of physical items if needed |
1111 | if (this._increasePoolIfNeeded()) { | 1126 | if (this._increasePoolIfNeeded()) { |
1112 | - // set models to the new items | 1127 | + // yield set models to the new items |
1113 | this.async(this._update); | 1128 | this.async(this._update); |
1114 | } | 1129 | } |
1115 | - | ||
1116 | // clear cached visible index | 1130 | // clear cached visible index |
1117 | this._firstVisibleIndexVal = null; | 1131 | this._firstVisibleIndexVal = null; |
1118 | }, | 1132 | }, |
bower_components/iron-list/test/basic.html
100644 → 100755
bower_components/iron-list/test/different-heights.html
0 → 100755
1 | +<!doctype html> | ||
2 | +<!-- | ||
3 | +@license | ||
4 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE | ||
6 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS | ||
7 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS | ||
8 | +Code distributed by Google as part of the polymer project is also | ||
9 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS | ||
10 | +--> | ||
11 | +<html> | ||
12 | +<head> | ||
13 | + <meta charset="UTF-8"> | ||
14 | + <title>iron-list test</title> | ||
15 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | ||
16 | + | ||
17 | + <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
18 | + <script src="../../web-component-tester/browser.js"></script> | ||
19 | + <script src="../../test-fixture/test-fixture-mocha.js"></script> | ||
20 | + <script src="../../iron-test-helpers/mock-interactions.js"></script> | ||
21 | + | ||
22 | + <link rel="import" href="../../test-fixture/test-fixture.html"> | ||
23 | + <link rel="import" href="../../paper-styles/paper-styles.html"> | ||
24 | + <link rel="import" href="helpers.html"> | ||
25 | + <link rel="import" href="x-list.html"> | ||
26 | + | ||
27 | +</head> | ||
28 | +<body> | ||
29 | + | ||
30 | + <test-fixture id="trivialList"> | ||
31 | + <template> | ||
32 | + <x-list></x-list> | ||
33 | + </template> | ||
34 | + </test-fixture> | ||
35 | + | ||
36 | + <script> | ||
37 | + | ||
38 | + suite('Different heights', function() { | ||
39 | + var list, container; | ||
40 | + | ||
41 | + setup(function() { | ||
42 | + container = fixture('trivialList'); | ||
43 | + list = container.list; | ||
44 | + }); | ||
45 | + | ||
46 | + test('render without gaps 1', function(done) { | ||
47 | + list.items = [ | ||
48 | + {index: 0, height: 791}, | ||
49 | + {index: 1, height: 671} | ||
50 | + ]; | ||
51 | + | ||
52 | + flush(function() { | ||
53 | + list.push('items', | ||
54 | + {index: 2, height: 251}, | ||
55 | + {index: 3, height: 191}, | ||
56 | + {index: 4, height: 151}, | ||
57 | + {index: 5, height: 191}, | ||
58 | + {index: 6, height: 51}, | ||
59 | + {index: 7, height: 51}, | ||
60 | + {index: 8, height: 51} | ||
61 | + ); | ||
62 | + | ||
63 | + list.addEventListener('scroll', function() { | ||
64 | + assert.isTrue(isFullOfItems(list)); | ||
65 | + }); | ||
66 | + | ||
67 | + simulateScroll({ | ||
68 | + list: list, | ||
69 | + contribution: 15, | ||
70 | + target: 100000 | ||
71 | + }, function() { | ||
72 | + done(); | ||
73 | + }); | ||
74 | + }); | ||
75 | + }); | ||
76 | + | ||
77 | + test('render without gaps 2', function(done) { | ||
78 | + var height = 2, items = []; | ||
79 | + | ||
80 | + while (items.length < 15) { | ||
81 | + items.push({height: height}); | ||
82 | + height *= 1.5; | ||
83 | + } | ||
84 | + list.items = items; | ||
85 | + | ||
86 | + flush(function() { | ||
87 | + list.addEventListener('scroll', function() { | ||
88 | + assert.isTrue(isFullOfItems(list)); | ||
89 | + }); | ||
90 | + | ||
91 | + simulateScroll({ | ||
92 | + list: list, | ||
93 | + contribution: 20, | ||
94 | + target: 100000 | ||
95 | + }, function() { | ||
96 | + done(); | ||
97 | + }); | ||
98 | + }); | ||
99 | + }); | ||
100 | + | ||
101 | + test('render without gaps 3', function(done) { | ||
102 | + var heights = [20, 100, 140, 117, 800, 50, 15, 80, 90, 255, 20, 15, 19, 250, 314]; | ||
103 | + | ||
104 | + list.items = heights.map(function(height) { | ||
105 | + return {height: height}; | ||
106 | + }); | ||
107 | + | ||
108 | + flush(function() { | ||
109 | + list.addEventListener('scroll', function() { | ||
110 | + assert.isTrue(isFullOfItems(list)); | ||
111 | + }); | ||
112 | + | ||
113 | + simulateScroll({ | ||
114 | + list: list, | ||
115 | + contribution: 20, | ||
116 | + target: 100000 | ||
117 | + }, function() { | ||
118 | + done(); | ||
119 | + }); | ||
120 | + }); | ||
121 | + }); | ||
122 | + | ||
123 | + }); | ||
124 | + | ||
125 | + </script> | ||
126 | + | ||
127 | +</body> | ||
128 | +</html> |
bower_components/iron-list/test/dynamic-item-size.html
100644 → 100755
bower_components/iron-list/test/helpers.html
100644 → 100755
@@ -72,4 +72,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -72,4 +72,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
72 | var listRect = list.getBoundingClientRect(); | 72 | var listRect = list.getBoundingClientRect(); |
73 | return document.elementFromPoint(listRect.left + 1, listRect.top + listRect.height - 1); | 73 | return document.elementFromPoint(listRect.left + 1, listRect.top + listRect.height - 1); |
74 | } | 74 | } |
75 | + | ||
76 | + function isFullOfItems(list) { | ||
77 | + var listRect = list.getBoundingClientRect(); | ||
78 | + var listHeight = listRect.height - 1; | ||
79 | + var item, y = listRect.top + 1; | ||
80 | + // IE 10 & 11 doesn't render propertly :( | ||
81 | + var badPixels = 0; | ||
82 | + while (y < listHeight) { | ||
83 | + item = document.elementFromPoint(listRect.left + 1, y); | ||
84 | + if (item.parentNode && !item.parentNode._templateInstance) { | ||
85 | + badPixels++; | ||
86 | + } | ||
87 | + if (badPixels > 3) { | ||
88 | + return false; | ||
89 | + } | ||
90 | + y += 2; | ||
91 | + } | ||
92 | + return true; | ||
93 | + } | ||
75 | </script> | 94 | </script> |
bower_components/iron-list/test/hidden-list.html
100644 → 100755
@@ -51,15 +51,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -51,15 +51,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
51 | }); | 51 | }); |
52 | }); | 52 | }); |
53 | 53 | ||
54 | - test('resize', function(done) { | 54 | + test('iron-resize', function(done) { |
55 | list.items = buildDataSet(100); | 55 | list.items = buildDataSet(100); |
56 | - list.fire('resize'); | 56 | + list.fire('iron-resize'); |
57 | 57 | ||
58 | assert.notEqual(getFirstItemFromList(list).textContent, '0'); | 58 | assert.notEqual(getFirstItemFromList(list).textContent, '0'); |
59 | Polymer.RenderStatus.whenReady(function() { | 59 | Polymer.RenderStatus.whenReady(function() { |
60 | container.removeAttribute('hidden'); | 60 | container.removeAttribute('hidden'); |
61 | assert.notEqual(getFirstItemFromList(list).textContent, '0'); | 61 | assert.notEqual(getFirstItemFromList(list).textContent, '0'); |
62 | - list.fire('resize'); | 62 | + list.fire('iron-resize'); |
63 | flush(function() { | 63 | flush(function() { |
64 | assert.isTrue(list.isAttached); | 64 | assert.isTrue(list.isAttached); |
65 | assert.equal(getFirstItemFromList(list).textContent, '0'); | 65 | assert.equal(getFirstItemFromList(list).textContent, '0'); |
bower_components/iron-list/test/index.html
100644 → 100755
@@ -23,7 +23,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -23,7 +23,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
23 | 'physical-count.html', | 23 | 'physical-count.html', |
24 | 'hidden-list.html', | 24 | 'hidden-list.html', |
25 | 'selection.html', | 25 | 'selection.html', |
26 | - 'dynamic-item-size.html' | 26 | + 'dynamic-item-size.html', |
27 | + 'different-heights.html' | ||
27 | ]); | 28 | ]); |
28 | </script> | 29 | </script> |
29 | </body> | 30 | </body> |
bower_components/iron-list/test/mutations.html
100644 → 100755
bower_components/iron-list/test/physical-count.html
100644 → 100755
@@ -63,7 +63,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -63,7 +63,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
63 | // change the height of the list | 63 | // change the height of the list |
64 | container.listHeight = 500; | 64 | container.listHeight = 500; |
65 | // resize | 65 | // resize |
66 | - list.fire('resize'); | 66 | + list.fire('iron-resize'); |
67 | 67 | ||
68 | flush(function() { | 68 | flush(function() { |
69 | var lastItem = getLastItemFromList(list); | 69 | var lastItem = getLastItemFromList(list); |
bower_components/iron-list/test/selection.html
100644 → 100755
bower_components/iron-list/test/smoke/avg-worst-case.html
0 → 100755
1 | +<!-- | ||
2 | +@license | ||
3 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
4 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
5 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
6 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
7 | +Code distributed by Google as part of the polymer project is also | ||
8 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
9 | +--> | ||
10 | + | ||
11 | +<!doctype html> | ||
12 | +<html> | ||
13 | +<head> | ||
14 | + | ||
15 | + <title>avg worst case</title> | ||
16 | + | ||
17 | + <meta charset="utf-8"> | ||
18 | + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> | ||
19 | + <meta name="mobile-web-app-capable" content="yes"> | ||
20 | + <meta name="apple-mobile-web-app-capable" content="yes"> | ||
21 | + | ||
22 | + <script src="../../../webcomponentsjs/webcomponents-lite.js"></script> | ||
23 | + | ||
24 | + <link rel="import" href="../../../polymer/polymer.html"> | ||
25 | + <link rel="import" href="../../../paper-styles/paper-styles.html"> | ||
26 | + <link rel="import" href="../../iron-list.html"> | ||
27 | + | ||
28 | + <style is="custom-style"> | ||
29 | + | ||
30 | + iron-list { | ||
31 | + width: 500px; | ||
32 | + height: 400px; | ||
33 | + float: left; | ||
34 | + margin: 10px; | ||
35 | + } | ||
36 | + | ||
37 | + .item { | ||
38 | + background-color: green; | ||
39 | + border-bottom: 1px solid white; | ||
40 | + } | ||
41 | + | ||
42 | + </style> | ||
43 | + | ||
44 | +</head> | ||
45 | +<body class="fullbleed" unresolved> | ||
46 | + | ||
47 | + <template is="dom-bind"> | ||
48 | + | ||
49 | + <h1>The physical avarage is not useful in this situations</h1> | ||
50 | + <p>The list is correct if it can render all the items without empty spaces.</p> | ||
51 | + <iron-list id="list" items="[791, 671]" as="item" style="width: 300px; height: 300px;"> | ||
52 | + <template> | ||
53 | + <div class="item" style$="[[_getStyle(item)]]"><span>[[index]]</span> height: <span>[[item]]</span> | ||
54 | + </div> | ||
55 | + </template> | ||
56 | + </iron-list> | ||
57 | + | ||
58 | + <iron-list id="list2" items="[791, 671]" as="item" style="width: 710px; height: 453px;"> | ||
59 | + <template> | ||
60 | + <div class="item" style$="[[_getStyle(item)]]"><span>[[index]]</span> height: <span>[[item]]</span> | ||
61 | + </div> | ||
62 | + </template> | ||
63 | + </iron-list> | ||
64 | + | ||
65 | + <iron-list items="[512, 256, 128, 64, 16, 16, 16, 16, 16, 16, 8, 4]" as="item" style="height: 256px;"> | ||
66 | + <template> | ||
67 | + <div class="item" style$="[[_getStyle(item)]]"><span>[[index]]</span> height: <span>[[item]]</span> | ||
68 | + </div> | ||
69 | + </template> | ||
70 | + </iron-list> | ||
71 | + </template> | ||
72 | + | ||
73 | + <script> | ||
74 | + HTMLImports.whenReady(function() { | ||
75 | + document.querySelector('template[is=dom-bind]')._getStyle = function(item) { | ||
76 | + return 'height:' + item + 'px; '; | ||
77 | + }; | ||
78 | + | ||
79 | + setTimeout(function() { | ||
80 | + document.querySelector('#list').push('items', 251, 191, 151, 191, 51, 51, 51); | ||
81 | + }, 100); | ||
82 | + | ||
83 | + setTimeout(function() { | ||
84 | + document.querySelector('#list2').push('items', 251, 191, 151, 191, 51, 51, 51); | ||
85 | + }, 300); | ||
86 | + }); | ||
87 | + </script> | ||
88 | +</body> | ||
89 | +</html> |
bower_components/iron-list/test/smoke/dummy-data.html
100644 → 100755
bower_components/iron-list/test/smoke/index.html
100644 → 100755
bower_components/iron-list/test/x-list.html
100644 → 100755
@@ -39,7 +39,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -39,7 +39,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
39 | <iron-list style$="[[_computedListHeight(listHeight)]]" items="[[data]]" as="item" id="list"> | 39 | <iron-list style$="[[_computedListHeight(listHeight)]]" items="[[data]]" as="item" id="list"> |
40 | <template> | 40 | <template> |
41 | <div class="item"> | 41 | <div class="item"> |
42 | - <div style$="[[_computedItemHeight()]]">[[item.index]]</div> | 42 | + <div style$="[[_computedItemHeight(item)]]">[[item.index]]</div> |
43 | </div> | 43 | </div> |
44 | </template> | 44 | </template> |
45 | </iron-list> | 45 | </iron-list> |
@@ -75,10 +75,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -75,10 +75,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
75 | return this.$.list; | 75 | return this.$.list; |
76 | }, | 76 | }, |
77 | 77 | ||
78 | - _computedItemHeight: function() { | ||
79 | - var css = ''; | ||
80 | - css += this.itemHeight === 0 ? '' : 'height: ' + (this.itemHeight) + 'px;'; | ||
81 | - css += this.pre ? 'white-space:pre;' : ''; | 78 | + _computedItemHeight: function(item) { |
79 | + var css = this.pre ? 'white-space:pre;' : ''; | ||
80 | + if (item.height) { | ||
81 | + css += this.itemHeight === 0 ? '' : 'height: ' + (item.height) + 'px;'; | ||
82 | + } else if (this.itemHeight) { | ||
83 | + css += 'height: ' + (this.itemHeight) + 'px;'; | ||
84 | + } | ||
82 | return css; | 85 | return css; |
83 | }, | 86 | }, |
84 | 87 |
bower_components/iron-media-query/.bower.json
100644 → 100755
bower_components/iron-media-query/.gitignore
100644 → 100755
bower_components/iron-media-query/README.md
100644 → 100755
bower_components/iron-media-query/bower.json
100644 → 100755
bower_components/iron-media-query/demo/index.html
100644 → 100755
bower_components/iron-media-query/index.html
100644 → 100755
bower_components/iron-media-query/iron-media-query.html
100644 → 100755
bower_components/iron-media-query/test/basic.html
100644 → 100755
bower_components/iron-media-query/test/index.html
100644 → 100755
bower_components/iron-meta/.bower.json
1 | -{ | ||
2 | - "name": "iron-meta", | ||
3 | - "version": "1.0.3", | ||
4 | - "keywords": [ | ||
5 | - "web-components", | ||
6 | - "polymer" | ||
7 | - ], | ||
8 | - "license": "http://polymer.github.io/LICENSE.txt", | ||
9 | - "description": "Useful for sharing information across a DOM tree", | ||
10 | - "private": true, | ||
11 | - "authors": [ | ||
12 | - "The Polymer Authors" | ||
13 | - ], | ||
14 | - "repository": { | ||
15 | - "type": "git", | ||
16 | - "url": "git://github.com/PolymerElements/iron-meta.git" | ||
17 | - }, | ||
18 | - "dependencies": { | ||
19 | - "polymer": "Polymer/polymer#^1.0.0" | ||
20 | - }, | ||
21 | - "devDependencies": { | ||
22 | - "paper-styles": "polymerelements/paper-styles#^1.0.4", | ||
23 | - "iron-component-page": "polymerelements/iron-component-page#^1.0.0", | ||
24 | - "test-fixture": "polymerelements/test-fixture#^1.0.0", | ||
25 | - "web-component-tester": "*", | ||
26 | - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | ||
27 | - }, | ||
28 | - "homepage": "https://github.com/PolymerElements/iron-meta", | ||
29 | - "_release": "1.0.3", | ||
30 | - "_resolution": { | ||
31 | - "type": "version", | ||
32 | - "tag": "v1.0.3", | ||
33 | - "commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04" | ||
34 | - }, | ||
35 | - "_source": "git://github.com/PolymerElements/iron-meta.git", | ||
36 | - "_target": "^1.0.0", | ||
37 | - "_originalSource": "PolymerElements/iron-meta" | 1 | +{ |
2 | + "name": "iron-meta", | ||
3 | + "version": "1.1.0", | ||
4 | + "keywords": [ | ||
5 | + "web-components", | ||
6 | + "polymer" | ||
7 | + ], | ||
8 | + "license": "http://polymer.github.io/LICENSE.txt", | ||
9 | + "description": "Useful for sharing information across a DOM tree", | ||
10 | + "private": true, | ||
11 | + "authors": [ | ||
12 | + "The Polymer Authors" | ||
13 | + ], | ||
14 | + "repository": { | ||
15 | + "type": "git", | ||
16 | + "url": "git://github.com/PolymerElements/iron-meta.git" | ||
17 | + }, | ||
18 | + "dependencies": { | ||
19 | + "polymer": "Polymer/polymer#^1.0.0" | ||
20 | + }, | ||
21 | + "devDependencies": { | ||
22 | + "paper-styles": "polymerelements/paper-styles#^1.0.4", | ||
23 | + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", | ||
24 | + "test-fixture": "polymerelements/test-fixture#^1.0.0", | ||
25 | + "web-component-tester": "*", | ||
26 | + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | ||
27 | + }, | ||
28 | + "homepage": "https://github.com/PolymerElements/iron-meta", | ||
29 | + "_release": "1.1.0", | ||
30 | + "_resolution": { | ||
31 | + "type": "version", | ||
32 | + "tag": "v1.1.0", | ||
33 | + "commit": "be7ccf8df650aef1446a4e23af33f5d4e9f3000f" | ||
34 | + }, | ||
35 | + "_source": "git://github.com/PolymerElements/iron-meta.git", | ||
36 | + "_target": "^1.0.0", | ||
37 | + "_originalSource": "PolymerElements/iron-meta" | ||
38 | } | 38 | } |
39 | \ No newline at end of file | 39 | \ No newline at end of file |
bower_components/iron-meta/.gitignore
bower_components/iron-meta/README.md
1 | -iron-meta | ||
2 | -========= | ||
3 | - | ||
4 | -`iron-meta` is a generic element you can use for sharing information across the DOM tree. | ||
5 | -It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any | ||
6 | -instance of iron-meta has access to the shared | ||
7 | -information. You can use `iron-meta` to share whatever you want (or create an extension | ||
8 | -[like x-meta] for enhancements). | ||
9 | - | ||
10 | -The `iron-meta` instances containing your actual data can be loaded in an import, | ||
11 | -or constructed in any way you see fit. The only requirement is that you create them | ||
12 | -before you try to access them. | ||
13 | - | ||
14 | -Examples: | ||
15 | - | ||
16 | -If I create an instance like this: | ||
17 | - | ||
18 | -```html | ||
19 | -<iron-meta key="info" value="foo/bar"></iron-meta> | ||
20 | -``` | ||
21 | - | ||
22 | -Note that value="foo/bar" is the metadata I've defined. I could define more | ||
23 | -attributes or use child nodes to define additional metadata. | ||
24 | - | ||
25 | -Now I can access that element (and it's metadata) from any iron-meta instance | ||
26 | -via the byKey method, e.g. | ||
27 | - | ||
28 | -```javascript | ||
29 | -meta.byKey('info').getAttribute('value'); | ||
30 | -``` | ||
31 | - | ||
32 | -Pure imperative form would be like: | ||
33 | - | ||
34 | -```javascript | ||
35 | -document.createElement('iron-meta').byKey('info').getAttribute('value'); | ||
36 | -``` | ||
37 | - | ||
38 | -Or, in a Polymer element, you can include a meta in your template: | ||
39 | - | ||
40 | -```html | ||
41 | -<iron-meta id="meta"></iron-meta> | ||
42 | -``` | ||
43 | - | ||
44 | -```javascript | ||
45 | -this.$.meta.byKey('info').getAttribute('value'); | ||
46 | -``` | 1 | +iron-meta |
2 | +========= | ||
3 | + | ||
4 | +`iron-meta` is a generic element you can use for sharing information across the DOM tree. | ||
5 | +It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any | ||
6 | +instance of iron-meta has access to the shared | ||
7 | +information. You can use `iron-meta` to share whatever you want (or create an extension | ||
8 | +[like x-meta] for enhancements). | ||
9 | + | ||
10 | +The `iron-meta` instances containing your actual data can be loaded in an import, | ||
11 | +or constructed in any way you see fit. The only requirement is that you create them | ||
12 | +before you try to access them. | ||
13 | + | ||
14 | +Examples: | ||
15 | + | ||
16 | +If I create an instance like this: | ||
17 | + | ||
18 | +```html | ||
19 | +<iron-meta key="info" value="foo/bar"></iron-meta> | ||
20 | +``` | ||
21 | + | ||
22 | +Note that value="foo/bar" is the metadata I've defined. I could define more | ||
23 | +attributes or use child nodes to define additional metadata. | ||
24 | + | ||
25 | +Now I can access that element (and it's metadata) from any iron-meta instance | ||
26 | +via the byKey method, e.g. | ||
27 | + | ||
28 | +```javascript | ||
29 | +meta.byKey('info').getAttribute('value'); | ||
30 | +``` | ||
31 | + | ||
32 | +Pure imperative form would be like: | ||
33 | + | ||
34 | +```javascript | ||
35 | +document.createElement('iron-meta').byKey('info').getAttribute('value'); | ||
36 | +``` | ||
37 | + | ||
38 | +Or, in a Polymer element, you can include a meta in your template: | ||
39 | + | ||
40 | +```html | ||
41 | +<iron-meta id="meta"></iron-meta> | ||
42 | +``` | ||
43 | + | ||
44 | +```javascript | ||
45 | +this.$.meta.byKey('info').getAttribute('value'); | ||
46 | +``` |
bower_components/iron-meta/bower.json
1 | -{ | ||
2 | - "name": "iron-meta", | ||
3 | - "version": "1.0.3", | ||
4 | - "keywords": [ | ||
5 | - "web-components", | ||
6 | - "polymer" | ||
7 | - ], | ||
8 | - "license": "http://polymer.github.io/LICENSE.txt", | ||
9 | - "description": "Useful for sharing information across a DOM tree", | ||
10 | - "private": true, | ||
11 | - "authors": [ | ||
12 | - "The Polymer Authors" | ||
13 | - ], | ||
14 | - "repository": { | ||
15 | - "type": "git", | ||
16 | - "url": "git://github.com/PolymerElements/iron-meta.git" | ||
17 | - }, | ||
18 | - "dependencies": { | ||
19 | - "polymer": "Polymer/polymer#^1.0.0" | ||
20 | - }, | ||
21 | - "devDependencies": { | ||
22 | - "paper-styles": "polymerelements/paper-styles#^1.0.4", | ||
23 | - "iron-component-page": "polymerelements/iron-component-page#^1.0.0", | ||
24 | - "test-fixture": "polymerelements/test-fixture#^1.0.0", | ||
25 | - "web-component-tester": "*", | ||
26 | - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | ||
27 | - } | ||
28 | -} | 1 | +{ |
2 | + "name": "iron-meta", | ||
3 | + "version": "1.1.0", | ||
4 | + "keywords": [ | ||
5 | + "web-components", | ||
6 | + "polymer" | ||
7 | + ], | ||
8 | + "license": "http://polymer.github.io/LICENSE.txt", | ||
9 | + "description": "Useful for sharing information across a DOM tree", | ||
10 | + "private": true, | ||
11 | + "authors": [ | ||
12 | + "The Polymer Authors" | ||
13 | + ], | ||
14 | + "repository": { | ||
15 | + "type": "git", | ||
16 | + "url": "git://github.com/PolymerElements/iron-meta.git" | ||
17 | + }, | ||
18 | + "dependencies": { | ||
19 | + "polymer": "Polymer/polymer#^1.0.0" | ||
20 | + }, | ||
21 | + "devDependencies": { | ||
22 | + "paper-styles": "polymerelements/paper-styles#^1.0.4", | ||
23 | + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", | ||
24 | + "test-fixture": "polymerelements/test-fixture#^1.0.0", | ||
25 | + "web-component-tester": "*", | ||
26 | + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | ||
27 | + } | ||
28 | +} |
bower_components/iron-meta/demo/index.html
1 | -<!doctype html> | ||
2 | -<!-- | ||
3 | -@license | ||
4 | -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | -Code distributed by Google as part of the polymer project is also | ||
9 | -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | ---> | ||
11 | -<html> | ||
12 | -<head> | ||
13 | - | ||
14 | - <meta charset="utf-8"> | ||
15 | - <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
16 | - | ||
17 | - <title>iron-meta</title> | ||
18 | - | ||
19 | - <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
20 | - <link rel="import" href="../../paper-styles/demo-pages.html"> | ||
21 | - <link rel="import" href="../iron-meta.html"> | ||
22 | -</head> | ||
23 | -<body> | ||
24 | - | ||
25 | - <div class="vertical-section vertical-section-container centered"> | ||
26 | - <h1><iron-meta></h1> | ||
27 | - <iron-meta key="info" value="foo/bar"></iron-meta> | ||
28 | - The <code>value</code> stored at <code>key="info"</code> is <code><meta-test></meta-test></code>. | ||
29 | - </div> | ||
30 | - | ||
31 | - <script> | ||
32 | - | ||
33 | - Polymer({ | ||
34 | - | ||
35 | - is: 'meta-test', | ||
36 | - | ||
37 | - ready: function() { | ||
38 | - this.textContent = new Polymer.IronMetaQuery({key: 'info'}).value; | ||
39 | - } | ||
40 | - | ||
41 | - }); | ||
42 | - | ||
43 | - </script> | ||
44 | - | ||
45 | -</body> | ||
46 | -</html> | 1 | +<!doctype html> |
2 | +<!-- | ||
3 | +@license | ||
4 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | +Code distributed by Google as part of the polymer project is also | ||
9 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | +--> | ||
11 | +<html> | ||
12 | +<head> | ||
13 | + | ||
14 | + <meta charset="utf-8"> | ||
15 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
16 | + | ||
17 | + <title>iron-meta</title> | ||
18 | + | ||
19 | + <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
20 | + <link rel="import" href="../../paper-styles/demo-pages.html"> | ||
21 | + <link rel="import" href="../iron-meta.html"> | ||
22 | +</head> | ||
23 | +<body> | ||
24 | + | ||
25 | + <div class="vertical-section vertical-section-container centered"> | ||
26 | + <h1><iron-meta></h1> | ||
27 | + <iron-meta key="info" value="foo/bar"></iron-meta> | ||
28 | + The <code>value</code> stored at <code>key="info"</code> is <code><meta-test></meta-test></code>. | ||
29 | + </div> | ||
30 | + | ||
31 | + <script> | ||
32 | + | ||
33 | + Polymer({ | ||
34 | + | ||
35 | + is: 'meta-test', | ||
36 | + | ||
37 | + ready: function() { | ||
38 | + this.textContent = new Polymer.IronMetaQuery({key: 'info'}).value; | ||
39 | + } | ||
40 | + | ||
41 | + }); | ||
42 | + | ||
43 | + </script> | ||
44 | + | ||
45 | +</body> | ||
46 | +</html> |
bower_components/iron-meta/index.html
1 | -<!doctype html> | ||
2 | -<!-- | ||
3 | -@license | ||
4 | -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE | ||
6 | -The complete set of authors may be found at http://polymer.github.io/AUTHORS | ||
7 | -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS | ||
8 | -Code distributed by Google as part of the polymer project is also | ||
9 | -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS | ||
10 | ---> | ||
11 | -<html> | ||
12 | -<head> | ||
13 | - | ||
14 | - <meta charset="utf-8"> | ||
15 | - <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
16 | - <title>iron-meta</title> | ||
17 | - | ||
18 | - <script src="../webcomponentsjs/webcomponents-lite.js"></script> | ||
19 | - <link rel="import" href="../iron-component-page/iron-component-page.html"> | ||
20 | - | ||
21 | -</head> | ||
22 | -<body> | ||
23 | - | ||
24 | - <iron-component-page></iron-component-page> | ||
25 | - | ||
26 | -</body> | ||
27 | -</html> | 1 | +<!doctype html> |
2 | +<!-- | ||
3 | +@license | ||
4 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE | ||
6 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS | ||
7 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS | ||
8 | +Code distributed by Google as part of the polymer project is also | ||
9 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS | ||
10 | +--> | ||
11 | +<html> | ||
12 | +<head> | ||
13 | + | ||
14 | + <meta charset="utf-8"> | ||
15 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
16 | + <title>iron-meta</title> | ||
17 | + | ||
18 | + <script src="../webcomponentsjs/webcomponents-lite.js"></script> | ||
19 | + <link rel="import" href="../iron-component-page/iron-component-page.html"> | ||
20 | + | ||
21 | +</head> | ||
22 | +<body> | ||
23 | + | ||
24 | + <iron-component-page></iron-component-page> | ||
25 | + | ||
26 | +</body> | ||
27 | +</html> |
bower_components/iron-meta/iron-meta.html
1 | -<!-- | ||
2 | -@license | ||
3 | -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
4 | -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
5 | -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
6 | -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
7 | -Code distributed by Google as part of the polymer project is also | ||
8 | -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
9 | ---> | ||
10 | - | ||
11 | -<link rel="import" href="../polymer/polymer.html"> | ||
12 | - | ||
13 | -<!-- | ||
14 | -`iron-meta` is a generic element you can use for sharing information across the DOM tree. | ||
15 | -It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any | ||
16 | -instance of iron-meta has access to the shared | ||
17 | -information. You can use `iron-meta` to share whatever you want (or create an extension | ||
18 | -[like x-meta] for enhancements). | ||
19 | - | ||
20 | -The `iron-meta` instances containing your actual data can be loaded in an import, | ||
21 | -or constructed in any way you see fit. The only requirement is that you create them | ||
22 | -before you try to access them. | ||
23 | - | ||
24 | -Examples: | ||
25 | - | ||
26 | -If I create an instance like this: | ||
27 | - | ||
28 | - <iron-meta key="info" value="foo/bar"></iron-meta> | ||
29 | - | ||
30 | -Note that value="foo/bar" is the metadata I've defined. I could define more | ||
31 | -attributes or use child nodes to define additional metadata. | ||
32 | - | ||
33 | -Now I can access that element (and it's metadata) from any iron-meta instance | ||
34 | -via the byKey method, e.g. | ||
35 | - | ||
36 | - meta.byKey('info').getAttribute('value'). | ||
37 | - | ||
38 | -Pure imperative form would be like: | ||
39 | - | ||
40 | - document.createElement('iron-meta').byKey('info').getAttribute('value'); | ||
41 | - | ||
42 | -Or, in a Polymer element, you can include a meta in your template: | ||
43 | - | ||
44 | - <iron-meta id="meta"></iron-meta> | ||
45 | - ... | ||
46 | - this.$.meta.byKey('info').getAttribute('value'); | ||
47 | - | ||
48 | -@group Iron Elements | ||
49 | -@demo demo/index.html | ||
50 | -@hero hero.svg | ||
51 | -@element iron-meta | ||
52 | ---> | ||
53 | - | ||
54 | -<script> | ||
55 | - | ||
56 | - (function() { | ||
57 | - | ||
58 | - // monostate data | ||
59 | - var metaDatas = {}; | ||
60 | - var metaArrays = {}; | ||
61 | - | ||
62 | - Polymer.IronMeta = Polymer({ | ||
63 | - | ||
64 | - is: 'iron-meta', | ||
65 | - | ||
66 | - properties: { | ||
67 | - | ||
68 | - /** | ||
69 | - * The type of meta-data. All meta-data of the same type is stored | ||
70 | - * together. | ||
71 | - */ | ||
72 | - type: { | ||
73 | - type: String, | ||
74 | - value: 'default', | ||
75 | - observer: '_typeChanged' | ||
76 | - }, | ||
77 | - | ||
78 | - /** | ||
79 | - * The key used to store `value` under the `type` namespace. | ||
80 | - */ | ||
81 | - key: { | ||
82 | - type: String, | ||
83 | - observer: '_keyChanged' | ||
84 | - }, | ||
85 | - | ||
86 | - /** | ||
87 | - * The meta-data to store or retrieve. | ||
88 | - */ | ||
89 | - value: { | ||
90 | - type: Object, | ||
91 | - notify: true, | ||
92 | - observer: '_valueChanged' | ||
93 | - }, | ||
94 | - | ||
95 | - /** | ||
96 | - * If true, `value` is set to the iron-meta instance itself. | ||
97 | - */ | ||
98 | - self: { | ||
99 | - type: Boolean, | ||
100 | - observer: '_selfChanged' | ||
101 | - }, | ||
102 | - | ||
103 | - /** | ||
104 | - * Array of all meta-data values for the given type. | ||
105 | - */ | ||
106 | - list: { | ||
107 | - type: Array, | ||
108 | - notify: true | ||
109 | - } | ||
110 | - | ||
111 | - }, | ||
112 | - | ||
113 | - /** | ||
114 | - * Only runs if someone invokes the factory/constructor directly | ||
115 | - * e.g. `new Polymer.IronMeta()` | ||
116 | - */ | ||
117 | - factoryImpl: function(config) { | ||
118 | - if (config) { | ||
119 | - for (var n in config) { | ||
120 | - switch(n) { | ||
121 | - case 'type': | ||
122 | - case 'key': | ||
123 | - case 'value': | ||
124 | - this[n] = config[n]; | ||
125 | - break; | ||
126 | - } | ||
127 | - } | ||
128 | - } | ||
129 | - }, | ||
130 | - | ||
131 | - created: function() { | ||
132 | - // TODO(sjmiles): good for debugging? | ||
133 | - this._metaDatas = metaDatas; | ||
134 | - this._metaArrays = metaArrays; | ||
135 | - }, | ||
136 | - | ||
137 | - _keyChanged: function(key, old) { | ||
138 | - this._resetRegistration(old); | ||
139 | - }, | ||
140 | - | ||
141 | - _valueChanged: function(value) { | ||
142 | - this._resetRegistration(this.key); | ||
143 | - }, | ||
144 | - | ||
145 | - _selfChanged: function(self) { | ||
146 | - if (self) { | ||
147 | - this.value = this; | ||
148 | - } | ||
149 | - }, | ||
150 | - | ||
151 | - _typeChanged: function(type) { | ||
152 | - this._unregisterKey(this.key); | ||
153 | - if (!metaDatas[type]) { | ||
154 | - metaDatas[type] = {}; | ||
155 | - } | ||
156 | - this._metaData = metaDatas[type]; | ||
157 | - if (!metaArrays[type]) { | ||
158 | - metaArrays[type] = []; | ||
159 | - } | ||
160 | - this.list = metaArrays[type]; | ||
161 | - this._registerKeyValue(this.key, this.value); | ||
162 | - }, | ||
163 | - | ||
164 | - /** | ||
165 | - * Retrieves meta data value by key. | ||
166 | - * | ||
167 | - * @method byKey | ||
168 | - * @param {string} key The key of the meta-data to be returned. | ||
169 | - * @return {*} | ||
170 | - */ | ||
171 | - byKey: function(key) { | ||
172 | - return this._metaData && this._metaData[key]; | ||
173 | - }, | ||
174 | - | ||
175 | - _resetRegistration: function(oldKey) { | ||
176 | - this._unregisterKey(oldKey); | ||
177 | - this._registerKeyValue(this.key, this.value); | ||
178 | - }, | ||
179 | - | ||
180 | - _unregisterKey: function(key) { | ||
181 | - this._unregister(key, this._metaData, this.list); | ||
182 | - }, | ||
183 | - | ||
184 | - _registerKeyValue: function(key, value) { | ||
185 | - this._register(key, value, this._metaData, this.list); | ||
186 | - }, | ||
187 | - | ||
188 | - _register: function(key, value, data, list) { | ||
189 | - if (key && data && value !== undefined) { | ||
190 | - data[key] = value; | ||
191 | - list.push(value); | ||
192 | - } | ||
193 | - }, | ||
194 | - | ||
195 | - _unregister: function(key, data, list) { | ||
196 | - if (key && data) { | ||
197 | - if (key in data) { | ||
198 | - var value = data[key]; | ||
199 | - delete data[key]; | ||
200 | - this.arrayDelete(list, value); | ||
201 | - } | ||
202 | - } | ||
203 | - } | ||
204 | - | ||
205 | - }); | ||
206 | - | ||
207 | - /** | ||
208 | - `iron-meta-query` can be used to access infomation stored in `iron-meta`. | ||
209 | - | ||
210 | - Examples: | ||
211 | - | ||
212 | - If I create an instance like this: | ||
213 | - | ||
214 | - <iron-meta key="info" value="foo/bar"></iron-meta> | ||
215 | - | ||
216 | - Note that value="foo/bar" is the metadata I've defined. I could define more | ||
217 | - attributes or use child nodes to define additional metadata. | ||
218 | - | ||
219 | - Now I can access that element (and it's metadata) from any `iron-meta-query` instance: | ||
220 | - | ||
221 | - var value = new Polymer.IronMetaQuery({key: 'info'}).value; | ||
222 | - | ||
223 | - @group Polymer Iron Elements | ||
224 | - @element iron-meta-query | ||
225 | - */ | ||
226 | - Polymer.IronMetaQuery = Polymer({ | ||
227 | - | ||
228 | - is: 'iron-meta-query', | ||
229 | - | ||
230 | - properties: { | ||
231 | - | ||
232 | - /** | ||
233 | - * The type of meta-data. All meta-data of the same type is stored | ||
234 | - * together. | ||
235 | - */ | ||
236 | - type: { | ||
237 | - type: String, | ||
238 | - value: 'default', | ||
239 | - observer: '_typeChanged' | ||
240 | - }, | ||
241 | - | ||
242 | - /** | ||
243 | - * Specifies a key to use for retrieving `value` from the `type` | ||
244 | - * namespace. | ||
245 | - */ | ||
246 | - key: { | ||
247 | - type: String, | ||
248 | - observer: '_keyChanged' | ||
249 | - }, | ||
250 | - | ||
251 | - /** | ||
252 | - * The meta-data to store or retrieve. | ||
253 | - */ | ||
254 | - value: { | ||
255 | - type: Object, | ||
256 | - notify: true, | ||
257 | - readOnly: true | ||
258 | - }, | ||
259 | - | ||
260 | - /** | ||
261 | - * Array of all meta-data values for the given type. | ||
262 | - */ | ||
263 | - list: { | ||
264 | - type: Array, | ||
265 | - notify: true | ||
266 | - } | ||
267 | - | ||
268 | - }, | ||
269 | - | ||
270 | - /** | ||
271 | - * Actually a factory method, not a true constructor. Only runs if | ||
272 | - * someone invokes it directly (via `new Polymer.IronMeta()`); | ||
273 | - */ | ||
274 | - factoryImpl: function(config) { | ||
275 | - if (config) { | ||
276 | - for (var n in config) { | ||
277 | - switch(n) { | ||
278 | - case 'type': | ||
279 | - case 'key': | ||
280 | - this[n] = config[n]; | ||
281 | - break; | ||
282 | - } | ||
283 | - } | ||
284 | - } | ||
285 | - }, | ||
286 | - | ||
287 | - created: function() { | ||
288 | - // TODO(sjmiles): good for debugging? | ||
289 | - this._metaDatas = metaDatas; | ||
290 | - this._metaArrays = metaArrays; | ||
291 | - }, | ||
292 | - | ||
293 | - _keyChanged: function(key) { | ||
294 | - this._setValue(this._metaData && this._metaData[key]); | ||
295 | - }, | ||
296 | - | ||
297 | - _typeChanged: function(type) { | ||
298 | - this._metaData = metaDatas[type]; | ||
299 | - this.list = metaArrays[type]; | ||
300 | - if (this.key) { | ||
301 | - this._keyChanged(this.key); | ||
302 | - } | ||
303 | - }, | ||
304 | - | ||
305 | - /** | ||
306 | - * Retrieves meta data value by key. | ||
307 | - * @param {string} key The key of the meta-data to be returned. | ||
308 | - * @return {*} | ||
309 | - */ | ||
310 | - byKey: function(key) { | ||
311 | - return this._metaData && this._metaData[key]; | ||
312 | - } | ||
313 | - | ||
314 | - }); | ||
315 | - | ||
316 | - })(); | ||
317 | -</script> | 1 | +<!-- |
2 | +@license | ||
3 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
4 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
5 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
6 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
7 | +Code distributed by Google as part of the polymer project is also | ||
8 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
9 | +--> | ||
10 | + | ||
11 | +<link rel="import" href="../polymer/polymer.html"> | ||
12 | + | ||
13 | +<!-- | ||
14 | +`iron-meta` is a generic element you can use for sharing information across the DOM tree. | ||
15 | +It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any | ||
16 | +instance of iron-meta has access to the shared | ||
17 | +information. You can use `iron-meta` to share whatever you want (or create an extension | ||
18 | +[like x-meta] for enhancements). | ||
19 | + | ||
20 | +The `iron-meta` instances containing your actual data can be loaded in an import, | ||
21 | +or constructed in any way you see fit. The only requirement is that you create them | ||
22 | +before you try to access them. | ||
23 | + | ||
24 | +Examples: | ||
25 | + | ||
26 | +If I create an instance like this: | ||
27 | + | ||
28 | + <iron-meta key="info" value="foo/bar"></iron-meta> | ||
29 | + | ||
30 | +Note that value="foo/bar" is the metadata I've defined. I could define more | ||
31 | +attributes or use child nodes to define additional metadata. | ||
32 | + | ||
33 | +Now I can access that element (and it's metadata) from any iron-meta instance | ||
34 | +via the byKey method, e.g. | ||
35 | + | ||
36 | + meta.byKey('info').getAttribute('value'). | ||
37 | + | ||
38 | +Pure imperative form would be like: | ||
39 | + | ||
40 | + document.createElement('iron-meta').byKey('info').getAttribute('value'); | ||
41 | + | ||
42 | +Or, in a Polymer element, you can include a meta in your template: | ||
43 | + | ||
44 | + <iron-meta id="meta"></iron-meta> | ||
45 | + ... | ||
46 | + this.$.meta.byKey('info').getAttribute('value'); | ||
47 | + | ||
48 | +@group Iron Elements | ||
49 | +@demo demo/index.html | ||
50 | +@hero hero.svg | ||
51 | +@element iron-meta | ||
52 | +--> | ||
53 | + | ||
54 | +<script> | ||
55 | + | ||
56 | + (function() { | ||
57 | + | ||
58 | + // monostate data | ||
59 | + var metaDatas = {}; | ||
60 | + var metaArrays = {}; | ||
61 | + var singleton = null; | ||
62 | + | ||
63 | + Polymer.IronMeta = Polymer({ | ||
64 | + | ||
65 | + is: 'iron-meta', | ||
66 | + | ||
67 | + properties: { | ||
68 | + | ||
69 | + /** | ||
70 | + * The type of meta-data. All meta-data of the same type is stored | ||
71 | + * together. | ||
72 | + */ | ||
73 | + type: { | ||
74 | + type: String, | ||
75 | + value: 'default', | ||
76 | + observer: '_typeChanged' | ||
77 | + }, | ||
78 | + | ||
79 | + /** | ||
80 | + * The key used to store `value` under the `type` namespace. | ||
81 | + */ | ||
82 | + key: { | ||
83 | + type: String, | ||
84 | + observer: '_keyChanged' | ||
85 | + }, | ||
86 | + | ||
87 | + /** | ||
88 | + * The meta-data to store or retrieve. | ||
89 | + */ | ||
90 | + value: { | ||
91 | + type: Object, | ||
92 | + notify: true, | ||
93 | + observer: '_valueChanged' | ||
94 | + }, | ||
95 | + | ||
96 | + /** | ||
97 | + * If true, `value` is set to the iron-meta instance itself. | ||
98 | + */ | ||
99 | + self: { | ||
100 | + type: Boolean, | ||
101 | + observer: '_selfChanged' | ||
102 | + }, | ||
103 | + | ||
104 | + /** | ||
105 | + * Array of all meta-data values for the given type. | ||
106 | + */ | ||
107 | + list: { | ||
108 | + type: Array, | ||
109 | + notify: true | ||
110 | + } | ||
111 | + | ||
112 | + }, | ||
113 | + | ||
114 | + hostAttributes: { | ||
115 | + hidden: true | ||
116 | + }, | ||
117 | + | ||
118 | + /** | ||
119 | + * Only runs if someone invokes the factory/constructor directly | ||
120 | + * e.g. `new Polymer.IronMeta()` | ||
121 | + */ | ||
122 | + factoryImpl: function(config) { | ||
123 | + if (config) { | ||
124 | + for (var n in config) { | ||
125 | + switch(n) { | ||
126 | + case 'type': | ||
127 | + case 'key': | ||
128 | + case 'value': | ||
129 | + this[n] = config[n]; | ||
130 | + break; | ||
131 | + } | ||
132 | + } | ||
133 | + } | ||
134 | + }, | ||
135 | + | ||
136 | + created: function() { | ||
137 | + // TODO(sjmiles): good for debugging? | ||
138 | + this._metaDatas = metaDatas; | ||
139 | + this._metaArrays = metaArrays; | ||
140 | + }, | ||
141 | + | ||
142 | + _keyChanged: function(key, old) { | ||
143 | + this._resetRegistration(old); | ||
144 | + }, | ||
145 | + | ||
146 | + _valueChanged: function(value) { | ||
147 | + this._resetRegistration(this.key); | ||
148 | + }, | ||
149 | + | ||
150 | + _selfChanged: function(self) { | ||
151 | + if (self) { | ||
152 | + this.value = this; | ||
153 | + } | ||
154 | + }, | ||
155 | + | ||
156 | + _typeChanged: function(type) { | ||
157 | + this._unregisterKey(this.key); | ||
158 | + if (!metaDatas[type]) { | ||
159 | + metaDatas[type] = {}; | ||
160 | + } | ||
161 | + this._metaData = metaDatas[type]; | ||
162 | + if (!metaArrays[type]) { | ||
163 | + metaArrays[type] = []; | ||
164 | + } | ||
165 | + this.list = metaArrays[type]; | ||
166 | + this._registerKeyValue(this.key, this.value); | ||
167 | + }, | ||
168 | + | ||
169 | + /** | ||
170 | + * Retrieves meta data value by key. | ||
171 | + * | ||
172 | + * @method byKey | ||
173 | + * @param {string} key The key of the meta-data to be returned. | ||
174 | + * @return {*} | ||
175 | + */ | ||
176 | + byKey: function(key) { | ||
177 | + return this._metaData && this._metaData[key]; | ||
178 | + }, | ||
179 | + | ||
180 | + _resetRegistration: function(oldKey) { | ||
181 | + this._unregisterKey(oldKey); | ||
182 | + this._registerKeyValue(this.key, this.value); | ||
183 | + }, | ||
184 | + | ||
185 | + _unregisterKey: function(key) { | ||
186 | + this._unregister(key, this._metaData, this.list); | ||
187 | + }, | ||
188 | + | ||
189 | + _registerKeyValue: function(key, value) { | ||
190 | + this._register(key, value, this._metaData, this.list); | ||
191 | + }, | ||
192 | + | ||
193 | + _register: function(key, value, data, list) { | ||
194 | + if (key && data && value !== undefined) { | ||
195 | + data[key] = value; | ||
196 | + list.push(value); | ||
197 | + } | ||
198 | + }, | ||
199 | + | ||
200 | + _unregister: function(key, data, list) { | ||
201 | + if (key && data) { | ||
202 | + if (key in data) { | ||
203 | + var value = data[key]; | ||
204 | + delete data[key]; | ||
205 | + this.arrayDelete(list, value); | ||
206 | + } | ||
207 | + } | ||
208 | + } | ||
209 | + | ||
210 | + }); | ||
211 | + | ||
212 | + Polymer.IronMeta.getIronMeta = function getIronMeta() { | ||
213 | + if (singleton === null) { | ||
214 | + singleton = new Polymer.IronMeta(); | ||
215 | + } | ||
216 | + return singleton; | ||
217 | + }; | ||
218 | + | ||
219 | + /** | ||
220 | + `iron-meta-query` can be used to access infomation stored in `iron-meta`. | ||
221 | + | ||
222 | + Examples: | ||
223 | + | ||
224 | + If I create an instance like this: | ||
225 | + | ||
226 | + <iron-meta key="info" value="foo/bar"></iron-meta> | ||
227 | + | ||
228 | + Note that value="foo/bar" is the metadata I've defined. I could define more | ||
229 | + attributes or use child nodes to define additional metadata. | ||
230 | + | ||
231 | + Now I can access that element (and it's metadata) from any `iron-meta-query` instance: | ||
232 | + | ||
233 | + var value = new Polymer.IronMetaQuery({key: 'info'}).value; | ||
234 | + | ||
235 | + @group Polymer Iron Elements | ||
236 | + @element iron-meta-query | ||
237 | + */ | ||
238 | + Polymer.IronMetaQuery = Polymer({ | ||
239 | + | ||
240 | + is: 'iron-meta-query', | ||
241 | + | ||
242 | + properties: { | ||
243 | + | ||
244 | + /** | ||
245 | + * The type of meta-data. All meta-data of the same type is stored | ||
246 | + * together. | ||
247 | + */ | ||
248 | + type: { | ||
249 | + type: String, | ||
250 | + value: 'default', | ||
251 | + observer: '_typeChanged' | ||
252 | + }, | ||
253 | + | ||
254 | + /** | ||
255 | + * Specifies a key to use for retrieving `value` from the `type` | ||
256 | + * namespace. | ||
257 | + */ | ||
258 | + key: { | ||
259 | + type: String, | ||
260 | + observer: '_keyChanged' | ||
261 | + }, | ||
262 | + | ||
263 | + /** | ||
264 | + * The meta-data to store or retrieve. | ||
265 | + */ | ||
266 | + value: { | ||
267 | + type: Object, | ||
268 | + notify: true, | ||
269 | + readOnly: true | ||
270 | + }, | ||
271 | + | ||
272 | + /** | ||
273 | + * Array of all meta-data values for the given type. | ||
274 | + */ | ||
275 | + list: { | ||
276 | + type: Array, | ||
277 | + notify: true | ||
278 | + } | ||
279 | + | ||
280 | + }, | ||
281 | + | ||
282 | + /** | ||
283 | + * Actually a factory method, not a true constructor. Only runs if | ||
284 | + * someone invokes it directly (via `new Polymer.IronMeta()`); | ||
285 | + */ | ||
286 | + factoryImpl: function(config) { | ||
287 | + if (config) { | ||
288 | + for (var n in config) { | ||
289 | + switch(n) { | ||
290 | + case 'type': | ||
291 | + case 'key': | ||
292 | + this[n] = config[n]; | ||
293 | + break; | ||
294 | + } | ||
295 | + } | ||
296 | + } | ||
297 | + }, | ||
298 | + | ||
299 | + created: function() { | ||
300 | + // TODO(sjmiles): good for debugging? | ||
301 | + this._metaDatas = metaDatas; | ||
302 | + this._metaArrays = metaArrays; | ||
303 | + }, | ||
304 | + | ||
305 | + _keyChanged: function(key) { | ||
306 | + this._setValue(this._metaData && this._metaData[key]); | ||
307 | + }, | ||
308 | + | ||
309 | + _typeChanged: function(type) { | ||
310 | + this._metaData = metaDatas[type]; | ||
311 | + this.list = metaArrays[type]; | ||
312 | + if (this.key) { | ||
313 | + this._keyChanged(this.key); | ||
314 | + } | ||
315 | + }, | ||
316 | + | ||
317 | + /** | ||
318 | + * Retrieves meta data value by key. | ||
319 | + * @param {string} key The key of the meta-data to be returned. | ||
320 | + * @return {*} | ||
321 | + */ | ||
322 | + byKey: function(key) { | ||
323 | + return this._metaData && this._metaData[key]; | ||
324 | + } | ||
325 | + | ||
326 | + }); | ||
327 | + | ||
328 | + })(); | ||
329 | +</script> |
bower_components/iron-meta/test/basic.html
1 | -<!doctype html> | ||
2 | -<!-- | ||
3 | -@license | ||
4 | -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | -Code distributed by Google as part of the polymer project is also | ||
9 | -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | ---> | ||
11 | - | ||
12 | -<html> | ||
13 | -<head> | ||
14 | - | ||
15 | - <title>iron-meta-basic</title> | ||
16 | - <meta charset="utf-8"> | ||
17 | - <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
18 | - | ||
19 | - <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
20 | - <script src="../../web-component-tester/browser.js"></script> | ||
21 | - | ||
22 | - <link rel="import" href="../iron-meta.html"> | ||
23 | - | ||
24 | -</head> | ||
25 | -<body> | ||
26 | - | ||
27 | - <iron-meta key="info" value="foo/bar"></iron-meta> | ||
28 | - | ||
29 | - <script> | ||
30 | - | ||
31 | - suite('basic', function() { | ||
32 | - | ||
33 | - test('byKey', function() { | ||
34 | - var meta = document.createElement('iron-meta'); | ||
35 | - assert.equal(meta.byKey('info'), 'foo/bar'); | ||
36 | - }); | ||
37 | - | ||
38 | - test('list', function() { | ||
39 | - var meta = document.createElement('iron-meta'); | ||
40 | - assert.equal(meta.list.length, 1); | ||
41 | - }); | ||
42 | - | ||
43 | - }); | ||
44 | - | ||
45 | - </script> | ||
46 | - | ||
47 | -</body> | ||
48 | -</html> | 1 | +<!doctype html> |
2 | +<!-- | ||
3 | +@license | ||
4 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | +Code distributed by Google as part of the polymer project is also | ||
9 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | +--> | ||
11 | + | ||
12 | +<html> | ||
13 | +<head> | ||
14 | + | ||
15 | + <title>iron-meta-basic</title> | ||
16 | + <meta charset="utf-8"> | ||
17 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
18 | + | ||
19 | + <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
20 | + <script src="../../web-component-tester/browser.js"></script> | ||
21 | + | ||
22 | + <link rel="import" href="../iron-meta.html"> | ||
23 | + | ||
24 | +</head> | ||
25 | +<body> | ||
26 | + | ||
27 | + <iron-meta key="info" value="foo/bar"></iron-meta> | ||
28 | + | ||
29 | + <script> | ||
30 | + | ||
31 | + suite('basic', function() { | ||
32 | + | ||
33 | + test('byKey', function() { | ||
34 | + var meta = document.createElement('iron-meta'); | ||
35 | + assert.equal(meta.byKey('info'), 'foo/bar'); | ||
36 | + }); | ||
37 | + | ||
38 | + test('list', function() { | ||
39 | + var meta = document.createElement('iron-meta'); | ||
40 | + assert.equal(meta.list.length, 1); | ||
41 | + }); | ||
42 | + | ||
43 | + }); | ||
44 | + | ||
45 | + </script> | ||
46 | + | ||
47 | +</body> | ||
48 | +</html> |
bower_components/iron-meta/test/index.html
1 | -<!doctype html> | ||
2 | -<!-- | ||
3 | -@license | ||
4 | -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | -Code distributed by Google as part of the polymer project is also | ||
9 | -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | ---> | ||
11 | - | ||
12 | -<html> | ||
13 | -<head> | ||
14 | - | ||
15 | - <meta charset="utf-8"> | ||
16 | - <title>Tests</title> | ||
17 | - <script src="../../web-component-tester/browser.js"></script> | ||
18 | - | ||
19 | -</head> | ||
20 | -<body> | ||
21 | - | ||
22 | - <script> | ||
23 | - WCT.loadSuites([ | ||
24 | - 'basic.html', | ||
25 | - 'iron-meta.html' | ||
26 | - ]); | ||
27 | - </script> | ||
28 | - | ||
29 | -</body> | ||
30 | -</html> | 1 | +<!doctype html> |
2 | +<!-- | ||
3 | +@license | ||
4 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | +Code distributed by Google as part of the polymer project is also | ||
9 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | +--> | ||
11 | + | ||
12 | +<html> | ||
13 | +<head> | ||
14 | + | ||
15 | + <meta charset="utf-8"> | ||
16 | + <title>Tests</title> | ||
17 | + <script src="../../web-component-tester/browser.js"></script> | ||
18 | + | ||
19 | +</head> | ||
20 | +<body> | ||
21 | + | ||
22 | + <script> | ||
23 | + WCT.loadSuites([ | ||
24 | + 'basic.html', | ||
25 | + 'iron-meta.html' | ||
26 | + ]); | ||
27 | + </script> | ||
28 | + | ||
29 | +</body> | ||
30 | +</html> |
bower_components/iron-meta/test/iron-meta.html
1 | -<!doctype html> | ||
2 | -<!-- | ||
3 | -@license | ||
4 | -Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | -Code distributed by Google as part of the polymer project is also | ||
9 | -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | ---> | ||
11 | - | ||
12 | -<html> | ||
13 | - <head> | ||
14 | - | ||
15 | - <title>iron-meta</title> | ||
16 | - <meta charset="utf-8"> | ||
17 | - <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
18 | - | ||
19 | - <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
20 | - <script src="../../web-component-tester/browser.js"></script> | ||
21 | - <script src="../../test-fixture/test-fixture-mocha.js"></script> | ||
22 | - | ||
23 | - <link rel="import" href="../iron-meta.html"> | ||
24 | - <link rel="import" href="../../test-fixture/test-fixture.html"> | ||
25 | - | ||
26 | - </head> | ||
27 | - <body> | ||
28 | - | ||
29 | - <test-fixture id="TrivialMeta"> | ||
30 | - <template> | ||
31 | - <iron-meta self key="info"></iron-meta> | ||
32 | - </template> | ||
33 | - </test-fixture> | ||
34 | - | ||
35 | - <test-fixture id="ManyMetas"> | ||
36 | - <template> | ||
37 | - <iron-meta self key="default1"></iron-meta> | ||
38 | - <iron-meta self key="default2"></iron-meta> | ||
39 | - <iron-meta self key="default3"></iron-meta> | ||
40 | - </template> | ||
41 | - </test-fixture> | ||
42 | - | ||
43 | - <test-fixture id="DifferentTypedMetas"> | ||
44 | - <template> | ||
45 | - <iron-meta self type="foo" key="foobarKey"></iron-meta> | ||
46 | - <iron-meta self type="bar" key="foobarKey"></iron-meta> | ||
47 | - <iron-meta self key="defaultKey"></iron-meta> | ||
48 | - </template> | ||
49 | - </test-fixture> | ||
50 | - | ||
51 | - <test-fixture id="ClashingMetas"> | ||
52 | - <template> | ||
53 | - <iron-meta self key="baz"></iron-meta> | ||
54 | - <iron-meta self key="baz"></iron-meta> | ||
55 | - </template> | ||
56 | - </test-fixture> | ||
57 | - | ||
58 | - <script> | ||
59 | -suite('<iron-meta>', function () { | ||
60 | - suite('basic behavior', function () { | ||
61 | - var meta; | ||
62 | - | ||
63 | - setup(function () { | ||
64 | - meta = fixture('TrivialMeta'); | ||
65 | - }); | ||
66 | - | ||
67 | - teardown(function () { | ||
68 | - meta.key = null; | ||
69 | - }); | ||
70 | - | ||
71 | - test('uses itself as the default value', function () { | ||
72 | - expect(meta.value).to.be.equal(meta); | ||
73 | - }); | ||
74 | - | ||
75 | - test('can be assigned alternative values', function () { | ||
76 | - meta.value = 'foobar'; | ||
77 | - | ||
78 | - expect(meta.list[0]).to.be.equal('foobar'); | ||
79 | - }); | ||
80 | - | ||
81 | - test('can access same-type meta values by key', function () { | ||
82 | - expect(meta.byKey(meta.key)).to.be.equal(meta.value); | ||
83 | - }); | ||
84 | - | ||
85 | - test('yields a list of same-type meta data', function () { | ||
86 | - expect(meta.list).to.be.ok; | ||
87 | - expect(meta.list.length).to.be.equal(1); | ||
88 | - expect(meta.list[0]).to.be.equal(meta); | ||
89 | - }); | ||
90 | - }); | ||
91 | - | ||
92 | - suite('many same-typed metas', function () { | ||
93 | - var metas; | ||
94 | - | ||
95 | - setup(function () { | ||
96 | - metas = fixture('ManyMetas'); | ||
97 | - }); | ||
98 | - | ||
99 | - teardown(function () { | ||
100 | - metas.forEach(function (meta) { | ||
101 | - meta.key = null; | ||
102 | - }); | ||
103 | - }); | ||
104 | - | ||
105 | - test('all cache all meta values', function () { | ||
106 | - metas.forEach(function (meta, index) { | ||
107 | - expect(meta.list.length).to.be.equal(metas.length); | ||
108 | - expect(meta.list[index].value).to.be.equal(meta.value); | ||
109 | - }); | ||
110 | - }); | ||
111 | - | ||
112 | - test('can be unregistered individually', function () { | ||
113 | - metas[0].key = null; | ||
114 | - | ||
115 | - expect(metas[0].list.length).to.be.equal(2); | ||
116 | - expect(metas[0].list).to.be.deep.equal([metas[1], metas[2]]) | ||
117 | - }); | ||
118 | - | ||
119 | - test('can access each others value by key', function () { | ||
120 | - expect(metas[0].byKey('default2')).to.be.equal(metas[1].value); | ||
121 | - }); | ||
122 | - }); | ||
123 | - | ||
124 | - suite('different-typed metas', function () { | ||
125 | - var metas; | ||
126 | - | ||
127 | - setup(function () { | ||
128 | - metas = fixture('DifferentTypedMetas'); | ||
129 | - }); | ||
130 | - | ||
131 | - teardown(function () { | ||
132 | - metas.forEach(function (meta) { | ||
133 | - meta.key = null; | ||
134 | - }); | ||
135 | - }); | ||
136 | - | ||
137 | - test('cache their values separately', function () { | ||
138 | - var fooMeta = metas[0]; | ||
139 | - var barMeta = metas[1]; | ||
140 | - | ||
141 | - expect(fooMeta.value).to.not.be.equal(barMeta.value); | ||
142 | - expect(fooMeta.byKey('foobarKey')).to.be.equal(fooMeta.value); | ||
143 | - expect(barMeta.byKey('foobarKey')).to.be.equal(barMeta.value); | ||
144 | - }); | ||
145 | - | ||
146 | - test('cannot access values of other types', function () { | ||
147 | - var defaultMeta = metas[2]; | ||
148 | - | ||
149 | - expect(defaultMeta.byKey('foobarKey')).to.be.equal(undefined); | ||
150 | - }); | ||
151 | - | ||
152 | - test('only list values of their type', function () { | ||
153 | - metas.forEach(function (meta) { | ||
154 | - expect(meta.list.length).to.be.equal(1); | ||
155 | - expect(meta.list[0]).to.be.equal(meta.value); | ||
156 | - }) | ||
157 | - }); | ||
158 | - }); | ||
159 | - | ||
160 | - suite('metas with clashing keys', function () { | ||
161 | - var metaPair; | ||
162 | - | ||
163 | - setup(function () { | ||
164 | - metaPair = fixture('ClashingMetas'); | ||
165 | - }); | ||
166 | - | ||
167 | - teardown(function () { | ||
168 | - metaPair.forEach(function (meta) { | ||
169 | - meta.key = null; | ||
170 | - }); | ||
171 | - }); | ||
172 | - | ||
173 | - test('let the last value win registration against the key', function () { | ||
174 | - var registeredValue = metaPair[0].byKey(metaPair[0].key); | ||
175 | - var firstValue = metaPair[0].value; | ||
176 | - var secondValue = metaPair[1].value; | ||
177 | - | ||
178 | - expect(registeredValue).to.not.be.equal(firstValue); | ||
179 | - expect(registeredValue).to.be.equal(secondValue); | ||
180 | - }); | ||
181 | - }); | ||
182 | -}); | ||
183 | - </script> | ||
184 | - | ||
185 | - </body> | ||
186 | -</html> | 1 | +<!doctype html> |
2 | +<!-- | ||
3 | +@license | ||
4 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
5 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
6 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
7 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
8 | +Code distributed by Google as part of the polymer project is also | ||
9 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
10 | +--> | ||
11 | + | ||
12 | +<html> | ||
13 | + <head> | ||
14 | + | ||
15 | + <title>iron-meta</title> | ||
16 | + <meta charset="utf-8"> | ||
17 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
18 | + | ||
19 | + <script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
20 | + <script src="../../web-component-tester/browser.js"></script> | ||
21 | + <script src="../../test-fixture/test-fixture-mocha.js"></script> | ||
22 | + | ||
23 | + <link rel="import" href="../iron-meta.html"> | ||
24 | + <link rel="import" href="../../test-fixture/test-fixture.html"> | ||
25 | + | ||
26 | + </head> | ||
27 | + <body> | ||
28 | + | ||
29 | + <test-fixture id="TrivialMeta"> | ||
30 | + <template> | ||
31 | + <iron-meta self key="info"></iron-meta> | ||
32 | + </template> | ||
33 | + </test-fixture> | ||
34 | + | ||
35 | + <test-fixture id="ManyMetas"> | ||
36 | + <template> | ||
37 | + <iron-meta self key="default1"></iron-meta> | ||
38 | + <iron-meta self key="default2"></iron-meta> | ||
39 | + <iron-meta self key="default3"></iron-meta> | ||
40 | + </template> | ||
41 | + </test-fixture> | ||
42 | + | ||
43 | + <test-fixture id="DifferentTypedMetas"> | ||
44 | + <template> | ||
45 | + <iron-meta self type="foo" key="foobarKey"></iron-meta> | ||
46 | + <iron-meta self type="bar" key="foobarKey"></iron-meta> | ||
47 | + <iron-meta self key="defaultKey"></iron-meta> | ||
48 | + </template> | ||
49 | + </test-fixture> | ||
50 | + | ||
51 | + <test-fixture id="ClashingMetas"> | ||
52 | + <template> | ||
53 | + <iron-meta self key="baz"></iron-meta> | ||
54 | + <iron-meta self key="baz"></iron-meta> | ||
55 | + </template> | ||
56 | + </test-fixture> | ||
57 | + | ||
58 | + <script> | ||
59 | +suite('<iron-meta>', function () { | ||
60 | + suite('basic behavior', function () { | ||
61 | + var meta; | ||
62 | + | ||
63 | + setup(function () { | ||
64 | + meta = fixture('TrivialMeta'); | ||
65 | + }); | ||
66 | + | ||
67 | + teardown(function () { | ||
68 | + meta.key = null; | ||
69 | + }); | ||
70 | + | ||
71 | + test('uses itself as the default value', function () { | ||
72 | + expect(meta.value).to.be.equal(meta); | ||
73 | + }); | ||
74 | + | ||
75 | + test('can be assigned alternative values', function () { | ||
76 | + meta.value = 'foobar'; | ||
77 | + | ||
78 | + expect(meta.list[0]).to.be.equal('foobar'); | ||
79 | + }); | ||
80 | + | ||
81 | + test('can access same-type meta values by key', function () { | ||
82 | + expect(meta.byKey(meta.key)).to.be.equal(meta.value); | ||
83 | + }); | ||
84 | + | ||
85 | + test('yields a list of same-type meta data', function () { | ||
86 | + expect(meta.list).to.be.ok; | ||
87 | + expect(meta.list.length).to.be.equal(1); | ||
88 | + expect(meta.list[0]).to.be.equal(meta); | ||
89 | + }); | ||
90 | + }); | ||
91 | + | ||
92 | + suite('many same-typed metas', function () { | ||
93 | + var metas; | ||
94 | + | ||
95 | + setup(function () { | ||
96 | + metas = fixture('ManyMetas'); | ||
97 | + }); | ||
98 | + | ||
99 | + teardown(function () { | ||
100 | + metas.forEach(function (meta) { | ||
101 | + meta.key = null; | ||
102 | + }); | ||
103 | + }); | ||
104 | + | ||
105 | + test('all cache all meta values', function () { | ||
106 | + metas.forEach(function (meta, index) { | ||
107 | + expect(meta.list.length).to.be.equal(metas.length); | ||
108 | + expect(meta.list[index].value).to.be.equal(meta.value); | ||
109 | + }); | ||
110 | + }); | ||
111 | + | ||
112 | + test('can be unregistered individually', function () { | ||
113 | + metas[0].key = null; | ||
114 | + | ||
115 | + expect(metas[0].list.length).to.be.equal(2); | ||
116 | + expect(metas[0].list).to.be.deep.equal([metas[1], metas[2]]) | ||
117 | + }); | ||
118 | + | ||
119 | + test('can access each others value by key', function () { | ||
120 | + expect(metas[0].byKey('default2')).to.be.equal(metas[1].value); | ||
121 | + }); | ||
122 | + }); | ||
123 | + | ||
124 | + suite('different-typed metas', function () { | ||
125 | + var metas; | ||
126 | + | ||
127 | + setup(function () { | ||
128 | + metas = fixture('DifferentTypedMetas'); | ||
129 | + }); | ||
130 | + | ||
131 | + teardown(function () { | ||
132 | + metas.forEach(function (meta) { | ||
133 | + meta.key = null; | ||
134 | + }); | ||
135 | + }); | ||
136 | + | ||
137 | + test('cache their values separately', function () { | ||
138 | + var fooMeta = metas[0]; | ||
139 | + var barMeta = metas[1]; | ||
140 | + | ||
141 | + expect(fooMeta.value).to.not.be.equal(barMeta.value); | ||
142 | + expect(fooMeta.byKey('foobarKey')).to.be.equal(fooMeta.value); | ||
143 | + expect(barMeta.byKey('foobarKey')).to.be.equal(barMeta.value); | ||
144 | + }); | ||
145 | + | ||
146 | + test('cannot access values of other types', function () { | ||
147 | + var defaultMeta = metas[2]; | ||
148 | + | ||
149 | + expect(defaultMeta.byKey('foobarKey')).to.be.equal(undefined); | ||
150 | + }); | ||
151 | + | ||
152 | + test('only list values of their type', function () { | ||
153 | + metas.forEach(function (meta) { | ||
154 | + expect(meta.list.length).to.be.equal(1); | ||
155 | + expect(meta.list[0]).to.be.equal(meta.value); | ||
156 | + }) | ||
157 | + }); | ||
158 | + }); | ||
159 | + | ||
160 | + suite('metas with clashing keys', function () { | ||
161 | + var metaPair; | ||
162 | + | ||
163 | + setup(function () { | ||
164 | + metaPair = fixture('ClashingMetas'); | ||
165 | + }); | ||
166 | + | ||
167 | + teardown(function () { | ||
168 | + metaPair.forEach(function (meta) { | ||
169 | + meta.key = null; | ||
170 | + }); | ||
171 | + }); | ||
172 | + | ||
173 | + test('let the last value win registration against the key', function () { | ||
174 | + var registeredValue = metaPair[0].byKey(metaPair[0].key); | ||
175 | + var firstValue = metaPair[0].value; | ||
176 | + var secondValue = metaPair[1].value; | ||
177 | + | ||
178 | + expect(registeredValue).to.not.be.equal(firstValue); | ||
179 | + expect(registeredValue).to.be.equal(secondValue); | ||
180 | + }); | ||
181 | + }); | ||
182 | + | ||
183 | + suite('singleton', function () { | ||
184 | + | ||
185 | + test('only one ironmeta created', function () { | ||
186 | + var first = Polymer.IronMeta.getIronMeta(); | ||
187 | + var second = Polymer.IronMeta.getIronMeta(); | ||
188 | + expect(first).to.be.equal(second); | ||
189 | + }); | ||
190 | + }); | ||
191 | +}); | ||
192 | + </script> | ||
193 | + | ||
194 | + </body> | ||
195 | +</html> |
bower_components/iron-overlay-behavior/.bower.json
100644 → 100755
bower_components/iron-overlay-behavior/.gitignore
100644 → 100755
bower_components/iron-overlay-behavior/README.md
100644 → 100755
bower_components/iron-overlay-behavior/bower.json
100644 → 100755
bower_components/iron-overlay-behavior/demo/index.html
100644 → 100755
bower_components/iron-overlay-behavior/demo/simple-overlay.html
100644 → 100755
bower_components/iron-overlay-behavior/index.html
100644 → 100755
bower_components/iron-overlay-behavior/iron-overlay-backdrop.html
100644 → 100755
bower_components/iron-overlay-behavior/iron-overlay-behavior.html
100644 → 100755
bower_components/iron-overlay-behavior/iron-overlay-manager.html
100644 → 100755
bower_components/iron-overlay-behavior/test/index.html
100644 → 100755
bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html
100644 → 100755
bower_components/iron-overlay-behavior/test/test-overlay.html
100644 → 100755
bower_components/iron-range-behavior/.bower.json
100644 → 100755
bower_components/iron-range-behavior/.gitignore
100644 → 100755
bower_components/iron-range-behavior/README.md
100644 → 100755
bower_components/iron-range-behavior/bower.json
100644 → 100755
bower_components/iron-range-behavior/demo/index.html
100644 → 100755
bower_components/iron-range-behavior/index.html
100644 → 100755
bower_components/iron-range-behavior/iron-range-behavior.html
100644 → 100755
bower_components/iron-range-behavior/test/basic.html
100644 → 100755
bower_components/iron-range-behavior/test/index.html
100644 → 100755
bower_components/iron-range-behavior/test/x-progressbar.html
100644 → 100755
bower_components/iron-selector/.bower.json
100644 → 100755
bower_components/iron-selector/.gitignore
100644 → 100755
bower_components/iron-selector/demo/index.html
100644 → 100755
bower_components/iron-selector/iron-multi-selectable.html
100644 → 100755
bower_components/iron-selector/iron-selectable.html
100644 → 100755
bower_components/iron-selector/iron-selection.html
100644 → 100755
bower_components/iron-selector/iron-selector.html
100644 → 100755
bower_components/iron-selector/test/activate-event.html
100644 → 100755
bower_components/iron-selector/test/basic.html
100644 → 100755
bower_components/iron-selector/test/content-element.html
100644 → 100755
bower_components/iron-selector/test/content.html
100644 → 100755
bower_components/iron-selector/test/excluded-local-names.html
100644 → 100755
bower_components/iron-selector/test/index.html
100644 → 100755
bower_components/iron-selector/test/multi.html
100644 → 100755
bower_components/iron-selector/test/next-previous.html
100644 → 100755
bower_components/iron-selector/test/selected-attribute.html
100644 → 100755
bower_components/iron-selector/test/template-repeat.html
100644 → 100755
bower_components/iron-test-helpers/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "iron-test-helpers", | 2 | "name": "iron-test-helpers", |
3 | - "version": "1.0.5", | 3 | + "version": "1.0.6", |
4 | "authors": [ | 4 | "authors": [ |
5 | "The Polymer Authors" | 5 | "The Polymer Authors" |
6 | ], | 6 | ], |
@@ -25,11 +25,11 @@ | @@ -25,11 +25,11 @@ | ||
25 | "devDependencies": { | 25 | "devDependencies": { |
26 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | 26 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" |
27 | }, | 27 | }, |
28 | - "_release": "1.0.5", | 28 | + "_release": "1.0.6", |
29 | "_resolution": { | 29 | "_resolution": { |
30 | "type": "version", | 30 | "type": "version", |
31 | - "tag": "v1.0.5", | ||
32 | - "commit": "336a99b2559ebd79f6eb7d29cc186f68e05b95d6" | 31 | + "tag": "v1.0.6", |
32 | + "commit": "940e5b8c5c7c878f51cf259019d3e3243f18d0b3" | ||
33 | }, | 33 | }, |
34 | "_source": "git://github.com/PolymerElements/iron-test-helpers.git", | 34 | "_source": "git://github.com/PolymerElements/iron-test-helpers.git", |
35 | "_target": "^1.0.0", | 35 | "_target": "^1.0.0", |
bower_components/iron-test-helpers/.gitignore
100644 → 100755
bower_components/iron-test-helpers/README.md
100644 → 100755
bower_components/iron-test-helpers/bower.json
100644 → 100755
bower_components/iron-test-helpers/iron-test-helpers.html
100644 → 100755
bower_components/iron-test-helpers/mock-interactions.js
100644 → 100755
@@ -144,7 +144,8 @@ | @@ -144,7 +144,8 @@ | ||
144 | 144 | ||
145 | function keyboardEventFor(type, keyCode) { | 145 | function keyboardEventFor(type, keyCode) { |
146 | var event = new CustomEvent(type, { | 146 | var event = new CustomEvent(type, { |
147 | - bubbles: true | 147 | + bubbles: true, |
148 | + cancelable: true | ||
148 | }); | 149 | }); |
149 | 150 | ||
150 | event.keyCode = keyCode; | 151 | event.keyCode = keyCode; |
bower_components/iron-test-helpers/test-helpers.js
100644 → 100755
bower_components/iron-validatable-behavior/.bower.json
100644 → 100755
bower_components/iron-validatable-behavior/.gitignore
100644 → 100755
bower_components/iron-validatable-behavior/README.md
100644 → 100755
bower_components/iron-validatable-behavior/bower.json
100644 → 100755
bower_components/iron-validatable-behavior/demo/cats-only.html
100644 → 100755
bower_components/iron-validatable-behavior/demo/index.html
100644 → 100755
bower_components/iron-validatable-behavior/demo/validatable-input.html
100644 → 100755
bower_components/iron-validatable-behavior/index.html
100644 → 100755
bower_components/iron-validatable-behavior/iron-validatable-behavior.html
100644 → 100755
bower_components/iron-validatable-behavior/test/index.html
100644 → 100755
bower_components/iron-validatable-behavior/test/iron-validatable-behavior.html
100644 → 100755
bower_components/iron-validatable-behavior/test/test-validatable.html
100644 → 100755
bower_components/neon-animation/.bower.json
100644 → 100755
bower_components/neon-animation/.gitignore
100644 → 100755
bower_components/neon-animation/README.md
100644 → 100755
bower_components/neon-animation/animations/cascaded-animation.html
100644 → 100755
bower_components/neon-animation/animations/fade-in-animation.html
100644 → 100755
bower_components/neon-animation/animations/fade-out-animation.html
100644 → 100755
bower_components/neon-animation/animations/hero-animation.html
100644 → 100755
bower_components/neon-animation/animations/opaque-animation.html
100644 → 100755
bower_components/neon-animation/animations/reverse-ripple-animation.html
100644 → 100755
bower_components/neon-animation/animations/ripple-animation.html
100644 → 100755
bower_components/neon-animation/animations/scale-down-animation.html
100644 → 100755
bower_components/neon-animation/animations/scale-up-animation.html
100644 → 100755
bower_components/neon-animation/animations/slide-down-animation.html
100644 → 100755
bower_components/neon-animation/animations/slide-from-left-animation.html
100644 → 100755
bower_components/neon-animation/animations/slide-from-right-animation.html
100644 → 100755
bower_components/neon-animation/animations/slide-left-animation.html
100644 → 100755
bower_components/neon-animation/animations/slide-right-animation.html
100644 → 100755
bower_components/neon-animation/animations/slide-up-animation.html
100644 → 100755
bower_components/neon-animation/animations/transform-animation.html
100644 → 100755
bower_components/neon-animation/bower.json
100644 → 100755
bower_components/neon-animation/demo/card/index.html
100644 → 100755
bower_components/neon-animation/demo/card/x-card.html
100644 → 100755
bower_components/neon-animation/demo/card/x-cards-list.html
100644 → 100755
bower_components/neon-animation/demo/declarative/index.html
100644 → 100755
bower_components/neon-animation/demo/doc/basic.html
100644 → 100755
bower_components/neon-animation/demo/doc/my-animatable.html
100644 → 100755
bower_components/neon-animation/demo/doc/my-dialog.html
100644 → 100755
bower_components/neon-animation/demo/doc/types.html
100644 → 100755
bower_components/neon-animation/demo/dropdown/animated-dropdown.html
100644 → 100755
bower_components/neon-animation/demo/dropdown/index.html
100644 → 100755
bower_components/neon-animation/demo/grid/animated-grid.html
100644 → 100755
bower_components/neon-animation/demo/grid/fullsize-page-with-card.html
100644 → 100755
bower_components/neon-animation/demo/grid/index.html
100644 → 100755
bower_components/neon-animation/demo/index.html
100644 → 100755
bower_components/neon-animation/demo/list/full-view.html
100644 → 100755
bower_components/neon-animation/demo/list/index.html
100644 → 100755
bower_components/neon-animation/demo/list/list-demo.html
100644 → 100755
bower_components/neon-animation/demo/list/list-view.html
100644 → 100755
bower_components/neon-animation/demo/load/animated-grid.html
100644 → 100755
bower_components/neon-animation/demo/load/full-page.html
100644 → 100755
bower_components/neon-animation/demo/load/index.html
100644 → 100755
bower_components/neon-animation/demo/reprojection/animated-grid.html
100644 → 100755
bower_components/neon-animation/demo/reprojection/fullsize-page-with-card.html
100644 → 100755
bower_components/neon-animation/demo/reprojection/index.html
100644 → 100755
bower_components/neon-animation/demo/reprojection/reprojected-pages.html
100644 → 100755
bower_components/neon-animation/demo/shared.css
100644 → 100755
bower_components/neon-animation/demo/tiles/circles-page.html
100644 → 100755
bower_components/neon-animation/demo/tiles/index.html
100644 → 100755
bower_components/neon-animation/demo/tiles/squares-page.html
100644 → 100755
bower_components/neon-animation/guides/neon-animation.md
100644 → 100755
bower_components/neon-animation/index.html
100644 → 100755
bower_components/neon-animation/neon-animatable-behavior.html
100644 → 100755
bower_components/neon-animation/neon-animatable.html
100644 → 100755
bower_components/neon-animation/neon-animated-pages.html
100644 → 100755
bower_components/neon-animation/neon-animation-behavior.html
100644 → 100755
bower_components/neon-animation/neon-animation-runner-behavior.html
100644 → 100755
bower_components/neon-animation/neon-animation.html
100644 → 100755
bower_components/neon-animation/neon-animations.html
100644 → 100755
bower_components/neon-animation/neon-shared-element-animatable-behavior.html
100644 → 100755
bower_components/neon-animation/neon-shared-element-animation-behavior.html
100644 → 100755
bower_components/neon-animation/test/index.html
100644 → 100755
bower_components/neon-animation/test/neon-animated-pages.html
100644 → 100755
bower_components/neon-animation/test/test-resizable-pages.html
100644 → 100755
bower_components/neon-animation/web-animations.html
100644 → 100755
bower_components/paper-badge/.bower.json
100644 → 100755
bower_components/paper-badge/.gitignore
100644 → 100755
bower_components/paper-badge/README.md
100644 → 100755
bower_components/paper-badge/bower.json
100644 → 100755
bower_components/paper-badge/demo/index.html
100644 → 100755
bower_components/paper-badge/demo/test-button.html
100644 → 100755
bower_components/paper-badge/index.html
100644 → 100755
bower_components/paper-badge/paper-badge.html
100644 → 100755
bower_components/paper-badge/test/basic.html
100644 → 100755
bower_components/paper-badge/test/index.html
100644 → 100755
bower_components/paper-badge/test/test-button.html
100644 → 100755
bower_components/paper-behaviors/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "paper-behaviors", | 2 | "name": "paper-behaviors", |
3 | - "version": "1.0.7", | 3 | + "version": "1.0.9", |
4 | "description": "Common behaviors across the paper elements", | 4 | "description": "Common behaviors across the paper elements", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
7 | ], | 7 | ], |
8 | "main": [ | 8 | "main": [ |
9 | "paper-button-behavior.html", | 9 | "paper-button-behavior.html", |
10 | + "paper-checked-element-behavior.html", | ||
10 | "paper-inky-focus-behavior.html" | 11 | "paper-inky-focus-behavior.html" |
11 | ], | 12 | ], |
12 | "keywords": [ | 13 | "keywords": [ |
@@ -37,11 +38,11 @@ | @@ -37,11 +38,11 @@ | ||
37 | "web-component-tester": "*", | 38 | "web-component-tester": "*", |
38 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" | 39 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" |
39 | }, | 40 | }, |
40 | - "_release": "1.0.7", | 41 | + "_release": "1.0.9", |
41 | "_resolution": { | 42 | "_resolution": { |
42 | "type": "version", | 43 | "type": "version", |
43 | - "tag": "v1.0.7", | ||
44 | - "commit": "7a674a3635fcb6db4842d16d3fd768ab07d638a8" | 44 | + "tag": "v1.0.9", |
45 | + "commit": "d9c0398cbaf3881bef3533b5b2b6127fc4d0960c" | ||
45 | }, | 46 | }, |
46 | "_source": "git://github.com/PolymerElements/paper-behaviors.git", | 47 | "_source": "git://github.com/PolymerElements/paper-behaviors.git", |
47 | "_target": "^1.0.0", | 48 | "_target": "^1.0.0", |
bower_components/paper-behaviors/.gitignore
100644 → 100755
bower_components/paper-behaviors/README.md
100644 → 100755
bower_components/paper-behaviors/bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "paper-behaviors", | 2 | "name": "paper-behaviors", |
3 | - "version": "1.0.7", | 3 | + "version": "1.0.9", |
4 | "description": "Common behaviors across the paper elements", | 4 | "description": "Common behaviors across the paper elements", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
7 | ], | 7 | ], |
8 | "main": [ | 8 | "main": [ |
9 | "paper-button-behavior.html", | 9 | "paper-button-behavior.html", |
10 | + "paper-checked-element-behavior.html", | ||
10 | "paper-inky-focus-behavior.html" | 11 | "paper-inky-focus-behavior.html" |
11 | ], | 12 | ], |
12 | "keywords": [ | 13 | "keywords": [ |
bower_components/paper-behaviors/demo/index.html
100644 → 100755
bower_components/paper-behaviors/demo/paper-button.html
100644 → 100755
bower_components/paper-behaviors/demo/paper-radio-button.html
100644 → 100755
bower_components/paper-behaviors/index.html
100644 → 100755
bower_components/paper-behaviors/paper-button-behavior.html
100644 → 100755
bower_components/paper-behaviors/paper-checked-element-behavior.html
100644 → 100755
bower_components/paper-behaviors/paper-inky-focus-behavior.html
100644 → 100755
@@ -17,7 +17,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -17,7 +17,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
17 | /** | 17 | /** |
18 | * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus. | 18 | * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus. |
19 | * | 19 | * |
20 | - * @polymerBehavior Polymer.PaperInkyFocusBehaviorImpl | 20 | + * @polymerBehavior Polymer.PaperInkyFocusBehavior |
21 | */ | 21 | */ |
22 | Polymer.PaperInkyFocusBehaviorImpl = { | 22 | Polymer.PaperInkyFocusBehaviorImpl = { |
23 | 23 |
bower_components/paper-behaviors/paper-ripple-behavior.html
100644 → 100755
bower_components/paper-behaviors/test/index.html
100644 → 100755
bower_components/paper-behaviors/test/paper-button-behavior.html
100644 → 100755
bower_components/paper-behaviors/test/paper-checked-element-behavior.html
100644 → 100755
bower_components/paper-behaviors/test/paper-radio-button-behavior.html
100644 → 100755
bower_components/paper-behaviors/test/paper-ripple-behavior.html
100644 → 100755
bower_components/paper-behaviors/test/test-button.html
100644 → 100755
bower_components/paper-behaviors/test/test-radio-button.html
100644 → 100755
bower_components/paper-button/.bower.json
100644 → 100755
bower_components/paper-button/.gitignore
100644 → 100755
bower_components/paper-button/README.md
100644 → 100755
bower_components/paper-button/bower.json
100644 → 100755
bower_components/paper-button/demo/index.html
100644 → 100755
bower_components/paper-button/index.html
100644 → 100755
bower_components/paper-button/paper-button.html
100644 → 100755
bower_components/paper-button/test/index.html
100644 → 100755
bower_components/paper-button/test/paper-button.html
100644 → 100755
bower_components/paper-card/.bower.json
1 | { | 1 | { |
2 | "name": "paper-card", | 2 | "name": "paper-card", |
3 | - "version": "1.0.6", | 3 | + "version": "1.0.7", |
4 | "description": "Material design piece of paper with unique related data", | 4 | "description": "Material design piece of paper with unique related data", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
@@ -36,11 +36,11 @@ | @@ -36,11 +36,11 @@ | ||
36 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", | 36 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", |
37 | "paper-styles": "PolymerElements/paper-styles#^1.0.0" | 37 | "paper-styles": "PolymerElements/paper-styles#^1.0.0" |
38 | }, | 38 | }, |
39 | - "_release": "1.0.6", | 39 | + "_release": "1.0.7", |
40 | "_resolution": { | 40 | "_resolution": { |
41 | "type": "version", | 41 | "type": "version", |
42 | - "tag": "v1.0.6", | ||
43 | - "commit": "f2f4bf05e7b3746b39b9ad1d468d8031b236e2b6" | 42 | + "tag": "v1.0.7", |
43 | + "commit": "a1a0b2789b657a9b2bce17483ecc495ce968b104" | ||
44 | }, | 44 | }, |
45 | "_source": "git://github.com/PolymerElements/paper-card.git", | 45 | "_source": "git://github.com/PolymerElements/paper-card.git", |
46 | "_target": "~1.0.3", | 46 | "_target": "~1.0.3", |
bower_components/paper-card/bower.json
1 | { | 1 | { |
2 | "name": "paper-card", | 2 | "name": "paper-card", |
3 | - "version": "1.0.6", | 3 | + "version": "1.0.7", |
4 | "description": "Material design piece of paper with unique related data", | 4 | "description": "Material design piece of paper with unique related data", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
bower_components/paper-card/paper-card.html
@@ -13,7 +13,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | @@ -13,7 +13,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN | ||
13 | <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> | 13 | <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> |
14 | 14 | ||
15 | <!-- | 15 | <!-- |
16 | -Material Design: <a href="http://www.google.com/design/spec/components/cards.html">Cards</a> | 16 | +Material design: [Cards](https://www.google.com/design/spec/components/cards.html) |
17 | 17 | ||
18 | `paper-card` is a container with a drop shadow. | 18 | `paper-card` is a container with a drop shadow. |
19 | 19 | ||
@@ -31,7 +31,7 @@ Example - top card image: | @@ -31,7 +31,7 @@ Example - top card image: | ||
31 | <paper-card heading="Card Title" image="/path/to/image.png"> | 31 | <paper-card heading="Card Title" image="/path/to/image.png"> |
32 | ... | 32 | ... |
33 | </paper-card> | 33 | </paper-card> |
34 | - | 34 | + |
35 | ### Accessibility | 35 | ### Accessibility |
36 | 36 | ||
37 | By default, the `aria-label` will be set to the value of the `heading` attribute. | 37 | By default, the `aria-label` will be set to the value of the `heading` attribute. |
@@ -58,7 +58,7 @@ Custom property | Description | Default | @@ -58,7 +58,7 @@ Custom property | Description | Default | ||
58 | 58 | ||
59 | <dom-module id="paper-card"> | 59 | <dom-module id="paper-card"> |
60 | <template> | 60 | <template> |
61 | - <style> | 61 | + <style include="paper-material"> |
62 | :host { | 62 | :host { |
63 | display: inline-block; | 63 | display: inline-block; |
64 | position: relative; | 64 | position: relative; |
@@ -69,11 +69,6 @@ Custom property | Description | Default | @@ -69,11 +69,6 @@ Custom property | Description | Default | ||
69 | @apply(--paper-card); | 69 | @apply(--paper-card); |
70 | } | 70 | } |
71 | 71 | ||
72 | - paper-material { | ||
73 | - border-radius: inherit; | ||
74 | - @apply(--layout-fit); | ||
75 | - } | ||
76 | - | ||
77 | /* IE 10 support for HTML5 hidden attr */ | 72 | /* IE 10 support for HTML5 hidden attr */ |
78 | [hidden] { | 73 | [hidden] { |
79 | display: none !important; | 74 | display: none !important; |
@@ -81,6 +76,9 @@ Custom property | Description | Default | @@ -81,6 +76,9 @@ Custom property | Description | Default | ||
81 | 76 | ||
82 | .header { | 77 | .header { |
83 | position: relative; | 78 | position: relative; |
79 | + border-top-left-radius: inherit; | ||
80 | + border-top-right-radius: inherit; | ||
81 | + overflow: hidden; | ||
84 | @apply(--paper-card-header); | 82 | @apply(--paper-card-header); |
85 | } | 83 | } |
86 | 84 | ||
@@ -118,8 +116,6 @@ Custom property | Description | Default | @@ -118,8 +116,6 @@ Custom property | Description | Default | ||
118 | } | 116 | } |
119 | </style> | 117 | </style> |
120 | 118 | ||
121 | - <paper-material animated$="[[animatedShadow]]" elevation="[[elevation]]"></paper-material> | ||
122 | - | ||
123 | <div class="header"> | 119 | <div class="header"> |
124 | <img hidden$="[[!image]]" src="[[image]]"> | 120 | <img hidden$="[[!image]]" src="[[image]]"> |
125 | <div hidden$="[[!heading]]" class$="[[_computeHeadingClass(image)]]">[[heading]]</div> | 121 | <div hidden$="[[!heading]]" class$="[[_computeHeadingClass(image)]]">[[heading]]</div> |
@@ -160,7 +156,8 @@ Custom property | Description | Default | @@ -160,7 +156,8 @@ Custom property | Description | Default | ||
160 | */ | 156 | */ |
161 | elevation: { | 157 | elevation: { |
162 | type: Number, | 158 | type: Number, |
163 | - value: 1 | 159 | + value: 1, |
160 | + reflectToAttribute: true | ||
164 | }, | 161 | }, |
165 | 162 | ||
166 | /** | 163 | /** |
@@ -170,6 +167,17 @@ Custom property | Description | Default | @@ -170,6 +167,17 @@ Custom property | Description | Default | ||
170 | animatedShadow: { | 167 | animatedShadow: { |
171 | type: Boolean, | 168 | type: Boolean, |
172 | value: false | 169 | value: false |
170 | + }, | ||
171 | + | ||
172 | + /** | ||
173 | + * Read-only property used to pass down the `animatedShadow` value to | ||
174 | + * the underlying paper-material style (since they have different names). | ||
175 | + */ | ||
176 | + animated: { | ||
177 | + type: Boolean, | ||
178 | + reflectToAttribute: true, | ||
179 | + readOnly: true, | ||
180 | + computed: '_computeAnimated(animatedShadow)' | ||
173 | } | 181 | } |
174 | }, | 182 | }, |
175 | 183 | ||
@@ -183,6 +191,10 @@ Custom property | Description | Default | @@ -183,6 +191,10 @@ Custom property | Description | Default | ||
183 | if (image) | 191 | if (image) |
184 | cls += ' over-image'; | 192 | cls += ' over-image'; |
185 | return cls; | 193 | return cls; |
194 | + }, | ||
195 | + | ||
196 | + _computeAnimated: function(animatedShadow) { | ||
197 | + return animatedShadow; | ||
186 | } | 198 | } |
187 | }); | 199 | }); |
188 | </script> | 200 | </script> |
bower_components/paper-checkbox/.bower.json
100644 → 100755
bower_components/paper-checkbox/.gitignore
100644 → 100755
bower_components/paper-checkbox/README.md
100644 → 100755
bower_components/paper-checkbox/bower.json
100644 → 100755
bower_components/paper-checkbox/demo/index.html
100644 → 100755
bower_components/paper-checkbox/index.html
100644 → 100755
bower_components/paper-checkbox/metadata.html
100644 → 100755
bower_components/paper-checkbox/paper-checkbox.css
0 → 100644
1 | +/* | ||
2 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
3 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
4 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
5 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
6 | +Code distributed by Google as part of the polymer project is also | ||
7 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
8 | +*/ | ||
9 | + | ||
10 | +:host { | ||
11 | + display: inline-block; | ||
12 | + white-space: nowrap; | ||
13 | +} | ||
14 | + | ||
15 | +:host(:focus) { | ||
16 | + outline: none; | ||
17 | +} | ||
18 | + | ||
19 | +.hidden { | ||
20 | + display: none; | ||
21 | +} | ||
22 | + | ||
23 | +#checkboxContainer { | ||
24 | + display: inline-block; | ||
25 | + position: relative; | ||
26 | + width: 18px; | ||
27 | + height: 18px; | ||
28 | + cursor: pointer; | ||
29 | + -webkit-transform: translateZ(0); | ||
30 | + transform: translateZ(0); | ||
31 | + vertical-align: middle; | ||
32 | + background-color: var(--paper-checkbox-unchecked-background-color, transparent); | ||
33 | +} | ||
34 | + | ||
35 | +:host #ink { | ||
36 | + position: absolute; | ||
37 | + top: -15px; | ||
38 | + left: -15px; | ||
39 | + width: 48px; | ||
40 | + height: 48px; | ||
41 | + color: var(--paper-checkbox-unchecked-ink-color, --primary-text-color); | ||
42 | + opacity: 0.6; | ||
43 | + pointer-events: none; | ||
44 | +} | ||
45 | + | ||
46 | +:host #ink[checked] { | ||
47 | + color: var(--paper-checkbox-checked-ink-color, --default-primary-color); | ||
48 | +} | ||
49 | + | ||
50 | +:host #checkbox { | ||
51 | + position: relative; | ||
52 | + box-sizing: border-box; | ||
53 | + height: 100%; | ||
54 | + border: solid 2px; | ||
55 | + border-color: var(--paper-checkbox-unchecked-color, --primary-text-color); | ||
56 | + border-radius: 2px; | ||
57 | + pointer-events: none; | ||
58 | + -webkit-transition: background-color 140ms, border-color 140ms; | ||
59 | + transition: background-color 140ms, border-color 140ms; | ||
60 | +} | ||
61 | + | ||
62 | +/* checkbox checked animations */ | ||
63 | +#checkbox.checked #checkmark { | ||
64 | + -webkit-animation: checkmark-expand 140ms ease-out forwards; | ||
65 | + animation: checkmark-expand 140ms ease-out forwards; | ||
66 | +} | ||
67 | + | ||
68 | +@-webkit-keyframes checkmark-expand { | ||
69 | + 0% { | ||
70 | + top: 9px; | ||
71 | + left: 6px; | ||
72 | + width: 0px; | ||
73 | + height: 0px; | ||
74 | + } | ||
75 | + 100% { | ||
76 | + top: -1px; | ||
77 | + left: 4px; | ||
78 | + width: 5px; | ||
79 | + height: 10px; | ||
80 | + } | ||
81 | +} | ||
82 | + | ||
83 | +@keyframes checkmark-expand { | ||
84 | + 0% { | ||
85 | + top: 9px; | ||
86 | + left: 6px; | ||
87 | + width: 0px; | ||
88 | + height: 0px; | ||
89 | + } | ||
90 | + 100% { | ||
91 | + top: -1px; | ||
92 | + left: 4px; | ||
93 | + width: 5px; | ||
94 | + height: 10px; | ||
95 | + } | ||
96 | +} | ||
97 | + | ||
98 | +:host #checkbox.checked { | ||
99 | + background-color: var(--paper-checkbox-checked-color, --default-primary-color); | ||
100 | + border-color: var(--paper-checkbox-checked-color, --default-primary-color); | ||
101 | +} | ||
102 | + | ||
103 | +:host #checkmark { | ||
104 | + -webkit-transform: rotate(45deg); | ||
105 | + transform: rotate(45deg); | ||
106 | + position: absolute; | ||
107 | + top: -1px; | ||
108 | + left: 4px; | ||
109 | + width: 5px; | ||
110 | + height: 10px; | ||
111 | + border-style: solid; | ||
112 | + border-top: none; | ||
113 | + border-left: none; | ||
114 | + border-right-width: 2px; | ||
115 | + border-bottom-width: 2px; | ||
116 | + border-color: var(--paper-checkbox-checkmark-color, white); | ||
117 | +} | ||
118 | + | ||
119 | +/* label */ | ||
120 | +#checkboxLabel { | ||
121 | + position: relative; | ||
122 | + display: inline-block; | ||
123 | + vertical-align: middle; | ||
124 | + padding-left: 8px; | ||
125 | + white-space: normal; | ||
126 | + pointer-events: none; | ||
127 | + color: var(--paper-checkbox-label-color, --primary-text-color); | ||
128 | +} | ||
129 | + | ||
130 | +#checkboxLabel[hidden] { | ||
131 | + display: none; | ||
132 | +} | ||
133 | + | ||
134 | +/* disabled state */ | ||
135 | +:host([disabled]) { | ||
136 | + pointer-events: none; | ||
137 | +} | ||
138 | + | ||
139 | +:host([disabled]) #checkbox { | ||
140 | + opacity: 0.5; | ||
141 | + border-color: var(--paper-checkbox-unchecked-color, --primary-text-color); | ||
142 | +} | ||
143 | + | ||
144 | +:host([disabled][checked]) #checkbox { | ||
145 | + background-color: var(--paper-checkbox-unchecked-color, --primary-text-color); | ||
146 | + opacity: 0.5; | ||
147 | +} | ||
148 | + | ||
149 | +:host([disabled]) #checkboxLabel { | ||
150 | + opacity: 0.65; | ||
151 | +} |
bower_components/paper-checkbox/paper-checkbox.html
100644 → 100755
bower_components/paper-checkbox/test/basic.html
100644 → 100755
bower_components/paper-checkbox/test/index.html
100644 → 100755
bower_components/paper-dropdown-menu/.bower.json
100644 → 100755
bower_components/paper-dropdown-menu/.gitignore
100644 → 100755
bower_components/paper-dropdown-menu/README.md
100644 → 100755
bower_components/paper-dropdown-menu/bower.json
100644 → 100755
bower_components/paper-dropdown-menu/demo/index.html
100644 → 100755
bower_components/paper-dropdown-menu/index.html
100644 → 100755
bower_components/paper-dropdown-menu/paper-dropdown-menu.html
100644 → 100755
bower_components/paper-dropdown-menu/test/index.html
100644 → 100755
bower_components/paper-dropdown-menu/test/paper-dropdown-menu.html
100644 → 100755
bower_components/paper-fab/.bower.json
100644 → 100755
bower_components/paper-fab/.gitignore
100644 → 100755
bower_components/paper-fab/README.md
100644 → 100755
bower_components/paper-fab/bower.json
100644 → 100755
bower_components/paper-fab/demo/index.html
100644 → 100755
bower_components/paper-fab/index.html
100644 → 100755
bower_components/paper-fab/paper-fab.html
100644 → 100755
bower_components/paper-fab/test/a11y.html
100644 → 100755
bower_components/paper-fab/test/basic.html
100644 → 100755
bower_components/paper-fab/test/index.html
100644 → 100755
bower_components/paper-icon-button/.bower.json
100644 → 100755
bower_components/paper-icon-button/.gitignore
100644 → 100755
bower_components/paper-icon-button/README.md
100644 → 100755
bower_components/paper-icon-button/bower.json
100644 → 100755
bower_components/paper-icon-button/demo/index.html
100644 → 100755
bower_components/paper-icon-button/index.html
100644 → 100755
bower_components/paper-icon-button/paper-icon-button.html
100644 → 100755
bower_components/paper-icon-button/test/a11y.html
100644 → 100755
bower_components/paper-icon-button/test/basic.html
100644 → 100755
bower_components/paper-icon-button/test/index.html
100644 → 100755
bower_components/paper-input/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "paper-input", | 2 | "name": "paper-input", |
3 | - "version": "1.0.16", | 3 | + "version": "1.0.18", |
4 | "description": "Material design text fields", | 4 | "description": "Material design text fields", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | "homepage": "https://github.com/PolymerElements/paper-input", | 27 | "homepage": "https://github.com/PolymerElements/paper-input", |
28 | "ignore": [], | 28 | "ignore": [], |
29 | "dependencies": { | 29 | "dependencies": { |
30 | - "polymer": "Polymer/polymer#^1.1.0", | 30 | + "polymer": "Polymer/polymer#^1.2.0", |
31 | "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0", | 31 | "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0", |
32 | "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", | 32 | "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", |
33 | "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", | 33 | "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", |
@@ -44,13 +44,13 @@ | @@ -44,13 +44,13 @@ | ||
44 | "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", | 44 | "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", |
45 | "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" | 45 | "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" |
46 | }, | 46 | }, |
47 | - "_release": "1.0.16", | 47 | + "_release": "1.0.18", |
48 | "_resolution": { | 48 | "_resolution": { |
49 | "type": "version", | 49 | "type": "version", |
50 | - "tag": "v1.0.16", | ||
51 | - "commit": "98a5b3a01ecfcdd85d9dccf6d3d708813fe1dfec" | 50 | + "tag": "v1.0.18", |
51 | + "commit": "8bb2b1972158d3a28ca3a350003b8ca78c147b53" | ||
52 | }, | 52 | }, |
53 | - "_source": "git://github.com/PolymerElements/paper-input.git", | ||
54 | - "_target": "^1.0.0", | ||
55 | - "_originalSource": "PolymerElements/paper-input" | 53 | + "_source": "git://github.com/polymerelements/paper-input.git", |
54 | + "_target": "^1.0.9", | ||
55 | + "_originalSource": "polymerelements/paper-input" | ||
56 | } | 56 | } |
57 | \ No newline at end of file | 57 | \ No newline at end of file |
bower_components/paper-input/.gitignore
100644 → 100755
bower_components/paper-input/README.md
100644 → 100755
bower_components/paper-input/all-imports.html
100644 → 100755
bower_components/paper-input/bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "paper-input", | 2 | "name": "paper-input", |
3 | - "version": "1.0.16", | 3 | + "version": "1.0.18", |
4 | "description": "Material design text fields", | 4 | "description": "Material design text fields", |
5 | "authors": [ | 5 | "authors": [ |
6 | "The Polymer Authors" | 6 | "The Polymer Authors" |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | "homepage": "https://github.com/PolymerElements/paper-input", | 27 | "homepage": "https://github.com/PolymerElements/paper-input", |
28 | "ignore": [], | 28 | "ignore": [], |
29 | "dependencies": { | 29 | "dependencies": { |
30 | - "polymer": "Polymer/polymer#^1.1.0", | 30 | + "polymer": "Polymer/polymer#^1.2.0", |
31 | "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0", | 31 | "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0", |
32 | "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", | 32 | "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", |
33 | "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", | 33 | "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0", |
bower_components/paper-input/demo/index.html
100644 → 100755
bower_components/paper-input/demo/ssn-input.html
100644 → 100755
bower_components/paper-input/demo/ssn-validator.html
100644 → 100755
bower_components/paper-input/index.html
100644 → 100755
bower_components/paper-input/paper-input-addon-behavior.html
100644 → 100755
bower_components/paper-input/paper-input-behavior.html
100644 → 100755
bower_components/paper-input/paper-input-char-counter.html
100644 → 100755
@@ -40,6 +40,10 @@ Custom property | Description | Default | @@ -40,6 +40,10 @@ Custom property | Description | Default | ||
40 | @apply(--paper-font-caption); | 40 | @apply(--paper-font-caption); |
41 | @apply(--paper-input-char-counter); | 41 | @apply(--paper-input-char-counter); |
42 | } | 42 | } |
43 | + | ||
44 | + :host-context([dir="rtl"]) { | ||
45 | + float: left; | ||
46 | + } | ||
43 | </style> | 47 | </style> |
44 | 48 | ||
45 | <span>[[_charCounterStr]]</span> | 49 | <span>[[_charCounterStr]]</span> |
bower_components/paper-input/paper-input-container.html
100644 → 100755
@@ -195,11 +195,12 @@ This element is `display:block` by default, but you can set the `inline` attribu | @@ -195,11 +195,12 @@ This element is `display:block` by default, but you can set the `inline` attribu | ||
195 | .input-content.label-is-floating ::content .paper-input-label { | 195 | .input-content.label-is-floating ::content .paper-input-label { |
196 | -webkit-transform: translateY(-75%) scale(0.75); | 196 | -webkit-transform: translateY(-75%) scale(0.75); |
197 | transform: translateY(-75%) scale(0.75); | 197 | transform: translateY(-75%) scale(0.75); |
198 | - -webkit-transform-origin: left top; | ||
199 | - transform-origin: left top; | ||
200 | -webkit-transition: -webkit-transform 0.25s; | 198 | -webkit-transition: -webkit-transform 0.25s; |
201 | transition: transform 0.25s; | 199 | transition: transform 0.25s; |
202 | 200 | ||
201 | + -webkit-transform-origin: left top; | ||
202 | + transform-origin: left top; | ||
203 | + | ||
203 | /* Since we scale to 75/100 of the size, we actually have 100/75 of the | 204 | /* Since we scale to 75/100 of the size, we actually have 100/75 of the |
204 | original space now available */ | 205 | original space now available */ |
205 | width: 133%; | 206 | width: 133%; |
@@ -207,6 +208,16 @@ This element is `display:block` by default, but you can set the `inline` attribu | @@ -207,6 +208,16 @@ This element is `display:block` by default, but you can set the `inline` attribu | ||
207 | @apply(--paper-transition-easing); | 208 | @apply(--paper-transition-easing); |
208 | } | 209 | } |
209 | 210 | ||
211 | + :host-context([dir="rtl"]) .input-content.label-is-floating ::content label, | ||
212 | + :host-context([dir="rtl"]) .input-content.label-is-floating ::content .paper-input-label { | ||
213 | + /* TODO(noms): Figure out why leaving the width at 133% before the animation | ||
214 | + * actually makes | ||
215 | + * it wider on the right side, not left side, as you would expect in RTL */ | ||
216 | + width: 100%; | ||
217 | + -webkit-transform-origin: right top; | ||
218 | + transform-origin: right top; | ||
219 | + } | ||
220 | + | ||
210 | .input-content.label-is-highlighted ::content label, | 221 | .input-content.label-is-highlighted ::content label, |
211 | .input-content.label-is-highlighted ::content .paper-input-label { | 222 | .input-content.label-is-highlighted ::content .paper-input-label { |
212 | color: var(--paper-input-container-focus-color, --default-primary-color); | 223 | color: var(--paper-input-container-focus-color, --default-primary-color); |
@@ -237,6 +248,7 @@ This element is `display:block` by default, but you can set the `inline` attribu | @@ -237,6 +248,7 @@ This element is `display:block` by default, but you can set the `inline` attribu | ||
237 | border: none; | 248 | border: none; |
238 | color: var(--paper-input-container-input-color, --primary-text-color); | 249 | color: var(--paper-input-container-input-color, --primary-text-color); |
239 | -webkit-appearance: none; | 250 | -webkit-appearance: none; |
251 | + text-align: inherit; | ||
240 | 252 | ||
241 | @apply(--paper-font-subhead); | 253 | @apply(--paper-font-subhead); |
242 | @apply(--paper-input-container-input); | 254 | @apply(--paper-input-container-input); |
@@ -261,6 +273,10 @@ This element is `display:block` by default, but you can set the `inline` attribu | @@ -261,6 +273,10 @@ This element is `display:block` by default, but you can set the `inline` attribu | ||
261 | resize: none; | 273 | resize: none; |
262 | } | 274 | } |
263 | 275 | ||
276 | + .add-on-content { | ||
277 | + position: relative; | ||
278 | + } | ||
279 | + | ||
264 | .add-on-content.is-invalid ::content * { | 280 | .add-on-content.is-invalid ::content * { |
265 | color: var(--paper-input-container-invalid-color, --google-red-500); | 281 | color: var(--paper-input-container-invalid-color, --google-red-500); |
266 | } | 282 | } |
@@ -276,7 +292,8 @@ This element is `display:block` by default, but you can set the `inline` attribu | @@ -276,7 +292,8 @@ This element is `display:block` by default, but you can set the `inline` attribu | ||
276 | 292 | ||
277 | <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]"> | 293 | <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]"> |
278 | <content select="[prefix]" id="prefix"></content> | 294 | <content select="[prefix]" id="prefix"></content> |
279 | - <div class="label-and-input-container"> | 295 | + |
296 | + <div class="label-and-input-container" id="labelAndInputContainer"> | ||
280 | <content select=":not([add-on]):not([prefix]):not([suffix])"></content> | 297 | <content select=":not([add-on]):not([prefix]):not([suffix])"></content> |
281 | </div> | 298 | </div> |
282 | <content select="[suffix]"></content> | 299 | <content select="[suffix]"></content> |
@@ -439,6 +456,21 @@ This element is `display:block` by default, but you can set the `inline` attribu | @@ -439,6 +456,21 @@ This element is `display:block` by default, but you can set the `inline` attribu | ||
439 | } else { | 456 | } else { |
440 | this._handleValue(this._inputElement); | 457 | this._handleValue(this._inputElement); |
441 | } | 458 | } |
459 | + | ||
460 | + this._numberOfPrefixNodes = 0; | ||
461 | + this._prefixObserver = Polymer.dom(this.$.prefix).observeNodes( | ||
462 | + function(mutations) { | ||
463 | + // Keep track whether there's at least one prefix node, since it | ||
464 | + // affects laying out the floating label. | ||
465 | + this._numberOfPrefixNodes += mutations.addedNodes.length - | ||
466 | + mutations.removedNodes.length; | ||
467 | + }.bind(this)); | ||
468 | + }, | ||
469 | + | ||
470 | + detached: function() { | ||
471 | + if (this._prefixObserver) { | ||
472 | + Polymer.dom(this.$.prefix).unobserveNodes(this._prefixObserver); | ||
473 | + } | ||
442 | }, | 474 | }, |
443 | 475 | ||
444 | _onAddonAttached: function(event) { | 476 | _onAddonAttached: function(event) { |
@@ -535,16 +567,15 @@ This element is `display:block` by default, but you can set the `inline` attribu | @@ -535,16 +567,15 @@ This element is `display:block` by default, but you can set the `inline` attribu | ||
535 | } else if (focused) { | 567 | } else if (focused) { |
536 | cls += " label-is-highlighted"; | 568 | cls += " label-is-highlighted"; |
537 | } | 569 | } |
538 | - // The label might have a horizontal offset if a prefix element exists | 570 | + // If a prefix element exists, the label has a horizontal offset |
539 | // which needs to be undone when displayed as a floating label. | 571 | // which needs to be undone when displayed as a floating label. |
540 | - if (Polymer.dom(this.$.prefix).getDistributedNodes().length > 0 && | ||
541 | - label && label.offsetParent) { | ||
542 | - label.style.left = -label.offsetParent.offsetLeft + 'px'; | 572 | + if (this._numberOfPrefixNodes > 0) { |
573 | + this.$.labelAndInputContainer.style.position = 'static'; | ||
543 | } | 574 | } |
544 | } else { | 575 | } else { |
545 | // When the label is not floating, it should overlap the input element. | 576 | // When the label is not floating, it should overlap the input element. |
546 | if (label) { | 577 | if (label) { |
547 | - label.style.left = 0; | 578 | + this.$.labelAndInputContainer.style.position = 'relative'; |
548 | } | 579 | } |
549 | } | 580 | } |
550 | } else { | 581 | } else { |
bower_components/paper-input/paper-input-error.html
100644 → 100755
@@ -43,6 +43,8 @@ Custom property | Description | Default | @@ -43,6 +43,8 @@ Custom property | Description | Default | ||
43 | @apply(--paper-font-caption); | 43 | @apply(--paper-font-caption); |
44 | @apply(--paper-input-error); | 44 | @apply(--paper-input-error); |
45 | position: absolute; | 45 | position: absolute; |
46 | + left:0; | ||
47 | + right:0; | ||
46 | } | 48 | } |
47 | 49 | ||
48 | :host([invalid]) { | 50 | :host([invalid]) { |
@@ -51,7 +53,7 @@ Custom property | Description | Default | @@ -51,7 +53,7 @@ Custom property | Description | Default | ||
51 | </style> | 53 | </style> |
52 | 54 | ||
53 | <content></content> | 55 | <content></content> |
54 | - | 56 | + |
55 | </template> | 57 | </template> |
56 | </dom-module> | 58 | </dom-module> |
57 | 59 |
bower_components/paper-input/paper-input.html
100644 → 100755
bower_components/paper-input/paper-textarea.html
100644 → 100755
bower_components/paper-input/test/index.html
100644 → 100755
bower_components/paper-input/test/letters-only.html
100644 → 100755
bower_components/paper-input/test/paper-input-char-counter.html
100644 → 100755
bower_components/paper-input/test/paper-input-container.html
100644 → 100755
bower_components/paper-input/test/paper-input-error.html
100644 → 100755
bower_components/paper-input/test/paper-input.html
100644 → 100755
bower_components/paper-input/test/paper-textarea.html
100644 → 100755
bower_components/paper-item/.bower.json
100644 → 100755
bower_components/paper-item/.gitignore
100644 → 100755
bower_components/paper-item/README.md
100644 → 100755
bower_components/paper-item/all-imports.html
100644 → 100755
bower_components/paper-item/bower.json
100644 → 100755
bower_components/paper-item/demo/index.html
100644 → 100755
bower_components/paper-item/index.html
100644 → 100755
bower_components/paper-item/paper-icon-item.html
100644 → 100755
bower_components/paper-item/paper-item-body.html
100644 → 100755
bower_components/paper-item/paper-item-shared-styles.html
100644 → 100755
bower_components/paper-item/paper-item-shared.css
0 → 100644
1 | +/* | ||
2 | + @license | ||
3 | + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
4 | + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
5 | + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
6 | + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
7 | + Code distributed by Google as part of the polymer project is also | ||
8 | + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
9 | +*/ | ||
10 | + | ||
11 | +:host { | ||
12 | + display: block; | ||
13 | + min-height: var(--paper-item-min-height, 48px); | ||
14 | + padding: 0px 16px; | ||
15 | +} | ||
16 | + | ||
17 | +:host > ::content > *:not(:first-child):not(:last-child) { | ||
18 | + margin-right: 16px; | ||
19 | +} |
bower_components/paper-item/paper-item.html
100644 → 100755
bower_components/paper-item/test/index.html
100644 → 100755
bower_components/paper-item/test/paper-item.html
100644 → 100755
bower_components/paper-material/.bower.json
100644 → 100755
bower_components/paper-material/.gitignore
100644 → 100755
bower_components/paper-material/README.md
100644 → 100755
bower_components/paper-material/bower.json
100644 → 100755
bower_components/paper-material/demo/index.html
100644 → 100755
bower_components/paper-material/index.html
100644 → 100755
bower_components/paper-material/paper-material.html
100644 → 100755
bower_components/paper-material/test/index.html
100644 → 100755
bower_components/paper-material/test/paper-material.html
100644 → 100755
bower_components/paper-menu-button/.bower.json
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | "tag": "v1.0.3", | 47 | "tag": "v1.0.3", |
48 | "commit": "24abacffd443f967125f5eae580eadc7b90f41c7" | 48 | "commit": "24abacffd443f967125f5eae580eadc7b90f41c7" |
49 | }, | 49 | }, |
50 | - "_source": "git://github.com/PolymerElements/paper-menu-button.git", | 50 | + "_source": "git://github.com/polymerelements/paper-menu-button.git", |
51 | "_target": "^1.0.0", | 51 | "_target": "^1.0.0", |
52 | - "_originalSource": "PolymerElements/paper-menu-button" | 52 | + "_originalSource": "polymerelements/paper-menu-button" |
53 | } | 53 | } |
54 | \ No newline at end of file | 54 | \ No newline at end of file |
bower_components/paper-radio-button/.bower.json
100644 → 100755
bower_components/paper-radio-button/.gitignore
100644 → 100755
bower_components/paper-radio-button/README.md
100644 → 100755
bower_components/paper-radio-button/bower.json
100644 → 100755
bower_components/paper-radio-button/demo/index.html
100644 → 100755
bower_components/paper-radio-button/index.html
100644 → 100755
bower_components/paper-radio-button/paper-radio-button.css
0 → 100644
1 | +/* | ||
2 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
3 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
4 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
5 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
6 | +Code distributed by Google as part of the polymer project is also | ||
7 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
8 | +*/ | ||
9 | + | ||
10 | +:host { | ||
11 | + display: inline-block; | ||
12 | + white-space: nowrap; | ||
13 | +} | ||
14 | + | ||
15 | +:host(:focus) { | ||
16 | + outline: none; | ||
17 | +} | ||
18 | + | ||
19 | +#radioContainer { | ||
20 | + display: inline-block; | ||
21 | + position: relative; | ||
22 | + width: 16px; | ||
23 | + height: 16px; | ||
24 | + cursor: pointer; | ||
25 | + vertical-align: middle; | ||
26 | +} | ||
27 | + | ||
28 | +:host #ink { | ||
29 | + position: absolute; | ||
30 | + top: -16px; | ||
31 | + left: -16px; | ||
32 | + width: 48px; | ||
33 | + height: 48px; | ||
34 | + color: var(--paper-radio-button-unchecked-ink-color, --primary-text-color); | ||
35 | + opacity: 0.6; | ||
36 | + pointer-events: none; | ||
37 | +} | ||
38 | + | ||
39 | +:host #ink[checked] { | ||
40 | + color: var(--paper-radio-button-checked-ink-color, --default-primary-color); | ||
41 | +} | ||
42 | + | ||
43 | +:host #offRadio { | ||
44 | + position: absolute; | ||
45 | + top: 0px; | ||
46 | + left: 0px; | ||
47 | + width: 12px; | ||
48 | + height: 12px; | ||
49 | + border-radius: 50%; | ||
50 | + border: solid 2px; | ||
51 | + background-color: var(--paper-radio-button-unchecked-background-color, transparent); | ||
52 | + border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); | ||
53 | + transition: border-color 0.28s; | ||
54 | +} | ||
55 | + | ||
56 | +:host #onRadio { | ||
57 | + position: absolute; | ||
58 | + top: 4px; | ||
59 | + left: 4px; | ||
60 | + width: 8px; | ||
61 | + height: 8px; | ||
62 | + border-radius: 50%; | ||
63 | + background-color: var(--paper-radio-button-checked-color, --default-primary-color); | ||
64 | + -webkit-transform: scale(0); | ||
65 | + transform: scale(0); | ||
66 | + transition: -webkit-transform ease 0.28s; | ||
67 | + transition: transform ease 0.28s; | ||
68 | +} | ||
69 | + | ||
70 | +:host([checked]) #offRadio { | ||
71 | + border-color: var(--paper-radio-button-checked-color, --default-primary-color); | ||
72 | +} | ||
73 | + | ||
74 | +:host([checked]) #onRadio { | ||
75 | + -webkit-transform: scale(1); | ||
76 | + transform: scale(1); | ||
77 | +} | ||
78 | + | ||
79 | +#radioLabel { | ||
80 | + position: relative; | ||
81 | + display: inline-block; | ||
82 | + vertical-align: middle; | ||
83 | + margin-left: 10px; | ||
84 | + white-space: normal; | ||
85 | + pointer-events: none; | ||
86 | + color: var(--paper-radio-button-label-color, --primary-text-color); | ||
87 | +} | ||
88 | + | ||
89 | +#radioLabel[hidden] { | ||
90 | + display: none; | ||
91 | +} | ||
92 | + | ||
93 | +/* disabled state */ | ||
94 | +:host([disabled]) { | ||
95 | + pointer-events: none; | ||
96 | +} | ||
97 | + | ||
98 | +:host([disabled]) #offRadio { | ||
99 | + border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); | ||
100 | + opacity: 0.5; | ||
101 | +} | ||
102 | + | ||
103 | +:host([disabled][checked]) #onRadio { | ||
104 | + background-color: var(--paper-radio-button-unchecked-color, --primary-text-color); | ||
105 | + opacity: 0.5; | ||
106 | +} | ||
107 | + | ||
108 | +:host([disabled]) #radioLabel { | ||
109 | + /* slightly darker than the button, so that it's readable */ | ||
110 | + opacity: 0.65; | ||
111 | +} |
bower_components/paper-radio-button/paper-radio-button.html
100644 → 100755
bower_components/paper-radio-button/test/basic.html
100644 → 100755
bower_components/paper-radio-button/test/index.html
100644 → 100755
bower_components/paper-radio-group/.bower.json
100644 → 100755
bower_components/paper-radio-group/.gitignore
100644 → 100755
bower_components/paper-radio-group/README.md
100644 → 100755
bower_components/paper-radio-group/bower.json
100644 → 100755
bower_components/paper-radio-group/demo/index.html
100644 → 100755
bower_components/paper-radio-group/index.html
100644 → 100755
bower_components/paper-radio-group/paper-radio-group.html
100644 → 100755
bower_components/paper-radio-group/test/basic.html
100644 → 100755
bower_components/paper-radio-group/test/index.html
100644 → 100755
bower_components/paper-ripple/.bower.json
100644 → 100755
bower_components/paper-ripple/.gitignore
100644 → 100755
bower_components/paper-ripple/README.md
100644 → 100755
bower_components/paper-ripple/bower.json
100644 → 100755
bower_components/paper-ripple/demo/index.html
100644 → 100755
bower_components/paper-ripple/index.html
100644 → 100755
bower_components/paper-ripple/paper-ripple.html
100644 → 100755
bower_components/paper-ripple/test/index.html
100644 → 100755
bower_components/paper-ripple/test/paper-ripple.html
100644 → 100755
bower_components/paper-slider/.bower.json
100644 → 100755
bower_components/paper-slider/.gitignore
100644 → 100755
bower_components/paper-slider/README.md
100644 → 100755
bower_components/paper-slider/bower.json
100644 → 100755
bower_components/paper-slider/demo/index.html
100644 → 100755
bower_components/paper-slider/index.html
100644 → 100755
bower_components/paper-slider/paper-slider.css
0 → 100644
1 | +/** | ||
2 | +@license | ||
3 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
4 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
5 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
6 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
7 | +Code distributed by Google as part of the polymer project is also | ||
8 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
9 | +*/ | ||
10 | + | ||
11 | +:host { | ||
12 | + display: inline-block; | ||
13 | + width: 200px; | ||
14 | + cursor: default; | ||
15 | + -webkit-user-select: none; | ||
16 | + -moz-user-select: none; | ||
17 | + -ms-user-select: none; | ||
18 | + user-select: none; | ||
19 | + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
20 | + --paper-progress-active-color: var(--paper-slider-active-color, --google-blue-700); | ||
21 | + --paper-progress-secondary-color: var(--paper-slider-secondary-color, --google-blue-300); | ||
22 | + --paper-progress-disabled-active-color: var(--paper-slider-disabled-active-color, --google-grey-500); | ||
23 | + --paper-progress-disabled-secondary-color: var(--paper-slider-disabled-secondary-color, --google-grey-300); | ||
24 | +} | ||
25 | + | ||
26 | +/* focus shows the ripple */ | ||
27 | +:host(:focus) { | ||
28 | + outline: none; | ||
29 | +} | ||
30 | + | ||
31 | +#sliderContainer { | ||
32 | + position: relative; | ||
33 | + width: calc(100% - 32px); | ||
34 | + height: 32px; | ||
35 | +} | ||
36 | + | ||
37 | +#sliderContainer.editable { | ||
38 | + float: left; | ||
39 | + width: calc(100% - 72px); | ||
40 | + margin: 12px 0; | ||
41 | +} | ||
42 | + | ||
43 | +.bar-container { | ||
44 | + position: absolute; | ||
45 | + top: 0; | ||
46 | + left: 16px; | ||
47 | + height: 100%; | ||
48 | + width: 100%; | ||
49 | + overflow: hidden; | ||
50 | +} | ||
51 | + | ||
52 | +.ring > .bar-container { | ||
53 | + left: 20px; | ||
54 | + width: calc(100% - 4px); | ||
55 | + transition: left 0.18s ease, width 0.18s ease; | ||
56 | +} | ||
57 | + | ||
58 | +.ring.expand:not(.pin) > .bar-container { | ||
59 | + left: 30px; | ||
60 | + width: calc(100% - 14px); | ||
61 | +} | ||
62 | + | ||
63 | +.ring.expand.dragging > .bar-container { | ||
64 | + transition: none; | ||
65 | +} | ||
66 | + | ||
67 | +#sliderBar { | ||
68 | + position: absolute; | ||
69 | + top: 15px; | ||
70 | + left: 0; | ||
71 | + width: 100%; | ||
72 | + padding: 8px 0; | ||
73 | + margin: -8px 0; | ||
74 | + background-color: var(--paper-slider-bar-color, transparent); | ||
75 | + --paper-progress-height: var(--paper-slider-height, 2px); | ||
76 | +} | ||
77 | + | ||
78 | +.ring #sliderBar { | ||
79 | + left: -4px; | ||
80 | + width: calc(100% + 4px); | ||
81 | +} | ||
82 | + | ||
83 | +.ring.expand:not(.pin) #sliderBar { | ||
84 | + left: -14px; | ||
85 | + width: calc(100% + 14px); | ||
86 | +} | ||
87 | + | ||
88 | +.slider-markers { | ||
89 | + position: absolute; | ||
90 | + top: 15px; | ||
91 | + left: 15px; | ||
92 | + height: 2px; | ||
93 | + width: calc(100% + 2px); | ||
94 | + box-sizing: border-box; | ||
95 | + pointer-events: none; | ||
96 | +} | ||
97 | + | ||
98 | +.slider-markers::after, | ||
99 | +.slider-marker::after { | ||
100 | + content: ""; | ||
101 | + display: block; | ||
102 | + width: 2px; | ||
103 | + height: 2px; | ||
104 | + border-radius: 50%; | ||
105 | + background-color: black; | ||
106 | +} | ||
107 | + | ||
108 | +#sliderKnob { | ||
109 | + @apply(--layout-center-justified); | ||
110 | + @apply(--layout-center); | ||
111 | + @apply(--layout-horizontal); | ||
112 | + | ||
113 | + position: absolute; | ||
114 | + left: 0; | ||
115 | + top: 0; | ||
116 | + width: 32px; | ||
117 | + height: 32px; | ||
118 | +} | ||
119 | + | ||
120 | +.transiting > #sliderKnob { | ||
121 | + transition: left 0.08s ease; | ||
122 | +} | ||
123 | + | ||
124 | +#sliderKnob:focus { | ||
125 | + outline: none; | ||
126 | +} | ||
127 | + | ||
128 | +#sliderKnob.dragging { | ||
129 | + transition: none; | ||
130 | +} | ||
131 | + | ||
132 | +.snaps > #sliderKnob.dragging { | ||
133 | + transition: -webkit-transform 0.08s ease; | ||
134 | + transition: transform 0.08s ease; | ||
135 | +} | ||
136 | + | ||
137 | +#sliderKnobInner { | ||
138 | + width: 12px; | ||
139 | + height: 12px; | ||
140 | + border-radius: 50%; | ||
141 | + background-color: var(--paper-slider-knob-color, --google-blue-700); | ||
142 | + | ||
143 | + -moz-box-sizing: border-box; | ||
144 | + box-sizing: border-box; | ||
145 | + | ||
146 | + transition-property: height, width, background-color, border; | ||
147 | + transition-duration: 0.1s; | ||
148 | + transition-timing-function: ease; | ||
149 | +} | ||
150 | + | ||
151 | +.expand:not(.pin) > #sliderKnob > #sliderKnobInner { | ||
152 | + width: 100%; | ||
153 | + height: 100%; | ||
154 | + | ||
155 | + -webkit-transform: translateZ(0); | ||
156 | + transform: translateZ(0); | ||
157 | +} | ||
158 | + | ||
159 | +.ring > #sliderKnob > #sliderKnobInner { | ||
160 | + background-color: var(--paper-slider-knob-start-color, transparent); | ||
161 | + border: 2px solid var(--paper-slider-knob-start-border-color, #c8c8c8); | ||
162 | +} | ||
163 | + | ||
164 | +#sliderKnobInner::before { | ||
165 | + background-color: var(--paper-slider-pin-color, --google-blue-700); | ||
166 | +} | ||
167 | + | ||
168 | +.pin > #sliderKnob > #sliderKnobInner::before { | ||
169 | + content: ""; | ||
170 | + position: absolute; | ||
171 | + top: 0; | ||
172 | + left: 0; | ||
173 | + width: 26px; | ||
174 | + height: 26px; | ||
175 | + margin-left: 3px; | ||
176 | + border-radius: 50% 50% 50% 0; | ||
177 | + | ||
178 | + -webkit-transform: rotate(-45deg) scale(0) translate(0); | ||
179 | + transform: rotate(-45deg) scale(0) translate(0); | ||
180 | +} | ||
181 | + | ||
182 | +#sliderKnobInner::before, | ||
183 | +#sliderKnobInner::after { | ||
184 | + transition: -webkit-transform .2s ease, background-color .18s ease; | ||
185 | + transition: transform .2s ease, background-color .18s ease; | ||
186 | +} | ||
187 | + | ||
188 | +.pin.ring > #sliderKnob > #sliderKnobInner::before { | ||
189 | + background-color: var(--paper-slider-pin-start-color, #c8c8c8); | ||
190 | +} | ||
191 | + | ||
192 | +.pin.expand > #sliderKnob > #sliderKnobInner::before { | ||
193 | + -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px); | ||
194 | + transform: rotate(-45deg) scale(1) translate(17px, -17px); | ||
195 | +} | ||
196 | + | ||
197 | +.pin > #sliderKnob > #sliderKnobInner::after { | ||
198 | + content: attr(value); | ||
199 | + position: absolute; | ||
200 | + top: 0; | ||
201 | + left: 0; | ||
202 | + width: 32px; | ||
203 | + height: 26px; | ||
204 | + text-align: center; | ||
205 | + color: var(--paper-slider-font-color, #fff); | ||
206 | + font-size: 10px; | ||
207 | + | ||
208 | + -webkit-transform: scale(0) translate(0); | ||
209 | + transform: scale(0) translate(0); | ||
210 | +} | ||
211 | + | ||
212 | +.pin.expand > #sliderKnob > #sliderKnobInner::after { | ||
213 | + -webkit-transform: scale(1) translate(0, -17px); | ||
214 | + transform: scale(1) translate(0, -17px); | ||
215 | +} | ||
216 | + | ||
217 | +/* editable: paper-input */ | ||
218 | +.slider-input { | ||
219 | + width: 40px; | ||
220 | + float: right; | ||
221 | + overflow: hidden; | ||
222 | +} | ||
223 | + | ||
224 | +.slider-input { | ||
225 | + --paper-input-container-input: { | ||
226 | + text-align: center; | ||
227 | + }; | ||
228 | +} | ||
229 | + | ||
230 | +/* disabled state */ | ||
231 | +#sliderContainer.disabled { | ||
232 | + pointer-events: none; | ||
233 | +} | ||
234 | + | ||
235 | +.disabled > #sliderKnob > #sliderKnobInner { | ||
236 | + width: 8px; | ||
237 | + height: 8px; | ||
238 | + background-color: var(--paper-slider-disabled-knob-color, --google-grey-500); | ||
239 | +} | ||
240 | + | ||
241 | +.disabled.ring > #sliderKnob > #sliderKnobInner { | ||
242 | + background-color: transparent; | ||
243 | +} | ||
244 | + | ||
245 | +paper-ripple { | ||
246 | + color: var(--paper-slider-knob-color, --google-blue-700); | ||
247 | +} |
bower_components/paper-slider/paper-slider.html
100644 → 100755
bower_components/paper-slider/test/a11y.html
100644 → 100755
bower_components/paper-slider/test/basic.html
100644 → 100755
bower_components/paper-slider/test/index.html
100644 → 100755
bower_components/paper-styles/.bower.json
100644 → 100755
@@ -36,6 +36,6 @@ | @@ -36,6 +36,6 @@ | ||
36 | "commit": "8ac5128a38249982982b3a1b3533d417d2dd7f18" | 36 | "commit": "8ac5128a38249982982b3a1b3533d417d2dd7f18" |
37 | }, | 37 | }, |
38 | "_source": "git://github.com/PolymerElements/paper-styles.git", | 38 | "_source": "git://github.com/PolymerElements/paper-styles.git", |
39 | - "_target": "^1.0.4", | 39 | + "_target": "^1.0.0", |
40 | "_originalSource": "PolymerElements/paper-styles" | 40 | "_originalSource": "PolymerElements/paper-styles" |
41 | } | 41 | } |
42 | \ No newline at end of file | 42 | \ No newline at end of file |
bower_components/paper-styles/README.md
100644 → 100755
bower_components/paper-styles/bower.json
100644 → 100755
bower_components/paper-styles/classes/global.html
100644 → 100755
bower_components/paper-styles/classes/shadow-layout.html
100644 → 100755
bower_components/paper-styles/classes/shadow.html
100644 → 100755
bower_components/paper-styles/classes/typography.html
100644 → 100755
bower_components/paper-styles/color.html
100644 → 100755
bower_components/paper-styles/default-theme.html
100644 → 100755
bower_components/paper-styles/demo-pages.html
100644 → 100755
bower_components/paper-styles/demo.css
100644 → 100755
bower_components/paper-styles/demo/index.html
100644 → 100755
bower_components/paper-styles/index.html
100644 → 100755
bower_components/paper-styles/paper-styles-classes.html
100644 → 100755
bower_components/paper-styles/paper-styles.html
100644 → 100755
bower_components/paper-styles/shadow.html
100644 → 100755
bower_components/paper-styles/typography.html
100644 → 100755
bower_components/paper-tabs/.bower.json
100644 → 100755
bower_components/paper-tabs/.gitignore
100644 → 100755
bower_components/paper-tabs/README.md
100644 → 100755
bower_components/paper-tabs/bower.json
100644 → 100755
bower_components/paper-tabs/demo/index.html
100644 → 100755
bower_components/paper-tabs/index.html
100644 → 100755
bower_components/paper-tabs/paper-tab.html
100644 → 100755
bower_components/paper-tabs/paper-tabs-icons.html
100644 → 100755
bower_components/paper-tabs/paper-tabs.html
100644 → 100755
bower_components/paper-tabs/test/attr-for-selected.html
100644 → 100755
bower_components/paper-tabs/test/basic.html
100644 → 100755
bower_components/paper-tabs/test/index.html
100644 → 100755
bower_components/paper-toggle-button/.bower.json
100644 → 100755
bower_components/paper-toggle-button/.gitignore
100644 → 100755
bower_components/paper-toggle-button/README.md
100644 → 100755
bower_components/paper-toggle-button/bower.json
100644 → 100755
bower_components/paper-toggle-button/demo/index.html
100644 → 100755
bower_components/paper-toggle-button/index.html
100644 → 100755
bower_components/paper-toggle-button/paper-toggle-button.css
0 → 100644
1 | +/* | ||
2 | +@license | ||
3 | +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
4 | +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
5 | +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
6 | +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
7 | +Code distributed by Google as part of the polymer project is also | ||
8 | +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
9 | +*/ | ||
10 | + | ||
11 | +:host { | ||
12 | + display: inline-block; | ||
13 | +} | ||
14 | + | ||
15 | +:host([disabled]) { | ||
16 | + pointer-events: none; | ||
17 | +} | ||
18 | + | ||
19 | +:host(:focus) { | ||
20 | + outline:none; | ||
21 | +} | ||
22 | + | ||
23 | +:host .toggle-bar { | ||
24 | + background-color: var(--paper-toggle-button-unchecked-bar-color, #000000); | ||
25 | +} | ||
26 | + | ||
27 | +:host .toggle-button { | ||
28 | + background-color: var(--paper-toggle-button-unchecked-button-color, --paper-grey-50); | ||
29 | +} | ||
30 | + | ||
31 | +:host([checked]) .toggle-bar { | ||
32 | + background-color: var(--paper-toggle-button-checked-bar-color, --google-green-500); | ||
33 | +} | ||
34 | + | ||
35 | +:host([checked]) .toggle-button { | ||
36 | + background-color: var(--paper-toggle-button-checked-button-color, --google-green-500); | ||
37 | +} | ||
38 | + | ||
39 | +:host .toggle-ink { | ||
40 | + color: var(--paper-toggle-button-unchecked-ink-color, --primary-text-color); | ||
41 | +} | ||
42 | + | ||
43 | +:host([checked]) .toggle-ink { | ||
44 | + color: var(--paper-toggle-button-checked-ink-color, --google-green-500); | ||
45 | +} | ||
46 | + | ||
47 | +/* ID selectors should not be overriden by users. */ | ||
48 | + | ||
49 | +#toggleContainer { | ||
50 | + position: relative; | ||
51 | + width: 36px; | ||
52 | + height: 14px; | ||
53 | +} | ||
54 | + | ||
55 | +#toggleBar { | ||
56 | + position: absolute; | ||
57 | + height: 100%; | ||
58 | + width: 100%; | ||
59 | + border-radius: 8px; | ||
60 | + pointer-events: none; | ||
61 | + opacity: 0.4; | ||
62 | + transition: background-color linear .08s; | ||
63 | +} | ||
64 | + | ||
65 | +:host([checked]) #toggleBar { | ||
66 | + opacity: 0.5; | ||
67 | +} | ||
68 | + | ||
69 | +:host([disabled]) #toggleBar { | ||
70 | + background-color: #000; | ||
71 | + opacity: 0.12; | ||
72 | +} | ||
73 | + | ||
74 | +#toggleButton { | ||
75 | + position: absolute; | ||
76 | + top: -3px; | ||
77 | + height: 20px; | ||
78 | + width: 20px; | ||
79 | + border-radius: 50%; | ||
80 | + box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6); | ||
81 | + transition: -webkit-transform linear .08s, background-color linear .08s; | ||
82 | + transition: transform linear .08s, background-color linear .08s; | ||
83 | + will-change: transform; | ||
84 | +} | ||
85 | + | ||
86 | +#toggleButton.dragging { | ||
87 | + -webkit-transition: none; | ||
88 | + transition: none; | ||
89 | +} | ||
90 | + | ||
91 | +:host([checked]) #toggleButton { | ||
92 | + -webkit-transform: translate(16px, 0); | ||
93 | + transform: translate(16px, 0); | ||
94 | +} | ||
95 | + | ||
96 | +:host([disabled]) #toggleButton { | ||
97 | + background-color: #bdbdbd; | ||
98 | + opacity: 1; | ||
99 | +} | ||
100 | + | ||
101 | +#ink { | ||
102 | + position: absolute; | ||
103 | + top: -14px; | ||
104 | + left: -14px; | ||
105 | + width: 48px; | ||
106 | + height: 48px; | ||
107 | + opacity: 0.5; | ||
108 | + pointer-events: none; | ||
109 | +} |
bower_components/paper-toggle-button/paper-toggle-button.html
100644 → 100755
bower_components/paper-toggle-button/test/basic.html
100644 → 100755
bower_components/paper-toggle-button/test/index.html
100644 → 100755
bower_components/paper-tooltip/.bower.json
100644 → 100755
bower_components/paper-tooltip/.gitignore
100644 → 100755
bower_components/paper-tooltip/README.md
100644 → 100755
bower_components/paper-tooltip/bower.json
100644 → 100755
bower_components/paper-tooltip/demo/index.html
100644 → 100755
bower_components/paper-tooltip/demo/test-button.html
100644 → 100755
bower_components/paper-tooltip/index.html
100644 → 100755
bower_components/paper-tooltip/paper-tooltip.html
100644 → 100755
bower_components/paper-tooltip/test/basic.html
100644 → 100755
bower_components/paper-tooltip/test/index.html
100644 → 100755
bower_components/paper-tooltip/test/test-button.html
100644 → 100755
bower_components/polymer/.bower.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "polymer", | 2 | "name": "polymer", |
3 | - "version": "1.1.5", | 3 | + "version": "1.2.0", |
4 | "main": [ | 4 | "main": [ |
5 | "polymer.html" | 5 | "polymer.html" |
6 | ], | 6 | ], |
@@ -25,11 +25,11 @@ | @@ -25,11 +25,11 @@ | ||
25 | }, | 25 | }, |
26 | "private": true, | 26 | "private": true, |
27 | "homepage": "https://github.com/Polymer/polymer", | 27 | "homepage": "https://github.com/Polymer/polymer", |
28 | - "_release": "1.1.5", | 28 | + "_release": "1.2.0", |
29 | "_resolution": { | 29 | "_resolution": { |
30 | "type": "version", | 30 | "type": "version", |
31 | - "tag": "v1.1.5", | ||
32 | - "commit": "4c94736fac6681e84ec8c00da53484c5d3c2226b" | 31 | + "tag": "v1.2.0", |
32 | + "commit": "84d211624cffd04d6894ec90713c2029732e8bb5" | ||
33 | }, | 33 | }, |
34 | "_source": "git://github.com/Polymer/polymer.git", | 34 | "_source": "git://github.com/Polymer/polymer.git", |
35 | "_target": "^1.0.0", | 35 | "_target": "^1.0.0", |
bower_components/polymer/LICENSE.txt
100644 → 100755
bower_components/polymer/bower.json
100644 → 100755
bower_components/polymer/build.log
100644 → 100755
1 | BUILD LOG | 1 | BUILD LOG |
2 | --------- | 2 | --------- |
3 | -Build Time: 2015-10-08T14:06:39-0700 | 3 | +Build Time: 2015-10-22T17:41:58-0700 |
4 | 4 | ||
5 | NODEJS INFORMATION | 5 | NODEJS INFORMATION |
6 | ================== | 6 | ================== |
7 | -nodejs: v4.1.2 | ||
8 | -del: 1.2.0 | ||
9 | -gulp-rename: 1.2.2 | 7 | +nodejs: v4.2.1 |
10 | gulp: 3.9.0 | 8 | gulp: 3.9.0 |
11 | gulp-audit: 1.0.0 | 9 | gulp-audit: 1.0.0 |
12 | -gulp-replace: 0.5.3 | 10 | +gulp-rename: 1.2.2 |
13 | gulp-vulcanize: 6.0.1 | 11 | gulp-vulcanize: 6.0.1 |
14 | polyclean: 1.2.0 | 12 | polyclean: 1.2.0 |
15 | lazypipe: 0.2.4 | 13 | lazypipe: 0.2.4 |
16 | -run-sequence: 1.1.1 | 14 | +run-sequence: 1.1.4 |
15 | +web-component-tester: 3.3.29 | ||
16 | +del: 1.2.1 | ||
17 | +gulp-replace: 0.5.4 | ||
17 | 18 | ||
18 | REPO REVISIONS | 19 | REPO REVISIONS |
19 | ============== | 20 | ============== |
20 | -polymer: 574855a644bcc25ee26c30e0dd881a395fad67b6 | 21 | +polymer: ec6b18f3e4ff414e6f3692b6641c7506c910546c |
21 | 22 | ||
22 | BUILD HASHES | 23 | BUILD HASHES |
23 | ============ | 24 | ============ |
24 | -polymer-mini.html: 72c032eacc45c63431054c111d0ce86357eb07f3 | ||
25 | -polymer-micro.html: 62d773e546d387df86bc1b33a3cb61c3c1c9bc76 | ||
26 | -polymer.html: 5c626b1aba3107c12cee378876d13b8780fdec67 | ||
27 | \ No newline at end of file | 25 | \ No newline at end of file |
26 | +polymer-mini.html: d807c77658cac260deb34187c1351be45b414679 | ||
27 | +polymer-micro.html: fe27c039dcd2aef07d2b9065ac30a5fd9448d887 | ||
28 | +polymer.html: cecea00d47a8682ec01d486a3ac0d45da51eaf24 | ||
28 | \ No newline at end of file | 29 | \ No newline at end of file |
bower_components/polymer/polymer-micro.html
100644 → 100755
@@ -264,7 +264,7 @@ document.registerElement('dom-module', DomModule); | @@ -264,7 +264,7 @@ document.registerElement('dom-module', DomModule); | ||
264 | function forceDocumentUpgrade() { | 264 | function forceDocumentUpgrade() { |
265 | if (cePolyfill) { | 265 | if (cePolyfill) { |
266 | var script = document._currentScript || document.currentScript; | 266 | var script = document._currentScript || document.currentScript; |
267 | -var doc = script && script.ownerDocument; | 267 | +var doc = script && script.ownerDocument || document; |
268 | if (doc) { | 268 | if (doc) { |
269 | CustomElements.upgradeAll(doc); | 269 | CustomElements.upgradeAll(doc); |
270 | } | 270 | } |
@@ -576,7 +576,7 @@ debouncer.stop(); | @@ -576,7 +576,7 @@ debouncer.stop(); | ||
576 | } | 576 | } |
577 | } | 577 | } |
578 | }); | 578 | }); |
579 | -Polymer.version = '1.1.5'; | 579 | +Polymer.version = '1.2.0'; |
580 | Polymer.Base._addFeature({ | 580 | Polymer.Base._addFeature({ |
581 | _registerFeatures: function () { | 581 | _registerFeatures: function () { |
582 | this._prepIs(); | 582 | this._prepIs(); |
bower_components/polymer/polymer-mini.html
100644 → 100755
@@ -270,61 +270,6 @@ return currentValue === previousValue; | @@ -270,61 +270,6 @@ return currentValue === previousValue; | ||
270 | }; | 270 | }; |
271 | return new ArraySplice(); | 271 | return new ArraySplice(); |
272 | }(); | 272 | }(); |
273 | -Polymer.EventApi = function () { | ||
274 | -var Settings = Polymer.Settings; | ||
275 | -var EventApi = function (event) { | ||
276 | -this.event = event; | ||
277 | -}; | ||
278 | -if (Settings.useShadow) { | ||
279 | -EventApi.prototype = { | ||
280 | -get rootTarget() { | ||
281 | -return this.event.path[0]; | ||
282 | -}, | ||
283 | -get localTarget() { | ||
284 | -return this.event.target; | ||
285 | -}, | ||
286 | -get path() { | ||
287 | -return this.event.path; | ||
288 | -} | ||
289 | -}; | ||
290 | -} else { | ||
291 | -EventApi.prototype = { | ||
292 | -get rootTarget() { | ||
293 | -return this.event.target; | ||
294 | -}, | ||
295 | -get localTarget() { | ||
296 | -var current = this.event.currentTarget; | ||
297 | -var currentRoot = current && Polymer.dom(current).getOwnerRoot(); | ||
298 | -var p$ = this.path; | ||
299 | -for (var i = 0; i < p$.length; i++) { | ||
300 | -if (Polymer.dom(p$[i]).getOwnerRoot() === currentRoot) { | ||
301 | -return p$[i]; | ||
302 | -} | ||
303 | -} | ||
304 | -}, | ||
305 | -get path() { | ||
306 | -if (!this.event._path) { | ||
307 | -var path = []; | ||
308 | -var o = this.rootTarget; | ||
309 | -while (o) { | ||
310 | -path.push(o); | ||
311 | -o = Polymer.dom(o).parentNode || o.host; | ||
312 | -} | ||
313 | -path.push(window); | ||
314 | -this.event._path = path; | ||
315 | -} | ||
316 | -return this.event._path; | ||
317 | -} | ||
318 | -}; | ||
319 | -} | ||
320 | -var factory = function (event) { | ||
321 | -if (!event.__eventApi) { | ||
322 | -event.__eventApi = new EventApi(event); | ||
323 | -} | ||
324 | -return event.__eventApi; | ||
325 | -}; | ||
326 | -return { factory: factory }; | ||
327 | -}(); | ||
328 | Polymer.domInnerHTML = function () { | 273 | Polymer.domInnerHTML = function () { |
329 | var escapeAttrRegExp = /[&\u00A0"]/g; | 274 | var escapeAttrRegExp = /[&\u00A0"]/g; |
330 | var escapeDataRegExp = /[&\u00A0<>]/g; | 275 | var escapeDataRegExp = /[&\u00A0<>]/g; |
@@ -463,7 +408,7 @@ insertBefore: function (node, ref_node) { | @@ -463,7 +408,7 @@ insertBefore: function (node, ref_node) { | ||
463 | return this._addNode(node, ref_node); | 408 | return this._addNode(node, ref_node); |
464 | }, | 409 | }, |
465 | _addNode: function (node, ref_node) { | 410 | _addNode: function (node, ref_node) { |
466 | -this._removeNodeFromHost(node, true); | 411 | +this._removeNodeFromParent(node); |
467 | var addedInsertionPoint; | 412 | var addedInsertionPoint; |
468 | var root = this.getOwnerRoot(); | 413 | var root = this.getOwnerRoot(); |
469 | if (root) { | 414 | if (root) { |
@@ -495,6 +440,7 @@ nativeAppendChild.call(container, node); | @@ -495,6 +440,7 @@ nativeAppendChild.call(container, node); | ||
495 | if (addedInsertionPoint) { | 440 | if (addedInsertionPoint) { |
496 | this._updateInsertionPoints(root.host); | 441 | this._updateInsertionPoints(root.host); |
497 | } | 442 | } |
443 | +this.notifyObserver(); | ||
498 | return node; | 444 | return node; |
499 | }, | 445 | }, |
500 | removeChild: function (node) { | 446 | removeChild: function (node) { |
@@ -509,6 +455,7 @@ removeFromComposedParent(container, node); | @@ -509,6 +455,7 @@ removeFromComposedParent(container, node); | ||
509 | nativeRemoveChild.call(container, node); | 455 | nativeRemoveChild.call(container, node); |
510 | } | 456 | } |
511 | } | 457 | } |
458 | +this.notifyObserver(); | ||
512 | return node; | 459 | return node; |
513 | }, | 460 | }, |
514 | replaceChild: function (node, ref_node) { | 461 | replaceChild: function (node, ref_node) { |
@@ -601,6 +548,13 @@ return Boolean(node._lightChildren !== undefined); | @@ -601,6 +548,13 @@ return Boolean(node._lightChildren !== undefined); | ||
601 | _parentNeedsDistribution: function (parent) { | 548 | _parentNeedsDistribution: function (parent) { |
602 | return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot); | 549 | return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot); |
603 | }, | 550 | }, |
551 | +_removeNodeFromParent: function (node) { | ||
552 | +var parent = node._lightParent || node.parentNode; | ||
553 | +if (parent && hasDomApi(parent)) { | ||
554 | +factory(parent).notifyObserver(); | ||
555 | +} | ||
556 | +this._removeNodeFromHost(node, true); | ||
557 | +}, | ||
604 | _removeNodeFromHost: function (node, ensureComposedRemoval) { | 558 | _removeNodeFromHost: function (node, ensureComposedRemoval) { |
605 | var hostNeedsDist; | 559 | var hostNeedsDist; |
606 | var root; | 560 | var root; |
@@ -612,7 +566,7 @@ if (root) { | @@ -612,7 +566,7 @@ if (root) { | ||
612 | root.host._elementRemove(node); | 566 | root.host._elementRemove(node); |
613 | hostNeedsDist = this._removeDistributedChildren(root, node); | 567 | hostNeedsDist = this._removeDistributedChildren(root, node); |
614 | } | 568 | } |
615 | -this._removeLogicalInfo(node, node._lightParent); | 569 | +this._removeLogicalInfo(node, parent); |
616 | } | 570 | } |
617 | this._removeOwnerShadyRoot(node); | 571 | this._removeOwnerShadyRoot(node); |
618 | if (root && hostNeedsDist) { | 572 | if (root && hostNeedsDist) { |
@@ -731,24 +685,29 @@ getDistributedNodes: function () { | @@ -731,24 +685,29 @@ getDistributedNodes: function () { | ||
731 | return this.node._distributedNodes || []; | 685 | return this.node._distributedNodes || []; |
732 | }, | 686 | }, |
733 | queryDistributedElements: function (selector) { | 687 | queryDistributedElements: function (selector) { |
734 | -var c$ = this.childNodes; | 688 | +var c$ = this.getEffectiveChildNodes(); |
735 | var list = []; | 689 | var list = []; |
736 | -this._distributedFilter(selector, c$, list); | ||
737 | for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) { | 690 | for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) { |
738 | -if (c.localName === CONTENT) { | ||
739 | -this._distributedFilter(selector, factory(c).getDistributedNodes(), list); | 691 | +if (c.nodeType === Node.ELEMENT_NODE && matchesSelector.call(c, selector)) { |
692 | +list.push(c); | ||
740 | } | 693 | } |
741 | } | 694 | } |
742 | return list; | 695 | return list; |
743 | }, | 696 | }, |
744 | -_distributedFilter: function (selector, list, results) { | ||
745 | -results = results || []; | ||
746 | -for (var i = 0, l = list.length, d; i < l && (d = list[i]); i++) { | ||
747 | -if (d.nodeType === Node.ELEMENT_NODE && d.localName !== CONTENT && matchesSelector.call(d, selector)) { | ||
748 | -results.push(d); | 697 | +getEffectiveChildNodes: function () { |
698 | +var list = []; | ||
699 | +var c$ = this.childNodes; | ||
700 | +for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) { | ||
701 | +if (c.localName === CONTENT) { | ||
702 | +var d$ = factory(c).getDistributedNodes(); | ||
703 | +for (var j = 0; j < d$.length; j++) { | ||
704 | +list.push(d$[j]); | ||
705 | +} | ||
706 | +} else { | ||
707 | +list.push(c); | ||
749 | } | 708 | } |
750 | } | 709 | } |
751 | -return results; | 710 | +return list; |
752 | }, | 711 | }, |
753 | _clear: function () { | 712 | _clear: function () { |
754 | while (this.childNodes.length) { | 713 | while (this.childNodes.length) { |
@@ -792,36 +751,24 @@ d.appendChild(nc); | @@ -792,36 +751,24 @@ d.appendChild(nc); | ||
792 | } | 751 | } |
793 | } | 752 | } |
794 | return n; | 753 | return n; |
754 | +}, | ||
755 | +observeNodes: function (callback) { | ||
756 | +if (callback) { | ||
757 | +if (!this.observer) { | ||
758 | +this.observer = this.node.localName === CONTENT ? new DomApi.DistributedNodesObserver(this) : new DomApi.EffectiveNodesObserver(this); | ||
795 | } | 759 | } |
796 | -}; | ||
797 | -Object.defineProperty(DomApi.prototype, 'classList', { | ||
798 | -get: function () { | ||
799 | -if (!this._classList) { | ||
800 | -this._classList = new DomApi.ClassList(this); | 760 | +return this.observer.addListener(callback); |
801 | } | 761 | } |
802 | -return this._classList; | ||
803 | -}, | ||
804 | -configurable: true | ||
805 | -}); | ||
806 | -DomApi.ClassList = function (host) { | ||
807 | -this.domApi = host; | ||
808 | -this.node = host.node; | ||
809 | -}; | ||
810 | -DomApi.ClassList.prototype = { | ||
811 | -add: function () { | ||
812 | -this.node.classList.add.apply(this.node.classList, arguments); | ||
813 | -this.domApi._distributeParent(); | ||
814 | -}, | ||
815 | -remove: function () { | ||
816 | -this.node.classList.remove.apply(this.node.classList, arguments); | ||
817 | -this.domApi._distributeParent(); | ||
818 | }, | 762 | }, |
819 | -toggle: function () { | ||
820 | -this.node.classList.toggle.apply(this.node.classList, arguments); | ||
821 | -this.domApi._distributeParent(); | 763 | +unobserveNodes: function (handle) { |
764 | +if (this.observer) { | ||
765 | +this.observer.removeListener(handle); | ||
766 | +} | ||
822 | }, | 767 | }, |
823 | -contains: function () { | ||
824 | -return this.node.classList.contains.apply(this.node.classList, arguments); | 768 | +notifyObserver: function () { |
769 | +if (this.observer) { | ||
770 | +this.observer.notify(); | ||
771 | +} | ||
825 | } | 772 | } |
826 | }; | 773 | }; |
827 | if (!Settings.useShadow) { | 774 | if (!Settings.useShadow) { |
@@ -1003,6 +950,17 @@ return n$ ? Array.prototype.slice.call(n$) : []; | @@ -1003,6 +950,17 @@ return n$ ? Array.prototype.slice.call(n$) : []; | ||
1003 | }; | 950 | }; |
1004 | DomApi.prototype._distributeParent = function () { | 951 | DomApi.prototype._distributeParent = function () { |
1005 | }; | 952 | }; |
953 | +var nativeForwards = [ | ||
954 | +'appendChild', | ||
955 | +'insertBefore', | ||
956 | +'removeChild', | ||
957 | +'replaceChild' | ||
958 | +]; | ||
959 | +nativeForwards.forEach(function (forward) { | ||
960 | +DomApi.prototype[forward] = function () { | ||
961 | +return this.node[forward].apply(this.node, arguments); | ||
962 | +}; | ||
963 | +}); | ||
1006 | Object.defineProperties(DomApi.prototype, { | 964 | Object.defineProperties(DomApi.prototype, { |
1007 | childNodes: { | 965 | childNodes: { |
1008 | get: function () { | 966 | get: function () { |
@@ -1056,13 +1014,17 @@ configurable: true | @@ -1056,13 +1014,17 @@ configurable: true | ||
1056 | }); | 1014 | }); |
1057 | } | 1015 | } |
1058 | var CONTENT = 'content'; | 1016 | var CONTENT = 'content'; |
1059 | -var factory = function (node, patch) { | 1017 | +function factory(node, patch) { |
1060 | node = node || document; | 1018 | node = node || document; |
1061 | if (!node.__domApi) { | 1019 | if (!node.__domApi) { |
1062 | node.__domApi = new DomApi(node, patch); | 1020 | node.__domApi = new DomApi(node, patch); |
1063 | } | 1021 | } |
1064 | return node.__domApi; | 1022 | return node.__domApi; |
1065 | -}; | 1023 | +} |
1024 | +; | ||
1025 | +function hasDomApi(node) { | ||
1026 | +return Boolean(node.__domApi); | ||
1027 | +} | ||
1066 | Polymer.dom = function (obj, patch) { | 1028 | Polymer.dom = function (obj, patch) { |
1067 | if (obj instanceof Event) { | 1029 | if (obj instanceof Event) { |
1068 | return Polymer.EventApi.factory(obj); | 1030 | return Polymer.EventApi.factory(obj); |
@@ -1070,43 +1032,6 @@ return Polymer.EventApi.factory(obj); | @@ -1070,43 +1032,6 @@ return Polymer.EventApi.factory(obj); | ||
1070 | return factory(obj, patch); | 1032 | return factory(obj, patch); |
1071 | } | 1033 | } |
1072 | }; | 1034 | }; |
1073 | -Polymer.Base.extend(Polymer.dom, { | ||
1074 | -_flushGuard: 0, | ||
1075 | -_FLUSH_MAX: 100, | ||
1076 | -_needsTakeRecords: !Polymer.Settings.useNativeCustomElements, | ||
1077 | -_debouncers: [], | ||
1078 | -_finishDebouncer: null, | ||
1079 | -flush: function () { | ||
1080 | -for (var i = 0; i < this._debouncers.length; i++) { | ||
1081 | -this._debouncers[i].complete(); | ||
1082 | -} | ||
1083 | -if (this._finishDebouncer) { | ||
1084 | -this._finishDebouncer.complete(); | ||
1085 | -} | ||
1086 | -this._flushPolyfills(); | ||
1087 | -if (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) { | ||
1088 | -this._flushGuard++; | ||
1089 | -this.flush(); | ||
1090 | -} else { | ||
1091 | -if (this._flushGuard >= this._FLUSH_MAX) { | ||
1092 | -console.warn('Polymer.dom.flush aborted. Flush may not be complete.'); | ||
1093 | -} | ||
1094 | -this._flushGuard = 0; | ||
1095 | -} | ||
1096 | -}, | ||
1097 | -_flushPolyfills: function () { | ||
1098 | -if (this._needsTakeRecords) { | ||
1099 | -CustomElements.takeRecords(); | ||
1100 | -} | ||
1101 | -}, | ||
1102 | -addDebouncer: function (debouncer) { | ||
1103 | -this._debouncers.push(debouncer); | ||
1104 | -this._finishDebouncer = Polymer.Debounce(this._finishDebouncer, this._finishFlush); | ||
1105 | -}, | ||
1106 | -_finishFlush: function () { | ||
1107 | -Polymer.dom._debouncers = []; | ||
1108 | -} | ||
1109 | -}); | ||
1110 | function getLightChildren(node) { | 1035 | function getLightChildren(node) { |
1111 | var children = node._lightChildren; | 1036 | var children = node._lightChildren; |
1112 | return children ? children : node.childNodes; | 1037 | return children ? children : node.childNodes; |
@@ -1170,10 +1095,399 @@ saveLightChildrenIfNeeded: saveLightChildrenIfNeeded, | @@ -1170,10 +1095,399 @@ saveLightChildrenIfNeeded: saveLightChildrenIfNeeded, | ||
1170 | matchesSelector: matchesSelector, | 1095 | matchesSelector: matchesSelector, |
1171 | hasInsertionPoint: hasInsertionPoint, | 1096 | hasInsertionPoint: hasInsertionPoint, |
1172 | ctor: DomApi, | 1097 | ctor: DomApi, |
1173 | -factory: factory | 1098 | +factory: factory, |
1099 | +hasDomApi: hasDomApi | ||
1100 | +}; | ||
1101 | +}(); | ||
1102 | +Polymer.Base.extend(Polymer.dom, { | ||
1103 | +_flushGuard: 0, | ||
1104 | +_FLUSH_MAX: 100, | ||
1105 | +_needsTakeRecords: !Polymer.Settings.useNativeCustomElements, | ||
1106 | +_debouncers: [], | ||
1107 | +_staticFlushList: [], | ||
1108 | +_finishDebouncer: null, | ||
1109 | +flush: function () { | ||
1110 | +this._flushGuard = 0; | ||
1111 | +this._prepareFlush(); | ||
1112 | +while (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) { | ||
1113 | +for (var i = 0; i < this._debouncers.length; i++) { | ||
1114 | +this._debouncers[i].complete(); | ||
1115 | +} | ||
1116 | +if (this._finishDebouncer) { | ||
1117 | +this._finishDebouncer.complete(); | ||
1118 | +} | ||
1119 | +this._prepareFlush(); | ||
1120 | +this._flushGuard++; | ||
1121 | +} | ||
1122 | +if (this._flushGuard >= this._FLUSH_MAX) { | ||
1123 | +console.warn('Polymer.dom.flush aborted. Flush may not be complete.'); | ||
1124 | +} | ||
1125 | +}, | ||
1126 | +_prepareFlush: function () { | ||
1127 | +if (this._needsTakeRecords) { | ||
1128 | +CustomElements.takeRecords(); | ||
1129 | +} | ||
1130 | +for (var i = 0; i < this._staticFlushList.length; i++) { | ||
1131 | +this._staticFlushList[i](); | ||
1132 | +} | ||
1133 | +}, | ||
1134 | +addStaticFlush: function (fn) { | ||
1135 | +this._staticFlushList.push(fn); | ||
1136 | +}, | ||
1137 | +removeStaticFlush: function (fn) { | ||
1138 | +var i = this._staticFlushList.indexOf(fn); | ||
1139 | +if (i >= 0) { | ||
1140 | +this._staticFlushList.splice(i, 1); | ||
1141 | +} | ||
1142 | +}, | ||
1143 | +addDebouncer: function (debouncer) { | ||
1144 | +this._debouncers.push(debouncer); | ||
1145 | +this._finishDebouncer = Polymer.Debounce(this._finishDebouncer, this._finishFlush); | ||
1146 | +}, | ||
1147 | +_finishFlush: function () { | ||
1148 | +Polymer.dom._debouncers = []; | ||
1149 | +} | ||
1150 | +}); | ||
1151 | +Polymer.EventApi = function () { | ||
1152 | +'use strict'; | ||
1153 | +var DomApi = Polymer.DomApi.ctor; | ||
1154 | +var Settings = Polymer.Settings; | ||
1155 | +DomApi.Event = function (event) { | ||
1156 | +this.event = event; | ||
1157 | +}; | ||
1158 | +if (Settings.useShadow) { | ||
1159 | +DomApi.Event.prototype = { | ||
1160 | +get rootTarget() { | ||
1161 | +return this.event.path[0]; | ||
1162 | +}, | ||
1163 | +get localTarget() { | ||
1164 | +return this.event.target; | ||
1165 | +}, | ||
1166 | +get path() { | ||
1167 | +return this.event.path; | ||
1168 | +} | ||
1169 | +}; | ||
1170 | +} else { | ||
1171 | +DomApi.Event.prototype = { | ||
1172 | +get rootTarget() { | ||
1173 | +return this.event.target; | ||
1174 | +}, | ||
1175 | +get localTarget() { | ||
1176 | +var current = this.event.currentTarget; | ||
1177 | +var currentRoot = current && Polymer.dom(current).getOwnerRoot(); | ||
1178 | +var p$ = this.path; | ||
1179 | +for (var i = 0; i < p$.length; i++) { | ||
1180 | +if (Polymer.dom(p$[i]).getOwnerRoot() === currentRoot) { | ||
1181 | +return p$[i]; | ||
1182 | +} | ||
1183 | +} | ||
1184 | +}, | ||
1185 | +get path() { | ||
1186 | +if (!this.event._path) { | ||
1187 | +var path = []; | ||
1188 | +var o = this.rootTarget; | ||
1189 | +while (o) { | ||
1190 | +path.push(o); | ||
1191 | +o = Polymer.dom(o).parentNode || o.host; | ||
1192 | +} | ||
1193 | +path.push(window); | ||
1194 | +this.event._path = path; | ||
1195 | +} | ||
1196 | +return this.event._path; | ||
1197 | +} | ||
1174 | }; | 1198 | }; |
1199 | +} | ||
1200 | +var factory = function (event) { | ||
1201 | +if (!event.__eventApi) { | ||
1202 | +event.__eventApi = new DomApi.Event(event); | ||
1203 | +} | ||
1204 | +return event.__eventApi; | ||
1205 | +}; | ||
1206 | +return { factory: factory }; | ||
1175 | }(); | 1207 | }(); |
1176 | (function () { | 1208 | (function () { |
1209 | +'use strict'; | ||
1210 | +var DomApi = Polymer.DomApi.ctor; | ||
1211 | +Object.defineProperty(DomApi.prototype, 'classList', { | ||
1212 | +get: function () { | ||
1213 | +if (!this._classList) { | ||
1214 | +this._classList = new DomApi.ClassList(this); | ||
1215 | +} | ||
1216 | +return this._classList; | ||
1217 | +}, | ||
1218 | +configurable: true | ||
1219 | +}); | ||
1220 | +DomApi.ClassList = function (host) { | ||
1221 | +this.domApi = host; | ||
1222 | +this.node = host.node; | ||
1223 | +}; | ||
1224 | +DomApi.ClassList.prototype = { | ||
1225 | +add: function () { | ||
1226 | +this.node.classList.add.apply(this.node.classList, arguments); | ||
1227 | +this.domApi._distributeParent(); | ||
1228 | +}, | ||
1229 | +remove: function () { | ||
1230 | +this.node.classList.remove.apply(this.node.classList, arguments); | ||
1231 | +this.domApi._distributeParent(); | ||
1232 | +}, | ||
1233 | +toggle: function () { | ||
1234 | +this.node.classList.toggle.apply(this.node.classList, arguments); | ||
1235 | +this.domApi._distributeParent(); | ||
1236 | +}, | ||
1237 | +contains: function () { | ||
1238 | +return this.node.classList.contains.apply(this.node.classList, arguments); | ||
1239 | +} | ||
1240 | +}; | ||
1241 | +}()); | ||
1242 | +(function () { | ||
1243 | +'use strict'; | ||
1244 | +var DomApi = Polymer.DomApi.ctor; | ||
1245 | +var Settings = Polymer.Settings; | ||
1246 | +var hasDomApi = Polymer.DomApi.hasDomApi; | ||
1247 | +DomApi.EffectiveNodesObserver = function (domApi) { | ||
1248 | +this.domApi = domApi; | ||
1249 | +this.node = this.domApi.node; | ||
1250 | +this._listeners = []; | ||
1251 | +}; | ||
1252 | +DomApi.EffectiveNodesObserver.prototype = { | ||
1253 | +addListener: function (callback) { | ||
1254 | +if (!this._isSetup) { | ||
1255 | +this._setup(); | ||
1256 | +this._isSetup = true; | ||
1257 | +} | ||
1258 | +var listener = { | ||
1259 | +fn: callback, | ||
1260 | +_nodes: [] | ||
1261 | +}; | ||
1262 | +this._listeners.push(listener); | ||
1263 | +this._scheduleNotify(); | ||
1264 | +return listener; | ||
1265 | +}, | ||
1266 | +removeListener: function (handle) { | ||
1267 | +var i = this._listeners.indexOf(handle); | ||
1268 | +if (i >= 0) { | ||
1269 | +this._listeners.splice(i, 1); | ||
1270 | +handle._nodes = []; | ||
1271 | +} | ||
1272 | +if (!this._hasListeners()) { | ||
1273 | +this._cleanup(); | ||
1274 | +this._isSetup = false; | ||
1275 | +} | ||
1276 | +}, | ||
1277 | +_setup: function () { | ||
1278 | +this._observeContentElements(this.domApi.childNodes); | ||
1279 | +}, | ||
1280 | +_cleanup: function () { | ||
1281 | +this._unobserveContentElements(this.domApi.childNodes); | ||
1282 | +}, | ||
1283 | +_hasListeners: function () { | ||
1284 | +return Boolean(this._listeners.length); | ||
1285 | +}, | ||
1286 | +_scheduleNotify: function () { | ||
1287 | +if (this._debouncer) { | ||
1288 | +this._debouncer.stop(); | ||
1289 | +} | ||
1290 | +this._debouncer = Polymer.Debounce(this._debouncer, this._notify); | ||
1291 | +this._debouncer.context = this; | ||
1292 | +Polymer.dom.addDebouncer(this._debouncer); | ||
1293 | +}, | ||
1294 | +notify: function () { | ||
1295 | +if (this._hasListeners()) { | ||
1296 | +this._scheduleNotify(); | ||
1297 | +} | ||
1298 | +}, | ||
1299 | +_notify: function (mxns) { | ||
1300 | +this._beforeCallListeners(); | ||
1301 | +this._callListeners(); | ||
1302 | +}, | ||
1303 | +_beforeCallListeners: function () { | ||
1304 | +this._updateContentElements(); | ||
1305 | +}, | ||
1306 | +_updateContentElements: function () { | ||
1307 | +this._observeContentElements(this.domApi.childNodes); | ||
1308 | +}, | ||
1309 | +_observeContentElements: function (elements) { | ||
1310 | +for (var i = 0, n; i < elements.length && (n = elements[i]); i++) { | ||
1311 | +if (this._isContent(n)) { | ||
1312 | +n.__observeNodesMap = n.__observeNodesMap || new WeakMap(); | ||
1313 | +if (!n.__observeNodesMap.has(this)) { | ||
1314 | +n.__observeNodesMap.set(this, this._observeContent(n)); | ||
1315 | +} | ||
1316 | +} | ||
1317 | +} | ||
1318 | +}, | ||
1319 | +_observeContent: function (content) { | ||
1320 | +var h = Polymer.dom(content).observeNodes(this._scheduleNotify.bind(this)); | ||
1321 | +h._avoidChangeCalculation = true; | ||
1322 | +return h; | ||
1323 | +}, | ||
1324 | +_unobserveContentElements: function (elements) { | ||
1325 | +for (var i = 0, n, h; i < elements.length && (n = elements[i]); i++) { | ||
1326 | +if (this._isContent(n)) { | ||
1327 | +h = n.__observeNodesMap.get(this); | ||
1328 | +if (h) { | ||
1329 | +Polymer.dom(n).unobserveNodes(h); | ||
1330 | +n.__observeNodesMap.delete(this); | ||
1331 | +} | ||
1332 | +} | ||
1333 | +} | ||
1334 | +}, | ||
1335 | +_isContent: function (node) { | ||
1336 | +return node.localName === 'content'; | ||
1337 | +}, | ||
1338 | +_callListeners: function () { | ||
1339 | +var o$ = this._listeners; | ||
1340 | +var nodes = this._getEffectiveNodes(); | ||
1341 | +for (var i = 0, o; i < o$.length && (o = o$[i]); i++) { | ||
1342 | +var info = this._generateListenerInfo(o, nodes); | ||
1343 | +if (info || o._alwaysNotify) { | ||
1344 | +this._callListener(o, info); | ||
1345 | +} | ||
1346 | +} | ||
1347 | +}, | ||
1348 | +_getEffectiveNodes: function () { | ||
1349 | +return this.domApi.getEffectiveChildNodes(); | ||
1350 | +}, | ||
1351 | +_generateListenerInfo: function (listener, newNodes) { | ||
1352 | +if (listener._avoidChangeCalculation) { | ||
1353 | +return true; | ||
1354 | +} | ||
1355 | +var oldNodes = listener._nodes; | ||
1356 | +var info = { | ||
1357 | +target: this.node, | ||
1358 | +addedNodes: [], | ||
1359 | +removedNodes: [] | ||
1360 | +}; | ||
1361 | +var splices = Polymer.ArraySplice.calculateSplices(newNodes, oldNodes); | ||
1362 | +for (var i = 0, s; i < splices.length && (s = splices[i]); i++) { | ||
1363 | +for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) { | ||
1364 | +info.removedNodes.push(n); | ||
1365 | +} | ||
1366 | +} | ||
1367 | +for (var i = 0, s; i < splices.length && (s = splices[i]); i++) { | ||
1368 | +for (var j = s.index; j < s.index + s.addedCount; j++) { | ||
1369 | +info.addedNodes.push(newNodes[j]); | ||
1370 | +} | ||
1371 | +} | ||
1372 | +listener._nodes = newNodes; | ||
1373 | +if (info.addedNodes.length || info.removedNodes.length) { | ||
1374 | +return info; | ||
1375 | +} | ||
1376 | +}, | ||
1377 | +_callListener: function (listener, info) { | ||
1378 | +return listener.fn.call(this.node, info); | ||
1379 | +}, | ||
1380 | +enableShadowAttributeTracking: function () { | ||
1381 | +} | ||
1382 | +}; | ||
1383 | +if (Settings.useShadow) { | ||
1384 | +var baseSetup = DomApi.EffectiveNodesObserver.prototype._setup; | ||
1385 | +var baseCleanup = DomApi.EffectiveNodesObserver.prototype._cleanup; | ||
1386 | +var beforeCallListeners = DomApi.EffectiveNodesObserver.prototype._beforeCallListeners; | ||
1387 | +Polymer.Base.extend(DomApi.EffectiveNodesObserver.prototype, { | ||
1388 | +_setup: function () { | ||
1389 | +if (!this._observer) { | ||
1390 | +var self = this; | ||
1391 | +this._mutationHandler = function (mxns) { | ||
1392 | +if (mxns && mxns.length) { | ||
1393 | +self._scheduleNotify(); | ||
1394 | +} | ||
1395 | +}; | ||
1396 | +this._observer = new MutationObserver(this._mutationHandler); | ||
1397 | +this._boundFlush = this._flush.bind(this); | ||
1398 | +Polymer.dom.addStaticFlush(this._boundFlush); | ||
1399 | +this._observer.observe(this.node, { childList: true }); | ||
1400 | +} | ||
1401 | +baseSetup.call(this); | ||
1402 | +}, | ||
1403 | +_cleanup: function () { | ||
1404 | +this._observer.disconnect(); | ||
1405 | +this._observer = null; | ||
1406 | +this._mutationHandler = null; | ||
1407 | +Polymer.dom.removeStaticFlush(this._boundFlush); | ||
1408 | +baseCleanup.call(this); | ||
1409 | +}, | ||
1410 | +_flush: function () { | ||
1411 | +if (this._observer) { | ||
1412 | +this._mutationHandler(this._observer.takeRecords()); | ||
1413 | +} | ||
1414 | +}, | ||
1415 | +enableShadowAttributeTracking: function () { | ||
1416 | +if (this._observer) { | ||
1417 | +this._makeContentListenersAlwaysNotify(); | ||
1418 | +this._observer.disconnect(); | ||
1419 | +this._observer.observe(this.node, { | ||
1420 | +childList: true, | ||
1421 | +attributes: true, | ||
1422 | +subtree: true | ||
1423 | +}); | ||
1424 | +var root = this.domApi.getOwnerRoot(); | ||
1425 | +var host = root && root.host; | ||
1426 | +if (host && Polymer.dom(host).observer) { | ||
1427 | +Polymer.dom(host).observer.enableShadowAttributeTracking(); | ||
1428 | +} | ||
1429 | +} | ||
1430 | +}, | ||
1431 | +_makeContentListenersAlwaysNotify: function () { | ||
1432 | +for (var i = 0, h; i < this._listeners.length; i++) { | ||
1433 | +h = this._listeners[i]; | ||
1434 | +h._alwaysNotify = h._isContentListener; | ||
1435 | +} | ||
1436 | +} | ||
1437 | +}); | ||
1438 | +} | ||
1439 | +}()); | ||
1440 | +(function () { | ||
1441 | +'use strict'; | ||
1442 | +var DomApi = Polymer.DomApi.ctor; | ||
1443 | +var Settings = Polymer.Settings; | ||
1444 | +DomApi.DistributedNodesObserver = function (domApi) { | ||
1445 | +DomApi.EffectiveNodesObserver.call(this, domApi); | ||
1446 | +}; | ||
1447 | +DomApi.DistributedNodesObserver.prototype = Object.create(DomApi.EffectiveNodesObserver.prototype); | ||
1448 | +Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype, { | ||
1449 | +_setup: function () { | ||
1450 | +}, | ||
1451 | +_cleanup: function () { | ||
1452 | +}, | ||
1453 | +_beforeCallListeners: function () { | ||
1454 | +}, | ||
1455 | +_getEffectiveNodes: function () { | ||
1456 | +return this.domApi.getDistributedNodes(); | ||
1457 | +} | ||
1458 | +}); | ||
1459 | +if (Settings.useShadow) { | ||
1460 | +Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype, { | ||
1461 | +_setup: function () { | ||
1462 | +if (!this._observer) { | ||
1463 | +var root = this.domApi.getOwnerRoot(); | ||
1464 | +var host = root && root.host; | ||
1465 | +if (host) { | ||
1466 | +this._observer = Polymer.dom(host).observeNodes(this._scheduleNotify.bind(this)); | ||
1467 | +this._observer._isContentListener = true; | ||
1468 | +if (this._hasAttrSelect()) { | ||
1469 | +Polymer.dom(host).observer.enableShadowAttributeTracking(); | ||
1470 | +} | ||
1471 | +} | ||
1472 | +} | ||
1473 | +}, | ||
1474 | +_hasAttrSelect: function () { | ||
1475 | +var select = this.node.getAttribute('select'); | ||
1476 | +return select && select.match(/[[.]+/); | ||
1477 | +}, | ||
1478 | +_cleanup: function () { | ||
1479 | +var root = this.domApi.getOwnerRoot(); | ||
1480 | +var host = root && root.host; | ||
1481 | +if (host) { | ||
1482 | +Polymer.dom(host).unobserveNodes(this._observer); | ||
1483 | +} | ||
1484 | +this._observer = null; | ||
1485 | +} | ||
1486 | +}); | ||
1487 | +} | ||
1488 | +}()); | ||
1489 | +(function () { | ||
1490 | +var hasDomApi = Polymer.DomApi.hasDomApi; | ||
1177 | Polymer.Base._addFeature({ | 1491 | Polymer.Base._addFeature({ |
1178 | _prepShady: function () { | 1492 | _prepShady: function () { |
1179 | this._useContent = this._useContent || Boolean(this._template); | 1493 | this._useContent = this._useContent || Boolean(this._template); |
@@ -1244,6 +1558,7 @@ if (this._useContent) { | @@ -1244,6 +1558,7 @@ if (this._useContent) { | ||
1244 | this.shadyRoot._distributionClean = true; | 1558 | this.shadyRoot._distributionClean = true; |
1245 | if (hasInsertionPoint(this.shadyRoot)) { | 1559 | if (hasInsertionPoint(this.shadyRoot)) { |
1246 | this._composeTree(); | 1560 | this._composeTree(); |
1561 | +notifyContentObservers(this.shadyRoot); | ||
1247 | } else { | 1562 | } else { |
1248 | if (!this.shadyRoot._hasDistributed) { | 1563 | if (!this.shadyRoot._hasDistributed) { |
1249 | this.textContent = ''; | 1564 | this.textContent = ''; |
@@ -1254,6 +1569,9 @@ var children = this._composeNode(this); | @@ -1254,6 +1569,9 @@ var children = this._composeNode(this); | ||
1254 | this._updateChildNodes(this, children); | 1569 | this._updateChildNodes(this, children); |
1255 | } | 1570 | } |
1256 | } | 1571 | } |
1572 | +if (!this.shadyRoot._hasDistributed) { | ||
1573 | +notifyInitialDistribution(this); | ||
1574 | +} | ||
1257 | this.shadyRoot._hasDistributed = true; | 1575 | this.shadyRoot._hasDistributed = true; |
1258 | } | 1576 | } |
1259 | }, | 1577 | }, |
@@ -1471,6 +1789,19 @@ return host.domHost; | @@ -1471,6 +1789,19 @@ return host.domHost; | ||
1471 | } | 1789 | } |
1472 | } | 1790 | } |
1473 | } | 1791 | } |
1792 | +function notifyContentObservers(root) { | ||
1793 | +for (var i = 0, c; i < root._insertionPoints.length; i++) { | ||
1794 | +c = root._insertionPoints[i]; | ||
1795 | +if (hasDomApi(c)) { | ||
1796 | +Polymer.dom(c).notifyObserver(); | ||
1797 | +} | ||
1798 | +} | ||
1799 | +} | ||
1800 | +function notifyInitialDistribution(host) { | ||
1801 | +if (hasDomApi(host)) { | ||
1802 | +Polymer.dom(host).notifyObserver(); | ||
1803 | +} | ||
1804 | +} | ||
1474 | var needsUpgrade = window.CustomElements && !CustomElements.useNative; | 1805 | var needsUpgrade = window.CustomElements && !CustomElements.useNative; |
1475 | function upgradeLightChildren(children) { | 1806 | function upgradeLightChildren(children) { |
1476 | if (needsUpgrade && children) { | 1807 | if (needsUpgrade && children) { |
bower_components/polymer/polymer.html
100644 → 100755
@@ -27,22 +27,66 @@ return list; | @@ -27,22 +27,66 @@ return list; | ||
27 | _parseNodeAnnotations: function (node, list) { | 27 | _parseNodeAnnotations: function (node, list) { |
28 | return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list); | 28 | return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list); |
29 | }, | 29 | }, |
30 | -_testEscape: function (value) { | ||
31 | -var escape = value.slice(0, 2); | ||
32 | -if (escape === '{{' || escape === '[[') { | ||
33 | -return escape; | 30 | +_bindingRegex: /([^{[]*)({{|\[\[)([^}\]]*)(?:]]|}})/g, |
31 | +_parseBindings: function (text) { | ||
32 | +var re = this._bindingRegex; | ||
33 | +var parts = []; | ||
34 | +var m, lastIndex; | ||
35 | +while ((m = re.exec(text)) !== null) { | ||
36 | +if (m[1]) { | ||
37 | +parts.push({ literal: m[1] }); | ||
38 | +} | ||
39 | +var mode = m[2][0]; | ||
40 | +var value = m[3].trim(); | ||
41 | +var negate = false; | ||
42 | +if (value[0] == '!') { | ||
43 | +negate = true; | ||
44 | +value = value.substring(1).trim(); | ||
45 | +} | ||
46 | +var customEvent, notifyEvent, colon; | ||
47 | +if (mode == '{' && (colon = value.indexOf('::')) > 0) { | ||
48 | +notifyEvent = value.substring(colon + 2); | ||
49 | +value = value.substring(0, colon); | ||
50 | +customEvent = true; | ||
51 | +} | ||
52 | +parts.push({ | ||
53 | +compoundIndex: parts.length, | ||
54 | +value: value, | ||
55 | +mode: mode, | ||
56 | +negate: negate, | ||
57 | +event: notifyEvent, | ||
58 | +customEvent: customEvent | ||
59 | +}); | ||
60 | +lastIndex = re.lastIndex; | ||
61 | +} | ||
62 | +if (lastIndex && lastIndex < text.length) { | ||
63 | +var literal = text.substring(lastIndex); | ||
64 | +if (literal) { | ||
65 | +parts.push({ literal: literal }); | ||
66 | +} | ||
67 | +} | ||
68 | +if (parts.length) { | ||
69 | +return parts; | ||
34 | } | 70 | } |
35 | }, | 71 | }, |
72 | +_literalFromParts: function (parts) { | ||
73 | +var s = ''; | ||
74 | +for (var i = 0; i < parts.length; i++) { | ||
75 | +var literal = parts[i].literal; | ||
76 | +s += literal || ''; | ||
77 | +} | ||
78 | +return s; | ||
79 | +}, | ||
36 | _parseTextNodeAnnotation: function (node, list) { | 80 | _parseTextNodeAnnotation: function (node, list) { |
37 | -var v = node.textContent; | ||
38 | -var escape = this._testEscape(v); | ||
39 | -if (escape) { | ||
40 | -node.textContent = ' '; | 81 | +var parts = this._parseBindings(node.textContent); |
82 | +if (parts) { | ||
83 | +node.textContent = this._literalFromParts(parts) || ' '; | ||
41 | var annote = { | 84 | var annote = { |
42 | bindings: [{ | 85 | bindings: [{ |
43 | kind: 'text', | 86 | kind: 'text', |
44 | -mode: escape[0], | ||
45 | -value: v.slice(2, -2).trim() | 87 | +name: 'textContent', |
88 | +parts: parts, | ||
89 | +isCompound: parts.length !== 1 | ||
46 | }] | 90 | }] |
47 | }; | 91 | }; |
48 | list.push(annote); | 92 | list.push(annote); |
@@ -104,62 +148,50 @@ index: index | @@ -104,62 +148,50 @@ index: index | ||
104 | }); | 148 | }); |
105 | }, | 149 | }, |
106 | _parseNodeAttributeAnnotations: function (node, annotation) { | 150 | _parseNodeAttributeAnnotations: function (node, annotation) { |
107 | -for (var i = node.attributes.length - 1, a; a = node.attributes[i]; i--) { | ||
108 | -var n = a.name, v = a.value; | ||
109 | -if (n === 'id' && !this._testEscape(v)) { | ||
110 | -annotation.id = v; | ||
111 | -} else if (n.slice(0, 3) === 'on-') { | 151 | +var attrs = Array.prototype.slice.call(node.attributes); |
152 | +for (var i = attrs.length - 1, a; a = attrs[i]; i--) { | ||
153 | +var n = a.name; | ||
154 | +var v = a.value; | ||
155 | +var b; | ||
156 | +if (n.slice(0, 3) === 'on-') { | ||
112 | node.removeAttribute(n); | 157 | node.removeAttribute(n); |
113 | annotation.events.push({ | 158 | annotation.events.push({ |
114 | name: n.slice(3), | 159 | name: n.slice(3), |
115 | value: v | 160 | value: v |
116 | }); | 161 | }); |
117 | -} else { | ||
118 | -var b = this._parseNodeAttributeAnnotation(node, n, v); | ||
119 | -if (b) { | 162 | +} else if (b = this._parseNodeAttributeAnnotation(node, n, v)) { |
120 | annotation.bindings.push(b); | 163 | annotation.bindings.push(b); |
121 | -} | 164 | +} else if (n === 'id') { |
165 | +annotation.id = v; | ||
122 | } | 166 | } |
123 | } | 167 | } |
124 | }, | 168 | }, |
125 | -_parseNodeAttributeAnnotation: function (node, n, v) { | ||
126 | -var escape = this._testEscape(v); | ||
127 | -if (escape) { | ||
128 | -var customEvent; | ||
129 | -var name = n; | ||
130 | -var mode = escape[0]; | ||
131 | -v = v.slice(2, -2).trim(); | ||
132 | -var not = false; | ||
133 | -if (v[0] == '!') { | ||
134 | -v = v.substring(1); | ||
135 | -not = true; | ||
136 | -} | 169 | +_parseNodeAttributeAnnotation: function (node, name, value) { |
170 | +var parts = this._parseBindings(value); | ||
171 | +if (parts) { | ||
172 | +var origName = name; | ||
137 | var kind = 'property'; | 173 | var kind = 'property'; |
138 | -if (n[n.length - 1] == '$') { | ||
139 | -name = n.slice(0, -1); | 174 | +if (name[name.length - 1] == '$') { |
175 | +name = name.slice(0, -1); | ||
140 | kind = 'attribute'; | 176 | kind = 'attribute'; |
141 | } | 177 | } |
142 | -var notifyEvent, colon; | ||
143 | -if (mode == '{' && (colon = v.indexOf('::')) > 0) { | ||
144 | -notifyEvent = v.substring(colon + 2); | ||
145 | -v = v.substring(0, colon); | ||
146 | -customEvent = true; | 178 | +var literal = this._literalFromParts(parts); |
179 | +if (literal && kind == 'attribute') { | ||
180 | +node.setAttribute(name, literal); | ||
147 | } | 181 | } |
148 | -if (node.localName == 'input' && n == 'value') { | ||
149 | -node.setAttribute(n, ''); | 182 | +if (node.localName == 'input' && name == 'value') { |
183 | +node.setAttribute(origName, ''); | ||
150 | } | 184 | } |
151 | -node.removeAttribute(n); | 185 | +node.removeAttribute(origName); |
152 | if (kind === 'property') { | 186 | if (kind === 'property') { |
153 | name = Polymer.CaseMap.dashToCamelCase(name); | 187 | name = Polymer.CaseMap.dashToCamelCase(name); |
154 | } | 188 | } |
155 | return { | 189 | return { |
156 | kind: kind, | 190 | kind: kind, |
157 | -mode: mode, | ||
158 | name: name, | 191 | name: name, |
159 | -value: v, | ||
160 | -negate: not, | ||
161 | -event: notifyEvent, | ||
162 | -customEvent: customEvent | 192 | +parts: parts, |
193 | +literal: literal, | ||
194 | +isCompound: parts.length !== 1 | ||
163 | }; | 195 | }; |
164 | } | 196 | } |
165 | }, | 197 | }, |
@@ -250,9 +282,14 @@ for (var i = 0; i < notes.length; i++) { | @@ -250,9 +282,14 @@ for (var i = 0; i < notes.length; i++) { | ||
250 | var note = notes[i]; | 282 | var note = notes[i]; |
251 | for (var j = 0; j < note.bindings.length; j++) { | 283 | for (var j = 0; j < note.bindings.length; j++) { |
252 | var b = note.bindings[j]; | 284 | var b = note.bindings[j]; |
253 | -b.signature = this._parseMethod(b.value); | ||
254 | -if (!b.signature) { | ||
255 | -b.model = this._modelForPath(b.value); | 285 | +for (var k = 0; k < b.parts.length; k++) { |
286 | +var p = b.parts[k]; | ||
287 | +if (!p.literal) { | ||
288 | +p.signature = this._parseMethod(p.value); | ||
289 | +if (!p.signature) { | ||
290 | +p.model = this._modelForPath(p.value); | ||
291 | +} | ||
292 | +} | ||
256 | } | 293 | } |
257 | } | 294 | } |
258 | if (note.templateContent) { | 295 | if (note.templateContent) { |
@@ -263,10 +300,12 @@ for (var prop in pp) { | @@ -263,10 +300,12 @@ for (var prop in pp) { | ||
263 | bindings.push({ | 300 | bindings.push({ |
264 | index: note.index, | 301 | index: note.index, |
265 | kind: 'property', | 302 | kind: 'property', |
266 | -mode: '{', | ||
267 | name: '_parent_' + prop, | 303 | name: '_parent_' + prop, |
304 | +parts: [{ | ||
305 | +mode: '{', | ||
268 | model: prop, | 306 | model: prop, |
269 | value: prop | 307 | value: prop |
308 | +}] | ||
270 | }); | 309 | }); |
271 | } | 310 | } |
272 | note.bindings = note.bindings.concat(bindings); | 311 | note.bindings = note.bindings.concat(bindings); |
@@ -277,15 +316,17 @@ _discoverTemplateParentProps: function (notes) { | @@ -277,15 +316,17 @@ _discoverTemplateParentProps: function (notes) { | ||
277 | var pp = {}; | 316 | var pp = {}; |
278 | notes.forEach(function (n) { | 317 | notes.forEach(function (n) { |
279 | n.bindings.forEach(function (b) { | 318 | n.bindings.forEach(function (b) { |
280 | -if (b.signature) { | ||
281 | -var args = b.signature.args; | 319 | +b.parts.forEach(function (p) { |
320 | +if (p.signature) { | ||
321 | +var args = p.signature.args; | ||
282 | for (var k = 0; k < args.length; k++) { | 322 | for (var k = 0; k < args.length; k++) { |
283 | pp[args[k].model] = true; | 323 | pp[args[k].model] = true; |
284 | } | 324 | } |
285 | } else { | 325 | } else { |
286 | -pp[b.model] = true; | 326 | +pp[p.model] = true; |
287 | } | 327 | } |
288 | }); | 328 | }); |
329 | +}); | ||
289 | if (n.templateContent) { | 330 | if (n.templateContent) { |
290 | var tpp = n.templateContent._parentProps; | 331 | var tpp = n.templateContent._parentProps; |
291 | Polymer.Base.mixin(pp, tpp); | 332 | Polymer.Base.mixin(pp, tpp); |
@@ -304,15 +345,43 @@ this._marshalAnnotatedNodes(); | @@ -304,15 +345,43 @@ this._marshalAnnotatedNodes(); | ||
304 | this._marshalAnnotatedListeners(); | 345 | this._marshalAnnotatedListeners(); |
305 | } | 346 | } |
306 | }, | 347 | }, |
307 | -_configureAnnotationReferences: function () { | ||
308 | -this._configureTemplateContent(); | 348 | +_configureAnnotationReferences: function (config) { |
349 | +var notes = this._notes; | ||
350 | +var nodes = this._nodes; | ||
351 | +for (var i = 0; i < notes.length; i++) { | ||
352 | +var note = notes[i]; | ||
353 | +var node = nodes[i]; | ||
354 | +this._configureTemplateContent(note, node); | ||
355 | +this._configureCompoundBindings(note, node); | ||
356 | +} | ||
309 | }, | 357 | }, |
310 | -_configureTemplateContent: function () { | ||
311 | -this._notes.forEach(function (note, i) { | 358 | +_configureTemplateContent: function (note, node) { |
312 | if (note.templateContent) { | 359 | if (note.templateContent) { |
313 | -this._nodes[i]._content = note.templateContent; | 360 | +node._content = note.templateContent; |
361 | +} | ||
362 | +}, | ||
363 | +_configureCompoundBindings: function (note, node) { | ||
364 | +var bindings = note.bindings; | ||
365 | +for (var i = 0; i < bindings.length; i++) { | ||
366 | +var binding = bindings[i]; | ||
367 | +if (binding.isCompound) { | ||
368 | +var storage = node.__compoundStorage__ || (node.__compoundStorage__ = {}); | ||
369 | +var parts = binding.parts; | ||
370 | +var literals = new Array(parts.length); | ||
371 | +for (var j = 0; j < parts.length; j++) { | ||
372 | +literals[j] = parts[j].literal; | ||
373 | +} | ||
374 | +var name = binding.name; | ||
375 | +storage[name] = literals; | ||
376 | +if (binding.literal && binding.kind == 'property') { | ||
377 | +if (node._configValue) { | ||
378 | +node._configValue(name, binding.literal); | ||
379 | +} else { | ||
380 | +node[name] = binding.literal; | ||
381 | +} | ||
382 | +} | ||
383 | +} | ||
314 | } | 384 | } |
315 | -}, this); | ||
316 | }, | 385 | }, |
317 | _marshalIdNodes: function () { | 386 | _marshalIdNodes: function () { |
318 | this.$ = {}; | 387 | this.$ = {}; |
@@ -1104,7 +1173,9 @@ this._callbacks.splice(0, len); | @@ -1104,7 +1173,9 @@ this._callbacks.splice(0, len); | ||
1104 | this._lastVal += len; | 1173 | this._lastVal += len; |
1105 | } | 1174 | } |
1106 | }; | 1175 | }; |
1107 | -new (window.MutationObserver || JsMutationObserver)(Polymer.Async._atEndOfMicrotask.bind(Polymer.Async)).observe(Polymer.Async._twiddle, { characterData: true }); | 1176 | +new window.MutationObserver(function () { |
1177 | +Polymer.Async._atEndOfMicrotask(); | ||
1178 | +}).observe(Polymer.Async._twiddle, { characterData: true }); | ||
1108 | Polymer.Debounce = function () { | 1179 | Polymer.Debounce = function () { |
1109 | var Async = Polymer.Async; | 1180 | var Async = Polymer.Async; |
1110 | var Debouncer = function (context) { | 1181 | var Debouncer = function (context) { |
@@ -1186,6 +1257,32 @@ if (toElement) { | @@ -1186,6 +1257,32 @@ if (toElement) { | ||
1186 | Polymer.dom(toElement).setAttribute(name, ''); | 1257 | Polymer.dom(toElement).setAttribute(name, ''); |
1187 | } | 1258 | } |
1188 | }, | 1259 | }, |
1260 | +getEffectiveChildNodes: function () { | ||
1261 | +return Polymer.dom(this).getEffectiveChildNodes(); | ||
1262 | +}, | ||
1263 | +getEffectiveChildren: function () { | ||
1264 | +var list = Polymer.dom(this).getEffectiveChildNodes(); | ||
1265 | +return list.filter(function (n) { | ||
1266 | +return n.nodeType === Node.ELEMENT_NODE; | ||
1267 | +}); | ||
1268 | +}, | ||
1269 | +getEffectiveTextContent: function () { | ||
1270 | +var cn = this.getEffectiveChildNodes(); | ||
1271 | +var tc = []; | ||
1272 | +for (var i = 0, c; c = cn[i]; i++) { | ||
1273 | +if (c.nodeType !== Node.COMMENT_NODE) { | ||
1274 | +tc.push(Polymer.dom(c).textContent); | ||
1275 | +} | ||
1276 | +} | ||
1277 | +return tc.join(''); | ||
1278 | +}, | ||
1279 | +queryEffectiveChildren: function (slctr) { | ||
1280 | +var e$ = Polymer.dom(this).queryDistributedElements(slctr); | ||
1281 | +return e$ && e$[0]; | ||
1282 | +}, | ||
1283 | +queryAllEffectiveChildren: function (slctr) { | ||
1284 | +return Polymer.dom(this).queryAllDistributedElements(slctr); | ||
1285 | +}, | ||
1189 | getContentChildNodes: function (slctr) { | 1286 | getContentChildNodes: function (slctr) { |
1190 | var content = Polymer.dom(this.root).querySelector(slctr || 'content'); | 1287 | var content = Polymer.dom(this.root).querySelector(slctr || 'content'); |
1191 | return content ? Polymer.dom(content).getDistributedNodes() : []; | 1288 | return content ? Polymer.dom(content).getDistributedNodes() : []; |
@@ -1223,7 +1320,7 @@ if (index >= 0) { | @@ -1223,7 +1320,7 @@ if (index >= 0) { | ||
1223 | return path.splice(index, 1); | 1320 | return path.splice(index, 1); |
1224 | } | 1321 | } |
1225 | } else { | 1322 | } else { |
1226 | -var arr = this.get(path); | 1323 | +var arr = this._get(path); |
1227 | index = arr.indexOf(item); | 1324 | index = arr.indexOf(item); |
1228 | if (index >= 0) { | 1325 | if (index >= 0) { |
1229 | return this.splice(path, index, 1); | 1326 | return this.splice(path, index, 1); |
@@ -1405,7 +1502,7 @@ _notedListenerFactory: function (property, path, isStructured, bogusTest) { | @@ -1405,7 +1502,7 @@ _notedListenerFactory: function (property, path, isStructured, bogusTest) { | ||
1405 | return function (e, target) { | 1502 | return function (e, target) { |
1406 | if (!bogusTest(e, target)) { | 1503 | if (!bogusTest(e, target)) { |
1407 | if (e.detail && e.detail.path) { | 1504 | if (e.detail && e.detail.path) { |
1408 | -this.notifyPath(this._fixPath(path, property, e.detail.path), e.detail.value); | 1505 | +this._notifyPath(this._fixPath(path, property, e.detail.path), e.detail.value); |
1409 | } else { | 1506 | } else { |
1410 | var value = target[property]; | 1507 | var value = target[property]; |
1411 | if (!isStructured) { | 1508 | if (!isStructured) { |
@@ -1431,16 +1528,16 @@ node.addEventListener(info.event, inst._notifyListener.bind(inst, info.changedFn | @@ -1431,16 +1528,16 @@ node.addEventListener(info.event, inst._notifyListener.bind(inst, info.changedFn | ||
1431 | }; | 1528 | }; |
1432 | Polymer.Base.extend(Polymer.Bind, { | 1529 | Polymer.Base.extend(Polymer.Bind, { |
1433 | _shouldAddListener: function (effect) { | 1530 | _shouldAddListener: function (effect) { |
1434 | -return effect.name && effect.mode === '{' && !effect.negate && effect.kind != 'attribute'; | 1531 | +return effect.name && effect.kind != 'attribute' && effect.kind != 'text' && !effect.isCompound && effect.parts[0].mode === '{' && !effect.parts[0].negate; |
1435 | }, | 1532 | }, |
1436 | _annotationEffect: function (source, value, effect) { | 1533 | _annotationEffect: function (source, value, effect) { |
1437 | if (source != effect.value) { | 1534 | if (source != effect.value) { |
1438 | -value = this.get(effect.value); | 1535 | +value = this._get(effect.value); |
1439 | this.__data__[effect.value] = value; | 1536 | this.__data__[effect.value] = value; |
1440 | } | 1537 | } |
1441 | var calc = effect.negate ? !value : value; | 1538 | var calc = effect.negate ? !value : value; |
1442 | if (!effect.customEvent || this._nodes[effect.index][effect.name] !== calc) { | 1539 | if (!effect.customEvent || this._nodes[effect.index][effect.name] !== calc) { |
1443 | -return this._applyEffectValue(calc, effect); | 1540 | +return this._applyEffectValue(effect, calc); |
1444 | } | 1541 | } |
1445 | }, | 1542 | }, |
1446 | _reflectEffect: function (source) { | 1543 | _reflectEffect: function (source) { |
@@ -1478,7 +1575,7 @@ var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value); | @@ -1478,7 +1575,7 @@ var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value); | ||
1478 | if (args) { | 1575 | if (args) { |
1479 | var fn = this[effect.method]; | 1576 | var fn = this[effect.method]; |
1480 | if (fn) { | 1577 | if (fn) { |
1481 | -this.__setProperty(effect.property, fn.apply(this, args)); | 1578 | +this.__setProperty(effect.name, fn.apply(this, args)); |
1482 | } else { | 1579 | } else { |
1483 | this._warn(this._logf('_computeEffect', 'compute method `' + effect.method + '` not defined')); | 1580 | this._warn(this._logf('_computeEffect', 'compute method `' + effect.method + '` not defined')); |
1484 | } | 1581 | } |
@@ -1494,7 +1591,7 @@ var computedvalue = fn.apply(computedHost, args); | @@ -1494,7 +1591,7 @@ var computedvalue = fn.apply(computedHost, args); | ||
1494 | if (effect.negate) { | 1591 | if (effect.negate) { |
1495 | computedvalue = !computedvalue; | 1592 | computedvalue = !computedvalue; |
1496 | } | 1593 | } |
1497 | -this._applyEffectValue(computedvalue, effect); | 1594 | +this._applyEffectValue(effect, computedvalue); |
1498 | } | 1595 | } |
1499 | } else { | 1596 | } else { |
1500 | computedHost._warn(computedHost._logf('_annotatedComputationEffect', 'compute method `' + effect.method + '` not defined')); | 1597 | computedHost._warn(computedHost._logf('_annotatedComputationEffect', 'compute method `' + effect.method + '` not defined')); |
@@ -1510,7 +1607,7 @@ var v; | @@ -1510,7 +1607,7 @@ var v; | ||
1510 | if (arg.literal) { | 1607 | if (arg.literal) { |
1511 | v = arg.value; | 1608 | v = arg.value; |
1512 | } else if (arg.structured) { | 1609 | } else if (arg.structured) { |
1513 | -v = Polymer.Base.get(name, model); | 1610 | +v = Polymer.Base._get(name, model); |
1514 | } else { | 1611 | } else { |
1515 | v = model[name]; | 1612 | v = model[name]; |
1516 | } | 1613 | } |
@@ -1573,7 +1670,7 @@ this._addPropertyEffect(arg.model, 'compute', { | @@ -1573,7 +1670,7 @@ this._addPropertyEffect(arg.model, 'compute', { | ||
1573 | method: sig.method, | 1670 | method: sig.method, |
1574 | args: sig.args, | 1671 | args: sig.args, |
1575 | trigger: arg, | 1672 | trigger: arg, |
1576 | -property: name | 1673 | +name: name |
1577 | }); | 1674 | }); |
1578 | }, this); | 1675 | }, this); |
1579 | }, | 1676 | }, |
@@ -1611,35 +1708,49 @@ this._addAnnotationEffect(binding, index); | @@ -1611,35 +1708,49 @@ this._addAnnotationEffect(binding, index); | ||
1611 | }, | 1708 | }, |
1612 | _addAnnotationEffect: function (note, index) { | 1709 | _addAnnotationEffect: function (note, index) { |
1613 | if (Polymer.Bind._shouldAddListener(note)) { | 1710 | if (Polymer.Bind._shouldAddListener(note)) { |
1614 | -Polymer.Bind._addAnnotatedListener(this, index, note.name, note.value, note.event); | 1711 | +Polymer.Bind._addAnnotatedListener(this, index, note.name, note.parts[0].value, note.parts[0].event); |
1712 | +} | ||
1713 | +for (var i = 0; i < note.parts.length; i++) { | ||
1714 | +var part = note.parts[i]; | ||
1715 | +if (part.signature) { | ||
1716 | +this._addAnnotatedComputationEffect(note, part, index); | ||
1717 | +} else if (!part.literal) { | ||
1718 | +this._addPropertyEffect(part.model, 'annotation', { | ||
1719 | +kind: note.kind, | ||
1720 | +index: index, | ||
1721 | +name: note.name, | ||
1722 | +value: part.value, | ||
1723 | +isCompound: note.isCompound, | ||
1724 | +compoundIndex: part.compoundIndex, | ||
1725 | +event: part.event, | ||
1726 | +customEvent: part.customEvent, | ||
1727 | +negate: part.negate | ||
1728 | +}); | ||
1615 | } | 1729 | } |
1616 | -if (note.signature) { | ||
1617 | -this._addAnnotatedComputationEffect(note, index); | ||
1618 | -} else { | ||
1619 | -note.index = index; | ||
1620 | -this._addPropertyEffect(note.model, 'annotation', note); | ||
1621 | } | 1730 | } |
1622 | }, | 1731 | }, |
1623 | -_addAnnotatedComputationEffect: function (note, index) { | ||
1624 | -var sig = note.signature; | 1732 | +_addAnnotatedComputationEffect: function (note, part, index) { |
1733 | +var sig = part.signature; | ||
1625 | if (sig.static) { | 1734 | if (sig.static) { |
1626 | -this.__addAnnotatedComputationEffect('__static__', index, note, sig, null); | 1735 | +this.__addAnnotatedComputationEffect('__static__', index, note, part, null); |
1627 | } else { | 1736 | } else { |
1628 | sig.args.forEach(function (arg) { | 1737 | sig.args.forEach(function (arg) { |
1629 | if (!arg.literal) { | 1738 | if (!arg.literal) { |
1630 | -this.__addAnnotatedComputationEffect(arg.model, index, note, sig, arg); | 1739 | +this.__addAnnotatedComputationEffect(arg.model, index, note, part, arg); |
1631 | } | 1740 | } |
1632 | }, this); | 1741 | }, this); |
1633 | } | 1742 | } |
1634 | }, | 1743 | }, |
1635 | -__addAnnotatedComputationEffect: function (property, index, note, sig, trigger) { | 1744 | +__addAnnotatedComputationEffect: function (property, index, note, part, trigger) { |
1636 | this._addPropertyEffect(property, 'annotatedComputation', { | 1745 | this._addPropertyEffect(property, 'annotatedComputation', { |
1637 | index: index, | 1746 | index: index, |
1747 | +isCompound: note.isCompound, | ||
1748 | +compoundIndex: part.compoundIndex, | ||
1638 | kind: note.kind, | 1749 | kind: note.kind, |
1639 | -property: note.name, | ||
1640 | -negate: note.negate, | ||
1641 | -method: sig.method, | ||
1642 | -args: sig.args, | 1750 | +name: note.name, |
1751 | +negate: part.negate, | ||
1752 | +method: part.signature.method, | ||
1753 | +args: part.signature.args, | ||
1643 | trigger: trigger | 1754 | trigger: trigger |
1644 | }); | 1755 | }); |
1645 | }, | 1756 | }, |
@@ -1708,9 +1819,14 @@ _marshalInstanceEffects: function () { | @@ -1708,9 +1819,14 @@ _marshalInstanceEffects: function () { | ||
1708 | Polymer.Bind.prepareInstance(this); | 1819 | Polymer.Bind.prepareInstance(this); |
1709 | Polymer.Bind.setupBindListeners(this); | 1820 | Polymer.Bind.setupBindListeners(this); |
1710 | }, | 1821 | }, |
1711 | -_applyEffectValue: function (value, info) { | 1822 | +_applyEffectValue: function (info, value) { |
1712 | var node = this._nodes[info.index]; | 1823 | var node = this._nodes[info.index]; |
1713 | -var property = info.property || info.name || 'textContent'; | 1824 | +var property = info.name; |
1825 | +if (info.isCompound) { | ||
1826 | +var storage = node.__compoundStorage__[property]; | ||
1827 | +storage[info.compoundIndex] = value; | ||
1828 | +value = storage.join(''); | ||
1829 | +} | ||
1714 | if (info.kind == 'attribute') { | 1830 | if (info.kind == 'attribute') { |
1715 | this.serializeValueToAttribute(value, property, node); | 1831 | this.serializeValueToAttribute(value, property, node); |
1716 | } else { | 1832 | } else { |
@@ -1790,10 +1906,10 @@ for (var p in config) { | @@ -1790,10 +1906,10 @@ for (var p in config) { | ||
1790 | var fx = fx$[p]; | 1906 | var fx = fx$[p]; |
1791 | if (fx) { | 1907 | if (fx) { |
1792 | for (var i = 0, l = fx.length, x; i < l && (x = fx[i]); i++) { | 1908 | for (var i = 0, l = fx.length, x; i < l && (x = fx[i]); i++) { |
1793 | -if (x.kind === 'annotation') { | 1909 | +if (x.kind === 'annotation' && !x.isCompound) { |
1794 | var node = this._nodes[x.effect.index]; | 1910 | var node = this._nodes[x.effect.index]; |
1795 | if (node._configValue) { | 1911 | if (node._configValue) { |
1796 | -var value = p === x.effect.value ? config[p] : this.get(x.effect.value, config); | 1912 | +var value = p === x.effect.value ? config[p] : this._get(x.effect.value, config); |
1797 | node._configValue(x.effect.name, value); | 1913 | node._configValue(x.effect.name, value); |
1798 | } | 1914 | } |
1799 | } | 1915 | } |
@@ -1840,11 +1956,16 @@ this._handlers = []; | @@ -1840,11 +1956,16 @@ this._handlers = []; | ||
1840 | 'use strict'; | 1956 | 'use strict'; |
1841 | Polymer.Base._addFeature({ | 1957 | Polymer.Base._addFeature({ |
1842 | notifyPath: function (path, value, fromAbove) { | 1958 | notifyPath: function (path, value, fromAbove) { |
1959 | +var info = {}; | ||
1960 | +path = this._get(path, this, info); | ||
1961 | +this._notifyPath(info.path, value, fromAbove); | ||
1962 | +}, | ||
1963 | +_notifyPath: function (path, value, fromAbove) { | ||
1843 | var old = this._propertySetter(path, value); | 1964 | var old = this._propertySetter(path, value); |
1844 | if (old !== value && (old === old || value === value)) { | 1965 | if (old !== value && (old === old || value === value)) { |
1845 | this._pathEffector(path, value); | 1966 | this._pathEffector(path, value); |
1846 | if (!fromAbove) { | 1967 | if (!fromAbove) { |
1847 | -this._notifyPath(path, value); | 1968 | +this._notifyPathUp(path, value); |
1848 | } | 1969 | } |
1849 | return true; | 1970 | return true; |
1850 | } | 1971 | } |
@@ -1871,41 +1992,67 @@ var last = parts[parts.length - 1]; | @@ -1871,41 +1992,67 @@ var last = parts[parts.length - 1]; | ||
1871 | if (parts.length > 1) { | 1992 | if (parts.length > 1) { |
1872 | for (var i = 0; i < parts.length - 1; i++) { | 1993 | for (var i = 0; i < parts.length - 1; i++) { |
1873 | var part = parts[i]; | 1994 | var part = parts[i]; |
1995 | +if (array && part[0] == '#') { | ||
1996 | +prop = Polymer.Collection.get(array).getItem(part); | ||
1997 | +} else { | ||
1874 | prop = prop[part]; | 1998 | prop = prop[part]; |
1875 | -if (array && parseInt(part) == part) { | 1999 | +if (array && parseInt(part, 10) == part) { |
1876 | parts[i] = Polymer.Collection.get(array).getKey(prop); | 2000 | parts[i] = Polymer.Collection.get(array).getKey(prop); |
1877 | } | 2001 | } |
2002 | +} | ||
1878 | if (!prop) { | 2003 | if (!prop) { |
1879 | return; | 2004 | return; |
1880 | } | 2005 | } |
1881 | array = Array.isArray(prop) ? prop : null; | 2006 | array = Array.isArray(prop) ? prop : null; |
1882 | } | 2007 | } |
1883 | -if (array && parseInt(last) == last) { | 2008 | +if (array) { |
1884 | var coll = Polymer.Collection.get(array); | 2009 | var coll = Polymer.Collection.get(array); |
2010 | +if (last[0] == '#') { | ||
2011 | +var key = last; | ||
2012 | +var old = coll.getItem(key); | ||
2013 | +last = array.indexOf(old); | ||
2014 | +coll.setItem(key, value); | ||
2015 | +} else if (parseInt(last, 10) == last) { | ||
1885 | var old = prop[last]; | 2016 | var old = prop[last]; |
1886 | var key = coll.getKey(old); | 2017 | var key = coll.getKey(old); |
1887 | parts[i] = key; | 2018 | parts[i] = key; |
1888 | coll.setItem(key, value); | 2019 | coll.setItem(key, value); |
1889 | } | 2020 | } |
2021 | +} | ||
1890 | prop[last] = value; | 2022 | prop[last] = value; |
1891 | if (!root) { | 2023 | if (!root) { |
1892 | -this.notifyPath(parts.join('.'), value); | 2024 | +this._notifyPath(parts.join('.'), value); |
1893 | } | 2025 | } |
1894 | } else { | 2026 | } else { |
1895 | prop[path] = value; | 2027 | prop[path] = value; |
1896 | } | 2028 | } |
1897 | }, | 2029 | }, |
1898 | get: function (path, root) { | 2030 | get: function (path, root) { |
2031 | +return this._get(path, root); | ||
2032 | +}, | ||
2033 | +_get: function (path, root, info) { | ||
1899 | var prop = root || this; | 2034 | var prop = root || this; |
1900 | var parts = this._getPathParts(path); | 2035 | var parts = this._getPathParts(path); |
1901 | -var last = parts.pop(); | ||
1902 | -while (parts.length) { | ||
1903 | -prop = prop[parts.shift()]; | 2036 | +var array; |
2037 | +for (var i = 0; i < parts.length; i++) { | ||
1904 | if (!prop) { | 2038 | if (!prop) { |
1905 | return; | 2039 | return; |
1906 | } | 2040 | } |
2041 | +var part = parts[i]; | ||
2042 | +if (array && part[0] == '#') { | ||
2043 | +prop = Polymer.Collection.get(array).getItem(part); | ||
2044 | +} else { | ||
2045 | +prop = prop[part]; | ||
2046 | +if (info && array && parseInt(part, 10) == part) { | ||
2047 | +parts[i] = Polymer.Collection.get(array).getKey(prop); | ||
2048 | +} | ||
2049 | +} | ||
2050 | +array = Array.isArray(prop) ? prop : null; | ||
2051 | +} | ||
2052 | +if (info) { | ||
2053 | +info.path = parts.join('.'); | ||
1907 | } | 2054 | } |
1908 | -return prop[last]; | 2055 | +return prop; |
1909 | }, | 2056 | }, |
1910 | _pathEffector: function (path, value) { | 2057 | _pathEffector: function (path, value) { |
1911 | var model = this._modelForPath(path); | 2058 | var model = this._modelForPath(path); |
@@ -1978,7 +2125,7 @@ this.notifyPath(this._fixPath(a, b, path), value); | @@ -1978,7 +2125,7 @@ this.notifyPath(this._fixPath(a, b, path), value); | ||
1978 | _fixPath: function (property, root, path) { | 2125 | _fixPath: function (property, root, path) { |
1979 | return property + path.slice(root.length); | 2126 | return property + path.slice(root.length); |
1980 | }, | 2127 | }, |
1981 | -_notifyPath: function (path, value) { | 2128 | +_notifyPathUp: function (path, value) { |
1982 | var rootName = this._modelForPath(path); | 2129 | var rootName = this._modelForPath(path); |
1983 | var dashCaseName = Polymer.CaseMap.camelToDashCase(rootName); | 2130 | var dashCaseName = Polymer.CaseMap.camelToDashCase(rootName); |
1984 | var eventName = dashCaseName + this._EVENT_CHANGED; | 2131 | var eventName = dashCaseName + this._EVENT_CHANGED; |
@@ -1992,47 +2139,62 @@ var dot = path.indexOf('.'); | @@ -1992,47 +2139,62 @@ var dot = path.indexOf('.'); | ||
1992 | return dot < 0 ? path : path.slice(0, dot); | 2139 | return dot < 0 ? path : path.slice(0, dot); |
1993 | }, | 2140 | }, |
1994 | _EVENT_CHANGED: '-changed', | 2141 | _EVENT_CHANGED: '-changed', |
1995 | -_notifySplice: function (array, path, index, added, removed) { | ||
1996 | -var splices = [{ | ||
1997 | -index: index, | ||
1998 | -addedCount: added, | ||
1999 | -removed: removed, | ||
2000 | -object: array, | ||
2001 | -type: 'splice' | ||
2002 | -}]; | 2142 | +notifySplices: function (path, splices) { |
2143 | +var info = {}; | ||
2144 | +var array = this._get(path, this, info); | ||
2145 | +this._notifySplices(array, info.path, splices); | ||
2146 | +}, | ||
2147 | +_notifySplices: function (array, path, splices) { | ||
2003 | var change = { | 2148 | var change = { |
2004 | keySplices: Polymer.Collection.applySplices(array, splices), | 2149 | keySplices: Polymer.Collection.applySplices(array, splices), |
2005 | indexSplices: splices | 2150 | indexSplices: splices |
2006 | }; | 2151 | }; |
2007 | -this.set(path + '.splices', change); | ||
2008 | -if (added != removed.length) { | ||
2009 | -this.notifyPath(path + '.length', array.length); | 2152 | +if (!array.hasOwnProperty('splices')) { |
2153 | +Object.defineProperty(array, 'splices', { | ||
2154 | +configurable: true, | ||
2155 | +writable: true | ||
2156 | +}); | ||
2010 | } | 2157 | } |
2158 | +array.splices = change; | ||
2159 | +this._notifyPath(path + '.splices', change); | ||
2160 | +this._notifyPath(path + '.length', array.length); | ||
2011 | change.keySplices = null; | 2161 | change.keySplices = null; |
2012 | change.indexSplices = null; | 2162 | change.indexSplices = null; |
2013 | }, | 2163 | }, |
2164 | +_notifySplice: function (array, path, index, added, removed) { | ||
2165 | +this._notifySplices(array, path, [{ | ||
2166 | +index: index, | ||
2167 | +addedCount: added, | ||
2168 | +removed: removed, | ||
2169 | +object: array, | ||
2170 | +type: 'splice' | ||
2171 | +}]); | ||
2172 | +}, | ||
2014 | push: function (path) { | 2173 | push: function (path) { |
2015 | -var array = this.get(path); | 2174 | +var info = {}; |
2175 | +var array = this._get(path, this, info); | ||
2016 | var args = Array.prototype.slice.call(arguments, 1); | 2176 | var args = Array.prototype.slice.call(arguments, 1); |
2017 | var len = array.length; | 2177 | var len = array.length; |
2018 | var ret = array.push.apply(array, args); | 2178 | var ret = array.push.apply(array, args); |
2019 | if (args.length) { | 2179 | if (args.length) { |
2020 | -this._notifySplice(array, path, len, args.length, []); | 2180 | +this._notifySplice(array, info.path, len, args.length, []); |
2021 | } | 2181 | } |
2022 | return ret; | 2182 | return ret; |
2023 | }, | 2183 | }, |
2024 | pop: function (path) { | 2184 | pop: function (path) { |
2025 | -var array = this.get(path); | 2185 | +var info = {}; |
2186 | +var array = this._get(path, this, info); | ||
2026 | var hadLength = Boolean(array.length); | 2187 | var hadLength = Boolean(array.length); |
2027 | var args = Array.prototype.slice.call(arguments, 1); | 2188 | var args = Array.prototype.slice.call(arguments, 1); |
2028 | var ret = array.pop.apply(array, args); | 2189 | var ret = array.pop.apply(array, args); |
2029 | if (hadLength) { | 2190 | if (hadLength) { |
2030 | -this._notifySplice(array, path, array.length, 0, [ret]); | 2191 | +this._notifySplice(array, info.path, array.length, 0, [ret]); |
2031 | } | 2192 | } |
2032 | return ret; | 2193 | return ret; |
2033 | }, | 2194 | }, |
2034 | splice: function (path, start, deleteCount) { | 2195 | splice: function (path, start, deleteCount) { |
2035 | -var array = this.get(path); | 2196 | +var info = {}; |
2197 | +var array = this._get(path, this, info); | ||
2036 | if (start < 0) { | 2198 | if (start < 0) { |
2037 | start = array.length - Math.floor(-start); | 2199 | start = array.length - Math.floor(-start); |
2038 | } else { | 2200 | } else { |
@@ -2045,26 +2207,28 @@ var args = Array.prototype.slice.call(arguments, 1); | @@ -2045,26 +2207,28 @@ var args = Array.prototype.slice.call(arguments, 1); | ||
2045 | var ret = array.splice.apply(array, args); | 2207 | var ret = array.splice.apply(array, args); |
2046 | var addedCount = Math.max(args.length - 2, 0); | 2208 | var addedCount = Math.max(args.length - 2, 0); |
2047 | if (addedCount || ret.length) { | 2209 | if (addedCount || ret.length) { |
2048 | -this._notifySplice(array, path, start, addedCount, ret); | 2210 | +this._notifySplice(array, info.path, start, addedCount, ret); |
2049 | } | 2211 | } |
2050 | return ret; | 2212 | return ret; |
2051 | }, | 2213 | }, |
2052 | shift: function (path) { | 2214 | shift: function (path) { |
2053 | -var array = this.get(path); | 2215 | +var info = {}; |
2216 | +var array = this._get(path, this, info); | ||
2054 | var hadLength = Boolean(array.length); | 2217 | var hadLength = Boolean(array.length); |
2055 | var args = Array.prototype.slice.call(arguments, 1); | 2218 | var args = Array.prototype.slice.call(arguments, 1); |
2056 | var ret = array.shift.apply(array, args); | 2219 | var ret = array.shift.apply(array, args); |
2057 | if (hadLength) { | 2220 | if (hadLength) { |
2058 | -this._notifySplice(array, path, 0, 0, [ret]); | 2221 | +this._notifySplice(array, info.path, 0, 0, [ret]); |
2059 | } | 2222 | } |
2060 | return ret; | 2223 | return ret; |
2061 | }, | 2224 | }, |
2062 | unshift: function (path) { | 2225 | unshift: function (path) { |
2063 | -var array = this.get(path); | 2226 | +var info = {}; |
2227 | +var array = this._get(path, this, info); | ||
2064 | var args = Array.prototype.slice.call(arguments, 1); | 2228 | var args = Array.prototype.slice.call(arguments, 1); |
2065 | var ret = array.unshift.apply(array, args); | 2229 | var ret = array.unshift.apply(array, args); |
2066 | if (args.length) { | 2230 | if (args.length) { |
2067 | -this._notifySplice(array, path, 0, args.length, []); | 2231 | +this._notifySplice(array, info.path, 0, args.length, []); |
2068 | } | 2232 | } |
2069 | return ret; | 2233 | return ret; |
2070 | }, | 2234 | }, |
@@ -2072,8 +2236,10 @@ prepareModelNotifyPath: function (model) { | @@ -2072,8 +2236,10 @@ prepareModelNotifyPath: function (model) { | ||
2072 | this.mixin(model, { | 2236 | this.mixin(model, { |
2073 | fire: Polymer.Base.fire, | 2237 | fire: Polymer.Base.fire, |
2074 | notifyPath: Polymer.Base.notifyPath, | 2238 | notifyPath: Polymer.Base.notifyPath, |
2239 | +_get: Polymer.Base._get, | ||
2075 | _EVENT_CHANGED: Polymer.Base._EVENT_CHANGED, | 2240 | _EVENT_CHANGED: Polymer.Base._EVENT_CHANGED, |
2076 | _notifyPath: Polymer.Base._notifyPath, | 2241 | _notifyPath: Polymer.Base._notifyPath, |
2242 | +_notifyPathUp: Polymer.Base._notifyPathUp, | ||
2077 | _pathEffector: Polymer.Base._pathEffector, | 2243 | _pathEffector: Polymer.Base._pathEffector, |
2078 | _annotationPathEffect: Polymer.Base._annotationPathEffect, | 2244 | _annotationPathEffect: Polymer.Base._annotationPathEffect, |
2079 | _complexObserverPathEffect: Polymer.Base._complexObserverPathEffect, | 2245 | _complexObserverPathEffect: Polymer.Base._complexObserverPathEffect, |
@@ -2081,7 +2247,8 @@ _annotatedComputationPathEffect: Polymer.Base._annotatedComputationPathEffect, | @@ -2081,7 +2247,8 @@ _annotatedComputationPathEffect: Polymer.Base._annotatedComputationPathEffect, | ||
2081 | _computePathEffect: Polymer.Base._computePathEffect, | 2247 | _computePathEffect: Polymer.Base._computePathEffect, |
2082 | _modelForPath: Polymer.Base._modelForPath, | 2248 | _modelForPath: Polymer.Base._modelForPath, |
2083 | _pathMatchesEffect: Polymer.Base._pathMatchesEffect, | 2249 | _pathMatchesEffect: Polymer.Base._pathMatchesEffect, |
2084 | -_notifyBoundPaths: Polymer.Base._notifyBoundPaths | 2250 | +_notifyBoundPaths: Polymer.Base._notifyBoundPaths, |
2251 | +_getPathParts: Polymer.Base._getPathParts | ||
2085 | }); | 2252 | }); |
2086 | } | 2253 | } |
2087 | }); | 2254 | }); |
@@ -3306,7 +3473,7 @@ archetype._prepEffects(); | @@ -3306,7 +3473,7 @@ archetype._prepEffects(); | ||
3306 | this._customPrepEffects(archetype); | 3473 | this._customPrepEffects(archetype); |
3307 | archetype._prepBehaviors(); | 3474 | archetype._prepBehaviors(); |
3308 | archetype._prepBindings(); | 3475 | archetype._prepBindings(); |
3309 | -archetype._notifyPath = this._notifyPathImpl; | 3476 | +archetype._notifyPathUp = this._notifyPathUpImpl; |
3310 | archetype._scopeElementClass = this._scopeElementClassImpl; | 3477 | archetype._scopeElementClass = this._scopeElementClassImpl; |
3311 | archetype.listen = this._listenImpl; | 3478 | archetype.listen = this._listenImpl; |
3312 | archetype._showHideChildren = this._showHideChildrenImpl; | 3479 | archetype._showHideChildren = this._showHideChildrenImpl; |
@@ -3444,7 +3611,7 @@ _forwardInstancePath: function (inst, path, value) { | @@ -3444,7 +3611,7 @@ _forwardInstancePath: function (inst, path, value) { | ||
3444 | }, | 3611 | }, |
3445 | _forwardInstanceProp: function (inst, prop, value) { | 3612 | _forwardInstanceProp: function (inst, prop, value) { |
3446 | }, | 3613 | }, |
3447 | -_notifyPathImpl: function (path, value) { | 3614 | +_notifyPathUpImpl: function (path, value) { |
3448 | var dataHost = this.dataHost; | 3615 | var dataHost = this.dataHost; |
3449 | var dot = path.indexOf('.'); | 3616 | var dot = path.indexOf('.'); |
3450 | var root = dot < 0 ? path : path.slice(0, dot); | 3617 | var root = dot < 0 ? path : path.slice(0, dot); |
@@ -3562,9 +3729,10 @@ this.omap.set(item, key); | @@ -3562,9 +3729,10 @@ this.omap.set(item, key); | ||
3562 | } else { | 3729 | } else { |
3563 | this.pmap[item] = key; | 3730 | this.pmap[item] = key; |
3564 | } | 3731 | } |
3565 | -return key; | 3732 | +return '#' + key; |
3566 | }, | 3733 | }, |
3567 | removeKey: function (key) { | 3734 | removeKey: function (key) { |
3735 | +key = this._parseKey(key); | ||
3568 | this._removeFromMap(this.store[key]); | 3736 | this._removeFromMap(this.store[key]); |
3569 | delete this.store[key]; | 3737 | delete this.store[key]; |
3570 | }, | 3738 | }, |
@@ -3581,16 +3749,29 @@ this.removeKey(key); | @@ -3581,16 +3749,29 @@ this.removeKey(key); | ||
3581 | return key; | 3749 | return key; |
3582 | }, | 3750 | }, |
3583 | getKey: function (item) { | 3751 | getKey: function (item) { |
3752 | +var key; | ||
3584 | if (item && typeof item == 'object') { | 3753 | if (item && typeof item == 'object') { |
3585 | -return this.omap.get(item); | 3754 | +key = this.omap.get(item); |
3586 | } else { | 3755 | } else { |
3587 | -return this.pmap[item]; | 3756 | +key = this.pmap[item]; |
3757 | +} | ||
3758 | +if (key != undefined) { | ||
3759 | +return '#' + key; | ||
3588 | } | 3760 | } |
3589 | }, | 3761 | }, |
3590 | getKeys: function () { | 3762 | getKeys: function () { |
3591 | -return Object.keys(this.store); | 3763 | +return Object.keys(this.store).map(function (key) { |
3764 | +return '#' + key; | ||
3765 | +}); | ||
3766 | +}, | ||
3767 | +_parseKey: function (key) { | ||
3768 | +if (key[0] == '#') { | ||
3769 | +return key.slice(1); | ||
3770 | +} | ||
3771 | +throw new Error('unexpected key ' + key); | ||
3592 | }, | 3772 | }, |
3593 | setItem: function (key, item) { | 3773 | setItem: function (key, item) { |
3774 | +key = this._parseKey(key); | ||
3594 | var old = this.store[key]; | 3775 | var old = this.store[key]; |
3595 | if (old) { | 3776 | if (old) { |
3596 | this._removeFromMap(old); | 3777 | this._removeFromMap(old); |
@@ -3603,6 +3784,7 @@ this.pmap[item] = key; | @@ -3603,6 +3784,7 @@ this.pmap[item] = key; | ||
3603 | this.store[key] = item; | 3784 | this.store[key] = item; |
3604 | }, | 3785 | }, |
3605 | getItem: function (key) { | 3786 | getItem: function (key) { |
3787 | +key = this._parseKey(key); | ||
3606 | return this.store[key]; | 3788 | return this.store[key]; |
3607 | }, | 3789 | }, |
3608 | getItems: function () { | 3790 | getItems: function () { |
@@ -3996,7 +4178,7 @@ this.set('items.' + idx, value); | @@ -3996,7 +4178,7 @@ this.set('items.' + idx, value); | ||
3996 | }, | 4178 | }, |
3997 | _forwardInstancePath: function (inst, path, value) { | 4179 | _forwardInstancePath: function (inst, path, value) { |
3998 | if (path.indexOf(this.as + '.') === 0) { | 4180 | if (path.indexOf(this.as + '.') === 0) { |
3999 | -this.notifyPath('items.' + inst.__key__ + '.' + path.slice(this.as.length + 1), value); | 4181 | +this._notifyPath('items.' + inst.__key__ + '.' + path.slice(this.as.length + 1), value); |
4000 | } | 4182 | } |
4001 | }, | 4183 | }, |
4002 | _forwardParentProp: function (prop, value) { | 4184 | _forwardParentProp: function (prop, value) { |
@@ -4006,7 +4188,7 @@ inst.__setProperty(prop, value, true); | @@ -4006,7 +4188,7 @@ inst.__setProperty(prop, value, true); | ||
4006 | }, | 4188 | }, |
4007 | _forwardParentPath: function (path, value) { | 4189 | _forwardParentPath: function (path, value) { |
4008 | this._instances.forEach(function (inst) { | 4190 | this._instances.forEach(function (inst) { |
4009 | -inst.notifyPath(path, value, true); | 4191 | +inst._notifyPath(path, value, true); |
4010 | }, this); | 4192 | }, this); |
4011 | }, | 4193 | }, |
4012 | _forwardItemPath: function (path, value) { | 4194 | _forwardItemPath: function (path, value) { |
@@ -4018,7 +4200,7 @@ var inst = this._instances[idx]; | @@ -4018,7 +4200,7 @@ var inst = this._instances[idx]; | ||
4018 | if (inst) { | 4200 | if (inst) { |
4019 | if (dot >= 0) { | 4201 | if (dot >= 0) { |
4020 | path = this.as + '.' + path.substring(dot + 1); | 4202 | path = this.as + '.' + path.substring(dot + 1); |
4021 | -inst.notifyPath(path, value, true); | 4203 | +inst._notifyPath(path, value, true); |
4022 | } else { | 4204 | } else { |
4023 | inst.__setProperty(this.as, value, true); | 4205 | inst.__setProperty(this.as, value, true); |
4024 | } | 4206 | } |
@@ -4070,6 +4252,7 @@ this.unlinkPaths('selected.' + i); | @@ -4070,6 +4252,7 @@ this.unlinkPaths('selected.' + i); | ||
4070 | } | 4252 | } |
4071 | } else { | 4253 | } else { |
4072 | this.unlinkPaths('selected'); | 4254 | this.unlinkPaths('selected'); |
4255 | +this.unlinkPaths('selectedItem'); | ||
4073 | } | 4256 | } |
4074 | if (this.multi) { | 4257 | if (this.multi) { |
4075 | if (!this.selected || this.selected.length) { | 4258 | if (!this.selected || this.selected.length) { |
@@ -4209,7 +4392,7 @@ this._instance[prop] = value; | @@ -4209,7 +4392,7 @@ this._instance[prop] = value; | ||
4209 | }, | 4392 | }, |
4210 | _forwardParentPath: function (path, value) { | 4393 | _forwardParentPath: function (path, value) { |
4211 | if (this._instance) { | 4394 | if (this._instance) { |
4212 | -this._instance.notifyPath(path, value, true); | 4395 | +this._instance._notifyPath(path, value, true); |
4213 | } | 4396 | } |
4214 | } | 4397 | } |
4215 | }); | 4398 | }); |
bower_components/prism/.bower.json
100644 → 100755
@@ -26,12 +26,12 @@ | @@ -26,12 +26,12 @@ | ||
26 | "utopia.js", | 26 | "utopia.js", |
27 | "code.js" | 27 | "code.js" |
28 | ], | 28 | ], |
29 | - "version": "1.2.0", | ||
30 | - "_release": "1.2.0", | 29 | + "version": "1.3.0", |
30 | + "_release": "1.3.0", | ||
31 | "_resolution": { | 31 | "_resolution": { |
32 | "type": "version", | 32 | "type": "version", |
33 | - "tag": "v1.2.0", | ||
34 | - "commit": "0924b070349284d8a705ad9ff2c70fbdb43e76bf" | 33 | + "tag": "v1.3.0", |
34 | + "commit": "ad97b23be583f01e84ec5f17197d2c2b109ca7d0" | ||
35 | }, | 35 | }, |
36 | "_source": "git://github.com/LeaVerou/prism.git", | 36 | "_source": "git://github.com/LeaVerou/prism.git", |
37 | "_target": "*", | 37 | "_target": "*", |
bower_components/prism/CHANGELOG.md
100644 → 100755
1 | # Prism Changelog | 1 | # Prism Changelog |
2 | 2 | ||
3 | +## 1.3.0 (2015-10-26) | ||
4 | + | ||
5 | +### New components | ||
6 | + | ||
7 | +* __AsciiDoc__ ([#800](https://github.com/PrismJS/prism/issues/800)) [[`6803ca0`](https://github.com/PrismJS/prism/commit/6803ca0)] | ||
8 | +* __Haxe__ ([#811](https://github.com/PrismJS/prism/issues/811)) [[`bd44341`](https://github.com/PrismJS/prism/commit/bd44341)] | ||
9 | +* __Icon__ ([#803](https://github.com/PrismJS/prism/issues/803)) [[`b43c5f3`](https://github.com/PrismJS/prism/commit/b43c5f3)] | ||
10 | +* __Kotlin ([#814](https://github.com/PrismJS/prism/issues/814)) [[`e8a31a5`](https://github.com/PrismJS/prism/commit/e8a31a5)] | ||
11 | +* __Lua__ ([#804](https://github.com/PrismJS/prism/issues/804)) [[`a36bc4a`](https://github.com/PrismJS/prism/commit/a36bc4a)] | ||
12 | +* __Nix__ ([#795](https://github.com/PrismJS/prism/issues/795)) [[`9b275c8`](https://github.com/PrismJS/prism/commit/9b275c8)] | ||
13 | +* __Oz__ ([#805](https://github.com/PrismJS/prism/issues/805)) [[`388c53f`](https://github.com/PrismJS/prism/commit/388c53f)] | ||
14 | +* __PARI/GP__ ([#802](https://github.com/PrismJS/prism/issues/802)) [[`253c035`](https://github.com/PrismJS/prism/commit/253c035)] | ||
15 | +* __Parser__ ([#808](https://github.com/PrismJS/prism/issues/808)) [[`a953b3a`](https://github.com/PrismJS/prism/commit/a953b3a)] | ||
16 | +* __Puppet__ ([#813](https://github.com/PrismJS/prism/issues/813)) [[`81933ee`](https://github.com/PrismJS/prism/commit/81933ee)] | ||
17 | +* __Roboconf__ ([#812](https://github.com/PrismJS/prism/issues/812)) [[`f5db346`](https://github.com/PrismJS/prism/commit/f5db346)] | ||
18 | + | ||
19 | +### Updated components | ||
20 | + | ||
21 | +* __C__: | ||
22 | + * Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] | ||
23 | +* __C#__: | ||
24 | + * Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] | ||
25 | + * Fix detection of float numbers ([#806](https://github.com/PrismJS/prism/issues/806)) [[`1dae72b`](https://github.com/PrismJS/prism/commit/1dae72b)] | ||
26 | +* __F#__: | ||
27 | + * Highlight directives in preprocessor lines ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] | ||
28 | +* __JavaScript__: | ||
29 | + * Highlight true and false as booleans ([#801](https://github.com/PrismJS/prism/issues/801)) [[`ad316a3`](https://github.com/PrismJS/prism/commit/ad316a3)] | ||
30 | +* __Python__: | ||
31 | + * Highlight triple-quoted strings before comments. Fix [#815](https://github.com/PrismJS/prism/issues/815) [[`90fbf0b`](https://github.com/PrismJS/prism/commit/90fbf0b)] | ||
32 | + | ||
33 | +### New plugins | ||
34 | + | ||
35 | +* __Previewer: Time__ ([#790](https://github.com/PrismJS/prism/issues/790)) [[`88173de`](https://github.com/PrismJS/prism/commit/88173de)] | ||
36 | +* __Previewer: Angle__ ([#791](https://github.com/PrismJS/prism/issues/791)) [[`a434c86`](https://github.com/PrismJS/prism/commit/a434c86)] | ||
37 | + | ||
38 | +### Other changes | ||
39 | + | ||
40 | +* Increase mocha's timeout [[`f1c41db`](https://github.com/PrismJS/prism/commit/f1c41db)] | ||
41 | +* Prevent most errors in IE8. Fix [#9](https://github.com/PrismJS/prism/issues/9) [[`9652d75`](https://github.com/PrismJS/prism/commit/9652d75)] | ||
42 | +* Add U.S. Web Design Standards on homepage. Fix [#785](https://github.com/PrismJS/prism/issues/785) [[`e10d48b`](https://github.com/PrismJS/prism/commit/e10d48b), [`79ebbf8`](https://github.com/PrismJS/prism/commit/79ebbf8), [`2f7088d`](https://github.com/PrismJS/prism/commit/2f7088d)] | ||
43 | +* Added gulp task to autolink PRs and commits in changelog [[`5ec4e4d`](https://github.com/PrismJS/prism/commit/5ec4e4d)] | ||
44 | +* Use child processes to run each set of tests, in order to deal with the memory leak in vm.runInNewContext() [[`9a4b6fa`](https://github.com/PrismJS/prism/commit/9a4b6fa)] | ||
45 | + | ||
3 | ## 1.2.0 (2015-10-07) | 46 | ## 1.2.0 (2015-10-07) |
4 | 47 | ||
5 | ### New components | 48 | ### New components |
bower_components/prism/LICENSE
100644 → 100755
bower_components/prism/README.md
100644 → 100755
bower_components/prism/bower.json
100644 → 100755
bower_components/prism/components.js
100644 → 100755
@@ -79,6 +79,10 @@ var components = { | @@ -79,6 +79,10 @@ var components = { | ||
79 | "title": "AppleScript", | 79 | "title": "AppleScript", |
80 | "owner": "Golmote" | 80 | "owner": "Golmote" |
81 | }, | 81 | }, |
82 | + "asciidoc": { | ||
83 | + "title": "AsciiDoc", | ||
84 | + "owner": "Golmote" | ||
85 | + }, | ||
82 | "aspnet": { | 86 | "aspnet": { |
83 | "title": "ASP.NET (C#)", | 87 | "title": "ASP.NET (C#)", |
84 | "require": "markup", | 88 | "require": "markup", |
@@ -219,10 +223,19 @@ var components = { | @@ -219,10 +223,19 @@ var components = { | ||
219 | "title": "Haskell", | 223 | "title": "Haskell", |
220 | "owner": "bholst" | 224 | "owner": "bholst" |
221 | }, | 225 | }, |
226 | + "haxe": { | ||
227 | + "title": "Haxe", | ||
228 | + "require": "clike", | ||
229 | + "owner": "Golmote" | ||
230 | + }, | ||
222 | "http": { | 231 | "http": { |
223 | "title": "HTTP", | 232 | "title": "HTTP", |
224 | "owner": "danielgtaylor" | 233 | "owner": "danielgtaylor" |
225 | }, | 234 | }, |
235 | + "icon": { | ||
236 | + "title": "Icon", | ||
237 | + "owner": "Golmote" | ||
238 | + }, | ||
226 | "inform7": { | 239 | "inform7": { |
227 | "title": "Inform 7", | 240 | "title": "Inform 7", |
228 | "owner": "Golmote" | 241 | "owner": "Golmote" |
@@ -253,6 +266,11 @@ var components = { | @@ -253,6 +266,11 @@ var components = { | ||
253 | "title": "Keyman", | 266 | "title": "Keyman", |
254 | "owner": "mcdurdin" | 267 | "owner": "mcdurdin" |
255 | }, | 268 | }, |
269 | + "kotlin": { | ||
270 | + "title": "Kotlin", | ||
271 | + "require": "clike", | ||
272 | + "owner": "Golmote" | ||
273 | + }, | ||
256 | "latex": { | 274 | "latex": { |
257 | "title": "LaTeX", | 275 | "title": "LaTeX", |
258 | "owner": "japborst" | 276 | "owner": "japborst" |
@@ -266,6 +284,10 @@ var components = { | @@ -266,6 +284,10 @@ var components = { | ||
266 | "title": "LOLCODE", | 284 | "title": "LOLCODE", |
267 | "owner": "Golmote" | 285 | "owner": "Golmote" |
268 | }, | 286 | }, |
287 | + "lua": { | ||
288 | + "title": "Lua", | ||
289 | + "owner": "Golmote" | ||
290 | + }, | ||
269 | "makefile": { | 291 | "makefile": { |
270 | "title": "Makefile", | 292 | "title": "Makefile", |
271 | "owner": "Golmote" | 293 | "owner": "Golmote" |
@@ -304,6 +326,10 @@ var components = { | @@ -304,6 +326,10 @@ var components = { | ||
304 | "title": "Nim", | 326 | "title": "Nim", |
305 | "owner": "Golmote" | 327 | "owner": "Golmote" |
306 | }, | 328 | }, |
329 | + "nix": { | ||
330 | + "title": "Nix", | ||
331 | + "owner": "Golmote" | ||
332 | + }, | ||
307 | "nsis": { | 333 | "nsis": { |
308 | "title": "NSIS", | 334 | "title": "NSIS", |
309 | "owner": "idleberg" | 335 | "owner": "idleberg" |
@@ -317,6 +343,19 @@ var components = { | @@ -317,6 +343,19 @@ var components = { | ||
317 | "title": "OCaml", | 343 | "title": "OCaml", |
318 | "owner": "Golmote" | 344 | "owner": "Golmote" |
319 | }, | 345 | }, |
346 | + "oz": { | ||
347 | + "title": "Oz", | ||
348 | + "owner": "Golmote" | ||
349 | + }, | ||
350 | + "parigp": { | ||
351 | + "title": "PARI/GP", | ||
352 | + "owner": "Golmote" | ||
353 | + }, | ||
354 | + "parser": { | ||
355 | + "title": "Parser", | ||
356 | + "require": "markup", | ||
357 | + "owner": "Golmote" | ||
358 | + }, | ||
320 | "pascal": { | 359 | "pascal": { |
321 | "title": "Pascal", | 360 | "title": "Pascal", |
322 | "owner": "Golmote" | 361 | "owner": "Golmote" |
@@ -348,6 +387,10 @@ var components = { | @@ -348,6 +387,10 @@ var components = { | ||
348 | "title": "Prolog", | 387 | "title": "Prolog", |
349 | "owner": "Golmote" | 388 | "owner": "Golmote" |
350 | }, | 389 | }, |
390 | + "puppet": { | ||
391 | + "title": "Puppet", | ||
392 | + "owner": "Golmote" | ||
393 | + }, | ||
351 | "pure": { | 394 | "pure": { |
352 | "title": "Pure", | 395 | "title": "Pure", |
353 | "owner": "Golmote" | 396 | "owner": "Golmote" |
@@ -382,6 +425,10 @@ var components = { | @@ -382,6 +425,10 @@ var components = { | ||
382 | "title": "Rip", | 425 | "title": "Rip", |
383 | "owner": "ravinggenius" | 426 | "owner": "ravinggenius" |
384 | }, | 427 | }, |
428 | + "roboconf": { | ||
429 | + "title": "Roboconf", | ||
430 | + "owner": "Golmote" | ||
431 | + }, | ||
385 | "ruby": { | 432 | "ruby": { |
386 | "title": "Ruby", | 433 | "title": "Ruby", |
387 | "require": "clike", | 434 | "require": "clike", |
@@ -532,6 +579,16 @@ var components = { | @@ -532,6 +579,16 @@ var components = { | ||
532 | "require": "previewer-base", | 579 | "require": "previewer-base", |
533 | "owner": "Golmote" | 580 | "owner": "Golmote" |
534 | }, | 581 | }, |
582 | + "previewer-time": { | ||
583 | + "title": "Previewer: Time", | ||
584 | + "require": "previewer-base", | ||
585 | + "owner": "Golmote" | ||
586 | + }, | ||
587 | + "previewer-angle": { | ||
588 | + "title": "Previewer: Angle", | ||
589 | + "require": "previewer-base", | ||
590 | + "owner": "Golmote" | ||
591 | + }, | ||
535 | "autoloader": { | 592 | "autoloader": { |
536 | "title": "Autoloader", | 593 | "title": "Autoloader", |
537 | "owner": "Golmote", | 594 | "owner": "Golmote", |
bower_components/prism/components/prism-abap.js
100644 → 100755
bower_components/prism/components/prism-abap.min.js
100644 → 100755
bower_components/prism/components/prism-actionscript.js
100644 → 100755
bower_components/prism/components/prism-actionscript.min.js
100644 → 100755
bower_components/prism/components/prism-apacheconf.js
100644 → 100755
bower_components/prism/components/prism-apacheconf.min.js
100644 → 100755
bower_components/prism/components/prism-apl.js
100644 → 100755
bower_components/prism/components/prism-apl.min.js
100644 → 100755
bower_components/prism/components/prism-applescript.js
100644 → 100755
bower_components/prism/components/prism-applescript.min.js
100644 → 100755
bower_components/prism/components/prism-asciidoc.js
0 → 100755
1 | +(function (Prism) { | ||
2 | + | ||
3 | + var attributes = { | ||
4 | + pattern: /(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m, | ||
5 | + lookbehind: true, | ||
6 | + inside: { | ||
7 | + 'quoted': { | ||
8 | + pattern: /([$`])(?:(?!\1)[^\\]|\\.)*\1/, | ||
9 | + inside: { | ||
10 | + 'punctuation': /^[$`]|[$`]$/ | ||
11 | + } | ||
12 | + }, | ||
13 | + 'interpreted': { | ||
14 | + pattern: /'(?:[^'\\]|\\.)*'/, | ||
15 | + inside: { | ||
16 | + 'punctuation': /^'|'$/ | ||
17 | + // See rest below | ||
18 | + } | ||
19 | + }, | ||
20 | + 'string': /"(?:[^"\\]|\\.)*"/, | ||
21 | + 'variable': /\w+(?==)/, | ||
22 | + 'punctuation': /^\[|\]$|,/, | ||
23 | + 'operator': /=/, | ||
24 | + // The negative look-ahead prevents blank matches | ||
25 | + 'attr-value': /(?!^\s+$).+/ | ||
26 | + } | ||
27 | + }; | ||
28 | + Prism.languages.asciidoc = { | ||
29 | + 'comment-block': { | ||
30 | + pattern: /^(\/{4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1/m, | ||
31 | + alias: 'comment' | ||
32 | + }, | ||
33 | + 'table': { | ||
34 | + pattern: /^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m, | ||
35 | + inside: { | ||
36 | + 'specifiers': { | ||
37 | + pattern: /(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/, | ||
38 | + alias: 'attr-value' | ||
39 | + }, | ||
40 | + 'punctuation': { | ||
41 | + pattern: /(^|[^\\])[|!]=*/, | ||
42 | + lookbehind: true | ||
43 | + } | ||
44 | + // See rest below | ||
45 | + } | ||
46 | + }, | ||
47 | + | ||
48 | + 'passthrough-block': { | ||
49 | + pattern: /^(\+{4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1$/m, | ||
50 | + inside: { | ||
51 | + 'punctuation': /^\++|\++$/ | ||
52 | + // See rest below | ||
53 | + } | ||
54 | + }, | ||
55 | + // Literal blocks and listing blocks | ||
56 | + 'literal-block': { | ||
57 | + pattern: /^(-{4,}|\.{4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1$/m, | ||
58 | + inside: { | ||
59 | + 'punctuation': /^(?:-+|\.+)|(?:-+|\.+)$/ | ||
60 | + // See rest below | ||
61 | + } | ||
62 | + }, | ||
63 | + // Sidebar blocks, quote blocks, example blocks and open blocks | ||
64 | + 'other-block': { | ||
65 | + pattern: /^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1$/m, | ||
66 | + inside: { | ||
67 | + 'punctuation': /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/ | ||
68 | + // See rest below | ||
69 | + } | ||
70 | + }, | ||
71 | + | ||
72 | + // list-punctuation and list-label must appear before indented-block | ||
73 | + 'list-punctuation': { | ||
74 | + pattern: /(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im, | ||
75 | + lookbehind: true, | ||
76 | + alias: 'punctuation' | ||
77 | + }, | ||
78 | + 'list-label': { | ||
79 | + pattern: /(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im, | ||
80 | + lookbehind: true, | ||
81 | + alias: 'symbol' | ||
82 | + }, | ||
83 | + 'indented-block': { | ||
84 | + pattern: /((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/, | ||
85 | + lookbehind: true | ||
86 | + }, | ||
87 | + | ||
88 | + 'comment': /^\/\/.*/m, | ||
89 | + 'title': { | ||
90 | + pattern: /^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m, | ||
91 | + alias: 'important', | ||
92 | + inside: { | ||
93 | + 'punctuation': /^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/ | ||
94 | + // See rest below | ||
95 | + } | ||
96 | + }, | ||
97 | + 'attribute-entry': { | ||
98 | + pattern: /^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m, | ||
99 | + alias: 'tag' | ||
100 | + }, | ||
101 | + 'attributes': attributes, | ||
102 | + 'hr': { | ||
103 | + pattern: /^'{3,}$/m, | ||
104 | + alias: 'punctuation' | ||
105 | + }, | ||
106 | + 'page-break': { | ||
107 | + pattern: /^<{3,}$/m, | ||
108 | + alias: 'punctuation' | ||
109 | + }, | ||
110 | + 'admonition': { | ||
111 | + pattern: /^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m, | ||
112 | + alias: 'keyword' | ||
113 | + }, | ||
114 | + 'callout': [ | ||
115 | + { | ||
116 | + pattern: /(^[ \t]*)<?\d*>/m, | ||
117 | + lookbehind: true, | ||
118 | + alias: 'symbol' | ||
119 | + }, | ||
120 | + { | ||
121 | + pattern: /<\d+>/, | ||
122 | + alias: 'symbol' | ||
123 | + } | ||
124 | + ], | ||
125 | + 'macro': { | ||
126 | + pattern: /\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/, | ||
127 | + inside: { | ||
128 | + 'function': /^[a-z\d-]+(?=:)/, | ||
129 | + 'punctuation': /^::?/, | ||
130 | + 'attributes': { | ||
131 | + pattern: /(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/, | ||
132 | + inside: attributes.inside | ||
133 | + } | ||
134 | + } | ||
135 | + }, | ||
136 | + 'inline': { | ||
137 | + /* | ||
138 | + The initial look-behind prevents the highlighting of escaped quoted text. | ||
139 | + | ||
140 | + Quoted text can be multi-line but cannot span an empty line. | ||
141 | + All quoted text can have attributes before [foobar, 'foobar', baz="bar"]. | ||
142 | + | ||
143 | + First, we handle the constrained quotes. | ||
144 | + Those must be bounded by non-word chars and cannot have spaces between the delimiter and the first char. | ||
145 | + They are, in order: _emphasis_, ``double quotes'', `single quotes', `monospace`, 'emphasis', *strong*, +monospace+ and #unquoted# | ||
146 | + | ||
147 | + Then we handle the unconstrained quotes. | ||
148 | + Those do not have the restrictions of the constrained quotes. | ||
149 | + They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++, ##unquoted##, $$passthrough$$, ~subscript~, ^superscript^, {attribute-reference}, [[anchor]], [[[bibliography anchor]]], <<xref>>, (((indexes))) and ((indexes)) | ||
150 | + */ | ||
151 | + pattern: /(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m, | ||
152 | + lookbehind: true, | ||
153 | + inside: { | ||
154 | + 'attributes': attributes, | ||
155 | + 'url': { | ||
156 | + pattern: /^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/, | ||
157 | + inside: { | ||
158 | + 'punctuation': /^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/ | ||
159 | + } | ||
160 | + }, | ||
161 | + 'attribute-ref': { | ||
162 | + pattern: /^\{.+\}$/, | ||
163 | + inside: { | ||
164 | + 'variable': { | ||
165 | + pattern: /(^\{)[a-z\d,+_-]+/, | ||
166 | + lookbehind: true | ||
167 | + }, | ||
168 | + 'operator': /^[=?!#%@$]|!(?=[:}])/, | ||
169 | + 'punctuation': /^\{|\}$|::?/ | ||
170 | + } | ||
171 | + }, | ||
172 | + 'italic': { | ||
173 | + pattern: /^(['_])[\s\S]+\1$/, | ||
174 | + inside: { | ||
175 | + 'punctuation': /^(?:''?|__?)|(?:''?|__?)$/ | ||
176 | + } | ||
177 | + }, | ||
178 | + 'bold': { | ||
179 | + pattern: /^\*[\s\S]+\*$/, | ||
180 | + inside: { | ||
181 | + punctuation: /^\*\*?|\*\*?$/ | ||
182 | + } | ||
183 | + }, | ||
184 | + 'punctuation': /^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/ | ||
185 | + } | ||
186 | + }, | ||
187 | + 'replacement': { | ||
188 | + pattern: /\((?:C|TM|R)\)/, | ||
189 | + alias: 'builtin' | ||
190 | + }, | ||
191 | + 'entity': /&#?[\da-z]{1,8};/i, | ||
192 | + 'line-continuation': { | ||
193 | + pattern: /(^| )\+$/m, | ||
194 | + lookbehind: true, | ||
195 | + alias: 'punctuation' | ||
196 | + } | ||
197 | + }; | ||
198 | + | ||
199 | + | ||
200 | + // Allow some nesting. There is no recursion though, so cloning should not be needed. | ||
201 | + | ||
202 | + attributes.inside['interpreted'].inside.rest = { | ||
203 | + 'macro': Prism.languages.asciidoc['macro'], | ||
204 | + 'inline': Prism.languages.asciidoc['inline'], | ||
205 | + 'replacement': Prism.languages.asciidoc['replacement'], | ||
206 | + 'entity': Prism.languages.asciidoc['entity'] | ||
207 | + }; | ||
208 | + | ||
209 | + Prism.languages.asciidoc['passthrough-block'].inside.rest = { | ||
210 | + 'macro': Prism.languages.asciidoc['macro'] | ||
211 | + }; | ||
212 | + | ||
213 | + Prism.languages.asciidoc['literal-block'].inside.rest = { | ||
214 | + 'callout': Prism.languages.asciidoc['callout'] | ||
215 | + }; | ||
216 | + | ||
217 | + Prism.languages.asciidoc['table'].inside.rest = { | ||
218 | + 'comment-block': Prism.languages.asciidoc['comment-block'], | ||
219 | + 'passthrough-block': Prism.languages.asciidoc['passthrough-block'], | ||
220 | + 'literal-block': Prism.languages.asciidoc['literal-block'], | ||
221 | + 'other-block': Prism.languages.asciidoc['other-block'], | ||
222 | + 'list-punctuation': Prism.languages.asciidoc['list-punctuation'], | ||
223 | + 'indented-block': Prism.languages.asciidoc['indented-block'], | ||
224 | + 'comment': Prism.languages.asciidoc['comment'], | ||
225 | + 'title': Prism.languages.asciidoc['title'], | ||
226 | + 'attribute-entry': Prism.languages.asciidoc['attribute-entry'], | ||
227 | + 'attributes': Prism.languages.asciidoc['attributes'], | ||
228 | + 'hr': Prism.languages.asciidoc['hr'], | ||
229 | + 'page-break': Prism.languages.asciidoc['page-break'], | ||
230 | + 'admonition': Prism.languages.asciidoc['admonition'], | ||
231 | + 'list-label': Prism.languages.asciidoc['list-label'], | ||
232 | + 'callout': Prism.languages.asciidoc['callout'], | ||
233 | + 'macro': Prism.languages.asciidoc['macro'], | ||
234 | + 'inline': Prism.languages.asciidoc['inline'], | ||
235 | + 'replacement': Prism.languages.asciidoc['replacement'], | ||
236 | + 'entity': Prism.languages.asciidoc['entity'], | ||
237 | + 'line-continuation': Prism.languages.asciidoc['line-continuation'] | ||
238 | + }; | ||
239 | + | ||
240 | + Prism.languages.asciidoc['other-block'].inside.rest = { | ||
241 | + 'table': Prism.languages.asciidoc['table'], | ||
242 | + 'list-punctuation': Prism.languages.asciidoc['list-punctuation'], | ||
243 | + 'indented-block': Prism.languages.asciidoc['indented-block'], | ||
244 | + 'comment': Prism.languages.asciidoc['comment'], | ||
245 | + 'attribute-entry': Prism.languages.asciidoc['attribute-entry'], | ||
246 | + 'attributes': Prism.languages.asciidoc['attributes'], | ||
247 | + 'hr': Prism.languages.asciidoc['hr'], | ||
248 | + 'page-break': Prism.languages.asciidoc['page-break'], | ||
249 | + 'admonition': Prism.languages.asciidoc['admonition'], | ||
250 | + 'list-label': Prism.languages.asciidoc['list-label'], | ||
251 | + 'macro': Prism.languages.asciidoc['macro'], | ||
252 | + 'inline': Prism.languages.asciidoc['inline'], | ||
253 | + 'replacement': Prism.languages.asciidoc['replacement'], | ||
254 | + 'entity': Prism.languages.asciidoc['entity'], | ||
255 | + 'line-continuation': Prism.languages.asciidoc['line-continuation'] | ||
256 | + }; | ||
257 | + | ||
258 | + Prism.languages.asciidoc['title'].inside.rest = { | ||
259 | + 'macro': Prism.languages.asciidoc['macro'], | ||
260 | + 'inline': Prism.languages.asciidoc['inline'], | ||
261 | + 'replacement': Prism.languages.asciidoc['replacement'], | ||
262 | + 'entity': Prism.languages.asciidoc['entity'] | ||
263 | + }; | ||
264 | + | ||
265 | + // Plugin to make entity title show the real entity, idea by Roman Komarov | ||
266 | + Prism.hooks.add('wrap', function(env) { | ||
267 | + if (env.type === 'entity') { | ||
268 | + env.attributes['title'] = env.content.replace(/&/, '&'); | ||
269 | + } | ||
270 | + }); | ||
271 | +}(Prism)); | ||
0 | \ No newline at end of file | 272 | \ No newline at end of file |
bower_components/prism/components/prism-asciidoc.min.js
0 → 100755
1 | +!function(a){var i={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}};a.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:i,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{"function":/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:i.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:i,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}},i.inside.interpreted.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.languages.asciidoc["passthrough-block"].inside.rest={macro:a.languages.asciidoc.macro},a.languages.asciidoc["literal-block"].inside.rest={callout:a.languages.asciidoc.callout},a.languages.asciidoc.table.inside.rest={"comment-block":a.languages.asciidoc["comment-block"],"passthrough-block":a.languages.asciidoc["passthrough-block"],"literal-block":a.languages.asciidoc["literal-block"],"other-block":a.languages.asciidoc["other-block"],"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,title:a.languages.asciidoc.title,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],callout:a.languages.asciidoc.callout,macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc["other-block"].inside.rest={table:a.languages.asciidoc.table,"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc.title.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})}(Prism); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-aspnet.js
100644 → 100755
bower_components/prism/components/prism-aspnet.min.js
100644 → 100755
bower_components/prism/components/prism-autohotkey.js
100644 → 100755
bower_components/prism/components/prism-autohotkey.min.js
100644 → 100755
bower_components/prism/components/prism-autoit.js
100644 → 100755
bower_components/prism/components/prism-autoit.min.js
100644 → 100755
bower_components/prism/components/prism-bash.js
100644 → 100755
bower_components/prism/components/prism-bash.min.js
100644 → 100755
bower_components/prism/components/prism-basic.js
100644 → 100755
bower_components/prism/components/prism-basic.min.js
100644 → 100755
bower_components/prism/components/prism-batch.js
100644 → 100755
bower_components/prism/components/prism-batch.min.js
100644 → 100755
bower_components/prism/components/prism-bison.js
100644 → 100755
bower_components/prism/components/prism-bison.min.js
100644 → 100755
bower_components/prism/components/prism-brainfuck.js
100644 → 100755
bower_components/prism/components/prism-brainfuck.min.js
100644 → 100755
bower_components/prism/components/prism-c.js
100644 → 100755
@@ -16,9 +16,17 @@ Prism.languages.insertBefore('c', 'string', { | @@ -16,9 +16,17 @@ Prism.languages.insertBefore('c', 'string', { | ||
16 | 'string': { | 16 | 'string': { |
17 | pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/, | 17 | pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/, |
18 | lookbehind: true | 18 | lookbehind: true |
19 | + }, | ||
20 | + // highlight macro directives as keywords | ||
21 | + 'directive': { | ||
22 | + pattern: /(#\s*)\b(define|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/, | ||
23 | + lookbehind: true, | ||
24 | + alias: 'keyword' | ||
19 | } | 25 | } |
20 | } | 26 | } |
21 | - } | 27 | + }, |
28 | + // highlight predefined macros as constants | ||
29 | + 'constant': /\b(__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|stdin|stdout|stderr)\b/ | ||
22 | }); | 30 | }); |
23 | 31 | ||
24 | delete Prism.languages.c['class-name']; | 32 | delete Prism.languages.c['class-name']; |
bower_components/prism/components/prism-c.min.js
100644 → 100755
1 | -Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(define|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-clike.js
100644 → 100755
bower_components/prism/components/prism-clike.min.js
100644 → 100755
bower_components/prism/components/prism-coffeescript.js
100644 → 100755
bower_components/prism/components/prism-coffeescript.min.js
100644 → 100755
bower_components/prism/components/prism-core.js
100644 → 100755
bower_components/prism/components/prism-core.min.js
100644 → 100755
bower_components/prism/components/prism-cpp.js
100644 → 100755
bower_components/prism/components/prism-cpp.min.js
100644 → 100755
bower_components/prism/components/prism-crystal.js
100644 → 100755
bower_components/prism/components/prism-crystal.min.js
100644 → 100755
bower_components/prism/components/prism-csharp.js
100644 → 100755
@@ -4,12 +4,21 @@ Prism.languages.csharp = Prism.languages.extend('clike', { | @@ -4,12 +4,21 @@ Prism.languages.csharp = Prism.languages.extend('clike', { | ||
4 | /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/, | 4 | /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/, |
5 | /("|')(\\?.)*?\1/ | 5 | /("|')(\\?.)*?\1/ |
6 | ], | 6 | ], |
7 | - 'number': /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i | 7 | + 'number': /\b-?(0x[\da-f]+|\d*\.?\d+f?)\b/i |
8 | }); | 8 | }); |
9 | 9 | ||
10 | Prism.languages.insertBefore('csharp', 'keyword', { | 10 | Prism.languages.insertBefore('csharp', 'keyword', { |
11 | 'preprocessor': { | 11 | 'preprocessor': { |
12 | pattern: /(^\s*)#.*/m, | 12 | pattern: /(^\s*)#.*/m, |
13 | - lookbehind: true | 13 | + lookbehind: true, |
14 | + alias: 'property', | ||
15 | + inside: { | ||
16 | + // highlight preprocessor directives as keywords | ||
17 | + 'directive': { | ||
18 | + pattern: /(\s*#)\b(define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/, | ||
19 | + lookbehind: true, | ||
20 | + alias: 'keyword' | ||
21 | + } | ||
22 | + } | ||
14 | } | 23 | } |
15 | }); | 24 | }); |
bower_components/prism/components/prism-csharp.min.js
100644 → 100755
1 | -Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),Prism.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+f?)\b/i}),Prism.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-css-extras.js
100644 → 100755
bower_components/prism/components/prism-css-extras.min.js
100644 → 100755
bower_components/prism/components/prism-css.js
100644 → 100755
bower_components/prism/components/prism-css.min.js
100644 → 100755
bower_components/prism/components/prism-d.js
100644 → 100755
bower_components/prism/components/prism-d.min.js
100644 → 100755
bower_components/prism/components/prism-dart.js
100644 → 100755
bower_components/prism/components/prism-dart.min.js
100644 → 100755
bower_components/prism/components/prism-diff.js
100644 → 100755
bower_components/prism/components/prism-diff.min.js
100644 → 100755
bower_components/prism/components/prism-docker.js
100644 → 100755
bower_components/prism/components/prism-docker.min.js
100644 → 100755
bower_components/prism/components/prism-eiffel.js
100644 → 100755
bower_components/prism/components/prism-eiffel.min.js
100644 → 100755
bower_components/prism/components/prism-elixir.js
100644 → 100755
bower_components/prism/components/prism-elixir.min.js
100644 → 100755
bower_components/prism/components/prism-erlang.js
100644 → 100755
bower_components/prism/components/prism-erlang.min.js
100644 → 100755
bower_components/prism/components/prism-fortran.js
100644 → 100755
bower_components/prism/components/prism-fortran.min.js
100644 → 100755
bower_components/prism/components/prism-fsharp.js
100644 → 100755
@@ -19,5 +19,15 @@ Prism.languages.fsharp = Prism.languages.extend('clike', { | @@ -19,5 +19,15 @@ Prism.languages.fsharp = Prism.languages.extend('clike', { | ||
19 | ] | 19 | ] |
20 | }); | 20 | }); |
21 | Prism.languages.insertBefore('fsharp', 'keyword', { | 21 | Prism.languages.insertBefore('fsharp', 'keyword', { |
22 | - 'preprocessor': /^[^\r\n\S]*#.*/m | ||
23 | -}); | ||
24 | \ No newline at end of file | 22 | \ No newline at end of file |
23 | + 'preprocessor': { | ||
24 | + pattern: /^[^\r\n\S]*#.*/m, | ||
25 | + alias: 'property', | ||
26 | + inside: { | ||
27 | + 'directive': { | ||
28 | + pattern: /(\s*#)\b(else|endif|if|light|line|nowarn)\b/, | ||
29 | + lookbehind: true, | ||
30 | + alias: 'keyword' | ||
31 | + } | ||
32 | + } | ||
33 | + } | ||
34 | +}); |
bower_components/prism/components/prism-fsharp.min.js
100644 → 100755
1 | -Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\w\W]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,string:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\\1|\\?(?!\1)[\s\S])*\1)B?/,number:[/\b-?0x[\da-fA-F]+(un|lf|LF)?\b/,/\b-?0b[01]+(y|uy)?\b/,/\b-?(\d*\.?\d+|\d+\.)([fFmM]|[eE][+-]?\d+)?\b/,/\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/]}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:/^[^\r\n\S]*#.*/m}); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\w\W]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,string:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\\1|\\?(?!\1)[\s\S])*\1)B?/,number:[/\b-?0x[\da-fA-F]+(un|lf|LF)?\b/,/\b-?0b[01]+(y|uy)?\b/,/\b-?(\d*\.?\d+|\d+\.)([fFmM]|[eE][+-]?\d+)?\b/,/\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/]}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-gherkin.js
100644 → 100755
bower_components/prism/components/prism-gherkin.min.js
100644 → 100755
bower_components/prism/components/prism-git.js
100644 → 100755
bower_components/prism/components/prism-git.min.js
100644 → 100755
bower_components/prism/components/prism-glsl.js
100644 → 100755
bower_components/prism/components/prism-glsl.min.js
100644 → 100755
bower_components/prism/components/prism-go.js
100644 → 100755
bower_components/prism/components/prism-go.min.js
100644 → 100755
bower_components/prism/components/prism-groovy.js
100644 → 100755
bower_components/prism/components/prism-groovy.min.js
100644 → 100755
bower_components/prism/components/prism-haml.js
100644 → 100755
bower_components/prism/components/prism-haml.min.js
100644 → 100755
bower_components/prism/components/prism-handlebars.js
100644 → 100755
bower_components/prism/components/prism-handlebars.min.js
100644 → 100755
bower_components/prism/components/prism-haskell.js
100644 → 100755
bower_components/prism/components/prism-haskell.min.js
100644 → 100755
bower_components/prism/components/prism-haxe.js
0 → 100755
1 | +Prism.languages.haxe = Prism.languages.extend('clike', { | ||
2 | + // Strings can be multi-line | ||
3 | + 'string': { | ||
4 | + pattern: /(["'])(?:(?!\1)[^\\]|\\[\s\S])*\1/, | ||
5 | + inside: { | ||
6 | + 'interpolation': { | ||
7 | + pattern: /(^|[^\\])\$(?:\w+|\{[^}]+\})/, | ||
8 | + lookbehind: true, | ||
9 | + inside: { | ||
10 | + 'interpolation': { | ||
11 | + pattern: /^\$\w*/, | ||
12 | + alias: 'variable' | ||
13 | + } | ||
14 | + // See rest below | ||
15 | + } | ||
16 | + } | ||
17 | + } | ||
18 | + }, | ||
19 | + // The final look-ahead prevents highlighting of keywords if expressions such as "haxe.macro.Expr" | ||
20 | + 'keyword': /\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|from|for|function|if|implements|import|in|inline|interface|macro|new|null|override|public|private|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/, | ||
21 | + 'operator': /\.{3}|\+\+?|-[->]?|[=!]=?|&&?|\|\|?|<[<=]?|>[>=]?|[*\/%~^]/ | ||
22 | +}); | ||
23 | +Prism.languages.insertBefore('haxe', 'class-name', { | ||
24 | + 'regex': { | ||
25 | + pattern: /~\/(?:[^\/\\\r\n]|\\.)+\/[igmsu]*/ | ||
26 | + } | ||
27 | +}); | ||
28 | +Prism.languages.insertBefore('haxe', 'keyword', { | ||
29 | + 'preprocessor': { | ||
30 | + pattern: /#\w+/, | ||
31 | + alias: 'builtin' | ||
32 | + }, | ||
33 | + 'metadata': { | ||
34 | + pattern: /@:?\w+/, | ||
35 | + alias: 'symbol' | ||
36 | + }, | ||
37 | + 'reification': { | ||
38 | + pattern: /\$(?:\w+|(?=\{))/, | ||
39 | + alias: 'variable' | ||
40 | + } | ||
41 | +}); | ||
42 | +Prism.languages.haxe['string'].inside['interpolation'].inside.rest = Prism.util.clone(Prism.languages.haxe); | ||
43 | +delete Prism.languages.haxe['class-name']; | ||
0 | \ No newline at end of file | 44 | \ No newline at end of file |
bower_components/prism/components/prism-haxe.min.js
0 → 100755
1 | +Prism.languages.haxe=Prism.languages.extend("clike",{string:{pattern:/(["'])(?:(?!\1)[^\\]|\\[\s\S])*\1/,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^}]+\})/,lookbehind:!0,inside:{interpolation:{pattern:/^\$\w*/,alias:"variable"}}}}},keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|from|for|function|if|implements|import|in|inline|interface|macro|new|null|override|public|private|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/,operator:/\.{3}|\+\+?|-[->]?|[=!]=?|&&?|\|\|?|<[<=]?|>[>=]?|[*\/%~^]/}),Prism.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[igmsu]*/}}),Prism.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#\w+/,alias:"builtin"},metadata:{pattern:/@:?\w+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"variable"}}),Prism.languages.haxe.string.inside.interpolation.inside.rest=Prism.util.clone(Prism.languages.haxe),delete Prism.languages.haxe["class-name"]; | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-http.js
100644 → 100755
bower_components/prism/components/prism-http.min.js
100644 → 100755
bower_components/prism/components/prism-icon.js
0 → 100755
1 | +Prism.languages.icon = { | ||
2 | + 'comment': /#.*/, | ||
3 | + 'string': /(["'])(?:(?!\1)[^\\\r\n]|\\.|_(?:\r?\n|\r))*\1/, | ||
4 | + 'number': /\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i, | ||
5 | + 'builtin-keyword': { | ||
6 | + pattern: /&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/, | ||
7 | + alias: 'variable' | ||
8 | + }, | ||
9 | + 'directive': { | ||
10 | + pattern: /\$\w+/, | ||
11 | + alias: 'builtin' | ||
12 | + }, | ||
13 | + 'keyword': /\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/, | ||
14 | + 'function': /(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/, | ||
15 | + 'operator': /[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/, | ||
16 | + 'punctuation': /[\[\](){},;]/ | ||
17 | +}; | ||
0 | \ No newline at end of file | 18 | \ No newline at end of file |
bower_components/prism/components/prism-icon.min.js
0 → 100755
1 | +Prism.languages.icon={comment:/#.*/,string:/(["'])(?:(?!\1)[^\\\r\n]|\\.|_(?:\r?\n|\r))*\1/,number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,"function":/(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}; | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-inform7.js
100644 → 100755
bower_components/prism/components/prism-inform7.min.js
100644 → 100755
bower_components/prism/components/prism-ini.js
100644 → 100755
bower_components/prism/components/prism-ini.min.js
100644 → 100755
bower_components/prism/components/prism-j.js
100644 → 100755
bower_components/prism/components/prism-j.min.js
100644 → 100755
bower_components/prism/components/prism-jade.js
100644 → 100755
bower_components/prism/components/prism-jade.min.js
100644 → 100755
bower_components/prism/components/prism-java.js
100644 → 100755
bower_components/prism/components/prism-java.min.js
100644 → 100755
bower_components/prism/components/prism-javascript.js
100644 → 100755
1 | Prism.languages.javascript = Prism.languages.extend('clike', { | 1 | Prism.languages.javascript = Prism.languages.extend('clike', { |
2 | - 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/, | 2 | + 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, |
3 | 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, | 3 | 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, |
4 | // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) | 4 | // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) |
5 | 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i | 5 | 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i |
bower_components/prism/components/prism-javascript.min.js
100644 → 100755
1 | -Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),Prism.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript; | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),Prism.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript; | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-jsx.js
100644 → 100755
@@ -14,7 +14,8 @@ Prism.languages.insertBefore('inside', 'attr-value',{ | @@ -14,7 +14,8 @@ Prism.languages.insertBefore('inside', 'attr-value',{ | ||
14 | inside: { | 14 | inside: { |
15 | 'function' : Prism.languages.javascript.function, | 15 | 'function' : Prism.languages.javascript.function, |
16 | 'punctuation': /[={}[\];(),.:]/, | 16 | 'punctuation': /[={}[\];(),.:]/, |
17 | - 'keyword': Prism.languages.javascript.keyword | 17 | + 'keyword': Prism.languages.javascript.keyword, |
18 | + 'boolean': Prism.languages.javascript.boolean | ||
18 | }, | 19 | }, |
19 | 'alias': 'language-javascript' | 20 | 'alias': 'language-javascript' |
20 | } | 21 | } |
bower_components/prism/components/prism-jsx.min.js
100644 → 100755
1 | -!function(a){var s=a.util.clone(a.languages.javascript);a.languages.jsx=a.languages.extend("markup",s),a.languages.jsx.tag.pattern=/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+|(\{[\w\W]*?\})))?\s*)*\/?>/i,a.languages.jsx.tag.inside["attr-value"].pattern=/=[^\{](?:('|")[\w\W]*?(\1)|[^\s>]+)/i,a.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{[^}]*\}|[^}])+\})/i,inside:{"function":a.languages.javascript.function,punctuation:/[={}[\];(),.:]/,keyword:a.languages.javascript.keyword},alias:"language-javascript"}},a.languages.jsx.tag)}(Prism); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(a){var s=a.util.clone(a.languages.javascript);a.languages.jsx=a.languages.extend("markup",s),a.languages.jsx.tag.pattern=/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+|(\{[\w\W]*?\})))?\s*)*\/?>/i,a.languages.jsx.tag.inside["attr-value"].pattern=/=[^\{](?:('|")[\w\W]*?(\1)|[^\s>]+)/i,a.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{[^}]*\}|[^}])+\})/i,inside:{"function":a.languages.javascript.function,punctuation:/[={}[\];(),.:]/,keyword:a.languages.javascript.keyword,"boolean":a.languages.javascript.boolean},alias:"language-javascript"}},a.languages.jsx.tag)}(Prism); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-julia.js
100644 → 100755
bower_components/prism/components/prism-julia.min.js
100644 → 100755
bower_components/prism/components/prism-keyman.js
100644 → 100755
bower_components/prism/components/prism-keyman.min.js
100644 → 100755
bower_components/prism/components/prism-kotlin.js
0 → 100755
1 | +(function (Prism) { | ||
2 | + Prism.languages.kotlin = Prism.languages.extend('clike', { | ||
3 | + 'keyword': { | ||
4 | + // The lookbehind prevents wrong highlighting of e.g. kotlin.properties.get | ||
5 | + pattern: /(^|[^.])\b(?:abstract|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|else|enum|final|finally|for|fun|get|if|import|in|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|out|override|package|private|protected|public|reified|return|sealed|set|super|tailrec|this|throw|to|try|val|var|when|where|while)\b/, | ||
6 | + lookbehind: true | ||
7 | + }, | ||
8 | + 'function': [ | ||
9 | + /\w+(?=\s*\()/, | ||
10 | + { | ||
11 | + pattern: /(\.)\w+(?=\s*\{)/, | ||
12 | + lookbehind: true | ||
13 | + } | ||
14 | + ], | ||
15 | + 'number': /\b(?:0[bx][\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?[fFL]?)\b/, | ||
16 | + 'operator': /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/ | ||
17 | + }); | ||
18 | + | ||
19 | + delete Prism.languages.kotlin["class-name"]; | ||
20 | + | ||
21 | + Prism.languages.insertBefore('kotlin', 'string', { | ||
22 | + 'raw-string': { | ||
23 | + pattern: /(["'])\1\1[\s\S]*?\1{3}/, | ||
24 | + alias: 'string' | ||
25 | + // See interpolation below | ||
26 | + } | ||
27 | + }); | ||
28 | + Prism.languages.insertBefore('kotlin', 'keyword', { | ||
29 | + 'annotation': { | ||
30 | + pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/, | ||
31 | + alias: 'builtin' | ||
32 | + } | ||
33 | + }); | ||
34 | + Prism.languages.insertBefore('kotlin', 'function', { | ||
35 | + 'label': { | ||
36 | + pattern: /\w+@|@\w+/, | ||
37 | + alias: 'symbol' | ||
38 | + } | ||
39 | + }); | ||
40 | + | ||
41 | + var interpolation = [ | ||
42 | + { | ||
43 | + pattern: /\$\{[^}]+\}/, | ||
44 | + inside: { | ||
45 | + delimiter: { | ||
46 | + pattern: /^\$\{|\}$/, | ||
47 | + alias: 'variable' | ||
48 | + }, | ||
49 | + rest: Prism.util.clone(Prism.languages.kotlin) | ||
50 | + } | ||
51 | + }, | ||
52 | + { | ||
53 | + pattern: /\$\w+/, | ||
54 | + alias: 'variable' | ||
55 | + } | ||
56 | + ]; | ||
57 | + | ||
58 | + Prism.languages.kotlin['string'] = { | ||
59 | + pattern: Prism.languages.kotlin['string'], | ||
60 | + inside: { | ||
61 | + interpolation: interpolation | ||
62 | + } | ||
63 | + }; | ||
64 | + Prism.languages.kotlin['raw-string'].inside = { | ||
65 | + interpolation: interpolation | ||
66 | + }; | ||
67 | + | ||
68 | +}(Prism)); | ||
0 | \ No newline at end of file | 69 | \ No newline at end of file |
bower_components/prism/components/prism-kotlin.min.js
0 → 100755
1 | +!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|else|enum|final|finally|for|fun|get|if|import|in|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|out|override|package|private|protected|public|reified|return|sealed|set|super|tailrec|this|throw|to|try|val|var|when|where|while)\b/,lookbehind:!0},"function":[/\w+(?=\s*\()/,{pattern:/(\.)\w+(?=\s*\{)/,lookbehind:!0}],number:/\b(?:0[bx][\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"],n.languages.insertBefore("kotlin","string",{"raw-string":{pattern:/(["'])\1\1[\s\S]*?\1{3}/,alias:"string"}}),n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\w+@|@\w+/,alias:"symbol"}});var e=[{pattern:/\$\{[^}]+\}/,inside:{delimiter:{pattern:/^\$\{|\}$/,alias:"variable"},rest:n.util.clone(n.languages.kotlin)}},{pattern:/\$\w+/,alias:"variable"}];n.languages.kotlin.string={pattern:n.languages.kotlin.string,inside:{interpolation:e}},n.languages.kotlin["raw-string"].inside={interpolation:e}}(Prism); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-latex.js
100644 → 100755
bower_components/prism/components/prism-latex.min.js
100644 → 100755
bower_components/prism/components/prism-less.js
100644 → 100755
bower_components/prism/components/prism-less.min.js
100644 → 100755
bower_components/prism/components/prism-lolcode.js
100644 → 100755
bower_components/prism/components/prism-lolcode.min.js
100644 → 100755
bower_components/prism/components/prism-lua.js
0 → 100755
1 | +Prism.languages.lua = { | ||
2 | + 'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m, | ||
3 | + // \z may be used to skip the following space | ||
4 | + 'string': /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[\s\S]))*\1|\[(=*)\[[\s\S]*?\]\2\]/, | ||
5 | + 'number': /\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i, | ||
6 | + 'keyword': /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/, | ||
7 | + 'function': /(?!\d)\w+(?=\s*(?:[({]))/, | ||
8 | + 'operator': [ | ||
9 | + /[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/, | ||
10 | + { | ||
11 | + // Match ".." but don't break "..." | ||
12 | + pattern: /(^|[^.])\.\.(?!\.)/, | ||
13 | + lookbehind: true | ||
14 | + } | ||
15 | + ], | ||
16 | + 'punctuation': /[\[\](){},;]|\.+|:+/ | ||
17 | +}; | ||
0 | \ No newline at end of file | 18 | \ No newline at end of file |
bower_components/prism/components/prism-lua.min.js
0 → 100755
1 | +Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[\s\S]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,number:/\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,"function":/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}; | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-makefile.js
100644 → 100755
bower_components/prism/components/prism-makefile.min.js
100644 → 100755
bower_components/prism/components/prism-markdown.js
100644 → 100755
bower_components/prism/components/prism-markdown.min.js
100644 → 100755
bower_components/prism/components/prism-markup.js
100644 → 100755
@@ -4,7 +4,7 @@ Prism.languages.markup = { | @@ -4,7 +4,7 @@ Prism.languages.markup = { | ||
4 | 'doctype': /<!DOCTYPE[\w\W]+?>/, | 4 | 'doctype': /<!DOCTYPE[\w\W]+?>/, |
5 | 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i, | 5 | 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i, |
6 | 'tag': { | 6 | 'tag': { |
7 | - pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\|\?(?!)[\w\W])*|[^\s'">=]+))?)*\s*\/?>/i, | 7 | + pattern: /<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\|\?(?!)[\w\W])*|[^\s'">=]+))?)*\s*\/?>/i, |
8 | inside: { | 8 | inside: { |
9 | 'tag': { | 9 | 'tag': { |
10 | pattern: /^<\/?[^\s>\/]+/i, | 10 | pattern: /^<\/?[^\s>\/]+/i, |
bower_components/prism/components/prism-markup.min.js
100644 → 100755
1 | -Prism.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-matlab.js
100644 → 100755
bower_components/prism/components/prism-matlab.min.js
100644 → 100755
bower_components/prism/components/prism-mel.js
100644 → 100755
bower_components/prism/components/prism-mel.min.js
100644 → 100755
bower_components/prism/components/prism-mizar.js
100644 → 100755
bower_components/prism/components/prism-mizar.min.js
100644 → 100755
bower_components/prism/components/prism-monkey.js
100644 → 100755
bower_components/prism/components/prism-monkey.min.js
100644 → 100755
bower_components/prism/components/prism-nasm.js
100644 → 100755
bower_components/prism/components/prism-nasm.min.js
100644 → 100755
bower_components/prism/components/prism-nginx.js
100644 → 100755
bower_components/prism/components/prism-nginx.min.js
100644 → 100755
bower_components/prism/components/prism-nim.js
100644 → 100755
bower_components/prism/components/prism-nim.min.js
100644 → 100755
bower_components/prism/components/prism-nix.js
0 → 100755
1 | +Prism.languages.nix = { | ||
2 | + 'comment': /\/\*[\s\S]*?\*\/|#.*/, | ||
3 | + 'string': { | ||
4 | + pattern: /"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/, | ||
5 | + inside: { | ||
6 | + 'interpolation': { | ||
7 | + // The lookbehind ensures the ${} is not preceded by \ or '' | ||
8 | + pattern: /(^|(?:^|(?!'').)[^\\])\$\{(?:[^}]|\{[^}]*\})*}/, | ||
9 | + lookbehind: true, | ||
10 | + inside: { | ||
11 | + 'antiquotation': { | ||
12 | + pattern: /^\$(?=\{)/, | ||
13 | + alias: 'variable' | ||
14 | + } | ||
15 | + // See rest below | ||
16 | + } | ||
17 | + } | ||
18 | + } | ||
19 | + }, | ||
20 | + 'url': [ | ||
21 | + /\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/, | ||
22 | + { | ||
23 | + pattern: /([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/, | ||
24 | + lookbehind: true | ||
25 | + } | ||
26 | + ], | ||
27 | + 'antiquotation': { | ||
28 | + pattern: /\$(?=\{)/, | ||
29 | + alias: 'variable' | ||
30 | + }, | ||
31 | + 'number': /\b\d+\b/, | ||
32 | + 'keyword': /\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/, | ||
33 | + 'function': /\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:url|Tarball)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/, | ||
34 | + 'boolean': /\b(?:true|false)\b/, | ||
35 | + 'operator': /[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/, | ||
36 | + 'punctuation': /[{}()[\].,:;]/ | ||
37 | +}; | ||
38 | + | ||
39 | +Prism.languages.nix.string.inside.interpolation.inside.rest = Prism.util.clone(Prism.languages.nix); | ||
0 | \ No newline at end of file | 40 | \ No newline at end of file |
bower_components/prism/components/prism-nix.min.js
0 → 100755
1 | +Prism.languages.nix={comment:/\/\*[\s\S]*?\*\/|#.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^}]|\{[^}]*\})*}/,lookbehind:!0,inside:{antiquotation:{pattern:/^\$(?=\{)/,alias:"variable"}}}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"variable"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,"function":/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:url|Tarball)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,"boolean":/\b(?:true|false)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},Prism.languages.nix.string.inside.interpolation.inside.rest=Prism.util.clone(Prism.languages.nix); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-nsis.js
100644 → 100755
bower_components/prism/components/prism-nsis.min.js
100644 → 100755
bower_components/prism/components/prism-objectivec.js
100644 → 100755
bower_components/prism/components/prism-objectivec.min.js
100644 → 100755
bower_components/prism/components/prism-ocaml.js
100644 → 100755
bower_components/prism/components/prism-ocaml.min.js
100644 → 100755
bower_components/prism/components/prism-oz.js
0 → 100755
1 | +Prism.languages.oz = { | ||
2 | + 'comment': /\/\*[\s\S]*?\*\/|%.*/, | ||
3 | + 'string': /"(?:[^"\\]|\\[\s\S])*"/, | ||
4 | + 'atom': { | ||
5 | + pattern: /'(?:[^'\\]|\\.)*'/, | ||
6 | + alias: 'builtin' | ||
7 | + }, | ||
8 | + 'keyword': /[$_]|\[\]|\b(?:at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/, | ||
9 | + 'function': [ | ||
10 | + /[a-z][A-Za-z\d]*(?=\()/, | ||
11 | + { | ||
12 | + pattern: /(\{)[A-Z][A-Za-z\d]*/, | ||
13 | + lookbehind: true | ||
14 | + } | ||
15 | + ], | ||
16 | + 'number': /\b(?:0[bx][\da-f]+|\d+\.?\d*(?:e~?\d+)?\b)|&(?:[^\\]|\\(?:\d{3}|.))/i, | ||
17 | + 'variable': /\b[A-Z][A-Za-z\d]*|`(?:[^`\\]|\\.)+`/, | ||
18 | + 'attr-name': /\w+(?=:)/, | ||
19 | + 'operator': /:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/, | ||
20 | + 'punctuation': /[\[\](){}.:;?]/ | ||
21 | +}; | ||
0 | \ No newline at end of file | 22 | \ No newline at end of file |
bower_components/prism/components/prism-oz.min.js
0 → 100755
1 | +Prism.languages.oz={comment:/\/\*[\s\S]*?\*\/|%.*/,string:/"(?:[^"\\]|\\[\s\S])*"/,atom:{pattern:/'(?:[^'\\]|\\.)*'/,alias:"builtin"},keyword:/[$_]|\[\]|\b(?:at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,"function":[/[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+\.?\d*(?:e~?\d+)?\b)|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/\b[A-Z][A-Za-z\d]*|`(?:[^`\\]|\\.)+`/,"attr-name":/\w+(?=:)/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}; | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-parigp.js
0 → 100755
1 | +Prism.languages.parigp = { | ||
2 | + 'comment': /\/\*[\s\S]*?\*\/|\\\\.*/, | ||
3 | + 'string': /"(?:[^"\\]|\\.)*"/, | ||
4 | + // PARI/GP does not care about white spaces at all | ||
5 | + // so let's process the keywords to build an appropriate regexp | ||
6 | + // (e.g. "b *r *e *a *k", etc.) | ||
7 | + 'keyword': (function () { | ||
8 | + var keywords = [ | ||
9 | + 'breakpoint', 'break', 'dbg_down', 'dbg_err', 'dbg_up', 'dbg_x', | ||
10 | + 'forcomposite', 'fordiv', 'forell', 'forpart', 'forprime', | ||
11 | + 'forstep', 'forsubgroup', 'forvec', 'for', 'iferr', 'if', | ||
12 | + 'local', 'my', 'next', 'return', 'until', 'while' | ||
13 | + ]; | ||
14 | + keywords = keywords.map(function (keyword) { | ||
15 | + return keyword.split('').join(' *'); | ||
16 | + }).join('|'); | ||
17 | + return RegExp('\\b(?:' + keywords + ')\\b'); | ||
18 | + }()), | ||
19 | + 'function': /\w[\w ]*?(?= *\()/, | ||
20 | + 'number': { | ||
21 | + // The lookbehind and the negative lookahead prevent from breaking the .. operator | ||
22 | + pattern: /((?:\. *\. *)?)(?:\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *[+-]? *\d(?: *\d)*)?/i, | ||
23 | + lookbehind: true | ||
24 | + }, | ||
25 | + 'operator': /\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?:(?: *<)?(?: *=)?| *>)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/, | ||
26 | + 'punctuation': /[\[\]{}().,:;|]/ | ||
27 | +}; | ||
0 | \ No newline at end of file | 28 | \ No newline at end of file |
bower_components/prism/components/prism-parigp.min.js
0 → 100755
1 | +Prism.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:/"(?:[^"\\]|\\.)*"/,keyword:function(){var r=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return r=r.map(function(r){return r.split("").join(" *")}).join("|"),RegExp("\\b(?:"+r+")\\b")}(),"function":/\w[\w ]*?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *[+-]? *\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?:(?: *<)?(?: *=)?| *>)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}; | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-parser.js
0 → 100755
1 | +Prism.languages.parser = Prism.languages.extend('markup', { | ||
2 | + 'keyword': { | ||
3 | + pattern: /(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/, | ||
4 | + lookbehind: true | ||
5 | + }, | ||
6 | + 'variable': { | ||
7 | + pattern: /(^|[^^])\B\$(?:\w+|(?=[.\{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/, | ||
8 | + lookbehind: true, | ||
9 | + inside: { | ||
10 | + 'punctuation': /\.|:+/ | ||
11 | + } | ||
12 | + }, | ||
13 | + 'function': { | ||
14 | + pattern: /(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/, | ||
15 | + lookbehind: true, | ||
16 | + inside: { | ||
17 | + 'keyword': { | ||
18 | + pattern: /(^@)(?:GET_|SET_)/, | ||
19 | + lookbehind: true | ||
20 | + }, | ||
21 | + 'punctuation': /\.|:+/ | ||
22 | + } | ||
23 | + }, | ||
24 | + 'escape': { | ||
25 | + pattern: /\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i, | ||
26 | + alias: 'builtin' | ||
27 | + }, | ||
28 | + 'punctuation': /[\[\](){};]/ | ||
29 | +}); | ||
30 | +Prism.languages.insertBefore('parser', 'keyword', { | ||
31 | + 'parser-comment': { | ||
32 | + pattern: /(\s)#.*/, | ||
33 | + lookbehind: true, | ||
34 | + alias: 'comment' | ||
35 | + }, | ||
36 | + 'expression': { | ||
37 | + // Allow for 3 levels of depth | ||
38 | + pattern: /(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/, | ||
39 | + lookbehind: true, | ||
40 | + inside: { | ||
41 | + 'string': { | ||
42 | + pattern: /(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/, | ||
43 | + lookbehind: true | ||
44 | + }, | ||
45 | + 'keyword': Prism.languages.parser.keyword, | ||
46 | + 'variable': Prism.languages.parser.variable, | ||
47 | + 'function': Prism.languages.parser.function, | ||
48 | + 'boolean': /\b(?:true|false)\b/, | ||
49 | + 'number': /\b(?:0x[a-f\d]+|\d+\.?\d*(?:e[+-]?\d+)?)\b/i, | ||
50 | + 'escape': Prism.languages.parser.escape, | ||
51 | + 'operator': /[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/, | ||
52 | + 'punctuation': Prism.languages.parser.punctuation | ||
53 | + } | ||
54 | + } | ||
55 | +}); | ||
56 | +Prism.languages.insertBefore('inside', 'punctuation', { | ||
57 | + 'expression': Prism.languages.parser.expression, | ||
58 | + 'keyword': Prism.languages.parser.keyword, | ||
59 | + 'variable': Prism.languages.parser.variable, | ||
60 | + 'function': Prism.languages.parser.function, | ||
61 | + 'escape': Prism.languages.parser.escape, | ||
62 | + 'parser-punctuation': { | ||
63 | + pattern: Prism.languages.parser.punctuation, | ||
64 | + alias: 'punctuation' | ||
65 | + } | ||
66 | +}, Prism.languages.parser['tag'].inside['attr-value']); | ||
0 | \ No newline at end of file | 67 | \ No newline at end of file |
bower_components/prism/components/prism-parser.min.js
0 → 100755
1 | +Prism.languages.parser=Prism.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.\{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},"function":{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/}),Prism.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:Prism.languages.parser.keyword,variable:Prism.languages.parser.variable,"function":Prism.languages.parser.function,"boolean":/\b(?:true|false)\b/,number:/\b(?:0x[a-f\d]+|\d+\.?\d*(?:e[+-]?\d+)?)\b/i,escape:Prism.languages.parser.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:Prism.languages.parser.punctuation}}}),Prism.languages.insertBefore("inside","punctuation",{expression:Prism.languages.parser.expression,keyword:Prism.languages.parser.keyword,variable:Prism.languages.parser.variable,"function":Prism.languages.parser.function,escape:Prism.languages.parser.escape,"parser-punctuation":{pattern:Prism.languages.parser.punctuation,alias:"punctuation"}},Prism.languages.parser.tag.inside["attr-value"]); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-pascal.js
100644 → 100755
bower_components/prism/components/prism-pascal.min.js
100644 → 100755
bower_components/prism/components/prism-perl.js
100644 → 100755
bower_components/prism/components/prism-perl.min.js
100644 → 100755
bower_components/prism/components/prism-php-extras.js
100644 → 100755
bower_components/prism/components/prism-php-extras.min.js
100644 → 100755
bower_components/prism/components/prism-php.js
100644 → 100755
bower_components/prism/components/prism-php.min.js
100644 → 100755
bower_components/prism/components/prism-powershell.js
100644 → 100755
bower_components/prism/components/prism-powershell.min.js
100644 → 100755
bower_components/prism/components/prism-processing.js
100644 → 100755
bower_components/prism/components/prism-processing.min.js
100644 → 100755
bower_components/prism/components/prism-prolog.js
100644 → 100755
bower_components/prism/components/prism-prolog.min.js
100644 → 100755
bower_components/prism/components/prism-puppet.js
0 → 100755
1 | +(function (Prism) { | ||
2 | + Prism.languages.puppet = { | ||
3 | + 'heredoc': [ | ||
4 | + // Matches the content of a quoted heredoc string (subject to interpolation) | ||
5 | + { | ||
6 | + pattern: /(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/, | ||
7 | + lookbehind: true, | ||
8 | + alias: 'string', | ||
9 | + inside: { | ||
10 | + // Matches the end tag | ||
11 | + 'punctuation': /(?=\S).*\S(?= *$)/ | ||
12 | + // See interpolation below | ||
13 | + } | ||
14 | + }, | ||
15 | + // Matches the content of an unquoted heredoc string (no interpolation) | ||
16 | + { | ||
17 | + pattern: /(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/, | ||
18 | + lookbehind: true, | ||
19 | + alias: 'string', | ||
20 | + inside: { | ||
21 | + // Matches the end tag | ||
22 | + 'punctuation': /(?=\S).*\S(?= *$)/ | ||
23 | + } | ||
24 | + }, | ||
25 | + // Matches the start tag of heredoc strings | ||
26 | + { | ||
27 | + pattern: /@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/, | ||
28 | + alias: 'string', | ||
29 | + inside: { | ||
30 | + 'punctuation': { | ||
31 | + pattern: /(\().+?(?=\))/, | ||
32 | + lookbehind: true | ||
33 | + } | ||
34 | + } | ||
35 | + } | ||
36 | + ], | ||
37 | + 'multiline-comment': { | ||
38 | + pattern: /(^|[^\\])\/\*[\s\S]*?\*\//, | ||
39 | + lookbehind: true, | ||
40 | + alias: 'comment' | ||
41 | + }, | ||
42 | + 'regex': { | ||
43 | + // Must be prefixed with the keyword "node" or a non-word char | ||
44 | + pattern: /((?:\bnode\s+|[^\s\w\\]\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/, | ||
45 | + lookbehind: true, | ||
46 | + inside: { | ||
47 | + // Extended regexes must have the x flag. They can contain single-line comments. | ||
48 | + 'extended-regex': { | ||
49 | + pattern: /^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/, | ||
50 | + inside: { | ||
51 | + 'comment': /#.*/ | ||
52 | + } | ||
53 | + } | ||
54 | + } | ||
55 | + }, | ||
56 | + 'comment': { | ||
57 | + pattern: /(^|[^\\])#.*/, | ||
58 | + lookbehind: true | ||
59 | + }, | ||
60 | + 'string': { | ||
61 | + // Allow for one nested level of double quotes inside interpolation | ||
62 | + pattern: /(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|(?!\1)[^\\]|\\[\s\S])*\1/, | ||
63 | + inside: { | ||
64 | + 'double-quoted': { | ||
65 | + pattern: /^"[\s\S]*"$/, | ||
66 | + inside: { | ||
67 | + // See interpolation below | ||
68 | + } | ||
69 | + } | ||
70 | + } | ||
71 | + }, | ||
72 | + 'variable': { | ||
73 | + pattern: /\$(?:::)?\w+(?:::\w+)*/, | ||
74 | + inside: { | ||
75 | + 'punctuation': /::/ | ||
76 | + } | ||
77 | + }, | ||
78 | + 'attr-name': /(?:\w+|\*)(?=\s*=>)/, | ||
79 | + 'function': [ | ||
80 | + { | ||
81 | + pattern: /(\.)(?!\d)\w+/, | ||
82 | + lookbehind: true | ||
83 | + }, | ||
84 | + /\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/ | ||
85 | + ], | ||
86 | + 'number': /\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i, | ||
87 | + 'boolean': /\b(?:true|false)\b/, | ||
88 | + // Includes words reserved for future use | ||
89 | + 'keyword': /\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/, | ||
90 | + 'datatype': { | ||
91 | + pattern: /\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/, | ||
92 | + alias: 'symbol' | ||
93 | + }, | ||
94 | + 'operator': /=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/, | ||
95 | + 'punctuation': /[\[\]{}().,;]|:+/ | ||
96 | + }; | ||
97 | + | ||
98 | + var interpolation = [ | ||
99 | + { | ||
100 | + // Allow for one nested level of braces inside interpolation | ||
101 | + pattern: /(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/, | ||
102 | + lookbehind: true, | ||
103 | + inside: { | ||
104 | + 'short-variable': { | ||
105 | + // Negative look-ahead prevent wrong highlighting of functions | ||
106 | + pattern: /(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/, | ||
107 | + lookbehind: true, | ||
108 | + alias: 'variable', | ||
109 | + inside: { | ||
110 | + 'punctuation': /::/ | ||
111 | + } | ||
112 | + }, | ||
113 | + 'delimiter': { | ||
114 | + pattern: /^\$/, | ||
115 | + alias: 'variable' | ||
116 | + }, | ||
117 | + rest: Prism.util.clone(Prism.languages.puppet) | ||
118 | + } | ||
119 | + }, | ||
120 | + { | ||
121 | + pattern: /(^|[^\\])\$(?:::)?\w+(?:::\w+)*/, | ||
122 | + lookbehind: true, | ||
123 | + alias: 'variable', | ||
124 | + inside: { | ||
125 | + 'punctuation': /::/ | ||
126 | + } | ||
127 | + } | ||
128 | + ]; | ||
129 | + Prism.languages.puppet['heredoc'][0].inside.interpolation = interpolation; | ||
130 | + Prism.languages.puppet['string'].inside['double-quoted'].inside.interpolation = interpolation; | ||
131 | +}(Prism)); | ||
0 | \ No newline at end of file | 132 | \ No newline at end of file |
bower_components/prism/components/prism-puppet.min.js
0 → 100755
1 | +!function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[^\s\w\\]\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|(?!\1)[^\\]|\\[\s\S])*\1/,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\w+|\*)(?=\s*=>)/,"function":[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,"boolean":/\b(?:true|false)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.util.clone(e.languages.puppet)}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=n,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=n}(Prism); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-pure.js
100644 → 100755
bower_components/prism/components/prism-pure.min.js
100644 → 100755
bower_components/prism/components/prism-python.js
100644 → 100755
1 | Prism.languages.python= { | 1 | Prism.languages.python= { |
2 | + 'triple-quoted-string': { | ||
3 | + pattern: /"""[\s\S]+?"""|'''[\s\S]+?'''/, | ||
4 | + alias: 'string' | ||
5 | + }, | ||
2 | 'comment': { | 6 | 'comment': { |
3 | pattern: /(^|[^\\])#.*/, | 7 | pattern: /(^|[^\\])#.*/, |
4 | lookbehind: true | 8 | lookbehind: true |
5 | }, | 9 | }, |
6 | - 'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\?.)*?/, | 10 | + 'string': /("|')(?:\?.)*?/, |
7 | 'function' : { | 11 | 'function' : { |
8 | pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g, | 12 | pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g, |
9 | lookbehind: true | 13 | lookbehind: true |
bower_components/prism/components/prism-python.min.js
100644 → 100755
1 | -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}; | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.python={"triple-quoted-string":{pattern:/"""[\s\S]+?"""|'''[\s\S]+?'''/,alias:"string"},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}; | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-q.js
100644 → 100755
bower_components/prism/components/prism-q.min.js
100644 → 100755
bower_components/prism/components/prism-qore.js
100644 → 100755
bower_components/prism/components/prism-qore.min.js
100644 → 100755
bower_components/prism/components/prism-r.js
100644 → 100755
bower_components/prism/components/prism-r.min.js
100644 → 100755
bower_components/prism/components/prism-rest.js
100644 → 100755
bower_components/prism/components/prism-rest.min.js
100644 → 100755
bower_components/prism/components/prism-rip.js
100644 → 100755
bower_components/prism/components/prism-rip.min.js
100644 → 100755
1 | -Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,"boolean":/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/(?=\s*($|[\r\n,.;})]))/,lookbehind:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:/("|')(\\?.)*?\1/,number:/[+-]?(?:(?:\d+\.\d+)|(?:\d+))/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,"boolean":/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/(?=\s*($|[\r\n,.;})]))/,lookbehind:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:/("|')(\\?.)*?\1/,number:/[+-]?(?:(?:\d+\.\d+)|(?:\d+))/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-roboconf.js
0 → 100755
1 | +Prism.languages.roboconf = { | ||
2 | + 'comment': /#.*/, | ||
3 | + 'keyword': { | ||
4 | + 'pattern': /(^|\s)(?:(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{)|(?:external|import)\b)/, | ||
5 | + lookbehind: true | ||
6 | + }, | ||
7 | + 'component': { | ||
8 | + pattern: /[\w-]+(?=[ \t]*\{)/, | ||
9 | + alias: 'variable' | ||
10 | + }, | ||
11 | + 'property': /[\w.-]+(?=[ \t]*:)/, | ||
12 | + 'value': { | ||
13 | + pattern: /(=[ \t]*)[^,;]+/, | ||
14 | + lookbehind: true, | ||
15 | + alias: 'attr-value' | ||
16 | + }, | ||
17 | + 'optional': { | ||
18 | + pattern: /\(optional\)/, | ||
19 | + alias: 'builtin' | ||
20 | + }, | ||
21 | + 'wildcard': { | ||
22 | + pattern: /(\.)\*/, | ||
23 | + lookbehind: true, | ||
24 | + alias: 'operator' | ||
25 | + }, | ||
26 | + 'punctuation': /[{},.;:=]/ | ||
27 | +}; | ||
0 | \ No newline at end of file | 28 | \ No newline at end of file |
bower_components/prism/components/prism-roboconf.min.js
0 → 100755
1 | +Prism.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{)|(?:external|import)\b)/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*)[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}; | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/components/prism-ruby.js
100644 → 100755
bower_components/prism/components/prism-ruby.min.js
100644 → 100755
1 | -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:n}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:n}}]}(Prism); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:n}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:n}}]}(Prism); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-rust.js
100644 → 100755
bower_components/prism/components/prism-rust.min.js
100644 → 100755
bower_components/prism/components/prism-sas.js
100644 → 100755
bower_components/prism/components/prism-sas.min.js
100644 → 100755
bower_components/prism/components/prism-sass.js
100644 → 100755
bower_components/prism/components/prism-sass.min.js
100644 → 100755
bower_components/prism/components/prism-scala.js
100644 → 100755
bower_components/prism/components/prism-scala.min.js
100644 → 100755
bower_components/prism/components/prism-scheme.js
100644 → 100755
bower_components/prism/components/prism-scheme.min.js
100644 → 100755
bower_components/prism/components/prism-scss.js
100644 → 100755
bower_components/prism/components/prism-scss.min.js
100644 → 100755
bower_components/prism/components/prism-smalltalk.js
100644 → 100755
bower_components/prism/components/prism-smalltalk.min.js
100644 → 100755
bower_components/prism/components/prism-smarty.js
100644 → 100755
bower_components/prism/components/prism-smarty.min.js
100644 → 100755
bower_components/prism/components/prism-sql.js
100644 → 100755
bower_components/prism/components/prism-sql.min.js
100644 → 100755
bower_components/prism/components/prism-stylus.js
100644 → 100755
bower_components/prism/components/prism-stylus.min.js
100644 → 100755
bower_components/prism/components/prism-swift.js
100644 → 100755
bower_components/prism/components/prism-swift.min.js
100644 → 100755
bower_components/prism/components/prism-tcl.js
100644 → 100755
bower_components/prism/components/prism-tcl.min.js
100644 → 100755
bower_components/prism/components/prism-textile.js
100644 → 100755
bower_components/prism/components/prism-textile.min.js
100644 → 100755
bower_components/prism/components/prism-twig.js
100644 → 100755
bower_components/prism/components/prism-twig.min.js
100644 → 100755
bower_components/prism/components/prism-verilog.js
100644 → 100755
bower_components/prism/components/prism-verilog.min.js
100644 → 100755
bower_components/prism/components/prism-vhdl.js
100644 → 100755
bower_components/prism/components/prism-vhdl.min.js
100644 → 100755
1 | -Prism.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\\r\n]|\\?(?:\r\n|[\s\S]))*?"/,constant:/\b(?:use|library)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,"boolean":/\b(?:true|false)\b/i,"function":/[a-z0-9_]+(?=\()/i,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|not|mod|rem|sll|srl|sla|sra|rol|ror|and|or|nand|xnor|xor|nor)\b/i,punctuation:/[{}[\];(),.:]/}; | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +Prism.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\\r\n]|\\?(?:\r\n|[\s\S]))*?"/,constant:/\b(?:use|library)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,"boolean":/\b(?:true|false)\b/i,"function":/[a-z0-9_]+(?=\()/i,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*\/&=]|\b(?:abs|not|mod|rem|sll|srl|sla|sra|rol|ror|and|or|nand|xnor|xor|nor)\b/i,punctuation:/[{}[\];(),.:]/}; | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/components/prism-vim.js
100644 → 100755
bower_components/prism/components/prism-vim.min.js
100644 → 100755
bower_components/prism/components/prism-wiki.js
100644 → 100755
bower_components/prism/components/prism-wiki.min.js
100644 → 100755
bower_components/prism/components/prism-yaml.js
100644 → 100755
bower_components/prism/components/prism-yaml.min.js
100644 → 100755
bower_components/prism/examples.js
100644 → 100755
bower_components/prism/gulpfile.js
100644 → 100755
@@ -19,7 +19,8 @@ var gulp = require('gulp'), | @@ -19,7 +19,8 @@ var gulp = require('gulp'), | ||
19 | ], | 19 | ], |
20 | plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], | 20 | plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], |
21 | showLanguagePlugin: 'plugins/show-language/prism-show-language.js', | 21 | showLanguagePlugin: 'plugins/show-language/prism-show-language.js', |
22 | - autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js' | 22 | + autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js', |
23 | + changelog: 'CHANGELOG.md' | ||
23 | }; | 24 | }; |
24 | 25 | ||
25 | gulp.task('components', function() { | 26 | gulp.task('components', function() { |
@@ -113,4 +114,19 @@ gulp.task('languages-plugins', function (cb) { | @@ -113,4 +114,19 @@ gulp.task('languages-plugins', function (cb) { | ||
113 | }); | 114 | }); |
114 | }); | 115 | }); |
115 | 116 | ||
117 | +gulp.task('changelog', function (cb) { | ||
118 | + return gulp.src(paths.changelog) | ||
119 | + .pipe(replace( | ||
120 | + /#(\d+)(?![\d\]])/g, | ||
121 | + '[#$1](https://github.com/PrismJS/prism/issues/$1)' | ||
122 | + )) | ||
123 | + .pipe(replace( | ||
124 | + /\[[\da-f]+(?:, *[\da-f]+)*\]/g, | ||
125 | + function (match) { | ||
126 | + return match.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)'); | ||
127 | + } | ||
128 | + )) | ||
129 | + .pipe(gulp.dest('.')); | ||
130 | +}); | ||
131 | + | ||
116 | gulp.task('default', ['components', 'plugins', 'build']); | 132 | gulp.task('default', ['components', 'plugins', 'build']); |
bower_components/prism/package.json
100644 → 100755
1 | { | 1 | { |
2 | "name": "prismjs", | 2 | "name": "prismjs", |
3 | - "version": "1.2.0", | 3 | + "version": "1.3.0", |
4 | "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", | 4 | "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", |
5 | "main": "prism.js", | 5 | "main": "prism.js", |
6 | "scripts": { | 6 | "scripts": { |
bower_components/prism/plugins/autolinker/prism-autolinker.css
100644 → 100755
bower_components/prism/plugins/autolinker/prism-autolinker.js
100644 → 100755
bower_components/prism/plugins/autolinker/prism-autolinker.min.js
100644 → 100755
1 | -!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var i=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:#=?&]+/,n=/\b\S+@[\w.]+[a-z]{2}/,e=/\[([^\]]+)]\(([^)]+)\)/,t=["comment","url","attr-value","string"];Prism.hooks.add("before-highlight",function(a){a.grammar&&!a.grammar["url-link"]&&(Prism.languages.DFS(a.grammar,function(a,r,l){t.indexOf(l)>-1&&"Array"!==Prism.util.type(r)&&(r.pattern||(r=this[a]={pattern:r}),r.inside=r.inside||{},"comment"==l&&(r.inside["md-link"]=e),"attr-value"==l?Prism.languages.insertBefore("inside","punctuation",{"url-link":i},r):r.inside["url-link"]=i,r.inside["email-link"]=n)}),a.grammar["url-link"]=i,a.grammar["email-link"]=n)}),Prism.hooks.add("wrap",function(i){if(/-link$/.test(i.type)){i.tag="a";var n=i.content;if("email-link"==i.type&&0!=n.indexOf("mailto:"))n="mailto:"+n;else if("md-link"==i.type){var t=i.content.match(e);n=t[2],i.content=t[1]}i.attributes.href=n}})}}(); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var i=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~\/.:#=?&]+/,n=/\b\S+@[\w.]+[a-z]{2}/,e=/\[([^\]]+)]\(([^)]+)\)/,t=["comment","url","attr-value","string"];Prism.hooks.add("before-highlight",function(a){a.grammar&&!a.grammar["url-link"]&&(Prism.languages.DFS(a.grammar,function(a,r,l){t.indexOf(l)>-1&&"Array"!==Prism.util.type(r)&&(r.pattern||(r=this[a]={pattern:r}),r.inside=r.inside||{},"comment"==l&&(r.inside["md-link"]=e),"attr-value"==l?Prism.languages.insertBefore("inside","punctuation",{"url-link":i},r):r.inside["url-link"]=i,r.inside["email-link"]=n)}),a.grammar["url-link"]=i,a.grammar["email-link"]=n)}),Prism.hooks.add("wrap",function(i){if(/-link$/.test(i.type)){i.tag="a";var n=i.content;if("email-link"==i.type&&0!=n.indexOf("mailto:"))n="mailto:"+n;else if("md-link"==i.type){var t=i.content.match(e);n=t[2],i.content=t[1]}i.attributes.href=n}})}}(); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/plugins/autoloader/prism-autoloader.js
100644 → 100755
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | } | 4 | } |
5 | 5 | ||
6 | // The dependencies map is built automatically with gulp | 6 | // The dependencies map is built automatically with gulp |
7 | - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","aspnet":"markup","bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","fsharp":"clike","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup","jade":"javascript","java":"clike","less":"css","markdown":"markup","nginx":"clike","objectivec":"c","php":"clike","php-extras":"php","processing":"clike","qore":"clike","jsx":["markup","javascript"],"ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","wiki":"markup"}/*]*/; | 7 | + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","aspnet":"markup","bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","fsharp":"clike","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup","haxe":"clike","jade":"javascript","java":"clike","kotlin":"clike","less":"css","markdown":"markup","nginx":"clike","objectivec":"c","parser":"markup","php":"clike","php-extras":"php","processing":"clike","qore":"clike","jsx":["markup","javascript"],"ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","wiki":"markup"}/*]*/; |
8 | 8 | ||
9 | var lang_data = {}; | 9 | var lang_data = {}; |
10 | 10 |
bower_components/prism/plugins/autoloader/prism-autoloader.min.js
100644 → 100755
1 | -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",aspnet:"markup",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",fsharp:"clike",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup",jade:"javascript",java:"clike",less:"css",markdown:"markup",nginx:"clike",objectivec:"c",php:"clike","php-extras":"php",processing:"clike",qore:"clike",jsx:["markup","javascript"],ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",wiki:"markup"},c={},a=Prism.plugins.autoloader={languages_path:"components/",use_minified:!0},s=function(e,c,a){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),c&&c()},s.onerror=function(){document.body.removeChild(s),a&&a()},document.body.appendChild(s)},n=function(e){return a.languages_path+"prism-"+e+(a.use_minified?".min":"")+".js"},r=function(e,a){var s=c[e];s||(s=c[e]={});var n=a.getAttribute("data-dependencies");!n&&a.parentNode&&"pre"===a.parentNode.tagName.toLowerCase()&&(n=a.parentNode.getAttribute("data-dependencies")),n=n?n.split(/\s*,\s*/g):[],i(n,function(){t(e,function(){Prism.highlightElement(a)})})},i=function(e,c,a){"string"==typeof e&&(e=[e]);var s=0,n=e.length,r=function(){n>s?t(e[s],function(){s++,r()},function(){a&&a(e[s])}):s===n&&c&&c(e)};r()},t=function(a,r,t){var u=function(){var e=!1;a.indexOf("!")>=0&&(e=!0,a=a.replace("!",""));var i=c[a];if(i||(i=c[a]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),t&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(t)),!e&&Prism.languages[a])l(a);else if(!e&&i.error)o(a);else if(e||!i.loading){i.loading=!0;var u=n(a);s(u,function(){i.loading=!1,l(a)},function(){i.loading=!1,i.error=!0,o(a)})}},p=e[a];p&&p.length?i(p,u):u()},l=function(e){c[e]&&c[e].success_callbacks&&c[e].success_callbacks.length&&c[e].success_callbacks.forEach(function(c){c(e)})},o=function(e){c[e]&&c[e].error_callbacks&&c[e].error_callbacks.length&&c[e].error_callbacks.forEach(function(c){c(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&r(e.language,e.element)})}}(); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",aspnet:"markup",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",fsharp:"clike",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup",haxe:"clike",jade:"javascript",java:"clike",kotlin:"clike",less:"css",markdown:"markup",nginx:"clike",objectivec:"c",parser:"markup",php:"clike","php-extras":"php",processing:"clike",qore:"clike",jsx:["markup","javascript"],ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",wiki:"markup"},c={},a=Prism.plugins.autoloader={languages_path:"components/",use_minified:!0},s=function(e,c,a){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),c&&c()},s.onerror=function(){document.body.removeChild(s),a&&a()},document.body.appendChild(s)},r=function(e){return a.languages_path+"prism-"+e+(a.use_minified?".min":"")+".js"},n=function(e,a){var s=c[e];s||(s=c[e]={});var r=a.getAttribute("data-dependencies");!r&&a.parentNode&&"pre"===a.parentNode.tagName.toLowerCase()&&(r=a.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],i(r,function(){t(e,function(){Prism.highlightElement(a)})})},i=function(e,c,a){"string"==typeof e&&(e=[e]);var s=0,r=e.length,n=function(){r>s?t(e[s],function(){s++,n()},function(){a&&a(e[s])}):s===r&&c&&c(e)};n()},t=function(a,n,t){var u=function(){var e=!1;a.indexOf("!")>=0&&(e=!0,a=a.replace("!",""));var i=c[a];if(i||(i=c[a]={}),n&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(n)),t&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(t)),!e&&Prism.languages[a])l(a);else if(!e&&i.error)o(a);else if(e||!i.loading){i.loading=!0;var u=r(a);s(u,function(){i.loading=!1,l(a)},function(){i.loading=!1,i.error=!0,o(a)})}},p=e[a];p&&p.length?i(p,u):u()},l=function(e){c[e]&&c[e].success_callbacks&&c[e].success_callbacks.length&&c[e].success_callbacks.forEach(function(c){c(e)})},o=function(e){c[e]&&c[e].error_callbacks&&c[e].error_callbacks.length&&c[e].error_callbacks.forEach(function(c){c(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&n(e.language,e.element)})}}(); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/plugins/file-highlight/prism-file-highlight.js
100644 → 100755
bower_components/prism/plugins/file-highlight/prism-file-highlight.min.js
100644 → 100755
bower_components/prism/plugins/highlight-keywords/prism-highlight-keywords.js
100644 → 100755
bower_components/prism/plugins/highlight-keywords/prism-highlight-keywords.min.js
100644 → 100755
bower_components/prism/plugins/ie8/prism-ie8.css
100644 → 100755
bower_components/prism/plugins/ie8/prism-ie8.js
100644 → 100755
bower_components/prism/plugins/ie8/prism-ie8.min.js
100644 → 100755
bower_components/prism/plugins/jsonp-highlight/prism-jsonp-highlight.js
100644 → 100755
1 | (function() { | 1 | (function() { |
2 | - if ( !self.Prism || !self.document || !document.querySelectorAll ) return; | 2 | + if ( !self.Prism || !self.document || !document.querySelectorAll || ![].filter) return; |
3 | 3 | ||
4 | var adapters = []; | 4 | var adapters = []; |
5 | function registerAdapter(adapter) { | 5 | function registerAdapter(adapter) { |
bower_components/prism/plugins/jsonp-highlight/prism-jsonp-highlight.min.js
100644 → 100755
1 | -!function(){function t(t){"function"!=typeof t||e(t)||r.push(t)}function e(t){return"function"==typeof t?r.filter(function(e){return e.valueOf()===t.valueOf()})[0]:"string"==typeof t&&t.length>0?r.filter(function(e){return e.name===t})[0]:null}function n(t){if("string"==typeof t&&(t=e(t)),"function"==typeof t){var n=r.indexOf(t);n>=0&&r.splice(n,1)}}function a(){Array.prototype.slice.call(document.querySelectorAll("pre[data-jsonp]")).forEach(function(t){t.textContent="";var e=document.createElement("code");e.textContent=i,t.appendChild(e);var n=t.getAttribute("data-adapter"),a=null;if(n){if("function"!=typeof window[n])return e.textContent="JSONP adapter function '"+n+"' doesn't exist",void 0;a=window[n]}var u="prismjsonp"+o++,f=document.createElement("a"),l=f.href=t.getAttribute("data-jsonp");f.href+=(f.search?"&":"?")+(t.getAttribute("data-callback")||"callback")+"="+u;var s=setTimeout(function(){e.textContent===i&&(e.textContent="Timeout loading '"+l+"'")},5e3),d=document.createElement("script");d.src=f.href,window[u]=function(n){document.head.removeChild(d),clearTimeout(s),delete window[u];var o="";if(a)o=a(n,t);else for(var i in r)if(o=r[i](n,t),null!==o)break;null===o?e.textContent="Cannot parse response (perhaps you need an adapter function?)":(e.textContent=o,Prism.highlightElement(e))},document.head.appendChild(d)})}if(self.Prism&&self.document&&document.querySelectorAll){var r=[];Prism.plugins.jsonphighlight={registerAdapter:t,removeAdapter:n,highlight:a},t(function(t){if(t&&t.meta&&t.data){if(t.meta.status&&t.meta.status>=400)return"Error: "+(t.data.message||t.meta.status);if("string"==typeof t.data.content)return"function"==typeof atob?atob(t.data.content.replace(/\s/g,"")):"Your browser cannot decode base64"}return null}),t(function(t,e){if(t&&t.meta&&t.data&&t.data.files){if(t.meta.status&&t.meta.status>=400)return"Error: "+(t.data.message||t.meta.status);var n=e.getAttribute("data-filename");if(null==n)for(var a in t.data.files)if(t.data.files.hasOwnProperty(a)){n=a;break}return void 0!==t.data.files[n]?t.data.files[n].content:"Error: unknown or missing gist file "+n}return null}),t(function(t){return t&&t.node&&"string"==typeof t.data?t.data:null});var o=0,i="Loading…";a()}}(); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(){function t(t){"function"!=typeof t||e(t)||r.push(t)}function e(t){return"function"==typeof t?r.filter(function(e){return e.valueOf()===t.valueOf()})[0]:"string"==typeof t&&t.length>0?r.filter(function(e){return e.name===t})[0]:null}function n(t){if("string"==typeof t&&(t=e(t)),"function"==typeof t){var n=r.indexOf(t);n>=0&&r.splice(n,1)}}function a(){Array.prototype.slice.call(document.querySelectorAll("pre[data-jsonp]")).forEach(function(t){t.textContent="";var e=document.createElement("code");e.textContent=i,t.appendChild(e);var n=t.getAttribute("data-adapter"),a=null;if(n){if("function"!=typeof window[n])return e.textContent="JSONP adapter function '"+n+"' doesn't exist",void 0;a=window[n]}var u="prismjsonp"+o++,f=document.createElement("a"),l=f.href=t.getAttribute("data-jsonp");f.href+=(f.search?"&":"?")+(t.getAttribute("data-callback")||"callback")+"="+u;var s=setTimeout(function(){e.textContent===i&&(e.textContent="Timeout loading '"+l+"'")},5e3),d=document.createElement("script");d.src=f.href,window[u]=function(n){document.head.removeChild(d),clearTimeout(s),delete window[u];var o="";if(a)o=a(n,t);else for(var i in r)if(o=r[i](n,t),null!==o)break;null===o?e.textContent="Cannot parse response (perhaps you need an adapter function?)":(e.textContent=o,Prism.highlightElement(e))},document.head.appendChild(d)})}if(self.Prism&&self.document&&document.querySelectorAll&&[].filter){var r=[];Prism.plugins.jsonphighlight={registerAdapter:t,removeAdapter:n,highlight:a},t(function(t){if(t&&t.meta&&t.data){if(t.meta.status&&t.meta.status>=400)return"Error: "+(t.data.message||t.meta.status);if("string"==typeof t.data.content)return"function"==typeof atob?atob(t.data.content.replace(/\s/g,"")):"Your browser cannot decode base64"}return null}),t(function(t,e){if(t&&t.meta&&t.data&&t.data.files){if(t.meta.status&&t.meta.status>=400)return"Error: "+(t.data.message||t.meta.status);var n=e.getAttribute("data-filename");if(null==n)for(var a in t.data.files)if(t.data.files.hasOwnProperty(a)){n=a;break}return void 0!==t.data.files[n]?t.data.files[n].content:"Error: unknown or missing gist file "+n}return null}),t(function(t){return t&&t.node&&"string"==typeof t.data?t.data:null});var o=0,i="Loading…";a()}}(); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/plugins/keep-markup/prism-keep-markup.js
100644 → 100755
bower_components/prism/plugins/keep-markup/prism-keep-markup.min.js
100644 → 100755
bower_components/prism/plugins/line-highlight/prism-line-highlight.css
100644 → 100755
bower_components/prism/plugins/line-highlight/prism-line-highlight.js
100644 → 100755
@@ -125,6 +125,8 @@ Prism.hooks.add('complete', function(env) { | @@ -125,6 +125,8 @@ Prism.hooks.add('complete', function(env) { | ||
125 | fakeTimer = setTimeout(applyHash, 1); | 125 | fakeTimer = setTimeout(applyHash, 1); |
126 | }); | 126 | }); |
127 | 127 | ||
128 | -addEventListener('hashchange', applyHash); | 128 | +if(window.addEventListener) { |
129 | + window.addEventListener('hashchange', applyHash); | ||
130 | +} | ||
129 | 131 | ||
130 | })(); | 132 | })(); |
bower_components/prism/plugins/line-highlight/prism-line-highlight.min.js
100644 → 100755
1 | -!function(){function e(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function t(e,t){return t=" "+t+" ",(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)>-1}function n(e,n,i){for(var o,l=n.replace(/\s+/g,"").split(","),a=+e.getAttribute("data-line-offset")||0,d=r()?parseInt:parseFloat,c=d(getComputedStyle(e).lineHeight),s=0;o=l[s++];){o=o.split("-");var u=+o[0],m=+o[1]||u,h=document.createElement("div");h.textContent=Array(m-u+2).join(" \n"),h.className=(i||"")+" line-highlight",t(e,"line-numbers")||(h.setAttribute("data-start",u),m>u&&h.setAttribute("data-end",m)),h.style.top=(u-a-1)*c+"px",t(e,"line-numbers")?e.appendChild(h):(e.querySelector("code")||e).appendChild(h)}}function i(){var t=location.hash.slice(1);e(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var i=(t.match(/\.([\d,-]+)$/)||[,""])[1];if(i&&!document.getElementById(t)){var r=t.slice(0,t.lastIndexOf(".")),o=document.getElementById(r);o&&(o.hasAttribute("data-line")||o.setAttribute("data-line",""),n(o,i,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var r=function(){var e;return function(){if("undefined"==typeof e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding=0,t.style.border=0,t.innerHTML=" <br /> ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}}(),o=0;Prism.hooks.add("complete",function(t){var r=t.element.parentNode,l=r&&r.getAttribute("data-line");r&&l&&/pre/i.test(r.nodeName)&&(clearTimeout(o),e(".line-highlight",r).forEach(function(e){e.parentNode.removeChild(e)}),n(r,l),o=setTimeout(i,1))}),addEventListener("hashchange",i)}}(); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(){function e(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function t(e,t){return t=" "+t+" ",(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)>-1}function n(e,n,i){for(var o,a=n.replace(/\s+/g,"").split(","),l=+e.getAttribute("data-line-offset")||0,d=r()?parseInt:parseFloat,c=d(getComputedStyle(e).lineHeight),s=0;o=a[s++];){o=o.split("-");var u=+o[0],m=+o[1]||u,h=document.createElement("div");h.textContent=Array(m-u+2).join(" \n"),h.className=(i||"")+" line-highlight",t(e,"line-numbers")||(h.setAttribute("data-start",u),m>u&&h.setAttribute("data-end",m)),h.style.top=(u-l-1)*c+"px",t(e,"line-numbers")?e.appendChild(h):(e.querySelector("code")||e).appendChild(h)}}function i(){var t=location.hash.slice(1);e(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var i=(t.match(/\.([\d,-]+)$/)||[,""])[1];if(i&&!document.getElementById(t)){var r=t.slice(0,t.lastIndexOf(".")),o=document.getElementById(r);o&&(o.hasAttribute("data-line")||o.setAttribute("data-line",""),n(o,i,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var r=function(){var e;return function(){if("undefined"==typeof e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding=0,t.style.border=0,t.innerHTML=" <br /> ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}}(),o=0;Prism.hooks.add("complete",function(t){var r=t.element.parentNode,a=r&&r.getAttribute("data-line");r&&a&&/pre/i.test(r.nodeName)&&(clearTimeout(o),e(".line-highlight",r).forEach(function(e){e.parentNode.removeChild(e)}),n(r,a),o=setTimeout(i,1))}),window.addEventListener&&window.addEventListener("hashchange",i)}}(); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/plugins/line-numbers/prism-line-numbers.css
100644 → 100755
bower_components/prism/plugins/line-numbers/prism-line-numbers.js
100644 → 100755
bower_components/prism/plugins/line-numbers/prism-line-numbers.min.js
100644 → 100755
bower_components/prism/plugins/previewer-angle/prism-previewer-angle.css
0 → 100755
1 | +.prism-previewer-angle:before { | ||
2 | + -webkit-border-radius: 50%; | ||
3 | + -moz-border-radius: 50%; | ||
4 | + border-radius: 50%; | ||
5 | + background: #fff; | ||
6 | +} | ||
7 | +.prism-previewer-angle:after { | ||
8 | + margin-top: 4px; | ||
9 | +} | ||
10 | +.prism-previewer-angle svg { | ||
11 | + width: 32px; | ||
12 | + height: 32px; | ||
13 | + -webkit-transform: rotate(-90deg); | ||
14 | + -moz-transform: rotate(-90deg); | ||
15 | + -ms-transform: rotate(-90deg); | ||
16 | + -o-transform: rotate(-90deg); | ||
17 | + transform: rotate(-90deg); | ||
18 | +} | ||
19 | +.prism-previewer-angle[data-negative] svg { | ||
20 | + -webkit-transform: scaleX(-1) rotate(-90deg); | ||
21 | + -moz-transform: scaleX(-1) rotate(-90deg); | ||
22 | + -ms-transform: scaleX(-1) rotate(-90deg); | ||
23 | + -o-transform: scaleX(-1) rotate(-90deg); | ||
24 | + transform: scaleX(-1) rotate(-90deg); | ||
25 | +} | ||
26 | +.prism-previewer-angle circle { | ||
27 | + fill: transparent; | ||
28 | + stroke: hsl(200, 10%, 20%); | ||
29 | + stroke-opacity: 0.9; | ||
30 | + stroke-width: 32; | ||
31 | + stroke-dasharray: 0, 500; | ||
32 | +} | ||
0 | \ No newline at end of file | 33 | \ No newline at end of file |
bower_components/prism/plugins/previewer-angle/prism-previewer-angle.js
0 → 100755
1 | +(function() { | ||
2 | + | ||
3 | + if ( | ||
4 | + typeof self !== 'undefined' && !self.Prism || | ||
5 | + typeof global !== 'undefined' && !global.Prism | ||
6 | + ) { | ||
7 | + return; | ||
8 | + } | ||
9 | + | ||
10 | + var languages = { | ||
11 | + 'css': true, | ||
12 | + 'less': true, | ||
13 | + 'markup': { | ||
14 | + lang: 'markup', | ||
15 | + before: 'punctuation', | ||
16 | + inside: 'inside', | ||
17 | + root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'] | ||
18 | + }, | ||
19 | + 'sass': [ | ||
20 | + { | ||
21 | + lang: 'sass', | ||
22 | + inside: 'inside', | ||
23 | + root: Prism.languages.sass && Prism.languages.sass['property-line'] | ||
24 | + }, | ||
25 | + { | ||
26 | + lang: 'sass', | ||
27 | + before: 'operator', | ||
28 | + inside: 'inside', | ||
29 | + root: Prism.languages.sass && Prism.languages.sass['variable-line'] | ||
30 | + } | ||
31 | + ], | ||
32 | + 'scss': true, | ||
33 | + 'stylus': [ | ||
34 | + { | ||
35 | + lang: 'stylus', | ||
36 | + before: 'func', | ||
37 | + inside: 'rest', | ||
38 | + root: Prism.languages.stylus && Prism.languages.stylus['property-declaration'].inside | ||
39 | + }, | ||
40 | + { | ||
41 | + lang: 'stylus', | ||
42 | + before: 'func', | ||
43 | + inside: 'rest', | ||
44 | + root: Prism.languages.stylus && Prism.languages.stylus['variable-declaration'].inside | ||
45 | + } | ||
46 | + ] | ||
47 | + }; | ||
48 | + | ||
49 | + Prism.hooks.add('before-highlight', function (env) { | ||
50 | + if (env.language && languages[env.language] && !languages[env.language].initialized) { | ||
51 | + var lang = languages[env.language]; | ||
52 | + if (Prism.util.type(lang) !== 'Array') { | ||
53 | + lang = [lang]; | ||
54 | + } | ||
55 | + lang.forEach(function(lang) { | ||
56 | + var before, inside, root, skip; | ||
57 | + if (lang === true) { | ||
58 | + before = 'important'; | ||
59 | + inside = env.language; | ||
60 | + lang = env.language; | ||
61 | + } else { | ||
62 | + before = lang.before || 'important'; | ||
63 | + inside = lang.inside || lang.lang; | ||
64 | + root = lang.root || Prism.languages; | ||
65 | + skip = lang.skip; | ||
66 | + lang = env.language; | ||
67 | + } | ||
68 | + | ||
69 | + if (!skip && Prism.languages[lang]) { | ||
70 | + Prism.languages.insertBefore(inside, before, { | ||
71 | + 'angle': /(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i | ||
72 | + }, root); | ||
73 | + env.grammar = Prism.languages[lang]; | ||
74 | + | ||
75 | + languages[env.language] = {initialized: true}; | ||
76 | + } | ||
77 | + }); | ||
78 | + } | ||
79 | + }); | ||
80 | + | ||
81 | + if (Prism.plugins.Previewer) { | ||
82 | + new Prism.plugins.Previewer('angle', function(value) { | ||
83 | + var num = parseFloat(value); | ||
84 | + var unit = value.match(/[a-z]+$/i); | ||
85 | + var max, percentage; | ||
86 | + if (!num || !unit) { | ||
87 | + return false; | ||
88 | + } | ||
89 | + unit = unit[0]; | ||
90 | + | ||
91 | + switch(unit) { | ||
92 | + case 'deg': | ||
93 | + max = 360; | ||
94 | + break; | ||
95 | + case 'grad': | ||
96 | + max = 400; | ||
97 | + break; | ||
98 | + case 'rad': | ||
99 | + max = 2 * Math.PI; | ||
100 | + break; | ||
101 | + case 'turn': | ||
102 | + max = 1; | ||
103 | + } | ||
104 | + | ||
105 | + percentage = 100 * num/max; | ||
106 | + percentage %= 100; | ||
107 | + | ||
108 | + this[(num < 0? 'set' : 'remove') + 'Attribute']('data-negative', ''); | ||
109 | + this.querySelector('circle').style.strokeDasharray = Math.abs(percentage) + ',500'; | ||
110 | + return true; | ||
111 | + }, '*', function () { | ||
112 | + this._elt.innerHTML = '<svg viewBox="0 0 64 64">' + | ||
113 | + '<circle r="16" cy="32" cx="32"></circle>' + | ||
114 | + '</svg>'; | ||
115 | + }); | ||
116 | + } | ||
117 | + | ||
118 | +}()); | ||
0 | \ No newline at end of file | 119 | \ No newline at end of file |
bower_components/prism/plugins/previewer-angle/prism-previewer-angle.min.js
0 → 100755
1 | +!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var a={css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]};Prism.hooks.add("before-highlight",function(s){if(s.language&&a[s.language]&&!a[s.language].initialized){var e=a[s.language];"Array"!==Prism.util.type(e)&&(e=[e]),e.forEach(function(e){var i,r,n,g;e===!0?(i="important",r=s.language,e=s.language):(i=e.before||"important",r=e.inside||e.lang,n=e.root||Prism.languages,g=e.skip,e=s.language),!g&&Prism.languages[e]&&(Prism.languages.insertBefore(r,i,{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},n),s.grammar=Prism.languages[e],a[s.language]={initialized:!0})})}}),Prism.plugins.Previewer&&new Prism.plugins.Previewer("angle",function(a){var s,e,i=parseFloat(a),r=a.match(/[a-z]+$/i);if(!i||!r)return!1;switch(r=r[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return e=100*i/s,e%=100,this[(0>i?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(e)+",500",!0},"*",function(){this._elt.innerHTML='<svg viewBox="0 0 64 64"><circle r="16" cy="32" cx="32"></circle></svg>'})}}(); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/plugins/previewer-base/prism-previewer-base.css
100644 → 100755
bower_components/prism/plugins/previewer-base/prism-previewer-base.js
100644 → 100755
bower_components/prism/plugins/previewer-base/prism-previewer-base.min.js
100644 → 100755
1 | -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t=function(t){var e=0,s=0,i=t;if(i.parentNode){do e+=i.offsetLeft,s+=i.offsetTop;while((i=i.offsetParent)&&i.nodeType<9);i=t;do e-=i.scrollLeft,s-=i.scrollTop;while((i=i.parentNode)&&!/body/i.test(i.nodeName))}return{top:s,right:innerWidth-e-t.offsetWidth,bottom:innerHeight-s-t.offsetHeight,left:e}},e=/(?:^|\s)token(?=$|\s)/,s=/(?:^|\s)active(?=$|\s)/g,i=/(?:^|\s)flipped(?=$|\s)/g,o=function(t,e,s,i){this._elt=null,this._type=t,this._clsRegexp=RegExp("(?:^|\\s)"+t+"(?=$|\\s)"),this._token=null,this.updater=e,this._mouseout=this.mouseout.bind(this),this.initializer=i;var n=this;s||(s=["*"]),"Array"!==Prism.util.type(s)&&(s=[s]),s.forEach(function(t){"string"!=typeof t&&(t=t.lang),o.byLanguages[t]||(o.byLanguages[t]=[]),o.byLanguages[t].indexOf(n)<0&&o.byLanguages[t].push(n)}),o.byType[t]=this};o.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},o.prototype.check=function(t){do if(e.test(t.className)&&this._clsRegexp.test(t.className))break;while(t=t.parentNode);t&&t!==this._token&&(this._token=t,this.show())},o.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},o.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=t(this._token);this._elt.className+=" active",e.top-this._elt.offsetHeight>0?(this._elt.className=this._elt.className.replace(i,""),this._elt.style.top=e.top+"px",this._elt.style.bottom=""):(this._elt.className+=" flipped",this._elt.style.bottom=e.bottom+"px",this._elt.style.top=""),this._elt.style.left=e.left+Math.min(200,this._token.offsetWidth/2)+"px"}else this.hide()},o.prototype.hide=function(){this._elt.className=this._elt.className.replace(s,"")},o.byLanguages={},o.byType={},o.initEvents=function(t,e){var s=[];o.byLanguages[e]&&(s=s.concat(o.byLanguages[e])),o.byLanguages["*"]&&(s=s.concat(o.byLanguages["*"])),t.addEventListener("mouseover",function(t){var e=t.target;s.forEach(function(t){t.check(e)})},!1)},Prism.plugins.Previewer=o,Prism.hooks.add("after-highlight",function(t){(o.byLanguages["*"]||o.byLanguages[t.language])&&o.initEvents(t.element,t.language)})}}(); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&Function.prototype.bind){var t=function(t){var e=0,s=0,i=t;if(i.parentNode){do e+=i.offsetLeft,s+=i.offsetTop;while((i=i.offsetParent)&&i.nodeType<9);i=t;do e-=i.scrollLeft,s-=i.scrollTop;while((i=i.parentNode)&&!/body/i.test(i.nodeName))}return{top:s,right:innerWidth-e-t.offsetWidth,bottom:innerHeight-s-t.offsetHeight,left:e}},e=/(?:^|\s)token(?=$|\s)/,s=/(?:^|\s)active(?=$|\s)/g,i=/(?:^|\s)flipped(?=$|\s)/g,o=function(t,e,s,i){this._elt=null,this._type=t,this._clsRegexp=RegExp("(?:^|\\s)"+t+"(?=$|\\s)"),this._token=null,this.updater=e,this._mouseout=this.mouseout.bind(this),this.initializer=i;var n=this;s||(s=["*"]),"Array"!==Prism.util.type(s)&&(s=[s]),s.forEach(function(t){"string"!=typeof t&&(t=t.lang),o.byLanguages[t]||(o.byLanguages[t]=[]),o.byLanguages[t].indexOf(n)<0&&o.byLanguages[t].push(n)}),o.byType[t]=this};o.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},o.prototype.check=function(t){do if(e.test(t.className)&&this._clsRegexp.test(t.className))break;while(t=t.parentNode);t&&t!==this._token&&(this._token=t,this.show())},o.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},o.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=t(this._token);this._elt.className+=" active",e.top-this._elt.offsetHeight>0?(this._elt.className=this._elt.className.replace(i,""),this._elt.style.top=e.top+"px",this._elt.style.bottom=""):(this._elt.className+=" flipped",this._elt.style.bottom=e.bottom+"px",this._elt.style.top=""),this._elt.style.left=e.left+Math.min(200,this._token.offsetWidth/2)+"px"}else this.hide()},o.prototype.hide=function(){this._elt.className=this._elt.className.replace(s,"")},o.byLanguages={},o.byType={},o.initEvents=function(t,e){var s=[];o.byLanguages[e]&&(s=s.concat(o.byLanguages[e])),o.byLanguages["*"]&&(s=s.concat(o.byLanguages["*"])),t.addEventListener("mouseover",function(t){var e=t.target;s.forEach(function(t){t.check(e)})},!1)},Prism.plugins.Previewer=o,Prism.hooks.add("after-highlight",function(t){(o.byLanguages["*"]||o.byLanguages[t.language])&&o.initEvents(t.element,t.language)})}}(); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/plugins/previewer-color/prism-previewer-color.css
100644 → 100755
bower_components/prism/plugins/previewer-color/prism-previewer-color.js
100644 → 100755
bower_components/prism/plugins/previewer-color/prism-previewer-color.min.js
100644 → 100755
bower_components/prism/plugins/previewer-easing/prism-previewer-easing.css
100644 → 100755
bower_components/prism/plugins/previewer-easing/prism-previewer-easing.js
100644 → 100755
bower_components/prism/plugins/previewer-easing/prism-previewer-easing.min.js
100644 → 100755
bower_components/prism/plugins/previewer-gradient/prism-previewer-gradient.css
100644 → 100755
bower_components/prism/plugins/previewer-gradient/prism-previewer-gradient.js
100644 → 100755
bower_components/prism/plugins/previewer-gradient/prism-previewer-gradient.min.js
100644 → 100755
bower_components/prism/plugins/previewer-time/prism-previewer-time.css
0 → 100755
1 | +@-webkit-keyframes prism-previewer-time { | ||
2 | + 0% { | ||
3 | + stroke-dasharray: 0, 500; | ||
4 | + stroke-dashoffset: 0; | ||
5 | + } | ||
6 | + 50% { | ||
7 | + stroke-dasharray: 100, 500; | ||
8 | + stroke-dashoffset: 0; | ||
9 | + } | ||
10 | + 100% { | ||
11 | + stroke-dasharray: 0, 500; | ||
12 | + stroke-dashoffset: -100; | ||
13 | + } | ||
14 | +} | ||
15 | + | ||
16 | +@-o-keyframes prism-previewer-time { | ||
17 | + 0% { | ||
18 | + stroke-dasharray: 0, 500; | ||
19 | + stroke-dashoffset: 0; | ||
20 | + } | ||
21 | + 50% { | ||
22 | + stroke-dasharray: 100, 500; | ||
23 | + stroke-dashoffset: 0; | ||
24 | + } | ||
25 | + 100% { | ||
26 | + stroke-dasharray: 0, 500; | ||
27 | + stroke-dashoffset: -100; | ||
28 | + } | ||
29 | +} | ||
30 | + | ||
31 | +@-moz-keyframes prism-previewer-time { | ||
32 | + 0% { | ||
33 | + stroke-dasharray: 0, 500; | ||
34 | + stroke-dashoffset: 0; | ||
35 | + } | ||
36 | + 50% { | ||
37 | + stroke-dasharray: 100, 500; | ||
38 | + stroke-dashoffset: 0; | ||
39 | + } | ||
40 | + 100% { | ||
41 | + stroke-dasharray: 0, 500; | ||
42 | + stroke-dashoffset: -100; | ||
43 | + } | ||
44 | +} | ||
45 | + | ||
46 | +@keyframes prism-previewer-time { | ||
47 | + 0% { | ||
48 | + stroke-dasharray: 0, 500; | ||
49 | + stroke-dashoffset: 0; | ||
50 | + } | ||
51 | + 50% { | ||
52 | + stroke-dasharray: 100, 500; | ||
53 | + stroke-dashoffset: 0; | ||
54 | + } | ||
55 | + 100% { | ||
56 | + stroke-dasharray: 0, 500; | ||
57 | + stroke-dashoffset: -100; | ||
58 | + } | ||
59 | +} | ||
60 | + | ||
61 | +.prism-previewer-time:before { | ||
62 | + -webkit-border-radius: 50%; | ||
63 | + -moz-border-radius: 50%; | ||
64 | + border-radius: 50%; | ||
65 | + background: #fff; | ||
66 | +} | ||
67 | +.prism-previewer-time:after { | ||
68 | + margin-top: 4px; | ||
69 | +} | ||
70 | +.prism-previewer-time svg { | ||
71 | + width: 32px; | ||
72 | + height: 32px; | ||
73 | + -webkit-transform: rotate(-90deg); | ||
74 | + -moz-transform: rotate(-90deg); | ||
75 | + -ms-transform: rotate(-90deg); | ||
76 | + -o-transform: rotate(-90deg); | ||
77 | + transform: rotate(-90deg); | ||
78 | +} | ||
79 | +.prism-previewer-time circle { | ||
80 | + fill: transparent; | ||
81 | + stroke: hsl(200, 10%, 20%); | ||
82 | + stroke-opacity: 0.9; | ||
83 | + stroke-width: 32; | ||
84 | + stroke-dasharray: 0, 500; | ||
85 | + stroke-dashoffset: 0; | ||
86 | + -webkit-animation: prism-previewer-time linear infinite 3s; | ||
87 | + -moz-animation: prism-previewer-time linear infinite 3s; | ||
88 | + -o-animation: prism-previewer-time linear infinite 3s; | ||
89 | + animation: prism-previewer-time linear infinite 3s; | ||
90 | +} | ||
0 | \ No newline at end of file | 91 | \ No newline at end of file |
bower_components/prism/plugins/previewer-time/prism-previewer-time.js
0 → 100755
1 | +(function() { | ||
2 | + | ||
3 | + if ( | ||
4 | + typeof self !== 'undefined' && !self.Prism || | ||
5 | + typeof global !== 'undefined' && !global.Prism | ||
6 | + ) { | ||
7 | + return; | ||
8 | + } | ||
9 | + | ||
10 | + var languages = { | ||
11 | + 'css': true, | ||
12 | + 'less': true, | ||
13 | + 'markup': { | ||
14 | + lang: 'markup', | ||
15 | + before: 'punctuation', | ||
16 | + inside: 'inside', | ||
17 | + root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'] | ||
18 | + }, | ||
19 | + 'sass': [ | ||
20 | + { | ||
21 | + lang: 'sass', | ||
22 | + inside: 'inside', | ||
23 | + root: Prism.languages.sass && Prism.languages.sass['property-line'] | ||
24 | + }, | ||
25 | + { | ||
26 | + lang: 'sass', | ||
27 | + before: 'operator', | ||
28 | + inside: 'inside', | ||
29 | + root: Prism.languages.sass && Prism.languages.sass['variable-line'] | ||
30 | + } | ||
31 | + ], | ||
32 | + 'scss': true, | ||
33 | + 'stylus': [ | ||
34 | + { | ||
35 | + lang: 'stylus', | ||
36 | + before: 'hexcode', | ||
37 | + inside: 'rest', | ||
38 | + root: Prism.languages.stylus && Prism.languages.stylus['property-declaration'].inside | ||
39 | + }, | ||
40 | + { | ||
41 | + lang: 'stylus', | ||
42 | + before: 'hexcode', | ||
43 | + inside: 'rest', | ||
44 | + root: Prism.languages.stylus && Prism.languages.stylus['variable-declaration'].inside | ||
45 | + } | ||
46 | + ] | ||
47 | + }; | ||
48 | + | ||
49 | + Prism.hooks.add('before-highlight', function (env) { | ||
50 | + if (env.language && languages[env.language] && !languages[env.language].initialized) { | ||
51 | + var lang = languages[env.language]; | ||
52 | + if (Prism.util.type(lang) !== 'Array') { | ||
53 | + lang = [lang]; | ||
54 | + } | ||
55 | + lang.forEach(function(lang) { | ||
56 | + var before, inside, root, skip; | ||
57 | + if (lang === true) { | ||
58 | + before = 'important'; | ||
59 | + inside = env.language; | ||
60 | + lang = env.language; | ||
61 | + } else { | ||
62 | + before = lang.before || 'important'; | ||
63 | + inside = lang.inside || lang.lang; | ||
64 | + root = lang.root || Prism.languages; | ||
65 | + skip = lang.skip; | ||
66 | + lang = env.language; | ||
67 | + } | ||
68 | + | ||
69 | + if (!skip && Prism.languages[lang]) { | ||
70 | + Prism.languages.insertBefore(inside, before, { | ||
71 | + 'time': /(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i | ||
72 | + }, root); | ||
73 | + env.grammar = Prism.languages[lang]; | ||
74 | + | ||
75 | + languages[env.language] = {initialized: true}; | ||
76 | + } | ||
77 | + }); | ||
78 | + } | ||
79 | + }); | ||
80 | + | ||
81 | + if (Prism.plugins.Previewer) { | ||
82 | + new Prism.plugins.Previewer('time', function(value) { | ||
83 | + var num = parseFloat(value); | ||
84 | + var unit = value.match(/[a-z]+$/i); | ||
85 | + if (!num || !unit) { | ||
86 | + return false; | ||
87 | + } | ||
88 | + unit = unit[0]; | ||
89 | + this.querySelector('circle').style.animationDuration = 2 * num + unit; | ||
90 | + return true; | ||
91 | + }, '*', function () { | ||
92 | + this._elt.innerHTML = '<svg viewBox="0 0 64 64">' + | ||
93 | + '<circle r="16" cy="32" cx="32"></circle>' + | ||
94 | + '</svg>'; | ||
95 | + }); | ||
96 | + } | ||
97 | + | ||
98 | +}()); | ||
0 | \ No newline at end of file | 99 | \ No newline at end of file |
bower_components/prism/plugins/previewer-time/prism-previewer-time.min.js
0 → 100755
1 | +!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var s={css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]};Prism.hooks.add("before-highlight",function(e){if(e.language&&s[e.language]&&!s[e.language].initialized){var a=s[e.language];"Array"!==Prism.util.type(a)&&(a=[a]),a.forEach(function(a){var i,r,n,l;a===!0?(i="important",r=e.language,a=e.language):(i=a.before||"important",r=a.inside||a.lang,n=a.root||Prism.languages,l=a.skip,a=e.language),!l&&Prism.languages[a]&&(Prism.languages.insertBefore(r,i,{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},n),e.grammar=Prism.languages[a],s[e.language]={initialized:!0})})}}),Prism.plugins.Previewer&&new Prism.plugins.Previewer("time",function(s){var e=parseFloat(s),a=s.match(/[a-z]+$/i);return e&&a?(a=a[0],this.querySelector("circle").style.animationDuration=2*e+a,!0):!1},"*",function(){this._elt.innerHTML='<svg viewBox="0 0 64 64"><circle r="16" cy="32" cx="32"></circle></svg>'})}}(); | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.js
100644 → 100755
bower_components/prism/plugins/remove-initial-line-feed/prism-remove-initial-line-feed.min.js
100644 → 100755
bower_components/prism/plugins/show-invisibles/prism-show-invisibles.css
100644 → 100755
bower_components/prism/plugins/show-invisibles/prism-show-invisibles.js
100644 → 100755
bower_components/prism/plugins/show-invisibles/prism-show-invisibles.min.js
100644 → 100755
bower_components/prism/plugins/show-language/prism-show-language.css
100644 → 100755
bower_components/prism/plugins/show-language/prism-show-language.js
100644 → 100755
@@ -5,7 +5,7 @@ if (typeof self === 'undefined' || !self.Prism || !self.document) { | @@ -5,7 +5,7 @@ if (typeof self === 'undefined' || !self.Prism || !self.document) { | ||
5 | } | 5 | } |
6 | 6 | ||
7 | // The languages map is built automatically with gulp | 7 | // The languages map is built automatically with gulp |
8 | -var Languages = /*languages_placeholder[*/{"css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","aspnet":"ASP.NET (C#)","autoit":"AutoIt","autohotkey":"AutoHotkey","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","css-extras":"CSS Extras","fsharp":"F#","glsl":"GLSL","http":"HTTP","inform7":"Inform 7","latex":"LaTeX","lolcode":"LOLCODE","matlab":"MATLAB","mel":"MEL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","php":"PHP","php-extras":"PHP Extras","powershell":"PowerShell","jsx":"React JSX","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","typescript":"TypeScript","vhdl":"VHDL","vim":"vim","wiki":"Wiki markup","yaml":"YAML"}/*]*/; | 8 | +var Languages = /*languages_placeholder[*/{"css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","asciidoc":"AsciiDoc","aspnet":"ASP.NET (C#)","autoit":"AutoIt","autohotkey":"AutoHotkey","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","css-extras":"CSS Extras","fsharp":"F#","glsl":"GLSL","http":"HTTP","inform7":"Inform 7","latex":"LaTeX","lolcode":"LOLCODE","matlab":"MATLAB","mel":"MEL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","powershell":"PowerShell","jsx":"React JSX","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","typescript":"TypeScript","vhdl":"VHDL","vim":"vim","wiki":"Wiki markup","yaml":"YAML"}/*]*/; |
9 | Prism.hooks.add('before-highlight', function(env) { | 9 | Prism.hooks.add('before-highlight', function(env) { |
10 | var pre = env.element.parentNode; | 10 | var pre = env.element.parentNode; |
11 | if (!pre || !/pre/i.test(pre.nodeName)) { | 11 | if (!pre || !/pre/i.test(pre.nodeName)) { |
bower_components/prism/plugins/show-language/prism-show-language.min.css
0 → 100644
1 | +pre[class*=language-]{position:relative}pre[class*=language-][data-language]::before{content:attr(data-language);color:#000;background-color:#CFCFCF;display:inline-block;position:absolute;top:0;right:0;font-size:.9em;border-radius:0 0 0 5px;padding:0 .5em;text-shadow:none} | ||
0 | \ No newline at end of file | 2 | \ No newline at end of file |
bower_components/prism/plugins/show-language/prism-show-language.min.js
100644 → 100755
1 | -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e={css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",aspnet:"ASP.NET (C#)",autoit:"AutoIt",autohotkey:"AutoHotkey",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript","css-extras":"CSS Extras",fsharp:"F#",glsl:"GLSL",http:"HTTP",inform7:"Inform 7",latex:"LaTeX",lolcode:"LOLCODE",matlab:"MATLAB",mel:"MEL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",php:"PHP","php-extras":"PHP Extras",powershell:"PowerShell",jsx:"React JSX",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",typescript:"TypeScript",vhdl:"VHDL",vim:"vim",wiki:"Wiki markup",yaml:"YAML"};Prism.hooks.add("before-highlight",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=e[a.language]||a.language.substring(0,1).toUpperCase()+a.language.substring(1);t.setAttribute("data-language",s);var i,r,l=t.previousSibling;l&&/\s*\bprism-show-language\b\s*/.test(l.className)&&l.firstChild&&/\s*\bprism-show-language-label\b\s*/.test(l.firstChild.className)?(r=l.firstChild,r.getAttribute("data-language")!==s&&(r.setAttribute("data-language",s),r.innerHTML=s)):(i=document.createElement("div"),r=document.createElement("div"),r.className="prism-show-language-label",r.setAttribute("data-language",s),r.innerHTML=s,i.className="prism-show-language",i.appendChild(r),t.parentNode.insertBefore(i,t))}})}}(); | ||
2 | \ No newline at end of file | 1 | \ No newline at end of file |
2 | +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e={css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",asciidoc:"AsciiDoc",aspnet:"ASP.NET (C#)",autoit:"AutoIt",autohotkey:"AutoHotkey",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript","css-extras":"CSS Extras",fsharp:"F#",glsl:"GLSL",http:"HTTP",inform7:"Inform 7",latex:"LaTeX",lolcode:"LOLCODE",matlab:"MATLAB",mel:"MEL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",powershell:"PowerShell",jsx:"React JSX",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",typescript:"TypeScript",vhdl:"VHDL",vim:"vim",wiki:"Wiki markup",yaml:"YAML"};Prism.hooks.add("before-highlight",function(a){var s=a.element.parentNode;if(s&&/pre/i.test(s.nodeName)){var t=e[a.language]||a.language.substring(0,1).toUpperCase()+a.language.substring(1);s.setAttribute("data-language",t);var i,r,l=s.previousSibling;l&&/\s*\bprism-show-language\b\s*/.test(l.className)&&l.firstChild&&/\s*\bprism-show-language-label\b\s*/.test(l.firstChild.className)?(r=l.firstChild,r.getAttribute("data-language")!==t&&(r.setAttribute("data-language",t),r.innerHTML=t)):(i=document.createElement("div"),r=document.createElement("div"),r.className="prism-show-language-label",r.setAttribute("data-language",t),r.innerHTML=t,i.className="prism-show-language",i.appendChild(r),s.parentNode.insertBefore(i,s))}})}}(); | ||
3 | \ No newline at end of file | 3 | \ No newline at end of file |
bower_components/prism/plugins/wpd/prism-wpd.css
100644 → 100755
bower_components/prism/plugins/wpd/prism-wpd.js
100644 → 100755
bower_components/prism/plugins/wpd/prism-wpd.min.js
100644 → 100755
bower_components/prism/prism.js
100644 → 100755
@@ -449,7 +449,7 @@ Prism.languages.markup = { | @@ -449,7 +449,7 @@ Prism.languages.markup = { | ||
449 | 'doctype': /<!DOCTYPE[\w\W]+?>/, | 449 | 'doctype': /<!DOCTYPE[\w\W]+?>/, |
450 | 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i, | 450 | 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i, |
451 | 'tag': { | 451 | 'tag': { |
452 | - pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\|\?(?!)[\w\W])*|[^\s'">=]+))?)*\s*\/?>/i, | 452 | + pattern: /<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\|\?(?!)[\w\W])*|[^\s'">=]+))?)*\s*\/?>/i, |
453 | inside: { | 453 | inside: { |
454 | 'tag': { | 454 | 'tag': { |
455 | pattern: /^<\/?[^\s>\/]+/i, | 455 | pattern: /^<\/?[^\s>\/]+/i, |
@@ -581,7 +581,7 @@ Prism.languages.clike = { | @@ -581,7 +581,7 @@ Prism.languages.clike = { | ||
581 | ********************************************** */ | 581 | ********************************************** */ |
582 | 582 | ||
583 | Prism.languages.javascript = Prism.languages.extend('clike', { | 583 | Prism.languages.javascript = Prism.languages.extend('clike', { |
584 | - 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/, | 584 | + 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, |
585 | 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, | 585 | 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, |
586 | // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) | 586 | // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) |
587 | 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i | 587 | 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i |
bower_components/prism/tests/helper/components.js
100644 → 100755
bower_components/prism/tests/helper/prism-loader.js
100644 → 100755
bower_components/prism/tests/helper/test-case.js
100644 → 100755
bower_components/prism/tests/helper/test-discovery.js
100644 → 100755
bower_components/prism/tests/helper/token-stream-transformer.js
100644 → 100755
bower_components/prism/tests/languages/abap/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/abap/eol-comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/abap/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/abap/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/abap/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/abap/string-template_feature.test
100644 → 100755
bower_components/prism/tests/languages/abap/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/actionscript/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/actionscript/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/apacheconf/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/apacheconf/directive-block_feature.test
100644 → 100755
bower_components/prism/tests/languages/apacheconf/directive-flags_feature.test
100644 → 100755
bower_components/prism/tests/languages/apacheconf/directive-inline_feature.test
100644 → 100755
bower_components/prism/tests/languages/apacheconf/regex_feature.test
100644 → 100755
bower_components/prism/tests/languages/apacheconf/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/apacheconf/variable_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/assignment_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/constant_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/dfn_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/dyadic-operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/function_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/monadic-operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/statement_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/apl/system-function_feature.test
100644 → 100755
bower_components/prism/tests/languages/applescript/class_feature.test
100644 → 100755
bower_components/prism/tests/languages/applescript/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/applescript/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/applescript/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/applescript/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/applescript/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/asciidoc/admonition_feature.test
0 → 100755
1 | +TIP: Foobar | ||
2 | +NOTE: Foo bar baz | ||
3 | +IMPORTANT: Foobar | ||
4 | +WARNING: Foo bar baz | ||
5 | +CAUTION: Foobar | ||
6 | + | ||
7 | +---------------------------------------------------- | ||
8 | + | ||
9 | +[ | ||
10 | + ["admonition", "TIP:"], " Foobar\r\n", | ||
11 | + ["admonition", "NOTE:"], " Foo bar baz\r\n", | ||
12 | + ["admonition", "IMPORTANT:"], " Foobar\r\n", | ||
13 | + ["admonition", "WARNING:"], " Foo bar baz\r\n", | ||
14 | + ["admonition", "CAUTION:"], " Foobar" | ||
15 | +] | ||
16 | + | ||
17 | +---------------------------------------------------- | ||
18 | + | ||
19 | +Checks for admonitions. | ||
0 | \ No newline at end of file | 20 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/attribute-entry_feature.test
0 → 100755
1 | +:Foo bar: baz | ||
2 | + | ||
3 | +:Foobar: Foo + | ||
4 | +bar + | ||
5 | +baz | ||
6 | + | ||
7 | +:Foo bar!: | ||
8 | +:Foobar!: | ||
9 | + | ||
10 | +===== | ||
11 | +:Foo bar: baz | ||
12 | + | ||
13 | +:Foobar: Foo + | ||
14 | +bar + | ||
15 | +baz | ||
16 | + | ||
17 | +:Foo bar!: | ||
18 | +:Foobar!: | ||
19 | +===== | ||
20 | + | ||
21 | +|===== | ||
22 | +| | ||
23 | +:Foo bar: baz | ||
24 | + | ||
25 | +:Foobar: Foo + | ||
26 | +bar + | ||
27 | +baz | ||
28 | +|===== | ||
29 | + | ||
30 | +---------------------------------------------------- | ||
31 | + | ||
32 | +[ | ||
33 | + ["attribute-entry", ":Foo bar: baz"], | ||
34 | + ["attribute-entry", ":Foobar: Foo +\r\nbar +\r\nbaz"], | ||
35 | + ["attribute-entry", ":Foo bar!:"], | ||
36 | + ["attribute-entry", ":Foobar!:"], | ||
37 | + | ||
38 | + ["other-block", [ | ||
39 | + ["punctuation", "====="], | ||
40 | + ["attribute-entry", ":Foo bar: baz"], | ||
41 | + ["attribute-entry", ":Foobar: Foo +\r\nbar +\r\nbaz"], | ||
42 | + ["attribute-entry", ":Foo bar!:"], | ||
43 | + ["attribute-entry", ":Foobar!:"], | ||
44 | + ["punctuation", "====="] | ||
45 | + ]], | ||
46 | + | ||
47 | + ["table", [ | ||
48 | + ["punctuation", "|====="], | ||
49 | + ["punctuation", "|"], | ||
50 | + ["attribute-entry", ":Foo bar: baz"], | ||
51 | + ["attribute-entry", ":Foobar: Foo +\r\nbar +\r\nbaz"], | ||
52 | + ["punctuation", "|====="] | ||
53 | + ]] | ||
54 | +] | ||
55 | + | ||
56 | +---------------------------------------------------- | ||
57 | + | ||
58 | +Checks for attribute entries. | ||
0 | \ No newline at end of file | 59 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/attributes_feature.test
0 → 100755
1 | +Foo [big red yellow-background]#obvious# | ||
2 | + | ||
3 | +[float] | ||
4 | +[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] | ||
5 | +[quote,'"with *an* image" image:foo.png[] (TM)'] | ||
6 | + | ||
7 | +[NOTE] | ||
8 | +[icon="./images/icons/wink.png"] | ||
9 | +[icons=None, caption="My Special Note"] | ||
10 | +[start=7] | ||
11 | + | ||
12 | +[cols="e,m,^,>s",width="25%"] | ||
13 | + | ||
14 | +===== | ||
15 | +Foo [big red yellow-background]#obvious# | ||
16 | + | ||
17 | +[float] | ||
18 | +[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] | ||
19 | +[quote,'"with *an* image" image:foo.png[] (TM)'] | ||
20 | + | ||
21 | +[NOTE] | ||
22 | +[icon="./images/icons/wink.png"] | ||
23 | +[icons=None, caption="My Special Note"] | ||
24 | +[start=7] | ||
25 | + | ||
26 | +[cols="e,m,^,>s",width="25%"] | ||
27 | +===== | ||
28 | + | ||
29 | +|===== | ||
30 | +| | ||
31 | +Foo [big red yellow-background]#obvious# | ||
32 | + | ||
33 | +[float] | ||
34 | +[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] | ||
35 | +[quote,'"with *an* image" image:foo.png[] (TM)'] | ||
36 | + | ||
37 | +[NOTE] | ||
38 | +[icon="./images/icons/wink.png"] | ||
39 | +[icons=None, caption="My Special Note"] | ||
40 | +[start=7] | ||
41 | + | ||
42 | +[cols="e,m,^,>s",width="25%"] | ||
43 | +|===== | ||
44 | + | ||
45 | + | ||
46 | +latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] | ||
47 | +asciimath:[`x/x={(1,if x!=0),(text{undefined},if x=0):}`] | ||
48 | +latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$] | ||
49 | + | ||
50 | +---------------------------------------------------- | ||
51 | + | ||
52 | +[ | ||
53 | + "Foo ", | ||
54 | + ["inline", [ | ||
55 | + ["attributes", [ | ||
56 | + ["punctuation", "["], | ||
57 | + ["attr-value", "big red yellow-background"], | ||
58 | + ["punctuation", "]"] | ||
59 | + ]], | ||
60 | + ["punctuation", "#"], "obvious", ["punctuation", "#"] | ||
61 | + ]], | ||
62 | + | ||
63 | + ["attributes", [ | ||
64 | + ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"] | ||
65 | + ]], | ||
66 | + ["attributes", [ | ||
67 | + ["punctuation", "["], | ||
68 | + ["attr-value", "quote"], ["punctuation", ","], | ||
69 | + ["interpreted", [ | ||
70 | + ["punctuation", "'"], | ||
71 | + ["macro", [ | ||
72 | + ["function", "http"], ["punctuation", ":"], | ||
73 | + "//en.wikipedia.org/wiki/Samuel_Johnson", | ||
74 | + ["attributes", [ | ||
75 | + ["punctuation", "["], | ||
76 | + ["attr-value", "Samuel Johnson"], | ||
77 | + ["punctuation", "]"] | ||
78 | + ]] | ||
79 | + ]], | ||
80 | + ["punctuation", "'"] | ||
81 | + ]], | ||
82 | + ["punctuation", "]"] | ||
83 | + ]], | ||
84 | + ["attributes", [ | ||
85 | + ["punctuation", "["], | ||
86 | + ["attr-value", "quote"], ["punctuation", ","], | ||
87 | + ["interpreted", [ | ||
88 | + ["punctuation", "'"], | ||
89 | + ["entity", """], | ||
90 | + "with ", | ||
91 | + ["inline", [ | ||
92 | + ["bold", [ | ||
93 | + ["punctuation", "*"], "an", ["punctuation", "*"] | ||
94 | + ]] | ||
95 | + ]], | ||
96 | + " image", | ||
97 | + ["entity", """], | ||
98 | + ["macro", [ | ||
99 | + ["function", "image"], ["punctuation", ":"], | ||
100 | + "foo.png", | ||
101 | + ["attributes", [ | ||
102 | + ["punctuation", "["], ["punctuation", "]"] | ||
103 | + ]] | ||
104 | + ]], | ||
105 | + ["replacement", "(TM)"], | ||
106 | + ["punctuation", "'"] | ||
107 | + ]], | ||
108 | + ["punctuation", "]"] | ||
109 | + ]], | ||
110 | + | ||
111 | + ["attributes", [ | ||
112 | + ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"] | ||
113 | + ]], | ||
114 | + ["attributes", [ | ||
115 | + ["punctuation", "["], | ||
116 | + ["variable", "icon"], | ||
117 | + ["operator", "="], | ||
118 | + ["string", "\"./images/icons/wink.png\""], | ||
119 | + ["punctuation", "]"] | ||
120 | + ]], | ||
121 | + ["attributes", [ | ||
122 | + ["punctuation", "["], | ||
123 | + ["variable", "icons"], | ||
124 | + ["operator", "="], | ||
125 | + ["attr-value", "None"], | ||
126 | + ["punctuation", ","], | ||
127 | + ["variable", "caption"], | ||
128 | + ["operator", "="], | ||
129 | + ["string", "\"My Special Note\""], | ||
130 | + ["punctuation", "]"] | ||
131 | + ]], | ||
132 | + ["attributes", [ | ||
133 | + ["punctuation", "["], | ||
134 | + ["variable", "start"], | ||
135 | + ["operator", "="], | ||
136 | + ["attr-value", "7"], | ||
137 | + ["punctuation", "]"] | ||
138 | + ]], | ||
139 | + | ||
140 | + ["attributes", [ | ||
141 | + ["punctuation", "["], | ||
142 | + ["variable", "cols"], | ||
143 | + ["operator", "="], | ||
144 | + ["string", "\"e,m,^,>s\""], | ||
145 | + ["punctuation", ","], | ||
146 | + ["variable", "width"], | ||
147 | + ["operator", "="], | ||
148 | + ["string", "\"25%\""], | ||
149 | + ["punctuation", "]"] | ||
150 | + ]], | ||
151 | + | ||
152 | + ["other-block", [ | ||
153 | + ["punctuation", "====="], | ||
154 | + | ||
155 | + "\r\nFoo ", | ||
156 | + ["inline", [ | ||
157 | + ["attributes", [ | ||
158 | + ["punctuation", "["], | ||
159 | + ["attr-value", "big red yellow-background"], | ||
160 | + ["punctuation", "]"] | ||
161 | + ]], | ||
162 | + ["punctuation", "#"], "obvious", ["punctuation", "#"] | ||
163 | + ]], | ||
164 | + | ||
165 | + ["attributes", [ | ||
166 | + ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"] | ||
167 | + ]], | ||
168 | + ["attributes", [ | ||
169 | + ["punctuation", "["], | ||
170 | + ["attr-value", "quote"], ["punctuation", ","], | ||
171 | + ["interpreted", [ | ||
172 | + ["punctuation", "'"], | ||
173 | + ["macro", [ | ||
174 | + ["function", "http"], ["punctuation", ":"], | ||
175 | + "//en.wikipedia.org/wiki/Samuel_Johnson", | ||
176 | + ["attributes", [ | ||
177 | + ["punctuation", "["], | ||
178 | + ["attr-value", "Samuel Johnson"], | ||
179 | + ["punctuation", "]"] | ||
180 | + ]] | ||
181 | + ]], | ||
182 | + ["punctuation", "'"] | ||
183 | + ]], | ||
184 | + ["punctuation", "]"] | ||
185 | + ]], | ||
186 | + ["attributes", [ | ||
187 | + ["punctuation", "["], | ||
188 | + ["attr-value", "quote"], ["punctuation", ","], | ||
189 | + ["interpreted", [ | ||
190 | + ["punctuation", "'"], | ||
191 | + ["entity", """], | ||
192 | + "with ", | ||
193 | + ["inline", [ | ||
194 | + ["bold", [ | ||
195 | + ["punctuation", "*"], "an", ["punctuation", "*"] | ||
196 | + ]] | ||
197 | + ]], | ||
198 | + " image", | ||
199 | + ["entity", """], | ||
200 | + ["macro", [ | ||
201 | + ["function", "image"], ["punctuation", ":"], | ||
202 | + "foo.png", | ||
203 | + ["attributes", [ | ||
204 | + ["punctuation", "["], ["punctuation", "]"] | ||
205 | + ]] | ||
206 | + ]], | ||
207 | + ["replacement", "(TM)"], | ||
208 | + ["punctuation", "'"] | ||
209 | + ]], | ||
210 | + ["punctuation", "]"] | ||
211 | + ]], | ||
212 | + | ||
213 | + ["attributes", [ | ||
214 | + ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"] | ||
215 | + ]], | ||
216 | + ["attributes", [ | ||
217 | + ["punctuation", "["], | ||
218 | + ["variable", "icon"], | ||
219 | + ["operator", "="], | ||
220 | + ["string", "\"./images/icons/wink.png\""], | ||
221 | + ["punctuation", "]"] | ||
222 | + ]], | ||
223 | + ["attributes", [ | ||
224 | + ["punctuation", "["], | ||
225 | + ["variable", "icons"], | ||
226 | + ["operator", "="], | ||
227 | + ["attr-value", "None"], | ||
228 | + ["punctuation", ","], | ||
229 | + ["variable", "caption"], | ||
230 | + ["operator", "="], | ||
231 | + ["string", "\"My Special Note\""], | ||
232 | + ["punctuation", "]"] | ||
233 | + ]], | ||
234 | + ["attributes", [ | ||
235 | + ["punctuation", "["], | ||
236 | + ["variable", "start"], | ||
237 | + ["operator", "="], | ||
238 | + ["attr-value", "7"], | ||
239 | + ["punctuation", "]"] | ||
240 | + ]], | ||
241 | + | ||
242 | + ["attributes", [ | ||
243 | + ["punctuation", "["], | ||
244 | + ["variable", "cols"], | ||
245 | + ["operator", "="], | ||
246 | + ["string", "\"e,m,^,>s\""], | ||
247 | + ["punctuation", ","], | ||
248 | + ["variable", "width"], | ||
249 | + ["operator", "="], | ||
250 | + ["string", "\"25%\""], | ||
251 | + ["punctuation", "]"] | ||
252 | + ]], | ||
253 | + | ||
254 | + ["punctuation", "====="] | ||
255 | + ]], | ||
256 | + | ||
257 | + ["table", [ | ||
258 | + ["punctuation", "|====="], | ||
259 | + ["punctuation", "|"], | ||
260 | + | ||
261 | + "\r\nFoo ", | ||
262 | + ["inline", [ | ||
263 | + ["attributes", [ | ||
264 | + ["punctuation", "["], | ||
265 | + ["attr-value", "big red yellow-background"], | ||
266 | + ["punctuation", "]"] | ||
267 | + ]], | ||
268 | + ["punctuation", "#"], "obvious", ["punctuation", "#"] | ||
269 | + ]], | ||
270 | + | ||
271 | + ["attributes", [ | ||
272 | + ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"] | ||
273 | + ]], | ||
274 | + ["attributes", [ | ||
275 | + ["punctuation", "["], | ||
276 | + ["attr-value", "quote"], ["punctuation", ","], | ||
277 | + ["interpreted", [ | ||
278 | + ["punctuation", "'"], | ||
279 | + ["macro", [ | ||
280 | + ["function", "http"], ["punctuation", ":"], | ||
281 | + "//en.wikipedia.org/wiki/Samuel_Johnson", | ||
282 | + ["attributes", [ | ||
283 | + ["punctuation", "["], | ||
284 | + ["attr-value", "Samuel Johnson"], | ||
285 | + ["punctuation", "]"] | ||
286 | + ]] | ||
287 | + ]], | ||
288 | + ["punctuation", "'"] | ||
289 | + ]], | ||
290 | + ["punctuation", "]"] | ||
291 | + ]], | ||
292 | + ["attributes", [ | ||
293 | + ["punctuation", "["], | ||
294 | + ["attr-value", "quote"], ["punctuation", ","], | ||
295 | + ["interpreted", [ | ||
296 | + ["punctuation", "'"], | ||
297 | + ["entity", """], | ||
298 | + "with ", | ||
299 | + ["inline", [ | ||
300 | + ["bold", [ | ||
301 | + ["punctuation", "*"], "an", ["punctuation", "*"] | ||
302 | + ]] | ||
303 | + ]], | ||
304 | + " image", | ||
305 | + ["entity", """], | ||
306 | + ["macro", [ | ||
307 | + ["function", "image"], ["punctuation", ":"], | ||
308 | + "foo.png", | ||
309 | + ["attributes", [ | ||
310 | + ["punctuation", "["], ["punctuation", "]"] | ||
311 | + ]] | ||
312 | + ]], | ||
313 | + ["replacement", "(TM)"], | ||
314 | + ["punctuation", "'"] | ||
315 | + ]], | ||
316 | + ["punctuation", "]"] | ||
317 | + ]], | ||
318 | + | ||
319 | + ["attributes", [ | ||
320 | + ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"] | ||
321 | + ]], | ||
322 | + ["attributes", [ | ||
323 | + ["punctuation", "["], | ||
324 | + ["variable", "icon"], | ||
325 | + ["operator", "="], | ||
326 | + ["string", "\"./images/icons/wink.png\""], | ||
327 | + ["punctuation", "]"] | ||
328 | + ]], | ||
329 | + ["attributes", [ | ||
330 | + ["punctuation", "["], | ||
331 | + ["variable", "icons"], | ||
332 | + ["operator", "="], | ||
333 | + ["attr-value", "None"], | ||
334 | + ["punctuation", ","], | ||
335 | + ["variable", "caption"], | ||
336 | + ["operator", "="], | ||
337 | + ["string", "\"My Special Note\""], | ||
338 | + ["punctuation", "]"] | ||
339 | + ]], | ||
340 | + ["attributes", [ | ||
341 | + ["punctuation", "["], | ||
342 | + ["variable", "start"], | ||
343 | + ["operator", "="], | ||
344 | + ["attr-value", "7"], | ||
345 | + ["punctuation", "]"] | ||
346 | + ]], | ||
347 | + | ||
348 | + ["attributes", [ | ||
349 | + ["punctuation", "["], | ||
350 | + ["variable", "cols"], | ||
351 | + ["operator", "="], | ||
352 | + ["string", "\"e,m,^,>s\""], | ||
353 | + ["punctuation", ","], | ||
354 | + ["variable", "width"], | ||
355 | + ["operator", "="], | ||
356 | + ["string", "\"25%\""], | ||
357 | + ["punctuation", "]"] | ||
358 | + ]], | ||
359 | + | ||
360 | + ["punctuation", "|====="] | ||
361 | + ]], | ||
362 | + | ||
363 | + ["macro", [ | ||
364 | + ["function", "latexmath"], ["punctuation", ":"], | ||
365 | + ["attributes", [ | ||
366 | + ["punctuation", "["], | ||
367 | + ["quoted", [ | ||
368 | + ["punctuation", "$"], | ||
369 | + "C = \\alpha + \\beta Y^{\\gamma} + \\epsilon", | ||
370 | + ["punctuation", "$"] | ||
371 | + ]], | ||
372 | + ["punctuation", "]"] | ||
373 | + ]] | ||
374 | + ]], | ||
375 | + ["macro", [ | ||
376 | + ["function", "asciimath"], ["punctuation", ":"], | ||
377 | + ["attributes", [ | ||
378 | + ["punctuation", "["], | ||
379 | + ["quoted", [ | ||
380 | + ["punctuation", "`"], | ||
381 | + "x/x={(1,if x!=0),(text{undefined},if x=0):}", | ||
382 | + ["punctuation", "`"] | ||
383 | + ]], | ||
384 | + ["punctuation", "]"] | ||
385 | + ]] | ||
386 | + ]], | ||
387 | + ["macro", [ | ||
388 | + ["function", "latexmath"], ["punctuation", ":"], | ||
389 | + ["attributes", [ | ||
390 | + ["punctuation", "["], | ||
391 | + ["quoted", [ | ||
392 | + ["punctuation", "$"], | ||
393 | + "\\sum_{n=1}^\\infty \\frac{1}{2^n}", | ||
394 | + ["punctuation", "$"] | ||
395 | + ]], | ||
396 | + ["punctuation", "]"] | ||
397 | + ]] | ||
398 | + ]] | ||
399 | +] | ||
400 | + | ||
401 | +---------------------------------------------------- | ||
402 | + | ||
403 | +Checks for attributes. | ||
0 | \ No newline at end of file | 404 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/callout_feature.test
0 → 100755
1 | +Foobar <1> | ||
2 | +<1> Foo | ||
3 | +1> Bar | ||
4 | +> Baz | ||
5 | + | ||
6 | +|==== | ||
7 | +| Foobar <1> | ||
8 | +<1> Foo | ||
9 | +1> Bar | ||
10 | +> Baz | ||
11 | +|==== | ||
12 | + | ||
13 | +---------------------------------------------------- | ||
14 | + | ||
15 | +[ | ||
16 | + "Foobar ", ["callout", "<1>"], | ||
17 | + ["callout", "<1>"], " Foo\r\n", | ||
18 | + ["callout", "1>"], " Bar\r\n", | ||
19 | + ["callout", ">"], " Baz\r\n\r\n", | ||
20 | + | ||
21 | + ["table", [ | ||
22 | + ["punctuation", "|===="], | ||
23 | + ["punctuation", "|"], | ||
24 | + " Foobar ", ["callout", "<1>"], | ||
25 | + ["callout", "<1>"], " Foo\r\n", | ||
26 | + ["callout", "1>"], " Bar\r\n", | ||
27 | + ["callout", ">"], " Baz\r\n", | ||
28 | + ["punctuation", "|===="] | ||
29 | + ]] | ||
30 | +] | ||
31 | + | ||
32 | +---------------------------------------------------- | ||
33 | + | ||
34 | +Checks for callouts. | ||
0 | \ No newline at end of file | 35 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/comment-block_feature.test
0 → 100755
1 | +//// | ||
2 | +//// | ||
3 | + | ||
4 | +//// | ||
5 | +Foobar | ||
6 | + | ||
7 | +Baz | ||
8 | +//// | ||
9 | + | ||
10 | +---------------------------------------------------- | ||
11 | + | ||
12 | +[ | ||
13 | + ["comment-block", "////\r\n////"], | ||
14 | + ["comment-block", "////\r\nFoobar\r\n\r\nBaz\r\n////"] | ||
15 | +] | ||
16 | + | ||
17 | +---------------------------------------------------- | ||
18 | + | ||
19 | +Checks for comment blocks. | ||
0 | \ No newline at end of file | 20 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/comment_feature.test
0 → 100755
1 | +// | ||
2 | +// Foobar | ||
3 | + | ||
4 | +****** | ||
5 | +// | ||
6 | +// Foobar | ||
7 | +****** | ||
8 | + | ||
9 | +|====== | ||
10 | +| | ||
11 | +// | ||
12 | +| | ||
13 | +// Foobar | ||
14 | +|====== | ||
15 | + | ||
16 | +---------------------------------------------------- | ||
17 | + | ||
18 | +[ | ||
19 | + ["comment", "//"], | ||
20 | + ["comment", "// Foobar"], | ||
21 | + | ||
22 | + ["other-block", [ | ||
23 | + ["punctuation", "******"], | ||
24 | + ["comment", "//"], | ||
25 | + ["comment", "// Foobar"], | ||
26 | + ["punctuation", "******"] | ||
27 | + ]], | ||
28 | + | ||
29 | + ["table", [ | ||
30 | + ["punctuation", "|======"], | ||
31 | + ["punctuation", "|"], | ||
32 | + ["comment", "//"], | ||
33 | + ["punctuation", "|"], | ||
34 | + ["comment", "// Foobar"], | ||
35 | + ["punctuation", "|======"] | ||
36 | + ]] | ||
37 | +] | ||
38 | + | ||
39 | +---------------------------------------------------- | ||
40 | + | ||
41 | +Checks for comments. | ||
0 | \ No newline at end of file | 42 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/entity_feature.test
0 → 100755
1 | +➊ ¶ | ||
2 | + | ||
3 | +➊ ¶ | ||
4 | +============ | ||
5 | + | ||
6 | +['➊ ¶'] | ||
7 | + | ||
8 | +-- | ||
9 | +➊ ¶ | ||
10 | +-- | ||
11 | + | ||
12 | +|====== | ||
13 | +| ➊ ¶ | ||
14 | +|====== | ||
15 | + | ||
16 | +---------------------------------------------------- | ||
17 | + | ||
18 | +[ | ||
19 | + ["entity", "➊"], ["entity", "¶"], | ||
20 | + ["title", [ | ||
21 | + ["entity", "➊"], ["entity", "¶"], | ||
22 | + ["punctuation", "============"] | ||
23 | + ]], | ||
24 | + ["attributes", [ | ||
25 | + ["punctuation", "["], | ||
26 | + ["interpreted", [ | ||
27 | + ["punctuation", "'"], | ||
28 | + ["entity", "➊"], ["entity", "¶"], | ||
29 | + ["punctuation", "'"] | ||
30 | + ]], | ||
31 | + ["punctuation", "]"] | ||
32 | + ]], | ||
33 | + ["other-block", [ | ||
34 | + ["punctuation", "--"], | ||
35 | + ["entity", "➊"], ["entity", "¶"], | ||
36 | + ["punctuation", "--"] | ||
37 | + ]], | ||
38 | + ["table", [ | ||
39 | + ["punctuation", "|======"], | ||
40 | + ["punctuation", "|"], | ||
41 | + ["entity", "➊"], ["entity", "¶"], | ||
42 | + ["punctuation", "|======"] | ||
43 | + ]] | ||
44 | +] | ||
45 | + | ||
46 | +---------------------------------------------------- | ||
47 | + | ||
48 | +Checks for entities. | ||
0 | \ No newline at end of file | 49 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/hr_feature.test
0 → 100755
bower_components/prism/tests/languages/asciidoc/indented-block_feature.test
0 → 100755
1 | +. | ||
2 | + | ||
3 | + (TM) __foobar__ | ||
4 | + :bar: baz | ||
5 | + | ||
6 | + Foo *bar* baz | ||
7 | + // Foobar | ||
8 | + == Foobar == | ||
9 | + | ||
10 | + Title | ||
11 | + ~~~~~ | ||
12 | + ..... | ||
13 | + ..... | ||
14 | + | ||
15 | +---------------------------------------------------- | ||
16 | + | ||
17 | +[ | ||
18 | + ".\r\n\r\n", | ||
19 | + ["indented-block", "\t(TM) __foobar__\r\n\t:bar: baz"], | ||
20 | + ["indented-block", " Foo *bar* baz\r\n // Foobar\r\n == Foobar =="], | ||
21 | + ["indented-block", " Title\r\n ~~~~~\r\n .....\r\n ....."] | ||
22 | +] | ||
23 | + | ||
24 | +---------------------------------------------------- | ||
25 | + | ||
26 | +Checks for indented blocks. | ||
27 | +Also checks that nothing gets highlighted inside. | ||
28 | +The initial dot is required because tests are trimmed. | ||
0 | \ No newline at end of file | 29 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/inline_feature.test
0 → 100755
1 | +_emphasis_ | ||
2 | +``double quotes'' | ||
3 | +`single quotes' | ||
4 | +`monospace` | ||
5 | +'emphasis' | ||
6 | +*strong* | ||
7 | ++monospace+ | ||
8 | +#unquoted# | ||
9 | + | ||
10 | +_foo _ bar baz_ | ||
11 | +`foo ' bar baz' | ||
12 | +`foo ` bar baz` | ||
13 | +'foo ' bar baz' | ||
14 | +*foo * bar baz* | ||
15 | ++foo + bar baz+ | ||
16 | +#foo # bar baz# | ||
17 | + | ||
18 | +_foo | ||
19 | +bar_ | ||
20 | +``foo | ||
21 | +bar'' | ||
22 | +`foo | ||
23 | +bar' | ||
24 | +`foo | ||
25 | +bar` | ||
26 | +'foo | ||
27 | +bar' | ||
28 | +*foo | ||
29 | +bar* | ||
30 | ++foo | ||
31 | +bar+ | ||
32 | +#foo | ||
33 | +bar# | ||
34 | + | ||
35 | +foo__emphasis__bar | ||
36 | +foo**strong**bar | ||
37 | +foo++monospace++bar | ||
38 | +foo+++passthrough+++bar | ||
39 | +foo##unquoted##bar | ||
40 | +foo$$passthrough$$bar | ||
41 | +foo~subscript~bar | ||
42 | +foo^superscript^bar | ||
43 | +foo{attribute-reference}bar | ||
44 | +foo[[anchor]]bar | ||
45 | +foo[[[bibliography anchor]]]bar | ||
46 | +foo<<xref>>bar | ||
47 | +foo(((indexes)))bar | ||
48 | +foo((indexes))bar | ||
49 | + | ||
50 | +==== | ||
51 | +_emphasis_ | ||
52 | +``double quotes'' | ||
53 | +`single quotes' | ||
54 | +`monospace` | ||
55 | +'emphasis' | ||
56 | +*strong* | ||
57 | ++monospace+ | ||
58 | +#unquoted# | ||
59 | +__emphasis__ | ||
60 | +**strong** | ||
61 | +++monospace++ | ||
62 | ++++passthrough+++ | ||
63 | +##unquoted## | ||
64 | +$$passthrough$$ | ||
65 | +~subscript~ | ||
66 | +^superscript^ | ||
67 | +{attribute-reference} | ||
68 | +[[anchor]] | ||
69 | +[[[bibliography anchor]]] | ||
70 | +<<xref>> | ||
71 | +(((indexes))) | ||
72 | +((indexes)) | ||
73 | +==== | ||
74 | + | ||
75 | +|==== | ||
76 | +| | ||
77 | +_emphasis_ | ||
78 | +``double quotes'' | ||
79 | +`single quotes' | ||
80 | +`monospace` | ||
81 | +'emphasis' | ||
82 | +*strong* | ||
83 | ++monospace+ | ||
84 | +#unquoted# | ||
85 | +__emphasis__ | ||
86 | +**strong** | ||
87 | +++monospace++ | ||
88 | ++++passthrough+++ | ||
89 | +##unquoted## | ||
90 | +$$passthrough$$ | ||
91 | +~subscript~ | ||
92 | +^superscript^ | ||
93 | +{attribute-reference} | ||
94 | +[[anchor]] | ||
95 | +[[[bibliography anchor]]] | ||
96 | +<<xref>> | ||
97 | +(((indexes))) | ||
98 | +((indexes)) | ||
99 | +|==== | ||
100 | + | ||
101 | +['foo *bar* baz'] | ||
102 | + | ||
103 | +== foo *bar* baz == | ||
104 | + | ||
105 | +{names=value} | ||
106 | +{names?value} | ||
107 | +{names!value} | ||
108 | +{names#value} | ||
109 | +{names%value} | ||
110 | +{names@regexp:value1:value2} | ||
111 | +{names$regexp:value1:value2} | ||
112 | +{names$regexp::value} | ||
113 | +{foo,bar=foobar} | ||
114 | +{foo+bar=foobar} | ||
115 | +{counter:attrname} | ||
116 | + | ||
117 | +---------------------------------------------------- | ||
118 | + | ||
119 | +[ | ||
120 | + ["inline", [ | ||
121 | + ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]] | ||
122 | + ]], | ||
123 | + ["inline", [ | ||
124 | + ["punctuation", "``"], "double quotes", ["punctuation", "''"] | ||
125 | + ]], | ||
126 | + ["inline", [ | ||
127 | + ["punctuation", "`"], "single quotes", ["punctuation", "'"] | ||
128 | + ]], | ||
129 | + ["inline", [ | ||
130 | + ["punctuation", "`"], "monospace", ["punctuation", "`"] | ||
131 | + ]], | ||
132 | + ["inline", [ | ||
133 | + ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]] | ||
134 | + ]], | ||
135 | + ["inline", [ | ||
136 | + ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]] | ||
137 | + ]], | ||
138 | + ["inline", [ | ||
139 | + ["punctuation", "+"], "monospace", ["punctuation", "+"] | ||
140 | + ]], | ||
141 | + ["inline", [ | ||
142 | + ["punctuation", "#"], "unquoted", ["punctuation", "#"] | ||
143 | + ]], | ||
144 | + | ||
145 | + ["inline", [ | ||
146 | + ["italic", [["punctuation", "_"], "foo _ bar baz", ["punctuation", "_"]]] | ||
147 | + ]], | ||
148 | + ["inline", [ | ||
149 | + ["punctuation", "`"], "foo ' bar baz", ["punctuation", "'"] | ||
150 | + ]], | ||
151 | + ["inline", [ | ||
152 | + ["punctuation", "`"], "foo ` bar baz", ["punctuation", "`"] | ||
153 | + ]], | ||
154 | + ["inline", [ | ||
155 | + ["italic", [["punctuation", "'"], "foo ' bar baz", ["punctuation", "'"]]] | ||
156 | + ]], | ||
157 | + ["inline", [ | ||
158 | + ["bold", [["punctuation", "*"], "foo * bar baz", ["punctuation", "*"]]] | ||
159 | + ]], | ||
160 | + ["inline", [ | ||
161 | + ["punctuation", "+"], "foo + bar baz", ["punctuation", "+"] | ||
162 | + ]], | ||
163 | + ["inline", [ | ||
164 | + ["punctuation", "#"], "foo # bar baz", ["punctuation", "#"] | ||
165 | + ]], | ||
166 | + | ||
167 | + ["inline", [ | ||
168 | + ["italic", [["punctuation", "_"], "foo\r\nbar", ["punctuation", "_"]]] | ||
169 | + ]], | ||
170 | + ["inline", [ | ||
171 | + ["punctuation", "``"], "foo\r\nbar", ["punctuation", "''"] | ||
172 | + ]], | ||
173 | + ["inline", [ | ||
174 | + ["punctuation", "`"], "foo\r\nbar", ["punctuation", "'"] | ||
175 | + ]], | ||
176 | + ["inline", [ | ||
177 | + ["punctuation", "`"], "foo\r\nbar", ["punctuation", "`"] | ||
178 | + ]], | ||
179 | + ["inline", [ | ||
180 | + ["italic", [["punctuation", "'"], "foo\r\nbar", ["punctuation", "'"]]] | ||
181 | + ]], | ||
182 | + ["inline", [ | ||
183 | + ["bold", [["punctuation", "*"], "foo\r\nbar", ["punctuation", "*"]]] | ||
184 | + ]], | ||
185 | + ["inline", [ | ||
186 | + ["punctuation", "+"], "foo\r\nbar", ["punctuation", "+"] | ||
187 | + ]], | ||
188 | + ["inline", [ | ||
189 | + ["punctuation", "#"], "foo\r\nbar", ["punctuation", "#"] | ||
190 | + ]], | ||
191 | + | ||
192 | + "\r\n\r\nfoo", | ||
193 | + ["inline", [ | ||
194 | + ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]] | ||
195 | + ]], | ||
196 | + "bar\r\nfoo", | ||
197 | + ["inline", [ | ||
198 | + ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]] | ||
199 | + ]], | ||
200 | + "bar\r\nfoo", | ||
201 | + ["inline", [ | ||
202 | + ["punctuation", "++"], "monospace", ["punctuation", "++"] | ||
203 | + ]], | ||
204 | + "bar\r\nfoo", | ||
205 | + ["inline", [ | ||
206 | + ["punctuation", "+++"], "passthrough", ["punctuation", "+++"] | ||
207 | + ]], | ||
208 | + "bar\r\nfoo", | ||
209 | + ["inline", [ | ||
210 | + ["punctuation", "##"], "unquoted", ["punctuation", "##"] | ||
211 | + ]], | ||
212 | + "bar\r\nfoo", | ||
213 | + ["inline", [ | ||
214 | + ["punctuation", "$$"], "passthrough", ["punctuation", "$$"] | ||
215 | + ]], | ||
216 | + "bar\r\nfoo", | ||
217 | + ["inline", [ | ||
218 | + ["punctuation", "~"], "subscript", ["punctuation", "~"] | ||
219 | + ]], | ||
220 | + "bar\r\nfoo", | ||
221 | + ["inline", [ | ||
222 | + ["punctuation", "^"], "superscript", ["punctuation", "^"] | ||
223 | + ]], | ||
224 | + "bar\r\nfoo", | ||
225 | + ["inline", [ | ||
226 | + ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]] | ||
227 | + ]], | ||
228 | + "bar\r\nfoo", | ||
229 | + ["inline", [ | ||
230 | + ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]] | ||
231 | + ]], | ||
232 | + "bar\r\nfoo", | ||
233 | + ["inline", [ | ||
234 | + ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]] | ||
235 | + ]], | ||
236 | + "bar\r\nfoo", | ||
237 | + ["inline", [ | ||
238 | + ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]] | ||
239 | + ]], | ||
240 | + "bar\r\nfoo", | ||
241 | + ["inline", [ | ||
242 | + ["punctuation", "((("], "indexes", ["punctuation", ")))"] | ||
243 | + ]], | ||
244 | + "bar\r\nfoo", | ||
245 | + ["inline", [ | ||
246 | + ["punctuation", "(("], "indexes", ["punctuation", "))"] | ||
247 | + ]], | ||
248 | + "bar\r\n\r\n", | ||
249 | + | ||
250 | + ["other-block", [ | ||
251 | + ["punctuation", "===="], | ||
252 | + | ||
253 | + ["inline", [ | ||
254 | + ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]] | ||
255 | + ]], | ||
256 | + ["inline", [ | ||
257 | + ["punctuation", "``"], "double quotes", ["punctuation", "''"] | ||
258 | + ]], | ||
259 | + ["inline", [ | ||
260 | + ["punctuation", "`"], "single quotes", ["punctuation", "'"] | ||
261 | + ]], | ||
262 | + ["inline", [ | ||
263 | + ["punctuation", "`"], "monospace", ["punctuation", "`"] | ||
264 | + ]], | ||
265 | + ["inline", [ | ||
266 | + ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]] | ||
267 | + ]], | ||
268 | + ["inline", [ | ||
269 | + ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]] | ||
270 | + ]], | ||
271 | + ["inline", [ | ||
272 | + ["punctuation", "+"], "monospace", ["punctuation", "+"] | ||
273 | + ]], | ||
274 | + ["inline", [ | ||
275 | + ["punctuation", "#"], "unquoted", ["punctuation", "#"] | ||
276 | + ]], | ||
277 | + ["inline", [ | ||
278 | + ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]] | ||
279 | + ]], | ||
280 | + ["inline", [ | ||
281 | + ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]] | ||
282 | + ]], | ||
283 | + ["inline", [ | ||
284 | + ["punctuation", "++"], "monospace", ["punctuation", "++"] | ||
285 | + ]], | ||
286 | + ["inline", [ | ||
287 | + ["punctuation", "+++"], "passthrough", ["punctuation", "+++"] | ||
288 | + ]], | ||
289 | + ["inline", [ | ||
290 | + ["punctuation", "##"], "unquoted", ["punctuation", "##"] | ||
291 | + ]], | ||
292 | + ["inline", [ | ||
293 | + ["punctuation", "$$"], "passthrough", ["punctuation", "$$"] | ||
294 | + ]], | ||
295 | + ["inline", [ | ||
296 | + ["punctuation", "~"], "subscript", ["punctuation", "~"] | ||
297 | + ]], | ||
298 | + ["inline", [ | ||
299 | + ["punctuation", "^"], "superscript", ["punctuation", "^"] | ||
300 | + ]], | ||
301 | + ["inline", [ | ||
302 | + ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]] | ||
303 | + ]], | ||
304 | + ["inline", [ | ||
305 | + ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]] | ||
306 | + ]], | ||
307 | + ["inline", [ | ||
308 | + ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]] | ||
309 | + ]], | ||
310 | + ["inline", [ | ||
311 | + ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]] | ||
312 | + ]], | ||
313 | + ["inline", [ | ||
314 | + ["punctuation", "((("], "indexes", ["punctuation", ")))"] | ||
315 | + ]], | ||
316 | + ["inline", [ | ||
317 | + ["punctuation", "(("], "indexes", ["punctuation", "))"] | ||
318 | + ]], | ||
319 | + | ||
320 | + ["punctuation", "===="] | ||
321 | + ]], | ||
322 | + | ||
323 | + ["table", [ | ||
324 | + ["punctuation", "|===="], | ||
325 | + ["punctuation", "|"], | ||
326 | + | ||
327 | + ["inline", [ | ||
328 | + ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]] | ||
329 | + ]], | ||
330 | + ["inline", [ | ||
331 | + ["punctuation", "``"], "double quotes", ["punctuation", "''"] | ||
332 | + ]], | ||
333 | + ["inline", [ | ||
334 | + ["punctuation", "`"], "single quotes", ["punctuation", "'"] | ||
335 | + ]], | ||
336 | + ["inline", [ | ||
337 | + ["punctuation", "`"], "monospace", ["punctuation", "`"] | ||
338 | + ]], | ||
339 | + ["inline", [ | ||
340 | + ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]] | ||
341 | + ]], | ||
342 | + ["inline", [ | ||
343 | + ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]] | ||
344 | + ]], | ||
345 | + ["inline", [ | ||
346 | + ["punctuation", "+"], "monospace", ["punctuation", "+"] | ||
347 | + ]], | ||
348 | + ["inline", [ | ||
349 | + ["punctuation", "#"], "unquoted", ["punctuation", "#"] | ||
350 | + ]], | ||
351 | + ["inline", [ | ||
352 | + ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]] | ||
353 | + ]], | ||
354 | + ["inline", [ | ||
355 | + ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]] | ||
356 | + ]], | ||
357 | + ["inline", [ | ||
358 | + ["punctuation", "++"], "monospace", ["punctuation", "++"] | ||
359 | + ]], | ||
360 | + ["inline", [ | ||
361 | + ["punctuation", "+++"], "passthrough", ["punctuation", "+++"] | ||
362 | + ]], | ||
363 | + ["inline", [ | ||
364 | + ["punctuation", "##"], "unquoted", ["punctuation", "##"] | ||
365 | + ]], | ||
366 | + ["inline", [ | ||
367 | + ["punctuation", "$$"], "passthrough", ["punctuation", "$$"] | ||
368 | + ]], | ||
369 | + ["inline", [ | ||
370 | + ["punctuation", "~"], "subscript", ["punctuation", "~"] | ||
371 | + ]], | ||
372 | + ["inline", [ | ||
373 | + ["punctuation", "^"], "superscript", ["punctuation", "^"] | ||
374 | + ]], | ||
375 | + ["inline", [ | ||
376 | + ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]] | ||
377 | + ]], | ||
378 | + ["inline", [ | ||
379 | + ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]] | ||
380 | + ]], | ||
381 | + ["inline", [ | ||
382 | + ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]] | ||
383 | + ]], | ||
384 | + ["inline", [ | ||
385 | + ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]] | ||
386 | + ]], | ||
387 | + ["inline", [ | ||
388 | + ["punctuation", "((("], "indexes", ["punctuation", ")))"] | ||
389 | + ]], | ||
390 | + ["inline", [ | ||
391 | + ["punctuation", "(("], "indexes", ["punctuation", "))"] | ||
392 | + ]], | ||
393 | + | ||
394 | + ["punctuation", "|===="] | ||
395 | + ]], | ||
396 | + | ||
397 | + ["attributes", [ | ||
398 | + ["punctuation", "["], | ||
399 | + ["interpreted", [ | ||
400 | + ["punctuation", "'"], | ||
401 | + "foo ", ["inline", [["bold", [["punctuation", "*"], "bar", ["punctuation", "*"]]]]], " baz", | ||
402 | + ["punctuation", "'"] | ||
403 | + ]], | ||
404 | + ["punctuation", "]"] | ||
405 | + ]], | ||
406 | + | ||
407 | + ["title", [ | ||
408 | + ["punctuation", "=="], | ||
409 | + " foo ", ["inline", [["bold", [["punctuation", "*"], "bar", ["punctuation", "*"]]]]], " baz ", | ||
410 | + ["punctuation", "=="] | ||
411 | + ]], | ||
412 | + | ||
413 | + ["inline", [ | ||
414 | + ["attribute-ref", [ | ||
415 | + ["punctuation", "{"], | ||
416 | + ["variable", "names"], | ||
417 | + ["operator", "="], | ||
418 | + "value", | ||
419 | + ["punctuation", "}"] | ||
420 | + ]] | ||
421 | + ]], | ||
422 | + ["inline", [ | ||
423 | + ["attribute-ref", [ | ||
424 | + ["punctuation", "{"], | ||
425 | + ["variable", "names"], | ||
426 | + ["operator", "?"], | ||
427 | + "value", | ||
428 | + ["punctuation", "}"] | ||
429 | + ]] | ||
430 | + ]], | ||
431 | + ["inline", [ | ||
432 | + ["attribute-ref", [ | ||
433 | + ["punctuation", "{"], | ||
434 | + ["variable", "names"], | ||
435 | + ["operator", "!"], | ||
436 | + "value", | ||
437 | + ["punctuation", "}"] | ||
438 | + ]] | ||
439 | + ]], | ||
440 | + ["inline", [ | ||
441 | + ["attribute-ref", [ | ||
442 | + ["punctuation", "{"], | ||
443 | + ["variable", "names"], | ||
444 | + ["operator", "#"], | ||
445 | + "value", | ||
446 | + ["punctuation", "}"] | ||
447 | + ]] | ||
448 | + ]], | ||
449 | + ["inline", [ | ||
450 | + ["attribute-ref", [ | ||
451 | + ["punctuation", "{"], | ||
452 | + ["variable", "names"], | ||
453 | + ["operator", "%"], | ||
454 | + "value", | ||
455 | + ["punctuation", "}"] | ||
456 | + ]] | ||
457 | + ]], | ||
458 | + ["inline", [ | ||
459 | + ["attribute-ref", [ | ||
460 | + ["punctuation", "{"], | ||
461 | + ["variable", "names"], | ||
462 | + ["operator", "@"], | ||
463 | + "regexp", ["punctuation", ":"], | ||
464 | + "value1", ["punctuation", ":"], | ||
465 | + "value2", | ||
466 | + ["punctuation", "}"] | ||
467 | + ]] | ||
468 | + ]], | ||
469 | + ["inline", [ | ||
470 | + ["attribute-ref", [ | ||
471 | + ["punctuation", "{"], | ||
472 | + ["variable", "names"], | ||
473 | + ["operator", "$"], | ||
474 | + "regexp", ["punctuation", ":"], | ||
475 | + "value1", ["punctuation", ":"], | ||
476 | + "value2", | ||
477 | + ["punctuation", "}"] | ||
478 | + ]] | ||
479 | + ]], | ||
480 | + ["inline", [ | ||
481 | + ["attribute-ref", [ | ||
482 | + ["punctuation", "{"], | ||
483 | + ["variable", "names"], | ||
484 | + ["operator", "$"], | ||
485 | + "regexp", ["punctuation", "::"], | ||
486 | + "value", | ||
487 | + ["punctuation", "}"] | ||
488 | + ]] | ||
489 | + ]], | ||
490 | + ["inline", [ | ||
491 | + ["attribute-ref", [ | ||
492 | + ["punctuation", "{"], | ||
493 | + ["variable", "foo,bar"], | ||
494 | + ["operator", "="], | ||
495 | + "foobar", | ||
496 | + ["punctuation", "}"] | ||
497 | + ]] | ||
498 | + ]], | ||
499 | + ["inline", [ | ||
500 | + ["attribute-ref", [ | ||
501 | + ["punctuation", "{"], | ||
502 | + ["variable", "foo+bar"], | ||
503 | + ["operator", "="], | ||
504 | + "foobar", | ||
505 | + ["punctuation", "}"] | ||
506 | + ]] | ||
507 | + ]], | ||
508 | + ["inline", [ | ||
509 | + ["attribute-ref", [ | ||
510 | + ["punctuation", "{"], | ||
511 | + ["variable", "counter"], | ||
512 | + ["punctuation", ":"], | ||
513 | + "attrname", | ||
514 | + ["punctuation", "}"] | ||
515 | + ]] | ||
516 | + ]] | ||
517 | +] | ||
518 | + | ||
519 | +---------------------------------------------------- | ||
520 | + | ||
521 | +Checks for all kinds of inline quoted text. | ||
0 | \ No newline at end of file | 522 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/line-continuation_feature.test
0 → 100755
1 | +Foo + | ||
2 | +bar | ||
3 | + | ||
4 | +* Foo | ||
5 | ++ | ||
6 | +bar | ||
7 | + | ||
8 | +---------------------------------------------------- | ||
9 | + | ||
10 | +[ | ||
11 | + "Foo ", ["line-continuation", "+"], "\r\nbar\r\n\r\n", | ||
12 | + ["list-punctuation", "*"], " Foo\r\n", | ||
13 | + ["line-continuation", "+"], "\r\nbar" | ||
14 | +] | ||
15 | + | ||
16 | +---------------------------------------------------- | ||
17 | + | ||
18 | +Checks for line continuations. | ||
0 | \ No newline at end of file | 19 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/list-label_feature.test
0 → 100755
1 | +In:: | ||
2 | +Lorem:: | ||
3 | + Foo bar baz | ||
4 | +Dolor::: | ||
5 | + Ipsum:::: | ||
6 | + Donec;; | ||
7 | + Foobar | ||
8 | + | ||
9 | +____ | ||
10 | +In:: | ||
11 | +Lorem:: | ||
12 | + Foo bar baz | ||
13 | +Dolor::: | ||
14 | + Ipsum:::: | ||
15 | + Donec;; | ||
16 | + Foobar | ||
17 | +____ | ||
18 | + | ||
19 | +|======== | ||
20 | +| | ||
21 | +In:: | ||
22 | +Lorem:: | ||
23 | + Foo bar baz | ||
24 | +Dolor::: | ||
25 | + Ipsum:::: | ||
26 | + Donec;; | ||
27 | + Foobar | ||
28 | +|======== | ||
29 | + | ||
30 | +---------------------------------------------------- | ||
31 | + | ||
32 | +[ | ||
33 | + ["list-label", "In::"], | ||
34 | + ["list-label", "Lorem::"], | ||
35 | + "\r\n Foo bar baz\r\n", | ||
36 | + ["list-label", "Dolor:::"], | ||
37 | + ["list-label", "Ipsum::::"], | ||
38 | + ["list-label", "Donec;;"], | ||
39 | + "\r\n Foobar\r\n\r\n", | ||
40 | + | ||
41 | + ["other-block", [ | ||
42 | + ["punctuation", "____"], | ||
43 | + | ||
44 | + ["list-label", "In::"], | ||
45 | + ["list-label", "Lorem::"], | ||
46 | + "\r\n Foo bar baz\r\n", | ||
47 | + ["list-label", "Dolor:::"], | ||
48 | + ["list-label", "Ipsum::::"], | ||
49 | + ["list-label", "Donec;;"], | ||
50 | + "\r\n Foobar\r\n", | ||
51 | + | ||
52 | + ["punctuation", "____"] | ||
53 | + ]], | ||
54 | + | ||
55 | + ["table", [ | ||
56 | + ["punctuation", "|========"], | ||
57 | + ["punctuation", "|"], | ||
58 | + | ||
59 | + ["list-label", "In::"], | ||
60 | + ["list-label", "Lorem::"], | ||
61 | + "\r\n Foo bar baz\r\n", | ||
62 | + ["list-label", "Dolor:::"], | ||
63 | + ["list-label", "Ipsum::::"], | ||
64 | + ["list-label", "Donec;;"], | ||
65 | + "\r\n Foobar\r\n", | ||
66 | + | ||
67 | + ["punctuation", "|========"] | ||
68 | + ]] | ||
69 | +] | ||
70 | + | ||
71 | +---------------------------------------------------- | ||
72 | + | ||
73 | +Checks for list labels. | ||
0 | \ No newline at end of file | 74 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/list-punctuation_feature.test
0 → 100755
1 | +- Foo | ||
2 | +* Foo | ||
3 | +** Foo bar | ||
4 | +*** Foo | ||
5 | + 1. Foo | ||
6 | + 2. Foo bar | ||
7 | + 42. Foo | ||
8 | +**** Foo | ||
9 | +***** Foo bar | ||
10 | + | ||
11 | +. Foo | ||
12 | +.. Foo | ||
13 | + a. Foo | ||
14 | + b. Foo | ||
15 | + z. Foo | ||
16 | +... Foo bar | ||
17 | +.... Foo | ||
18 | + i) Foo | ||
19 | + vi) Bar | ||
20 | + xxvii) Baz | ||
21 | +..... Foo | ||
22 | + | ||
23 | +____ | ||
24 | +. 1 | ||
25 | +.. 2 | ||
26 | +____ | ||
27 | + | ||
28 | +|=== | ||
29 | +| | ||
30 | +xi) a | ||
31 | +xii) b | ||
32 | +|=== | ||
33 | + | ||
34 | +---------------------------------------------------- | ||
35 | + | ||
36 | +[ | ||
37 | + ["list-punctuation", "-"], " Foo\r\n", | ||
38 | + ["list-punctuation", "*"], " Foo\r\n", | ||
39 | + ["list-punctuation", "**"], " Foo bar\r\n", | ||
40 | + ["list-punctuation", "***"], " Foo\r\n\t", | ||
41 | + ["list-punctuation", "1."], " Foo\r\n\t", | ||
42 | + ["list-punctuation", "2."], " Foo bar\r\n\t", | ||
43 | + ["list-punctuation", "42."], " Foo\r\n", | ||
44 | + ["list-punctuation", "****"], " Foo\r\n", | ||
45 | + ["list-punctuation", "*****"], " Foo bar\r\n\r\n", | ||
46 | + | ||
47 | + ["list-punctuation", "."], " Foo\r\n", | ||
48 | + ["list-punctuation", ".."], " Foo\r\n ", | ||
49 | + ["list-punctuation", "a."], " Foo\r\n ", | ||
50 | + ["list-punctuation", "b."], " Foo\r\n ", | ||
51 | + ["list-punctuation", "z."], " Foo\r\n", | ||
52 | + ["list-punctuation", "..."], " Foo bar\r\n", | ||
53 | + ["list-punctuation", "...."], " Foo\r\n\t", | ||
54 | + ["list-punctuation", "i)"], " Foo\r\n\t", | ||
55 | + ["list-punctuation", "vi)"], " Bar\r\n\t", | ||
56 | + ["list-punctuation", "xxvii)"], " Baz\r\n", | ||
57 | + ["list-punctuation", "....."], " Foo\r\n\r\n", | ||
58 | + | ||
59 | + ["other-block", [ | ||
60 | + ["punctuation", "____"], | ||
61 | + ["list-punctuation", "."], " 1\r\n", | ||
62 | + ["list-punctuation", ".."], " 2\r\n", | ||
63 | + ["punctuation", "____"] | ||
64 | + ]], | ||
65 | + | ||
66 | + ["table", [ | ||
67 | + ["punctuation", "|==="], | ||
68 | + ["punctuation", "|"], | ||
69 | + ["list-punctuation", "xi)"], " a\r\n", | ||
70 | + ["list-punctuation", "xii)"], " b\r\n", | ||
71 | + ["punctuation", "|==="] | ||
72 | + ]] | ||
73 | +] | ||
74 | + | ||
75 | +---------------------------------------------------- | ||
76 | + | ||
77 | +Checks for list punctuation. | ||
0 | \ No newline at end of file | 78 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/literal-block_feature.test
0 → 100755
1 | +---- | ||
2 | +== Foobar == | ||
3 | +Bar _baz_ (TM) <1> | ||
4 | +* Foo <2> | ||
5 | +<1> Foobar | ||
6 | +2> Baz | ||
7 | +---- | ||
8 | + | ||
9 | +....... | ||
10 | +.Foo | ||
11 | +. Foobar <1> | ||
12 | +include::addendum.txt <2> | ||
13 | +> Foo | ||
14 | +> Bar | ||
15 | +__Foo__**bar**{baz} | ||
16 | +....... | ||
17 | + | ||
18 | +---------------------------------------------------- | ||
19 | + | ||
20 | +[ | ||
21 | + ["literal-block", [ | ||
22 | + ["punctuation", "----"], | ||
23 | + "\r\n== Foobar ==\r\nBar _baz_ (TM) ", | ||
24 | + ["callout", "<1>"], | ||
25 | + "\r\n* Foo ", | ||
26 | + ["callout", "<2>"], | ||
27 | + ["callout", "<1>"], " Foobar\r\n", | ||
28 | + ["callout", "2>"], " Baz\r\n", | ||
29 | + ["punctuation", "----"] | ||
30 | + ]], | ||
31 | + ["literal-block", [ | ||
32 | + ["punctuation", "......."], | ||
33 | + "\r\n.Foo\r\n. Foobar ", | ||
34 | + ["callout", "<1>"], | ||
35 | + "\r\ninclude::addendum.txt ", | ||
36 | + ["callout", "<2>"], | ||
37 | + ["callout", ">"], " Foo\r\n", | ||
38 | + ["callout", ">"], " Bar\r\n__Foo__**bar**{baz}\r\n", | ||
39 | + ["punctuation", "......."] | ||
40 | + ]] | ||
41 | +] | ||
42 | + | ||
43 | +---------------------------------------------------- | ||
44 | + | ||
45 | +Checks for literal blocks and listing blocks. | ||
46 | +Also checks that nothing gets highlighted inside expect callouts. |
bower_components/prism/tests/languages/asciidoc/macro_feature.test
0 → 100755
1 | +footnote:[An example footnote.] | ||
2 | +indexterm:[Tigers,Big cats] | ||
3 | + | ||
4 | +http://www.docbook.org/[DocBook.org] | ||
5 | +include::chapt1.txt[tabsize=2] | ||
6 | +mailto:srackham@gmail.com[] | ||
7 | + | ||
8 | +image:screen-thumbnail.png[height=32,link="screen.png"] | ||
9 | + | ||
10 | +== Foo image:foo.jpg[] == | ||
11 | + | ||
12 | +-- | ||
13 | +footnote:[An example footnote.] | ||
14 | +indexterm:[Tigers,Big cats] | ||
15 | + | ||
16 | +http://www.docbook.org/[DocBook.org] | ||
17 | +include::chapt1.txt[tabsize=2] | ||
18 | +mailto:srackham@gmail.com[] | ||
19 | + | ||
20 | +image:screen-thumbnail.png[height=32,link="screen.png"] | ||
21 | +-- | ||
22 | + | ||
23 | +|==== | ||
24 | +| | ||
25 | +footnote:[An example footnote.] | ||
26 | +indexterm:[Tigers,Big cats] | ||
27 | + | ||
28 | +http://www.docbook.org/[DocBook.org] | ||
29 | +include::chapt1.txt[tabsize=2] | ||
30 | +mailto:srackham@gmail.com[] | ||
31 | + | ||
32 | +image:screen-thumbnail.png[height=32,link="screen.png"] | ||
33 | +|==== | ||
34 | + | ||
35 | +---------------------------------------------------- | ||
36 | + | ||
37 | +[ | ||
38 | + ["macro", [ | ||
39 | + ["function", "footnote"], ["punctuation", ":"], | ||
40 | + ["attributes", [ | ||
41 | + ["punctuation", "["], | ||
42 | + ["attr-value", "An example footnote."], | ||
43 | + ["punctuation", "]"] | ||
44 | + ]] | ||
45 | + ]], | ||
46 | + ["macro", [ | ||
47 | + ["function", "indexterm"], ["punctuation", ":"], | ||
48 | + ["attributes", [ | ||
49 | + ["punctuation", "["], | ||
50 | + ["attr-value", "Tigers"], | ||
51 | + ["punctuation", ","], | ||
52 | + ["attr-value", "Big cats"], | ||
53 | + ["punctuation", "]"] | ||
54 | + ]] | ||
55 | + ]], | ||
56 | + ["macro", [ | ||
57 | + ["function", "http"], ["punctuation", ":"], | ||
58 | + "//www.docbook.org/", | ||
59 | + ["attributes", [ | ||
60 | + ["punctuation", "["], | ||
61 | + ["attr-value", "DocBook.org"], | ||
62 | + ["punctuation", "]"] | ||
63 | + ]] | ||
64 | + ]], | ||
65 | + ["macro", [ | ||
66 | + ["function", "include"], ["punctuation", "::"], | ||
67 | + "chapt1.txt", | ||
68 | + ["attributes", [ | ||
69 | + ["punctuation", "["], | ||
70 | + ["variable", "tabsize"], | ||
71 | + ["operator", "="], | ||
72 | + ["attr-value", "2"], | ||
73 | + ["punctuation", "]"] | ||
74 | + ]] | ||
75 | + ]], | ||
76 | + ["macro", [ | ||
77 | + ["function", "mailto"], ["punctuation", ":"], | ||
78 | + "srackham@gmail.com", | ||
79 | + ["attributes", [ | ||
80 | + ["punctuation", "["], ["punctuation", "]"] | ||
81 | + ]] | ||
82 | + ]], | ||
83 | + ["macro", [ | ||
84 | + ["function", "image"], ["punctuation", ":"], | ||
85 | + "screen-thumbnail.png", | ||
86 | + ["attributes", [ | ||
87 | + ["punctuation", "["], | ||
88 | + ["variable", "height"], | ||
89 | + ["operator", "="], | ||
90 | + ["attr-value", "32"], | ||
91 | + ["punctuation", ","], | ||
92 | + ["variable", "link"], | ||
93 | + ["operator", "="], | ||
94 | + ["string", "\"screen.png\""], | ||
95 | + ["punctuation", "]"] | ||
96 | + ]] | ||
97 | + ]], | ||
98 | + | ||
99 | + ["title", [ | ||
100 | + ["punctuation", "=="], | ||
101 | + " Foo ", | ||
102 | + ["macro", [ | ||
103 | + ["function", "image"], ["punctuation", ":"], | ||
104 | + "foo.jpg", | ||
105 | + ["attributes", [ | ||
106 | + ["punctuation", "["], ["punctuation", "]"] | ||
107 | + ]] | ||
108 | + ]], | ||
109 | + ["punctuation", "=="] | ||
110 | + ]], | ||
111 | + | ||
112 | + ["other-block", [ | ||
113 | + ["punctuation", "--"], | ||
114 | + | ||
115 | + ["macro", [ | ||
116 | + ["function", "footnote"], ["punctuation", ":"], | ||
117 | + ["attributes", [ | ||
118 | + ["punctuation", "["], | ||
119 | + ["attr-value", "An example footnote."], | ||
120 | + ["punctuation", "]"] | ||
121 | + ]] | ||
122 | + ]], | ||
123 | + ["macro", [ | ||
124 | + ["function", "indexterm"], ["punctuation", ":"], | ||
125 | + ["attributes", [ | ||
126 | + ["punctuation", "["], | ||
127 | + ["attr-value", "Tigers"], | ||
128 | + ["punctuation", ","], | ||
129 | + ["attr-value", "Big cats"], | ||
130 | + ["punctuation", "]"] | ||
131 | + ]] | ||
132 | + ]], | ||
133 | + ["macro", [ | ||
134 | + ["function", "http"], ["punctuation", ":"], | ||
135 | + "//www.docbook.org/", | ||
136 | + ["attributes", [ | ||
137 | + ["punctuation", "["], | ||
138 | + ["attr-value", "DocBook.org"], | ||
139 | + ["punctuation", "]"] | ||
140 | + ]] | ||
141 | + ]], | ||
142 | + ["macro", [ | ||
143 | + ["function", "include"], ["punctuation", "::"], | ||
144 | + "chapt1.txt", | ||
145 | + ["attributes", [ | ||
146 | + ["punctuation", "["], | ||
147 | + ["variable", "tabsize"], | ||
148 | + ["operator", "="], | ||
149 | + ["attr-value", "2"], | ||
150 | + ["punctuation", "]"] | ||
151 | + ]] | ||
152 | + ]], | ||
153 | + ["macro", [ | ||
154 | + ["function", "mailto"], ["punctuation", ":"], | ||
155 | + "srackham@gmail.com", | ||
156 | + ["attributes", [ | ||
157 | + ["punctuation", "["], ["punctuation", "]"] | ||
158 | + ]] | ||
159 | + ]], | ||
160 | + ["macro", [ | ||
161 | + ["function", "image"], ["punctuation", ":"], | ||
162 | + "screen-thumbnail.png", | ||
163 | + ["attributes", [ | ||
164 | + ["punctuation", "["], | ||
165 | + ["variable", "height"], | ||
166 | + ["operator", "="], | ||
167 | + ["attr-value", "32"], | ||
168 | + ["punctuation", ","], | ||
169 | + ["variable", "link"], | ||
170 | + ["operator", "="], | ||
171 | + ["string", "\"screen.png\""], | ||
172 | + ["punctuation", "]"] | ||
173 | + ]] | ||
174 | + ]], | ||
175 | + | ||
176 | + ["punctuation", "--"] | ||
177 | + ]], | ||
178 | + | ||
179 | + ["table", [ | ||
180 | + ["punctuation", "|===="], | ||
181 | + ["punctuation", "|"], | ||
182 | + | ||
183 | + ["macro", [ | ||
184 | + ["function", "footnote"], ["punctuation", ":"], | ||
185 | + ["attributes", [ | ||
186 | + ["punctuation", "["], | ||
187 | + ["attr-value", "An example footnote."], | ||
188 | + ["punctuation", "]"] | ||
189 | + ]] | ||
190 | + ]], | ||
191 | + ["macro", [ | ||
192 | + ["function", "indexterm"], ["punctuation", ":"], | ||
193 | + ["attributes", [ | ||
194 | + ["punctuation", "["], | ||
195 | + ["attr-value", "Tigers"], | ||
196 | + ["punctuation", ","], | ||
197 | + ["attr-value", "Big cats"], | ||
198 | + ["punctuation", "]"] | ||
199 | + ]] | ||
200 | + ]], | ||
201 | + ["macro", [ | ||
202 | + ["function", "http"], ["punctuation", ":"], | ||
203 | + "//www.docbook.org/", | ||
204 | + ["attributes", [ | ||
205 | + ["punctuation", "["], | ||
206 | + ["attr-value", "DocBook.org"], | ||
207 | + ["punctuation", "]"] | ||
208 | + ]] | ||
209 | + ]], | ||
210 | + ["macro", [ | ||
211 | + ["function", "include"], ["punctuation", "::"], | ||
212 | + "chapt1.txt", | ||
213 | + ["attributes", [ | ||
214 | + ["punctuation", "["], | ||
215 | + ["variable", "tabsize"], | ||
216 | + ["operator", "="], | ||
217 | + ["attr-value", "2"], | ||
218 | + ["punctuation", "]"] | ||
219 | + ]] | ||
220 | + ]], | ||
221 | + ["macro", [ | ||
222 | + ["function", "mailto"], ["punctuation", ":"], | ||
223 | + "srackham@gmail.com", | ||
224 | + ["attributes", [ | ||
225 | + ["punctuation", "["], ["punctuation", "]"] | ||
226 | + ]] | ||
227 | + ]], | ||
228 | + ["macro", [ | ||
229 | + ["function", "image"], ["punctuation", ":"], | ||
230 | + "screen-thumbnail.png", | ||
231 | + ["attributes", [ | ||
232 | + ["punctuation", "["], | ||
233 | + ["variable", "height"], | ||
234 | + ["operator", "="], | ||
235 | + ["attr-value", "32"], | ||
236 | + ["punctuation", ","], | ||
237 | + ["variable", "link"], | ||
238 | + ["operator", "="], | ||
239 | + ["string", "\"screen.png\""], | ||
240 | + ["punctuation", "]"] | ||
241 | + ]] | ||
242 | + ]], | ||
243 | + | ||
244 | + ["punctuation", "|===="] | ||
245 | + ]] | ||
246 | +] | ||
247 | + | ||
248 | +---------------------------------------------------- | ||
249 | + | ||
250 | +Checks for macros. | ||
0 | \ No newline at end of file | 251 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/other-block_feature.test
0 → 100755
1 | +**** | ||
2 | +Sidebar block <1> | ||
3 | +**** | ||
4 | + | ||
5 | +______ | ||
6 | +Quote block <2> | ||
7 | +______ | ||
8 | + | ||
9 | +======== | ||
10 | +Example block <3> | ||
11 | +======== | ||
12 | + | ||
13 | +-- | ||
14 | +Open block <4> | ||
15 | +-- | ||
16 | + | ||
17 | +---------------------------------------------------- | ||
18 | + | ||
19 | +[ | ||
20 | + ["other-block", [ | ||
21 | + ["punctuation", "****"], | ||
22 | + "\r\nSidebar block <1>\r\n", | ||
23 | + ["punctuation", "****"] | ||
24 | + ]], | ||
25 | + ["other-block", [ | ||
26 | + ["punctuation", "______"], | ||
27 | + "\r\nQuote block <2>\r\n", | ||
28 | + ["punctuation", "______"] | ||
29 | + ]], | ||
30 | + ["other-block", [ | ||
31 | + ["punctuation", "========"], | ||
32 | + "\r\nExample block <3>\r\n", | ||
33 | + ["punctuation", "========"] | ||
34 | + ]], | ||
35 | + ["other-block", [ | ||
36 | + ["punctuation", "--"], | ||
37 | + "\r\nOpen block <4>\r\n", | ||
38 | + ["punctuation", "--"] | ||
39 | + ]] | ||
40 | +] | ||
41 | + | ||
42 | +---------------------------------------------------- | ||
43 | + | ||
44 | +Checks for sidebar blocks, quote blocks, example blocks and open blocks. | ||
45 | +Also checks that callouts are not highlighted. | ||
0 | \ No newline at end of file | 46 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/page-break_feature.test
0 → 100755
1 | +<<< | ||
2 | + | ||
3 | +<<<<<<<<<<<<< | ||
4 | + | ||
5 | +---------------------------------------------------- | ||
6 | + | ||
7 | +[ | ||
8 | + ["page-break", "<<<"], | ||
9 | + ["page-break", "<<<<<<<<<<<<<"] | ||
10 | +] | ||
11 | + | ||
12 | +---------------------------------------------------- | ||
13 | + | ||
14 | +Checks for page breaks. | ||
0 | \ No newline at end of file | 15 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/passthrough-block_feature.test
0 → 100755
1 | +++++ | ||
2 | +.Fo__o__bar *baz* | ||
3 | +Fo(((o)))bar baz | ||
4 | +* Foobar baz | ||
5 | +include::addendum.txt[] | ||
6 | +++++ | ||
7 | + | ||
8 | +---------------------------------------------------- | ||
9 | + | ||
10 | +[ | ||
11 | + ["passthrough-block", [ | ||
12 | + ["punctuation", "++++"], | ||
13 | + "\r\n.Fo__o__bar *baz*\r\nFo(((o)))bar baz\r\n* Foobar baz\r\n", | ||
14 | + ["macro", [ | ||
15 | + ["function", "include"], | ||
16 | + ["punctuation", "::"], | ||
17 | + "addendum.txt", | ||
18 | + ["attributes", [ | ||
19 | + ["punctuation", "["], ["punctuation", "]"] | ||
20 | + ]] | ||
21 | + ]], | ||
22 | + ["punctuation", "++++"] | ||
23 | + ]] | ||
24 | +] | ||
25 | + | ||
26 | +---------------------------------------------------- | ||
27 | + | ||
28 | +Checks for passthrough blocks. | ||
29 | +Also checks that nothing gets highlighted inside expect macros. | ||
0 | \ No newline at end of file | 30 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/replacement_feature.test
0 → 100755
1 | +(C) (TM) (R) | ||
2 | + | ||
3 | +(C) (TM) (R) | ||
4 | +============ | ||
5 | + | ||
6 | +['(C) (TM) (R)'] | ||
7 | + | ||
8 | +-- | ||
9 | +(C) (TM) (R) | ||
10 | +-- | ||
11 | + | ||
12 | +|====== | ||
13 | +| (C) (TM) (R) | ||
14 | +|====== | ||
15 | + | ||
16 | +---------------------------------------------------- | ||
17 | + | ||
18 | +[ | ||
19 | + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], | ||
20 | + ["title", [ | ||
21 | + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], | ||
22 | + ["punctuation", "============"] | ||
23 | + ]], | ||
24 | + ["attributes", [ | ||
25 | + ["punctuation", "["], | ||
26 | + ["interpreted", [ | ||
27 | + ["punctuation", "'"], | ||
28 | + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], | ||
29 | + ["punctuation", "'"] | ||
30 | + ]], | ||
31 | + ["punctuation", "]"] | ||
32 | + ]], | ||
33 | + ["other-block", [ | ||
34 | + ["punctuation", "--"], | ||
35 | + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], | ||
36 | + ["punctuation", "--"] | ||
37 | + ]], | ||
38 | + ["table", [ | ||
39 | + ["punctuation", "|======"], | ||
40 | + ["punctuation", "|"], | ||
41 | + ["replacement", "(C)"], ["replacement", "(TM)"], ["replacement", "(R)"], | ||
42 | + ["punctuation", "|======"] | ||
43 | + ]] | ||
44 | +] | ||
45 | + | ||
46 | +---------------------------------------------------- | ||
47 | + | ||
48 | +Checks for replacements. | ||
0 | \ No newline at end of file | 49 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/table_feature.test
0 → 100755
1 | +|=== | ||
2 | +|1 | ||
3 | +|=== | ||
4 | + | ||
5 | +|============================ | ||
6 | +|1 >s|2 |3 |4 | ||
7 | +^|5 2.2+^.^|6 .3+<.>m|7 | ||
8 | +2*^|8 | ||
9 | +|9 2+>|10 | ||
10 | +|============================ | ||
11 | + | ||
12 | +|============================================== | ||
13 | +|Normal cell | ||
14 | + | ||
15 | +|Cell with nested table | ||
16 | + | ||
17 | +!============================================== | ||
18 | +!Nested table cell 1 !Nested table cell 2 | ||
19 | +!============================================== | ||
20 | + | ||
21 | +|============================================== | ||
22 | + | ||
23 | +---------------------------------------------------- | ||
24 | + | ||
25 | +[ | ||
26 | + ["table", [ | ||
27 | + ["punctuation", "|==="], | ||
28 | + ["punctuation", "|"], "1\r\n", | ||
29 | + ["punctuation", "|==="] | ||
30 | + ]], | ||
31 | + | ||
32 | + ["table", [ | ||
33 | + ["punctuation", "|============================"], | ||
34 | + ["punctuation", "|"], "1 ", | ||
35 | + ["specifiers", ">s"], ["punctuation", "|"], "2 ", | ||
36 | + ["punctuation", "|"], "3 ", | ||
37 | + ["punctuation", "|"], "4\r\n", | ||
38 | + ["specifiers", "^"], ["punctuation", "|"], "5 ", | ||
39 | + ["specifiers", "2.2+^.^"], ["punctuation", "|"], "6 ", | ||
40 | + ["specifiers", ".3+<.>m"], ["punctuation", "|"], "7\r\n", | ||
41 | + ["specifiers", "2*^"], ["punctuation", "|"], "8\r\n", | ||
42 | + ["punctuation", "|"], "9 ", | ||
43 | + ["specifiers", "2+>"], ["punctuation", "|"], "10\r\n", | ||
44 | + ["punctuation", "|============================"] | ||
45 | + ]], | ||
46 | + | ||
47 | + ["table", [ | ||
48 | + ["punctuation", "|=============================================="], | ||
49 | + ["punctuation", "|"], "Normal cell\r\n\r\n", | ||
50 | + ["punctuation", "|"], "Cell with nested table\r\n\r\n", | ||
51 | + ["punctuation", "!=============================================="], | ||
52 | + ["punctuation", "!"], "Nested table cell 1 ", | ||
53 | + ["punctuation", "!"], "Nested table cell 2\r\n", | ||
54 | + ["punctuation", "!=============================================="], | ||
55 | + ["punctuation", "|=============================================="] | ||
56 | + ]] | ||
57 | +] | ||
58 | + | ||
59 | +---------------------------------------------------- | ||
60 | + | ||
61 | +Checks for tables. | ||
0 | \ No newline at end of file | 62 | \ No newline at end of file |
bower_components/prism/tests/languages/asciidoc/title_feature.test
0 → 100755
1 | +Foobar | ||
2 | +====== | ||
3 | + | ||
4 | +Foobar | ||
5 | +------ | ||
6 | + | ||
7 | +Foobar | ||
8 | +~~~~~~ | ||
9 | + | ||
10 | +Foobar | ||
11 | +^^^^^^ | ||
12 | + | ||
13 | +Foo | ||
14 | ++++ | ||
15 | + | ||
16 | += Foo bar baz = | ||
17 | +== Foo bar baz | ||
18 | +=== Foo bar baz === | ||
19 | +==== Foo bar baz | ||
20 | +===== Foo bar baz ===== | ||
21 | + | ||
22 | +.Foo bar baz | ||
23 | + | ||
24 | +---------------------------------------------------- | ||
25 | + | ||
26 | +[ | ||
27 | + ["title", [ | ||
28 | + "Foobar\r\n", | ||
29 | + ["punctuation", "======"] | ||
30 | + ]], | ||
31 | + ["title", [ | ||
32 | + "Foobar\r\n", | ||
33 | + ["punctuation", "------"] | ||
34 | + ]], | ||
35 | + ["title", [ | ||
36 | + "Foobar\r\n", | ||
37 | + ["punctuation", "~~~~~~"] | ||
38 | + ]], | ||
39 | + ["title", [ | ||
40 | + "Foobar\r\n", | ||
41 | + ["punctuation", "^^^^^^"] | ||
42 | + ]], | ||
43 | + ["title", [ | ||
44 | + "Foo\r\n", | ||
45 | + ["punctuation", "+++"] | ||
46 | + ]], | ||
47 | + | ||
48 | + ["title", [ | ||
49 | + ["punctuation", "="], | ||
50 | + " Foo bar baz ", | ||
51 | + ["punctuation", "="] | ||
52 | + ]], | ||
53 | + ["title", [ | ||
54 | + ["punctuation", "=="], | ||
55 | + " Foo bar baz" | ||
56 | + ]], | ||
57 | + ["title", [ | ||
58 | + ["punctuation", "==="], | ||
59 | + " Foo bar baz ", | ||
60 | + ["punctuation", "==="] | ||
61 | + ]], | ||
62 | + ["title", [ | ||
63 | + ["punctuation", "===="], | ||
64 | + " Foo bar baz" | ||
65 | + ]], | ||
66 | + ["title", [ | ||
67 | + ["punctuation", "====="], | ||
68 | + " Foo bar baz ", | ||
69 | + ["punctuation", "====="] | ||
70 | + ]], | ||
71 | + | ||
72 | + ["title", [ | ||
73 | + ["punctuation", "."], | ||
74 | + "Foo bar baz" | ||
75 | + ]] | ||
76 | +] | ||
77 | + | ||
78 | +---------------------------------------------------- | ||
79 | + | ||
80 | +Checks for titles. | ||
0 | \ No newline at end of file | 81 | \ No newline at end of file |
bower_components/prism/tests/languages/aspnet/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/aspnet/page-directive_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/boolean_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/builtin_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/constant_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/function_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/important_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/selector_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/symbol_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/tag_feature.test
100644 → 100755
bower_components/prism/tests/languages/autohotkey/variable_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/boolean_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/directive_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/function_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/url_feature.test
100644 → 100755
bower_components/prism/tests/languages/autoit/variable_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/arithmetic_environment_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/command_substitution_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/function_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/shebang_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/bash/variable_feature.test
100644 → 100755
bower_components/prism/tests/languages/basic/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/basic/function_feature.test
100644 → 100755
bower_components/prism/tests/languages/basic/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/basic/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/basic/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/basic/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/batch/command_feature.test
100644 → 100755
bower_components/prism/tests/languages/batch/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/batch/label_feature.test
100644 → 100755
bower_components/prism/tests/languages/bison/c_feature.test
100644 → 100755
@@ -21,7 +21,7 @@ exp: | @@ -21,7 +21,7 @@ exp: | ||
21 | ["bison", [ | 21 | ["bison", [ |
22 | ["c", [ | 22 | ["c", [ |
23 | ["delimiter", "%{"], | 23 | ["delimiter", "%{"], |
24 | - ["macro", ["#include ", ["string", "<stdio.h>"]]], | 24 | + ["macro", ["#", ["directive", "include"], ["string", "<stdio.h>"]]], |
25 | ["delimiter", "%}"] | 25 | ["delimiter", "%}"] |
26 | ]], | 26 | ]], |
27 | ["keyword", "%code"], | 27 | ["keyword", "%code"], |
bower_components/prism/tests/languages/bison/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/bison/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/bison/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/bison/property_feature.test
100644 → 100755
bower_components/prism/tests/languages/bison/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/brainfuck/all_feature.test
100644 → 100755
bower_components/prism/tests/languages/c+pure/c_inclusion.test
100644 → 100755
bower_components/prism/tests/languages/c/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/c/macro_feature.test
100644 → 100755
1 | # include <stdio.h> | 1 | # include <stdio.h> |
2 | #define PG_locked 0 | 2 | #define PG_locked 0 |
3 | -#foo \ | ||
4 | -bar | 3 | + |
4 | +#elif | ||
5 | +#else | ||
6 | +#endif | ||
7 | +#error | ||
8 | +#ifdef | ||
9 | +#ifndef | ||
10 | +#if | ||
11 | +#import | ||
12 | +#include | ||
13 | +#line | ||
14 | +#pragma | ||
15 | +#undef | ||
16 | +#using | ||
5 | 17 | ||
6 | ---------------------------------------------------- | 18 | ---------------------------------------------------- |
7 | 19 | ||
8 | [ | 20 | [ |
9 | ["macro", [ | 21 | ["macro", [ |
10 | - "# include ", | 22 | + "# ", ["directive", "include"], |
11 | ["string", "<stdio.h>"] | 23 | ["string", "<stdio.h>"] |
12 | ]], | 24 | ]], |
13 | - ["macro", ["#define PG_locked 0"]], | ||
14 | - ["macro", ["#foo \\\r\nbar"]] | 25 | + ["macro", ["#", ["directive", "define"], " PG_locked 0"]], |
26 | + ["macro", ["#", ["directive", "elif"]]], | ||
27 | + ["macro", ["#", ["directive", "else"]]], | ||
28 | + ["macro", ["#", ["directive", "endif"]]], | ||
29 | + ["macro", ["#", ["directive", "error"]]], | ||
30 | + ["macro", ["#", ["directive", "ifdef"]]], | ||
31 | + ["macro", ["#", ["directive", "ifndef"]]], | ||
32 | + ["macro", ["#", ["directive", "if"]]], | ||
33 | + ["macro", ["#", ["directive", "import"]]], | ||
34 | + ["macro", ["#", ["directive", "include"]]], | ||
35 | + ["macro", ["#", ["directive", "line"]]], | ||
36 | + ["macro", ["#", ["directive", "pragma"]]], | ||
37 | + ["macro", ["#", ["directive", "undef"]]], | ||
38 | + ["macro", ["#", ["directive", "using"]]] | ||
15 | ] | 39 | ] |
16 | 40 | ||
17 | ---------------------------------------------------- | 41 | ---------------------------------------------------- |
bower_components/prism/tests/languages/c/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/c/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/boolean_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/class-name_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/function_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/operator_feature.test
100644 → 100755
bower_components/prism/tests/languages/clike/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript+haml/coffeescript_inclusion.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript+jade/coffeescript_inclusion.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript/block-regex_feature.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript/class-member_feature.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript/comment_feature.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript/inline-javascript_feature.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript/property_feature.test
100644 → 100755
bower_components/prism/tests/languages/coffeescript/string_feature.test
100644 → 100755
bower_components/prism/tests/languages/cpp+pure/cpp_inclusion.test
100644 → 100755
bower_components/prism/tests/languages/cpp/boolean_feature.test
100644 → 100755
bower_components/prism/tests/languages/cpp/class-name_feature.test
100644 → 100755
bower_components/prism/tests/languages/cpp/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/crystal/attribute_feature.test
100644 → 100755
bower_components/prism/tests/languages/crystal/expansion_feature.test
100644 → 100755
bower_components/prism/tests/languages/crystal/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/crystal/number_feature.test
100644 → 100755
bower_components/prism/tests/languages/csharp+aspnet/directive_feature.test
100644 → 100755
bower_components/prism/tests/languages/csharp/issue806.test
0 → 100755
1 | +0.3f | ||
2 | + | ||
3 | +---------------------------------------------------- | ||
4 | + | ||
5 | +[ | ||
6 | + ["number", "0.3f"] | ||
7 | +] | ||
8 | + | ||
9 | +---------------------------------------------------- | ||
10 | + | ||
11 | +Checks that "f" prefix is properly highlighted as part of the number. | ||
12 | +See #806. | ||
0 | \ No newline at end of file | 13 | \ No newline at end of file |
bower_components/prism/tests/languages/csharp/keyword_feature.test
100644 → 100755
bower_components/prism/tests/languages/csharp/number_feature.test
100644 → 100755