@werckmeister/components 1.1.6-153 → 1.1.6-155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/werckmeister-components.js +2 -2
- package/werckmeister.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@werckmeister/components",
|
|
3
|
-
"version": "1.1.6-
|
|
3
|
+
"version": "1.1.6-155",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "werckmeister-components.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@types/codemirror": "0.0.98",
|
|
32
32
|
"@types/lodash": "^4.14.164",
|
|
33
|
-
"@werckmeister/compilerjs": "1.4.
|
|
33
|
+
"@werckmeister/compilerjs": "1.4.2-746",
|
|
34
34
|
"@werckmeister/language-features": "1.0.0-70",
|
|
35
35
|
"@werckmeister/midiplayer": "1.0.2-43",
|
|
36
36
|
"babel-core": "^6.26.3",
|
|
@@ -29,9 +29,9 @@ var e;!function(t){"object"==typeof exports&&"object"==typeof module?t(require("
|
|
|
29
29
|
var define;
|
|
30
30
|
var t;!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],e):e(CodeMirror)}(function(t){"use strict";function e(t,e){if(!t.hasOwnProperty(e))throw new Error("Undefined state "+e+" in simple mode")}function n(t,e){if(!t)return/(?:)/;var n="";return t instanceof RegExp?(t.ignoreCase&&(n="i"),t=t.source):t=String(t),new RegExp((!1===e?"":"^")+"(?:"+t+")",n)}function a(t,a){(t.next||t.push)&&e(a,t.next||t.push),this.regex=n(t.regex),this.token=function(t){if(!t)return null;if(t.apply)return t;if("string"==typeof t)return t.replace(/\./g," ");for(var e=[],n=0;n<t.length;n++)e.push(t[n]&&t[n].replace(/\./g," "));return e}(t.token),this.data=t}function r(t,e){return function(n,a){if(a.pending){var r=a.pending.shift();return 0==a.pending.length&&(a.pending=null),n.pos+=r.text.length,r.token}if(a.local){if(a.local.end&&n.match(a.local.end)){var o=a.local.endToken||null;return a.local=a.localState=null,o}var l;o=a.local.mode.token(n,a.localState);return a.local.endScan&&(l=a.local.endScan.exec(n.current()))&&(n.pos=n.start+l.index),o}for(var s=t[a.state],d=0;d<s.length;d++){var c=s[d],u=(!c.data.sol||n.sol())&&n.match(c.regex);if(u){c.data.next?a.state=c.data.next:c.data.push?((a.stack||(a.stack=[])).push(a.state),a.state=c.data.push):c.data.pop&&a.stack&&a.stack.length&&(a.state=a.stack.pop()),c.data.mode&&i(e,a,c.data.mode,c.token),c.data.indent&&a.indent.push(n.indentation()+e.indentUnit),c.data.dedent&&a.indent.pop();var p=c.token;if(p&&p.apply&&(p=p(u)),u.length>2&&c.token&&"string"!=typeof c.token){a.pending=[];for(var f=2;f<u.length;f++)u[f]&&a.pending.push({text:u[f],token:c.token[f-1]});return n.backUp(u[0].length-(u[1]?u[1].length:0)),p[0]}return p&&p.join?p[0]:p}}return n.next(),null}}function o(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;var n=0;for(var a in t)if(t.hasOwnProperty(a)){if(!e.hasOwnProperty(a)||!o(t[a],e[a]))return!1;n++}for(var a in e)e.hasOwnProperty(a)&&n--;return 0==n}function i(e,a,r,i){var l;if(r.persistent)for(var s=a.persistentStates;s&&!l;s=s.next)(r.spec?o(r.spec,s.spec):r.mode==s.mode)&&(l=s);var d=l?l.mode:r.mode||t.getMode(e,r.spec),c=l?l.state:t.startState(d);r.persistent&&!l&&(a.persistentStates={mode:d,spec:r.spec,state:c,next:a.persistentStates}),a.localState=c,a.local={mode:d,end:r.end&&n(r.end),endScan:r.end&&!1!==r.forceEnd&&n(r.end,!1),endToken:i&&i.join?i[i.length-1]:i}}function l(e,n){return function(a,r,o){if(a.local&&a.local.mode.indent)return a.local.mode.indent(a.localState,r,o);if(null==a.indent||a.local||n.dontIndentStates&&function(t,e){for(var n=0;n<e.length;n++)if(e[n]===t)return!0}(a.state,n.dontIndentStates)>-1)return t.Pass;var i=a.indent.length-1,l=e[a.state];t:for(;;){for(var s=0;s<l.length;s++){var d=l[s];if(d.data.dedent&&!1!==d.data.dedentIfLineStart){var c=d.regex.exec(r);if(c&&c[0]){i--,(d.next||d.push)&&(l=e[d.next||d.push]),r=r.slice(c[0].length);continue t}}}break}return i<0?0:a.indent[i]}}t.defineSimpleMode=function(e,n){t.defineMode(e,function(e){return t.simpleMode(e,n)})},t.simpleMode=function(n,o){e(o,"start");var i={},s=o.meta||{},d=!1;for(var c in o)if(c!=s&&o.hasOwnProperty(c))for(var u=i[c]=[],p=o[c],f=0;f<p.length;f++){var h=p[f];u.push(new a(h,o)),(h.indent||h.dedent)&&(d=!0)}var g={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:d?[]:null}},copyState:function(e){var n={state:e.state,pending:e.pending,local:e.local,localState:null,indent:e.indent&&e.indent.slice(0)};e.localState&&(n.localState=t.copyState(e.local.mode,e.localState)),e.stack&&(n.stack=e.stack.slice(0));for(var a=e.persistentStates;a;a=a.next)n.persistentStates={mode:a.mode,spec:a.spec,state:a.state==e.localState?n.localState:t.copyState(a.mode,a.state),next:n.persistentStates};return n},token:r(i,n),innerMode:function(t){return t.local&&{mode:t.local.mode,state:t.localState}},indent:l(i,s)};if(s)for(var S in s)s.hasOwnProperty(S)&&(g[S]=s[S]);return g}});
|
|
31
31
|
},{"../../lib/codemirror":"tQq4"}],"edJQ":[function(require,module,exports) {
|
|
32
|
-
var e=require("codemirror/lib/codemirror.js");require("codemirror/addon/mode/simple.js"),e.defineSimpleMode("sheet",{start:[{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/(?:\w+):/,token:"keyword",next:"wmCommandValues"},{regex:/.*--WM-HIDDEN-LINE\s*$/,token:"comment wm-hidden-line"},{regex:/using/,token:"keyword"},{regex:/\\[pf]{1,5}/,token:"atom"},{regex:/--.*/,token:"comment"}],wmCommandValues:[{regex:/;|\//,token:"text",next:"start"},{regex:/".*?"/,token:"string"},{regex:/[^;\/"]+/,token:"variable"}],meta:{dontIndentStates:["comment"],lineComment:"--"}});
|
|
32
|
+
var e=require("codemirror/lib/codemirror.js");require("codemirror/addon/mode/simple.js"),e.defineSimpleMode("sheet",{start:[{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/(?:\w+):/,token:"keyword",next:"wmCommandValues"},{regex:/.*--WM-HIDDEN-LINE\s*$/,token:"comment wm-hidden-line"},{regex:/using/,token:"keyword"},{regex:/\\[pf]{1,5}/,token:"atom"},{regex:/--.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"}],wmCommandValues:[{regex:/;|\//,token:"text",next:"start"},{regex:/".*?"/,token:"string"},{regex:/[^;\/"]+/,token:"variable"}],meta:{dontIndentStates:["comment"],lineComment:"--"},comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}]});
|
|
33
33
|
},{"codemirror/lib/codemirror.js":"tQq4","codemirror/addon/mode/simple.js":"YCgH"}],"PWBo":[function(require,module,exports) {
|
|
34
|
-
var e=require("codemirror/lib/codemirror.js");require("codemirror/addon/mode/simple.js");var
|
|
34
|
+
var e=require("codemirror/lib/codemirror.js");require("codemirror/addon/mode/simple.js");var t=["fromPosition","toPosition","onBeat","fromPitch","toPitch","pitch","instrument","fromBeat","toBeat","fromBar","toBar","onBar","nthBar","channel","all","withTag","degree","chord","octave","phrase","template","voice"],o=["velocity","timeOffset","duration","pitch"];e.defineSimpleMode("conductions",{start:[{regex:new RegExp("".concat(t.join("|"))),token:"tag"},{regex:new RegExp("".concat(o.join("|"))),token:"property"},{regex:/[0-9]\s*%{0,1}/,token:"number"},{regex:/@{0,1}\w+/,token:"string"},{regex:/--.*/,token:"comment"},{regex:/\/\*.*\*\//,token:"comment"},{regex:/.*--WM-HIDDEN-LINE\s*$/,token:"comment wm-hidden-line"},{regex:/\/\*/,token:"comment",next:"comment"}],meta:{dontIndentStates:["comment"],lineComment:"--"},comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}]});
|
|
35
35
|
},{"codemirror/lib/codemirror.js":"tQq4","codemirror/addon/mode/simple.js":"YCgH"}],"BzA4":[function(require,module,exports) {
|
|
36
36
|
"use strict";function e(e,r){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=t(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw a}}}}function t(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}var a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return u(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{l(n.next(e))}catch(t){o(t)}}function u(e){try{l(n.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,u)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Editor=exports.Mode=void 0;var c=require("./SourceDocumentImpl"),f=l(require("lodash")),h=require("codemirror/lib/codemirror.js");require("codemirror/addon/hint/show-hint.js"),require("codemirror/mode/lua/lua.js"),require("./SheetMode"),require("./ConductionsSheetMode");var d,m="base16-dark";function v(e,t){var r=f.map(t,function(e){return"".concat(e,"?")}).join("");r=r.replace(/\./g,"\\.").replace(/\(/g,"\\(").replace(/\)/g,"\\)").replace(/\{/g,"\\{").replace(/\}/g,"\\}").replace(/\[/g,"\\[").replace(/\[/g,"\\]");var n=new RegExp("(".concat(r,")$"),"g");return(e.match(n)||[])[0]}function p(e,t){return(e.match(/.*="?(.*)/)||[])[1]}!function(e){e.sheet="sheet",e.text="text",e.lua="lua",e.conductions="conductions"}(d=exports.Mode||(exports.Mode={}));var y=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;n(this,t),this.element=e,this.eventMarkClass="wm-marked",this.errorClass="wm-error",this.warningClass="wm-warning",i=i||{theme:"default"},this.editor=h(e,{value:r,theme:i.theme,mode:d[d.sheet],lineNumbers:i.lineNumbers})}return o(t,[{key:"activateAutoCompletion",value:function(e,t){var r=this;this.languageFeatures=e,h.registerHelper("hint","wmAutoComplete",function(e,n){return s(r,void 0,void 0,regeneratorRuntime.mark(function r(){var n,i,o,a,u,l,s;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.getCursor(),i=n.ch,o=i,a=new c.ActiveSourceDocument(e,t),r.next=5,this.languageFeatures.autoComplete(a);case 5:return u=r.sent,l=function(e){return e.file?e.file.isDirectory?"isFolder":"isFile":""},s={list:u.map(function(e){return{text:e.displayText,replaceText:e.text,isValueSuggestion:!!e.parameter,className:l(e),hint:function(e,t,r){var i=r.isValueSuggestion,a=e.getRange({line:n.line,ch:0},{line:n.line,ch:n.ch}),u=r.replaceText,l=((i?p(a,u):v(a,u))||"").length,s=o-l,c=o+l;s!==c&&(c-=1),e.replaceRange(r.replaceText,h.Pos(n.line,s),h.Pos(n.line,c))}}}),from:h.Pos(n.line,o),to:h.Pos(n.line,i)},r.abrupt("return",s);case 9:case"end":return r.stop()}},r,this)}))}),h.commands.autocomplete=function(e){e.showHint({hint:h.hint.wmAutoComplete,container:r.element})};var n=function(e,t){var r=t.getCursor();t.replaceRange(e,r),h.commands.autocomplete(t)};this.editor.setOption("extraKeys",{"Ctrl-Space":"autocomplete","'\"'":n.bind(null,'"'),"'/'":n.bind(null,"/"),"'_'":n.bind(null,"_"),"'='":n.bind(null,"=")})}},{key:"setMode",value:function(e){e!==d.text?this.editor.setOption("mode",d[e]):this.editor.setOption("mode",null)}},{key:"getValue",value:function(){return this.editor.getValue()}},{key:"setValue",value:function(e){this.editor.setValue(e)}},{key:"clearEventMarkers",value:function(){var t,r=e(this.editor.getAllMarks());try{for(r.s();!(t=r.n()).done;){var n=t.value;n.className!==this.warningClass&&n.className!==this.errorClass&&n.clear()}}catch(i){r.e(i)}finally{r.f()}}},{key:"clearAllMarkers",value:function(){var t,r=e(this.editor.getAllMarks());try{for(r.s();!(t=r.n()).done;){t.value.clear()}}catch(n){r.e(n)}finally{r.f()}}},{key:"setMarker",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=this.editor.posFromIndex(e),o=this.editor.posFromIndex(t+1);return this.editor.markText(i,o,{className:r,attributes:n})}},{key:"setEventMarker",value:function(e,t){return this.setMarker(e,t,this.eventMarkClass,{"wm-doc-pos":e})}},{key:"setErrorMarker",value:function(e,t){return this.setMarker(e,t,this.errorClass)}},{key:"setWarningMarker",value:function(e,t,r){return this.setMarker(t,r,this.warningClass,{title:e})}},{key:"update",value:function(){this.editor.refresh()}},{key:"isClean",value:function(){return this.editor.isClean()}},{key:"markClean",value:function(){this.editor.markClean()}},{key:"clearHistory",value:function(){this.editor.clearHistory()}}]),t}();exports.Editor=y;
|
|
37
37
|
},{"./SourceDocumentImpl":"Glli","lodash":"B1iE","codemirror/lib/codemirror.js":"tQq4","codemirror/addon/hint/show-hint.js":"rbVD","codemirror/mode/lua/lua.js":"JTrO","./SheetMode":"edJQ","./ConductionsSheetMode":"PWBo"}],"LghJ":[function(require,module,exports) {
|
package/werckmeister.wasm
CHANGED
|
Binary file
|