annyang 2.6.0 → 3.0.0

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.
Files changed (50) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +69 -44
  3. package/dist/annyang.cjs +354 -0
  4. package/dist/annyang.cjs.map +1 -0
  5. package/dist/annyang.d.cts +288 -0
  6. package/dist/annyang.d.ts +288 -0
  7. package/dist/annyang.iife.min.js +1 -0
  8. package/dist/annyang.js +296 -670
  9. package/dist/annyang.js.map +1 -1
  10. package/package.json +54 -34
  11. package/.editorconfig +0 -13
  12. package/.github/ISSUE_TEMPLATE.md +0 -32
  13. package/.github/PULL_REQUEST_TEMPLATE.md +0 -29
  14. package/.jshintrc +0 -31
  15. package/.npmignore +0 -6
  16. package/.travis.yml +0 -22
  17. package/CONTRIBUTING.md +0 -74
  18. package/Gruntfile.js +0 -142
  19. package/bower.json +0 -25
  20. package/demo/css/main.css +0 -152
  21. package/demo/css/main.min.css +0 -1
  22. package/demo/images/flickr.png +0 -0
  23. package/demo/images/footer_background.jpg +0 -0
  24. package/demo/images/icon_js.png +0 -0
  25. package/demo/images/icon_speech.png +0 -0
  26. package/demo/images/icon_user.png +0 -0
  27. package/demo/images/mini_icon_say.png +0 -0
  28. package/demo/images/palette.png +0 -0
  29. package/demo/images/tpscover.jpg +0 -0
  30. package/demo/index.html +0 -233
  31. package/demo/vendor/css/default.css +0 -135
  32. package/demo/vendor/css/github.css +0 -127
  33. package/demo/vendor/css/tomorrow.css +0 -49
  34. package/demo/vendor/html/github-btn.html +0 -243
  35. package/demo/vendor/js/highlight.pack.js +0 -1
  36. package/dist/annyang.min.js +0 -7
  37. package/docs/FAQ.md +0 -186
  38. package/docs/README.md +0 -336
  39. package/sites/README.md +0 -6
  40. package/sites/facebook.js +0 -123
  41. package/sites/facebook.min.js +0 -12
  42. package/sites/geektime.js +0 -108
  43. package/sites/geektime.min.js +0 -12
  44. package/src/annyang.js +0 -680
  45. package/test/SpecRunner.html +0 -41
  46. package/test/init_corti.js +0 -1
  47. package/test/spec/.jshintrc +0 -40
  48. package/test/spec/BasicSpec.js +0 -1616
  49. package/test/spec/IssuesSpec.js +0 -41
  50. package/test/vendor/corti.js +0 -202
