@robert-stackflow/oneui 0.6.31 → 0.6.32

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.6.32
2
+
3
+ - Give Lightbox an opaque black canvas and matching light controls in every document color mode; remove the dependency on an undefined background variable.
4
+
1
5
  ## 0.6.31
2
6
 
3
7
  - Add a controlled Lightbox with source-image Hero motion, captions, thumbnails, bounded zoom/pan and pinch/swipe gestures, keyboard navigation, retry and return-to-document callbacks. Shared modal focus, scroll locking and motion remain consistent with OneUI surfaces.
package/README.md CHANGED
@@ -290,4 +290,4 @@ Menu 支持 iconOnly:`<Menu iconOnly label="更多操作" items={items} />`
290
290
 
291
291
  `Lightbox` is a controlled image viewer: pass `open`, `items`, `index`, `onIndexChange` and `onClose`. Each item has a stable `id`, `src`, `alt` and optional `caption`, `thumbnailSrc`, `width` and `height`. The optional `sourceElement(item)` resolves the original image for Hero motion; `onLocate(item)` runs after exit and scroll unlocking. Supply `labels` for localization.
292
292
 
293
- The viewer supports captions, thumbnail navigation, non-wrapping previous/next, arrow keys, Escape, original-size zoom, bounded dragging, touch pinch/swipe and manual retry of the original URL. A single image hides navigation. Only adjacent full images are preloaded. It uses native modal isolation and shared OneUI focus, scroll lock and motion; reduced motion and missing/offscreen source elements use a quiet fallback. Keep the component mounted through exit and retain the selected index. Resolve resource permissions and document anchors in the host, not inside OneUI.
293
+ The viewer uses an opaque black canvas with light controls independently of the document color mode. It supports captions, thumbnail navigation, non-wrapping previous/next, arrow keys, Escape, original-size zoom, bounded dragging, touch pinch/swipe and manual retry of the original URL. A single image hides navigation. Only adjacent full images are preloaded. It uses native modal isolation and shared OneUI focus, scroll lock and motion; reduced motion and missing/offscreen source elements use a quiet fallback. Keep the component mounted through exit and retain the selected index. Resolve resource permissions and document anchors in the host, not inside OneUI.
@@ -8,12 +8,19 @@
8
8
  margin: 0;
9
9
  border: 0;
10
10
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
11
- background: color-mix(in srgb, var(--bg) 97%, transparent);
11
+ /* Image viewing is an opaque dark surface in every document color mode. */
12
+ color-scheme: dark;
13
+ --surface: #1d1d1d;
14
+ --fg: #f5f5f5;
15
+ --muted: #b5b5b5;
16
+ --hover: #ffffff18;
17
+ --line: #ffffff24;
18
+ background: #111;
12
19
  color: var(--fg);
13
20
  overflow: hidden;
14
21
  }
15
22
  .lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 12px; }
16
- .lightbox::backdrop { background: var(--bg); }
23
+ .lightbox::backdrop { background: #111; }
17
24
  .header { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
18
25
  .counter { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-inline: 8px; }
19
26
  .actions { display: flex; gap: 4px; align-items: center; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robert-stackflow/oneui",
3
- "version": "0.6.31",
3
+ "version": "0.6.32",
4
4
  "description": "OneUI React components, application shell and portable visual themes",
5
5
  "type": "module",
6
6
  "sideEffects": [