--- name: MooTools scopeName: source.js.mootools repository: array-functions: name: meta.function.array.js.mootools endCaptures: '1': name: support.function.array.js.mootools begin: "(\\$(?:each|A)\\()" contentName: variable.parameter.function.array.js.mootools beginCaptures: '1': name: support.function.array.js.mootools end: "(\\))" patterns: - include: source.js element-functions: name: meta.function.element.js.mootools endCaptures: '1': name: support.function.element.js.mootools begin: "(\\$?\\$\\()" contentName: variable.parameter.function.element.js.mootools beginCaptures: '1': name: support.function.element.js.mootools end: "(\\))" patterns: - include: source.js hash-functions: name: meta.function.hash.js.mootools endCaptures: '1': name: support.function.hash.js.mootools begin: "(\\$H\\()" contentName: variable.parameter.function.hash.js.mootools beginCaptures: '1': name: support.function.hash.js.mootools end: "(\\))" patterns: - include: source.js fx-options: patterns: - name: support.class.keys.fx.options.js.mootools match: "\\b(onStart|onComplete|transition|duration|unit|wait|fps)\\b" - name: support.class.keys.fx.slide.options.js.mootools match: "\\b(mode)\\b" leading-space: patterns: - name: meta.leading-tabs begin: "^(?=(\\t| ))" end: "(?=[^\\t\\s])" patterns: - captures: '6': name: meta.even-tab.group6.spaces '11': name: meta.odd-tab.group11.spaces '7': name: meta.odd-tab.group7.spaces '8': name: meta.even-tab.group8.spaces '9': name: meta.odd-tab.group9.spaces '1': name: meta.odd-tab.group1.spaces '2': name: meta.even-tab.group2.spaces '3': name: meta.odd-tab.group3.spaces '4': name: meta.even-tab.group4.spaces '10': name: meta.even-tab.group10.spaces '5': name: meta.odd-tab.group5.spaces match: "( )( )?( )?( )?( )?( )?( )?( )?( )?( )?( )?" - captures: '6': name: meta.even-tab.group6.tab '11': name: meta.odd-tab.group11.tab '7': name: meta.odd-tab.group7.tab '8': name: meta.even-tab.group8.tab '9': name: meta.odd-tab.group9.tab '1': name: meta.odd-tab.group1.tab '2': name: meta.even-tab.group2.tab '3': name: meta.odd-tab.group3.tab '4': name: meta.even-tab.group4.tab '10': name: meta.even-tab.group10.tab '5': name: meta.odd-tab.group5.tab match: "(\\t)(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?(\\t)?" comment: |2 The leading-space code is the ribbon highlighing thomas Aylott contributed to source.js.prototype. More info in this thread: http://comox.textdrive.com/pipermail/textmate/2006-August/012373.html dom-functions: name: meta.function.dom.js.mootools endCaptures: '1': name: support.function.dom.js.mootools begin: "(\\$ES?\\()" contentName: variable.parameter.function.dom.js.mootools beginCaptures: '1': name: support.function.dom.js.mootools end: "(\\))" patterns: - include: source.js uuid: 7E4B5859-2FB4-4D2A-9105-276BDE28B94E foldingStartMarker: "(^.*{[^}]*$|^.*\\([^\\)]*$|^.*/\\*(?!.*\\*/).*$)" patterns: - name: support.class.js.mootools match: "\\b(Class|Array|Element|Event|Function|String)\\b" comment: "\nClass\nThe base class object of the http://mootools.net framework. \nhttp://docs.mootools.net/files/Core/Moo-js.html" - name: support.class.class.js.mootools match: "\\b(empty|extend|implement)\\b" - name: support.function.class.js.mootools match: "\\b(extend|Native)\\b" - name: support.function.utility.js.mootools match: "\\$(type|chk|pick|random|clear)\\b" comment: |2 Utility Contains Utility functions http://docs.mootools.net/files/Core/Utility-js.html - captures: '1': name: support.class.window.browser.js.mootools match: window\.(ie|ie6|ie7|khtml|gecko)\b - include: "#array-functions" comment: |2- Array A collection of The Array Object prototype methods. http://docs.mootools.net/files/Native/Array-js.html - name: support.class.array.js.mootools match: "\\b(forEach|filter|map|every|some|indexOf|each|copy|remove|test|extend|associate)\\b" - include: "#element-functions" comment: |2- Element Custom class to allow all of its methods to be used with any DOM element via the dollar function $. http://docs.mootools.net/files/Native/Element-js.html - name: support.class.element.js.mootools match: "\\b(injectBefore|injectAfter|injectInside|adopt|remove|clone|replaceWith|appendText|hasClass|addClass|removeClass|toggleClass|setStyle|setStyles|setOpacity|getStyle|addEvent|removeEvent|removeEvents|fireEvent|getPrevious|getNext|getFirst|getLast|getParent|getChildren|setProperty|setProperties|setHTML|getProperty|getTag|scrollTo|getValue|getSize|getPosition|getTop|getLeft|getCoordinates)\\b" - name: support.class.event.js.mootools match: "\\b(stop|stopPropagation|preventDefault|bindWithEvent)\\b" comment: |2- Event Cross browser methods to manage events. http://docs.mootools.net/files/Native/Event-js.html - name: support.class.function.js.mootools match: "\\b(create|pass|attempt|bind|bindAsEventListener|delay|periodical)\\b" comment: |2- Function A collection of The Function Object prototype methods. http://docs.mootools.net/files/Native/Function-js.html - name: support.class.string.js.mootools match: "\\b(test|toInt|camelCase|hyphenate|capitalize|trim|clean|rgbToHex|hexToRgb)\\b" comment: |2- String A collection of The String Object prototype methods. http://docs.mootools.net/files/Native/String-js.html - name: support.class.number.js.mootools match: "\\btoInt\\b" - include: "#dom-functions" comment: |2- DOM Css Query related function and Element extensions. http://docs.mootools.net/files/Addons/Dom-js.html - name: support.class.dom.js.mootools match: "\\b(getElements|getElementById|getElement|getElementsBySelector|getElementsByClassName)\\b" comment: "document. getElementsByClassName\tmight belong somewhere else" - include: "#hash-functions" comment: |2- Hash It wraps an object that it uses internally as a map. http://docs.mootools.net/files/Addons/Hash-js.html -- note: several overlaps in here with named properties from array.js.mootools - name: support.class.hash.js.mootools match: "\\b(get|hasKey|set|remove|each|extend|empty|keys|values)\\b" - name: support.class.color.js.mootools match: "\\b(mix|invert|setHue|setSaturation|setBrightness)\\b" comment: |2- Color Creates a new Color Object, which is an array with some color specific methods. http://docs.mootools.net/files/Addons/Color-js.html - name: support.function.color.js.mootools captures: '1': name: variable.parameter.function.js match: "\\$(?:RGB|HSB)\\(([^)]*)\\)\\b" - name: support.function.chain.js.mootools match: "\\b(chain|(call|clear)Chain)\\b" comment: |2- Common Contains common implementations for custom classes. http://docs.mootools.net/files/Addons/Common-js.html - name: support.function.events.js.mootools match: "\\b(add|fire|remove)Event\\b" - name: support.function.options.js.mootools match: "\\bsetOptions\\b" - name: support.class.base.window.js.mootools match: "\\bonDomReady\\b" comment: |2- Window Base Cross browser methods to get the window size, onDomReady method. http://docs.mootools.net/files/Window/Window-Base-js.html -- note: addEvent is already listed under Element - name: support.class.size.window.js.mootools match: "\\b(get(Width|Height|Scroll(Width|Height|Left|Top)))\\b" comment: |2- Window Size Cross browser methods to get various window dimensions. http://docs.mootools.net/files/Window/Window-Size-js.html -- note: getSize is already listed under Element - name: support.class.ajax.js.mootools match: "\\b(request|evalScripts)\\b" comment: |2- Ajax An Ajax class, For all your asynchronous needs. http://docs.mootools.net/files/Remote/Ajax-js.html - name: support.function.js.mootools match: "\\btoQueryString\\b" comment: 'note: both Object and Element have a toQueryString function/property' - name: support.class.element.js match: "\\bsend\\b" - name: support.function.asset.js.mootools match: "\\b(javascript|css|images?)\\b" comment: |2- Assets provides dynamic loading for images, css and javascript files. http://docs.mootools.net/files/Remote/Assets-js.html - name: support.class.cookie.js.mootools match: "\\b(set|get|remove)\\b" comment: |2- Cookie Class for creating, getting, and removing cookies. http://docs.mootools.net/files/Remote/Assets-js.html - name: support.class.json.js.mootools match: "\\b(toString|evaluate)\\b" comment: |2- Json Simple Json parser and Stringyfier, See: http://www.json.org/ http://docs.mootools.net/files/Remote/Json-js.html - name: support.class.json.js.mootools match: "\\bJson\\.Remote\\b" comment: |2- Json Remote Wrapped XHR with automated sending and receiving of Javascript Objects in Json Format. http://docs.mootools.net/files/Remote/Json-Remote-js.html - name: support.class.xhr.js.mootools match: "\\bXHR\\b" comment: |2- XHR Contains the basic XMLHttpRequest Class Wrapper. http://docs.mootools.net/files/Remote/XHR-js.html - name: support.class.base.fx.js.mootools match: "\\b(set|start|stop)\\b" comment: "\nFx.Base\t\t\t\nBase class for the Mootools Effects (Moo.Fx) library.\t\t\t\nhttp://docs.mootools.net/files/Effects/Fx-Base-js.html" - name: support.class.transitions.fx.js.mootools match: "\\b(linear|sineInOut)\\b" - name: support.class.keys.options.transitions.fx match: "\\b(onStart|onComplete|transition|duration|unit|wait|fps)\\b" - name: support.class.elements.fx.js.mootools match: "\\b(start)\\b" comment: |2- Fx.Elements Fx.Elements allows you to apply any number of styles transitions to a selection of elements. http://docs.mootools.net/files/Effects/Fx-Elements-js.html - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(new)\\s+(Fx\\.Elements)(\\()" contentName: variable.parameter.fx.elements.js.mootools beginCaptures: '1': name: keyword.operator.new.js '2': name: entity.name.type.instance.js.mootools '3': name: punctuation.definition.parameters.begin.js end: "(\\)(;|$))" patterns: - include: "#element-functions" - include: "#array-functions" - include: "#dom-functions" - include: "#hash-functions" - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(\\{)" contentName: variable.parameter.fx.elements.options.js.mootools beginCaptures: '1': name: punctuation.definition.parameters.begin.js end: "(\\})(?=\\))" patterns: - name: punctuation.separator.key-value.js.mootools match: "(:)" - include: "#fx-options" - include: source.js - name: support.class.scroll.fx.js.mootools match: "\\b(scrollTo|to(Top|Bottom|Left|Right|Element))" comment: |2- Fx.Scroll Scroll any element with an overflow, including the window element. http://docs.mootools.net/files/Effects/Fx-Scroll-js.html - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(new)\\s+(Fx\\.Scroll)(\\()" contentName: variable.parameter.fx.scroll.js.mootools beginCaptures: '1': name: keyword.operator.new.js '2': name: entity.name.type.instance.js.mootools '3': name: punctuation.definition.parameters.begin.js end: "(\\)(;|$))" patterns: - include: "#element-functions" - include: "#array-functions" - include: "#dom-functions" - include: "#hash-functions" - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(\\{)" contentName: variable.parameter.fx.scroll.options.js.mootools beginCaptures: '1': name: punctuation.definition.parameters.begin.js end: "(\\})(?=\\))" patterns: - name: punctuation.separator.key-value.js.mootools match: "(:)" - include: "#fx-options" - include: source.js - name: support.class.slide.fx.js.mootools match: "\\b(slide(In|Out)|hide|show|toggle)\\b" comment: |2- Fx.Slide The slide effect; slides an element in horizontally or vertically, the contents will fold inside. http://docs.mootools.net/files/Effects/Fx-Slide-js.html - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(new)\\s+(Fx\\.Slide)(\\()" contentName: variable.parameter.fx.slide.js.mootools beginCaptures: '1': name: keyword.operator.new.js '2': name: entity.name.type.instance.js.mootools '3': name: punctuation.definition.parameters.begin.js end: "(\\)(;|$))" patterns: - include: "#element-functions" - include: "#array-functions" - include: "#dom-functions" - include: "#hash-functions" - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(\\{)" contentName: variable.parameter.fx.slide.options.js.mootools beginCaptures: '1': name: punctuation.definition.parameters.begin.js end: "(\\})(?=\\))" patterns: - name: punctuation.separator.key-value.js.mootools match: "(:)" - include: "#fx-options" - include: source.js - name: support.class.slide.fx.js.mootools match: "\\b(hide|start)\\b" comment: |2- Fx.Style The Style effect; Extends Fx.Base, inherits all its properties. http://docs.mootools.net/files/Effects/Fx-Style-js.html - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(new)\\s+(Fx\\.Style)(\\()" contentName: variable.parameter.fx.style.js.mootools beginCaptures: '1': name: keyword.operator.new.js '2': name: entity.name.type.instance.fx.style.js.mootools '3': name: punctuation.definition.parameters.begin.js end: "(\\)(;|$))" patterns: - include: "#element-functions" - include: "#array-functions" - include: "#dom-functions" - include: "#hash-functions" - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: ",\\s*(\\{)" contentName: variable.parameter.fx.style.options.js.mootools beginCaptures: '1': name: punctuation.definition.parameters.begin.js end: "(\\})(?=\\))" patterns: - name: punctuation.separator.key-value.js.mootools match: "(:)" - include: "#fx-options" - include: source.js - name: support.class.element.js.mootools match: "\\b(effect)\\b" - name: support.class.styles.fx.js.mootools match: "\\b(start)\\b" comment: "\nFx.Styles\nAllows you to animate multiple css properties at once; Extends Fx.Base, inherits all its properties. \nhttp://docs.mootools.net/files/Effects/Fx-Styles-js.html" - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(new)\\s+(Fx\\.Styles)(\\()" contentName: variable.parameter.fx.styles.js.mootools beginCaptures: '1': name: keyword.operator.new.js '2': name: entity.name.type.instance.js.mootools '3': name: punctuation.definition.parameters.begin.js end: "(\\)(;|$))" patterns: - include: "#element-functions" - include: "#array-functions" - include: "#dom-functions" - include: "#hash-functions" - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(\\{)" contentName: variable.parameter.fx.styles.options.js.mootools beginCaptures: '1': name: punctuation.definition.parameters.begin.js end: "(\\})(?=\\))" patterns: - name: punctuation.separator.key-value.js.mootools match: "(:)" - include: "#fx-options" - include: source.js - name: support.class.element.js.mootools match: "\\b(effects)\\b" - name: support.class.transitions.fx.js.mootools match: "\\b(linear|quadIn|quadOut|quadInOut|cubicIn|cubicOut|cubicInOut|quartIn|quartOut|quartInOut|quintIn|quintOut|quintInOut|sineIn|sineOut|sineInOut|expoIn|expoOut|expoInOut|circIn|circOut|circInOut|elasticIn|elasticOut|elasticInOut|backIn|backOut|backInOut|bounceIn|bounceOut|bounceInOut)\\b" comment: |2- Fx.Transitions A collection of tweaning transitions for use with the Fx.Base classes. http://docs.mootools.net/files/Effects/Fx-Transitions-js.html - name: support.class.fx.utils.js.mootools match: "\\b(toggle|show)\\b" comment: |2- Fx.Utils Contains Fx.Height, Fx.Width, Fx.Opacity. http://docs.mootools.net/files/Effects/Fx-Styles-js.html - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(new)\\s+(Fx\\.(?:Height|Width|Opacity))(\\()" contentName: variable.parameter.fx.utils.js.mootools beginCaptures: '1': name: keyword.operator.new.js '2': name: entity.name.type.instance.js.mootools '3': name: punctuation.definition.parameters.begin.js end: "(\\));?$" patterns: - include: "#element-functions" - include: "#array-functions" - include: "#dom-functions" - include: "#hash-functions" - endCaptures: '1': name: punctuation.definition.parameters.end.js begin: "(\\{)" contentName: variable.parameter.fx.utils.options.js.mootools beginCaptures: '1': name: punctuation.definition.parameters.begin.js end: "(\\})\\)" patterns: - name: punctuation.separator.key-value.js.mootools match: "(:)" - include: "#fx-options" - include: source.js - name: support.class.element.js.mootools match: "\\b(makeResizable)\\b" comment: |2- Drag.Base Modify two css properties of an element based on the position of the mouse. http://docs.mootools.net/files/Drag/Drag-Base-js.html - name: support.class.element.js.mootools match: "\\b(makeDraggable)\\b" comment: |2- Drag.Move Modify two css properties of an element based on the position of the mouse. http://docs.mootools.net/files/Drag/Drag-Base-js.html - include: "#leading-space" - include: source.js foldingStopMarker: "(^\\s*\\}|^\\s*\\)|^(?!.*/\\*).*\\*/)" keyEquivalent: "^~J" comment: "\nMooTools Framework by Valerio Proietti. \nhttp://mootools.net\nThis syntax document is largely based on the documentation at http://docs.mootools.net\nInitial bundle by Joe Maller. \n"