@human-synthesis/norns-ui 0.0.9 → 0.0.10

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": "@human-synthesis/norns-ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "UI library for the Norns ecosystem — Pug + Civet components on Tailwind v4.",
5
5
  "license": "MIT",
6
6
  "author": "Daniel Teodoroiu (https://humansynthesis.ai)",
@@ -1,12 +1,12 @@
1
1
  .norns-window(class!="{classes}")
2
2
  +if('!hideHeader')
3
- header.norns-window-header
3
+ header.norns-window-header(ondblclick!="{onHeaderDoubleClick}")
4
4
  .norns-window-title.truncate {title}
5
5
  .norns-window-actions
6
6
  +if('actions')
7
7
  | {@render actions()}
8
8
  +if('onClose')
9
- button.norns-window-close(type="button" aria-label="Close" onclick!="{onClose}")
9
+ button.norns-window-close.nodrag(type="button" aria-label="Close" onclick!="{onClose}")
10
10
  Icon(name="lucide:x" size="size-3.5")
11
11
  section.norns-window-body(class!="{bodyClasses}")
12
12
  | {@render children?.()}
@@ -27,12 +27,21 @@
27
27
  // close button is rendered after the snippet so the snippet can
28
28
  // position icons / chips alongside it.
29
29
  //
30
+ // The close button carries `.nodrag`; SvelteFlow (and any other drag
31
+ // system that uses that convention) treats clicks on it as non-draggy.
32
+ // Buttons added via the `actions` snippet should be marked the same way
33
+ // by the consumer — they're caller-owned.
34
+ //
35
+ // `onHeaderDoubleClick` fires on dblclick over the header bar. Useful
36
+ // for "double-click title to maximize" patterns in windowed UIs.
37
+ //
30
38
  // `hideHeader` removes the entire header bar (useful for windows that
31
39
  // already have their own custom chrome but still want the rounded shell).
32
40
  {
33
41
  title = ''
34
42
  hideHeader = false
35
43
  onClose
44
+ onHeaderDoubleClick
36
45
  actions
37
46
  children
38
47
  class: extra = ''