@reuse-sh/lightbox 0.0.1 → 0.0.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.
Files changed (2) hide show
  1. package/README.md +15 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  An image viewer that opens from a thumbnail, including a cropped one, and returns to it on close. Pages scroll and swipe with the browser, and images zoom with pinch, pan, double-tap, and the pointer.
4
4
 
5
+ <!-- principles:start -->
6
+
7
+ ## Principles
8
+
9
+ These are the rules the code keeps. An adaptation on any framework keeps them too.
10
+
11
+ - **Page with native scroll snap.** Pages are a scroll-snap strip from the carousel, so touch and trackpads keep the system's momentum.
12
+ - **Open from the thumbnail and return to it.** The image grows out of its cropped preview and goes back to the same place on close.
13
+ - **Load only what is near.** Only the current and neighboring images load, and a long jump skips the pages in between.
14
+ - **Zoom around the point you touch.** Pinch, wheel and double-tap zoom around the pointer or fingers, and panning stops at the image's edges.
15
+ - **Keep focus inside and give it back.** The viewer is a native modal dialog, and closing it returns focus to the element that opened it.
16
+ - **Leave the page as it was.** Destroy restores the page scroll, the hidden thumbnail, and every style and listener the viewer touched.
17
+
18
+ <!-- principles:end -->
19
+
5
20
  ## Install
6
21
 
7
22
  ```sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reuse-sh/lightbox",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "An image lightbox on native scrolling, with thumbnail transitions, zoom, pan, and pinch.",
5
5
  "keywords": [
6
6
  "reuse",
@@ -51,7 +51,7 @@
51
51
  "@types/react": "19.3.0"
52
52
  },
53
53
  "dependencies": {
54
- "@reuse-sh/carousel": "0.0.1"
54
+ "@reuse-sh/carousel": "0.0.2"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public"