pdfjs_viewer 0.1.0 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab5da8dcd03e46e999a0c9d296f61a5aa87fc1dcf3bc63bb9246156c5a463a7b
4
- data.tar.gz: 5acb8ee010ae22c20150f13db99a2f62e95027d7530b23aaf6e046484ef0fe5d
3
+ metadata.gz: 70499460d3103b4775502e85198eb48916c8c319a3b942b17a45a6223e14b329
4
+ data.tar.gz: 61e6183bbee174cf530135e812c12de24a546c3d18de0e5f9ca817318254b057
5
5
  SHA512:
6
- metadata.gz: 7a1c866de4b20ca5bdd3b2dea6e41554fd73d6ac30f79f8bc6dd0658b9f37b5abb980b6ec806960f435175dd138e84161f929047831ea0a9d5b5d9478c6cfa03
7
- data.tar.gz: f2728c3191c41433159fe5fe27d51a99fc367281cc6799d92e8c6b8074c7275822b23f6f8edd8a93705c8661b38711f9162e798c666880c29f039348f203f593
6
+ metadata.gz: 2861d2507cb24d4d55fcf945e17438218d93192059d80d62303818a9ad22ce18147a89584e473485d67eac2fcb43ceadddb2ef5bcb5cc779208161e7228024d5
7
+ data.tar.gz: 8187d7f115412fd0ce8ebddb52dcc1aeeea242250bf4d622480fb7e9c81da1c6809ed04069feee5000ca364f22ed4f11f35a665d190ae1e0bb29b3f5b55b3c46
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pdfjs_viewer (0.1.0)
4
+ pdfjs_viewer (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -7,7 +7,7 @@ module PdfjsViewer::ApplicationHelper
7
7
  def toggle_action(key = nil)
8
8
  return if PdfjsViewer.configuration.send(key)
9
9
 
10
- 'display: none'
10
+ 'hide'
11
11
  end
12
12
 
13
13
  def stylesheet_path
@@ -28,17 +28,14 @@ See https://github.com/adobe-type-tools/cmap-resources
28
28
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
29
29
  <meta name="google" content="notranslate">
30
30
  <title>PDF.js viewer</title>
31
-
32
- <!-- This snippet is used in production (included from viewer.html) -->
33
- <link rel="resource" type="application/l10n" href="locale/locale.json">
34
- <script src="../build/pdf.mjs" type="module"></script>
35
-
36
- <link rel="stylesheet" href="/web/viewer.css">
31
+ <!-- This snippet is used in production (included from viewer.html) -->
32
+ <link rel="resource" type="application/l10n" href="locale/locale.json" nonce="<%= content_security_policy_nonce %>">
33
+ <script src="../build/pdf.mjs" type="module" nonce="<%= content_security_policy_nonce %>"></script>
34
+ <link rel="stylesheet" href="/web/viewer.css" nonce="<%= content_security_policy_nonce %>">
37
35
  <% if stylesheet_path.present? %>
38
- <link rel="stylesheet" href="<%= stylesheet_path %>">
36
+ <link rel="stylesheet" href="<%= stylesheet_path %>" nonce="<%= content_security_policy_nonce %>">
39
37
  <% end %>
40
-
41
- <script src="/web/viewer.mjs" type="module"></script>
38
+ <script src="/web/viewer.mjs" type="module" nonce="<%= content_security_policy_nonce %>"></script>
42
39
  </head>
43
40
 
44
41
  <body tabindex="0">
@@ -202,7 +199,7 @@ See https://github.com/adobe-type-tools/cmap-resources
202
199
  </div>
203
200
  </div>
204
201
  <div id="editorHighlight" class="toolbarButtonWithContainer">
205
- <button id="editorHighlightButton" style="<%= toggle_action(:show_highlight_button) %>" class="toolbarButton" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorHighlightParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-highlight-button">
202
+ <button id="editorHighlightButton" class="toolbarButton <%= toggle_action(:show_highlight_button) %>" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorHighlightParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-highlight-button">
206
203
  <span data-l10n-id="pdfjs-editor-highlight-button-label"></span>
207
204
  </button>
208
205
  <div class="editorParamsToolbar hidden doorHangerRight" id="editorHighlightParamsToolbar">
@@ -227,7 +224,7 @@ See https://github.com/adobe-type-tools/cmap-resources
227
224
  </div>
228
225
  </div>
229
226
  <div id="editorFreeText" class="toolbarButtonWithContainer">
230
- <button id="editorFreeTextButton" style="<%= toggle_action(:show_text_button) %>" class="toolbarButton" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorFreeTextParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-free-text-button">
227
+ <button id="editorFreeTextButton" class="toolbarButton <%= toggle_action(:show_text_button) %>" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorFreeTextParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-free-text-button">
231
228
  <span data-l10n-id="pdfjs-editor-free-text-button-label"></span>
232
229
  </button>
233
230
  <div class="editorParamsToolbar hidden doorHangerRight" id="editorFreeTextParamsToolbar">
@@ -244,7 +241,7 @@ See https://github.com/adobe-type-tools/cmap-resources
244
241
  </div>
245
242
  </div>
246
243
  <div id="editorInk" class="toolbarButtonWithContainer">
247
- <button id="editorInkButton" style="<%= toggle_action(:show_draw_button) %>" class="toolbarButton" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorInkParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-ink-button">
244
+ <button id="editorInkButton" class="toolbarButton <%= toggle_action(:show_draw_button) %>" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorInkParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-ink-button">
248
245
  <span data-l10n-id="pdfjs-editor-ink-button-label"></span>
249
246
  </button>
250
247
  <div class="editorParamsToolbar hidden doorHangerRight" id="editorInkParamsToolbar">
@@ -265,7 +262,7 @@ See https://github.com/adobe-type-tools/cmap-resources
265
262
  </div>
266
263
  </div>
267
264
  <div id="editorStamp" class="toolbarButtonWithContainer">
268
- <button id="editorStampButton" style="<%= toggle_action(:show_add_edit_image_button) %>" class="toolbarButton" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorStampParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-stamp-button">
265
+ <button id="editorStampButton" class="toolbarButton <%= toggle_action(:show_add_edit_image_button) %>" type="button" disabled="disabled" role="radio" aria-expanded="false" aria-haspopup="true" aria-controls="editorStampParamsToolbar" tabindex="0" data-l10n-id="pdfjs-editor-stamp-button">
269
266
  <span data-l10n-id="pdfjs-editor-stamp-button-label"></span>
270
267
  </button>
271
268
  <div class="editorParamsToolbar hidden doorHangerRight menu" id="editorStampParamsToolbar">
@@ -281,10 +278,10 @@ See https://github.com/adobe-type-tools/cmap-resources
281
278
  <div id="editorModeSeparator" class="verticalToolbarSeparator"></div>
282
279
 
283
280
  <div class="toolbarHorizontalGroup hiddenMediumView">
284
- <button id="printButton" style="<%= toggle_action(:show_print_button) %>" class="toolbarButton" type="button" tabindex="0" data-l10n-id="pdfjs-print-button">
281
+ <button id="printButton" class="toolbarButton <%= toggle_action(:show_print_button) %>" type="button" tabindex="0" data-l10n-id="pdfjs-print-button">
285
282
  <span data-l10n-id="pdfjs-print-button-label"></span>
286
283
  </button>
287
- <button id="downloadButton" style="<%= toggle_action(:show_save_button) %>" class="toolbarButton" type="button" tabindex="0" data-l10n-id="pdfjs-save-button">
284
+ <button id="downloadButton" class="toolbarButton <%= toggle_action(:show_save_button) %>" type="button" tabindex="0" data-l10n-id="pdfjs-save-button">
288
285
  <span data-l10n-id="pdfjs-save-button-label"></span>
289
286
  </button>
290
287
  </div>
@@ -297,7 +294,7 @@ See https://github.com/adobe-type-tools/cmap-resources
297
294
  </button>
298
295
  <div id="secondaryToolbar" class="hidden doorHangerRight menu">
299
296
  <div id="secondaryToolbarButtonContainer" class="menuContainer">
300
- <button id="secondaryOpenFile" style="<%= toggle_action(:show_open_file_button) %>" class="toolbarButton labeled" type="button" tabindex="0" data-l10n-id="pdfjs-open-file-button">
297
+ <button id="secondaryOpenFile" class="toolbarButton labeled <%= toggle_action(:show_open_file_button) %>" type="button" tabindex="0" data-l10n-id="pdfjs-open-file-button">
301
298
  <span data-l10n-id="pdfjs-open-file-button-label"></span>
302
299
  </button>
303
300
 
@@ -312,7 +309,7 @@ See https://github.com/adobe-type-tools/cmap-resources
312
309
 
313
310
  </div>
314
311
 
315
- <div class="horizontalToolbarSeparator" style="<%= toggle_action(:show_open_file_button) %>"></div>
312
+ <div class="horizontalToolbarSeparator" class="<%= toggle_action(:show_open_file_button) %>"></div>
316
313
 
317
314
  <button id="presentationMode" class="toolbarButton labeled" type="button" tabindex="0" data-l10n-id="pdfjs-presentation-mode-button">
318
315
  <span data-l10n-id="pdfjs-presentation-mode-button-label"></span>
@@ -738,7 +735,7 @@ See https://github.com/adobe-type-tools/cmap-resources
738
735
  </div>
739
736
  </dialog>
740
737
 
741
- <dialog id="printServiceDialog" style="min-width: 200px;">
738
+ <dialog id="printServiceDialog" class="w-200">
742
739
  <div class="row">
743
740
  <span data-l10n-id="pdfjs-print-progress-message"></span>
744
741
  </div>
@@ -3,5 +3,5 @@
3
3
  # Copyright (c) 2014 - 2025 Salus. All rights reserved.
4
4
 
5
5
  module PdfjsViewer
6
- VERSION = '0.1.0'
6
+ VERSION = '0.1.2'
7
7
  end
@@ -13,6 +13,16 @@
13
13
  * limitations under the License.
14
14
  */
15
15
 
16
+ /* Added to satisfy csp, ensure this stays if pdf viewer package is updated */
17
+ .w-200 {
18
+ width: 200px
19
+ }
20
+
21
+ .hide {
22
+ display: none !important;
23
+ }
24
+ /* end */
25
+
16
26
  .messageBar{
17
27
  --closing-button-icon:url(images/messageBar_closingButton.svg);
18
28
  --message-bar-close-button-color:var(--text-primary-color);
@@ -734,7 +734,7 @@ See https://github.com/adobe-type-tools/cmap-resources
734
734
  </div>
735
735
  </dialog>
736
736
 
737
- <dialog id="printServiceDialog" style="min-width: 200px;">
737
+ <dialog id="printServiceDialog" class="w-200">
738
738
  <div class="row">
739
739
  <span data-l10n-id="pdfjs-print-progress-message"></span>
740
740
  </div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfjs_viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toliver
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-08 00:00:00.000000000 Z
11
+ date: 2025-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler