fuma 2.5.4 → 2.6.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.
@@ -11,7 +11,11 @@ export declare function useCommand({ onSelect, onFocus, isEnable, hotKey }?: Com
11
11
  [x: symbol]: (node: HTMLElement) => () => void;
12
12
  };
13
13
  focusTrigger: () => void;
14
- item: (index: number, scrollMargin?: string) => {
14
+ /**
15
+ * Le dégagement du défilement appartient à l'appelant: `scroll-mt-*` / `scroll-mb-*`
16
+ * sur l'item, puisque lui seul connaît la hauteur de son en-tête collant.
17
+ */
18
+ item: (index: number) => {
15
19
  [x: symbol]: (node: HTMLElement) => () => void;
16
20
  };
17
21
  };
@@ -74,9 +74,12 @@ export function useCommand({ onSelect, onFocus, isEnable = () => true, hotKey }
74
74
  }
75
75
  },
76
76
  focusTrigger,
77
- item: (index, scrollMargin = '8px') => ({
77
+ /**
78
+ * Le dégagement du défilement appartient à l'appelant: `scroll-mt-*` / `scroll-mb-*`
79
+ * sur l'item, puisque lui seul connaît la hauteur de son en-tête collant.
80
+ */
81
+ item: (index) => ({
78
82
  [createAttachmentKey()]: (node) => {
79
- node.style.scrollMargin = scrollMargin;
80
83
  if (!items.includes(node))
81
84
  items.splice(index, 0, node);
82
85
  const cleanup = on(node, 'click', () => {
@@ -293,7 +293,7 @@
293
293
  {@const isFocus = index === command.focusIndex}
294
294
  <li>
295
295
  <button
296
- {...command.item(index, '')}
296
+ {...command.item(index)}
297
297
  class={[isSelected && 'border', isFocus && 'menu-focus', 'scroll-mt-13 scroll-mb-2']}
298
298
  type="button"
299
299
  tabindex="-1"
@@ -62,7 +62,7 @@ declare function $$render<Item>(): {
62
62
  [x: symbol]: (node: HTMLElement) => () => void;
63
63
  };
64
64
  focusTrigger: () => void;
65
- item: (index: number, scrollMargin?: string) => {
65
+ item: (index: number) => {
66
66
  [x: symbol]: (node: HTMLElement) => () => void;
67
67
  };
68
68
  };
@@ -96,7 +96,7 @@ declare class __sveltets_Render<Item> {
96
96
  [x: symbol]: (node: HTMLElement) => () => void;
97
97
  };
98
98
  focusTrigger: () => void;
99
- item: (index: number, scrollMargin?: string) => {
99
+ item: (index: number) => {
100
100
  [x: symbol]: (node: HTMLElement) => () => void;
101
101
  };
102
102
  };
@@ -252,7 +252,7 @@
252
252
  {@const isFocus = index === command.focusIndex}
253
253
  <li {...propsLi}>
254
254
  <button
255
- {...command.item(index, '')}
255
+ {...command.item(index)}
256
256
  class={[
257
257
  isSelected && 'border-hard border',
258
258
  isFocus && 'menu-focus',
@@ -70,7 +70,7 @@ declare function $$render<Item>(): {
70
70
  [x: symbol]: (node: HTMLElement) => () => void;
71
71
  };
72
72
  focusTrigger: () => void;
73
- item: (index: number, scrollMargin?: string) => {
73
+ item: (index: number) => {
74
74
  [x: symbol]: (node: HTMLElement) => () => void;
75
75
  };
76
76
  };
@@ -104,7 +104,7 @@ declare class __sveltets_Render<Item> {
104
104
  [x: symbol]: (node: HTMLElement) => () => void;
105
105
  };
106
106
  focusTrigger: () => void;
107
- item: (index: number, scrollMargin?: string) => {
107
+ item: (index: number) => {
108
108
  [x: symbol]: (node: HTMLElement) => () => void;
109
109
  };
110
110
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "2.5.4",
3
+ "version": "2.6.0",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",