pdfjs-dist 2.0.943 → 2.4.456

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.

Potentially problematic release.


This version of pdfjs-dist might be problematic. Click here for more details.

Files changed (192) hide show
  1. package/CODE_OF_CONDUCT.md +15 -0
  2. package/README.md +4 -0
  3. package/bower.json +1 -1
  4. package/build/pdf.js +8286 -14230
  5. package/build/pdf.js.map +1 -1
  6. package/build/pdf.min.js +22 -1
  7. package/build/pdf.worker.entry.js +5 -3
  8. package/build/pdf.worker.js +25500 -26628
  9. package/build/pdf.worker.js.map +1 -1
  10. package/build/pdf.worker.min.js +22 -1
  11. package/es5/build/pdf.js +25473 -0
  12. package/es5/build/pdf.js.map +1 -0
  13. package/{lib/shared/global_scope.js → es5/build/pdf.worker.entry.js} +5 -10
  14. package/es5/build/pdf.worker.js +57878 -0
  15. package/es5/build/pdf.worker.js.map +1 -0
  16. package/es5/web/images/annotation-check.svg +11 -0
  17. package/es5/web/images/annotation-comment.svg +16 -0
  18. package/es5/web/images/annotation-help.svg +26 -0
  19. package/es5/web/images/annotation-insert.svg +10 -0
  20. package/es5/web/images/annotation-key.svg +11 -0
  21. package/es5/web/images/annotation-newparagraph.svg +11 -0
  22. package/es5/web/images/annotation-noicon.svg +7 -0
  23. package/es5/web/images/annotation-note.svg +42 -0
  24. package/es5/web/images/annotation-paragraph.svg +16 -0
  25. package/es5/web/images/loading-icon.gif +0 -0
  26. package/es5/web/images/shadow.png +0 -0
  27. package/es5/web/images/texture.png +0 -0
  28. package/es5/web/pdf_viewer.css +407 -0
  29. package/es5/web/pdf_viewer.js +7757 -0
  30. package/es5/web/pdf_viewer.js.map +1 -0
  31. package/image_decoders/pdf.image_decoders.js +2887 -4094
  32. package/image_decoders/pdf.image_decoders.js.map +1 -1
  33. package/image_decoders/pdf.image_decoders.min.js +22 -1
  34. package/lib/README.md +7 -0
  35. package/lib/core/annotation.js +855 -778
  36. package/lib/core/arithmetic_decoder.js +325 -311
  37. package/lib/core/bidi.js +117 -50
  38. package/lib/core/ccitt.js +251 -89
  39. package/lib/core/ccitt_stream.js +26 -16
  40. package/lib/core/cff_parser.js +525 -197
  41. package/lib/core/charsets.js +6 -5
  42. package/lib/core/chunked_stream.js +541 -406
  43. package/lib/core/cmap.js +368 -253
  44. package/lib/core/colorspace.js +781 -800
  45. package/lib/core/core_utils.js +152 -0
  46. package/lib/core/crypto.js +609 -422
  47. package/lib/core/document.js +649 -481
  48. package/lib/core/encodings.js +33 -24
  49. package/lib/core/evaluator.js +1471 -736
  50. package/lib/core/font_renderer.js +289 -149
  51. package/lib/core/fonts.js +1067 -413
  52. package/lib/core/function.js +517 -287
  53. package/lib/core/glyphlist.js +4529 -4527
  54. package/lib/core/image.js +232 -114
  55. package/lib/core/image_utils.js +94 -0
  56. package/lib/core/jbig2.js +711 -342
  57. package/lib/core/jbig2_stream.js +31 -19
  58. package/lib/core/jpeg_stream.js +151 -26
  59. package/lib/core/jpg.js +433 -181
  60. package/lib/core/jpx.js +551 -143
  61. package/lib/core/jpx_stream.js +40 -28
  62. package/lib/core/metrics.js +2931 -2931
  63. package/lib/core/murmurhash3.js +104 -97
  64. package/lib/core/obj.js +1561 -1053
  65. package/lib/core/operator_list.js +192 -64
  66. package/lib/core/parser.js +1162 -864
  67. package/lib/core/pattern.js +224 -75
  68. package/lib/core/pdf_manager.js +154 -285
  69. package/lib/core/primitives.js +145 -69
  70. package/lib/core/ps_parser.js +212 -162
  71. package/lib/core/standard_fonts.js +245 -244
  72. package/lib/core/stream.js +353 -81
  73. package/lib/core/type1_parser.js +218 -68
  74. package/lib/core/unicode.js +1682 -1655
  75. package/lib/core/worker.js +233 -302
  76. package/lib/core/worker_stream.js +168 -0
  77. package/lib/display/annotation_layer.js +808 -862
  78. package/lib/display/api.js +1778 -1462
  79. package/lib/display/api_compatibility.js +14 -9
  80. package/lib/display/canvas.js +463 -140
  81. package/lib/display/content_disposition.js +86 -58
  82. package/lib/display/display_utils.js +524 -0
  83. package/lib/display/fetch_stream.js +202 -274
  84. package/lib/display/font_loader.js +311 -333
  85. package/lib/display/metadata.js +98 -88
  86. package/lib/display/network.js +343 -347
  87. package/lib/display/network_utils.js +46 -26
  88. package/lib/display/node_stream.js +326 -404
  89. package/lib/display/pattern_helper.js +168 -69
  90. package/lib/display/svg.js +1296 -885
  91. package/lib/display/text_layer.js +229 -103
  92. package/lib/display/transport_stream.js +290 -250
  93. package/lib/display/webgl.js +116 -83
  94. package/lib/display/worker_options.js +6 -5
  95. package/lib/display/xml_parser.js +358 -337
  96. package/lib/examples/node/domstubs.js +95 -39
  97. package/lib/pdf.js +49 -31
  98. package/lib/pdf.worker.js +7 -5
  99. package/lib/shared/compatibility.js +3 -145
  100. package/lib/shared/is_node.js +8 -7
  101. package/lib/shared/message_handler.js +367 -314
  102. package/lib/shared/util.js +421 -415
  103. package/lib/test/unit/annotation_spec.js +1570 -690
  104. package/lib/test/unit/api_spec.js +855 -493
  105. package/lib/test/unit/bidi_spec.js +12 -12
  106. package/lib/test/unit/cff_parser_spec.js +88 -61
  107. package/lib/test/unit/clitests_helper.js +9 -12
  108. package/lib/test/unit/cmap_spec.js +140 -88
  109. package/lib/test/unit/colorspace_spec.js +204 -152
  110. package/lib/test/unit/core_utils_spec.js +211 -0
  111. package/lib/test/unit/crypto_spec.js +194 -182
  112. package/lib/test/unit/custom_spec.js +50 -64
  113. package/lib/test/unit/display_svg_spec.js +53 -38
  114. package/lib/test/unit/display_utils_spec.js +263 -0
  115. package/lib/test/unit/document_spec.js +17 -22
  116. package/lib/test/unit/encodings_spec.js +15 -57
  117. package/lib/test/unit/evaluator_spec.js +90 -83
  118. package/lib/test/unit/fetch_stream_spec.js +111 -0
  119. package/lib/test/unit/function_spec.js +219 -205
  120. package/lib/test/unit/jasmine-boot.js +68 -39
  121. package/lib/test/unit/message_handler_spec.js +187 -160
  122. package/lib/test/unit/metadata_spec.js +87 -34
  123. package/lib/test/unit/murmurhash3_spec.js +13 -13
  124. package/lib/test/unit/network_spec.js +26 -59
  125. package/lib/test/unit/network_utils_spec.js +187 -121
  126. package/lib/test/unit/node_stream_spec.js +98 -90
  127. package/lib/test/unit/parser_spec.js +173 -131
  128. package/lib/test/unit/pdf_find_controller_spec.js +148 -67
  129. package/lib/test/unit/pdf_find_utils_spec.js +35 -34
  130. package/lib/test/unit/pdf_history_spec.js +45 -33
  131. package/lib/test/unit/primitives_spec.js +161 -126
  132. package/lib/test/unit/stream_spec.js +22 -15
  133. package/lib/test/unit/test_utils.js +149 -98
  134. package/lib/test/unit/testreporter.js +36 -18
  135. package/lib/test/unit/type1_parser_spec.js +46 -44
  136. package/lib/test/unit/ui_utils_spec.js +388 -372
  137. package/lib/test/unit/unicode_spec.js +49 -46
  138. package/lib/test/unit/util_spec.js +144 -248
  139. package/lib/web/annotation_layer_builder.js +75 -95
  140. package/lib/web/app.js +1538 -1147
  141. package/lib/web/app_options.js +116 -104
  142. package/lib/web/base_viewer.js +950 -775
  143. package/lib/web/chromecom.js +217 -225
  144. package/lib/web/debugger.js +236 -148
  145. package/lib/web/download_manager.js +50 -50
  146. package/lib/web/firefox_print_service.js +51 -33
  147. package/lib/web/firefoxcom.js +225 -352
  148. package/lib/web/genericcom.js +30 -93
  149. package/lib/web/genericl10n.js +26 -143
  150. package/lib/web/grab_to_pan.js +57 -33
  151. package/lib/web/interfaces.js +105 -232
  152. package/lib/web/overlay_manager.js +73 -227
  153. package/lib/web/password_prompt.js +44 -62
  154. package/lib/web/pdf_attachment_viewer.js +118 -123
  155. package/lib/web/pdf_cursor_tools.js +89 -93
  156. package/lib/web/pdf_document_properties.js +242 -281
  157. package/lib/web/pdf_find_bar.js +157 -163
  158. package/lib/web/pdf_find_controller.js +598 -454
  159. package/lib/web/pdf_find_utils.js +32 -16
  160. package/lib/web/pdf_history.js +481 -355
  161. package/lib/web/pdf_link_service.js +355 -323
  162. package/lib/web/pdf_outline_viewer.js +167 -152
  163. package/lib/web/pdf_page_view.js +511 -457
  164. package/lib/web/pdf_presentation_mode.js +347 -335
  165. package/lib/web/pdf_print_service.js +133 -103
  166. package/lib/web/pdf_rendering_queue.js +98 -100
  167. package/lib/web/pdf_sidebar.js +323 -299
  168. package/lib/web/pdf_sidebar_resizer.js +107 -108
  169. package/lib/web/pdf_single_page_viewer.js +94 -146
  170. package/lib/web/pdf_thumbnail_view.js +319 -269
  171. package/lib/web/pdf_thumbnail_viewer.js +219 -199
  172. package/lib/web/pdf_viewer.component.js +111 -32
  173. package/lib/web/pdf_viewer.js +61 -101
  174. package/lib/web/preferences.js +87 -272
  175. package/lib/web/secondary_toolbar.js +207 -220
  176. package/lib/web/text_layer_builder.js +322 -322
  177. package/lib/web/toolbar.js +227 -180
  178. package/lib/web/ui_utils.js +476 -421
  179. package/lib/web/view_history.js +59 -208
  180. package/lib/web/viewer_compatibility.js +9 -6
  181. package/package.json +2 -9
  182. package/web/pdf_viewer.css +36 -22
  183. package/web/pdf_viewer.js +4407 -4516
  184. package/web/pdf_viewer.js.map +1 -1
  185. package/webpack.js +14 -5
  186. package/external/streams/streams-lib.js +0 -3962
  187. package/external/url/url-lib.js +0 -627
  188. package/lib/display/dom_utils.js +0 -441
  189. package/lib/shared/streams_polyfill.js +0 -39
  190. package/lib/shared/url_polyfill.js +0 -50
  191. package/lib/test/unit/dom_utils_spec.js +0 -89
  192. package/lib/web/dom_events.js +0 -140
