stylish 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +7 -10
- data/ARCHITECTURE.md +96 -0
- data/Gemfile +8 -0
- data/README.md +25 -29
- data/Rakefile +24 -0
- data/bin/stylish +33 -0
- data/lib/stylish.rb +36 -1
- data/lib/stylish/configuration.rb +37 -0
- data/lib/stylish/core_ext.rb +20 -0
- data/lib/stylish/developer.rb +13 -0
- data/lib/stylish/developer/config.rb +19 -0
- data/lib/stylish/developer/environment.rb +75 -0
- data/lib/stylish/developer/listing.rb +85 -0
- data/lib/stylish/developer/model_delegator.rb +51 -0
- data/lib/stylish/developer/modification.rb +139 -0
- data/lib/stylish/developer/path.rb +168 -0
- data/lib/stylish/developer/route.rb +97 -0
- data/lib/stylish/developer/server.rb +40 -0
- data/lib/stylish/engine.rb +12 -0
- data/lib/stylish/fs.rb +59 -0
- data/lib/stylish/manifest.rb +100 -0
- data/lib/stylish/models.rb +119 -0
- data/lib/stylish/models/component.rb +19 -0
- data/lib/stylish/models/layout.rb +19 -0
- data/lib/stylish/models/library.rb +134 -0
- data/lib/stylish/models/package.rb +156 -0
- data/lib/stylish/models/script.rb +10 -0
- data/lib/stylish/models/stylesheet.rb +9 -0
- data/lib/stylish/models/template.rb +9 -0
- data/lib/stylish/models/theme.rb +8 -0
- data/lib/stylish/util.rb +20 -0
- data/lib/stylish/version.rb +1 -1
- data/library/config.json +4 -0
- data/library/second-theme/manifest.json +8 -0
- data/library/second-theme/manifest.yml +6 -0
- data/library/second-theme/templates/footers/footer-01.html +3 -0
- data/library/second-theme/templates/footers/footer-02.html +3 -0
- data/library/second-theme/templates/headers/header-01.html +3 -0
- data/library/second-theme/templates/headers/header-02.html +3 -0
- data/library/second-theme/templates/landing-page-blocks/landing-page-block-01.html +3 -0
- data/library/second-theme/templates/landing-page-blocks/landing-page-block-02.html +3 -0
- data/library/test-theme/components/footers/footer-01.json +5 -0
- data/library/test-theme/components/footers/footer-02.json +5 -0
- data/library/test-theme/components/headers/header-01.json +5 -0
- data/library/test-theme/components/headers/header-02.json +5 -0
- data/library/test-theme/components/landing-page-blocks/landing-page-01.json +5 -0
- data/library/test-theme/components/landing-page-blocks/landing-page-02.json +5 -0
- data/library/test-theme/manifest.json +8 -0
- data/library/test-theme/manifest.yml +6 -0
- data/library/test-theme/pages/page-01.json +11 -0
- data/library/test-theme/templates/footers/footer-01.html +3 -0
- data/library/test-theme/templates/footers/footer-02.html +3 -0
- data/library/test-theme/templates/headers/header-01.html +3 -0
- data/library/test-theme/templates/headers/header-02.html +3 -0
- data/library/test-theme/templates/landing-page-blocks/landing-page-block-01.html +3 -0
- data/library/test-theme/templates/landing-page-blocks/landing-page-block-02.html +3 -0
- data/library/test-theme/templates/layouts/standard-layout.html +10 -0
- data/spec/acceptance/listing_assets_spec.rb +20 -0
- data/spec/acceptance/model_browsing_spec.rb +21 -0
- data/spec/acceptance/model_creation_spec.rb +16 -0
- data/spec/acceptance/model_deleting_spec.rb +10 -0
- data/spec/acceptance/model_updating_spec.rb +12 -0
- data/spec/acceptance/modifying_assets_spec.rb +50 -0
- data/spec/acceptance/server_info_spec.rb +10 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/javascripts/test.coffee +4 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/assets/stylesheets/test.css.scss +6 -0
- data/spec/dummy/app/assets/stylesheets/writable/existing.scss.css +0 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +30 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +82 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/migrate/20140822065900_create_books.rb +11 -0
- data/spec/dummy/db/migrate/20140822065916_create_authors.rb +9 -0
- data/spec/dummy/db/migrate/20140824215902_create_users.rb +10 -0
- data/spec/dummy/db/migrate/20140826193259_create_libraries.rb +10 -0
- data/spec/dummy/db/schema.rb +37 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/fixtures/config.json +3 -0
- data/spec/fixtures/test-theme/components/footers/footer-01.json +5 -0
- data/spec/fixtures/test-theme/components/footers/footer-02.json +5 -0
- data/spec/fixtures/test-theme/components/headers/header-01.json +5 -0
- data/spec/fixtures/test-theme/components/headers/header-02.json +5 -0
- data/spec/fixtures/test-theme/components/landing-page-blocks/landing-page-01.json +5 -0
- data/spec/fixtures/test-theme/components/landing-page-blocks/landing-page-02.json +5 -0
- data/spec/fixtures/test-theme/manifest.json +8 -0
- data/spec/fixtures/test-theme/manifest.yml +6 -0
- data/spec/fixtures/test-theme/pages/page-01.json +11 -0
- data/spec/fixtures/test-theme/templates/footers/footer-01.html +3 -0
- data/spec/fixtures/test-theme/templates/footers/footer-02.html +3 -0
- data/spec/fixtures/test-theme/templates/headers/header-01.html +3 -0
- data/spec/fixtures/test-theme/templates/headers/header-02.html +3 -0
- data/spec/fixtures/test-theme/templates/landing-page-blocks/landing-page-block-01.html +3 -0
- data/spec/fixtures/test-theme/templates/landing-page-blocks/landing-page-block-02.html +3 -0
- data/spec/fixtures/test-theme/templates/layouts/standard-01.html +9 -0
- data/spec/lib/stylish/configuration_spec.rb +8 -0
- data/spec/lib/stylish/developer/path_spec.rb +36 -0
- data/spec/lib/stylish/developer/route_spec.rb +5 -0
- data/spec/lib/stylish/manifest_spec.rb +48 -0
- data/spec/lib/stylish/models/library_spec.rb +38 -0
- data/spec/lib/stylish/models/package_spec.rb +35 -0
- data/spec/lib/stylish/models_spec.rb +12 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/json_helper.rb +7 -0
- data/spec/test.css.scss +6 -0
- data/stylish.gemspec +17 -2
- data/support/editor-app/.gitignore +2 -0
- data/support/editor-app/development/bower.json +9 -0
- data/support/editor-app/development/package.json +28 -0
- data/support/editor-app/development/semantic/components/accordion.css +257 -0
- data/support/editor-app/development/semantic/components/accordion.js +558 -0
- data/support/editor-app/development/semantic/components/accordion.min.css +11 -0
- data/support/editor-app/development/semantic/components/accordion.min.js +11 -0
- data/support/editor-app/development/semantic/components/ad.css +277 -0
- data/support/editor-app/development/semantic/components/ad.min.css +11 -0
- data/support/editor-app/development/semantic/components/api.js +851 -0
- data/support/editor-app/development/semantic/components/api.min.js +11 -0
- data/support/editor-app/development/semantic/components/breadcrumb.css +125 -0
- data/support/editor-app/development/semantic/components/breadcrumb.min.css +11 -0
- data/support/editor-app/development/semantic/components/button.css +2391 -0
- data/support/editor-app/development/semantic/components/button.min.css +11 -0
- data/support/editor-app/development/semantic/components/card.css +758 -0
- data/support/editor-app/development/semantic/components/card.min.css +11 -0
- data/support/editor-app/development/semantic/components/checkbox.css +514 -0
- data/support/editor-app/development/semantic/components/checkbox.js +507 -0
- data/support/editor-app/development/semantic/components/checkbox.min.css +11 -0
- data/support/editor-app/development/semantic/components/checkbox.min.js +11 -0
- data/support/editor-app/development/semantic/components/comment.css +260 -0
- data/support/editor-app/development/semantic/components/comment.min.css +11 -0
- data/support/editor-app/development/semantic/components/dimmer.css +187 -0
- data/support/editor-app/development/semantic/components/dimmer.js +627 -0
- data/support/editor-app/development/semantic/components/dimmer.min.css +11 -0
- data/support/editor-app/development/semantic/components/dimmer.min.js +11 -0
- data/support/editor-app/development/semantic/components/divider.css +244 -0
- data/support/editor-app/development/semantic/components/divider.min.css +11 -0
- data/support/editor-app/development/semantic/components/dropdown.css +1085 -0
- data/support/editor-app/development/semantic/components/dropdown.js +1757 -0
- data/support/editor-app/development/semantic/components/dropdown.min.css +11 -0
- data/support/editor-app/development/semantic/components/dropdown.min.js +11 -0
- data/support/editor-app/development/semantic/components/feed.css +277 -0
- data/support/editor-app/development/semantic/components/feed.min.css +11 -0
- data/support/editor-app/development/semantic/components/flag.css +1017 -0
- data/support/editor-app/development/semantic/components/flag.min.css +11 -0
- data/support/editor-app/development/semantic/components/form.css +875 -0
- data/support/editor-app/development/semantic/components/form.js +1039 -0
- data/support/editor-app/development/semantic/components/form.min.css +11 -0
- data/support/editor-app/development/semantic/components/form.min.js +11 -0
- data/support/editor-app/development/semantic/components/grid.css +1816 -0
- data/support/editor-app/development/semantic/components/grid.min.css +11 -0
- data/support/editor-app/development/semantic/components/header.css +572 -0
- data/support/editor-app/development/semantic/components/header.min.css +11 -0
- data/support/editor-app/development/semantic/components/icon.css +2127 -0
- data/support/editor-app/development/semantic/components/icon.min.css +11 -0
- data/support/editor-app/development/semantic/components/image.css +275 -0
- data/support/editor-app/development/semantic/components/image.min.css +11 -0
- data/support/editor-app/development/semantic/components/input.css +455 -0
- data/support/editor-app/development/semantic/components/input.min.css +11 -0
- data/support/editor-app/development/semantic/components/item.css +458 -0
- data/support/editor-app/development/semantic/components/item.min.css +11 -0
- data/support/editor-app/development/semantic/components/label.css +930 -0
- data/support/editor-app/development/semantic/components/label.min.css +11 -0
- data/support/editor-app/development/semantic/components/list.css +879 -0
- data/support/editor-app/development/semantic/components/list.min.css +11 -0
- data/support/editor-app/development/semantic/components/loader.css +279 -0
- data/support/editor-app/development/semantic/components/loader.min.css +11 -0
- data/support/editor-app/development/semantic/components/menu.css +1596 -0
- data/support/editor-app/development/semantic/components/menu.min.css +11 -0
- data/support/editor-app/development/semantic/components/message.css +422 -0
- data/support/editor-app/development/semantic/components/message.min.css +11 -0
- data/support/editor-app/development/semantic/components/modal.css +431 -0
- data/support/editor-app/development/semantic/components/modal.js +860 -0
- data/support/editor-app/development/semantic/components/modal.min.css +11 -0
- data/support/editor-app/development/semantic/components/modal.min.js +11 -0
- data/support/editor-app/development/semantic/components/nag.css +149 -0
- data/support/editor-app/development/semantic/components/nag.js +477 -0
- data/support/editor-app/development/semantic/components/nag.min.css +11 -0
- data/support/editor-app/development/semantic/components/nag.min.js +11 -0
- data/support/editor-app/development/semantic/components/popup.css +294 -0
- data/support/editor-app/development/semantic/components/popup.js +1187 -0
- data/support/editor-app/development/semantic/components/popup.min.css +11 -0
- data/support/editor-app/development/semantic/components/popup.min.js +11 -0
- data/support/editor-app/development/semantic/components/progress.css +449 -0
- data/support/editor-app/development/semantic/components/progress.js +785 -0
- data/support/editor-app/development/semantic/components/progress.min.css +11 -0
- data/support/editor-app/development/semantic/components/progress.min.js +11 -0
- data/support/editor-app/development/semantic/components/rail.css +125 -0
- data/support/editor-app/development/semantic/components/rail.min.css +11 -0
- data/support/editor-app/development/semantic/components/rating.css +262 -0
- data/support/editor-app/development/semantic/components/rating.js +451 -0
- data/support/editor-app/development/semantic/components/rating.min.css +11 -0
- data/support/editor-app/development/semantic/components/rating.min.js +11 -0
- data/support/editor-app/development/semantic/components/reset.css +430 -0
- data/support/editor-app/development/semantic/components/reset.min.css +11 -0
- data/support/editor-app/development/semantic/components/reveal.css +294 -0
- data/support/editor-app/development/semantic/components/reveal.min.css +11 -0
- data/support/editor-app/development/semantic/components/search.css +330 -0
- data/support/editor-app/development/semantic/components/search.js +1055 -0
- data/support/editor-app/development/semantic/components/search.min.css +11 -0
- data/support/editor-app/development/semantic/components/search.min.js +11 -0
- data/support/editor-app/development/semantic/components/segment.css +590 -0
- data/support/editor-app/development/semantic/components/segment.min.css +11 -0
- data/support/editor-app/development/semantic/components/shape.css +155 -0
- data/support/editor-app/development/semantic/components/shape.js +830 -0
- data/support/editor-app/development/semantic/components/shape.min.css +11 -0
- data/support/editor-app/development/semantic/components/shape.min.js +11 -0
- data/support/editor-app/development/semantic/components/sidebar.css +621 -0
- data/support/editor-app/development/semantic/components/sidebar.js +1084 -0
- data/support/editor-app/development/semantic/components/sidebar.min.css +11 -0
- data/support/editor-app/development/semantic/components/sidebar.min.js +11 -0
- data/support/editor-app/development/semantic/components/site.css +147 -0
- data/support/editor-app/development/semantic/components/site.js +487 -0
- data/support/editor-app/development/semantic/components/site.min.css +11 -0
- data/support/editor-app/development/semantic/components/site.min.js +11 -0
- data/support/editor-app/development/semantic/components/state.js +690 -0
- data/support/editor-app/development/semantic/components/state.min.js +11 -0
- data/support/editor-app/development/semantic/components/statistic.css +410 -0
- data/support/editor-app/development/semantic/components/statistic.min.css +11 -0
- data/support/editor-app/development/semantic/components/step.css +433 -0
- data/support/editor-app/development/semantic/components/step.min.css +11 -0
- data/support/editor-app/development/semantic/components/sticky.css +80 -0
- data/support/editor-app/development/semantic/components/sticky.js +775 -0
- data/support/editor-app/development/semantic/components/sticky.min.css +11 -0
- data/support/editor-app/development/semantic/components/sticky.min.js +11 -0
- data/support/editor-app/development/semantic/components/tab.css +93 -0
- data/support/editor-app/development/semantic/components/tab.js +787 -0
- data/support/editor-app/development/semantic/components/tab.min.css +11 -0
- data/support/editor-app/development/semantic/components/tab.min.js +11 -0
- data/support/editor-app/development/semantic/components/table.css +999 -0
- data/support/editor-app/development/semantic/components/table.min.css +11 -0
- data/support/editor-app/development/semantic/components/transition.css +2152 -0
- data/support/editor-app/development/semantic/components/transition.js +936 -0
- data/support/editor-app/development/semantic/components/transition.min.css +11 -0
- data/support/editor-app/development/semantic/components/transition.min.js +11 -0
- data/support/editor-app/development/semantic/components/video.css +126 -0
- data/support/editor-app/development/semantic/components/video.js +540 -0
- data/support/editor-app/development/semantic/components/video.min.css +11 -0
- data/support/editor-app/development/semantic/components/video.min.js +11 -0
- data/support/editor-app/development/semantic/components/visibility.js +970 -0
- data/support/editor-app/development/semantic/components/visibility.min.js +11 -0
- data/support/editor-app/development/semantic/semantic.css +31768 -0
- data/support/editor-app/development/semantic/semantic.js +18317 -0
- data/support/editor-app/development/semantic/semantic.min.css +11 -0
- data/support/editor-app/development/semantic/semantic.min.js +17 -0
- data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.eot +0 -0
- data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.svg +450 -0
- data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.ttf +0 -0
- data/support/editor-app/development/semantic/themes/basic/assets/fonts/icons.woff +0 -0
- data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.eot +0 -0
- data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.otf +0 -0
- data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.svg +504 -0
- data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.ttf +0 -0
- data/support/editor-app/development/semantic/themes/default/assets/fonts/icons.woff +0 -0
- data/support/editor-app/development/semantic/themes/default/assets/images/flags.png +0 -0
- data/support/editor-app/development/src/apis/index.coffee +35 -0
- data/support/editor-app/development/src/components/editor.cjsx +58 -0
- data/support/editor-app/development/src/components/editor_drawer.cjsx +7 -0
- data/support/editor-app/development/src/components/header.cjsx +12 -0
- data/support/editor-app/development/src/components/index.coffee +9 -0
- data/support/editor-app/development/src/components/menus/icon_grid.cjsx +0 -0
- data/support/editor-app/development/src/components/sidebar.cjsx +24 -0
- data/support/editor-app/development/src/components/tiled_grid.cjsx +35 -0
- data/support/editor-app/development/src/index.cjsx +82 -0
- data/support/editor-app/development/src/lib/util.coffee +48 -0
- data/support/editor-app/development/src/pages/home.cjsx +46 -0
- data/support/editor-app/development/src/pages/index.coffee +6 -0
- data/support/editor-app/development/src/pages/package_details.cjsx +55 -0
- data/support/editor-app/development/src/registry.coffee +35 -0
- data/support/editor-app/development/src/styles/components/tiled_grid.css.scss +5 -0
- data/support/editor-app/development/src/styles/index.css.scss +240 -0
- data/support/editor-app/development/src/sugar.cjsx +126 -0
- data/support/editor-app/development/webpack.config.js +53 -0
- data/support/editor-app/dist/base.css +0 -0
- data/support/editor-app/dist/toolit.js +62 -0
- data/support/editor-app/dist/toolkit.js +44573 -0
- data/support/editor-app/index.html +50 -0
- data/support/editor-app/package.json +15 -0
- data/support/editor-app/semantic/components/accordion.css +257 -0
- data/support/editor-app/semantic/components/accordion.js +558 -0
- data/support/editor-app/semantic/components/accordion.min.css +11 -0
- data/support/editor-app/semantic/components/accordion.min.js +11 -0
- data/support/editor-app/semantic/components/ad.css +277 -0
- data/support/editor-app/semantic/components/ad.min.css +11 -0
- data/support/editor-app/semantic/components/api.js +851 -0
- data/support/editor-app/semantic/components/api.min.js +11 -0
- data/support/editor-app/semantic/components/breadcrumb.css +125 -0
- data/support/editor-app/semantic/components/breadcrumb.min.css +11 -0
- data/support/editor-app/semantic/components/button.css +2391 -0
- data/support/editor-app/semantic/components/button.min.css +11 -0
- data/support/editor-app/semantic/components/card.css +758 -0
- data/support/editor-app/semantic/components/card.min.css +11 -0
- data/support/editor-app/semantic/components/checkbox.css +514 -0
- data/support/editor-app/semantic/components/checkbox.js +507 -0
- data/support/editor-app/semantic/components/checkbox.min.css +11 -0
- data/support/editor-app/semantic/components/checkbox.min.js +11 -0
- data/support/editor-app/semantic/components/comment.css +260 -0
- data/support/editor-app/semantic/components/comment.min.css +11 -0
- data/support/editor-app/semantic/components/dimmer.css +187 -0
- data/support/editor-app/semantic/components/dimmer.js +627 -0
- data/support/editor-app/semantic/components/dimmer.min.css +11 -0
- data/support/editor-app/semantic/components/dimmer.min.js +11 -0
- data/support/editor-app/semantic/components/divider.css +244 -0
- data/support/editor-app/semantic/components/divider.min.css +11 -0
- data/support/editor-app/semantic/components/dropdown.css +1085 -0
- data/support/editor-app/semantic/components/dropdown.js +1757 -0
- data/support/editor-app/semantic/components/dropdown.min.css +11 -0
- data/support/editor-app/semantic/components/dropdown.min.js +11 -0
- data/support/editor-app/semantic/components/feed.css +277 -0
- data/support/editor-app/semantic/components/feed.min.css +11 -0
- data/support/editor-app/semantic/components/flag.css +1017 -0
- data/support/editor-app/semantic/components/flag.min.css +11 -0
- data/support/editor-app/semantic/components/form.css +875 -0
- data/support/editor-app/semantic/components/form.js +1039 -0
- data/support/editor-app/semantic/components/form.min.css +11 -0
- data/support/editor-app/semantic/components/form.min.js +11 -0
- data/support/editor-app/semantic/components/grid.css +1816 -0
- data/support/editor-app/semantic/components/grid.min.css +11 -0
- data/support/editor-app/semantic/components/header.css +572 -0
- data/support/editor-app/semantic/components/header.min.css +11 -0
- data/support/editor-app/semantic/components/icon.css +2127 -0
- data/support/editor-app/semantic/components/icon.min.css +11 -0
- data/support/editor-app/semantic/components/image.css +275 -0
- data/support/editor-app/semantic/components/image.min.css +11 -0
- data/support/editor-app/semantic/components/input.css +455 -0
- data/support/editor-app/semantic/components/input.min.css +11 -0
- data/support/editor-app/semantic/components/item.css +458 -0
- data/support/editor-app/semantic/components/item.min.css +11 -0
- data/support/editor-app/semantic/components/label.css +930 -0
- data/support/editor-app/semantic/components/label.min.css +11 -0
- data/support/editor-app/semantic/components/list.css +879 -0
- data/support/editor-app/semantic/components/list.min.css +11 -0
- data/support/editor-app/semantic/components/loader.css +279 -0
- data/support/editor-app/semantic/components/loader.min.css +11 -0
- data/support/editor-app/semantic/components/menu.css +1596 -0
- data/support/editor-app/semantic/components/menu.min.css +11 -0
- data/support/editor-app/semantic/components/message.css +422 -0
- data/support/editor-app/semantic/components/message.min.css +11 -0
- data/support/editor-app/semantic/components/modal.css +431 -0
- data/support/editor-app/semantic/components/modal.js +860 -0
- data/support/editor-app/semantic/components/modal.min.css +11 -0
- data/support/editor-app/semantic/components/modal.min.js +11 -0
- data/support/editor-app/semantic/components/nag.css +149 -0
- data/support/editor-app/semantic/components/nag.js +477 -0
- data/support/editor-app/semantic/components/nag.min.css +11 -0
- data/support/editor-app/semantic/components/nag.min.js +11 -0
- data/support/editor-app/semantic/components/popup.css +294 -0
- data/support/editor-app/semantic/components/popup.js +1187 -0
- data/support/editor-app/semantic/components/popup.min.css +11 -0
- data/support/editor-app/semantic/components/popup.min.js +11 -0
- data/support/editor-app/semantic/components/progress.css +449 -0
- data/support/editor-app/semantic/components/progress.js +785 -0
- data/support/editor-app/semantic/components/progress.min.css +11 -0
- data/support/editor-app/semantic/components/progress.min.js +11 -0
- data/support/editor-app/semantic/components/rail.css +125 -0
- data/support/editor-app/semantic/components/rail.min.css +11 -0
- data/support/editor-app/semantic/components/rating.css +262 -0
- data/support/editor-app/semantic/components/rating.js +451 -0
- data/support/editor-app/semantic/components/rating.min.css +11 -0
- data/support/editor-app/semantic/components/rating.min.js +11 -0
- data/support/editor-app/semantic/components/reset.css +430 -0
- data/support/editor-app/semantic/components/reset.min.css +11 -0
- data/support/editor-app/semantic/components/reveal.css +294 -0
- data/support/editor-app/semantic/components/reveal.min.css +11 -0
- data/support/editor-app/semantic/components/search.css +330 -0
- data/support/editor-app/semantic/components/search.js +1055 -0
- data/support/editor-app/semantic/components/search.min.css +11 -0
- data/support/editor-app/semantic/components/search.min.js +11 -0
- data/support/editor-app/semantic/components/segment.css +590 -0
- data/support/editor-app/semantic/components/segment.min.css +11 -0
- data/support/editor-app/semantic/components/shape.css +155 -0
- data/support/editor-app/semantic/components/shape.js +830 -0
- data/support/editor-app/semantic/components/shape.min.css +11 -0
- data/support/editor-app/semantic/components/shape.min.js +11 -0
- data/support/editor-app/semantic/components/sidebar.css +621 -0
- data/support/editor-app/semantic/components/sidebar.js +1084 -0
- data/support/editor-app/semantic/components/sidebar.min.css +11 -0
- data/support/editor-app/semantic/components/sidebar.min.js +11 -0
- data/support/editor-app/semantic/components/site.css +147 -0
- data/support/editor-app/semantic/components/site.js +487 -0
- data/support/editor-app/semantic/components/site.min.css +11 -0
- data/support/editor-app/semantic/components/site.min.js +11 -0
- data/support/editor-app/semantic/components/state.js +690 -0
- data/support/editor-app/semantic/components/state.min.js +11 -0
- data/support/editor-app/semantic/components/statistic.css +410 -0
- data/support/editor-app/semantic/components/statistic.min.css +11 -0
- data/support/editor-app/semantic/components/step.css +433 -0
- data/support/editor-app/semantic/components/step.min.css +11 -0
- data/support/editor-app/semantic/components/sticky.css +80 -0
- data/support/editor-app/semantic/components/sticky.js +775 -0
- data/support/editor-app/semantic/components/sticky.min.css +11 -0
- data/support/editor-app/semantic/components/sticky.min.js +11 -0
- data/support/editor-app/semantic/components/tab.css +93 -0
- data/support/editor-app/semantic/components/tab.js +787 -0
- data/support/editor-app/semantic/components/tab.min.css +11 -0
- data/support/editor-app/semantic/components/tab.min.js +11 -0
- data/support/editor-app/semantic/components/table.css +999 -0
- data/support/editor-app/semantic/components/table.min.css +11 -0
- data/support/editor-app/semantic/components/transition.css +2152 -0
- data/support/editor-app/semantic/components/transition.js +936 -0
- data/support/editor-app/semantic/components/transition.min.css +11 -0
- data/support/editor-app/semantic/components/transition.min.js +11 -0
- data/support/editor-app/semantic/components/video.css +126 -0
- data/support/editor-app/semantic/components/video.js +540 -0
- data/support/editor-app/semantic/components/video.min.css +11 -0
- data/support/editor-app/semantic/components/video.min.js +11 -0
- data/support/editor-app/semantic/components/visibility.js +970 -0
- data/support/editor-app/semantic/components/visibility.min.js +11 -0
- data/support/editor-app/semantic/semantic.css +31768 -0
- data/support/editor-app/semantic/semantic.js +18317 -0
- data/support/editor-app/semantic/semantic.min.css +11 -0
- data/support/editor-app/semantic/semantic.min.js +17 -0
- data/support/editor-app/semantic/themes/basic/assets/fonts/icons.eot +0 -0
- data/support/editor-app/semantic/themes/basic/assets/fonts/icons.svg +450 -0
- data/support/editor-app/semantic/themes/basic/assets/fonts/icons.ttf +0 -0
- data/support/editor-app/semantic/themes/basic/assets/fonts/icons.woff +0 -0
- data/support/editor-app/semantic/themes/default/assets/fonts/icons.eot +0 -0
- data/support/editor-app/semantic/themes/default/assets/fonts/icons.otf +0 -0
- data/support/editor-app/semantic/themes/default/assets/fonts/icons.svg +504 -0
- data/support/editor-app/semantic/themes/default/assets/fonts/icons.ttf +0 -0
- data/support/editor-app/semantic/themes/default/assets/fonts/icons.woff +0 -0
- data/support/editor-app/semantic/themes/default/assets/images/flags.png +0 -0
- data/support/editor-app/vendor/jquery.js +8829 -0
- data/support/library-server/Gemfile +0 -0
- data/support/library-server/config.ru +4 -0
- metadata +740 -7
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class Api
|
2
|
+
constructor: (options={})->
|
3
|
+
@base = options.base
|
4
|
+
@host = options.host
|
5
|
+
@cache = {}
|
6
|
+
|
7
|
+
get: (endpoint)->
|
8
|
+
$.get("http://localhost:8080/stylish/#{endpoint}")
|
9
|
+
|
10
|
+
browsePackages: (cb, bypass=false)->
|
11
|
+
packages = @cache.packages
|
12
|
+
|
13
|
+
if !bypass && packages
|
14
|
+
cb(packages)
|
15
|
+
return
|
16
|
+
|
17
|
+
@get("models/browse/packages").then (r)=>
|
18
|
+
@cache.packages = r
|
19
|
+
cb(r)
|
20
|
+
|
21
|
+
showPackage:(slug, cb, bypass=false)->
|
22
|
+
@cache.packageDetails ||= {}
|
23
|
+
existing = @cache.packageDetails[slug]
|
24
|
+
|
25
|
+
if existing && !bypass
|
26
|
+
cb(existing)
|
27
|
+
return
|
28
|
+
else
|
29
|
+
@get("models/show/packages/#{slug}").then (r)=>
|
30
|
+
@cache.packageDetails[slug] = r
|
31
|
+
cb(r)
|
32
|
+
|
33
|
+
module.exports = apis = {}
|
34
|
+
|
35
|
+
apis.stylish = new Api()
|
@@ -0,0 +1,58 @@
|
|
1
|
+
IS_MOBILE = typeof navigator == 'undefined' or navigator.userAgent.match(/Android/i) or navigator.userAgent.match(/webOS/i) or navigator.userAgent.match(/iPhone/i) or navigator.userAgent.match(/iPad/i) or navigator.userAgent.match(/iPod/i) or navigator.userAgent.match(/BlackBerry/i) or navigator.userAgent.match(/Windows Phone/i)
|
2
|
+
|
3
|
+
if !IS_MOBILE
|
4
|
+
CodeMirror = require('codemirror')
|
5
|
+
|
6
|
+
require "codemirror/keymap/sublime"
|
7
|
+
require "codemirror/keymap/vim"
|
8
|
+
|
9
|
+
require "codemirror/mode/css/css"
|
10
|
+
require "codemirror/mode/coffeescript/coffeescript"
|
11
|
+
require "codemirror/mode/gherkin/gherkin"
|
12
|
+
require "codemirror/mode/htmlmixed/htmlmixed"
|
13
|
+
require "codemirror/mode/haml/haml"
|
14
|
+
require "codemirror/mode/jade/jade"
|
15
|
+
require "codemirror/mode/ruby/ruby"
|
16
|
+
require "codemirror/mode/sass/sass"
|
17
|
+
require "codemirror/mode/slim/slim"
|
18
|
+
require "codemirror/mode/yaml/yaml"
|
19
|
+
require "codemirror/mode/markdown/markdown"
|
20
|
+
|
21
|
+
require "codemirror/theme/monokai.css"
|
22
|
+
require "codemirror/theme/eclipse.css"
|
23
|
+
require "codemirror/theme/twilight.css"
|
24
|
+
require "codemirror/theme/vibrant-ink.css"
|
25
|
+
|
26
|
+
CodeMirrorEditor = React.createClass(
|
27
|
+
displayName: "Editor"
|
28
|
+
|
29
|
+
propTypes:
|
30
|
+
value: React.PropTypes.string
|
31
|
+
defaultValue: React.PropTypes.string
|
32
|
+
style: React.PropTypes.object
|
33
|
+
className: React.PropTypes.string
|
34
|
+
onChange: React.PropTypes.func
|
35
|
+
|
36
|
+
componentDidMount: ->
|
37
|
+
@editor = CodeMirror.fromTextArea(@refs.editor.getDOMNode(), @props)
|
38
|
+
@editor.on 'change', @handleChange
|
39
|
+
|
40
|
+
handleChange: ->
|
41
|
+
|
42
|
+
render: ->
|
43
|
+
editor = React.createElement('textarea',
|
44
|
+
ref: 'editor'
|
45
|
+
value: @props.value
|
46
|
+
readOnly: @props.readOnly
|
47
|
+
defaultValue: @props.defaultValue
|
48
|
+
onChange: @props.onChange
|
49
|
+
style: @props.textAreaStyle
|
50
|
+
className: @props.textAreaClassName or @props.textAreaClass)
|
51
|
+
|
52
|
+
React.createElement 'div', {
|
53
|
+
style: @props.style
|
54
|
+
className: @props.className
|
55
|
+
}, editor
|
56
|
+
)
|
57
|
+
|
58
|
+
module.exports = CodeMirrorEditor
|
@@ -0,0 +1,9 @@
|
|
1
|
+
components = {}
|
2
|
+
|
3
|
+
components.Header = require "./header"
|
4
|
+
components.Sidebar = require "./sidebar"
|
5
|
+
components.Editor = require "./editor"
|
6
|
+
components.TiledGrid = require "./tiled_grid"
|
7
|
+
components.EditorDrawer = require "./tiled_grid"
|
8
|
+
|
9
|
+
module.exports = components
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
1
|
+
register "Sidebar"
|
2
|
+
|
3
|
+
helpers
|
4
|
+
mixins: [Router.State]
|
5
|
+
|
6
|
+
properties
|
7
|
+
launch: ".ui.launch.button"
|
8
|
+
element: ".ui.sidebar"
|
9
|
+
|
10
|
+
events
|
11
|
+
componentDidMount: ->
|
12
|
+
console.log "Sidebar Mounted"
|
13
|
+
$(@props.element).sidebar()
|
14
|
+
$(@props.launch).on "click", => $(@props.element).sidebar('toggle')
|
15
|
+
|
16
|
+
view ->
|
17
|
+
<div className="ui inverted vertical menu">
|
18
|
+
<a href="#" className="item">
|
19
|
+
<i className="home icon"></i>
|
20
|
+
Home
|
21
|
+
</a>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
module.exports = finished()
|
@@ -0,0 +1,35 @@
|
|
1
|
+
register "TiledGrid"
|
2
|
+
|
3
|
+
properties
|
4
|
+
perRow: 4
|
5
|
+
|
6
|
+
helpers
|
7
|
+
applyFormatter: (listOfChunks)->
|
8
|
+
formatter = @props.formatter
|
9
|
+
itemClass = @props.itemClass
|
10
|
+
|
11
|
+
buildColumn = (item, index)->
|
12
|
+
<div className="ui column #{itemClass}" key="column-#{index}">
|
13
|
+
{formatter(item)}
|
14
|
+
</div>
|
15
|
+
|
16
|
+
html = _(listOfChunks).map (group, index)->
|
17
|
+
<div className="ui row" key="row-#{index}">
|
18
|
+
{_(group).map(buildColumn)}
|
19
|
+
</div>
|
20
|
+
|
21
|
+
html
|
22
|
+
|
23
|
+
view ->
|
24
|
+
cx = React.addons.classSet
|
25
|
+
|
26
|
+
classes =
|
27
|
+
"ui tiled grid": true
|
28
|
+
|
29
|
+
classes["#{ util.wordsForNumber(@props.perRow) } columns"] = true
|
30
|
+
|
31
|
+
<div className={cx(classes)}>
|
32
|
+
{@applyFormatter(util.chunk(@props.items, @props.perRow))}
|
33
|
+
</div>
|
34
|
+
|
35
|
+
module.exports = finished()
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require "./styles/index.css.scss"
|
2
|
+
require "codemirror/lib/codemirror.css"
|
3
|
+
|
4
|
+
$ = require "jquery"
|
5
|
+
_ = require "underscore"
|
6
|
+
global = if typeof(window) isnt "undefined" then window else global
|
7
|
+
|
8
|
+
React = require("expose?React!react/addons")
|
9
|
+
global.Router = require "react-router-component"
|
10
|
+
|
11
|
+
Locations = Router.Locations
|
12
|
+
Location = Router.Location
|
13
|
+
|
14
|
+
global.util = require "./lib/util"
|
15
|
+
global.stylish = require("./apis").stylish
|
16
|
+
|
17
|
+
global.factory = React.createFactory
|
18
|
+
global.Link = Router.Link
|
19
|
+
|
20
|
+
definitions = require("./sugar").globalized()
|
21
|
+
registry = require("./registry").globalized().loaded()
|
22
|
+
|
23
|
+
{getComponent, getPage} = registry
|
24
|
+
|
25
|
+
HomePage = getPage("HomePage")
|
26
|
+
PackageDetailsPage = getPage("PackageDetailsPage")
|
27
|
+
Sidebar = getComponent("Sidebar")
|
28
|
+
|
29
|
+
Application = React.createClass
|
30
|
+
displayName: "Application"
|
31
|
+
|
32
|
+
getInitialState: ->
|
33
|
+
loaded: false
|
34
|
+
fullWidth: false
|
35
|
+
|
36
|
+
getContainerClasses: ->
|
37
|
+
cx
|
38
|
+
"full": true
|
39
|
+
"height": true
|
40
|
+
"container": !@requiresFullWidth()
|
41
|
+
|
42
|
+
requiresFullWidth: ->
|
43
|
+
@state.fullWidth is true
|
44
|
+
|
45
|
+
componentDidMount: ->
|
46
|
+
@setState(loaded: true)
|
47
|
+
@sidebar = React.render(<Sidebar />, el("sidebar"))
|
48
|
+
@setWidth()
|
49
|
+
|
50
|
+
onNavigation: ->
|
51
|
+
@setWidth()
|
52
|
+
$('#sidebar').sidebar('hide')
|
53
|
+
|
54
|
+
setWidth: ->
|
55
|
+
route = @getCurrentRoute()
|
56
|
+
|
57
|
+
if route && route.props.fullWidth?
|
58
|
+
@setState(fullWidth: route.props.fullWidth)
|
59
|
+
|
60
|
+
getSidebar: ->
|
61
|
+
@sidebar
|
62
|
+
|
63
|
+
getCurrentRoute: ->
|
64
|
+
_(@refs.router?.refs).values()[0]
|
65
|
+
|
66
|
+
isLoaded: ->
|
67
|
+
@state.loaded is true
|
68
|
+
|
69
|
+
render: ->
|
70
|
+
if @isLoaded() then @showApp() else @showLoadingIndicator()
|
71
|
+
|
72
|
+
showLoadingIndicator: ->
|
73
|
+
<div className="ui alert">Loading</div>
|
74
|
+
|
75
|
+
showApp: ->
|
76
|
+
<Locations ref="router" className={@getContainerClasses()} onNavigation={@onNavigation} onBeforeNavigation={@onBeforeNavigation} hash=true>
|
77
|
+
<Location ref="package_details" path="/packages/:slug" handler={PackageDetailsPage} />
|
78
|
+
<Location ref="home_page" path="/" handler={HomePage} />
|
79
|
+
</Locations>
|
80
|
+
|
81
|
+
$ ->
|
82
|
+
global.App = React.render(<Application />, document.getElementById('app'))
|
@@ -0,0 +1,48 @@
|
|
1
|
+
_ = require "underscore"
|
2
|
+
|
3
|
+
module.exports = util = {}
|
4
|
+
|
5
|
+
#_.extend(util, inflections: require("inflection"), string:require("underscore.string"))
|
6
|
+
|
7
|
+
util.chunk = (data, size)->
|
8
|
+
_.chain(data).groupBy((element, index)-> Math.floor(index/size)).toArray().value()
|
9
|
+
|
10
|
+
# util.classify = (string, forceSingular = true)->
|
11
|
+
# string = util.singularize(string) if forceSingular
|
12
|
+
# classified = util.string.capitalize(util.string.camelize(string))
|
13
|
+
# classified
|
14
|
+
|
15
|
+
# A safe way of arriving at a value from a string
|
16
|
+
# that does not use eval
|
17
|
+
#util.resolve = (string, root)->
|
18
|
+
# parts = string.split('.')
|
19
|
+
# _(parts).reduce (memo,part)->
|
20
|
+
# memo[part]
|
21
|
+
# , root
|
22
|
+
|
23
|
+
util.read = (value)->
|
24
|
+
if _.isFunction(value) then value() else value
|
25
|
+
|
26
|
+
util.wordsForNumber = (number)->
|
27
|
+
number = 0 if number is 0
|
28
|
+
number = number - 1 if number > 1
|
29
|
+
|
30
|
+
[
|
31
|
+
"one"
|
32
|
+
"two"
|
33
|
+
"three"
|
34
|
+
"four"
|
35
|
+
"five"
|
36
|
+
"six"
|
37
|
+
"seven"
|
38
|
+
"eight"
|
39
|
+
"nine"
|
40
|
+
"ten"
|
41
|
+
"eleven"
|
42
|
+
"twelve"
|
43
|
+
"thirteen"
|
44
|
+
"fourteen"
|
45
|
+
"fifteen"
|
46
|
+
"sixteen"
|
47
|
+
"seventeen"
|
48
|
+
][number]
|
@@ -0,0 +1,46 @@
|
|
1
|
+
stylish = require("../apis/index").stylish
|
2
|
+
|
3
|
+
TiledGrid = require("../components/tiled_grid")
|
4
|
+
|
5
|
+
page "HomePage"
|
6
|
+
|
7
|
+
helpers
|
8
|
+
showPackage: (pkg)->
|
9
|
+
<div className="ui card" key={pkg.slug}>
|
10
|
+
<Link href="/packages/#{ pkg.slug }">{pkg.name}</Link>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
state
|
14
|
+
loaded: false
|
15
|
+
packages: []
|
16
|
+
|
17
|
+
properties
|
18
|
+
fullWidth: false
|
19
|
+
|
20
|
+
helpers
|
21
|
+
isLoaded: ->
|
22
|
+
@state.loaded is true
|
23
|
+
|
24
|
+
events
|
25
|
+
componentDidMount: ->
|
26
|
+
@fetchStateFromApi() unless @isLoaded()
|
27
|
+
|
28
|
+
fetchStateFromApi: ->
|
29
|
+
page = @
|
30
|
+
|
31
|
+
stylish.browsePackages (response)->
|
32
|
+
page.setState(packages: response, loaded: true)
|
33
|
+
|
34
|
+
view ->
|
35
|
+
<div className="ui body">
|
36
|
+
<div className="ui header">
|
37
|
+
<h4>Stylish Packages</h4>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<TiledGrid perRow=4
|
41
|
+
items={@state.packages}
|
42
|
+
formatter={@showPackage}
|
43
|
+
itemClass="stylish-package" />
|
44
|
+
</div>
|
45
|
+
|
46
|
+
module.exports = finished()
|
@@ -0,0 +1,55 @@
|
|
1
|
+
page "PackageDetailsPage"
|
2
|
+
|
3
|
+
state
|
4
|
+
loaded: false
|
5
|
+
package: undefined
|
6
|
+
|
7
|
+
properties
|
8
|
+
fullWidth: false
|
9
|
+
|
10
|
+
events
|
11
|
+
componentDidMount: ->
|
12
|
+
@fetchStateFromApi() unless @isLoaded()
|
13
|
+
|
14
|
+
fetchStateFromApi: ->
|
15
|
+
page = @
|
16
|
+
slug = @props.slug
|
17
|
+
|
18
|
+
if slug? && _.isUndefined(@state.package)
|
19
|
+
stylish.showPackage slug, (pkg)->
|
20
|
+
page.setState(package: pkg, loaded: true)
|
21
|
+
|
22
|
+
helpers
|
23
|
+
isLoaded: ->
|
24
|
+
@state.loaded is true
|
25
|
+
|
26
|
+
getBody: ->
|
27
|
+
if @isLoaded() then @showDetails() else @loadingIndicator()
|
28
|
+
|
29
|
+
loadingIndicator: ->
|
30
|
+
<div className="ui loading indicator">Loading...</div>
|
31
|
+
|
32
|
+
showDetails: ->
|
33
|
+
pkg = @state.package
|
34
|
+
pkg.categories ||= []
|
35
|
+
|
36
|
+
<div className="ui package details">
|
37
|
+
<div className="ui header">
|
38
|
+
<h2>{pkg.name}</h2>
|
39
|
+
</div>
|
40
|
+
<div className="ui segment">
|
41
|
+
<div className="ui header">
|
42
|
+
<h4>Components</h4>
|
43
|
+
</div>
|
44
|
+
<div className="ui very relaxed list">
|
45
|
+
{React.createElement("div", key: item, className:"item", item) for item in pkg.categories}
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
view ->
|
51
|
+
<div className="ui page package-details">
|
52
|
+
{@getBody()}
|
53
|
+
</div>
|
54
|
+
|
55
|
+
module.exports = finished()
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module.exports = iface = {}
|
2
|
+
|
3
|
+
global = if typeof(window) isnt "undefined" then window else global
|
4
|
+
|
5
|
+
registry = {pages:{}, apis: {}, components: {}}
|
6
|
+
|
7
|
+
iface.loaded = ->
|
8
|
+
_.extend(registry.apis, require("./apis"))
|
9
|
+
_.extend(registry.pages, require("./pages"))
|
10
|
+
_.extend(registry.components, require("./components"))
|
11
|
+
iface
|
12
|
+
|
13
|
+
iface.setPage = (name, componentClass)->
|
14
|
+
registry.pages[name] = componentClass
|
15
|
+
|
16
|
+
iface.setComponent = (name, componentClass)->
|
17
|
+
registry.component[name] = componentClass
|
18
|
+
|
19
|
+
iface.setApi = (name, component)->
|
20
|
+
registry.apis[name] = component
|
21
|
+
|
22
|
+
iface.getPage = (identifier)->
|
23
|
+
registry.pages[identifier]
|
24
|
+
|
25
|
+
iface.getComponent = (identifier)->
|
26
|
+
registry.components[identifier]
|
27
|
+
|
28
|
+
iface.getApi = (identifier)->
|
29
|
+
registry.apis[identifier]
|
30
|
+
|
31
|
+
iface.globalized = ->
|
32
|
+
for prop, val of iface
|
33
|
+
global[prop] = iface[val]
|
34
|
+
|
35
|
+
iface
|