stimulus-pdf-viewer-rails 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f716f4d4af642c98353a4dab874dedcc15f88672b6fd44d8a98acd8d31c971ad
4
- data.tar.gz: 304be04c5c426ee97c844c29bd54c8b4045f31ca4d638d269bec34b9593861fc
3
+ metadata.gz: 43f0f370e8cb71ab25bae045345269c4567e3afaecb6a15f43dfe8dd26b4766c
4
+ data.tar.gz: ce65b690119f2d649ef611f227e4da9bfddf4f27da9273221a9653211eb84445
5
5
  SHA512:
6
- metadata.gz: 35a297b94975f670100c5cf603eeb5662a32cd22c098ba10b071a6438a9a47b8bd2b7bb4e72d6385d90385c8d31afcd03d7ae9b8e6275103d9770186a1b490d4
7
- data.tar.gz: 473d768614f6907348f4bd10cfc50f173c9a544253b63c86f494fcc7a181b2e79d3d8e7988af92837fe07bb1a4a602ae1b6eb8c5b6d8e6ab0f5fad43418b11ca
6
+ metadata.gz: cd3c15bcfccb692d88527594f57cbcbe280b7c0ec79b84f15a8c36016e907b29431554098602042c51ed80a2cdd1601ced8782cf33ae9fd4fba216c29a764ffa
7
+ data.tar.gz: c275cb1442a607111a11564d1ecf5326c69be6653ef497c49c45f602c0d4f44e38373b9d6d5308cc821ba92c1933bdc4f929185de0f524533a60b84d52bb7d6f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.3.0] - 2026-04-01
6
+
7
+ ### Added
8
+ - Updated stimulus-pdf-viewer to 0.3.0
9
+
5
10
  ## [0.2.0] - 2026-01-11
6
11
 
7
12
  ### Added
@@ -3665,6 +3665,17 @@ class AnnotationSidebar {
3665
3665
  this.listContainer.appendChild(item);
3666
3666
  }
3667
3667
  }
3668
+
3669
+ // Re-fire selected event after rebuild so consumers can re-attach detail panels
3670
+ if (this.selectedAnnotationId) {
3671
+ const annotation = this.annotationManager.getAnnotation(this.selectedAnnotationId);
3672
+ if (annotation) {
3673
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-selected", {
3674
+ bubbles: true,
3675
+ detail: { annotationId: this.selectedAnnotationId, annotation }
3676
+ }));
3677
+ }
3678
+ }
3668
3679
  }
3669
3680
 
3670
3681
  _matchesFilter(annotation) {
@@ -3887,18 +3898,36 @@ class AnnotationSidebar {
3887
3898
  }
3888
3899
 
3889
3900
  _selectItem(annotationId) {
3901
+ const previousId = this.selectedAnnotationId;
3902
+
3903
+ // Skip if already selected
3904
+ if (previousId === annotationId) return
3905
+
3890
3906
  // Deselect previous
3891
3907
  const prev = this.listContainer.querySelector(".annotation-list-item.selected");
3892
3908
  if (prev) {
3893
3909
  prev.classList.remove("selected");
3894
3910
  }
3895
3911
 
3912
+ if (previousId) {
3913
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-deselected", {
3914
+ bubbles: true,
3915
+ detail: { annotationId: previousId }
3916
+ }));
3917
+ }
3918
+
3896
3919
  // Select new
3897
3920
  this.selectedAnnotationId = annotationId;
3898
3921
  const item = this.listContainer.querySelector(`[data-annotation-id="${annotationId}"]`);
3899
3922
  if (item) {
3900
3923
  item.classList.add("selected");
3901
3924
  }
3925
+
3926
+ const annotation = this.annotationManager.getAnnotation(annotationId);
3927
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-selected", {
3928
+ bubbles: true,
3929
+ detail: { annotationId, annotation }
3930
+ }));
3902
3931
  }
3903
3932
 
