@kolkrabbi/kol-component 0.206.0 → 0.207.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-component",
3
- "version": "0.206.0",
3
+ "version": "0.207.0",
4
4
  "description": "KOL design-system components — atoms through organisms, emitting canonical kol-* classes. Pairs with @kolkrabbi/kol-theme for styling.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -159,6 +159,10 @@ export { default as LoaderOverlay } from './utilities/LoaderOverlay.jsx'
159
159
  /* dev chrome: name an element, agree on a cell, emit one sync line */
160
160
  export { default as QuadrantSync } from './utilities/QuadrantSync.jsx'
161
161
  export { default as MediaLibrary, MediaLibraryProvider, useMediaLibrary, MediaPicker } from './organisms/MediaLibrary.jsx'
162
+ /* the full-screen file viewer — public 2026-09-04 (user ruling): it already
163
+ * rendered both mobile viewer views and was module-private, so every consumer
164
+ * needing a phone viewer hand-rolled one. */
165
+ export { MediaInspector } from './organisms/MediaLibraryPages.jsx'
162
166
  export { default as MediaTileGallery } from './organisms/MediaTileGallery.jsx'
163
167
  export { default as MediaViewer } from './organisms/MediaViewer.jsx'
164
168
  export { default as SettingsPanel, LabeledControlSection, SettingsRow, SettingsSwitch, SettingsChoice, SettingsMulti, SettingsChipRow, SettingsFooter } from './organisms/SettingsPanel.jsx'
@@ -694,7 +694,19 @@ export function ticksFor(originScreen, pxPer, spanScreen, step) {
694
694
  * rect is stable for two frames, plus a `ResizeObserver` on the container. Any
695
695
  * change is caught by the rect comparison whatever caused it.
696
696
  *
697
- * @param {React.RefObject<HTMLElement>} containerRef - The box the layers are positioned in; must contain a `[data-canvas-frame]`
697
+ * THE RULER IS A SIBLING OF THE FRAME, NOT ITS CHILD and the container needs
698
+ * a gutter for the bars to live in. Satisfying `position: relative` and
699
+ * `[data-canvas-frame]` with the SAME element reads as the obvious move in a
700
+ * single-canvas app and is wrong: the ruler then positions against the very box
701
+ * it is measuring and paints its ticks over the artwork. kol-client-olina lost a
702
+ * cycle to exactly that on 2026-09-04, which is why this paragraph exists:
703
+ *
704
+ * <div ref={containerRef} style={{ position: 'relative', padding: 18 }}>
705
+ * <CanvasRuler containerRef={containerRef} virtualWidth={1920} />
706
+ * <div data-canvas-frame>…the artwork…</div>
707
+ * </div>
708
+ *
709
+ * @param {React.RefObject<HTMLElement>} containerRef - The POSITIONED box the layers are drawn in; it must CONTAIN a `[data-canvas-frame]` sibling and leave a gutter (18px) for the bars
698
710
  * @param {number} [virtualWidth=CANVAS_VIRTUAL_W] - The frame's width in VIRTUAL px — what `pxPer` divides by, and the vertical guide clamp
699
711
  * @returns {{left, top, pxPer, vh, cw, ch}|null} frame offsets, screen-px per virtual px, the frame's virtual height, the container's size
700
712
  */
@@ -169,12 +169,32 @@ function FolderRow({ name, onClick, struck = false }) {
169
169
  )
170
170
  }
171
171
 
172
- /* The inspector — shell is FullscreenOverlay; the STAGE is kol-r2b2's
173
- * MediaLightbox, verbatim: scrubbable audio-on video (VideoSheet), AudioSheet,
174
- * DocPage-through-KindPreview for documents, the facts line, prev / next FIXED
175
- * at the viewport edges (DocPageAndKindShowcase). Not MediaViewer, which is a
176
- * gallery — muted/loop/no-controls, image-and-video only. */
177
- function MediaInspector({ files, index, onClose, onPrev, onNext, mediaUrl, downloadUrl, keySet }) {
172
+ /**
173
+ * MediaInspector the full-screen viewer for one file in a set: image, video
174
+ * (scrubbable, audio on), audio, or a document page, with the facts line and
175
+ * prev / next fixed at the viewport edges.
176
+ *
177
+ * PUBLIC SINCE 2026-09-04 (user ruling, off `ColumnBrowserMobileViews`: the
178
+ * mobile viewers are the DS's). It already existed and already rendered both
179
+ * of the views that ticket drew — it was simply module-private, so every
180
+ * consumer that needed a phone viewer had to hand-roll one, which is the
181
+ * outcome the ticket named. Same unweld as the rulers a day earlier: the
182
+ * component was right, its visibility was not.
183
+ *
184
+ * Shell is `FullscreenOverlay` (scrim, Escape, backdrop dismiss, scroll lock).
185
+ * The stage is kol-r2b2's MediaLightbox verbatim. Not `MediaViewer`, which is a
186
+ * gallery — muted, looping, no controls, image and video only.
187
+ *
188
+ * @param {Array<Object>} files - The set being paged through
189
+ * @param {number} index - Which one is open
190
+ * @param {Function} onClose - Dismiss
191
+ * @param {Function} onPrev - Previous; also ArrowLeft
192
+ * @param {Function} onNext - Next; also ArrowRight
193
+ * @param {Function} mediaUrl - `(key) => url` — the consumer's media resolver
194
+ * @param {Function} downloadUrl - `(key) => url` for the download control
195
+ * @param {Set|Object} keySet - The bucket's key set, used to find a video's poster
196
+ */
197
+ export function MediaInspector({ files, index, onClose, onPrev, onNext, mediaUrl, downloadUrl, keySet }) {
178
198
  const o = files[index]
179
199
  const [dims, setDims] = useState(null)
180
200
  const shownDims = dims && dims.key === o?.key ? dims : null