qword 1.1.11 → 1.1.13

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 (73) hide show
  1. package/ChangeLog +10 -0
  2. package/bower.json +25 -0
  3. package/client/_clipboard.js +50 -0
  4. package/client/_init-socket.js +76 -0
  5. package/client/_on-save.js +38 -0
  6. package/client/content.d.ts +8 -0
  7. package/client/content.js +14 -0
  8. package/client/create.d.ts +33 -0
  9. package/client/create.js +101 -0
  10. package/client/decorations.d.ts +38 -0
  11. package/client/decorations.js +110 -0
  12. package/client/dom.d.ts +8 -0
  13. package/client/dom.js +17 -0
  14. package/client/editor.d.ts +46 -0
  15. package/client/editor.js +178 -0
  16. package/client/events.d.ts +8 -0
  17. package/client/events.js +8 -0
  18. package/client/highlight.d.ts +3 -0
  19. package/client/highlight.js +82 -0
  20. package/client/history.d.ts +5 -0
  21. package/client/history.js +14 -0
  22. package/client/index.d.ts +60 -0
  23. package/client/index.js +38 -0
  24. package/client/loadremote.js +102 -0
  25. package/client/options.d.ts +31 -0
  26. package/client/options.js +70 -0
  27. package/client/position.d.ts +19 -0
  28. package/client/position.js +33 -0
  29. package/client/qword.js +196 -0
  30. package/client/save.js +53 -0
  31. package/client/scroll.d.ts +11 -0
  32. package/client/scroll.js +9 -0
  33. package/client/show-message.js +30 -0
  34. package/client/story.js +55 -0
  35. package/client/types.d.ts +28 -0
  36. package/dist/qword.js +1 -1
  37. package/dist/qword.js.map +1 -1
  38. package/dist-dev/qword.js +1 -1
  39. package/package.json +1 -1
  40. package/modules/cm-searchbox/ChangeLog +0 -60
  41. package/modules/cm-searchbox/LICENSE +0 -21
  42. package/modules/cm-searchbox/README.md +0 -27
  43. package/modules/cm-searchbox/img/searchbox.png +0 -0
  44. package/modules/cm-searchbox/lib/searchbox.js +0 -679
  45. package/modules/cm-searchbox/package.json +0 -27
  46. package/modules/cm-show-invisibles/ChangeLog +0 -108
  47. package/modules/cm-show-invisibles/LICENSE +0 -21
  48. package/modules/cm-show-invisibles/README.md +0 -25
  49. package/modules/cm-show-invisibles/lib/show-invisibles.js +0 -131
  50. package/modules/cm-show-invisibles/package.json +0 -34
  51. package/modules/codemirror-emmet/README.md +0 -56
  52. package/modules/codemirror-emmet/dist/emmet.js +0 -48661
  53. package/modules/codemirror-emmet/dist/emmet.min.js +0 -8
  54. package/modules/codemirror-emmet/dist/emmetPlugin.js +0 -840
  55. package/modules/codemirror-emmet/dist/emmetPlugin.min.js +0 -1
  56. package/modules/codemirror-emmet/dist/index.html +0 -46
  57. package/modules/codemirror-emmet/editor.js +0 -204
  58. package/modules/codemirror-emmet/gulpfile.js +0 -54
  59. package/modules/codemirror-emmet/index.html +0 -68
  60. package/modules/codemirror-emmet/package.json +0 -36
  61. package/modules/codemirror-emmet/plugin.js +0 -201
  62. package/modules/codemirror-emmet/shim.js +0 -19
  63. package/modules/codemirror-emmet/vendor/almond.js +0 -410
  64. package/modules/codemirror-emmet/vendor/codemirror/v4/codemirror.css +0 -270
  65. package/modules/codemirror-emmet/vendor/codemirror/v4/codemirror.js +0 -7339
  66. package/modules/codemirror-emmet/vendor/codemirror/v4/css.js +0 -701
  67. package/modules/codemirror-emmet/vendor/codemirror/v4/htmlmixed.js +0 -117
  68. package/modules/codemirror-emmet/vendor/codemirror/v4/xml.js +0 -349
  69. package/modules/loadremote/ChangeLog +0 -23
  70. package/modules/loadremote/LICENSE +0 -21
  71. package/modules/loadremote/README.md +0 -53
  72. package/modules/loadremote/lib/loadremote.js +0 -147
  73. package/modules/loadremote/package.json +0 -26
