@kolkrabbi/kol-component 0.206.0 → 0.206.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-component",
3
- "version": "0.206.0",
3
+ "version": "0.206.1",
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",
@@ -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
  */