@@ -2,7 +2,7 @@
2
2
  * @licstart The following is the entire license notice for the
3
3
  * Javascript code in this page
4
4
  *
5
- * Copyright 2018 Mozilla Foundation
5
+ * Copyright 2020 Mozilla Foundation
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -19,243 +19,94 @@
19
19
  * @licend The above is the entire license notice for the
20
20
  * Javascript code in this page
21
21
  */
22
- 'use strict';
22
+ "use strict";
23
23
 
24
24
  Object.defineProperty(exports, "__esModule", {
25
25
  value: true
26
26
  });
27
- exports.ViewHistory = undefined;
28
-
29
- var _regenerator = require('babel-runtime/regenerator');
30
-
31
- var _regenerator2 = _interopRequireDefault(_regenerator);
32
-
33
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
34
-
35
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36
-
37
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
38
-
39
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
40
-
41
- var DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;
42
-
43
- var ViewHistory = function () {
44
- function ViewHistory(fingerprint) {
45
- var _this = this;
46
-
47
- var cacheSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_VIEW_HISTORY_CACHE_SIZE;
48
-
49
- _classCallCheck(this, ViewHistory);
27
+ exports.ViewHistory = void 0;
28
+ const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;
50
29
 
30
+ class ViewHistory {
31
+ constructor(fingerprint, cacheSize = DEFAULT_VIEW_HISTORY_CACHE_SIZE) {
51
32
  this.fingerprint = fingerprint;
52
33
  this.cacheSize = cacheSize;
53
- this._initializedPromise = this._readFromStorage().then(function (databaseStr) {
54
- var database = JSON.parse(databaseStr || '{}');
55
- if (!('files' in database)) {
34
+ this._initializedPromise = this._readFromStorage().then(databaseStr => {
35
+ const database = JSON.parse(databaseStr || "{}");
36
+
37
+ if (!("files" in database)) {
56
38
  database.files = [];
57
39
  } else {
58
- while (database.files.length >= _this.cacheSize) {
40
+ while (database.files.length >= this.cacheSize) {
59
41
  database.files.shift();
60
42
  }
61
43
  }
62
- var index = -1;
63
- for (var i = 0, length = database.files.length; i < length; i++) {
64
- var branch = database.files[i];
65
- if (branch.fingerprint === _this.fingerprint) {
44
+
45
+ let index = -1;
46
+
47
+ for (let i = 0, length = database.files.length; i < length; i++) {
48
+ const branch = database.files[i];
49
+
50
+ if (branch.fingerprint === this.fingerprint) {
66
51
  index = i;
67
52
  break;
68
53
  }
69
54
  }
55
+
70
56
  if (index === -1) {
71
- index = database.files.push({ fingerprint: _this.fingerprint }) - 1;
57
+ index = database.files.push({
58
+ fingerprint: this.fingerprint
59
+ }) - 1;
72
60
  }
73
- _this.file = database.files[index];
74
- _this.database = database;
61
+
62
+ this.file = database.files[index];
63
+ this.database = database;
75
64
  });
76
65
  }
77
66
 
78
- _createClass(ViewHistory, [{
79
- key: '_writeToStorage',
80
- value: function () {
81
- var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
82
- var databaseStr;
83
- return _regenerator2.default.wrap(function _callee$(_context) {
84
- while (1) {
85
- switch (_context.prev = _context.next) {
86
- case 0:
87
- databaseStr = JSON.stringify(this.database);
88
-
89
- localStorage.setItem('pdfjs.history', databaseStr);
90
-
91
- case 2:
92
- case 'end':
93
- return _context.stop();
94
- }
95
- }
96
- }, _callee, this);
97
- }));
98
-
99
- function _writeToStorage() {
100
- return _ref.apply(this, arguments);
101
- }
102
-
103
- return _writeToStorage;
104
- }()
105
- }, {
106
- key: '_readFromStorage',
107
- value: function () {
108
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
109
- return _regenerator2.default.wrap(function _callee2$(_context2) {
110
- while (1) {
111
- switch (_context2.prev = _context2.next) {
112
- case 0:
113
- return _context2.abrupt('return', localStorage.getItem('pdfjs.history'));
114
-
115
- case 1:
116
- case 'end':
117
- return _context2.stop();
118
- }
119
- }
120
- }, _callee2, this);
121
- }));
122
-
123
- function _readFromStorage() {
124
- return _ref2.apply(this, arguments);
125
- }
126
-
127
- return _readFromStorage;
128
- }()
129
- }, {
130
- key: 'set',
131
- value: function () {
132
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee3(name, val) {
133
- return _regenerator2.default.wrap(function _callee3$(_context3) {
134
- while (1) {
135
- switch (_context3.prev = _context3.next) {
136
- case 0:
137
- _context3.next = 2;
138
- return this._initializedPromise;
139
-
140
- case 2:
141
- this.file[name] = val;
142
- return _context3.abrupt('return', this._writeToStorage());
143
-
144
- case 4:
145
- case 'end':
146
- return _context3.stop();
147
- }
148
- }
149
- }, _callee3, this);
150
- }));
151
-
152
- function set(_x2, _x3) {
153
- return _ref3.apply(this, arguments);
154
- }
155
-
156
- return set;
157
- }()
158
- }, {
159
- key: 'setMultiple',
160
- value: function () {
161
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee4(properties) {
162
- var name;
163
- return _regenerator2.default.wrap(function _callee4$(_context4) {
164
- while (1) {
165
- switch (_context4.prev = _context4.next) {
166
- case 0:
167
- _context4.next = 2;
168
- return this._initializedPromise;
169
-
170
- case 2:
171
- for (name in properties) {
172
- this.file[name] = properties[name];
173
- }
174
- return _context4.abrupt('return', this._writeToStorage());
175
-
176
- case 4:
177
- case 'end':
178
- return _context4.stop();
179
- }
180
- }
181
- }, _callee4, this);
182
- }));
183
-
184
- function setMultiple(_x4) {
185
- return _ref4.apply(this, arguments);
186
- }
187
-
188
- return setMultiple;
189
- }()
190
- }, {
191
- key: 'get',
192
- value: function () {
193
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee5(name, defaultValue) {
194
- var val;
195
- return _regenerator2.default.wrap(function _callee5$(_context5) {
196
- while (1) {
197
- switch (_context5.prev = _context5.next) {
198
- case 0:
199
- _context5.next = 2;
200
- return this._initializedPromise;
201
-
202
- case 2:
203
- val = this.file[name];
204
- return _context5.abrupt('return', val !== undefined ? val : defaultValue);
67
+ async _writeToStorage() {
68
+ const databaseStr = JSON.stringify(this.database);
69
+ localStorage.setItem("pdfjs.history", databaseStr);
70
+ }
205
71
 
206
- case 4:
207
- case 'end':
208
- return _context5.stop();
209
- }
210
- }
211
- }, _callee5, this);
212
- }));
72
+ async _readFromStorage() {
73
+ return localStorage.getItem("pdfjs.history");
74
+ }
213
75
 
214
- function get(_x5, _x6) {
215
- return _ref5.apply(this, arguments);
216
- }
76
+ async set(name, val) {
77
+ await this._initializedPromise;
78
+ this.file[name] = val;
79
+ return this._writeToStorage();
80
+ }
217
81
 
218
- return get;
219
- }()
220
- }, {
221
- key: 'getMultiple',
222
- value: function () {
223
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee6(properties) {
224
- var values, name, val;
225
- return _regenerator2.default.wrap(function _callee6$(_context6) {
226
- while (1) {
227
- switch (_context6.prev = _context6.next) {
228
- case 0:
229
- _context6.next = 2;
230
- return this._initializedPromise;
82
+ async setMultiple(properties) {
83
+ await this._initializedPromise;
231
84
 
232
- case 2:
233
- values = Object.create(null);
85
+ for (const name in properties) {
86
+ this.file[name] = properties[name];
87
+ }
234
88
 
235
- for (name in properties) {
236
- val = this.file[name];
89
+ return this._writeToStorage();
90
+ }
237
91
 
238
- values[name] = val !== undefined ? val : properties[name];
239
- }
240
- return _context6.abrupt('return', values);
92
+ async get(name, defaultValue) {
93
+ await this._initializedPromise;
94
+ const val = this.file[name];
95
+ return val !== undefined ? val : defaultValue;
96
+ }
241
97
 
242
- case 5:
243
- case 'end':
244
- return _context6.stop();
245
- }
246
- }
247
- }, _callee6, this);
248
- }));
98
+ async getMultiple(properties) {
99
+ await this._initializedPromise;
100
+ const values = Object.create(null);
249
101
 
250
- function getMultiple(_x7) {
251
- return _ref6.apply(this, arguments);
252
- }
102
+ for (const name in properties) {
103
+ const val = this.file[name];
104
+ values[name] = val !== undefined ? val : properties[name];
105
+ }
253
106
 
254
- return getMultiple;
255
- }()
256
- }]);
107
+ return values;
108
+ }
257
109
 
