@kolkrabbi/kol-shell 0.103.0 → 0.104.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-shell",
3
- "version": "0.103.0",
3
+ "version": "0.104.0",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -21,10 +21,10 @@
21
21
  "react-dom": "^18.3.0 || ^19.0.0"
22
22
  },
23
23
  "devDependencies": {
24
+ "@kolkrabbi/kol-component": "^0.338.1",
24
25
  "@kolkrabbi/kol-framework": "^0.69.0",
25
- "@kolkrabbi/kol-component": "^0.338.0",
26
- "@kolkrabbi/kol-icons": "^0.64.0",
27
- "@kolkrabbi/kol-theme": "^0.211.1"
26
+ "@kolkrabbi/kol-theme": "^0.211.1",
27
+ "@kolkrabbi/kol-icons": "^0.64.0"
28
28
  },
29
29
  "files": [
30
30
  "src",
@@ -67,26 +67,30 @@ export function CanvasHint({ icon = 'pointer', hint, className = '' }) {
67
67
  }
68
68
 
69
69
  /**
70
- * SelectionMeasure — The selection's frame on the canvas (float-everything W5 row 76, 2026-11-04): four corner handles
71
- * around `children`, the object's label above (`kol-float-label`) and the size cap under it (`kol-float-ruler` on the
72
- * `--kol-float-list-r` round). The exploration's `Selection measurement` (kol-float--style 9:8895).
70
+ * SelectionMeasure — The selection's frame on the canvas (float-everything W5 row 76, 2026-11-04): a 1px outline on
71
+ * oq-64 hugging `children` and its handles, the object's label above (`kol-float-label`) and the size cap under it
72
+ * (`kol-float-ruler` on the `--kol-float-list-r` round). The exploration's `Selection measurement` (kol-float--style
73
+ * 9:8594: outline + eight 6 handles centred on it); since 0.104.0 the outline is drawn (float-figma-review W3.5).
73
74
  *
74
- * @param {number|string} width · {number|string} height the cap's numbers ("754 × 771"); both unset, no cap — the
75
- * handles alone (the selected brief, kol-float--style 9:14640)
75
+ * @param {number|string} width · {number|string} height the cap's numbers ("754 × 771") — the measure: eight 6 handles
76
+ * (corners + edge middles). Both unset, no cap — the selected row: four 4 corner handles
77
+ * (the selected brief, kol-float--style 9:14340)
76
78
  * @param {string} label the object's name, above the frame
77
79
  * @param {ReactNode} children the selected thing
78
80
  * @param {string} className
79
81
  */
80
82
  export function SelectionMeasure({ width, height, label, children, className = '' }) {
81
- const handle = 'absolute size-2 bg-[var(--kol-surface-on-primary)]'
83
+ const measure = width != null || height != null
84
+ /* a handle is centred on the outline: 6 (the measure) or 4 (the selected row), corners first, then the edge middles */
85
+ const handle = `absolute ${measure ? 'size-1.5 -m-[3px]' : 'size-1 -m-0.5'} bg-[var(--kol-surface-on-primary)]`
86
+ const spots = measure
87
+ ? ['top-0 left-0', 'top-0 left-full', 'top-full left-0', 'top-full left-full', 'top-0 left-1/2', 'top-full left-1/2', 'top-1/2 left-0', 'top-1/2 left-full']
88
+ : ['top-0 left-0', 'top-0 left-full', 'top-full left-0', 'top-full left-full']
82
89
  return (
83
90
  <div className={`kol-selection-measure relative inline-block ${className}`.trim()}>
84
91
  {children}
85
- <div aria-hidden="true" className="pointer-events-none absolute inset-0">
86
- <span className={`${handle} -top-1 -left-1`} />
87
- <span className={`${handle} -top-1 -right-1`} />
88
- <span className={`${handle} -bottom-1 -left-1`} />
89
- <span className={`${handle} -bottom-1 -right-1`} />
92
+ <div aria-hidden="true" className="pointer-events-none absolute inset-0 shadow-[0_0_0_1px_var(--kol-oq-64)]">
93
+ {spots.map((at) => <span key={at} className={`${handle} ${at}`} />)}
90
94
  </div>
91
95
  {label && <span className="kol-float-label text-oq-64 absolute left-0 bottom-full mb-2 whitespace-nowrap">{label}</span>}
92
96
  {(width != null || height != null) && <span className="kol-float-ruler text-emphasis absolute left-1/2 top-full mt-2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-[var(--kol-float-list-r)] bg-oq-08">{width} × {height}</span>}
@@ -19,7 +19,7 @@ export default function GlobalActions({ onUndo, onRedo, actionLabel = 'Export',
19
19
  return (
20
20
  <div className={`kol-global-actions kol-float-chrome inline-flex items-center gap-3 ${className}`.trim()}>
21
21
  {onUndo && <Button variant="float" tone="ghost" size="sm" iconOnly="undo" aria-label="Undo" onClick={onUndo} />}
22
- {onRedo && <Button variant="float" tone="ghost" size="sm" iconOnly="rotate-right" aria-label="Redo" onClick={onRedo} />}
22
+ {onRedo && <Button variant="float" tone="ghost" size="sm" iconOnly="redo" aria-label="Redo" onClick={onRedo} />}
23
23
  {onAction && <Button variant="float" tone="inverted" size="md" onClick={onAction}>{actionLabel}</Button>}
24
24
  {account?.src || account?.initial ? (
25
25
  <button type="button" aria-label={account.label ?? 'Account'} onClick={onAccount} className="inline-flex rounded-full bg-transparent border-0 p-0 cursor-pointer">