@riebeckite/plugin-lightbox 0.0.27 → 0.0.29
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 +3 -0
- package/README_ja.md +8 -5
- package/package.json +2 -2
- package/style.css +2 -0
package/README.md
CHANGED
|
@@ -53,6 +53,9 @@ the app calls on page initialization.
|
|
|
53
53
|
- Returns a cleanup function that removes listeners, the dialog, and any
|
|
54
54
|
wrapped images
|
|
55
55
|
|
|
56
|
+
Themes can set `--rr-lightbox-image-border-radius` on the `rr-lightbox` root
|
|
57
|
+
to style the displayed image without selecting its descendants.
|
|
58
|
+
|
|
56
59
|
## Options
|
|
57
60
|
|
|
58
61
|
| Option | Type | Default | Description |
|
package/README_ja.md
CHANGED
|
@@ -27,6 +27,9 @@ export default defineConfig({
|
|
|
27
27
|
- `initLightbox` は `Escape`、背景クリック、閉じるボタンでダイアログを閉じ、開く前のフォーカスを戻します。
|
|
28
28
|
- 開いている間は `html[data-lightbox-open="true"]` を設定するため、CSS でスクロールを止められます。
|
|
29
29
|
|
|
30
|
+
Theme は `rr-lightbox` の root に `--rr-lightbox-image-border-radius` を指定すると、
|
|
31
|
+
子要素を選択せずに表示中の画像を調整できます。
|
|
32
|
+
|
|
30
33
|
## オプション
|
|
31
34
|
|
|
32
35
|
| オプション | 型 | 既定値 | 内容 |
|
|
@@ -40,11 +43,11 @@ export default defineConfig({
|
|
|
40
43
|
|
|
41
44
|
## 公開 API
|
|
42
45
|
|
|
43
|
-
- `lightboxPlugin(options?)
|
|
44
|
-
- `rehypeLightbox(options?)
|
|
45
|
-
- `initLightbox(root?, options?)
|
|
46
|
-
- `initLightboxFromOptions(options?)
|
|
47
|
-
- `LightboxOptions`、`LightboxInitOptions
|
|
46
|
+
- `lightboxPlugin(options?)`:プラグインファクトリ
|
|
47
|
+
- `rehypeLightbox(options?)`:Rehype 変換
|
|
48
|
+
- `initLightbox(root?, options?)`:ブラウザ初期化関数
|
|
49
|
+
- `initLightboxFromOptions(options?)`:プラグインのクライアントスクリプトが呼ぶ、オプションを先に取る初期化関数
|
|
50
|
+
- `LightboxOptions`、`LightboxInitOptions`:型
|
|
48
51
|
|
|
49
52
|
## 関連資料
|
|
50
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-lightbox",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"./style.css": "./style.css"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@riebeckite/core": "0.0.
|
|
24
|
+
"@riebeckite/core": "0.0.29"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
package/style.css
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.rr-lightbox {
|
|
20
|
+
--rr-lightbox-image-border-radius: 0;
|
|
20
21
|
position: fixed;
|
|
21
22
|
inset: 0;
|
|
22
23
|
z-index: 1000;
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
max-height: calc(100vh - 120px);
|
|
42
43
|
object-fit: contain;
|
|
43
44
|
border: 1px solid var(--rb-color-surface, #ffffff);
|
|
45
|
+
border-radius: var(--rr-lightbox-image-border-radius);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
.rr-lightbox__caption {
|