smartphoto 2.1.0 → 2.1.1

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.
package/README.md CHANGED
@@ -357,37 +357,41 @@ photo.on('zoomout',function(){
357
357
  </tr>
358
358
  </table>
359
359
 
360
- ### SCSS
360
+ ### CSS Custom Properties
361
361
 
362
362
  <table>
363
363
  <tr>
364
- <th>variable</th>
364
+ <th>property</th>
365
365
  <th>description</th>
366
366
  <th>default</th>
367
367
  </tr>
368
368
  <tr>
369
- <td>$animation-speed</td>
370
- <td>animation speed when switching images</td>
371
- <td>.3s</td>
369
+ <td>--smartphoto-animation-speed</td>
370
+ <td>animation speed when switching/opening/closing images. Overridden per-instance by the <code>animationSpeed</code> JS option</td>
371
+ <td>300ms</td>
372
+ </tr>
373
+ <tr>
374
+ <td>--smartphoto-animation-function</td>
375
+ <td>easing function used for animations</td>
376
+ <td>ease-out</td>
372
377
  </tr>
373
378
  <tr>
374
- <td>$backdrop-color</td>
379
+ <td>--smartphoto-backdrop-color</td>
375
380
  <td>backdrop color when viewing images</td>
376
381
  <td>rgba(0, 0, 0, 1)</td>
377
382
  </tr>
378
383
  <tr>
379
- <td>$header-color</td>
384
+ <td>--smartphoto-header-color</td>
380
385
  <td>header color</td>
381
386
  <td>rgba(0, 0, 0, .2)</td>
382
387
  </tr>
383
388
  </table>
384
389
 
385
- `$animation-speed` is the SCSS build-time default. At runtime it is overridden per-instance by the `animationSpeed` JS option via the `--smartphoto-animation-speed` CSS custom property set on the `dialog` element.
386
-
387
- Every SCSS variable above is also exposed as a CSS custom property (`--smartphoto-animation-speed`, `--smartphoto-animation-function`, `--smartphoto-backdrop-color`, `--smartphoto-header-color`), so they can be overridden without recompiling SCSS, e.g.:
390
+ Set these on `.smartphoto` (or `:root`) to override the defaults, no rebuild required:
388
391
 
389
392
  ```css
390
393
  .smartphoto {
394
+ --smartphoto-animation-speed: 500ms;
391
395
  --smartphoto-animation-function: ease-in-out;
392
396
  --smartphoto-backdrop-color: rgba(0, 0, 0, 0.9);
393
397
  --smartphoto-header-color: rgba(0, 0, 0, 0.4);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SmartPhoto v2.1.0
2
+ * SmartPhoto v2.1.1
3
3
  * (c) appleple
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SmartPhoto v2.1.0
2
+ * SmartPhoto v2.1.1
3
3
  * (c) appleple
4
4
  * Released under the MIT License.
5
5
  */
package/js/smartphoto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SmartPhoto v2.1.0
2
+ * SmartPhoto v2.1.1
3
3
  * (c) appleple
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SmartPhoto v2.1.0
2
+ * SmartPhoto v2.1.1
3
3
  * (c) appleple
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smartphoto",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "smartphoto",
5
5
  "homepage": "https://developer.a-blogcms.jp",
6
6
  "main": "./lib/smartphoto.js",
@@ -16,7 +16,9 @@
16
16
  "types": "./lib/types/index.d.ts",
17
17
  "import": "./lib/smartphoto.mjs",
18
18
  "require": "./lib/smartphoto.js"
19
- }
19
+ },
20
+ "./css/*": "./css/*",
21
+ "./package.json": "./package.json"
20
22
  },
21
23
  "publishConfig": {
22
24
  "access": "public"