statixite 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +145 -0
- data/Rakefile +26 -0
- data/app/assets/images/statixite/STATIXITE-logo.png +0 -0
- data/app/assets/images/statixite/favicon.ico +0 -0
- data/app/assets/images/statixite/jekyll.png +0 -0
- data/app/assets/images/statixite/md-editor.png +0 -0
- data/app/assets/images/statixite/ring-alt.gif +0 -0
- data/app/assets/javascripts/controllers/statixite/deployments_create.js +13 -0
- data/app/assets/javascripts/controllers/statixite/deployments_index.js +13 -0
- data/app/assets/javascripts/controllers/statixite/sites_create.js +27 -0
- data/app/assets/javascripts/controllers/statixite/sites_new.js +27 -0
- data/app/assets/javascripts/controllers/statixite/templates_edit.js +208 -0
- data/app/assets/javascripts/statixite/application.js +8 -0
- data/app/assets/javascripts/statixite/array-helpers.js +13 -0
- data/app/assets/javascripts/statixite/editor.js +244 -0
- data/app/assets/javascripts/statixite/loader.js +14 -0
- data/app/assets/javascripts/statixite/notify-defaults.js +5 -0
- data/app/assets/stylesheets/statixite/application.less +271 -0
- data/app/assets/stylesheets/statixite/bootstrap-glyphicons.less +305 -0
- data/app/assets/stylesheets/statixite/bootstrap.less +58 -0
- data/app/assets/stylesheets/statixite/bootstrap_and_overrides.less +2 -0
- data/app/assets/stylesheets/statixite/landing-page.less +156 -0
- data/app/controllers/statixite/application_controller.rb +22 -0
- data/app/controllers/statixite/deployments_controller.rb +61 -0
- data/app/controllers/statixite/media_controller.rb +61 -0
- data/app/controllers/statixite/posts_controller.rb +68 -0
- data/app/controllers/statixite/sites_controller.rb +141 -0
- data/app/controllers/statixite/templates_controller.rb +233 -0
- data/app/helpers/statixite/application_helper.rb +63 -0
- data/app/models/statixite/deployment.rb +5 -0
- data/app/models/statixite/media.rb +7 -0
- data/app/models/statixite/post.rb +76 -0
- data/app/models/statixite/site.rb +76 -0
- data/app/services/statixite/deployment_service.rb +73 -0
- data/app/services/statixite/git_service.rb +102 -0
- data/app/services/statixite/site_deactivation_service.rb +52 -0
- data/app/services/statixite/site_operation_service.rb +251 -0
- data/app/uploaders/statixite/file_uploader.rb +14 -0
- data/app/validators/statixite/jekyll_template_validator.rb +16 -0
- data/app/validators/statixite/liquid_validator.rb +11 -0
- data/app/views/layouts/statixite/_dash_nav.html.haml +20 -0
- data/app/views/layouts/statixite/_flash.html.haml +13 -0
- data/app/views/layouts/statixite/_head.html.haml +12 -0
- data/app/views/layouts/statixite/_header.html.haml +30 -0
- data/app/views/layouts/statixite/_site_sub_items.html.haml +38 -0
- data/app/views/layouts/statixite/dashboard.html.haml +27 -0
- data/app/views/statixite/deployments/_modal.html.haml +18 -0
- data/app/views/statixite/deployments/index.html.haml +39 -0
- data/app/views/statixite/kaminari/_first_page.html.haml +2 -0
- data/app/views/statixite/kaminari/_gap.html.haml +2 -0
- data/app/views/statixite/kaminari/_last_page.html.haml +2 -0
- data/app/views/statixite/kaminari/_next_page.html.haml +2 -0
- data/app/views/statixite/kaminari/_page.html.haml +6 -0
- data/app/views/statixite/kaminari/_paginator.html.haml +11 -0
- data/app/views/statixite/kaminari/_prev_page.html.haml +2 -0
- data/app/views/statixite/media/_index.html.haml +13 -0
- data/app/views/statixite/media/_paginate.html.haml +1 -0
- data/app/views/statixite/media/index.html.haml +39 -0
- data/app/views/statixite/media/index.js.haml +2 -0
- data/app/views/statixite/posts/_form.html.haml +65 -0
- data/app/views/statixite/posts/_image_modal.html.haml +21 -0
- data/app/views/statixite/posts/_modals.html.haml +111 -0
- data/app/views/statixite/posts/_posts.html.haml +15 -0
- data/app/views/statixite/posts/edit.html.haml +6 -0
- data/app/views/statixite/posts/index.html.haml +4 -0
- data/app/views/statixite/posts/index.js.haml +1 -0
- data/app/views/statixite/posts/new.html.haml +5 -0
- data/app/views/statixite/sites/_sites.html.haml +27 -0
- data/app/views/statixite/sites/_templates.html.haml +26 -0
- data/app/views/statixite/sites/build_and_preview.html.haml +24 -0
- data/app/views/statixite/sites/index.html.haml +4 -0
- data/app/views/statixite/sites/index.js.haml +1 -0
- data/app/views/statixite/sites/new.html.haml +45 -0
- data/app/views/statixite/sites/settings.html.haml +77 -0
- data/app/views/statixite/templates/edit.html.haml +93 -0
- data/app/views/statixite/templates/upload_files.js.haml +2 -0
- data/config/routes.rb +24 -0
- data/db/migrate/20150525171543_create_statixite_sites.rb +15 -0
- data/db/migrate/20150530041055_create_statixite_posts.rb +14 -0
- data/db/migrate/20150610024047_create_statixite_deployments.rb +11 -0
- data/db/migrate/20151013131224_create_statixite_media.rb +10 -0
- data/lib/assets/templates.yaml +734 -0
- data/lib/generators/statixite/statixite_generator.rb +49 -0
- data/lib/statixite.rb +14 -0
- data/lib/statixite/cloud_sync.rb +104 -0
- data/lib/statixite/engine.rb +49 -0
- data/lib/statixite/version.rb +3 -0
- data/lib/tasks/statixite_tasks.rake +4 -0
- data/vendor/assets/bower_components/bootstrap/CHANGELOG.md +5 -0
- data/vendor/assets/bower_components/bootstrap/Gruntfile.js +533 -0
- data/vendor/assets/bower_components/bootstrap/LICENSE +21 -0
- data/vendor/assets/bower_components/bootstrap/README.md +139 -0
- data/vendor/assets/bower_components/bootstrap/bower.json +34 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.css +587 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.min.css +6 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap-theme.min.css.map +1 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.css +6760 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css +6 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.min.css.map +1 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +288 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/js/bootstrap.js +2363 -0
- data/vendor/assets/bower_components/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/vendor/assets/bower_components/bootstrap/dist/js/npm.js +13 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/bower_components/bootstrap/grunt/bs-commonjs-generator.js +30 -0
- data/vendor/assets/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js +42 -0
- data/vendor/assets/bower_components/bootstrap/grunt/bs-lessdoc-parser.js +237 -0
- data/vendor/assets/bower_components/bootstrap/grunt/bs-raw-files-generator.js +44 -0
- data/vendor/assets/bower_components/bootstrap/grunt/configBridge.json +46 -0
- data/vendor/assets/bower_components/bootstrap/grunt/sauce_browsers.yml +82 -0
- data/vendor/assets/bower_components/bootstrap/js/affix.js +162 -0
- data/vendor/assets/bower_components/bootstrap/js/alert.js +94 -0
- data/vendor/assets/bower_components/bootstrap/js/button.js +120 -0
- data/vendor/assets/bower_components/bootstrap/js/carousel.js +237 -0
- data/vendor/assets/bower_components/bootstrap/js/collapse.js +211 -0
- data/vendor/assets/bower_components/bootstrap/js/dropdown.js +165 -0
- data/vendor/assets/bower_components/bootstrap/js/modal.js +337 -0
- data/vendor/assets/bower_components/bootstrap/js/popover.js +108 -0
- data/vendor/assets/bower_components/bootstrap/js/scrollspy.js +172 -0
- data/vendor/assets/bower_components/bootstrap/js/tab.js +155 -0
- data/vendor/assets/bower_components/bootstrap/js/tooltip.js +514 -0
- data/vendor/assets/bower_components/bootstrap/js/transition.js +59 -0
- data/vendor/assets/bower_components/bootstrap/less/alerts.less +73 -0
- data/vendor/assets/bower_components/bootstrap/less/badges.less +66 -0
- data/vendor/assets/bower_components/bootstrap/less/bootstrap.less +56 -0
- data/vendor/assets/bower_components/bootstrap/less/breadcrumbs.less +26 -0
- data/vendor/assets/bower_components/bootstrap/less/button-groups.less +244 -0
- data/vendor/assets/bower_components/bootstrap/less/buttons.less +166 -0
- data/vendor/assets/bower_components/bootstrap/less/carousel.less +270 -0
- data/vendor/assets/bower_components/bootstrap/less/close.less +34 -0
- data/vendor/assets/bower_components/bootstrap/less/code.less +69 -0
- data/vendor/assets/bower_components/bootstrap/less/component-animations.less +33 -0
- data/vendor/assets/bower_components/bootstrap/less/dropdowns.less +216 -0
- data/vendor/assets/bower_components/bootstrap/less/forms.less +613 -0
- data/vendor/assets/bower_components/bootstrap/less/glyphicons.less +305 -0
- data/vendor/assets/bower_components/bootstrap/less/grid.less +84 -0
- data/vendor/assets/bower_components/bootstrap/less/input-groups.less +171 -0
- data/vendor/assets/bower_components/bootstrap/less/jumbotron.less +54 -0
- data/vendor/assets/bower_components/bootstrap/less/labels.less +64 -0
- data/vendor/assets/bower_components/bootstrap/less/list-group.less +130 -0
- data/vendor/assets/bower_components/bootstrap/less/media.less +66 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins.less +40 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/alerts.less +14 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/background-variant.less +9 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/border-radius.less +18 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/buttons.less +65 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/center-block.less +7 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/clearfix.less +22 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/forms.less +85 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/gradients.less +59 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/grid-framework.less +91 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/grid.less +122 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/hide-text.less +21 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/image.less +33 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/labels.less +12 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/list-group.less +30 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/nav-divider.less +10 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/nav-vertical-align.less +9 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/opacity.less +8 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/pagination.less +24 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/panels.less +24 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/progress-bar.less +10 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/reset-filter.less +8 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/reset-text.less +18 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/resize.less +6 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/responsive-visibility.less +15 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/size.less +10 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/tab-focus.less +9 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/table-row.less +28 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/text-emphasis.less +9 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/text-overflow.less +8 -0
- data/vendor/assets/bower_components/bootstrap/less/mixins/vendor-prefixes.less +227 -0
- data/vendor/assets/bower_components/bootstrap/less/modals.less +150 -0
- data/vendor/assets/bower_components/bootstrap/less/navbar.less +660 -0
- data/vendor/assets/bower_components/bootstrap/less/navs.less +242 -0
- data/vendor/assets/bower_components/bootstrap/less/normalize.less +424 -0
- data/vendor/assets/bower_components/bootstrap/less/pager.less +54 -0
- data/vendor/assets/bower_components/bootstrap/less/pagination.less +89 -0
- data/vendor/assets/bower_components/bootstrap/less/panels.less +271 -0
- data/vendor/assets/bower_components/bootstrap/less/popovers.less +131 -0
- data/vendor/assets/bower_components/bootstrap/less/print.less +101 -0
- data/vendor/assets/bower_components/bootstrap/less/progress-bars.less +87 -0
- data/vendor/assets/bower_components/bootstrap/less/responsive-embed.less +35 -0
- data/vendor/assets/bower_components/bootstrap/less/responsive-utilities.less +194 -0
- data/vendor/assets/bower_components/bootstrap/less/scaffolding.less +161 -0
- data/vendor/assets/bower_components/bootstrap/less/tables.less +234 -0
- data/vendor/assets/bower_components/bootstrap/less/theme.less +291 -0
- data/vendor/assets/bower_components/bootstrap/less/thumbnails.less +36 -0
- data/vendor/assets/bower_components/bootstrap/less/tooltip.less +101 -0
- data/vendor/assets/bower_components/bootstrap/less/type.less +302 -0
- data/vendor/assets/bower_components/bootstrap/less/utilities.less +55 -0
- data/vendor/assets/bower_components/bootstrap/less/variables.less +869 -0
- data/vendor/assets/bower_components/bootstrap/less/wells.less +29 -0
- data/vendor/assets/bower_components/bootstrap/nuget/MyGet.ps1 +8 -0
- data/vendor/assets/bower_components/bootstrap/nuget/bootstrap.less.nuspec +28 -0
- data/vendor/assets/bower_components/bootstrap/nuget/bootstrap.nuspec +28 -0
- data/vendor/assets/bower_components/bootstrap/package.js +32 -0
- data/vendor/assets/bower_components/bootstrap/package.json +87 -0
- data/vendor/assets/bower_components/jquery/AUTHORS.txt +275 -0
- data/vendor/assets/bower_components/jquery/LICENSE.txt +36 -0
- data/vendor/assets/bower_components/jquery/README.md +5 -0
- data/vendor/assets/bower_components/jquery/bower.json +14 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.js +9831 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.min.js +4 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/bower_components/jquery/src/ajax.js +845 -0
- data/vendor/assets/bower_components/jquery/src/ajax/jsonp.js +100 -0
- data/vendor/assets/bower_components/jquery/src/ajax/load.js +83 -0
- data/vendor/assets/bower_components/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/bower_components/jquery/src/ajax/parseXML.js +27 -0
- data/vendor/assets/bower_components/jquery/src/ajax/script.js +68 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/location.js +3 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/bower_components/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/bower_components/jquery/src/ajax/xhr.js +167 -0
- data/vendor/assets/bower_components/jquery/src/attributes.js +11 -0
- data/vendor/assets/bower_components/jquery/src/attributes/attr.js +142 -0
- data/vendor/assets/bower_components/jquery/src/attributes/classes.js +177 -0
- data/vendor/assets/bower_components/jquery/src/attributes/prop.js +109 -0
- data/vendor/assets/bower_components/jquery/src/attributes/support.js +36 -0
- data/vendor/assets/bower_components/jquery/src/attributes/val.js +170 -0
- data/vendor/assets/bower_components/jquery/src/callbacks.js +232 -0
- data/vendor/assets/bower_components/jquery/src/core.js +489 -0
- data/vendor/assets/bower_components/jquery/src/core/access.js +65 -0
- data/vendor/assets/bower_components/jquery/src/core/init.js +134 -0
- data/vendor/assets/bower_components/jquery/src/core/parseHTML.js +49 -0
- data/vendor/assets/bower_components/jquery/src/core/ready.js +103 -0
- data/vendor/assets/bower_components/jquery/src/core/support.js +18 -0
- data/vendor/assets/bower_components/jquery/src/core/var/rsingleTag.js +5 -0
- data/vendor/assets/bower_components/jquery/src/css.js +515 -0
- data/vendor/assets/bower_components/jquery/src/css/addGetHookIf.js +24 -0
- data/vendor/assets/bower_components/jquery/src/css/adjustCSS.js +65 -0
- data/vendor/assets/bower_components/jquery/src/css/curCSS.js +57 -0
- data/vendor/assets/bower_components/jquery/src/css/defaultDisplay.js +72 -0
- data/vendor/assets/bower_components/jquery/src/css/hiddenVisibleSelectors.js +18 -0
- data/vendor/assets/bower_components/jquery/src/css/showHide.js +48 -0
- data/vendor/assets/bower_components/jquery/src/css/support.js +121 -0
- data/vendor/assets/bower_components/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/bower_components/jquery/src/css/var/getStyles.js +15 -0
- data/vendor/assets/bower_components/jquery/src/css/var/isHidden.js +16 -0
- data/vendor/assets/bower_components/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/bower_components/jquery/src/css/var/swap.js +24 -0
- data/vendor/assets/bower_components/jquery/src/data.js +187 -0
- data/vendor/assets/bower_components/jquery/src/data/Data.js +200 -0
- data/vendor/assets/bower_components/jquery/src/data/accepts.js +20 -0
- data/vendor/assets/bower_components/jquery/src/data/support.js +23 -0
- data/vendor/assets/bower_components/jquery/src/data/var/acceptData.js +18 -0
- data/vendor/assets/bower_components/jquery/src/data/var/dataPriv.js +5 -0
- data/vendor/assets/bower_components/jquery/src/data/var/dataUser.js +5 -0
- data/vendor/assets/bower_components/jquery/src/deferred.js +158 -0
- data/vendor/assets/bower_components/jquery/src/deprecated.js +32 -0
- data/vendor/assets/bower_components/jquery/src/dimensions.js +54 -0
- data/vendor/assets/bower_components/jquery/src/effects.js +629 -0
- data/vendor/assets/bower_components/jquery/src/effects/Tween.js +121 -0
- data/vendor/assets/bower_components/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/bower_components/jquery/src/effects/support.js +58 -0
- data/vendor/assets/bower_components/jquery/src/event.js +710 -0
- data/vendor/assets/bower_components/jquery/src/event/ajax.js +20 -0
- data/vendor/assets/bower_components/jquery/src/event/alias.js +27 -0
- data/vendor/assets/bower_components/jquery/src/event/focusin.js +53 -0
- data/vendor/assets/bower_components/jquery/src/event/support.js +9 -0
- data/vendor/assets/bower_components/jquery/src/event/trigger.js +199 -0
- data/vendor/assets/bower_components/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/bower_components/jquery/src/exports/global.js +26 -0
- data/vendor/assets/bower_components/jquery/src/intro.js +44 -0
- data/vendor/assets/bower_components/jquery/src/jquery.js +37 -0
- data/vendor/assets/bower_components/jquery/src/manipulation.js +481 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/_evalUrl.js +20 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/buildFragment.js +102 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/createSafeFragment.js +20 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/getAll.js +21 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/support.js +33 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/nodeNames.js +5 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/var/rtagName.js +3 -0
- data/vendor/assets/bower_components/jquery/src/manipulation/wrapMap.js +27 -0
- data/vendor/assets/bower_components/jquery/src/offset.js +221 -0
- data/vendor/assets/bower_components/jquery/src/outro.js +2 -0
- data/vendor/assets/bower_components/jquery/src/queue.js +143 -0
- data/vendor/assets/bower_components/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/bower_components/jquery/src/selector-native.js +211 -0
- data/vendor/assets/bower_components/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/bower_components/jquery/src/selector.js +1 -0
- data/vendor/assets/bower_components/jquery/src/serialize.js +125 -0
- data/vendor/assets/bower_components/jquery/src/support.js +63 -0
- data/vendor/assets/bower_components/jquery/src/traversing.js +175 -0
- data/vendor/assets/bower_components/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/bower_components/jquery/src/traversing/var/dir.js +20 -0
- data/vendor/assets/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/bower_components/jquery/src/traversing/var/siblings.js +15 -0
- data/vendor/assets/bower_components/jquery/src/var/arr.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/class2type.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/concat.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/deletedIds.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/document.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/documentElement.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/push.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/rcssNum.js +7 -0
- data/vendor/assets/bower_components/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/bower_components/jquery/src/var/slice.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/support.js +5 -0
- data/vendor/assets/bower_components/jquery/src/var/toString.js +5 -0
- data/vendor/assets/bower_components/jquery/src/wrap.js +79 -0
- data/vendor/assets/bower_components/jsoneditor/CONTRIBUTING.md +15 -0
- data/vendor/assets/bower_components/jsoneditor/HISTORY.md +457 -0
- data/vendor/assets/bower_components/jsoneditor/LICENSE +176 -0
- data/vendor/assets/bower_components/jsoneditor/NOTICE +17 -0
- data/vendor/assets/bower_components/jsoneditor/README.md +155 -0
- data/vendor/assets/bower_components/jsoneditor/bower.json +32 -0
- data/vendor/assets/bower_components/jsoneditor/dist/img/jsoneditor-icons.svg +893 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor-minimalist.js +9418 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor-minimalist.map +1 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor-minimalist.min.js +35 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor.css.less +879 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor.js +35095 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor.map +1 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor.min.css +1 -0
- data/vendor/assets/bower_components/jsoneditor/dist/jsoneditor.min.js +48 -0
- data/vendor/assets/bower_components/jsoneditor/dist/which files do I need.md +41 -0
- data/vendor/assets/bower_components/jsoneditor/docs/api.md +286 -0
- data/vendor/assets/bower_components/jsoneditor/docs/shortcut_keys.md +38 -0
- data/vendor/assets/bower_components/jsoneditor/docs/usage.md +117 -0
- data/vendor/assets/bower_components/jsoneditor/examples/01_basic_usage.html +49 -0
- data/vendor/assets/bower_components/jsoneditor/examples/02_viewer.html +44 -0
- data/vendor/assets/bower_components/jsoneditor/examples/03_switch_mode.html +66 -0
- data/vendor/assets/bower_components/jsoneditor/examples/04_load_and_save.html +62 -0
- data/vendor/assets/bower_components/jsoneditor/examples/05_custom_fields_editable.html +63 -0
- data/vendor/assets/bower_components/jsoneditor/examples/06_custom_styling.html +51 -0
- data/vendor/assets/bower_components/jsoneditor/examples/07_json_schema_validation.html +71 -0
- data/vendor/assets/bower_components/jsoneditor/examples/css/darktheme.css +76 -0
- data/vendor/assets/bower_components/jsoneditor/examples/requirejs_demo/requirejs_demo.html +21 -0
- data/vendor/assets/bower_components/jsoneditor/examples/requirejs_demo/scripts/main.js +25 -0
- data/vendor/assets/bower_components/jsoneditor/examples/requirejs_demo/scripts/require.js +36 -0
- data/vendor/assets/bower_components/jsoneditor/index.js +1 -0
- data/vendor/assets/bower_components/jsoneditor/package.json +41 -0
- data/vendor/assets/bower_components/jsoneditor/src/css/contextmenu.css +233 -0
- data/vendor/assets/bower_components/jsoneditor/src/css/img/description.txt +14 -0
- data/vendor/assets/bower_components/jsoneditor/src/css/img/jsoneditor-icons.svg +893 -0
- data/vendor/assets/bower_components/jsoneditor/src/css/jsoneditor.css +433 -0
- data/vendor/assets/bower_components/jsoneditor/src/css/menu.css +110 -0
- data/vendor/assets/bower_components/jsoneditor/src/css/searchbox.css +75 -0
- data/vendor/assets/bower_components/jsoneditor/src/docs/which files do I need.md +41 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/ContextMenu.js +455 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/Highlighter.js +84 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/History.js +252 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/JSONEditor.js +371 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/Node.js +3400 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/SearchBox.js +295 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/ace/index.js +9 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/ace/theme-jsoneditor.js +144 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/appendNodeFactory.js +226 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/assets/jsonlint/README.md +15 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/assets/jsonlint/jsonlint.js +418 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/header.js +29 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/modeswitcher.js +105 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/textmode.js +474 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/treemode.js +1150 -0
- data/vendor/assets/bower_components/jsoneditor/src/js/util.js +765 -0
- data/vendor/assets/bower_components/notifyjs/CHANGES.md +7 -0
- data/vendor/assets/bower_components/notifyjs/README.md +31 -0
- data/vendor/assets/bower_components/notifyjs/bower.json +14 -0
- data/vendor/assets/bower_components/notifyjs/dist/notify.js +586 -0
- data/vendor/assets/bower_components/notifyjs/dist/styles/metro/notify-metro.css +40 -0
- data/vendor/assets/bower_components/notifyjs/dist/styles/metro/notify-metro.js +39 -0
- data/vendor/assets/bower_components/notifyjs/examples/classes.html +49 -0
- data/vendor/assets/bower_components/notifyjs/examples/images/Mail.png +0 -0
- data/vendor/assets/bower_components/notifyjs/examples/inlines.html +111 -0
- data/vendor/assets/bower_components/notifyjs/examples/metro.html +37 -0
- data/vendor/assets/bower_components/notifyjs/examples/multi-text.html +55 -0
- data/vendor/assets/bower_components/notifyjs/examples/position.html +42 -0
- data/vendor/assets/bower_components/notifyjs/notify.jquery.json +28 -0
- data/vendor/assets/bower_components/notifyjs/package.json +18 -0
- data/vendor/assets/bower_components/vue/LICENSE +21 -0
- data/vendor/assets/bower_components/vue/bower.json +19 -0
- data/vendor/assets/bower_components/vue/dist/vue.js +10198 -0
- data/vendor/assets/bower_components/vue/dist/vue.min.js +8 -0
- data/vendor/assets/bower_components/vue/src/api/child.js +49 -0
- data/vendor/assets/bower_components/vue/src/api/data.js +159 -0
- data/vendor/assets/bower_components/vue/src/api/dom.js +226 -0
- data/vendor/assets/bower_components/vue/src/api/events.js +174 -0
- data/vendor/assets/bower_components/vue/src/api/global.js +129 -0
- data/vendor/assets/bower_components/vue/src/api/lifecycle.js +68 -0
- data/vendor/assets/bower_components/vue/src/batcher.js +98 -0
- data/vendor/assets/bower_components/vue/src/cache.js +112 -0
- data/vendor/assets/bower_components/vue/src/compiler/compile-props.js +183 -0
- data/vendor/assets/bower_components/vue/src/compiler/compile.js +630 -0
- data/vendor/assets/bower_components/vue/src/compiler/index.js +4 -0
- data/vendor/assets/bower_components/vue/src/compiler/transclude.js +144 -0
- data/vendor/assets/bower_components/vue/src/config.js +124 -0
- data/vendor/assets/bower_components/vue/src/directive.js +254 -0
- data/vendor/assets/bower_components/vue/src/directives/attr.js +59 -0
- data/vendor/assets/bower_components/vue/src/directives/class.js +70 -0
- data/vendor/assets/bower_components/vue/src/directives/cloak.js +10 -0
- data/vendor/assets/bower_components/vue/src/directives/component.js +344 -0
- data/vendor/assets/bower_components/vue/src/directives/el.js +12 -0
- data/vendor/assets/bower_components/vue/src/directives/html.js +40 -0
- data/vendor/assets/bower_components/vue/src/directives/if.js +125 -0
- data/vendor/assets/bower_components/vue/src/directives/index.js +24 -0
- data/vendor/assets/bower_components/vue/src/directives/model/checkbox.js +42 -0
- data/vendor/assets/bower_components/vue/src/directives/model/index.js +82 -0
- data/vendor/assets/bower_components/vue/src/directives/model/radio.js +33 -0
- data/vendor/assets/bower_components/vue/src/directives/model/select.js +236 -0
- data/vendor/assets/bower_components/vue/src/directives/model/text.js +132 -0
- data/vendor/assets/bower_components/vue/src/directives/on.js +59 -0
- data/vendor/assets/bower_components/vue/src/directives/prop.js +62 -0
- data/vendor/assets/bower_components/vue/src/directives/ref.js +22 -0
- data/vendor/assets/bower_components/vue/src/directives/repeat.js +770 -0
- data/vendor/assets/bower_components/vue/src/directives/show.js +8 -0
- data/vendor/assets/bower_components/vue/src/directives/style.js +110 -0
- data/vendor/assets/bower_components/vue/src/directives/text.js +14 -0
- data/vendor/assets/bower_components/vue/src/directives/transition.js +26 -0
- data/vendor/assets/bower_components/vue/src/element-directives/content.js +111 -0
- data/vendor/assets/bower_components/vue/src/element-directives/index.js +2 -0
- data/vendor/assets/bower_components/vue/src/element-directives/partial.js +73 -0
- data/vendor/assets/bower_components/vue/src/filters/array-filters.js +97 -0
- data/vendor/assets/bower_components/vue/src/filters/index.js +146 -0
- data/vendor/assets/bower_components/vue/src/instance/compile.js +200 -0
- data/vendor/assets/bower_components/vue/src/instance/events.js +139 -0
- data/vendor/assets/bower_components/vue/src/instance/init.js +89 -0
- data/vendor/assets/bower_components/vue/src/instance/misc.js +93 -0
- data/vendor/assets/bower_components/vue/src/instance/scope.js +282 -0
- data/vendor/assets/bower_components/vue/src/observer/array.js +98 -0
- data/vendor/assets/bower_components/vue/src/observer/dep.js +61 -0
- data/vendor/assets/bower_components/vue/src/observer/index.js +234 -0
- data/vendor/assets/bower_components/vue/src/observer/object.js +82 -0
- data/vendor/assets/bower_components/vue/src/parsers/directive.js +180 -0
- data/vendor/assets/bower_components/vue/src/parsers/expression.js +264 -0
- data/vendor/assets/bower_components/vue/src/parsers/path.js +348 -0
- data/vendor/assets/bower_components/vue/src/parsers/template.js +288 -0
- data/vendor/assets/bower_components/vue/src/parsers/text.js +178 -0
- data/vendor/assets/bower_components/vue/src/transition/index.js +128 -0
- data/vendor/assets/bower_components/vue/src/transition/queue.js +35 -0
- data/vendor/assets/bower_components/vue/src/transition/transition.js +357 -0
- data/vendor/assets/bower_components/vue/src/util/component.js +124 -0
- data/vendor/assets/bower_components/vue/src/util/debug.js +64 -0
- data/vendor/assets/bower_components/vue/src/util/dom.js +272 -0
- data/vendor/assets/bower_components/vue/src/util/env.js +85 -0
- data/vendor/assets/bower_components/vue/src/util/index.js +9 -0
- data/vendor/assets/bower_components/vue/src/util/lang.js +310 -0
- data/vendor/assets/bower_components/vue/src/util/options.js +357 -0
- data/vendor/assets/bower_components/vue/src/vue.js +89 -0
- data/vendor/assets/bower_components/vue/src/watcher.js +312 -0
- metadata +870 -0
@@ -0,0 +1,226 @@
|
|
1
|
+
var util = require('./util');
|
2
|
+
var ContextMenu = require('./ContextMenu');
|
3
|
+
|
4
|
+
/**
|
5
|
+
* A factory function to create an AppendNode, which depends on a Node
|
6
|
+
* @param {Node} Node
|
7
|
+
*/
|
8
|
+
function appendNodeFactory(Node) {
|
9
|
+
/**
|
10
|
+
* @constructor AppendNode
|
11
|
+
* @extends Node
|
12
|
+
* @param {TreeEditor} editor
|
13
|
+
* Create a new AppendNode. This is a special node which is created at the
|
14
|
+
* end of the list with childs for an object or array
|
15
|
+
*/
|
16
|
+
function AppendNode (editor) {
|
17
|
+
/** @type {TreeEditor} */
|
18
|
+
this.editor = editor;
|
19
|
+
this.dom = {};
|
20
|
+
}
|
21
|
+
|
22
|
+
AppendNode.prototype = new Node();
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Return a table row with an append button.
|
26
|
+
* @return {Element} dom TR element
|
27
|
+
*/
|
28
|
+
AppendNode.prototype.getDom = function () {
|
29
|
+
// TODO: implement a new solution for the append node
|
30
|
+
var dom = this.dom;
|
31
|
+
|
32
|
+
if (dom.tr) {
|
33
|
+
return dom.tr;
|
34
|
+
}
|
35
|
+
|
36
|
+
this._updateEditability();
|
37
|
+
|
38
|
+
// a row for the append button
|
39
|
+
var trAppend = document.createElement('tr');
|
40
|
+
trAppend.node = this;
|
41
|
+
dom.tr = trAppend;
|
42
|
+
|
43
|
+
// TODO: consistent naming
|
44
|
+
|
45
|
+
if (this.editable.field) {
|
46
|
+
// a cell for the dragarea column
|
47
|
+
dom.tdDrag = document.createElement('td');
|
48
|
+
|
49
|
+
// create context menu
|
50
|
+
var tdMenu = document.createElement('td');
|
51
|
+
dom.tdMenu = tdMenu;
|
52
|
+
var menu = document.createElement('button');
|
53
|
+
menu.className = 'jsoneditor-contextmenu';
|
54
|
+
menu.title = 'Click to open the actions menu (Ctrl+M)';
|
55
|
+
dom.menu = menu;
|
56
|
+
tdMenu.appendChild(dom.menu);
|
57
|
+
}
|
58
|
+
|
59
|
+
// a cell for the contents (showing text 'empty')
|
60
|
+
var tdAppend = document.createElement('td');
|
61
|
+
var domText = document.createElement('div');
|
62
|
+
domText.innerHTML = '(empty)';
|
63
|
+
domText.className = 'jsoneditor-readonly';
|
64
|
+
tdAppend.appendChild(domText);
|
65
|
+
dom.td = tdAppend;
|
66
|
+
dom.text = domText;
|
67
|
+
|
68
|
+
this.updateDom();
|
69
|
+
|
70
|
+
return trAppend;
|
71
|
+
};
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Update the HTML dom of the Node
|
75
|
+
*/
|
76
|
+
AppendNode.prototype.updateDom = function () {
|
77
|
+
var dom = this.dom;
|
78
|
+
var tdAppend = dom.td;
|
79
|
+
if (tdAppend) {
|
80
|
+
tdAppend.style.paddingLeft = (this.getLevel() * 24 + 26) + 'px';
|
81
|
+
// TODO: not so nice hard coded offset
|
82
|
+
}
|
83
|
+
|
84
|
+
var domText = dom.text;
|
85
|
+
if (domText) {
|
86
|
+
domText.innerHTML = '(empty ' + this.parent.type + ')';
|
87
|
+
}
|
88
|
+
|
89
|
+
// attach or detach the contents of the append node:
|
90
|
+
// hide when the parent has childs, show when the parent has no childs
|
91
|
+
var trAppend = dom.tr;
|
92
|
+
if (!this.isVisible()) {
|
93
|
+
if (dom.tr.firstChild) {
|
94
|
+
if (dom.tdDrag) {
|
95
|
+
trAppend.removeChild(dom.tdDrag);
|
96
|
+
}
|
97
|
+
if (dom.tdMenu) {
|
98
|
+
trAppend.removeChild(dom.tdMenu);
|
99
|
+
}
|
100
|
+
trAppend.removeChild(tdAppend);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
if (!dom.tr.firstChild) {
|
105
|
+
if (dom.tdDrag) {
|
106
|
+
trAppend.appendChild(dom.tdDrag);
|
107
|
+
}
|
108
|
+
if (dom.tdMenu) {
|
109
|
+
trAppend.appendChild(dom.tdMenu);
|
110
|
+
}
|
111
|
+
trAppend.appendChild(tdAppend);
|
112
|
+
}
|
113
|
+
}
|
114
|
+
};
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Check whether the AppendNode is currently visible.
|
118
|
+
* the AppendNode is visible when its parent has no childs (i.e. is empty).
|
119
|
+
* @return {boolean} isVisible
|
120
|
+
*/
|
121
|
+
AppendNode.prototype.isVisible = function () {
|
122
|
+
return (this.parent.childs.length == 0);
|
123
|
+
};
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Show a contextmenu for this node
|
127
|
+
* @param {HTMLElement} anchor The element to attach the menu to.
|
128
|
+
* @param {function} [onClose] Callback method called when the context menu
|
129
|
+
* is being closed.
|
130
|
+
*/
|
131
|
+
AppendNode.prototype.showContextMenu = function (anchor, onClose) {
|
132
|
+
var node = this;
|
133
|
+
var titles = Node.TYPE_TITLES;
|
134
|
+
var items = [
|
135
|
+
// create append button
|
136
|
+
{
|
137
|
+
'text': 'Append',
|
138
|
+
'title': 'Append a new field with type \'auto\' (Ctrl+Shift+Ins)',
|
139
|
+
'submenuTitle': 'Select the type of the field to be appended',
|
140
|
+
'className': 'jsoneditor-insert',
|
141
|
+
'click': function () {
|
142
|
+
node._onAppend('', '', 'auto');
|
143
|
+
},
|
144
|
+
'submenu': [
|
145
|
+
{
|
146
|
+
'text': 'Auto',
|
147
|
+
'className': 'jsoneditor-type-auto',
|
148
|
+
'title': titles.auto,
|
149
|
+
'click': function () {
|
150
|
+
node._onAppend('', '', 'auto');
|
151
|
+
}
|
152
|
+
},
|
153
|
+
{
|
154
|
+
'text': 'Array',
|
155
|
+
'className': 'jsoneditor-type-array',
|
156
|
+
'title': titles.array,
|
157
|
+
'click': function () {
|
158
|
+
node._onAppend('', []);
|
159
|
+
}
|
160
|
+
},
|
161
|
+
{
|
162
|
+
'text': 'Object',
|
163
|
+
'className': 'jsoneditor-type-object',
|
164
|
+
'title': titles.object,
|
165
|
+
'click': function () {
|
166
|
+
node._onAppend('', {});
|
167
|
+
}
|
168
|
+
},
|
169
|
+
{
|
170
|
+
'text': 'String',
|
171
|
+
'className': 'jsoneditor-type-string',
|
172
|
+
'title': titles.string,
|
173
|
+
'click': function () {
|
174
|
+
node._onAppend('', '', 'string');
|
175
|
+
}
|
176
|
+
}
|
177
|
+
]
|
178
|
+
}
|
179
|
+
];
|
180
|
+
|
181
|
+
var menu = new ContextMenu(items, {close: onClose});
|
182
|
+
menu.show(anchor, this.editor.content);
|
183
|
+
};
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Handle an event. The event is catched centrally by the editor
|
187
|
+
* @param {Event} event
|
188
|
+
*/
|
189
|
+
AppendNode.prototype.onEvent = function (event) {
|
190
|
+
var type = event.type;
|
191
|
+
var target = event.target || event.srcElement;
|
192
|
+
var dom = this.dom;
|
193
|
+
|
194
|
+
// highlight the append nodes parent
|
195
|
+
var menu = dom.menu;
|
196
|
+
if (target == menu) {
|
197
|
+
if (type == 'mouseover') {
|
198
|
+
this.editor.highlighter.highlight(this.parent);
|
199
|
+
}
|
200
|
+
else if (type == 'mouseout') {
|
201
|
+
this.editor.highlighter.unhighlight();
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
// context menu events
|
206
|
+
if (type == 'click' && target == dom.menu) {
|
207
|
+
var highlighter = this.editor.highlighter;
|
208
|
+
highlighter.highlight(this.parent);
|
209
|
+
highlighter.lock();
|
210
|
+
util.addClassName(dom.menu, 'jsoneditor-selected');
|
211
|
+
this.showContextMenu(dom.menu, function () {
|
212
|
+
util.removeClassName(dom.menu, 'jsoneditor-selected');
|
213
|
+
highlighter.unlock();
|
214
|
+
highlighter.unhighlight();
|
215
|
+
});
|
216
|
+
}
|
217
|
+
|
218
|
+
if (type == 'keydown') {
|
219
|
+
this.onKeyDown(event);
|
220
|
+
}
|
221
|
+
};
|
222
|
+
|
223
|
+
return AppendNode;
|
224
|
+
}
|
225
|
+
|
226
|
+
module.exports = appendNodeFactory;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
The file jsonlint.js is copied from the following project:
|
2
|
+
|
3
|
+
https://github.com/josdejong/jsonlint at 85a19d7
|
4
|
+
|
5
|
+
which is a fork of the (currently not maintained) project:
|
6
|
+
|
7
|
+
https://github.com/zaach/jsonlint
|
8
|
+
|
9
|
+
The forked project contains some fixes to allow the file to be bundled with
|
10
|
+
browserify. The file is copied in this project to prevent issues with linking
|
11
|
+
to a github project from package.json, which is for example not supported
|
12
|
+
by jspm.
|
13
|
+
|
14
|
+
As soon as zaach/jsonlint is being maintained again we can push the fix
|
15
|
+
to the original library and use it as dependency again.
|
@@ -0,0 +1,418 @@
|
|
1
|
+
/* Jison generated parser */
|
2
|
+
var jsonlint = (function(){
|
3
|
+
var parser = {trace: function trace() { },
|
4
|
+
yy: {},
|
5
|
+
symbols_: {"error":2,"JSONString":3,"STRING":4,"JSONNumber":5,"NUMBER":6,"JSONNullLiteral":7,"NULL":8,"JSONBooleanLiteral":9,"TRUE":10,"FALSE":11,"JSONText":12,"JSONValue":13,"EOF":14,"JSONObject":15,"JSONArray":16,"{":17,"}":18,"JSONMemberList":19,"JSONMember":20,":":21,",":22,"[":23,"]":24,"JSONElementList":25,"$accept":0,"$end":1},
|
6
|
+
terminals_: {2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},
|
7
|
+
productions_: [0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],
|
8
|
+
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
|
9
|
+
|
10
|
+
var $0 = $$.length - 1;
|
11
|
+
switch (yystate) {
|
12
|
+
case 1: // replace escaped characters with actual character
|
13
|
+
this.$ = yytext.replace(/\\(\\|")/g, "$"+"1")
|
14
|
+
.replace(/\\n/g,'\n')
|
15
|
+
.replace(/\\r/g,'\r')
|
16
|
+
.replace(/\\t/g,'\t')
|
17
|
+
.replace(/\\v/g,'\v')
|
18
|
+
.replace(/\\f/g,'\f')
|
19
|
+
.replace(/\\b/g,'\b');
|
20
|
+
|
21
|
+
break;
|
22
|
+
case 2:this.$ = Number(yytext);
|
23
|
+
break;
|
24
|
+
case 3:this.$ = null;
|
25
|
+
break;
|
26
|
+
case 4:this.$ = true;
|
27
|
+
break;
|
28
|
+
case 5:this.$ = false;
|
29
|
+
break;
|
30
|
+
case 6:return this.$ = $$[$0-1];
|
31
|
+
break;
|
32
|
+
case 13:this.$ = {};
|
33
|
+
break;
|
34
|
+
case 14:this.$ = $$[$0-1];
|
35
|
+
break;
|
36
|
+
case 15:this.$ = [$$[$0-2], $$[$0]];
|
37
|
+
break;
|
38
|
+
case 16:this.$ = {}; this.$[$$[$0][0]] = $$[$0][1];
|
39
|
+
break;
|
40
|
+
case 17:this.$ = $$[$0-2]; $$[$0-2][$$[$0][0]] = $$[$0][1];
|
41
|
+
break;
|
42
|
+
case 18:this.$ = [];
|
43
|
+
break;
|
44
|
+
case 19:this.$ = $$[$0-1];
|
45
|
+
break;
|
46
|
+
case 20:this.$ = [$$[$0]];
|
47
|
+
break;
|
48
|
+
case 21:this.$ = $$[$0-2]; $$[$0-2].push($$[$0]);
|
49
|
+
break;
|
50
|
+
}
|
51
|
+
},
|
52
|
+
table: [{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],
|
53
|
+
defaultActions: {16:[2,6]},
|
54
|
+
parseError: function parseError(str, hash) {
|
55
|
+
throw new Error(str);
|
56
|
+
},
|
57
|
+
parse: function parse(input) {
|
58
|
+
var self = this,
|
59
|
+
stack = [0],
|
60
|
+
vstack = [null], // semantic value stack
|
61
|
+
lstack = [], // location stack
|
62
|
+
table = this.table,
|
63
|
+
yytext = '',
|
64
|
+
yylineno = 0,
|
65
|
+
yyleng = 0,
|
66
|
+
recovering = 0,
|
67
|
+
TERROR = 2,
|
68
|
+
EOF = 1;
|
69
|
+
|
70
|
+
//this.reductionCount = this.shiftCount = 0;
|
71
|
+
|
72
|
+
this.lexer.setInput(input);
|
73
|
+
this.lexer.yy = this.yy;
|
74
|
+
this.yy.lexer = this.lexer;
|
75
|
+
if (typeof this.lexer.yylloc == 'undefined')
|
76
|
+
this.lexer.yylloc = {};
|
77
|
+
var yyloc = this.lexer.yylloc;
|
78
|
+
lstack.push(yyloc);
|
79
|
+
|
80
|
+
if (typeof this.yy.parseError === 'function')
|
81
|
+
this.parseError = this.yy.parseError;
|
82
|
+
|
83
|
+
function popStack (n) {
|
84
|
+
stack.length = stack.length - 2*n;
|
85
|
+
vstack.length = vstack.length - n;
|
86
|
+
lstack.length = lstack.length - n;
|
87
|
+
}
|
88
|
+
|
89
|
+
function lex() {
|
90
|
+
var token;
|
91
|
+
token = self.lexer.lex() || 1; // $end = 1
|
92
|
+
// if token isn't its numeric value, convert
|
93
|
+
if (typeof token !== 'number') {
|
94
|
+
token = self.symbols_[token] || token;
|
95
|
+
}
|
96
|
+
return token;
|
97
|
+
}
|
98
|
+
|
99
|
+
var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
|
100
|
+
while (true) {
|
101
|
+
// retreive state number from top of stack
|
102
|
+
state = stack[stack.length-1];
|
103
|
+
|
104
|
+
// use default actions if available
|
105
|
+
if (this.defaultActions[state]) {
|
106
|
+
action = this.defaultActions[state];
|
107
|
+
} else {
|
108
|
+
if (symbol == null)
|
109
|
+
symbol = lex();
|
110
|
+
// read action for current state and first input
|
111
|
+
action = table[state] && table[state][symbol];
|
112
|
+
}
|
113
|
+
|
114
|
+
// handle parse error
|
115
|
+
_handle_error:
|
116
|
+
if (typeof action === 'undefined' || !action.length || !action[0]) {
|
117
|
+
|
118
|
+
if (!recovering) {
|
119
|
+
// Report error
|
120
|
+
expected = [];
|
121
|
+
for (p in table[state]) if (this.terminals_[p] && p > 2) {
|
122
|
+
expected.push("'"+this.terminals_[p]+"'");
|
123
|
+
}
|
124
|
+
var errStr = '';
|
125
|
+
if (this.lexer.showPosition) {
|
126
|
+
errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
|
127
|
+
} else {
|
128
|
+
errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
|
129
|
+
(symbol == 1 /*EOF*/ ? "end of input" :
|
130
|
+
("'"+(this.terminals_[symbol] || symbol)+"'"));
|
131
|
+
}
|
132
|
+
this.parseError(errStr,
|
133
|
+
{text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
|
134
|
+
}
|
135
|
+
|
136
|
+
// just recovered from another error
|
137
|
+
if (recovering == 3) {
|
138
|
+
if (symbol == EOF) {
|
139
|
+
throw new Error(errStr || 'Parsing halted.');
|
140
|
+
}
|
141
|
+
|
142
|
+
// discard current lookahead and grab another
|
143
|
+
yyleng = this.lexer.yyleng;
|
144
|
+
yytext = this.lexer.yytext;
|
145
|
+
yylineno = this.lexer.yylineno;
|
146
|
+
yyloc = this.lexer.yylloc;
|
147
|
+
symbol = lex();
|
148
|
+
}
|
149
|
+
|
150
|
+
// try to recover from error
|
151
|
+
while (1) {
|
152
|
+
// check for error recovery rule in this state
|
153
|
+
if ((TERROR.toString()) in table[state]) {
|
154
|
+
break;
|
155
|
+
}
|
156
|
+
if (state == 0) {
|
157
|
+
throw new Error(errStr || 'Parsing halted.');
|
158
|
+
}
|
159
|
+
popStack(1);
|
160
|
+
state = stack[stack.length-1];
|
161
|
+
}
|
162
|
+
|
163
|
+
preErrorSymbol = symbol; // save the lookahead token
|
164
|
+
symbol = TERROR; // insert generic error symbol as new lookahead
|
165
|
+
state = stack[stack.length-1];
|
166
|
+
action = table[state] && table[state][TERROR];
|
167
|
+
recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
|
168
|
+
}
|
169
|
+
|
170
|
+
// this shouldn't happen, unless resolve defaults are off
|
171
|
+
if (action[0] instanceof Array && action.length > 1) {
|
172
|
+
throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
|
173
|
+
}
|
174
|
+
|
175
|
+
switch (action[0]) {
|
176
|
+
|
177
|
+
case 1: // shift
|
178
|
+
//this.shiftCount++;
|
179
|
+
|
180
|
+
stack.push(symbol);
|
181
|
+
vstack.push(this.lexer.yytext);
|
182
|
+
lstack.push(this.lexer.yylloc);
|
183
|
+
stack.push(action[1]); // push state
|
184
|
+
symbol = null;
|
185
|
+
if (!preErrorSymbol) { // normal execution/no error
|
186
|
+
yyleng = this.lexer.yyleng;
|
187
|
+
yytext = this.lexer.yytext;
|
188
|
+
yylineno = this.lexer.yylineno;
|
189
|
+
yyloc = this.lexer.yylloc;
|
190
|
+
if (recovering > 0)
|
191
|
+
recovering--;
|
192
|
+
} else { // error just occurred, resume old lookahead f/ before error
|
193
|
+
symbol = preErrorSymbol;
|
194
|
+
preErrorSymbol = null;
|
195
|
+
}
|
196
|
+
break;
|
197
|
+
|
198
|
+
case 2: // reduce
|
199
|
+
//this.reductionCount++;
|
200
|
+
|
201
|
+
len = this.productions_[action[1]][1];
|
202
|
+
|
203
|
+
// perform semantic action
|
204
|
+
yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
|
205
|
+
// default location, uses first token for firsts, last for lasts
|
206
|
+
yyval._$ = {
|
207
|
+
first_line: lstack[lstack.length-(len||1)].first_line,
|
208
|
+
last_line: lstack[lstack.length-1].last_line,
|
209
|
+
first_column: lstack[lstack.length-(len||1)].first_column,
|
210
|
+
last_column: lstack[lstack.length-1].last_column
|
211
|
+
};
|
212
|
+
r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
213
|
+
|
214
|
+
if (typeof r !== 'undefined') {
|
215
|
+
return r;
|
216
|
+
}
|
217
|
+
|
218
|
+
// pop off stack
|
219
|
+
if (len) {
|
220
|
+
stack = stack.slice(0,-1*len*2);
|
221
|
+
vstack = vstack.slice(0, -1*len);
|
222
|
+
lstack = lstack.slice(0, -1*len);
|
223
|
+
}
|
224
|
+
|
225
|
+
stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
|
226
|
+
vstack.push(yyval.$);
|
227
|
+
lstack.push(yyval._$);
|
228
|
+
// goto new state = table[STATE][NONTERMINAL]
|
229
|
+
newState = table[stack[stack.length-2]][stack[stack.length-1]];
|
230
|
+
stack.push(newState);
|
231
|
+
break;
|
232
|
+
|
233
|
+
case 3: // accept
|
234
|
+
return true;
|
235
|
+
}
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
return true;
|
240
|
+
}};
|
241
|
+
/* Jison generated lexer */
|
242
|
+
var lexer = (function(){
|
243
|
+
var lexer = ({EOF:1,
|
244
|
+
parseError:function parseError(str, hash) {
|
245
|
+
if (this.yy.parseError) {
|
246
|
+
this.yy.parseError(str, hash);
|
247
|
+
} else {
|
248
|
+
throw new Error(str);
|
249
|
+
}
|
250
|
+
},
|
251
|
+
setInput:function (input) {
|
252
|
+
this._input = input;
|
253
|
+
this._more = this._less = this.done = false;
|
254
|
+
this.yylineno = this.yyleng = 0;
|
255
|
+
this.yytext = this.matched = this.match = '';
|
256
|
+
this.conditionStack = ['INITIAL'];
|
257
|
+
this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
|
258
|
+
return this;
|
259
|
+
},
|
260
|
+
input:function () {
|
261
|
+
var ch = this._input[0];
|
262
|
+
this.yytext+=ch;
|
263
|
+
this.yyleng++;
|
264
|
+
this.match+=ch;
|
265
|
+
this.matched+=ch;
|
266
|
+
var lines = ch.match(/\n/);
|
267
|
+
if (lines) this.yylineno++;
|
268
|
+
this._input = this._input.slice(1);
|
269
|
+
return ch;
|
270
|
+
},
|
271
|
+
unput:function (ch) {
|
272
|
+
this._input = ch + this._input;
|
273
|
+
return this;
|
274
|
+
},
|
275
|
+
more:function () {
|
276
|
+
this._more = true;
|
277
|
+
return this;
|
278
|
+
},
|
279
|
+
less:function (n) {
|
280
|
+
this._input = this.match.slice(n) + this._input;
|
281
|
+
},
|
282
|
+
pastInput:function () {
|
283
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
284
|
+
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
285
|
+
},
|
286
|
+
upcomingInput:function () {
|
287
|
+
var next = this.match;
|
288
|
+
if (next.length < 20) {
|
289
|
+
next += this._input.substr(0, 20-next.length);
|
290
|
+
}
|
291
|
+
return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
|
292
|
+
},
|
293
|
+
showPosition:function () {
|
294
|
+
var pre = this.pastInput();
|
295
|
+
var c = new Array(pre.length + 1).join("-");
|
296
|
+
return pre + this.upcomingInput() + "\n" + c+"^";
|
297
|
+
},
|
298
|
+
next:function () {
|
299
|
+
if (this.done) {
|
300
|
+
return this.EOF;
|
301
|
+
}
|
302
|
+
if (!this._input) this.done = true;
|
303
|
+
|
304
|
+
var token,
|
305
|
+
match,
|
306
|
+
tempMatch,
|
307
|
+
index,
|
308
|
+
col,
|
309
|
+
lines;
|
310
|
+
if (!this._more) {
|
311
|
+
this.yytext = '';
|
312
|
+
this.match = '';
|
313
|
+
}
|
314
|
+
var rules = this._currentRules();
|
315
|
+
for (var i=0;i < rules.length; i++) {
|
316
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
317
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
318
|
+
match = tempMatch;
|
319
|
+
index = i;
|
320
|
+
if (!this.options.flex) break;
|
321
|
+
}
|
322
|
+
}
|
323
|
+
if (match) {
|
324
|
+
lines = match[0].match(/\n.*/g);
|
325
|
+
if (lines) this.yylineno += lines.length;
|
326
|
+
this.yylloc = {first_line: this.yylloc.last_line,
|
327
|
+
last_line: this.yylineno+1,
|
328
|
+
first_column: this.yylloc.last_column,
|
329
|
+
last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
|
330
|
+
this.yytext += match[0];
|
331
|
+
this.match += match[0];
|
332
|
+
this.yyleng = this.yytext.length;
|
333
|
+
this._more = false;
|
334
|
+
this._input = this._input.slice(match[0].length);
|
335
|
+
this.matched += match[0];
|
336
|
+
token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
|
337
|
+
if (this.done && this._input) this.done = false;
|
338
|
+
if (token) return token;
|
339
|
+
else return;
|
340
|
+
}
|
341
|
+
if (this._input === "") {
|
342
|
+
return this.EOF;
|
343
|
+
} else {
|
344
|
+
this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
|
345
|
+
{text: "", token: null, line: this.yylineno});
|
346
|
+
}
|
347
|
+
},
|
348
|
+
lex:function lex() {
|
349
|
+
var r = this.next();
|
350
|
+
if (typeof r !== 'undefined') {
|
351
|
+
return r;
|
352
|
+
} else {
|
353
|
+
return this.lex();
|
354
|
+
}
|
355
|
+
},
|
356
|
+
begin:function begin(condition) {
|
357
|
+
this.conditionStack.push(condition);
|
358
|
+
},
|
359
|
+
popState:function popState() {
|
360
|
+
return this.conditionStack.pop();
|
361
|
+
},
|
362
|
+
_currentRules:function _currentRules() {
|
363
|
+
return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
|
364
|
+
},
|
365
|
+
topState:function () {
|
366
|
+
return this.conditionStack[this.conditionStack.length-2];
|
367
|
+
},
|
368
|
+
pushState:function begin(condition) {
|
369
|
+
this.begin(condition);
|
370
|
+
}});
|
371
|
+
lexer.options = {};
|
372
|
+
lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
373
|
+
|
374
|
+
var YYSTATE=YY_START
|
375
|
+
switch($avoiding_name_collisions) {
|
376
|
+
case 0:/* skip whitespace */
|
377
|
+
break;
|
378
|
+
case 1:return 6
|
379
|
+
break;
|
380
|
+
case 2:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 4
|
381
|
+
break;
|
382
|
+
case 3:return 17
|
383
|
+
break;
|
384
|
+
case 4:return 18
|
385
|
+
break;
|
386
|
+
case 5:return 23
|
387
|
+
break;
|
388
|
+
case 6:return 24
|
389
|
+
break;
|
390
|
+
case 7:return 22
|
391
|
+
break;
|
392
|
+
case 8:return 21
|
393
|
+
break;
|
394
|
+
case 9:return 10
|
395
|
+
break;
|
396
|
+
case 10:return 11
|
397
|
+
break;
|
398
|
+
case 11:return 8
|
399
|
+
break;
|
400
|
+
case 12:return 14
|
401
|
+
break;
|
402
|
+
case 13:return 'INVALID'
|
403
|
+
break;
|
404
|
+
}
|
405
|
+
};
|
406
|
+
lexer.rules = [/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/];
|
407
|
+
lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],"inclusive":true}};
|
408
|
+
|
409
|
+
|
410
|
+
;
|
411
|
+
return lexer;})()
|
412
|
+
parser.lexer = lexer;
|
413
|
+
return parser;
|
414
|
+
})();
|
415
|
+
if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
|
416
|
+
exports.parser = jsonlint;
|
417
|
+
exports.parse = jsonlint.parse.bind(jsonlint);
|
418
|
+
}
|