active_admin_pro 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.md +5 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/active_admin_pro.js +41 -0
- data/app/assets/javascripts/active_admin_pro/actions/new.js +8 -0
- data/app/assets/javascripts/active_admin_pro/actions/show.js +12 -0
- data/app/assets/javascripts/active_admin_pro/components/codemirror_input.js +92 -0
- data/app/assets/javascripts/active_admin_pro/components/flashes.js +9 -0
- data/app/assets/javascripts/active_admin_pro/components/link.js +23 -0
- data/app/assets/javascripts/active_admin_pro/components/phone_input.js +52 -0
- data/app/assets/javascripts/active_admin_pro/components/select_input.js +31 -0
- data/app/assets/javascripts/active_admin_pro/components/sortable_handle.js +8 -0
- data/app/assets/javascripts/active_admin_pro/components/summernote_input.js +132 -0
- data/app/assets/javascripts/active_admin_pro/components/text_input.js +47 -0
- data/app/assets/javascripts/active_admin_pro/components/time_zone_input.js +51 -0
- data/app/assets/javascripts/active_admin_pro/components/title_to_slug.js +16 -0
- data/app/assets/stylesheets/active_admin_pro.scss +20 -0
- data/app/assets/stylesheets/active_admin_pro/breakpoints.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/components/_input_variables.scss +9 -0
- data/app/assets/stylesheets/active_admin_pro/components/actions.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/components/boolean_input.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/components/button.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/components/check_boxes_input.scss +38 -0
- data/app/assets/stylesheets/active_admin_pro/components/codemirror_input.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/components/comments.scss +17 -0
- data/app/assets/stylesheets/active_admin_pro/components/datepicker.scss +108 -0
- data/app/assets/stylesheets/active_admin_pro/components/dialog.scss +66 -0
- data/app/assets/stylesheets/active_admin_pro/components/dropdown_menu_button.scss +40 -0
- data/app/assets/stylesheets/active_admin_pro/components/fieldset.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/components/file_input.scss +27 -0
- data/app/assets/stylesheets/active_admin_pro/components/has_many_fields.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/components/inline_errors.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/components/link.scss +16 -0
- data/app/assets/stylesheets/active_admin_pro/components/panel.scss +62 -0
- data/app/assets/stylesheets/active_admin_pro/components/phone_input.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/components/radio_input.scss +38 -0
- data/app/assets/stylesheets/active_admin_pro/components/segmented_control.scss +41 -0
- data/app/assets/stylesheets/active_admin_pro/components/select_input.scss +42 -0
- data/app/assets/stylesheets/active_admin_pro/components/sortable_handle.scss +21 -0
- data/app/assets/stylesheets/active_admin_pro/components/string_input.scss +85 -0
- data/app/assets/stylesheets/active_admin_pro/components/summernote_input.scss +190 -0
- data/app/assets/stylesheets/active_admin_pro/components/table.scss +100 -0
- data/app/assets/stylesheets/active_admin_pro/components/text_input.scss +55 -0
- data/app/assets/stylesheets/active_admin_pro/functions/color.scss +130 -0
- data/app/assets/stylesheets/active_admin_pro/functions/text-color.scss +35 -0
- data/app/assets/stylesheets/active_admin_pro/layout/actions/comments.scss +14 -0
- data/app/assets/stylesheets/active_admin_pro/layout/actions/index.scss +88 -0
- data/app/assets/stylesheets/active_admin_pro/layout/actions/show.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/layout/body.scss +60 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/action_items.scss +32 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/actions/comments.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/active_admin_content.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/breadcrumbs.scss +57 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/navigation.scss +197 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/sidebar.scss +5 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/title_bar.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/layout/desktop/wrapper.scss +5 -0
- data/app/assets/stylesheets/active_admin_pro/layout/filters.scss +41 -0
- data/app/assets/stylesheets/active_admin_pro/layout/flashes.scss +52 -0
- data/app/assets/stylesheets/active_admin_pro/layout/footer.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/layout/mobile/actions/index.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/dashboard.scss +105 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/index.scss +20 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/actions/show.scss +78 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/active_admin_content.scss +9 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/flashes.scss +5 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/navigation.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/layout/tablet/title_bar.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/mixins/button.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/variables.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon.scss +87 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-color.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-radius.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-style.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_border-width.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_buttons.scss +64 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_clearfix.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_ellipsis.scss +30 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_font-stacks.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_hide-text.scss +27 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_margin.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_padding.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_position.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss +66 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_retina-image.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_size.scss +51 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_text-inputs.scss +113 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_timing-functions.scss +34 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_triangle.scss +63 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_word-wrap.scss +29 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_animation.scss +43 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_appearance.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_backface-visibility.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_background-image.scss +42 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_background.scss +55 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_border-image.scss +59 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_calc.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_columns.scss +47 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_filter.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_flex-box.scss +287 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_font-face.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_font-feature-settings.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_hidpi-media-query.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_hyphens.scss +4 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_image-rendering.scss +14 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_keyframes.scss +36 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_linear-gradient.scss +38 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_perspective.scss +8 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_placeholder.scss +8 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_radial-gradient.scss +39 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_selection.scss +42 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_text-decoration.scss +19 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_transform.scss +15 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_transition.scss +71 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/css3/_user-select.scss +3 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_assign-inputs.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_contains-falsy.scss +20 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_contains.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-length.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-light.scss +21 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-number.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_is-size.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_modular-scale.scss +69 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_px-to-em.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_px-to-rem.scss +15 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_shade.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_strip-units.scss +17 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_tint.scss +24 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_transition-property-name.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/functions/_unpack.scss +27 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_convert-units.scss +21 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_directional-values.scss +96 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_font-source-declaration.scss +43 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_gradient-positions-parser.scss +13 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-angle-parser.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-gradient-parser.scss +41 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-positions-parser.scss +61 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-arg-parser.scss +69 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-gradient-parser.scss +50 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_radial-positions-parser.scss +18 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_render-gradients.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_shape-size-stripper.scss +10 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/helpers/_str-to-num.scss +50 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_asset-pipeline.scss +7 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_prefixer.scss +9 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/bourbon/settings/_px-to-em.scss +1 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/_neat-helpers.scss +8 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/functions/_new-breakpoint.scss +49 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/functions/_private.scss +108 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_box-sizing.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_direction-context.scss +31 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_display-context.scss +26 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_fill-parent.scss +22 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_media.scss +92 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_omega.scss +91 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_outer-container.scss +36 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_pad.scss +23 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_private.scss +35 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_row.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_shift.scss +48 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_span-columns.scss +90 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_to-deprecate.scss +105 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/grid/_visual-grid.scss +40 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_disable-warnings.scss +11 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_grid.scss +53 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/neat/settings/_visual-grid.scss +25 -0
- data/app/assets/stylesheets/active_admin_pro/vendor/normalize.css +423 -0
- data/app/assets/stylesheets/codemirror/themes/activeadmin_pro.scss +117 -0
- data/app/inputs/codemirror_input.rb +27 -0
- data/app/inputs/datepicker_input.rb +16 -0
- data/app/inputs/phone_input.rb +5 -0
- data/app/inputs/summernote_input.rb +5 -0
- data/app/inputs/time_zone_input.rb +43 -0
- data/app/models/activeadmin_pro/summernote_image.rb +5 -0
- data/config/initializers/active_admin.rb +50 -0
- data/config/locales/en.yml +55 -0
- data/lib/active_admin_pro/admin_user/admin_user.rb +52 -0
- data/lib/active_admin_pro/engine.rb +8 -0
- data/lib/active_admin_pro/summernote_image/summernote_image.rb +61 -0
- data/lib/active_admin_pro/user/user.rb +53 -0
- data/lib/active_admin_pro/version.rb +3 -0
- data/lib/activeadmin_pro.rb +9 -0
- data/lib/generators/activeadmin_pro/install_generator.rb +14 -0
- data/lib/tasks/activeadmin_pro_tasks.rake +4 -0
- data/spec/spec_helper.rb +34 -0
- data/vendor/assets/javascripts/bootstrap.js +1243 -0
- data/vendor/assets/javascripts/codemirror.js +8887 -0
- data/vendor/assets/javascripts/codemirror/addons/comment/comment.js +183 -0
- data/vendor/assets/javascripts/codemirror/addons/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/codemirror/addons/dialog/dialog.css +32 -0
- data/vendor/assets/javascripts/codemirror/addons/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/codemirror/addons/display/autorefresh.js +47 -0
- data/vendor/assets/javascripts/codemirror/addons/display/fullscreen.css +6 -0
- data/vendor/assets/javascripts/codemirror/addons/display/fullscreen.js +41 -0
- data/vendor/assets/javascripts/codemirror/addons/display/panel.js +112 -0
- data/vendor/assets/javascripts/codemirror/addons/display/placeholder.js +60 -0
- data/vendor/assets/javascripts/codemirror/addons/display/rulers.js +63 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/closebrackets.js +195 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/matchbrackets.js +120 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/comment-fold.js +57 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/foldcode.js +149 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/foldgutter.css +20 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/javascript-hint.js +146 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.css +38 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.js +386 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/sql-hint.js +254 -0
- data/vendor/assets/javascripts/codemirror/addons/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/coffeescript-lint.js +41 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/css-lint.js +35 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/html-lint.js +46 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/javascript-lint.js +136 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/json-lint.js +31 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/lint.css +73 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/lint.js +231 -0
- data/vendor/assets/javascripts/codemirror/addons/lint/yaml-lint.js +28 -0
- data/vendor/assets/javascripts/codemirror/addons/merge/merge.css +112 -0
- data/vendor/assets/javascripts/codemirror/addons/merge/merge.js +775 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/multiplex_test.js +33 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/codemirror/addons/mode/simple.js +213 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/colorize.js +40 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/runmode-standalone.js +157 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.js +72 -0
- data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.node.js +178 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/annotatescrollbar.js +115 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/scrollpastend.js +46 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/simplescrollbars.css +66 -0
- data/vendor/assets/javascripts/codemirror/addons/scroll/simplescrollbars.js +147 -0
- data/vendor/assets/javascripts/codemirror/addons/search/match-highlighter.js +128 -0
- data/vendor/assets/javascripts/codemirror/addons/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/javascripts/codemirror/addons/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/codemirror/addons/search/search.js +228 -0
- data/vendor/assets/javascripts/codemirror/addons/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/codemirror/addons/selection/active-line.js +71 -0
- data/vendor/assets/javascripts/codemirror/addons/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/codemirror/addons/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/codemirror/addons/tern/tern.css +87 -0
- data/vendor/assets/javascripts/codemirror/addons/tern/tern.js +700 -0
- data/vendor/assets/javascripts/codemirror/addons/tern/worker.js +44 -0
- data/vendor/assets/javascripts/codemirror/addons/wrap/hardwrap.js +139 -0
- data/vendor/assets/javascripts/codemirror/modes/coffeescript.js +366 -0
- data/vendor/assets/javascripts/codemirror/modes/css.js +823 -0
- data/vendor/assets/javascripts/codemirror/modes/diff.js +47 -0
- data/vendor/assets/javascripts/codemirror/modes/dockerfile.js +79 -0
- data/vendor/assets/javascripts/codemirror/modes/gfm.js +130 -0
- data/vendor/assets/javascripts/codemirror/modes/go.js +185 -0
- data/vendor/assets/javascripts/codemirror/modes/haml.js +159 -0
- data/vendor/assets/javascripts/codemirror/modes/handlebars.js +53 -0
- data/vendor/assets/javascripts/codemirror/modes/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +150 -0
- data/vendor/assets/javascripts/codemirror/modes/javascript.js +708 -0
- data/vendor/assets/javascripts/codemirror/modes/markdown.js +792 -0
- data/vendor/assets/javascripts/codemirror/modes/nginx.js +178 -0
- data/vendor/assets/javascripts/codemirror/modes/php.js +234 -0
- data/vendor/assets/javascripts/codemirror/modes/python.js +358 -0
- data/vendor/assets/javascripts/codemirror/modes/ruby.js +285 -0
- data/vendor/assets/javascripts/codemirror/modes/rust.js +58 -0
- data/vendor/assets/javascripts/codemirror/modes/sass.js +414 -0
- data/vendor/assets/javascripts/codemirror/modes/shell.js +139 -0
- data/vendor/assets/javascripts/codemirror/modes/xml.js +385 -0
- data/vendor/assets/javascripts/codemirror/modes/yaml.js +117 -0
- data/vendor/assets/javascripts/intl-tel-input.js +963 -0
- data/vendor/assets/javascripts/intl-tel-utils.js +480 -0
- data/vendor/assets/javascripts/slug.js +212 -0
- data/vendor/assets/javascripts/summernote.js +6939 -0
- data/vendor/assets/stylesheets/codemirror.css +334 -0
- data/vendor/assets/stylesheets/codemirror/themes/base16-dark.css +38 -0
- data/vendor/assets/stylesheets/codemirror/themes/base16-light.css +38 -0
- data/vendor/assets/stylesheets/codemirror/themes/dracula.css +41 -0
- data/vendor/assets/stylesheets/codemirror/themes/material.css +53 -0
- data/vendor/assets/stylesheets/codemirror/themes/monokai.css +35 -0
- data/vendor/assets/stylesheets/codemirror/themes/solarized.css +163 -0
- data/vendor/assets/stylesheets/codemirror/themes/vibrant-ink.css +34 -0
- data/vendor/assets/stylesheets/intl-tel-input.scss +1054 -0
- data/vendor/assets/stylesheets/summernote-bs3.css +5425 -0
- data/vendor/assets/stylesheets/summernote.css +1 -0
- metadata +604 -0
@@ -0,0 +1,823 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
CodeMirror.defineMode("css", function(config, parserConfig) {
|
15
|
+
var provided = parserConfig;
|
16
|
+
if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
|
17
|
+
parserConfig.inline = provided.inline;
|
18
|
+
|
19
|
+
var indentUnit = config.indentUnit,
|
20
|
+
tokenHooks = parserConfig.tokenHooks,
|
21
|
+
documentTypes = parserConfig.documentTypes || {},
|
22
|
+
mediaTypes = parserConfig.mediaTypes || {},
|
23
|
+
mediaFeatures = parserConfig.mediaFeatures || {},
|
24
|
+
mediaValueKeywords = parserConfig.mediaValueKeywords || {},
|
25
|
+
propertyKeywords = parserConfig.propertyKeywords || {},
|
26
|
+
nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
|
27
|
+
fontProperties = parserConfig.fontProperties || {},
|
28
|
+
counterDescriptors = parserConfig.counterDescriptors || {},
|
29
|
+
colorKeywords = parserConfig.colorKeywords || {},
|
30
|
+
valueKeywords = parserConfig.valueKeywords || {},
|
31
|
+
allowNested = parserConfig.allowNested,
|
32
|
+
supportsAtComponent = parserConfig.supportsAtComponent === true;
|
33
|
+
|
34
|
+
var type, override;
|
35
|
+
function ret(style, tp) { type = tp; return style; }
|
36
|
+
|
37
|
+
// Tokenizers
|
38
|
+
|
39
|
+
function tokenBase(stream, state) {
|
40
|
+
var ch = stream.next();
|
41
|
+
if (tokenHooks[ch]) {
|
42
|
+
var result = tokenHooks[ch](stream, state);
|
43
|
+
if (result !== false) return result;
|
44
|
+
}
|
45
|
+
if (ch == "@") {
|
46
|
+
stream.eatWhile(/[\w\\\-]/);
|
47
|
+
return ret("def", stream.current());
|
48
|
+
} else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
|
49
|
+
return ret(null, "compare");
|
50
|
+
} else if (ch == "\"" || ch == "'") {
|
51
|
+
state.tokenize = tokenString(ch);
|
52
|
+
return state.tokenize(stream, state);
|
53
|
+
} else if (ch == "#") {
|
54
|
+
stream.eatWhile(/[\w\\\-]/);
|
55
|
+
return ret("atom", "hash");
|
56
|
+
} else if (ch == "!") {
|
57
|
+
stream.match(/^\s*\w*/);
|
58
|
+
return ret("keyword", "important");
|
59
|
+
} else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
|
60
|
+
stream.eatWhile(/[\w.%]/);
|
61
|
+
return ret("number", "unit");
|
62
|
+
} else if (ch === "-") {
|
63
|
+
if (/[\d.]/.test(stream.peek())) {
|
64
|
+
stream.eatWhile(/[\w.%]/);
|
65
|
+
return ret("number", "unit");
|
66
|
+
} else if (stream.match(/^-[\w\\\-]+/)) {
|
67
|
+
stream.eatWhile(/[\w\\\-]/);
|
68
|
+
if (stream.match(/^\s*:/, false))
|
69
|
+
return ret("variable-2", "variable-definition");
|
70
|
+
return ret("variable-2", "variable");
|
71
|
+
} else if (stream.match(/^\w+-/)) {
|
72
|
+
return ret("meta", "meta");
|
73
|
+
}
|
74
|
+
} else if (/[,+>*\/]/.test(ch)) {
|
75
|
+
return ret(null, "select-op");
|
76
|
+
} else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
|
77
|
+
return ret("qualifier", "qualifier");
|
78
|
+
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
|
79
|
+
return ret(null, ch);
|
80
|
+
} else if ((ch == "u" && stream.match(/rl(-prefix)?\(/)) ||
|
81
|
+
(ch == "d" && stream.match("omain(")) ||
|
82
|
+
(ch == "r" && stream.match("egexp("))) {
|
83
|
+
stream.backUp(1);
|
84
|
+
state.tokenize = tokenParenthesized;
|
85
|
+
return ret("property", "word");
|
86
|
+
} else if (/[\w\\\-]/.test(ch)) {
|
87
|
+
stream.eatWhile(/[\w\\\-]/);
|
88
|
+
return ret("property", "word");
|
89
|
+
} else {
|
90
|
+
return ret(null, null);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
function tokenString(quote) {
|
95
|
+
return function(stream, state) {
|
96
|
+
var escaped = false, ch;
|
97
|
+
while ((ch = stream.next()) != null) {
|
98
|
+
if (ch == quote && !escaped) {
|
99
|
+
if (quote == ")") stream.backUp(1);
|
100
|
+
break;
|
101
|
+
}
|
102
|
+
escaped = !escaped && ch == "\\";
|
103
|
+
}
|
104
|
+
if (ch == quote || !escaped && quote != ")") state.tokenize = null;
|
105
|
+
return ret("string", "string");
|
106
|
+
};
|
107
|
+
}
|
108
|
+
|
109
|
+
function tokenParenthesized(stream, state) {
|
110
|
+
stream.next(); // Must be '('
|
111
|
+
if (!stream.match(/\s*[\"\')]/, false))
|
112
|
+
state.tokenize = tokenString(")");
|
113
|
+
else
|
114
|
+
state.tokenize = null;
|
115
|
+
return ret(null, "(");
|
116
|
+
}
|
117
|
+
|
118
|
+
// Context management
|
119
|
+
|
120
|
+
function Context(type, indent, prev) {
|
121
|
+
this.type = type;
|
122
|
+
this.indent = indent;
|
123
|
+
this.prev = prev;
|
124
|
+
}
|
125
|
+
|
126
|
+
function pushContext(state, stream, type, indent) {
|
127
|
+
state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
|
128
|
+
return type;
|
129
|
+
}
|
130
|
+
|
131
|
+
function popContext(state) {
|
132
|
+
if (state.context.prev)
|
133
|
+
state.context = state.context.prev;
|
134
|
+
return state.context.type;
|
135
|
+
}
|
136
|
+
|
137
|
+
function pass(type, stream, state) {
|
138
|
+
return states[state.context.type](type, stream, state);
|
139
|
+
}
|
140
|
+
function popAndPass(type, stream, state, n) {
|
141
|
+
for (var i = n || 1; i > 0; i--)
|
142
|
+
state.context = state.context.prev;
|
143
|
+
return pass(type, stream, state);
|
144
|
+
}
|
145
|
+
|
146
|
+
// Parser
|
147
|
+
|
148
|
+
function wordAsValue(stream) {
|
149
|
+
var word = stream.current().toLowerCase();
|
150
|
+
if (valueKeywords.hasOwnProperty(word))
|
151
|
+
override = "atom";
|
152
|
+
else if (colorKeywords.hasOwnProperty(word))
|
153
|
+
override = "keyword";
|
154
|
+
else
|
155
|
+
override = "variable";
|
156
|
+
}
|
157
|
+
|
158
|
+
var states = {};
|
159
|
+
|
160
|
+
states.top = function(type, stream, state) {
|
161
|
+
if (type == "{") {
|
162
|
+
return pushContext(state, stream, "block");
|
163
|
+
} else if (type == "}" && state.context.prev) {
|
164
|
+
return popContext(state);
|
165
|
+
} else if (supportsAtComponent && /@component/.test(type)) {
|
166
|
+
return pushContext(state, stream, "atComponentBlock");
|
167
|
+
} else if (/^@(-moz-)?document$/.test(type)) {
|
168
|
+
return pushContext(state, stream, "documentTypes");
|
169
|
+
} else if (/^@(media|supports|(-moz-)?document|import)$/.test(type)) {
|
170
|
+
return pushContext(state, stream, "atBlock");
|
171
|
+
} else if (/^@(font-face|counter-style)/.test(type)) {
|
172
|
+
state.stateArg = type;
|
173
|
+
return "restricted_atBlock_before";
|
174
|
+
} else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) {
|
175
|
+
return "keyframes";
|
176
|
+
} else if (type && type.charAt(0) == "@") {
|
177
|
+
return pushContext(state, stream, "at");
|
178
|
+
} else if (type == "hash") {
|
179
|
+
override = "builtin";
|
180
|
+
} else if (type == "word") {
|
181
|
+
override = "tag";
|
182
|
+
} else if (type == "variable-definition") {
|
183
|
+
return "maybeprop";
|
184
|
+
} else if (type == "interpolation") {
|
185
|
+
return pushContext(state, stream, "interpolation");
|
186
|
+
} else if (type == ":") {
|
187
|
+
return "pseudo";
|
188
|
+
} else if (allowNested && type == "(") {
|
189
|
+
return pushContext(state, stream, "parens");
|
190
|
+
}
|
191
|
+
return state.context.type;
|
192
|
+
};
|
193
|
+
|
194
|
+
states.block = function(type, stream, state) {
|
195
|
+
if (type == "word") {
|
196
|
+
var word = stream.current().toLowerCase();
|
197
|
+
if (propertyKeywords.hasOwnProperty(word)) {
|
198
|
+
override = "property";
|
199
|
+
return "maybeprop";
|
200
|
+
} else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
|
201
|
+
override = "string-2";
|
202
|
+
return "maybeprop";
|
203
|
+
} else if (allowNested) {
|
204
|
+
override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
|
205
|
+
return "block";
|
206
|
+
} else {
|
207
|
+
override += " error";
|
208
|
+
return "maybeprop";
|
209
|
+
}
|
210
|
+
} else if (type == "meta") {
|
211
|
+
return "block";
|
212
|
+
} else if (!allowNested && (type == "hash" || type == "qualifier")) {
|
213
|
+
override = "error";
|
214
|
+
return "block";
|
215
|
+
} else {
|
216
|
+
return states.top(type, stream, state);
|
217
|
+
}
|
218
|
+
};
|
219
|
+
|
220
|
+
states.maybeprop = function(type, stream, state) {
|
221
|
+
if (type == ":") return pushContext(state, stream, "prop");
|
222
|
+
return pass(type, stream, state);
|
223
|
+
};
|
224
|
+
|
225
|
+
states.prop = function(type, stream, state) {
|
226
|
+
if (type == ";") return popContext(state);
|
227
|
+
if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
|
228
|
+
if (type == "}" || type == "{") return popAndPass(type, stream, state);
|
229
|
+
if (type == "(") return pushContext(state, stream, "parens");
|
230
|
+
|
231
|
+
if (type == "hash" && !/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())) {
|
232
|
+
override += " error";
|
233
|
+
} else if (type == "word") {
|
234
|
+
wordAsValue(stream);
|
235
|
+
} else if (type == "interpolation") {
|
236
|
+
return pushContext(state, stream, "interpolation");
|
237
|
+
}
|
238
|
+
return "prop";
|
239
|
+
};
|
240
|
+
|
241
|
+
states.propBlock = function(type, _stream, state) {
|
242
|
+
if (type == "}") return popContext(state);
|
243
|
+
if (type == "word") { override = "property"; return "maybeprop"; }
|
244
|
+
return state.context.type;
|
245
|
+
};
|
246
|
+
|
247
|
+
states.parens = function(type, stream, state) {
|
248
|
+
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
249
|
+
if (type == ")") return popContext(state);
|
250
|
+
if (type == "(") return pushContext(state, stream, "parens");
|
251
|
+
if (type == "interpolation") return pushContext(state, stream, "interpolation");
|
252
|
+
if (type == "word") wordAsValue(stream);
|
253
|
+
return "parens";
|
254
|
+
};
|
255
|
+
|
256
|
+
states.pseudo = function(type, stream, state) {
|
257
|
+
if (type == "word") {
|
258
|
+
override = "variable-3";
|
259
|
+
return state.context.type;
|
260
|
+
}
|
261
|
+
return pass(type, stream, state);
|
262
|
+
};
|
263
|
+
|
264
|
+
states.documentTypes = function(type, stream, state) {
|
265
|
+
if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
|
266
|
+
override = "tag";
|
267
|
+
return state.context.type;
|
268
|
+
} else {
|
269
|
+
return states.atBlock(type, stream, state);
|
270
|
+
}
|
271
|
+
};
|
272
|
+
|
273
|
+
states.atBlock = function(type, stream, state) {
|
274
|
+
if (type == "(") return pushContext(state, stream, "atBlock_parens");
|
275
|
+
if (type == "}" || type == ";") return popAndPass(type, stream, state);
|
276
|
+
if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
|
277
|
+
|
278
|
+
if (type == "word") {
|
279
|
+
var word = stream.current().toLowerCase();
|
280
|
+
if (word == "only" || word == "not" || word == "and" || word == "or")
|
281
|
+
override = "keyword";
|
282
|
+
else if (mediaTypes.hasOwnProperty(word))
|
283
|
+
override = "attribute";
|
284
|
+
else if (mediaFeatures.hasOwnProperty(word))
|
285
|
+
override = "property";
|
286
|
+
else if (mediaValueKeywords.hasOwnProperty(word))
|
287
|
+
override = "keyword";
|
288
|
+
else if (propertyKeywords.hasOwnProperty(word))
|
289
|
+
override = "property";
|
290
|
+
else if (nonStandardPropertyKeywords.hasOwnProperty(word))
|
291
|
+
override = "string-2";
|
292
|
+
else if (valueKeywords.hasOwnProperty(word))
|
293
|
+
override = "atom";
|
294
|
+
else if (colorKeywords.hasOwnProperty(word))
|
295
|
+
override = "keyword";
|
296
|
+
else
|
297
|
+
override = "error";
|
298
|
+
}
|
299
|
+
return state.context.type;
|
300
|
+
};
|
301
|
+
|
302
|
+
states.atComponentBlock = function(type, stream, state) {
|
303
|
+
if (type == "}")
|
304
|
+
return popAndPass(type, stream, state);
|
305
|
+
if (type == "{")
|
306
|
+
return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
|
307
|
+
if (type == "word")
|
308
|
+
override = "error";
|
309
|
+
return state.context.type;
|
310
|
+
};
|
311
|
+
|
312
|
+
states.atBlock_parens = function(type, stream, state) {
|
313
|
+
if (type == ")") return popContext(state);
|
314
|
+
if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
|
315
|
+
return states.atBlock(type, stream, state);
|
316
|
+
};
|
317
|
+
|
318
|
+
states.restricted_atBlock_before = function(type, stream, state) {
|
319
|
+
if (type == "{")
|
320
|
+
return pushContext(state, stream, "restricted_atBlock");
|
321
|
+
if (type == "word" && state.stateArg == "@counter-style") {
|
322
|
+
override = "variable";
|
323
|
+
return "restricted_atBlock_before";
|
324
|
+
}
|
325
|
+
return pass(type, stream, state);
|
326
|
+
};
|
327
|
+
|
328
|
+
states.restricted_atBlock = function(type, stream, state) {
|
329
|
+
if (type == "}") {
|
330
|
+
state.stateArg = null;
|
331
|
+
return popContext(state);
|
332
|
+
}
|
333
|
+
if (type == "word") {
|
334
|
+
if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
|
335
|
+
(state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
|
336
|
+
override = "error";
|
337
|
+
else
|
338
|
+
override = "property";
|
339
|
+
return "maybeprop";
|
340
|
+
}
|
341
|
+
return "restricted_atBlock";
|
342
|
+
};
|
343
|
+
|
344
|
+
states.keyframes = function(type, stream, state) {
|
345
|
+
if (type == "word") { override = "variable"; return "keyframes"; }
|
346
|
+
if (type == "{") return pushContext(state, stream, "top");
|
347
|
+
return pass(type, stream, state);
|
348
|
+
};
|
349
|
+
|
350
|
+
states.at = function(type, stream, state) {
|
351
|
+
if (type == ";") return popContext(state);
|
352
|
+
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
353
|
+
if (type == "word") override = "tag";
|
354
|
+
else if (type == "hash") override = "builtin";
|
355
|
+
return "at";
|
356
|
+
};
|
357
|
+
|
358
|
+
states.interpolation = function(type, stream, state) {
|
359
|
+
if (type == "}") return popContext(state);
|
360
|
+
if (type == "{" || type == ";") return popAndPass(type, stream, state);
|
361
|
+
if (type == "word") override = "variable";
|
362
|
+
else if (type != "variable" && type != "(" && type != ")") override = "error";
|
363
|
+
return "interpolation";
|
364
|
+
};
|
365
|
+
|
366
|
+
return {
|
367
|
+
startState: function(base) {
|
368
|
+
return {tokenize: null,
|
369
|
+
state: parserConfig.inline ? "block" : "top",
|
370
|
+
stateArg: null,
|
371
|
+
context: new Context(parserConfig.inline ? "block" : "top", base || 0, null)};
|
372
|
+
},
|
373
|
+
|
374
|
+
token: function(stream, state) {
|
375
|
+
if (!state.tokenize && stream.eatSpace()) return null;
|
376
|
+
var style = (state.tokenize || tokenBase)(stream, state);
|
377
|
+
if (style && typeof style == "object") {
|
378
|
+
type = style[1];
|
379
|
+
style = style[0];
|
380
|
+
}
|
381
|
+
override = style;
|
382
|
+
state.state = states[state.state](type, stream, state);
|
383
|
+
return override;
|
384
|
+
},
|
385
|
+
|
386
|
+
indent: function(state, textAfter) {
|
387
|
+
var cx = state.context, ch = textAfter && textAfter.charAt(0);
|
388
|
+
var indent = cx.indent;
|
389
|
+
if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
|
390
|
+
if (cx.prev) {
|
391
|
+
if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
|
392
|
+
cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
|
393
|
+
// Resume indentation from parent context.
|
394
|
+
cx = cx.prev;
|
395
|
+
indent = cx.indent;
|
396
|
+
} else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
|
397
|
+
ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
|
398
|
+
// Dedent relative to current context.
|
399
|
+
indent = Math.max(0, cx.indent - indentUnit);
|
400
|
+
cx = cx.prev;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
return indent;
|
404
|
+
},
|
405
|
+
|
406
|
+
electricChars: "}",
|
407
|
+
blockCommentStart: "/*",
|
408
|
+
blockCommentEnd: "*/",
|
409
|
+
fold: "brace"
|
410
|
+
};
|
411
|
+
});
|
412
|
+
|
413
|
+
function keySet(array) {
|
414
|
+
var keys = {};
|
415
|
+
for (var i = 0; i < array.length; ++i) {
|
416
|
+
keys[array[i]] = true;
|
417
|
+
}
|
418
|
+
return keys;
|
419
|
+
}
|
420
|
+
|
421
|
+
var documentTypes_ = [
|
422
|
+
"domain", "regexp", "url", "url-prefix"
|
423
|
+
], documentTypes = keySet(documentTypes_);
|
424
|
+
|
425
|
+
var mediaTypes_ = [
|
426
|
+
"all", "aural", "braille", "handheld", "print", "projection", "screen",
|
427
|
+
"tty", "tv", "embossed"
|
428
|
+
], mediaTypes = keySet(mediaTypes_);
|
429
|
+
|
430
|
+
var mediaFeatures_ = [
|
431
|
+
"width", "min-width", "max-width", "height", "min-height", "max-height",
|
432
|
+
"device-width", "min-device-width", "max-device-width", "device-height",
|
433
|
+
"min-device-height", "max-device-height", "aspect-ratio",
|
434
|
+
"min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
|
435
|
+
"min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
|
436
|
+
"max-color", "color-index", "min-color-index", "max-color-index",
|
437
|
+
"monochrome", "min-monochrome", "max-monochrome", "resolution",
|
438
|
+
"min-resolution", "max-resolution", "scan", "grid", "orientation",
|
439
|
+
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
|
440
|
+
"pointer", "any-pointer", "hover", "any-hover"
|
441
|
+
], mediaFeatures = keySet(mediaFeatures_);
|
442
|
+
|
443
|
+
var mediaValueKeywords_ = [
|
444
|
+
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
|
445
|
+
"interlace", "progressive"
|
446
|
+
], mediaValueKeywords = keySet(mediaValueKeywords_);
|
447
|
+
|
448
|
+
var propertyKeywords_ = [
|
449
|
+
"align-content", "align-items", "align-self", "alignment-adjust",
|
450
|
+
"alignment-baseline", "anchor-point", "animation", "animation-delay",
|
451
|
+
"animation-direction", "animation-duration", "animation-fill-mode",
|
452
|
+
"animation-iteration-count", "animation-name", "animation-play-state",
|
453
|
+
"animation-timing-function", "appearance", "azimuth", "backface-visibility",
|
454
|
+
"background", "background-attachment", "background-clip", "background-color",
|
455
|
+
"background-image", "background-origin", "background-position",
|
456
|
+
"background-repeat", "background-size", "baseline-shift", "binding",
|
457
|
+
"bleed", "bookmark-label", "bookmark-level", "bookmark-state",
|
458
|
+
"bookmark-target", "border", "border-bottom", "border-bottom-color",
|
459
|
+
"border-bottom-left-radius", "border-bottom-right-radius",
|
460
|
+
"border-bottom-style", "border-bottom-width", "border-collapse",
|
461
|
+
"border-color", "border-image", "border-image-outset",
|
462
|
+
"border-image-repeat", "border-image-slice", "border-image-source",
|
463
|
+
"border-image-width", "border-left", "border-left-color",
|
464
|
+
"border-left-style", "border-left-width", "border-radius", "border-right",
|
465
|
+
"border-right-color", "border-right-style", "border-right-width",
|
466
|
+
"border-spacing", "border-style", "border-top", "border-top-color",
|
467
|
+
"border-top-left-radius", "border-top-right-radius", "border-top-style",
|
468
|
+
"border-top-width", "border-width", "bottom", "box-decoration-break",
|
469
|
+
"box-shadow", "box-sizing", "break-after", "break-before", "break-inside",
|
470
|
+
"caption-side", "clear", "clip", "color", "color-profile", "column-count",
|
471
|
+
"column-fill", "column-gap", "column-rule", "column-rule-color",
|
472
|
+
"column-rule-style", "column-rule-width", "column-span", "column-width",
|
473
|
+
"columns", "content", "counter-increment", "counter-reset", "crop", "cue",
|
474
|
+
"cue-after", "cue-before", "cursor", "direction", "display",
|
475
|
+
"dominant-baseline", "drop-initial-after-adjust",
|
476
|
+
"drop-initial-after-align", "drop-initial-before-adjust",
|
477
|
+
"drop-initial-before-align", "drop-initial-size", "drop-initial-value",
|
478
|
+
"elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis",
|
479
|
+
"flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap",
|
480
|
+
"float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings",
|
481
|
+
"font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust",
|
482
|
+
"font-stretch", "font-style", "font-synthesis", "font-variant",
|
483
|
+
"font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
|
484
|
+
"font-variant-ligatures", "font-variant-numeric", "font-variant-position",
|
485
|
+
"font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
|
486
|
+
"grid-auto-position", "grid-auto-rows", "grid-column", "grid-column-end",
|
487
|
+
"grid-column-start", "grid-row", "grid-row-end", "grid-row-start",
|
488
|
+
"grid-template", "grid-template-areas", "grid-template-columns",
|
489
|
+
"grid-template-rows", "hanging-punctuation", "height", "hyphens",
|
490
|
+
"icon", "image-orientation", "image-rendering", "image-resolution",
|
491
|
+
"inline-box-align", "justify-content", "left", "letter-spacing",
|
492
|
+
"line-break", "line-height", "line-stacking", "line-stacking-ruby",
|
493
|
+
"line-stacking-shift", "line-stacking-strategy", "list-style",
|
494
|
+
"list-style-image", "list-style-position", "list-style-type", "margin",
|
495
|
+
"margin-bottom", "margin-left", "margin-right", "margin-top",
|
496
|
+
"marker-offset", "marks", "marquee-direction", "marquee-loop",
|
497
|
+
"marquee-play-count", "marquee-speed", "marquee-style", "max-height",
|
498
|
+
"max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index",
|
499
|
+
"nav-left", "nav-right", "nav-up", "object-fit", "object-position",
|
500
|
+
"opacity", "order", "orphans", "outline",
|
501
|
+
"outline-color", "outline-offset", "outline-style", "outline-width",
|
502
|
+
"overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y",
|
503
|
+
"padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
|
504
|
+
"page", "page-break-after", "page-break-before", "page-break-inside",
|
505
|
+
"page-policy", "pause", "pause-after", "pause-before", "perspective",
|
506
|
+
"perspective-origin", "pitch", "pitch-range", "play-during", "position",
|
507
|
+
"presentation-level", "punctuation-trim", "quotes", "region-break-after",
|
508
|
+
"region-break-before", "region-break-inside", "region-fragment",
|
509
|
+
"rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness",
|
510
|
+
"right", "rotation", "rotation-point", "ruby-align", "ruby-overhang",
|
511
|
+
"ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin",
|
512
|
+
"shape-outside", "size", "speak", "speak-as", "speak-header",
|
513
|
+
"speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set",
|
514
|
+
"tab-size", "table-layout", "target", "target-name", "target-new",
|
515
|
+
"target-position", "text-align", "text-align-last", "text-decoration",
|
516
|
+
"text-decoration-color", "text-decoration-line", "text-decoration-skip",
|
517
|
+
"text-decoration-style", "text-emphasis", "text-emphasis-color",
|
518
|
+
"text-emphasis-position", "text-emphasis-style", "text-height",
|
519
|
+
"text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow",
|
520
|
+
"text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position",
|
521
|
+
"text-wrap", "top", "transform", "transform-origin", "transform-style",
|
522
|
+
"transition", "transition-delay", "transition-duration",
|
523
|
+
"transition-property", "transition-timing-function", "unicode-bidi",
|
524
|
+
"vertical-align", "visibility", "voice-balance", "voice-duration",
|
525
|
+
"voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress",
|
526
|
+
"voice-volume", "volume", "white-space", "widows", "width", "word-break",
|
527
|
+
"word-spacing", "word-wrap", "z-index",
|
528
|
+
// SVG-specific
|
529
|
+
"clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
|
530
|
+
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
|
531
|
+
"color-interpolation", "color-interpolation-filters",
|
532
|
+
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
|
533
|
+
"marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
|
534
|
+
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
|
535
|
+
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
|
536
|
+
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
|
537
|
+
"glyph-orientation-vertical", "text-anchor", "writing-mode"
|
538
|
+
], propertyKeywords = keySet(propertyKeywords_);
|
539
|
+
|
540
|
+
var nonStandardPropertyKeywords_ = [
|
541
|
+
"scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
|
542
|
+
"scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
|
543
|
+
"scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside",
|
544
|
+
"searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
|
545
|
+
"searchfield-results-decoration", "zoom"
|
546
|
+
], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
|
547
|
+
|
548
|
+
var fontProperties_ = [
|
549
|
+
"font-family", "src", "unicode-range", "font-variant", "font-feature-settings",
|
550
|
+
"font-stretch", "font-weight", "font-style"
|
551
|
+
], fontProperties = keySet(fontProperties_);
|
552
|
+
|
553
|
+
var counterDescriptors_ = [
|
554
|
+
"additive-symbols", "fallback", "negative", "pad", "prefix", "range",
|
555
|
+
"speak-as", "suffix", "symbols", "system"
|
556
|
+
], counterDescriptors = keySet(counterDescriptors_);
|
557
|
+
|
558
|
+
var colorKeywords_ = [
|
559
|
+
"aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
|
560
|
+
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
|
561
|
+
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
|
562
|
+
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
|
563
|
+
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
|
564
|
+
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
|
565
|
+
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
|
566
|
+
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
|
567
|
+
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
|
568
|
+
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
|
569
|
+
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
|
570
|
+
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
|
571
|
+
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
|
572
|
+
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
|
573
|
+
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
|
574
|
+
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
|
575
|
+
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
|
576
|
+
"mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
|
577
|
+
"navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
|
578
|
+
"orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
|
579
|
+
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
|
580
|
+
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
|
581
|
+
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
|
582
|
+
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
|
583
|
+
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
|
584
|
+
"whitesmoke", "yellow", "yellowgreen"
|
585
|
+
], colorKeywords = keySet(colorKeywords_);
|
586
|
+
|
587
|
+
var valueKeywords_ = [
|
588
|
+
"above", "absolute", "activeborder", "additive", "activecaption", "afar",
|
589
|
+
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
|
590
|
+
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
|
591
|
+
"arabic-indic", "armenian", "asterisks", "attr", "auto", "avoid", "avoid-column", "avoid-page",
|
592
|
+
"avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
593
|
+
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
|
594
|
+
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
|
595
|
+
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
|
596
|
+
"capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
|
597
|
+
"cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
|
598
|
+
"cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
|
599
|
+
"col-resize", "collapse", "column", "column-reverse", "compact", "condensed", "contain", "content",
|
600
|
+
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
|
601
|
+
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "dashed", "decimal",
|
602
|
+
"decimal-leading-zero", "default", "default-button", "destination-atop",
|
603
|
+
"destination-in", "destination-out", "destination-over", "devanagari",
|
604
|
+
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
|
605
|
+
"dot-dash", "dot-dot-dash",
|
606
|
+
"dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
|
607
|
+
"element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
|
608
|
+
"ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
|
609
|
+
"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
|
610
|
+
"ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
|
611
|
+
"ethiopic-halehame-gez", "ethiopic-halehame-om-et",
|
612
|
+
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
|
613
|
+
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
614
|
+
"ethiopic-numeric", "ew-resize", "expanded", "extends", "extra-condensed",
|
615
|
+
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
616
|
+
"forwards", "from", "geometricPrecision", "georgian", "graytext", "groove",
|
617
|
+
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew",
|
618
|
+
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
619
|
+
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore",
|
620
|
+
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
|
621
|
+
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
|
622
|
+
"inline-block", "inline-flex", "inline-table", "inset", "inside", "intrinsic", "invert",
|
623
|
+
"italic", "japanese-formal", "japanese-informal", "justify", "kannada",
|
624
|
+
"katakana", "katakana-iroha", "keep-all", "khmer",
|
625
|
+
"korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
|
626
|
+
"landscape", "lao", "large", "larger", "left", "level", "lighter",
|
627
|
+
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
|
628
|
+
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
|
629
|
+
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
|
630
|
+
"lower-roman", "lowercase", "ltr", "malayalam", "match", "matrix", "matrix3d",
|
631
|
+
"media-controls-background", "media-current-time-display",
|
632
|
+
"media-fullscreen-button", "media-mute-button", "media-play-button",
|
633
|
+
"media-return-to-realtime-button", "media-rewind-button",
|
634
|
+
"media-seek-back-button", "media-seek-forward-button", "media-slider",
|
635
|
+
"media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
|
636
|
+
"media-volume-slider-container", "media-volume-sliderthumb", "medium",
|
637
|
+
"menu", "menulist", "menulist-button", "menulist-text",
|
638
|
+
"menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
|
639
|
+
"mix", "mongolian", "monospace", "move", "multiple", "myanmar", "n-resize",
|
640
|
+
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
|
641
|
+
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
|
642
|
+
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote",
|
643
|
+
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
|
644
|
+
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
|
645
|
+
"painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter",
|
646
|
+
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
|
647
|
+
"progress", "push-button", "radial-gradient", "radio", "read-only",
|
648
|
+
"read-write", "read-write-plaintext-only", "rectangle", "region",
|
649
|
+
"relative", "repeat", "repeating-linear-gradient",
|
650
|
+
"repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
|
651
|
+
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
|
652
|
+
"rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
|
653
|
+
"s-resize", "sans-serif", "scale", "scale3d", "scaleX", "scaleY", "scaleZ",
|
654
|
+
"scroll", "scrollbar", "se-resize", "searchfield",
|
655
|
+
"searchfield-cancel-button", "searchfield-decoration",
|
656
|
+
"searchfield-results-button", "searchfield-results-decoration",
|
657
|
+
"semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
|
658
|
+
"simp-chinese-formal", "simp-chinese-informal", "single",
|
659
|
+
"skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
|
660
|
+
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
|
661
|
+
"small", "small-caps", "small-caption", "smaller", "solid", "somali",
|
662
|
+
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "spell-out", "square",
|
663
|
+
"square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
|
664
|
+
"subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "table",
|
665
|
+
"table-caption", "table-cell", "table-column", "table-column-group",
|
666
|
+
"table-footer-group", "table-header-group", "table-row", "table-row-group",
|
667
|
+
"tamil",
|
668
|
+
"telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
|
669
|
+
"thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
|
670
|
+
"threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
|
671
|
+
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
|
672
|
+
"trad-chinese-formal", "trad-chinese-informal",
|
673
|
+
"translate", "translate3d", "translateX", "translateY", "translateZ",
|
674
|
+
"transparent", "ultra-condensed", "ultra-expanded", "underline", "up",
|
675
|
+
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
|
676
|
+
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
|
677
|
+
"var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
|
678
|
+
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
|
679
|
+
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
|
680
|
+
"xx-large", "xx-small"
|
681
|
+
], valueKeywords = keySet(valueKeywords_);
|
682
|
+
|
683
|
+
var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
|
684
|
+
.concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
|
685
|
+
.concat(valueKeywords_);
|
686
|
+
CodeMirror.registerHelper("hintWords", "css", allWords);
|
687
|
+
|
688
|
+
function tokenCComment(stream, state) {
|
689
|
+
var maybeEnd = false, ch;
|
690
|
+
while ((ch = stream.next()) != null) {
|
691
|
+
if (maybeEnd && ch == "/") {
|
692
|
+
state.tokenize = null;
|
693
|
+
break;
|
694
|
+
}
|
695
|
+
maybeEnd = (ch == "*");
|
696
|
+
}
|
697
|
+
return ["comment", "comment"];
|
698
|
+
}
|
699
|
+
|
700
|
+
CodeMirror.defineMIME("text/css", {
|
701
|
+
documentTypes: documentTypes,
|
702
|
+
mediaTypes: mediaTypes,
|
703
|
+
mediaFeatures: mediaFeatures,
|
704
|
+
mediaValueKeywords: mediaValueKeywords,
|
705
|
+
propertyKeywords: propertyKeywords,
|
706
|
+
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
707
|
+
fontProperties: fontProperties,
|
708
|
+
counterDescriptors: counterDescriptors,
|
709
|
+
colorKeywords: colorKeywords,
|
710
|
+
valueKeywords: valueKeywords,
|
711
|
+
tokenHooks: {
|
712
|
+
"/": function(stream, state) {
|
713
|
+
if (!stream.eat("*")) return false;
|
714
|
+
state.tokenize = tokenCComment;
|
715
|
+
return tokenCComment(stream, state);
|
716
|
+
}
|
717
|
+
},
|
718
|
+
name: "css"
|
719
|
+
});
|
720
|
+
|
721
|
+
CodeMirror.defineMIME("text/x-scss", {
|
722
|
+
mediaTypes: mediaTypes,
|
723
|
+
mediaFeatures: mediaFeatures,
|
724
|
+
mediaValueKeywords: mediaValueKeywords,
|
725
|
+
propertyKeywords: propertyKeywords,
|
726
|
+
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
727
|
+
colorKeywords: colorKeywords,
|
728
|
+
valueKeywords: valueKeywords,
|
729
|
+
fontProperties: fontProperties,
|
730
|
+
allowNested: true,
|
731
|
+
tokenHooks: {
|
732
|
+
"/": function(stream, state) {
|
733
|
+
if (stream.eat("/")) {
|
734
|
+
stream.skipToEnd();
|
735
|
+
return ["comment", "comment"];
|
736
|
+
} else if (stream.eat("*")) {
|
737
|
+
state.tokenize = tokenCComment;
|
738
|
+
return tokenCComment(stream, state);
|
739
|
+
} else {
|
740
|
+
return ["operator", "operator"];
|
741
|
+
}
|
742
|
+
},
|
743
|
+
":": function(stream) {
|
744
|
+
if (stream.match(/\s*\{/))
|
745
|
+
return [null, "{"];
|
746
|
+
return false;
|
747
|
+
},
|
748
|
+
"$": function(stream) {
|
749
|
+
stream.match(/^[\w-]+/);
|
750
|
+
if (stream.match(/^\s*:/, false))
|
751
|
+
return ["variable-2", "variable-definition"];
|
752
|
+
return ["variable-2", "variable"];
|
753
|
+
},
|
754
|
+
"#": function(stream) {
|
755
|
+
if (!stream.eat("{")) return false;
|
756
|
+
return [null, "interpolation"];
|
757
|
+
}
|
758
|
+
},
|
759
|
+
name: "css",
|
760
|
+
helperType: "scss"
|
761
|
+
});
|
762
|
+
|
763
|
+
CodeMirror.defineMIME("text/x-less", {
|
764
|
+
mediaTypes: mediaTypes,
|
765
|
+
mediaFeatures: mediaFeatures,
|
766
|
+
mediaValueKeywords: mediaValueKeywords,
|
767
|
+
propertyKeywords: propertyKeywords,
|
768
|
+
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
769
|
+
colorKeywords: colorKeywords,
|
770
|
+
valueKeywords: valueKeywords,
|
771
|
+
fontProperties: fontProperties,
|
772
|
+
allowNested: true,
|
773
|
+
tokenHooks: {
|
774
|
+
"/": function(stream, state) {
|
775
|
+
if (stream.eat("/")) {
|
776
|
+
stream.skipToEnd();
|
777
|
+
return ["comment", "comment"];
|
778
|
+
} else if (stream.eat("*")) {
|
779
|
+
state.tokenize = tokenCComment;
|
780
|
+
return tokenCComment(stream, state);
|
781
|
+
} else {
|
782
|
+
return ["operator", "operator"];
|
783
|
+
}
|
784
|
+
},
|
785
|
+
"@": function(stream) {
|
786
|
+
if (stream.eat("{")) return [null, "interpolation"];
|
787
|
+
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/, false)) return false;
|
788
|
+
stream.eatWhile(/[\w\\\-]/);
|
789
|
+
if (stream.match(/^\s*:/, false))
|
790
|
+
return ["variable-2", "variable-definition"];
|
791
|
+
return ["variable-2", "variable"];
|
792
|
+
},
|
793
|
+
"&": function() {
|
794
|
+
return ["atom", "atom"];
|
795
|
+
}
|
796
|
+
},
|
797
|
+
name: "css",
|
798
|
+
helperType: "less"
|
799
|
+
});
|
800
|
+
|
801
|
+
CodeMirror.defineMIME("text/x-gss", {
|
802
|
+
documentTypes: documentTypes,
|
803
|
+
mediaTypes: mediaTypes,
|
804
|
+
mediaFeatures: mediaFeatures,
|
805
|
+
propertyKeywords: propertyKeywords,
|
806
|
+
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
807
|
+
fontProperties: fontProperties,
|
808
|
+
counterDescriptors: counterDescriptors,
|
809
|
+
colorKeywords: colorKeywords,
|
810
|
+
valueKeywords: valueKeywords,
|
811
|
+
supportsAtComponent: true,
|
812
|
+
tokenHooks: {
|
813
|
+
"/": function(stream, state) {
|
814
|
+
if (!stream.eat("*")) return false;
|
815
|
+
state.tokenize = tokenCComment;
|
816
|
+
return tokenCComment(stream, state);
|
817
|
+
}
|
818
|
+
},
|
819
|
+
name: "css",
|
820
|
+
helperType: "gss"
|
821
|
+
});
|
822
|
+
|
823
|
+
});
|