3904
3933
  /**
@@ -3926,7 +3955,12 @@ class AnnotationSidebar {
3926
3955
  if (this.isOpen) {
3927
3956
  // Clear selection if deleted annotation was selected
3928
3957
  if (this.selectedAnnotationId === annotation.id) {
3958
+ const previousId = this.selectedAnnotationId;
3929
3959
  this.selectedAnnotationId = null;
3960
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-deselected", {
3961
+ bubbles: true,
3962
+ detail: { annotationId: previousId }
3963
+ }));
3930
3964
  }
3931
3965
  this._refreshList();
3932
3966
  }
@@ -3954,6 +3988,10 @@ class AnnotationSidebar {
3954
3988
  this.element.classList.add("open");
3955
3989
  this.container.classList.add("annotation-sidebar-open");
3956
3990
  this._refreshList();
3991
+
3992
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-sidebar-opened", {
3993
+ bubbles: true
3994
+ }));
3957
3995
  }
3958
3996
 
3959
3997
  /**
@@ -3963,6 +4001,10 @@ class AnnotationSidebar {
3963
4001
  this.isOpen = false;
3964
4002
  this.element.classList.remove("open");
3965
4003
  this.container.classList.remove("annotation-sidebar-open");
4004
+
4005
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-sidebar-closed", {
4006
+ bubbles: true
4007
+ }));
3966
4008
  }
3967
4009
 
3968
4010
  /**
@@ -6873,6 +6915,10 @@ class PdfViewer {
6873
6915
  if (e.target.closest(".annotation") || e.target.closest(".annotation-edit-toolbar")) {
6874
6916
  return
6875
6917
  }
6918
+ // Skip if an annotation was just created (click follows pointerup from text selection)
6919
+ if (this._suppressClickDeselect) {
6920
+ return
6921
+ }
6876
6922
  this._deselectAnnotation();
6877
6923
  });
6878
6924
 
@@ -6922,6 +6968,12 @@ class PdfViewer {
6922
6968
  // Render annotations on all rendered pages
6923
6969
  this._renderAnnotations();
6924
6970
 
6971
+ const annotations = this.annotationManager.getAllAnnotations();
6972
+ this.container.dispatchEvent(new CustomEvent("pdf-viewer:annotations-loaded", {
6973
+ bubbles: true,
6974
+ detail: { annotations, count: annotations.length }
6975
+ }));
6976
+
6925
6977
  // Navigate to initial page if specified
6926
6978
  if (this.initialPage > 1) {
6927
6979
  this.viewer.goToPage(this.initialPage);
@@ -7049,11 +7101,15 @@ class PdfViewer {
7049
7101
 
7050
7102
  // Auto-select the newly created annotation
7051
7103
  const pageContainer = this.viewer.getPageContainer(annotation.page);
7052
- const element = pageContainer?.querySelector(`[data-annotation-id="${annotation.id}"]`);
7104
+ const element = pageContainer?.querySelector(`.annotation[data-annotation-id="${annotation.id}"]`);
7053
7105
  if (element) {
7054
7106
  this._selectAnnotation(annotation, element);
7055
7107
  }
7056
7108
 
7109
+ // Suppress the click-to-deselect that follows pointerup after text selection
7110
+ this._suppressClickDeselect = true;
7111
+ setTimeout(() => { this._suppressClickDeselect = false; }, 100);
7112
+
7057
7113
  // Notify annotation sidebar
7058
7114
  this.annotationSidebar?.onAnnotationCreated(annotation);
7059
7115
 
@@ -7081,7 +7137,7 @@ class PdfViewer {
7081
7137
  // Re-select the annotation after re-render
7082
7138
  if (wasSelected) {
7083
7139
  const pageContainer = this.viewer.getPageContainer(annotation.page);
7084
- const element = pageContainer?.querySelector(`[data-annotation-id="${annotation.id}"]`);
7140
+ const element = pageContainer?.querySelector(`.annotation[data-annotation-id="${annotation.id}"]`);
7085
7141
  if (element) {
7086
7142
  // Get the fresh annotation data from the manager
7087
7143
  const updatedAnnotation = this.annotationManager.getAnnotation(annotation.id);
@@ -7102,6 +7158,11 @@ class PdfViewer {
7102
7158
  // Announce to screen readers
7103
7159
  const typeLabel = this._getAnnotationTypeLabel(annotation.annotation_type);
7104
7160
  getAnnouncer().announce(`${typeLabel} updated`);
7161
+
7162
+ this.container.dispatchEvent(new CustomEvent("pdf-viewer:annotation-updated", {
7163
+ bubbles: true,
7164
+ detail: { annotation }
7165
+ }));
7105
7166
  }
7106
7167
 
7107
7168
  _onAnnotationDeleted(annotation) {
@@ -7756,6 +7817,8 @@ class PdfViewer {
7756
7817
  }
7757
7818
 
7758
7819
  _deselectAnnotation() {
7820
+ const previousAnnotation = this.selectedAnnotation;
7821
+
7759
7822
  if (this.selectedAnnotationElement) {
7760
7823
  this.selectedAnnotationElement.classList.remove("selected");
7761
7824
  }
@@ -7764,6 +7827,13 @@ class PdfViewer {
7764
7827
 
7765
7828
  // Hide the edit toolbar
7766
7829
  this.annotationEditToolbar.hide();
7830
+
7831
+ if (previousAnnotation) {
7832
+ this.container.dispatchEvent(new CustomEvent("pdf-viewer:annotation-deselected", {
7833
+ bubbles: true,
7834
+ detail: { annotationId: previousAnnotation.id }
7835
+ }));
7836
+ }
7767
7837
  }
7768
7838
 
7769
7839
  async _onAnnotationColorChange(annotation, color) {
@@ -7956,7 +8026,8 @@ class pdf_viewer_controller extends Controller {
7956
8026
  documentId: String,
7957
8027
  trackingUrl: String,
7958
8028
  initialPage: Number,
7959
- initialAnnotation: String
8029
+ initialAnnotation: String,
8030
+ autoHeight: { type: Boolean, default: true }
7960
8031
  }
7961
8032
 
7962
8033
  initialize() {
@@ -8422,8 +8493,8 @@ class pdf_viewer_controller extends Controller {
8422
8493
 
8423
8494
  setViewportHeight() {
8424
8495
  requestAnimationFrame(() => {
8425
- // Skip if using CSS flexbox layout (document-fullscreen wrapper handles sizing)
8426
- if (this.containerTarget.closest('.document-fullscreen')) {
8496
+ // Skip if autoHeight is disabled (container height managed by consuming application)
8497
+ if (!this.autoHeightValue) {
8427
8498
  return
8428
8499
  }
8429
8500
 
@@ -8510,40 +8581,5 @@ class pdf_download_controller extends Controller {
8510
8581
  }
8511
8582
  }
8512
8583
 
8513
- class pdf_sync_scroll_controller extends Controller {
8514
- static targets = ["container", "toggle"]
8515
-
8516
- connect() {
8517
- this.isSyncing = false;
8518
- }
8519
-
8520
- sync(event) {
8521
- if (this.isSyncing) return
8522
- if (!this.toggleTarget.checked) return
8523
-
8524
- const master = event.currentTarget;
8525
- const slave = this.containerTargets.find(target => target !== master);
8526
-
8527
- if (!slave) return
8528
-
8529
- this.isSyncing = true;
8530
-
8531
- // Calculate percentage-based scroll to account for potential
8532
- // differences in zoom levels or page counts
8533
- const scrollPercentageY = master.scrollTop / (master.scrollHeight - master.clientHeight);
8534
- const scrollPercentageX = master.scrollLeft / (master.scrollWidth - master.clientWidth);
8535
-
8536
- window.requestAnimationFrame(() => {
8537
- slave.scrollTop = scrollPercentageY * (slave.scrollHeight - slave.clientHeight);
8538
- slave.scrollLeft = scrollPercentageX * (slave.scrollWidth - slave.clientWidth);
8539
-
8540
- // Reset the lock after the browser paint
8541
- window.requestAnimationFrame(() => {
8542
- this.isSyncing = false;
8543
- });
8544
- });
8545
- }
8546
- }
8547
-
8548
- export { AnnotationStore, CoreViewer, MemoryAnnotationStore, pdf_download_controller as PdfDownloadController, pdf_sync_scroll_controller as PdfSyncScrollController, PdfViewer, pdf_viewer_controller as PdfViewerController, RestAnnotationStore, ToolMode, ViewerEvents };
8584
+ export { AnnotationStore, CoreViewer, MemoryAnnotationStore, pdf_download_controller as PdfDownloadController, PdfViewer, pdf_viewer_controller as PdfViewerController, RestAnnotationStore, ToolMode, ViewerEvents };
8549
8585
  //# sourceMappingURL=stimulus-pdf-viewer.esm.js.map
@@ -3685,6 +3685,17 @@
3685
3685
  this.listContainer.appendChild(item);
3686
3686
  }
3687
3687
  }
3688
+
3689
+ // Re-fire selected event after rebuild so consumers can re-attach detail panels
3690
+ if (this.selectedAnnotationId) {
3691
+ const annotation = this.annotationManager.getAnnotation(this.selectedAnnotationId);
3692
+ if (annotation) {
3693
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-selected", {
3694
+ bubbles: true,
3695
+ detail: { annotationId: this.selectedAnnotationId, annotation }
3696
+ }));
3697
+ }
3698
+ }
3688
3699
  }
3689
3700
 
3690
3701
  _matchesFilter(annotation) {
@@ -3907,18 +3918,36 @@
3907
3918
  }
3908
3919
 
3909
3920
  _selectItem(annotationId) {
3921
+ const previousId = this.selectedAnnotationId;
3922
+
3923
+ // Skip if already selected
3924
+ if (previousId === annotationId) return
3925
+
3910
3926
  // Deselect previous
3911
3927
  const prev = this.listContainer.querySelector(".annotation-list-item.selected");
3912
3928
  if (prev) {
3913
3929
  prev.classList.remove("selected");
3914
3930
  }
3915
3931
 
3932
+ if (previousId) {
3933
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-deselected", {
3934
+ bubbles: true,
3935
+ detail: { annotationId: previousId }
3936
+ }));
3937
+ }
3938
+
3916
3939
  // Select new
3917
3940
  this.selectedAnnotationId = annotationId;
3918
3941
  const item = this.listContainer.querySelector(`[data-annotation-id="${annotationId}"]`);
3919
3942
  if (item) {
3920
3943
  item.classList.add("selected");
3921
3944
  }
3945
+
3946
+ const annotation = this.annotationManager.getAnnotation(annotationId);
3947
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-selected", {
3948
+ bubbles: true,
3949
+ detail: { annotationId, annotation }
3950
+ }));
3922
3951
  }
3923
3952
 
3924
3953
  /**
@@ -3946,7 +3975,12 @@
3946
3975
  if (this.isOpen) {
3947
3976
  // Clear selection if deleted annotation was selected
3948
3977
  if (this.selectedAnnotationId === annotation.id) {
3978
+ const previousId = this.selectedAnnotationId;
3949
3979
  this.selectedAnnotationId = null;
3980
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-deselected", {
3981
+ bubbles: true,
3982
+ detail: { annotationId: previousId }
3983
+ }));
3950
3984
  }
3951
3985
  this._refreshList();
3952
3986
  }
@@ -3974,6 +4008,10 @@
3974
4008
  this.element.classList.add("open");
3975
4009
  this.container.classList.add("annotation-sidebar-open");
3976
4010
  this._refreshList();
4011
+
4012
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-sidebar-opened", {
4013
+ bubbles: true
4014
+ }));
3977
4015
  }
3978
4016
 
3979
4017
  /**
@@ -3983,6 +4021,10 @@
3983
4021
  this.isOpen = false;
3984
4022
  this.element.classList.remove("open");
3985
4023
  this.container.classList.remove("annotation-sidebar-open");
4024
+
4025
+ this.element.dispatchEvent(new CustomEvent("pdf-sidebar:annotation-sidebar-closed", {
4026
+ bubbles: true
4027
+ }));
3986
4028
  }
3987
4029
 
3988
4030
  /**
@@ -6893,6 +6935,10 @@
6893
6935
  if (e.target.closest(".annotation") || e.target.closest(".annotation-edit-toolbar")) {
6894
6936
  return
6895
6937
  }
6938
+ // Skip if an annotation was just created (click follows pointerup from text selection)
6939
+ if (this._suppressClickDeselect) {
6940
+ return
6941
+ }
6896
6942
  this._deselectAnnotation();
6897
6943
  });
6898
6944
 
@@ -6942,6 +6988,12 @@
6942
6988
  // Render annotations on all rendered pages
6943
6989
  this._renderAnnotations();
6944
6990
 
6991
+ const annotations = this.annotationManager.getAllAnnotations();
6992
+ this.container.dispatchEvent(new CustomEvent("pdf-viewer:annotations-loaded", {
6993
+ bubbles: true,
6994
+ detail: { annotations, count: annotations.length }
6995
+ }));
6996
+
6945
6997
  // Navigate to initial page if specified
6946
6998
  if (this.initialPage > 1) {
6947
6999
  this.viewer.goToPage(this.initialPage);
@@ -7069,11 +7121,15 @@
7069
7121
 
7070
7122
  // Auto-select the newly created annotation
7071
7123
  const pageContainer = this.viewer.getPageContainer(annotation.page);
7072
- const element = pageContainer?.querySelector(`[data-annotation-id="${annotation.id}"]`);
7124
+ const element = pageContainer?.querySelector(`.annotation[data-annotation-id="${annotation.id}"]`);
7073
7125
  if (element) {
7074
7126
  this._selectAnnotation(annotation, element);
7075
7127
  }
7076
7128
 
7129
+ // Suppress the click-to-deselect that follows pointerup after text selection
7130
+ this._suppressClickDeselect = true;
7131
+ setTimeout(() => { this._suppressClickDeselect = false; }, 100);
7132
+
7077
7133
  // Notify annotation sidebar
7078
7134
  this.annotationSidebar?.onAnnotationCreated(annotation);
7079
7135
 
@@ -7101,7 +7157,7 @@
7101
7157
  // Re-select the annotation after re-render
7102
7158
  if (wasSelected) {
7103
7159
  const pageContainer = this.viewer.getPageContainer(annotation.page);
7104
- const element = pageContainer?.querySelector(`[data-annotation-id="${annotation.id}"]`);
7160
+ const element = pageContainer?.querySelector(`.annotation[data-annotation-id="${annotation.id}"]`);
7105
7161
  if (element) {
7106
7162
  // Get the fresh annotation data from the manager
7107
7163
  const updatedAnnotation = this.annotationManager.getAnnotation(annotation.id);
@@ -7122,6 +7178,11 @@
7122
7178
  // Announce to screen readers
7123
7179
  const typeLabel = this._getAnnotationTypeLabel(annotation.annotation_type);
7124
7180
  getAnnouncer().announce(`${typeLabel} updated`);
7181
+
7182
+ this.container.dispatchEvent(new CustomEvent("pdf-viewer:annotation-updated", {
7183
+ bubbles: true,
7184
+ detail: { annotation }
7185
+ }));
7125
7186
  }
7126
7187
 
7127
7188
  _onAnnotationDeleted(annotation) {
@@ -7776,6 +7837,8 @@
7776
7837
  }
7777
7838
 
7778
7839
  _deselectAnnotation() {
7840
+ const previousAnnotation = this.selectedAnnotation;
7841
+
7779
7842
  if (this.selectedAnnotationElement) {
7780
7843
  this.selectedAnnotationElement.classList.remove("selected");
7781
7844
  }
@@ -7784,6 +7847,13 @@
7784
7847
 
7785
7848
  // Hide the edit toolbar
7786
7849
  this.annotationEditToolbar.hide();
7850
+
7851
+ if (previousAnnotation) {
7852
+ this.container.dispatchEvent(new CustomEvent("pdf-viewer:annotation-deselected", {
7853
+ bubbles: true,
7854
+ detail: { annotationId: previousAnnotation.id }
7855
+ }));
7856
+ }
7787
7857
  }
7788
7858
 
7789
7859
  async _onAnnotationColorChange(annotation, color) {
@@ -7976,7 +8046,8 @@
7976
8046
  documentId: String,
7977
8047
  trackingUrl: String,
7978
8048
  initialPage: Number,
7979
- initialAnnotation: String
8049
+ initialAnnotation: String,
8050
+ autoHeight: { type: Boolean, default: true }
7980
8051
  }
7981
8052
 
7982
8053
  initialize() {
@@ -8442,8 +8513,8 @@
8442
8513
 
8443
8514
  setViewportHeight() {
8444
8515
  requestAnimationFrame(() => {
8445
- // Skip if using CSS flexbox layout (document-fullscreen wrapper handles sizing)
8446
- if (this.containerTarget.closest('.document-fullscreen')) {
8516
+ // Skip if autoHeight is disabled (container height managed by consuming application)
8517
+ if (!this.autoHeightValue) {
8447
8518
  return
8448
8519
  }
8449
8520
 
@@ -8530,46 +8601,10 @@
8530
8601
  }
8531
8602
  }
8532
8603
 
8533
- class pdf_sync_scroll_controller extends stimulus.Controller {
8534
- static targets = ["container", "toggle"]
8535
-
8536
- connect() {
8537
- this.isSyncing = false;
8538
- }
8539
-
8540
- sync(event) {
8541
- if (this.isSyncing) return
8542
- if (!this.toggleTarget.checked) return
8543
-
8544
- const master = event.currentTarget;
8545
- const slave = this.containerTargets.find(target => target !== master);
8546
-
8547
- if (!slave) return
8548
-
8549
- this.isSyncing = true;
8550
-
8551
- // Calculate percentage-based scroll to account for potential
8552
- // differences in zoom levels or page counts
8553
- const scrollPercentageY = master.scrollTop / (master.scrollHeight - master.clientHeight);
8554
- const scrollPercentageX = master.scrollLeft / (master.scrollWidth - master.clientWidth);
8555
-
8556
- window.requestAnimationFrame(() => {
8557
- slave.scrollTop = scrollPercentageY * (slave.scrollHeight - slave.clientHeight);
8558
- slave.scrollLeft = scrollPercentageX * (slave.scrollWidth - slave.clientWidth);
8559
-
8560
- // Reset the lock after the browser paint
8561
- window.requestAnimationFrame(() => {
8562
- this.isSyncing = false;
8563
- });
8564
- });
8565
- }
8566
- }
8567
-
8568
8604
  exports.AnnotationStore = AnnotationStore;
8569
8605
  exports.CoreViewer = CoreViewer;
8570
8606
  exports.MemoryAnnotationStore = MemoryAnnotationStore;
8571
8607
  exports.PdfDownloadController = pdf_download_controller;
8572
- exports.PdfSyncScrollController = pdf_sync_scroll_controller;
8573
8608
  exports.PdfViewer = PdfViewer;
8574
8609
  exports.PdfViewerController = pdf_viewer_controller;
8575
8610
  exports.RestAnnotationStore = RestAnnotationStore;
@@ -1,203 +1,7 @@
1
1
  // PDF Viewer Styles for stimulus-pdf-viewer
2
2
  //
3
- // CURSOR ASSETS: This stylesheet references cursor SVG files for annotation tools.
4
- // Copy the cursor files from `assets/cursors/` to your asset pipeline and update
5
- // the paths in the cursor sections below (search for `cursor: url(`) to match
6
- // your asset configuration.
7
- //
8
- // Default paths assume: `pdf_viewer/cursor-*.svg` in your asset pipeline.
9
-
10
- // Fullscreen document layout - prevents dual scroll by filling viewport
11
- // Uses :has() for progressive enhancement - body overflow hidden when fullscreen viewer is present
12
- body:has(.document-fullscreen) {
13
- overflow: hidden;
14
- margin: 0;
15
- }
16
-
17
- html:has(.document-fullscreen) {
18
- // Prevent iOS Safari visual viewport scrolling
19
- overflow: hidden;
20
- }
21
-
22
- .document-fullscreen {
23
- display: flex;
24
- flex-direction: column;
25
- height: 100vh;
26
- height: 100dvh; // Dynamic viewport height (accounts for mobile browser UI)
27
- overflow: hidden;
28
- // Use fixed positioning to truly lock page on iOS Safari
29
- position: fixed;
30
- inset: 0;
31
- width: 100%;
32
- overscroll-behavior: none;
33
-
34
- // Header takes natural height
35
- .document-header {
36
- flex-shrink: 0;
37
- }
38
-
39
- // PDF viewer fills remaining space
40
- .pdf-viewer-container {
41
- flex: 1;
42
- min-height: 0; // Important: allows flex child to shrink below content size
43
- }
44
- }
45
-
46
- // Compact document header - title, actions, and close
47
- .document-header {
48
- display: flex;
49
- align-items: center;
50
- padding: 8px 16px;
51
- background: #fff;
52
- border-bottom: 1px solid #e3ebf6;
53
- gap: 12px;
54
- }
55
-
56
- .document-header-title {
57
- margin: 0;
58
- font-size: 16px;
59
- font-weight: 600;
60
- color: #12263f;
61
- white-space: nowrap;
62
- overflow: hidden;
63
- text-overflow: ellipsis;
64
- min-width: 0;
65
- flex: 1;
66
- }
67
-
68
- .document-header-actions {
69
- display: flex;
70
- align-items: center;
71
- gap: 4px;
72
- flex-shrink: 0;
73
- }
74
-
75
- .document-header-compare-form {
76
- display: flex;
77
- margin: 0;
78
- }
79
-
80
- .document-header-select {
81
- height: 32px;
82
- padding: 0 28px 0 12px;
83
- border: 1px solid #d2ddec;
84
- border-radius: 6px;
85
- background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2395aac9' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
86
- background-size: 12px;
87
- color: #12263f;
88
- font-size: 13px;
89
- cursor: pointer;
90
- appearance: none;
91
- max-width: 180px;
92
-
93
- &:hover {
94
- border-color: #95aac9;
95
- }
96
-
97
- &:focus {
98
- outline: none;
99
- border-color: #2c7be5;
100
- box-shadow: 0 0 0 2px rgba(44, 123, 229, 0.15);
101
- }
102
- }
103
-
104
- .document-header-btn {
105
- display: flex;
106
- align-items: center;
107
- justify-content: center;
108
- width: 32px;
109
- height: 32px;
110
- padding: 0;
111
- border: none;
112
- border-radius: 6px;
113
- background: none;
114
- color: #95aac9;
115
- cursor: pointer;
116
- transition: all 0.15s ease;
117
-
118
- &:hover {
119
- background: #f9fbfd;
120
- color: #12263f;
121
- }
122
- }
123
-
124
- .document-header-btn-danger {
125
- &:hover {
126
- background: #fef2f2;
127
- color: #e63757;
128
- }
129
- }
130
-
131
- .document-header-btn-text {
132
- display: flex;
133
- align-items: center;
134
- padding: 6px 12px;
135
- border-radius: 6px;
136
- color: #2c7be5;
137
- font-size: 13px;
138
- font-weight: 500;
139
- white-space: nowrap;
140
- transition: all 0.15s ease;
141
-
142
- &:hover {
143
- background: #f0f6ff;
144
- color: #1a68d1;
145
- }
146
- }
147
-
148
- .document-header-close {
149
- display: flex;
150
- align-items: center;
151
- justify-content: center;
152
- width: 32px;
153
- height: 32px;
154
- border-radius: 6px;
155
- color: #95aac9;
156
- transition: all 0.15s ease;
157
- flex-shrink: 0;
158
-
159
- &:hover {
160
- background: #f9fbfd;
161
- color: #12263f;
162
- }
163
- }
164
-
165
- // Side-by-side comparison grid for comparing two documents
166
- .document-comparison-grid {
167
- display: grid;
168
- grid-template-columns: 1fr 1fr;
169
- flex: 1;
170
- min-height: 0;
171
- gap: 0;
172
-
173
- .pdf-viewer-container {
174
- min-height: 0;
175
- min-width: 0; // Prevent grid blowout - allows children to shrink below content size
176
- overflow: hidden;
177
- }
178
-
179
- // Compact toolbar for comparison view - hide labels, show icons only
180
- .pdf-toolbar {
181
- overflow: hidden;
182
- }
183
-
184
- .pdf-tool-btn span {
185
- display: none;
186
- }
187
-
188
- .pdf-tool-btn {
189
- padding: 6px;
190
- }
191
-
192
- // Hide less essential tools in comparison view
193
- .pdf-tool-btn[data-tool="note"],
194
- .pdf-tool-btn[data-tool="ink"],
195
- .pdf-toolbar-colors,
196
- .pdf-toolbar-separator:nth-of-type(2),
197
- .pdf-toolbar-separator:nth-of-type(3) {
198
- display: none;
199
- }
200
- }
3
+ // Cursor SVGs for annotation tools are embedded as data URIs, so no additional
4
+ // asset configuration is required.
201
5
 
202
6
  // Container
203
7
  .pdf-viewer-container {
@@ -220,6 +24,11 @@ html:has(.document-fullscreen) {
220
24
  --pdf-accent: #0060df;
221
25
  --pdf-accent-hover: #0250bb;
222
26
 
27
+ --pdf-cursor-freehighlight: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='19' fill='none' viewBox='0 0 18 19'%3E%3Cpath fill='%23fbfbfe' fill-rule='evenodd' d='M12.2 3.09c.08-.08.23-.09.23-.09.05 0 .15.02.23.1l1.79 1.79c.13.13.13.33 0 .46l-2.679 2.679-2.255-2.255zm1.066 2.03L11.77 6.614l-.84-.84 1.494-1.495zM5.98 9.32l2.25 2.25 2.48-2.48-2.254-2.256L5.98 9.31zm2.25.836 1.066-1.067-.84-.84-1.067 1.066z' clip-rule='evenodd'/%3E%3Cpath fill='%23fbfbfe' fill-rule='evenodd' d='m10.153 13.182 6.06-6.06a2.78 2.78 0 0 0 .837-2.002c0-.75-.292-1.47-.837-2.002l-1.781-1.78A2.78 2.78 0 0 0 12.43.5c-.766 0-1.477.313-1.997.833l-6.75 6.75a1.755 1.755 0 0 0-.11 2.353l-2.281 2.288a1 1 0 0 0-.291.745L1 14.5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-5.767c-.397 0-.833-.565-.08-1.318M4.39 9.85l.59.59-2.582 2.591h4.24l.467-.466.466.466H8.89l6.62-6.621c.35-.34.54-.8.54-1.29s-.19-.95-.54-1.29l-1.79-1.79c-.34-.35-.8-.54-1.29-.54s-.95.2-1.29.54L4.39 8.79c-.29.29-.29.77 0 1.06M16 17.5v-2H1v2z' clip-rule='evenodd'/%3E%3Cpath stroke='%2315141a' d='m15.162 6.051-.006.005-6.75 6.75a.25.25 0 0 1-.352 0l-.595-.594-.354-.354-.354.353-.718.719H3.205l2.13-2.136.352-.354-.353-.353-.59-.59a.255.255 0 0 1 0-.353l6.75-6.75c.25-.25.584-.394.936-.394.358 0 .688.138.931.388l.005.006 1.79 1.79.006.005c.25.243.388.573.388.931s-.138.688-.388.931Zm-7.286 5.873.354.353.354-.353 2.48-2.481.354-.354-.354-.353L8.81 6.48l-.353-.354-.354.354-2.476 2.475-.146.147v.424l.146.147zm3.542-3.542.353.354.354-.354 2.679-2.678a.82.82 0 0 0 0-1.168l-1.79-1.79a.84.84 0 0 0-.584-.246h-.017l-.016.001.033.499-.034-.499h-.009l-.014.002a1 1 0 0 0-.155.028.8.8 0 0 0-.372.205L9.163 5.42l-.354.354.354.353zM1.5 16h14v1h-14z'/%3E%3C/svg%3E");
28
+ --pdf-cursor-texthighlight: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='32' fill='none' viewBox='0 0 29 32'%3E%3Cpath fill='%23000' stroke='%23fbfbfe' stroke-linejoin='round' d='M28 16.75a.5.5 0 0 0 .5-.5V15a.5.5 0 0 0-.5-.5h-1.642c-.446 0-.88.126-1.258.36l-.001.001-1.099.687-1.1-.687a2.4 2.4 0 0 0-1.258-.361H20a.5.5 0 0 0-.5.5v1.25a.5.5 0 0 0 .5.5h1.642a.13.13 0 0 1 .068.02l1.107.691a.12.12 0 0 1 .059.106v10.116a.12.12 0 0 1-.059.106l-1.108.691a.13.13 0 0 1-.068.02H20a.5.5 0 0 0-.5.5v1.25a.5.5 0 0 0 .5.5h1.642c.446 0 .88-.126 1.258-.36l1.1-.687 1.1.687c.378.235.813.361 1.259.361H28a.5.5 0 0 0 .5-.5v-1.25a.5.5 0 0 0-.5-.5h-1.642a.13.13 0 0 1-.068-.02l-1.107-.691a.12.12 0 0 1-.058-.106V17.567c0-.044.021-.083.059-.106l1.105-.691a.13.13 0 0 1 .069-.02z'/%3E%3Cpath fill='%23000' d='M24.625 17.567c0-.217.11-.415.293-.53l1.108-.692a.63.63 0 0 1 .332-.095H28V15h-1.642a1.9 1.9 0 0 0-.994.285l-1.108.693c-.095.059-.175.135-.256.209-.082-.074-.161-.15-.256-.209l-1.109-.693a1.9 1.9 0 0 0-.993-.285H20v1.25h1.642a.63.63 0 0 1 .332.095l1.108.692a.62.62 0 0 1 .294.53v10.116c0 .217-.11.415-.294.53l-1.109.692a.63.63 0 0 1-.332.095H20v1.25h1.642c.352 0 .695-.099.994-.285l1.108-.692c.096-.06.175-.136.256-.209.081.073.161.149.256.209l1.109.693c.299.186.642.285.994.285H28v-1.25h-1.642a.63.63 0 0 1-.332-.095l-1.108-.692a.62.62 0 0 1-.293-.53z'/%3E%3Cpath fill='%23fbfbfe' fill-rule='evenodd' d='M12.2 2.59c.08-.08.23-.09.23-.09.05 0 .15.02.23.1l1.79 1.79c.13.13.13.33 0 .46l-2.679 2.679-2.255-2.255zm1.066 2.03L11.77 6.114l-.84-.84 1.494-1.495zM5.98 8.82l2.25 2.25 2.48-2.48-2.254-2.256L5.98 8.81zm2.25.836 1.066-1.067-.84-.84-1.067 1.066z' clip-rule='evenodd'/%3E%3Cpath fill='%23fbfbfe' fill-rule='evenodd' d='m10.153 12.682 6.06-6.06a2.78 2.78 0 0 0 .837-2.002c0-.75-.292-1.47-.837-2.002L14.432.838A2.78 2.78 0 0 0 12.43 0c-.766 0-1.477.313-1.997.833l-6.75 6.75a1.755 1.755 0 0 0-.11 2.353l-2.281 2.288a1 1 0 0 0-.291.745L1 14a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-5.767c-.397 0-.833-.565-.08-1.318M4.39 9.35l.59.59-2.582 2.591h4.24l.467-.466.466.466H8.89l6.62-6.621c.35-.34.54-.8.54-1.29s-.19-.95-.54-1.29l-1.79-1.79c-.34-.35-.8-.54-1.29-.54s-.95.2-1.29.54L4.39 8.29c-.29.29-.29.77 0 1.06M16 17v-2H1v2z' clip-rule='evenodd'/%3E%3Cpath stroke='%2315141a' d='m15.162 5.551-.006.005-6.75 6.75a.25.25 0 0 1-.352 0l-.595-.594-.354-.354-.354.353-.718.719H3.205l2.13-2.136.352-.354-.353-.353-.59-.59a.255.255 0 0 1 0-.353l6.75-6.75c.25-.25.584-.394.936-.394.358 0 .688.138.931.388l.005.006 1.79 1.79.006.005c.25.243.388.573.388.931s-.138.688-.388.931ZM5.48 8.82v.207l.146.147 2.25 2.25.354.353.354-.353 2.48-2.481.354-.354-.354-.353L8.81 5.98l-.353-.354-.354.354-2.476 2.475-.146.147v.217Zm5.938-.938.353.354.354-.354 2.679-2.678a.82.82 0 0 0 0-1.168l-1.79-1.79A.84.84 0 0 0 12.43 2h-.017l-.016.001.033.499-.034-.499h-.009l-.014.002a1 1 0 0 0-.155.028.8.8 0 0 0-.372.205L9.163 4.92l-.354.354.354.353zM1.5 16.5v-1h14v1z'/%3E%3C/svg%3E");
29
+ --pdf-cursor-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='m.019 13.665.594-3.201c.075-.41.272-.784.568-1.082l8.801-8.8a1.99 1.99 0 0 1 2.81 0L14.42 2.21a1.99 1.99 0 0 1 0 2.81l-8.804 8.803c-.296.295-.67.49-1.078.566l-3.202.594Q1.232 15 1.13 15a1.13 1.13 0 0 1-1.111-1.336'/%3E%3Cpath fill='%23000' d='m.019 13.665.594-3.201c.075-.41.272-.784.568-1.082l8.801-8.8a1.99 1.99 0 0 1 2.81 0L14.42 2.21a1.99 1.99 0 0 1 0 2.81l-8.804 8.803c-.296.295-.67.49-1.078.566l-3.202.594Q1.232 15 1.13 15a1.13 1.13 0 0 1-1.111-1.336m12.453-8.468 1.16-1.16-.001-.848-1.82-1.822-.848.002-1.16 1.16zm-8.161 7.962a.8.8 0 0 0 .423-.225l6.853-6.852-2.668-2.668-6.853 6.852a.8.8 0 0 0-.225.425l-.474 2.557.385.386z'/%3E%3C/svg%3E");
30
+ --pdf-cursor-note: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' stroke='%23fff' d='M2 1a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h3l3 3 3-3h3a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z'/%3E%3Cpath fill='%23000' d='M2 2h12v9h-3.5L8 13.5 5.5 11H2z'/%3E%3Cpath stroke='%23fff' stroke-linecap='round' d='M4 5h8M4 7.5h6'/%3E%3C/svg%3E");
31
+
223
32
  position: relative;
224
33
  width: 100%;
225
34
  height: 100%;
@@ -731,7 +540,7 @@ html:has(.document-fullscreen) {
731
540
  .markedContent span:not(.markedContent) {
732
541
  z-index: 1;
733
542
 
734
- --font-height: 0; /* set by text_layer.js */
543
+ --font-height: 0; /* set by PDF.js TextLayer */
735
544
  font-size: calc(var(--text-scale-factor) * var(--font-height));