@@ -1,127 +0,0 @@
1
- /*
2
-
3
- github.com style (c) Vasily Polovnyov <vast@whiteants.net>
4
-
5
- */
6
-
7
- pre code {
8
- display: block; padding: 0.5em;
9
- color: #333;
10
- background: #f8f8ff
11
- }
12
-
13
- pre .comment,
14
- pre .template_comment,
15
- pre .diff .header,
16
- pre .javadoc {
17
- color: #998;
18
- font-style: italic
19
- }
20
-
21
- pre .keyword,
22
- pre .css .rule .keyword,
23
- pre .winutils,
24
- pre .javascript .title,
25
- pre .nginx .title,
26
- pre .subst,
27
- pre .request,
28
- pre .status {
29
- color: #333;
30
- font-weight: bold
31
- }
32
-
33
- pre .number,
34
- pre .hexcolor,
35
- pre .ruby .constant {
36
- color: #099;
37
- }
38
-
39
- pre .string,
40
- pre .tag .value,
41
- pre .phpdoc,
42
- pre .tex .formula {
43
- color: #d14
44
- }
45
-
46
- pre .title,
47
- pre .id {
48
- color: #900;
49
- font-weight: bold
50
- }
51
-
52
- pre .javascript .title,
53
- pre .lisp .title,
54
- pre .clojure .title,
55
- pre .subst {
56
- font-weight: normal
57
- }
58
-
59
- pre .class .title,
60
- pre .haskell .type,
61
- pre .vhdl .literal,
62
- pre .tex .command {
63
- color: #458;
64
- font-weight: bold
65
- }
66
-
67
- pre .tag,
68
- pre .tag .title,
69
- pre .rules .property,
70
- pre .django .tag .keyword {
71
- color: #000080;
72
- font-weight: normal
73
- }
74
-
75
- pre .attribute,
76
- pre .variable,
77
- pre .lisp .body {
78
- color: #008080
79
- }
80
-
81
- pre .regexp {
82
- color: #009926
83
- }
84
-
85
- pre .class {
86
- color: #458;
87
- font-weight: bold
88
- }
89
-
90
- pre .symbol,
91
- pre .ruby .symbol .string,
92
- pre .lisp .keyword,
93
- pre .tex .special,
94
- pre .prompt {
95
- color: #990073
96
- }
97
-
98
- pre .built_in,
99
- pre .lisp .title,
100
- pre .clojure .built_in {
101
- color: #0086b3
102
- }
103
-
104
- pre .preprocessor,
105
- pre .pi,
106
- pre .doctype,
107
- pre .shebang,
108
- pre .cdata {
109
- color: #999;
110
- font-weight: bold
111
- }
112
-
113
- pre .deletion {
114
- background: #fdd
115
- }
116
-
117
- pre .addition {
118
- background: #dfd
119
- }
120
-
121
- pre .diff .change {
122
- background: #0086b3
123
- }
124
-
125
- pre .chunk {
126
- color: #aaa
127
- }
@@ -1,49 +0,0 @@
1
- /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
2
- .tomorrow-comment, pre .comment, pre .title {
3
- color: #8e908c;
4
- }
5
-
6
- .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
7
- color: #c82829;
8
- }
9
-
10
- .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
11
- color: #f5871f;
12
- }
13
-
14
- .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
15
- color: #eab700;
16
- }
17
-
18
- .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
19
- color: #718c00;
20
- }
21
-
22
- .tomorrow-aqua, pre .css .hexcolor {
23
- color: #3e999f;
24
- }
25
-
26
- .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
27
- color: #4271ae;
28
- }
29
-
30
- .tomorrow-purple, pre .keyword, pre .javascript .function {
31
- color: #8959a8;
32
- }
33
-
34
- pre code {
35
- display: block;
36
- background: white;
37
- color: #4d4d4c;
38
- padding: 0.5em;
39
- }
40
-
41
- pre .coffeescript .javascript,
42
- pre .javascript .xml,
43
- pre .tex .formula,
44
- pre .xml .javascript,
45
- pre .xml .vbscript,
46
- pre .xml .css,
47
- pre .xml .cdata {
48
- opacity: 0.5;
49
- }
@@ -1,243 +0,0 @@
1
- <html><body><style type="text/css">
2
- body {
3
- padding: 0;
4
- margin: 0;
5
- font: bold 11px/14px "Helvetica Neue", Helvetica, Arial, sans-serif;
6
- text-rendering: optimizeLegibility;
7
- overflow: hidden;
8
- }
9
- .github-btn {
10
- height: 20px;
11
- overflow: hidden;
12
- }
13
- .gh-btn,
14
- .gh-count,
15
- .gh-ico {
16
- float: left;
17
- }
18
- .gh-btn,
19
- .gh-count {
20
- padding: 2px 5px 2px 4px;
21
- color: #555;
22
- text-decoration: none;
23
- text-shadow: 0 1px 0 #fff;
24
- white-space: nowrap;
25
- cursor: pointer;
26
- border-radius: 3px;
27
- }
28
- .gh-btn {
29
- background-color: #e6e6e6;
30
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#eaeaea));
31
- background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
32
- background-image: -moz-linear-gradient(top, #fafafa, #eaeaea);
33
- background-image: -ms-linear-gradient(#fafafa, #eaeaea);
34
- background-image: -o-linear-gradient(#fafafa, #eaeaea);
35
- background-image: linear-gradient(#fafafa, #eaeaea);
36
- background-repeat: no-repeat;
37
- border: 1px solid #d4d4d4;
38
- border-bottom-color: #bcbcbc;
39
- }
40
- .gh-btn:hover,
41
- .gh-btn:focus,
42
- .gh-btn:active {
43
- color: #fff;
44
- text-decoration: none;
45
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
46
- border-color: #518cc6 #518cc6 #2a65a0;
47
- background-color: #3072b3;
48
- }
49
- .gh-btn:hover,
50
- .gh-btn:focus {
51
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3));
52
- background-image: -webkit-linear-gradient(#599bdc, #3072b3);
53
- background-image: -moz-linear-gradient(top, #599bdc, #3072b3);
54
- background-image: -ms-linear-gradient(#599bdc, #3072b3);
55
- background-image: -o-linear-gradient(#599bdc, #3072b3);
56
- background-image: linear-gradient(#599bdc, #3072b3);
57
- }
58
- .gh-btn:active {
59
- background-image: none;
60
- -webkit-box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
61
- -moz-box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
62
- box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
63
- }
64
- .gh-ico {
65
- width: 14px;
66
- height: 15px;
67
- margin-top: -1px;
68
- margin-right: 4px;
69
- vertical-align: middle;
70
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAtCAQAAABGtvB0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB7RJREFUWMPt12tQVPcZx/HHGw0VG6yo1Y42YGIbjamT6JhEbc1AUodaJNbnsNwsFRQUsUSQQUEUNILGotFITTA2olVCI7FoiLdquOgEcFBAQS5Z5bLcXFZcdvfs7ZxfX+yqoLvQ6btO+5w3e3bOdz87+9/5n12i/3RGkSfNoV/RQppDnjTq3yjYg9O4kg2s50pOY48hg/E+v63NNtXIomww1dRmey+hCUMRywVthDKntKy8rDynNEIp9LEwaDAhL0XWohzRWIRFiEa53HdqK00cjBAEU16N9RD8MRuz4W899GWNYOQgp4FLfopsvJs4Zj79jKbRdPIas6AxURYLUukHzoiJAfqz1bsPsoq38G4+xLu4a+en528GiDzFcfGnuZIOIU0Jorr8SM3JhoKqk6YH9akQJEPSAifIij9vuo930rMYT46kfCxK7g77i+Oi7oh4hejqLvSb6uM0QrxQf8IJsrItv4AorLk/ojDx6NOnwrocF1qlOoRIq+yPWI07x/cK+lYniEI6H0IkSP0RRuys4uWC7LiQzcWvkYtsxYCp/GXhDFlyiuxcwhPDjQORfd7JvoGSM+SCb+lUa8dA5M6cc0slkxMkWpewJXNWfkWA/IRI78z2iUuP0jkujA1l2xqn1W+ApZ9xHL+4mWFUOkH2V0eVn5iR9mlb6VGlAEaK+kalnI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ekkGNVRESn/ZwhmV8QEW1ofoTIFk0ljSWPU3OdId+nkgd5qMsfI+HGMB37sH9CeJjJMZJ2nP3Y748Pw+w/3cxdolrpZ30P/nK3EyURfr2/N3Ra1HZkcwfj89AHb2PBtZIQy7NERgeC8NbVpQI2dtsK3T+B/CVwoR+3L0avA+IoEVHaXMj6a3bk6DnG+j0YyYvzlnVezPk+URNqp9bqMzqLq7GJiChiK+NQsX3h1wLlWTSy9b3EgMJp2CRftvTZXt3UiBwsISKiEWUHAHGzHakNDrIG9fLzuUEK5fb5CNYcXCnakEM3sAlvEhHxmBCNQrq9xlZggqw3ad6dh1fNyoRQennhr433bUjN4z8bb78uqmUzJttP4Z7dyAjMg1fud0IvHxduBJsZa/UrzBF3HyWBxxj7mzHu0bmUBjRfIi8pUuptL9TeseoAUWl9oK2zX+Cp/AaQnmxEROqoGB2Ddxn9Dt+JUkU+SOpmJLYmd0T1EBHxME5jROvUcU8KuMk1QNXJsa+atuG6pV5TAmiK1N/qG4nIxWVW5VFAqsWYfghclXlhJobwj4YYfHLxUnwTI74prnGNhogn8VeMMFPTKfyw//4MT7kbUJX+bim9VBSuKQI0RZqiviZ6yd9fVQLI3Xj6HoRJzedj+hiCng/E5mxsYCTWxTeGGvmAoGOs0929gJ/S042nXA1Yxbr8qhPtpUDblY5r5od1+VYDIN/CNHp2MEl3NKsl0MpgCDIj2L74gVJWi/bY4wUc2IzGh7DdfiXAorV/gUXsgRs5HjyHKPXl3MbknpVGAYIcbkzuyW1UX8EauJLTwXjEohAqyJDQhkLEYjwNPnDHcmTgS1zGZfwdGVgOd/pvmX8Bbv8r+TZ9z+kAAAAASUVORK5CYII=);
71
- background-repeat: no-repeat;
72
- background-position: 0 0;
73
- }
74
- .gh-btn:hover .gh-ico,
75
- .gh-btn:focus .gh-ico,
76
- .gh-btn:active .gh-ico {
77
- background-position: -25px 0;
78
- }
79
- .gh-count {
80
- position: relative;
81
- display: none; /* hidden to start */
82
- margin-left: 4px;
83
- background-color: #fafafa;
84
- border: 1px solid #d4d4d4;
85
- }
86
- .gh-count:hover,
87
- .gh-count:focus {
88
- color: #4183C4;
89
- }
90
- .gh-count:before,
91
- .gh-count:after {
92
- content: ' ';
93
- position: absolute;
94
- display: inline-block;
95
- width: 0;
96
- height: 0;
97
- border-color: transparent;
98
- border-style: solid;
99
- }
100
- .gh-count:before {
101
- top: 50%;
102
- left: -3px;
103
- margin-top: -4px;
104
- border-width: 4px 4px 4px 0;
105
- border-right-color: #fafafa;
106
- }
107
- .gh-count:after {
108
- top: 50%;
109
- left: -4px;
110
- z-index: -1;
111
- margin-top: -5px;
112
- border-width: 5px 5px 5px 0;
113
- border-right-color: #d4d4d4;
114
- }
115
- .github-btn-large {
116
- height: 30px;
117
- }
118
- .github-btn-large .gh-btn,
119
- .github-btn-large .gh-count {
120
- padding: 3px 10px 3px 8px;
121
- font-size: 16px;
122
- line-height: 22px;
123
- border-radius: 4px;
124
- }
125
- .github-btn-large .gh-ico {
126
- width: 22px;
127
- height: 23px;
128
- background-position: 0 -20px;
129
- }
130
- .github-btn-large .gh-btn:hover .gh-ico,
131
- .github-btn-large .gh-btn:focus .gh-ico,
132
- .github-btn-large .gh-btn:active .gh-ico {
133
- background-position: -25px -20px;
134
- }
135
- .github-btn-large .gh-count {
136
- margin-left: 6px;
137
- }
138
- .github-btn-large .gh-count:before {
139
- left: -5px;
140
- margin-top: -6px;
141
- border-width: 6px 6px 6px 0;
142
- }
143
- .github-btn-large .gh-count:after {
144
- left: -6px;
145
- margin-top: -7px;
146
- border-width: 7px 7px 7px 0;
147
- }
148
- @media (-moz-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
149
- .gh-ico {
150
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABaCAQAAADkmzsCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAE81JREFUeNrtn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Krfcm9aTuArZvsfpQWWqH3iAT7DYY2J+m5Ra9utjofbJl3cfNSxY+Jj/qlzVAFXoxvfXJ6PdLY8VdKHyJRz40YnFWLDk7Np99NPECWkDc18vCrWH2sKLBuW8n7bw3N6jebuwYGERwdxkrQi1eJ4PiCaONPLIJZXjrGYyz3DzZSIi+PEkE1zJ6FKOzYwngP+U/5xBDQKIYDKLiWYzm1nDl0ykH229/0PArXarlWz/A3bbfoDcyFIFAAAAAElFTkSuQmCC);
151
- background-size: 50px 45px;
152
- }
153
-
154
- }
155
- </style>
156
- <span class="github-btn" id="github-btn">
157
- <a class="gh-btn" id="gh-btn" href="#" target="_blank">
158
- <span class="gh-ico"></span>
159
- <span class="gh-text" id="gh-text"></span>
160
- </a>
161
- <a class="gh-count" id="gh-count" href="#" target="_blank"></a>
162
- </span>
163
- <script type="text/javascript">
164
- // Read a page's GET URL variables and return them as an associative array.
165
- // Source: http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
166
- var params = function () {
167
- var vars = [], hash;
168
- var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
169
- for(var i = 0; i < hashes.length; i++) {
170
- hash = hashes[i].split('=');
171
- vars.push(hash[0]);
172
- vars[hash[0]] = hash[1];
173
- }
174
- return vars;
175
- }()
176
- var user = params.user,
177
- repo = params.repo,
178
- type = params.type,
179
- count = params.count,
180
- size = params.size,
181
- head = document.getElementsByTagName('head')[0],
182
- button = document.getElementById('gh-btn'),
183
- mainButton = document.getElementById('github-btn'),
184
- text = document.getElementById('gh-text'),
185
- counter = document.getElementById('gh-count');
186
-
187
-
188
- // Add commas to numbers
189
- function addCommas(n) {
190
- return String(n).replace(/(\d)(?=(\d{3})+$)/g, '$1,')
191
- }
192
-
193
- function jsonp(path) {
194
- var el = document.createElement('script');
195
- el.src = path + '?callback=callback';
196
- head.insertBefore(el, head.firstChild);
197
- }
198
-
199
- function callback(obj) {
200
- if (type == 'watch') {
201
- counter.innerHTML = addCommas(obj.data.watchers);
202
- } else if (type == 'fork') {
203
- counter.innerHTML = addCommas(obj.data.forks);
204
- } else if (type == 'follow') {
205
- counter.innerHTML = addCommas(obj.data.followers);
206
- }
207
-
208
- // Show the count if asked
209
- if (count == 'true') {
210
- counter.style.display = 'block';
211
- }
212
- }
213
-
214
- // Set href to be URL for repo
215
- button.href = 'https://github.com/' + user + '/' + repo + '/';
216
-
217
- // Add the class, change the text label, set count link href
218
- if (type == 'watch') {
219
- mainButton.className += ' github-watchers';
220
- text.innerHTML = 'Star';
221
- counter.href = 'https://github.com/' + user + '/' + repo + '/stargazers';
222
- } else if (type == 'fork') {
223
- mainButton.className += ' github-forks';
224
- text.innerHTML = 'Fork';
225
- counter.href = 'https://github.com/' + user + '/' + repo + '/network';
226
- } else if (type == 'follow') {
227
- mainButton.className += ' github-me';
228
- text.innerHTML = 'Follow @' + user;
229
- button.href = 'https://github.com/' + user;
230
- counter.href = 'https://github.com/' + user + '/followers';
231
- }
232
-
233
- // Change the size
234
- if (size == 'large') {
235
- mainButton.className += ' github-btn-large';
236
- }
237
-
238
- if (type == 'follow') {
239
- jsonp('https://api.github.com/users/' + user);
240
- } else {
241
- jsonp('https://api.github.com/repos/' + user + '/' + repo);
242
- }
243
- </script></body></html>
@@ -1 +0,0 @@
1
- var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\/"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);
@@ -1,7 +0,0 @@
1
- "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};
2
- //! annyang
3
- //! version : 2.6.0
4
- //! author : Tal Ater @TalAter
5
- //! license : MIT
6
- //! https://www.TalAter.com/annyang/
7
- !function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.annyang=b(a)}):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=b(a):a.annyang=b(a)}("undefined"!=typeof window?window:void 0,function(a,b){var c,d=a.SpeechRecognition||a.webkitSpeechRecognition||a.mozSpeechRecognition||a.msSpeechRecognition||a.oSpeechRecognition;if(!d)return null;var e,f,g=[],h={start:[],error:[],end:[],soundstart:[],result:[],resultMatch:[],resultNoMatch:[],errorNetwork:[],errorPermissionBlocked:[],errorPermissionDenied:[]},i=0,j=0,k=!1,l="font-weight: bold; color: #00f;",m=!1,n=!1,o=/\s*\((.*?)\)\s*/g,p=/(\(\?:[^)]+\))\?/g,q=/(\(\?)?:\w+/g,r=/\*\w+/g,s=/[\-{}\[\]+?.,\\\^$|#]/g,t=function(a){return a=a.replace(s,"\\$&").replace(o,"(?:$1)?").replace(q,function(a,b){return b?a:"([^\\s]+)"}).replace(r,"(.*?)").replace(p,"\\s*$1?\\s*"),new RegExp("^"+a+"$","i")},u=function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];a.forEach(function(a){a.callback.apply(a.context,c)})},v=function(){return e!==b},w=function(a,b){a.indexOf("%c")!==-1||b?console.log(a,b||l):console.log(a)},x=function(){v()||c.init({},!1)},y=function(a,b,c){g.push({command:a,callback:b,originalPhrase:c}),k&&w("Command successfully loaded: %c"+c,l)},z=function(a){u(h.result,a);for(var b,c=0;c<a.length;c++){b=a[c].trim(),k&&w("Speech recognized: %c"+b,l);for(var d=0,e=g.length;d<e;d++){var f=g[d],i=f.command.exec(b);if(i){var j=i.slice(1);return k&&(w("command matched: %c"+f.originalPhrase,l),j.length&&w("with parameters",j)),f.callback.apply(this,j),void u(h.resultMatch,b,f.originalPhrase,a)}}}u(h.resultNoMatch,a)};return c={init:function(l){var o=!(arguments.length>1&&arguments[1]!==b)||arguments[1];e&&e.abort&&e.abort(),e=new d,e.maxAlternatives=5,e.continuous="http:"===a.location.protocol,e.lang="en-US",e.onstart=function(){n=!0,u(h.start)},e.onsoundstart=function(){u(h.soundstart)},e.onerror=function(a){switch(u(h.error,a),a.error){case"network":u(h.errorNetwork,a);break;case"not-allowed":case"service-not-allowed":f=!1,(new Date).getTime()-i<200?u(h.errorPermissionBlocked,a):u(h.errorPermissionDenied,a)}},e.onend=function(){if(n=!1,u(h.end),f){var a=(new Date).getTime()-i;j+=1,j%10===0&&k&&w("Speech Recognition is repeatedly stopping and starting. See http://is.gd/annyang_restarts for tips."),a<1e3?setTimeout(function(){c.start({paused:m})},1e3-a):c.start({paused:m})}},e.onresult=function(a){if(m)return k&&w("Speech heard, but annyang is paused"),!1;for(var b=a.results[a.resultIndex],c=[],d=0;d<b.length;d++)c[d]=b[d].transcript;z(c)},o&&(g=[]),l.length&&this.addCommands(l)},start:function(a){x(),a=a||{},m=a.paused!==b&&!!a.paused,f=a.autoRestart===b||!!a.autoRestart,a.continuous!==b&&(e.continuous=!!a.continuous),i=(new Date).getTime();try{e.start()}catch(a){k&&w(a.message)}},abort:function(){f=!1,j=0,v()&&e.abort()},pause:function(){m=!0},resume:function(){c.start()},debug:function(){var a=!(arguments.length>0&&arguments[0]!==b)||arguments[0];k=!!a},setLanguage:function(a){x(),e.lang=a},addCommands:function(b){var c;x();for(var d in b)if(b.hasOwnProperty(d))if(c=a[b[d]]||b[d],"function"==typeof c)y(t(d),c,d);else{if(!("object"===("undefined"==typeof c?"undefined":_typeof(c))&&c.regexp instanceof RegExp)){k&&w("Can not register command: %c"+d,l);continue}y(new RegExp(c.regexp.source,"i"),c.callback,d)}},removeCommands:function(a){a===b?g=[]:(a=Array.isArray(a)?a:[a],g=g.filter(function(b){for(var c=0;c<a.length;c++)if(a[c]===b.originalPhrase)return!1;return!0}))},addCallback:function(c,d,e){var f=a[d]||d;"function"==typeof f&&h[c]!==b&&h[c].push({callback:f,context:e||this})},removeCallback:function(a,c){var d=function(a){return a.callback!==c};for(var e in h)h.hasOwnProperty(e)&&(a!==b&&a!==e||(c===b?h[e]=[]:h[e]=h[e].filter(d)))},isListening:function(){return n&&!m},getSpeechRecognizer:function(){return e},trigger:function(a){return c.isListening()?(Array.isArray(a)||(a=[a]),void z(a)):void(k&&w(n?"Speech heard, but annyang is paused":"Cannot trigger while annyang is aborted"))}}});
package/docs/FAQ.md DELETED
@@ -1,186 +0,0 @@
1
- # Frequently Asked Questions
2
-
3
- - [What languages are supported?](#what-languages-are-supported)
4
- - [Why does the browser repeatedly ask for permission to use the microphone?](#why-does-the-browser-repeatedly-ask-for-permission-to-use-the-microphone)
5
- - [How can I contribute to annyang's development?](#how-can-i-contribute-to-annyangs-development)
6
- - [Why does Speech Recognition repeatedly starts and stops?](#why-does-speech-recognition-repeatedly-starts-and-stops)
7
- - [Can annyang work offline?](#can-annyang-work-offline)
8
- - [Can annyang be used to capture the full text spoken by the user?](#can-annyang-be-used-to-capture-the-full-text-spoken-by-the-user)
9
- - [Can I detect when the user starts and stops speaking?](#can-i-detect-when-the-user-starts-and-stops-speaking)
10
- - [Can annyang be used in Chromium or Electron?](#can-annyang-be-used-in-chromium-or-electron)
11
- - [Can annyang be used in Cordova?](#can-annyang-be-used-in-cordova)
12
-
13
- ## What languages are supported?
14
-
15
- Language support is up to each browser. While there isn't an official list of supported languages in Chrome, here is a list based on [anecdotal evidence](http://stackoverflow.com/a/14302134/338039).
16
-
17
- * Afrikaans `af`
18
- * Basque `eu`
19
- * Bulgarian `bg`
20
- * Catalan `ca`
21
- * Arabic (Egypt) `ar-EG`
22
- * Arabic (Jordan) `ar-JO`
23
- * Arabic (Kuwait) `ar-KW`
24
- * Arabic (Lebanon) `ar-LB`
25
- * Arabic (Qatar) `ar-QA`
26
- * Arabic (UAE) `ar-AE`
27
- * Arabic (Morocco) `ar-MA`
28
- * Arabic (Iraq) `ar-IQ`
29
- * Arabic (Algeria) `ar-DZ`
30
- * Arabic (Bahrain) `ar-BH`
31
- * Arabic (Lybia) `ar-LY`
32
- * Arabic (Oman) `ar-OM`
33
- * Arabic (Saudi Arabia) `ar-SA`
34
- * Arabic (Tunisia) `ar-TN`
35
- * Arabic (Yemen) `ar-YE`
36
- * Czech `cs`
37
- * Dutch `nl-NL`
38
- * English (Australia) `en-AU`
39
- * English (Canada) `en-CA`
40
- * English (India) `en-IN`
41
- * English (New Zealand) `en-NZ`
42
- * English (South Africa) `en-ZA`
43
- * English(UK) `en-GB`
44
- * English(US) `en-US`
45
- * Finnish `fi`
46
- * French `fr-FR`
47
- * Galician `gl`
48
- * German `de-DE`
49
- * Hebrew `he`
50
- * Hungarian `hu`
51
- * Icelandic `is`
52
- * Italian `it-IT`
53
- * Indonesian `id`
54
- * Japanese `ja`
55
- * Korean `ko`
56
- * Latin `la`
57
- * Mandarin Chinese `zh-CN`
58
- * Traditional Taiwan `zh-TW`
59
- * Simplified China zh-CN `?`
60
- * Simplified Hong Kong `zh-HK`
61
- * Yue Chinese (Traditional Hong Kong) `zh-yue`
62
- * Malaysian `ms-MY`
63
- * Norwegian `no-NO`
64
- * Polish `pl`
65
- * Pig Latin `xx-piglatin`
66
- * Portuguese `pt-PT`
67
- * Portuguese (Brasil) `pt-BR`
68
- * Romanian `ro-RO`
69
- * Russian `ru`
70
- * Serbian `sr-SP`
71
- * Slovak `sk`
72
- * Spanish (Argentina) `es-AR`
73
- * Spanish (Bolivia) `es-BO`
74
- * Spanish (Chile) `es-CL`
75
- * Spanish (Colombia) `es-CO`
76
- * Spanish (Costa Rica) `es-CR`
77
- * Spanish (Dominican Republic) `es-DO`
78
- * Spanish (Ecuador) `es-EC`
79
- * Spanish (El Salvador) `es-SV`
80
- * Spanish (Guatemala) `es-GT`
81
- * Spanish (Honduras) `es-HN`
82
- * Spanish (Mexico) `es-MX`
83
- * Spanish (Nicaragua) `es-NI`
84
- * Spanish (Panama) `es-PA`
85
- * Spanish (Paraguay) `es-PY`
86
- * Spanish (Peru) `es-PE`
87
- * Spanish (Puerto Rico) `es-PR`
88
- * Spanish (Spain) `es-ES`
89
- * Spanish (US) `es-US`
90
- * Spanish (Uruguay) `es-UY`
91
- * Spanish (Venezuela) `es-VE`
92
- * Swedish `sv-SE`
93
- * Turkish `tr`
94
- * Zulu `zu`
95
-
96
- ## Why does the browser repeatedly ask for permission to use the microphone?
97
-
98
- ![](http://i.imgur.com/Z3zooUC.png)
99
-
100
- Chrome's speech recognition behaves differently based on the protocol used:
101
-
102
- - `https://` Asks for permission once and remembers the choice.
103
-
104
- - `http://` Asks for permission repeatedly **on every page load**. Results are also returned significantly slower in HTTP.
105
-
106
- For a great user experience, don't compromise on anything less than HTTPS (available free with CloudFlare and Let's Encrypt).
107
-
108
- ## How can I contribute to annyang's development?
109
-
110
- There are three main ways for you to help. Check out the [CONTRIBUTING](https://github.com/TalAter/annyang/blob/master/CONTRIBUTING.md) guide for more details.
111
-
112
- ## Why does Speech Recognition repeatedly starts and stops?
113
-
114
- The most common reason for this is because you have opened more than one tab or window that uses Speech Recognition in your browser at the same time (e.g. if you open annyang's homepage in one tab, and the Speech Recognition app you are developing in another).
115
-
116
- When a browser detects that one tab has started Speech Recognition, it aborts all other Speech Recognition processes in other tabs. annyang detects when it is aborted by an external process and restarts itself. If you have two windows aborting each other, and restarting themselves you may experience Speech Recognition starting and stopping over and over again.
117
-
118
- Another possible reason for this might be that you are offline.
119
-
120
- ## Can annyang work offline?
121
-
122
- No. annyang relies on the browser's own speech recognition engine. In Chrome, this engine performs the recognition in the cloud.
123
-
124
- ## Can annyang be used to capture the full text spoken by the user?
125
-
126
- Yes. You can listen to the `result` event which is triggered whenever speech is recognized. This event will fire with a list of possible phrases the user may have said, regardless of whether any of them matched an annyang command or not. You can even do this without registering any commands:
127
-
128
- ````javascript
129
- annyang.addCallback('result', function(phrases) {
130
- console.log("I think the user said: ", phrases[0]);
131
- console.log("But then again, it could be any of the following: ", phrases);
132
- });
133
- ````
134
-
135
- Alternatively, you may choose to only capture what the user said when it matches an annyang command (`resultMatch`), or when it does not match a command (`resultNoMatch`).
136
-
137
- ````javascript
138
- annyang.addCallback('resultMatch', function(userSaid, commandText, phrases) {
139
- console.log(userSaid); // sample output: 'hello'
140
- console.log(commandText); // sample output: 'hello (there)'
141
- console.log(phrases); // sample output: ['hello', 'halo', 'yellow', 'polo', 'hello kitty']
142
- });
143
-
144
- annyang.addCallback('resultNoMatch', function(phrases) {
145
- console.log("I think the user said: ", phrases[0]);
146
- console.log("But then again, it could be any of the following: ", phrases);
147
- });
148
- ````
149
-
150
- ## Can I detect when the user starts and stops speaking?
151
-
152
- Yes. Sometimes.
153
-
154
- You can detect when a sound is first detected by the microphone with the `soundstart` event. Unfortunately, due to a [bug in Chrome](https://bugs.chromium.org/p/chromium/issues/detail?id=572697&thanks=572697&ts=1451323087), this event will only fire once in every speech recognition session. If you are in non-continuous mode and annyang is restarting after every sentence recognized (the default in HTTPS), this will not be a problem. Because speech recognition will abort and restart, soundstart will fire again correctly.
155
-
156
- The following code will detect when a user starts and stops speaking.
157
-
158
- ````javascript
159
- annyang.addCallback('soundstart', function() {
160
- console.log('sound detected');
161
- });
162
-
163
- annyang.addCallback('result', function() {
164
- console.log('sound stopped');
165
- });
166
-
167
- ````
168
-
169
- *Note*: The `soundstart` event is only available in annyang v2.6.0 and up.
170
-
171
- ## Can annyang be used in Chromium or Electron?
172
-
173
- Yes, however you must create your own Chromium keys and are limited to 50 requests/day. To do this you'll need to provide your own keys at runtime by following the instructions for [Acquiring Keys](https://www.chromium.org/developers/how-tos/api-keys) in the Chromium developer docs.
174
-
175
- ## Can annyang be used in Cordova?
176
-
177
- Yes. In order to use `webKitSpeechRecognition` you will need to use [Crosswalk](https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview) and the [Cordova Media Plugin](https://github.com/apache/cordova-plugin-media). These can be added to an existing cordova project with the following commands:
178
-
179
- ```
180
- cordova plugin add cordova-plugin-crosswalk-webview
181
- cordova plugin add cordova-plugin-media
182
- ```
183
- **Known issues:**
184
- - This has only been verified to work on Android.
185
- - This will not work on a device without a SpeechRecognizer ([like the Kindle Fire](https://forums.developer.amazon.com/questions/13597/does-speech-recognition-work-in-kindle-fire-hd-tab.html)) unless you sideload the [Google Now Launcher](https://play.google.com/store/apps/details?id=com.google.android.launcher).
186
- - Your app will ding with the native speech recognition sound, you have no control over this. See [#194](https://github.com/TalAter/annyang/issues/194).