258
- return ViewHistory;
259
- }();
110
+ }
260
111
 
261
112
  exports.ViewHistory = ViewHistory;
@@ -2,7 +2,7 @@
2
2
  * @licstart The following is the entire license notice for the
3
3
  * Javascript code in this page
4
4
  *
5
- * Copyright 2018 Mozilla Foundation
5
+ * Copyright 2020 Mozilla Foundation
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -19,13 +19,16 @@
19
19
  * @licend The above is the entire license notice for the
20
20
  * Javascript code in this page
21
21
  */
22
- 'use strict';
22
+ "use strict";
23
23
 
24
- var compatibilityParams = Object.create(null);
24
+ const compatibilityParams = Object.create(null);
25
25
  {
26
- var userAgent = typeof navigator !== 'undefined' && navigator.userAgent || '';
27
- var isAndroid = /Android/.test(userAgent);
28
- var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent);
26
+ const userAgent = typeof navigator !== "undefined" && navigator.userAgent || "";
27
+ const platform = typeof navigator !== "undefined" && navigator.platform || "";
28
+ const maxTouchPoints = typeof navigator !== "undefined" && navigator.maxTouchPoints || 1;
29
+ const isAndroid = /Android/.test(userAgent);
30
+ const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) || platform === "MacIntel" && maxTouchPoints > 1;
31
+
29
32
  (function checkCanvasSizeLimitation() {
30
33
  if (isIOS || isAndroid) {
31
34
  compatibilityParams.maxCanvasPixels = 5242880;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdfjs-dist",
3
- "version": "2.0.943",
3
+ "version": "2.4.456",
4
4
  "main": "build/pdf.js",
5
5
  "description": "Generic build of Mozilla's PDF.js library.",
6
6
  "keywords": [
@@ -11,18 +11,11 @@
11
11
  "homepage": "http://mozilla.github.io/pdf.js/",
12
12
  "bugs": "https://github.com/mozilla/pdf.js/issues",
13
13
  "license": "Apache-2.0",
14
- "dependencies": {
15
- "node-ensure": "^0.0.0",
16
- "worker-loader": "^2.0.0"
17
- },
18
- "peerDependencies": {
19
- "webpack": "^3.0.0 || ^4.0.0-alpha.0 || ^4.0.0"
20
- },
21
14
  "browser": {
22
15
  "fs": false,
23
16
  "http": false,
24
17
  "https": false,
25
- "node-ensure": false,
18
+ "url": false,
26
19
  "zlib": false
27
20
  },
28
21
  "format": "amd",
@@ -24,7 +24,7 @@
24
24
  line-height: 1.0;
25
25
  }
26
26
 
27
- .textLayer > div {
27
+ .textLayer > span {
28
28
  color: transparent;
29
29
  position: absolute;
30
30
  white-space: pre;
@@ -36,8 +36,7 @@
36
36
  .textLayer .highlight {
37
37
  margin: -1px;
38
38
  padding: 1px;
39
-
40
- background-color: rgb(180, 0, 170);
39
+ background-color: rgba(180, 0, 170, 1);
41
40
  border-radius: 4px;
42
41
  }
43
42
 
@@ -54,12 +53,16 @@
54
53
  }
55
54
 
56
55
  .textLayer .highlight.selected {
57
- background-color: rgb(0, 100, 0);
56
+ background-color: rgba(0, 100, 0, 1);
58
57
  }
59
58
 
60
- .textLayer ::-moz-selection { background: rgb(0,0,255); }
59
+ .textLayer ::-moz-selection {
60
+ background: rgba(0, 0, 255, 1);
61
+ }
61
62
 
62
- .textLayer ::selection { background: rgb(0,0,255); }
63
+ .textLayer ::selection {
64
+ background: rgba(0, 0, 255, 1);
65
+ }
63
66
 
64
67
  .textLayer .endOfContent {
65
68
  display: block;
@@ -98,8 +101,8 @@
98
101
  .annotationLayer .linkAnnotation > a:hover,
99
102
  .annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
100
103
  opacity: 0.2;
101
- background: #ff0;
102
- box-shadow: 0px 2px 10px #ff0;
104
+ background: rgba(255, 255, 0, 1);
105
+ box-shadow: 0px 2px 10px rgba(255, 255, 0, 1);
103
106
  }
104
107
 
105
108
  .annotationLayer .textAnnotation img {
@@ -152,7 +155,7 @@
152
155
  .annotationLayer .choiceWidgetAnnotation select:hover,
153
156
  .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
154
157
  .annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
155
- border: 1px solid #000;
158
+ border: 1px solid rgba(0, 0, 0, 1);
156
159
  }
157
160
 
158
161
  .annotationLayer .textWidgetAnnotation input:focus,
@@ -165,7 +168,7 @@
165
168
  .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
166
169
  .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
167
170
  .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
168
- background-color: #000;
171
+ background-color: rgba(0, 0, 0, 1);
169
172
  content: '';
170
173
  display: block;
171
174
  position: absolute;
@@ -229,37 +232,47 @@
229
232
  position: absolute;
230
233
  z-index: 200;
231
234
  max-width: 20em;
232
- background-color: #FFFF99;
233
- box-shadow: 0px 2px 5px #333;
235
+ background-color: rgba(255, 255, 153, 1);
236
+ box-shadow: 0px 2px 5px rgba(136, 136, 136, 1);
234
237
  border-radius: 2px;
235
- padding: 0.6em;
238
+ padding: 6px;
236
239
  margin-left: 5px;
237
240
  cursor: pointer;
238
241
  font: message-box;
242
+ font-size: 9px;
239
243
  word-wrap: break-word;
240
244
  }
241
245
 
246
+ .annotationLayer .popup > * {
247
+ font-size: 9px;
248
+ }
249
+
242
250
  .annotationLayer .popup h1 {
243
- font-size: 1em;
244
- border-bottom: 1px solid #000000;
245
- margin: 0;
246
- padding-bottom: 0.2em;
251
+ display: inline-block;
252
+ }
253
+
254
+ .annotationLayer .popup span {
255
+ display: inline-block;
256
+ margin-left: 5px;
247
257
  }
248
258
 
249
259
  .annotationLayer .popup p {
250
- margin: 0;
251
- padding-top: 0.2em;
260
+ border-top: 1px solid rgba(51, 51, 51, 1);
261
+ margin-top: 2px;
262
+ padding-top: 2px;
252
263
  }
253
264
 
254
265
  .annotationLayer .highlightAnnotation,
255
266
  .annotationLayer .underlineAnnotation,
256
267
  .annotationLayer .squigglyAnnotation,
257
268
  .annotationLayer .strikeoutAnnotation,
269
+ .annotationLayer .freeTextAnnotation,
258
270
  .annotationLayer .lineAnnotation svg line,
259
271
  .annotationLayer .squareAnnotation svg rect,
260
272
  .annotationLayer .circleAnnotation svg ellipse,
261
273
  .annotationLayer .polylineAnnotation svg polyline,
262
274
  .annotationLayer .polygonAnnotation svg polygon,
275
+ .annotationLayer .caretAnnotation,
263
276
  .annotationLayer .inkAnnotation svg polyline,
264
277
  .annotationLayer .stampAnnotation,
265
278
  .annotationLayer .fileAttachmentAnnotation {
@@ -279,9 +292,10 @@
279
292
  overflow: visible;
280
293
  border: 9px solid transparent;
281
294
  background-clip: content-box;
282
- -o-border-image: url(images/shadow.png) 9 9 repeat;
283
- border-image: url(images/shadow.png) 9 9 repeat;
284
- background-color: white;
295
+ -webkit-border-image: url(images/shadow.png) 9 9 repeat;
296
+ -o-border-image: url(images/shadow.png) 9 9 repeat;
297
+ border-image: url(images/shadow.png) 9 9 repeat;
298
+ background-color: rgba(255, 255, 255, 1);
285
299
  }
286
300
 
287
301
  .pdfViewer.removePageBorders .page {