├── README.md ├── bower.json ├── bower_components ├── iron-ajax │ ├── .bower.json │ ├── .gitignore │ ├── README.md │ ├── bower.json │ ├── demo │ │ └── index.html │ ├── hero.svg │ ├── index.html │ ├── iron-ajax.html │ ├── iron-request.html │ └── test │ │ ├── index.html │ │ ├── iron-ajax.html │ │ └── iron-request.html ├── iron-flex-layout │ ├── .bower.json │ ├── .gitignore │ ├── README.md │ ├── bower.json │ ├── classes │ │ ├── iron-flex-layout.html │ │ └── iron-shadow-flex-layout.html │ ├── demo │ │ ├── index.html │ │ └── x-app.html │ ├── index.html │ └── iron-flex-layout.html ├── iron-image │ ├── .bower.json │ ├── .gitignore │ ├── README.md │ ├── bower.json │ ├── demo │ │ ├── index.html │ │ └── polymer.svg │ ├── index.html │ ├── iron-image.html │ └── test │ │ ├── index.html │ │ └── iron-image.html ├── jquery │ ├── .bower.json │ ├── MIT-LICENSE.txt │ ├── bower.json │ ├── dist │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map │ └── src │ │ ├── ajax.js │ │ ├── ajax │ │ ├── jsonp.js │ │ ├── load.js │ │ ├── parseJSON.js │ │ ├── parseXML.js │ │ ├── script.js │ │ ├── var │ │ │ ├── nonce.js │ │ │ └── rquery.js │ │ └── xhr.js │ │ ├── attributes.js │ │ ├── attributes │ │ ├── attr.js │ │ ├── classes.js │ │ ├── prop.js │ │ ├── support.js │ │ └── val.js │ │ ├── callbacks.js │ │ ├── core.js │ │ ├── core │ │ ├── access.js │ │ ├── init.js │ │ ├── parseHTML.js │ │ ├── ready.js │ │ └── var │ │ │ └── rsingleTag.js │ │ ├── css.js │ │ ├── css │ │ ├── addGetHookIf.js │ │ ├── curCSS.js │ │ ├── defaultDisplay.js │ │ ├── hiddenVisibleSelectors.js │ │ ├── support.js │ │ ├── swap.js │ │ └── var │ │ │ ├── cssExpand.js │ │ │ ├── getStyles.js │ │ │ ├── isHidden.js │ │ │ ├── rmargin.js │ │ │ └── rnumnonpx.js │ │ ├── data.js │ │ ├── data │ │ ├── Data.js │ │ ├── accepts.js │ │ └── var │ │ │ ├── data_priv.js │ │ │ └── data_user.js │ │ ├── deferred.js │ │ ├── deprecated.js │ │ ├── dimensions.js │ │ ├── effects.js │ │ ├── effects │ │ ├── Tween.js │ │ └── animatedSelector.js │ │ ├── event.js │ │ ├── event │ │ ├── ajax.js │ │ ├── alias.js │ │ └── support.js │ │ ├── exports │ │ ├── amd.js │ │ └── global.js │ │ ├── intro.js │ │ ├── jquery.js │ │ ├── manipulation.js │ │ ├── manipulation │ │ ├── _evalUrl.js │ │ ├── support.js │ │ └── var │ │ │ └── rcheckableType.js │ │ ├── offset.js │ │ ├── outro.js │ │ ├── queue.js │ │ ├── queue │ │ └── delay.js │ │ ├── selector-native.js │ │ ├── selector-sizzle.js │ │ ├── selector.js │ │ ├── serialize.js │ │ ├── sizzle │ │ └── dist │ │ │ ├── sizzle.js │ │ │ ├── sizzle.min.js │ │ │ └── sizzle.min.map │ │ ├── traversing.js │ │ ├── traversing │ │ ├── findFilter.js │ │ └── var │ │ │ └── rneedsContext.js │ │ ├── var │ │ ├── arr.js │ │ ├── class2type.js │ │ ├── concat.js │ │ ├── hasOwn.js │ │ ├── indexOf.js │ │ ├── pnum.js │ │ ├── push.js │ │ ├── rnotwhite.js │ │ ├── slice.js │ │ ├── strundefined.js │ │ ├── support.js │ │ └── toString.js │ │ └── wrap.js ├── polymer │ ├── .bower.json │ ├── LICENSE.txt │ ├── bower.json │ ├── build.log │ ├── polymer-micro.html │ ├── polymer-mini.html │ └── polymer.html ├── promise-polyfill │ ├── .bower.json │ ├── Gruntfile.js │ ├── LICENSE │ ├── Promise-Statics.js │ ├── Promise.js │ ├── Promise.min.js │ ├── README.md │ ├── bower.json │ ├── package.json │ ├── promise-polyfill-lite.html │ └── promise-polyfill.html └── webcomponentsjs │ ├── .bower.json │ ├── CustomElements.js │ ├── CustomElements.min.js │ ├── HTMLImports.js │ ├── HTMLImports.min.js │ ├── MutationObserver.js │ ├── MutationObserver.min.js │ ├── README.md │ ├── ShadowDOM.js │ ├── ShadowDOM.min.js │ ├── bower.json │ ├── build.log │ ├── package.json │ ├── webcomponents-lite.js │ ├── webcomponents-lite.min.js │ ├── webcomponents.js │ └── webcomponents.min.js ├── cors.php ├── index.html ├── wp-api-image.html └── wp-api-posts.html /README.md: -------------------------------------------------------------------------------- 1 | # Web Components + WordPress REST API Example 2 | Uses polymer iron-ajax and some other fun stuff to embed blog posts in an HTML site. 3 | 4 | This is a work in progress of a proof of concept. Needs moar abstraction/ css. 5 | 6 | ### Installation: 7 | 8 | In WordPress: 9 | * Install REST API plugin v2 10 | * Setup CORS headers properly. 11 | * Use the cors.php file in this directory as an example. 12 | * See [this article for more information on REST API + CORS](http://joshpress.net/access-control-headers-for-the-wordpress-rest-api/) 13 | * You should probably set a more specific CORS header than "*" 14 | 15 | This HTML Doc 16 | * If Bower and NPM are not installed, [install them](http://lmgtfy.com/?q=Install+Bower). 17 | * Run `bower install` 18 | * In index.html set attribute `data-wp-api-root` on `#id` to your REST API root URL 19 | * Don't trailingslash that shit. 20 | 21 | ### Questions? 22 | Wait for me to write this up for Torque, if it's still not clear, tweet at me. 23 | 24 | Please feel free to submit a pull request to fix whatever is dumb/ busted about this. 25 | 26 | ### @todo 27 | 1. Local Storage and/or offline mode. 28 | 2. CSSeses 29 | 3. Forms, etc. 30 | 4. Move as much as possible into standalone components that y'all can bower on into your own projects. 31 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wp-api-polymer-example", 3 | "version": "0.0.2", 4 | "authors": [ 5 | "Josh Pollock " 6 | ], 7 | "description": "WordPress REST API Polymer Web Componets Example", 8 | "main": "", 9 | "moduleType": [], 10 | "license": "GPLv2+", 11 | "homepage": "http://JoshPress.net", 12 | "ignore": [ 13 | "**/.*", 14 | "node_modules", 15 | "bower_components", 16 | "test", 17 | "tests" 18 | ], 19 | "dependencies": { 20 | "iron-ajax": "PolymerElements/iron-ajax#~1.0.6" 21 | }, 22 | "devDependencies": { 23 | "jquery": "~2.1.4" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-ajax", 3 | "version": "1.0.6", 4 | "description": "Makes it easy to make ajax calls and parse the response", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "web-components", 11 | "polymer", 12 | "ajax" 13 | ], 14 | "main": "iron-ajax.html", 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-ajax.git" 18 | }, 19 | "license": "http://polymer.github.io/LICENSE.txt", 20 | "homepage": "https://github.com/PolymerElements/iron-ajax", 21 | "ignore": [], 22 | "dependencies": { 23 | "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0", 24 | "polymer": "Polymer/polymer#^1.0.0" 25 | }, 26 | "devDependencies": { 27 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 28 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 29 | "iron-image": "polymerelements/iron-image#^1.0.0", 30 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 31 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 32 | "web-component-tester": "*", 33 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 34 | }, 35 | "_release": "1.0.6", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v1.0.6", 39 | "commit": "72f463a166013e12880bb881d680adf386520c49" 40 | }, 41 | "_source": "git://github.com/PolymerElements/iron-ajax.git", 42 | "_target": "~1.0.6", 43 | "_originalSource": "PolymerElements/iron-ajax", 44 | "_direct": true 45 | } -------------------------------------------------------------------------------- /bower_components/iron-ajax/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/README.md: -------------------------------------------------------------------------------- 1 | iron-ajax 2 | ========= 3 | 4 | The `iron-ajax` element exposes network request functionality. 5 | 6 | ```html 7 | 12 | ``` 13 | 14 | With `auto` set to `true`, the element performs a request whenever 15 | its `url`, `params` or `body` properties are changed. Automatically generated 16 | requests will be debounced in the case that multiple attributes are changed 17 | sequentially. 18 | 19 | Note: The `params` attribute must be double quoted JSON. 20 | 21 | You can trigger a request explicitly by calling `generateRequest` on the 22 | element. 23 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-ajax", 3 | "version": "1.0.6", 4 | "description": "Makes it easy to make ajax calls and parse the response", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "web-components", 11 | "polymer", 12 | "ajax" 13 | ], 14 | "main": "iron-ajax.html", 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-ajax.git" 18 | }, 19 | "license": "http://polymer.github.io/LICENSE.txt", 20 | "homepage": "https://github.com/PolymerElements/iron-ajax", 21 | "ignore": [], 22 | "dependencies": { 23 | "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0", 24 | "polymer": "Polymer/polymer#^1.0.0" 25 | }, 26 | "devDependencies": { 27 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 28 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 29 | "iron-image": "polymerelements/iron-image#^1.0.0", 30 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 31 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 32 | "web-component-tester": "*", 33 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | iron-ajax 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 48 | 49 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/hero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | iron-ajax 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /bower_components/iron-ajax/test/iron-request.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | iron-request 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 222 | 223 | 224 | 225 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-flex-layout", 3 | "version": "1.0.4", 4 | "description": "Provide flexbox-based layouts", 5 | "keywords": [ 6 | "web-components", 7 | "polymer", 8 | "layout" 9 | ], 10 | "main": "iron-flex-layout.html", 11 | "private": true, 12 | "license": "http://polymer.github.io/LICENSE.txt", 13 | "authors": [ 14 | "The Polymer Authors" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/PolymerElements/iron-flex-layout.git" 19 | }, 20 | "dependencies": { 21 | "polymer": "Polymer/polymer#^1.0.0" 22 | }, 23 | "devDependencies": { 24 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 25 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 26 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0" 27 | }, 28 | "homepage": "https://github.com/polymerelements/iron-flex-layout", 29 | "_release": "1.0.4", 30 | "_resolution": { 31 | "type": "version", 32 | "tag": "v1.0.4", 33 | "commit": "dcfc54b0d358269bf0c72180b4ab090fc4931ecd" 34 | }, 35 | "_source": "git://github.com/polymerelements/iron-flex-layout.git", 36 | "_target": "^1.0.0", 37 | "_originalSource": "polymerelements/iron-flex-layout" 38 | } -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | 3 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/README.md: -------------------------------------------------------------------------------- 1 | iron-flex-layout 2 | ================ 3 | 4 | Layout styles for the iron elements. 5 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-flex-layout", 3 | "version": "1.0.4", 4 | "description": "Provide flexbox-based layouts", 5 | "keywords": [ 6 | "web-components", 7 | "polymer", 8 | "layout" 9 | ], 10 | "main": "iron-flex-layout.html", 11 | "private": true, 12 | "license": "http://polymer.github.io/LICENSE.txt", 13 | "authors": [ 14 | "The Polymer Authors" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/PolymerElements/iron-flex-layout.git" 19 | }, 20 | "dependencies": { 21 | "polymer": "Polymer/polymer#^1.0.0" 22 | }, 23 | "devDependencies": { 24 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 25 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 26 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/classes/iron-flex-layout.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 308 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html: -------------------------------------------------------------------------------- 1 | 10 | 303 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | iron-flex-layout 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/demo/x-app.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 80 | 81 | 109 | 110 | 111 | 118 | 119 | -------------------------------------------------------------------------------- /bower_components/iron-flex-layout/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | iron-flex-layout 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /bower_components/iron-image/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-image", 3 | "version": "1.0.2", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "An image-displaying element with lots of convenient features", 6 | "private": true, 7 | "authors": [ 8 | "The Polymer Authors" 9 | ], 10 | "keywords": [ 11 | "web-components", 12 | "polymer", 13 | "media" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-image.git" 18 | }, 19 | "dependencies": { 20 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 21 | "polymer": "Polymer/polymer#^1.0.0" 22 | }, 23 | "devDependencies": { 24 | "paper-styles": "polymerelements/paper-styles#^1.0.4", 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "web-component-tester": "*", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 29 | }, 30 | "homepage": "https://github.com/polymerelements/iron-image", 31 | "_release": "1.0.2", 32 | "_resolution": { 33 | "type": "version", 34 | "tag": "v1.0.2", 35 | "commit": "f3d3090dc9a59b662f67c9c7dd1fc61e716f353d" 36 | }, 37 | "_source": "git://github.com/polymerelements/iron-image.git", 38 | "_target": "^1.0.0", 39 | "_originalSource": "polymerelements/iron-image" 40 | } -------------------------------------------------------------------------------- /bower_components/iron-image/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /bower_components/iron-image/README.md: -------------------------------------------------------------------------------- 1 | iron-image 2 | ========== 3 | 4 | `iron-image` is an element for displaying an image that provides useful sizing and 5 | preloading options not found on the standard `` tag. 6 | 7 | The `sizing` option allows the image to be either cropped (`cover`) or 8 | letterboxed (`contain`) to fill a fixed user-size placed on the element. 9 | 10 | The `preload` option prevents the browser from rendering the image until the 11 | image is fully loaded. In the interim, either the element's CSS `background-color` 12 | can be be used as the placeholder, or the `placeholder` property can be 13 | set to a URL (preferably a data-URI, for instant rendering) for an 14 | placeholder image. 15 | 16 | The `fade` option (only valid when `preload` is set) will cause the placeholder 17 | image/color to be faded out once the image is rendered. 18 | 19 | Examples: 20 | 21 | Basically identical to `` tag: 22 | 23 | ```html 24 | 25 | ``` 26 | 27 | Will letterbox the image to fit: 28 | 29 | ```html 30 | 32 | ``` 33 | 34 | Will crop the image to fit: 35 | 36 | ```html 37 | 39 | ``` 40 | 41 | Will show light-gray background until the image loads: 42 | 43 | ```html 44 | 46 | ``` 47 | 48 | Will show a base-64 encoded placeholder image until the image loads: 49 | 50 | ```html 51 | 53 | ``` 54 | 55 | Will fade the light-gray background out once the image is loaded: 56 | 57 | ```html 58 | 60 | ``` 61 | -------------------------------------------------------------------------------- /bower_components/iron-image/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-image", 3 | "version": "1.0.2", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "An image-displaying element with lots of convenient features", 6 | "private": true, 7 | "authors": [ 8 | "The Polymer Authors" 9 | ], 10 | "keywords": [ 11 | "web-components", 12 | "polymer", 13 | "media" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-image.git" 18 | }, 19 | "dependencies": { 20 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 21 | "polymer": "Polymer/polymer#^1.0.0" 22 | }, 23 | "devDependencies": { 24 | "paper-styles": "polymerelements/paper-styles#^1.0.4", 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "web-component-tester": "*", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /bower_components/iron-image/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | iron-image 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /bower_components/iron-image/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /bower_components/iron-image/test/iron-image.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | iron-image 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.4", 4 | "main": "dist/jquery.js", 5 | "license": "MIT", 6 | "ignore": [ 7 | "**/.*", 8 | "build", 9 | "dist/cdn", 10 | "speed", 11 | "test", 12 | "*.md", 13 | "AUTHORS.txt", 14 | "Gruntfile.js", 15 | "package.json" 16 | ], 17 | "devDependencies": { 18 | "sizzle": "2.1.1-jquery.2.1.2", 19 | "requirejs": "2.1.10", 20 | "qunit": "1.14.0", 21 | "sinon": "1.8.1" 22 | }, 23 | "keywords": [ 24 | "jquery", 25 | "javascript", 26 | "library" 27 | ], 28 | "homepage": "https://github.com/jquery/jquery", 29 | "_release": "2.1.4", 30 | "_resolution": { 31 | "type": "version", 32 | "tag": "2.1.4", 33 | "commit": "7751e69b615c6eca6f783a81e292a55725af6b85" 34 | }, 35 | "_source": "git://github.com/jquery/jquery.git", 36 | "_target": "~2.1.4", 37 | "_originalSource": "jquery", 38 | "_direct": true 39 | } -------------------------------------------------------------------------------- /bower_components/jquery/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 jQuery Foundation and other contributors 2 | http://jquery.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.4", 4 | "main": "dist/jquery.js", 5 | "license": "MIT", 6 | "ignore": [ 7 | "**/.*", 8 | "build", 9 | "dist/cdn", 10 | "speed", 11 | "test", 12 | "*.md", 13 | "AUTHORS.txt", 14 | "Gruntfile.js", 15 | "package.json" 16 | ], 17 | "devDependencies": { 18 | "sizzle": "2.1.1-jquery.2.1.2", 19 | "requirejs": "2.1.10", 20 | "qunit": "1.14.0", 21 | "sinon": "1.8.1" 22 | }, 23 | "keywords": [ 24 | "jquery", 25 | "javascript", 26 | "library" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/jsonp.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "./var/nonce", 4 | "./var/rquery", 5 | "../ajax" 6 | ], function( jQuery, nonce, rquery ) { 7 | 8 | var oldCallbacks = [], 9 | rjsonp = /(=)\?(?=&|$)|\?\?/; 10 | 11 | // Default jsonp settings 12 | jQuery.ajaxSetup({ 13 | jsonp: "callback", 14 | jsonpCallback: function() { 15 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 16 | this[ callback ] = true; 17 | return callback; 18 | } 19 | }); 20 | 21 | // Detect, normalize options and install callbacks for jsonp requests 22 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 23 | 24 | var callbackName, overwritten, responseContainer, 25 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 26 | "url" : 27 | typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" 28 | ); 29 | 30 | // Handle iff the expected data type is "jsonp" or we have a parameter to set 31 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 32 | 33 | // Get callback name, remembering preexisting value associated with it 34 | callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 35 | s.jsonpCallback() : 36 | s.jsonpCallback; 37 | 38 | // Insert callback into url or form data 39 | if ( jsonProp ) { 40 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 41 | } else if ( s.jsonp !== false ) { 42 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 43 | } 44 | 45 | // Use data converter to retrieve json after script execution 46 | s.converters["script json"] = function() { 47 | if ( !responseContainer ) { 48 | jQuery.error( callbackName + " was not called" ); 49 | } 50 | return responseContainer[ 0 ]; 51 | }; 52 | 53 | // force json dataType 54 | s.dataTypes[ 0 ] = "json"; 55 | 56 | // Install callback 57 | overwritten = window[ callbackName ]; 58 | window[ callbackName ] = function() { 59 | responseContainer = arguments; 60 | }; 61 | 62 | // Clean-up function (fires after converters) 63 | jqXHR.always(function() { 64 | // Restore preexisting value 65 | window[ callbackName ] = overwritten; 66 | 67 | // Save back as free 68 | if ( s[ callbackName ] ) { 69 | // make sure that re-using the options doesn't screw things around 70 | s.jsonpCallback = originalSettings.jsonpCallback; 71 | 72 | // save the callback name for future use 73 | oldCallbacks.push( callbackName ); 74 | } 75 | 76 | // Call if it was a function and we have a response 77 | if ( responseContainer && jQuery.isFunction( overwritten ) ) { 78 | overwritten( responseContainer[ 0 ] ); 79 | } 80 | 81 | responseContainer = overwritten = undefined; 82 | }); 83 | 84 | // Delegate to script 85 | return "script"; 86 | } 87 | }); 88 | 89 | }); 90 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/load.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../core/parseHTML", 4 | "../ajax", 5 | "../traversing", 6 | "../manipulation", 7 | "../selector", 8 | // Optional event/alias dependency 9 | "../event/alias" 10 | ], function( jQuery ) { 11 | 12 | // Keep a copy of the old load method 13 | var _load = jQuery.fn.load; 14 | 15 | /** 16 | * Load a url into a page 17 | */ 18 | jQuery.fn.load = function( url, params, callback ) { 19 | if ( typeof url !== "string" && _load ) { 20 | return _load.apply( this, arguments ); 21 | } 22 | 23 | var selector, type, response, 24 | self = this, 25 | off = url.indexOf(" "); 26 | 27 | if ( off >= 0 ) { 28 | selector = jQuery.trim( url.slice( off ) ); 29 | url = url.slice( 0, off ); 30 | } 31 | 32 | // If it's a function 33 | if ( jQuery.isFunction( params ) ) { 34 | 35 | // We assume that it's the callback 36 | callback = params; 37 | params = undefined; 38 | 39 | // Otherwise, build a param string 40 | } else if ( params && typeof params === "object" ) { 41 | type = "POST"; 42 | } 43 | 44 | // If we have elements to modify, make the request 45 | if ( self.length > 0 ) { 46 | jQuery.ajax({ 47 | url: url, 48 | 49 | // if "type" variable is undefined, then "GET" method will be used 50 | type: type, 51 | dataType: "html", 52 | data: params 53 | }).done(function( responseText ) { 54 | 55 | // Save response for use in complete callback 56 | response = arguments; 57 | 58 | self.html( selector ? 59 | 60 | // If a selector was specified, locate the right elements in a dummy div 61 | // Exclude scripts to avoid IE 'Permission Denied' errors 62 | jQuery("
").append( jQuery.parseHTML( responseText ) ).find( selector ) : 63 | 64 | // Otherwise use the full result 65 | responseText ); 66 | 67 | }).complete( callback && function( jqXHR, status ) { 68 | self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); 69 | }); 70 | } 71 | 72 | return this; 73 | }; 74 | 75 | }); 76 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/parseJSON.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Support: Android 2.3 6 | // Workaround failure to string-cast null input 7 | jQuery.parseJSON = function( data ) { 8 | return JSON.parse( data + "" ); 9 | }; 10 | 11 | return jQuery.parseJSON; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Cross-browser xml parsing 6 | jQuery.parseXML = function( data ) { 7 | var xml, tmp; 8 | if ( !data || typeof data !== "string" ) { 9 | return null; 10 | } 11 | 12 | // Support: IE9 13 | try { 14 | tmp = new DOMParser(); 15 | xml = tmp.parseFromString( data, "text/xml" ); 16 | } catch ( e ) { 17 | xml = undefined; 18 | } 19 | 20 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 21 | jQuery.error( "Invalid XML: " + data ); 22 | } 23 | return xml; 24 | }; 25 | 26 | return jQuery.parseXML; 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/script.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../ajax" 4 | ], function( jQuery ) { 5 | 6 | // Install script dataType 7 | jQuery.ajaxSetup({ 8 | accepts: { 9 | script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 10 | }, 11 | contents: { 12 | script: /(?:java|ecma)script/ 13 | }, 14 | converters: { 15 | "text script": function( text ) { 16 | jQuery.globalEval( text ); 17 | return text; 18 | } 19 | } 20 | }); 21 | 22 | // Handle cache's special case and crossDomain 23 | jQuery.ajaxPrefilter( "script", function( s ) { 24 | if ( s.cache === undefined ) { 25 | s.cache = false; 26 | } 27 | if ( s.crossDomain ) { 28 | s.type = "GET"; 29 | } 30 | }); 31 | 32 | // Bind script tag hack transport 33 | jQuery.ajaxTransport( "script", function( s ) { 34 | // This transport only deals with cross domain requests 35 | if ( s.crossDomain ) { 36 | var script, callback; 37 | return { 38 | send: function( _, complete ) { 39 | script = jQuery(" 3 | 8 | -------------------------------------------------------------------------------- /bower_components/promise-polyfill/promise-polyfill.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponentsjs", 3 | "main": "webcomponents.js", 4 | "version": "0.7.14", 5 | "homepage": "http://webcomponents.org", 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/webcomponents/webcomponentsjs.git" 12 | }, 13 | "keywords": [ 14 | "webcomponents" 15 | ], 16 | "license": "BSD", 17 | "ignore": [], 18 | "_release": "0.7.14", 19 | "_resolution": { 20 | "type": "version", 21 | "tag": "v0.7.14", 22 | "commit": "48194e673b7a0a8810b32320e0444b512e5a7557" 23 | }, 24 | "_source": "git://github.com/Polymer/webcomponentsjs.git", 25 | "_target": "^0.7.2", 26 | "_originalSource": "webcomponentsjs" 27 | } -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/MutationObserver.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 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 | // @version 0.7.14 11 | "undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var i=t[this.name];return i&&i[0]===t?i[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){O.push(e),N||(N=!0,b(i))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function i(){N=!1;var e=O;O=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();n(e),r.length&&(e.callback_(r,e),t=!0)}),t&&i()}function n(e){e.nodes_.forEach(function(t){var r=p.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function a(e,t){for(var r=e;r;r=r.parentNode){var i=p.get(r);if(i)for(var n=0;n0){var n=r[i-1],a=l(n,e);if(a)return void(r[i-1]=a)}else t(this.observer);r[i]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=p.get(e);t||p.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=p.get(e),r=0;r` tags in the main document block the loading of such imports. This is to ensure the imports have loaded and any registered elements in them have been upgraded. 79 | 80 | The webcomponents.js and webcomponents-lite.js polyfills parse element definitions and handle their upgrade asynchronously. If prematurely fetching the element from the DOM before it has an opportunity to upgrade, you'll be working with an `HTMLUnknownElement`. 81 | 82 | For these situations (or when you need an approximate replacement for the Polymer 0.5 `polymer-ready` behavior), you can use the `WebComponentsReady` event as a signal before interacting with the element. The criteria for this event to fire is all Custom Elements with definitions registered by the time HTML Imports available at load time have loaded have upgraded. 83 | 84 | ```js 85 | window.addEventListener('WebComponentsReady', function(e) { 86 | // imports are loaded and elements have been registered 87 | console.log('Components are ready'); 88 | }); 89 | ``` 90 | 91 | ## Known Issues 92 | 93 | * [Custom element's constructor property is unreliable](#constructor) 94 | * [Contenteditable elements do not trigger MutationObserver](#contentedit) 95 | * [ShadowCSS: :host-context(...):host(...) doesn't work](#hostcontext) 96 | * [execCommand isn't supported under Shadow DOM](#execcommand) 97 | 98 | ### Custom element's constructor property is unreliable 99 | See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background. 100 | 101 | In Safari and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types. 102 | 103 | It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.) 104 | 105 | ### Contenteditable elements do not trigger MutationObserver 106 | Using the MutationObserver polyfill, it isn't possible to monitor mutations of an element marked `contenteditable`. 107 | See [the mailing list](https://groups.google.com/forum/#!msg/polymer-dev/LHdtRVXXVsA/v1sGoiTYWUkJ) 108 | 109 | ### ShadowCSS: :host-context(...):host(...) doesn't work 110 | See [#16](https://github.com/webcomponents/webcomponentsjs/issues/16) for background. 111 | 112 | Under the shadow DOM polyfill, rules like: 113 | ``` 114 | :host-context(.foo):host(.bar) {...} 115 | ``` 116 | don't work, despite working under native Shadow DOM. The solution is to use `polyfill-next-selector` like: 117 | 118 | ``` 119 | polyfill-next-selector { content: '.foo :host.bar, :host.foo.bar'; } 120 | ``` 121 | 122 | ### execCommand and contenteditable isn't supported under Shadow DOM 123 | See [#212](https://github.com/webcomponents/webcomponentsjs/issues/212) 124 | 125 | `execCommand`, and `contenteditable` aren't supported under the ShadowDOM polyfill, with commands that insert or remove nodes being especially prone to failure. 126 | -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponentsjs", 3 | "main": "webcomponents.js", 4 | "version": "0.7.14", 5 | "homepage": "http://webcomponents.org", 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/webcomponents/webcomponentsjs.git" 12 | }, 13 | "keywords": [ 14 | "webcomponents" 15 | ], 16 | "license": "BSD", 17 | "ignore": [] 18 | } 19 | -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/build.log: -------------------------------------------------------------------------------- 1 | BUILD LOG 2 | --------- 3 | Build Time: 2015-09-28T16:50:31-0700 4 | 5 | NODEJS INFORMATION 6 | ================== 7 | nodejs: v4.1.1 8 | gulp: 3.9.0 9 | gulp-audit: 1.0.0 10 | gulp-concat: 2.6.0 11 | gulp-header: 1.7.1 12 | gulp-uglify: 1.4.1 13 | run-sequence: 1.1.4 14 | web-component-tester: 3.3.22 15 | 16 | REPO REVISIONS 17 | ============== 18 | webcomponentsjs: c469b0002fa265416c83d5c8363071705e345a43 19 | 20 | BUILD HASHES 21 | ============ 22 | CustomElements.js: 0d46b5c2bb7c92b6285d574205ca65e49def0617 23 | CustomElements.min.js: 2de71b634cd1545c401981c68fc31f0a12dd5f82 24 | HTMLImports.js: 0ddc177cadf99dd47b36bd74296f9d23dc566f25 25 | HTMLImports.min.js: 43d3866825148a8d0509da06a1e55550762255a9 26 | MutationObserver.js: 54ad1e3273edc525d1e4e0b75c42e25af7a0fb20 27 | MutationObserver.min.js: 36c22670e654ace2e7440c2dc4b012802080424b 28 | ShadowDOM.js: 089f8e6ea35f4365a2bece6481308d2002975e51 29 | ShadowDOM.min.js: 9d044a4e4221245adf257b229f9c67968f95f955 30 | webcomponents-lite.js: 8c326ce2b8e40aa4aefe7469f7cf8587c2c625da 31 | webcomponents-lite.min.js: ce8cf899652990697eb80703ebacf0ae997f7361 32 | webcomponents.js: fd409f4fab68b8bcc27a6a54e2ec16555a5eaa47 33 | webcomponents.min.js: efcdb4322c84f68f8c9e9cfc359505c263814051 -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponents.js", 3 | "version": "0.7.14", 4 | "description": "webcomponents.js", 5 | "main": "webcomponents.js", 6 | "directories": { 7 | "test": "tests" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/webcomponents/webcomponentsjs.git" 12 | }, 13 | "author": "The Polymer Authors", 14 | "license": { 15 | "type": "BSD-3-Clause", 16 | "url": "http://polymer.github.io/LICENSE.txt" 17 | }, 18 | "bugs": { 19 | "url": "https://github.com/webcomponents/webcomponentsjs/issues" 20 | }, 21 | "homepage": "http://webcomponents.org", 22 | "devDependencies": { 23 | "gulp": "^3.8.8", 24 | "gulp-audit": "^1.0.0", 25 | "gulp-concat": "^2.4.1", 26 | "gulp-header": "^1.1.1", 27 | "gulp-uglify": "^1.0.1", 28 | "run-sequence": "^1.0.1", 29 | "web-component-tester": "*" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cors.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | WordPress REST API With Web Components 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 19 | 25 | 26 | 27 | 28 |
29 |
30 |
31 |
32 |
Logo
33 |
Menu
34 |
35 | 36 |
37 |
38 | 39 |
40 | 41 |
42 |
43 | 44 | 45 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /wp-api-image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 39 | 40 | -------------------------------------------------------------------------------- /wp-api-posts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 38 | 39 | --------------------------------------------------------------------------------