@@ -1,147 +0,0 @@
1
- var exec, load;
2
-
3
- (function(global) {
4
- 'use strict';
5
-
6
- if (typeof module !== 'undefined' && module.exports)
7
- module.exports = new LoadRemote();
8
- else
9
- global.loadRemote = new LoadRemote();
10
-
11
- function LoadRemote() {
12
- var onceModules = amemo(loadModules),
13
- onceOptions = amemo(loadOptions),
14
-
15
- loadRemote = function(name, options, callback) {
16
- var o = options,
17
- prefix = o.prefix || '',
18
- funcs = [
19
- onceModules,
20
- onceOptions
21
- ].map(function(fn) {
22
- return setPrefix(prefix, fn);
23
- });
24
-
25
- if (!callback) {
26
- callback = options;
27
- o = {};
28
- }
29
-
30
- if (o.name && global[o.name])
31
- return callback();
32
-
33
- exec.parallel(funcs, function(error, modules, config) {
34
- var remoteTmpls, local, remote,
35
- online, module, isArray, version,
36
- moduleName,
37
-
38
- funcON = function() {
39
- load.parallel(remote, function(error) {
40
- if (error)
41
- funcOFF();
42
- else
43
- callback();
44
- });
45
- },
46
-
47
- funcOFF = function() {
48
- load.parallel(local, callback);
49
- };
50
-
51
- if (error) {
52
- if (!module)
53
- moduleName = 'module';
54
-
55
- if (!config)
56
- moduleName = 'config';
57
-
58
- alert('Error: could not load ' + moduleName);
59
-
60
- return;
61
- }
62
-
63
- online = config.online && navigator.onLine,
64
- module = binom(name, modules),
65
-
66
- isArray = Array.isArray(module.local),
67
- version = module.version;
68
-
69
- if (isArray) {
70
- remoteTmpls = module.remote;
71
- local = module.local;
72
- } else {
73
- remoteTmpls = [module.remote];
74
- local = [module.local];
75
- }
76
-
77
- local = local.map(function(url) {
78
- return prefix + url;
79
- });
80
-
81
- remote = remoteTmpls.map(function(tmpl) {
82
- return tmpl.replace(/{{\sversion\s}}/g, version);
83
- });
84
-
85
- exec.if(online, funcON, funcOFF);
86
- });
87
- };
88
-
89
- loadRemote.load = loadRemote;
90
-
91
- function setPrefix(prefix, fn) {
92
- return fn.bind(null, prefix);
93
- }
94
-
95
- function amemo(fn) {
96
- var result;
97
-
98
- return function(prefix, callback) {
99
- if (result)
100
- callback(null, result);
101
- else
102
- fn(prefix, function(error, data) {
103
- if (data)
104
- result = data;
105
-
106
- callback(error, result);
107
- });
108
- };
109
- }
110
-
111
- function loadModules(prefix, callback) {
112
- var url = prefix + '/modules.json';
113
-
114
- load.json(url, callback);
115
- }
116
-
117
- function loadOptions(prefix, callback) {
118
- var url = prefix + '/options.json';
119
-
120
- load.json(url, callback);
121
- }
122
-
123
- function binom(name, array) {
124
- var ret;
125
-
126
- if (typeof name !== 'string')
127
- throw(Error('name should be string!'));
128
-
129
- if (!Array.isArray(array))
130
- throw(Error('array should be array!'));
131
-
132
- array.some(function(item) {
133
- var is = item.name === name;
134
-
135
- if (is)
136
- ret = item;
137
-
138
- return is;
139
- });
140
-
141
- return ret;
142
- }
143
-
144
- return loadRemote;
145
- }
146
-
147
- })(this);
@@ -1,26 +0,0 @@
1
- {
2
- "name": "loadremote",
3
- "private": true,
4
- "version": "1.2.0",
5
- "description": "library for loading modules from cdn or local file system",
6
- "main": "lib/loadremote.js",
7
- "dependencies": {},
8
- "devDependencies": {},
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "git://github.com/cloudcmd/loadremote.git"
15
- },
16
- "keywords": [
17
- "load",
18
- "remote"
19
- ],
20
- "author": "coderaiser <mnemonic.enemy@gmail.com> (http://coderaiser.github.io/)",
21
- "license": "MIT",
22
- "bugs": {
23
- "url": "https://github.com/cloudcmd/loadremote/issues"
24
- },
25
- "homepage": "https://github.com/cloudcmd/loadremote"
26
- }