736
545
 
737
546
  --scale-x: 1;
@@ -1492,17 +1301,17 @@ html:has(.document-fullscreen) {
1492
1301
  // Note: Touch scroll prevention is handled by JavaScript touch event handlers
1493
1302
  .pdf-pages-container.highlight-mode {
1494
1303
  .pdf-page {
1495
- cursor: url('pdf_viewer/cursor-editorFreeHighlight.svg') 0 16, crosshair;
1304
+ cursor: var(--pdf-cursor-freehighlight) 0 16, crosshair;
1496
1305
  }
1497
1306
 
1498
1307
  .textLayer :is(span, br) {
1499
- cursor: url('pdf_viewer/cursor-editorTextHighlight.svg') 0 16, text;
1308
+ cursor: var(--pdf-cursor-texthighlight) 0 16, text;
1500
1309
  }
1501
1310
 
1502
1311
  // Force freehand cursor during active drawing (prevents cursor change on drag)
1503
1312
  &.is-drawing,
1504
1313
  &.is-drawing * {
1505
- cursor: url('pdf_viewer/cursor-editorFreeHighlight.svg') 0 16, crosshair !important;
1314
+ cursor: var(--pdf-cursor-freehighlight) 0 16, crosshair !important;
1506
1315
  }
1507
1316
  }
1508
1317
 
@@ -1510,11 +1319,11 @@ html:has(.document-fullscreen) {
1510
1319
  // Note: Touch scroll prevention is handled by JavaScript touch event handlers
1511
1320
  .pdf-pages-container.underline-mode {
1512
1321
  .pdf-page {
1513
- cursor: url('pdf_viewer/cursor-editorTextHighlight.svg') 0 16, text;
1322
+ cursor: var(--pdf-cursor-texthighlight) 0 16, text;
1514
1323
  }
1515
1324
 
1516
1325
  .textLayer :is(span, br) {
1517
- cursor: url('pdf_viewer/cursor-editorTextHighlight.svg') 0 16, text;
1326
+ cursor: var(--pdf-cursor-texthighlight) 0 16, text;
1518
1327
  }
1519
1328
  }
1520
1329
 
@@ -1523,13 +1332,13 @@ html:has(.document-fullscreen) {
1523
1332
  // Note: Touch scroll prevention is handled by JavaScript touch event handlers
1524
1333
  .pdf-pages-container.ink-mode {
1525
1334
  .pdf-page {
1526
- cursor: url('pdf_viewer/cursor-editorInk.svg') 1 14, crosshair;
1335
+ cursor: var(--pdf-cursor-ink) 1 14, crosshair;
1527
1336
  }
1528
1337
 
1529
1338
  // Force pen cursor during active drawing
1530
1339
  &.is-drawing,
1531
1340
  &.is-drawing * {
1532
- cursor: url('pdf_viewer/cursor-editorInk.svg') 1 14, crosshair !important;
1341
+ cursor: var(--pdf-cursor-ink) 1 14, crosshair !important;
1533
1342
  }
1534
1343
  }
1535
1344
 
@@ -1538,7 +1347,7 @@ html:has(.document-fullscreen) {
1538
1347
  .pdf-page,
1539
1348
  .textLayer,
1540
1349
  .textLayer * {
1541
- cursor: url('pdf_viewer/cursor-editorNote.svg') 1 1, crosshair;
1350
+ cursor: var(--pdf-cursor-note) 1 1, crosshair;
1542
1351
  }
1543
1352
  }
1544
1353
 
@@ -2821,26 +2630,3 @@ html:has(.document-fullscreen) {
2821
2630
  color: CanvasText;
2822
2631
  }
2823
2632
  }
2824
-
2825
- .document-comparison-grid {
2826
- display: grid;
2827
- grid-template-columns: 1fr 1fr;
2828
- flex: 1;
2829
- min-height: 0;
2830
- gap: 1px; // A thin separator line
2831
- background-color: var(--pdf-dark-border); // Use border color for the gap
2832
-
2833
- .pdf-viewer-container {
2834
- background-color: #525659;
2835
- overflow: hidden; // The container itself shouldn't scroll
2836
- display: flex;
2837
- flex-direction: column;
2838
- }
2839
-
2840
- // Target the actual scrollable area defined in your previous CSS
2841
- .pdf-pages-container {
2842
- overflow: auto;
2843
- -webkit-overflow-scrolling: touch;
2844
- scrollbar-gutter: stable; // Prevents layout shift when scrollbars appear
2845
- }
2846
- }
@@ -7,7 +7,6 @@ module StimulusPdfViewer
7
7
  # Add our assets to the asset paths
8
8
  app.config.assets.paths << root.join("app/assets/javascripts")
9
9
  app.config.assets.paths << root.join("app/assets/stylesheets")
10
- app.config.assets.paths << root.join("app/assets/images")
11
10
 
12
11
  # Precompile the main JS file
13
12
  app.config.assets.precompile += %w[
@@ -1,7 +1,7 @@
1
1
  module StimulusPdfViewer
2
2
  module Rails
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  # This should match the npm package version
5
- STIMULUS_PDF_VIEWER_VERSION = "0.2.0"
5
+ STIMULUS_PDF_VIEWER_VERSION = "0.3.0"
6
6
  end
7
7
  end
@@ -28,9 +28,6 @@ class StimulusPdfViewerAssetUpdater
28
28
  "styles/pdf-viewer.scss" => "app/assets/stylesheets/stimulus-pdf-viewer.scss"
29
29
  }.freeze
30
30
 
31
- CURSOR_SOURCE_DIR = "assets/cursors"
32
- CURSOR_DEST_DIR = "app/assets/images/stimulus-pdf-viewer"
33
-
34
31
  def initialize(version)
35
32
  @requested_version = version
36
33
  end
@@ -125,25 +122,6 @@ class StimulusPdfViewerAssetUpdater
125
122
  FileUtils.cp(src_path, dest_path)
126
123
  puts " #{src} -> #{dest}"
127
124
  end
128
-
129
- copy_cursors(package_dir)
130
- end
131
-
132
- def copy_cursors(package_dir)
133
- cursor_src = File.join(package_dir, CURSOR_SOURCE_DIR)
134
- cursor_dest = File.join(GEM_ROOT, CURSOR_DEST_DIR)
135
-
136
- unless Dir.exist?(cursor_src)
137
- warn " Warning: #{CURSOR_SOURCE_DIR} not found in package"
138
- return
139
- end
140
-
141
- FileUtils.mkdir_p(cursor_dest)
142
-
143
- Dir.glob(File.join(cursor_src, "*.svg")).each do |svg|
144
- FileUtils.cp(svg, cursor_dest)
145
- puts " #{CURSOR_SOURCE_DIR}/#{File.basename(svg)} -> #{CURSOR_DEST_DIR}/"
146
- end
147
125
  end
148
126
 
149
127
  def update_version_file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus-pdf-viewer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Baker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-12 00:00:00.000000000 Z
11
+ date: 2026-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -44,10 +44,6 @@ files:
44
44
  - LICENSE-MIT
45
45
  - NOTICE
46
46
  - README.md
47
- - app/assets/images/stimulus-pdf-viewer/cursor-editorFreeHighlight.svg
48
- - app/assets/images/stimulus-pdf-viewer/cursor-editorInk.svg
49
- - app/assets/images/stimulus-pdf-viewer/cursor-editorNote.svg
50
- - app/assets/images/stimulus-pdf-viewer/cursor-editorTextHighlight.svg
51
47
  - app/assets/javascripts/stimulus-pdf-viewer.esm.js
52
48
  - app/assets/javascripts/stimulus-pdf-viewer.js
53
49
  - app/assets/stylesheets/stimulus-pdf-viewer.scss
@@ -1,6 +0,0 @@
1
- <svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.2 3.09C12.28 3.01 12.43 3 12.43 3C12.48 3 12.58 3.02 12.66 3.1L14.45 4.89C14.58 5.02 14.58 5.22 14.45 5.35L11.7713 8.02872L9.51628 5.77372L12.2 3.09ZM13.2658 5.12L11.7713 6.6145L10.9305 5.77372L12.425 4.27921L13.2658 5.12Z" fill="#FBFBFE"/>
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.98 9.32L8.23 11.57L10.7106 9.08938L8.45562 6.83438L5.98 9.31V9.32ZM8.23 10.1558L9.29641 9.08938L8.45562 8.24859L7.38921 9.315L8.23 10.1558Z" fill="#FBFBFE"/>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="M10.1526 13.1816L16.2125 7.1217C16.7576 6.58919 17.05 5.8707 17.05 5.12C17.05 4.36931 16.7576 3.65084 16.2126 3.11834L14.4317 1.33747C13.8992 0.79242 13.1807 0.5 12.43 0.5C11.6643 0.5 10.9529 0.812929 10.4329 1.33289L3.68289 8.08289C3.04127 8.72452 3.00459 9.75075 3.57288 10.4363L1.29187 12.7239C1.09186 12.9245 0.990263 13.1957 1.0007 13.4685L1 14.5C0.447715 14.5 0 14.9477 0 15.5V17.5C0 18.0523 0.447715 18.5 1 18.5H16C16.5523 18.5 17 18.0523 17 17.5V15.5C17 14.9477 16.5523 14.5 16 14.5H10.2325C9.83594 14.5 9.39953 13.9347 10.1526 13.1816ZM4.39 9.85L4.9807 10.4407L2.39762 13.0312H6.63877L7.10501 12.565L7.57125 13.0312H8.88875L15.51 6.41C15.86 6.07 16.05 5.61 16.05 5.12C16.05 4.63 15.86 4.17 15.51 3.83L13.72 2.04C13.38 1.69 12.92 1.5 12.43 1.5C11.94 1.5 11.48 1.7 11.14 2.04L4.39 8.79C4.1 9.08 4.1 9.56 4.39 9.85ZM16 17.5V15.5H1V17.5H16Z" fill="#FBFBFE"/>
5
- <path d="M15.1616 6.05136L15.1616 6.05132L15.1564 6.05645L8.40645 12.8064C8.35915 12.8537 8.29589 12.88 8.23 12.88C8.16411 12.88 8.10085 12.8537 8.05355 12.8064L7.45857 12.2115L7.10501 11.8579L6.75146 12.2115L6.03289 12.93H3.20465L5.33477 10.7937L5.6873 10.4402L5.33426 10.0871L4.74355 9.49645C4.64882 9.40171 4.64882 9.23829 4.74355 9.14355L11.4936 2.39355C11.7436 2.14354 12.0779 2 12.43 2C12.7883 2 13.1179 2.13776 13.3614 2.38839L13.3613 2.38843L13.3664 2.39355L15.1564 4.18355L15.1564 4.18359L15.1616 4.18864C15.4122 4.43211 15.55 4.76166 15.55 5.12C15.55 5.47834 15.4122 5.80789 15.1616 6.05136ZM7.87645 11.9236L8.23 12.2771L8.58355 11.9236L11.0642 9.44293L11.4177 9.08938L11.0642 8.73582L8.80918 6.48082L8.45562 6.12727L8.10207 6.48082L5.62645 8.95645L5.48 9.10289V9.31V9.32V9.52711L5.62645 9.67355L7.87645 11.9236ZM11.4177 8.38227L11.7713 8.73582L12.1248 8.38227L14.8036 5.70355C15.1288 5.37829 15.1288 4.86171 14.8036 4.53645L13.0136 2.74645C12.8186 2.55146 12.5792 2.5 12.43 2.5H12.4134L12.3967 2.50111L12.43 3C12.3967 2.50111 12.3966 2.50112 12.3965 2.50112L12.3963 2.50114L12.3957 2.50117L12.3947 2.50125L12.3924 2.50142L12.387 2.50184L12.3732 2.50311C12.3628 2.50416 12.3498 2.50567 12.3346 2.50784C12.3049 2.51208 12.2642 2.51925 12.2178 2.53146C12.1396 2.55202 11.9797 2.60317 11.8464 2.73645L9.16273 5.42016L8.80918 5.77372L9.16273 6.12727L11.4177 8.38227ZM1.5 16H15.5V17H1.5V16Z" stroke="#15141A"/>
6
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M0.0189877 13.6645L0.612989 10.4635C0.687989 10.0545 0.884989 9.6805 1.18099 9.3825L9.98199 0.5805C10.756 -0.1925 12.015 -0.1945 12.792 0.5805L14.42 2.2085C15.194 2.9835 15.194 4.2435 14.42 5.0185L5.61599 13.8215C5.31999 14.1165 4.94599 14.3125 4.53799 14.3875L1.33599 14.9815C1.26599 14.9935 1.19799 15.0005 1.12999 15.0005C0.832989 15.0005 0.544988 14.8835 0.330988 14.6695C0.0679874 14.4055 -0.0490122 14.0305 0.0189877 13.6645Z" fill="white"/>
3
- <path d="M0.0189877 13.6645L0.612989 10.4635C0.687989 10.0545 0.884989 9.6805 1.18099 9.3825L9.98199 0.5805C10.756 -0.1925 12.015 -0.1945 12.792 0.5805L14.42 2.2085C15.194 2.9835 15.194 4.2435 14.42 5.0185L5.61599 13.8215C5.31999 14.1165 4.94599 14.3125 4.53799 14.3875L1.33599 14.9815C1.26599 14.9935 1.19799 15.0005 1.12999 15.0005C0.832989 15.0005 0.544988 14.8835 0.330988 14.6695C0.0679874 14.4055 -0.0490122 14.0305 0.0189877 13.6645ZM12.472 5.1965L13.632 4.0365L13.631 3.1885L11.811 1.3675L10.963 1.3685L9.80299 2.5285L12.472 5.1965ZM4.31099 13.1585C4.47099 13.1285 4.61799 13.0515 4.73399 12.9345L11.587 6.0815L8.91899 3.4135L2.06599 10.2655C1.94899 10.3835 1.87199 10.5305 1.84099 10.6915L1.36699 13.2485L1.75199 13.6335L4.31099 13.1585Z" fill="black"/>
4
- </svg>
@@ -1,8 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <!-- White outline/shadow -->
3
- <path d="M2 1C1.44772 1 1 1.44772 1 2V11C1 11.5523 1.44772 12 2 12H5L8 15L11 12H14C14.5523 12 15 11.5523 15 11V2C15 1.44772 14.5523 1 14 1H2Z" fill="white" stroke="white" stroke-width="1"/>
4
- <!-- Black icon -->
5
- <path d="M2 2H14V11H10.5L8 13.5L5.5 11H2V2Z" fill="black"/>
6
- <!-- Inner detail - folded corner or lines -->
7
- <path d="M4 5H12M4 7.5H10" stroke="white" stroke-width="1" stroke-linecap="round"/>
8
- </svg>
@@ -1,8 +0,0 @@
1
- <svg width="29" height="32" viewBox="0 0 29 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M28 16.75C28.2761 16.75 28.5 16.5261 28.5 16.25V15C28.5 14.7239 28.2761 14.5 28 14.5H26.358C25.9117 14.5 25.4773 14.6257 25.0999 14.8604L25.0989 14.8611L24 15.5484L22.9 14.861L22.8991 14.8604C22.5218 14.6257 22.0875 14.5 21.642 14.5H20C19.7239 14.5 19.5 14.7239 19.5 15V16.25C19.5 16.5261 19.7239 16.75 20 16.75H21.642C21.6648 16.75 21.6885 16.7564 21.7101 16.7697C21.7102 16.7698 21.7104 16.7699 21.7105 16.77L22.817 17.461C22.817 17.461 22.8171 17.4611 22.8171 17.4611C22.8171 17.4611 22.8171 17.4611 22.8171 17.4611C22.8552 17.4849 22.876 17.5229 22.876 17.567V22.625V27.683C22.876 27.7271 22.8552 27.765 22.8172 27.7889C22.8171 27.7889 22.8171 27.789 22.817 27.789L21.7095 28.48C21.7094 28.4801 21.7093 28.4802 21.7092 28.4803C21.6872 28.4938 21.6644 28.5 21.641 28.5H20C19.7239 28.5 19.5 28.7239 19.5 29V30.25C19.5 30.5261 19.7239 30.75 20 30.75H21.642C22.0883 30.75 22.5227 30.6243 22.9001 30.3896L22.9009 30.3891L24 29.7026L25.1 30.39L25.1009 30.3906C25.4783 30.6253 25.9127 30.751 26.359 30.751H28C28.2761 30.751 28.5 30.5271 28.5 30.251V29.001C28.5 28.7249 28.2761 28.501 28 28.501H26.358C26.3352 28.501 26.3115 28.4946 26.2899 28.4813C26.2897 28.4812 26.2896 28.4811 26.2895 28.481L25.183 27.79C25.183 27.79 25.183 27.79 25.1829 27.79C25.1829 27.7899 25.1829 27.7899 25.1829 27.7899C25.1462 27.7669 25.125 27.7297 25.125 27.684V22.625V17.567C25.125 17.5227 25.146 17.4844 25.1836 17.4606C25.1838 17.4605 25.1839 17.4604 25.184 17.4603L26.2895 16.77C26.2896 16.7699 26.2898 16.7698 26.2899 16.7697C26.3119 16.7562 26.3346 16.75 26.358 16.75H28Z" fill="black" stroke="#FBFBFE" stroke-linejoin="round"/>
3
- <path d="M24.625 17.567C24.625 17.35 24.735 17.152 24.918 17.037L26.026 16.345C26.126 16.283 26.24 16.25 26.358 16.25H28V15H26.358C26.006 15 25.663 15.099 25.364 15.285L24.256 15.978C24.161 16.037 24.081 16.113 24 16.187C23.918 16.113 23.839 16.037 23.744 15.978L22.635 15.285C22.336 15.099 21.993 15 21.642 15H20V16.25H21.642C21.759 16.25 21.874 16.283 21.974 16.345L23.082 17.037C23.266 17.152 23.376 17.35 23.376 17.567V22.625V27.683C23.376 27.9 23.266 28.098 23.082 28.213L21.973 28.905C21.873 28.967 21.759 29 21.641 29H20V30.25H21.642C21.994 30.25 22.337 30.151 22.636 29.965L23.744 29.273C23.84 29.213 23.919 29.137 24 29.064C24.081 29.137 24.161 29.213 24.256 29.273L25.365 29.966C25.664 30.152 26.007 30.251 26.359 30.251H28V29.001H26.358C26.241 29.001 26.126 28.968 26.026 28.906L24.918 28.214C24.734 28.099 24.625 27.901 24.625 27.684V22.625V17.567Z" fill="black"/>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.2 2.59C12.28 2.51 12.43 2.5 12.43 2.5C12.48 2.5 12.58 2.52 12.66 2.6L14.45 4.39C14.58 4.52 14.58 4.72 14.45 4.85L11.7713 7.52872L9.51628 5.27372L12.2 2.59ZM13.2658 4.62L11.7713 6.1145L10.9305 5.27372L12.425 3.77921L13.2658 4.62Z" fill="#FBFBFE"/>
5
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.98 8.82L8.23 11.07L10.7106 8.58938L8.45562 6.33438L5.98 8.81V8.82ZM8.23 9.65579L9.29641 8.58938L8.45562 7.74859L7.38921 8.815L8.23 9.65579Z" fill="#FBFBFE"/>
6
- <path fill-rule="evenodd" clip-rule="evenodd" d="M10.1526 12.6816L16.2125 6.6217C16.7576 6.08919 17.05 5.3707 17.05 4.62C17.05 3.86931 16.7576 3.15084 16.2126 2.61834L14.4317 0.837474C13.8992 0.29242 13.1807 0 12.43 0C11.6643 0 10.9529 0.312929 10.4329 0.832893L3.68289 7.58289C3.04127 8.22452 3.00459 9.25075 3.57288 9.93634L1.29187 12.2239C1.09186 12.4245 0.990263 12.6957 1.0007 12.9685L1 14C0.447715 14 0 14.4477 0 15V17C0 17.5523 0.447715 18 1 18H16C16.5523 18 17 17.5523 17 17V15C17 14.4477 16.5523 14 16 14H10.2325C9.83594 14 9.39953 13.4347 10.1526 12.6816ZM4.39 9.35L4.9807 9.9407L2.39762 12.5312H6.63877L7.10501 12.065L7.57125 12.5312H8.88875L15.51 5.91C15.86 5.57 16.05 5.11 16.05 4.62C16.05 4.13 15.86 3.67 15.51 3.33L13.72 1.54C13.38 1.19 12.92 1 12.43 1C11.94 1 11.48 1.2 11.14 1.54L4.39 8.29C4.1 8.58 4.1 9.06 4.39 9.35ZM16 17V15H1V17H16Z" fill="#FBFBFE"/>
7
- <path d="M15.1616 5.55136L15.1616 5.55132L15.1564 5.55645L8.40645 12.3064C8.35915 12.3537 8.29589 12.38 8.23 12.38C8.16411 12.38 8.10085 12.3537 8.05355 12.3064L7.45857 11.7115L7.10501 11.3579L6.75146 11.7115L6.03289 12.43H3.20465L5.33477 10.2937L5.6873 9.94019L5.33426 9.58715L4.74355 8.99645C4.64882 8.90171 4.64882 8.73829 4.74355 8.64355L11.4936 1.89355C11.7436 1.64354 12.0779 1.5 12.43 1.5C12.7883 1.5 13.1179 1.63776 13.3614 1.88839L13.3613 1.88843L13.3664 1.89355L15.1564 3.68355L15.1564 3.68359L15.1616 3.68864C15.4122 3.93211 15.55 4.26166 15.55 4.62C15.55 4.97834 15.4122 5.30789 15.1616 5.55136ZM5.48 8.82V9.02711L5.62645 9.17355L7.87645 11.4236L8.23 11.7771L8.58355 11.4236L11.0642 8.94293L11.4177 8.58938L11.0642 8.23582L8.80918 5.98082L8.45562 5.62727L8.10207 5.98082L5.62645 8.45645L5.48 8.60289V8.81V8.82ZM11.4177 7.88227L11.7713 8.23582L12.1248 7.88227L14.8036 5.20355C15.1288 4.87829 15.1288 4.36171 14.8036 4.03645L13.0136 2.24645C12.8186 2.05146 12.5792 2 12.43 2H12.4134L12.3967 2.00111L12.43 2.5C12.3967 2.00111 12.3966 2.00112 12.3965 2.00112L12.3963 2.00114L12.3957 2.00117L12.3947 2.00125L12.3924 2.00142L12.387 2.00184L12.3732 2.00311C12.3628 2.00416 12.3498 2.00567 12.3346 2.00784C12.3049 2.01208 12.2642 2.01925 12.2178 2.03146C12.1396 2.05202 11.9797 2.10317 11.8464 2.23645L9.16273 4.92016L8.80918 5.27372L9.16273 5.62727L11.4177 7.88227ZM1.5 16.5V15.5H15.5V16.5H1.5Z" stroke="#15141A"/>
8
- </svg>