fuma 0.3.52 → 0.3.54

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.
@@ -15,9 +15,9 @@ export function createDragHandler(listElement, itemElement, options) {
15
15
  if (options.onDragStart)
16
16
  events.on('dragStart', options.onDragStart);
17
17
  if (options.onDragMove)
18
- events.on('dragStart', options.onDragMove);
18
+ events.on('dragMove', options.onDragMove);
19
19
  if (options.onDragEnd)
20
- events.on('dragStart', options.onDragEnd);
20
+ events.on('dragEnd', options.onDragEnd);
21
21
  return {
22
22
  on: events.on,
23
23
  off: events.off,
@@ -34,7 +34,7 @@
34
34
  flex-grow: 1;
35
35
  }
36
36
 
37
- .item-placholder {
37
+ .item-placeholder {
38
38
  background: var(--background-hover);
39
39
  border-radius: var(--border-radius);
40
40
  }
@@ -1,6 +1,6 @@
1
1
  export declare const CLASSNAME_LIST = "editable-list";
2
2
  export declare const CLASSNAME_DRAG_ACTIVE = "drag-active";
3
- export declare const CLASSNAME_PLACEHOLDER = "item-placholder";
3
+ export declare const CLASSNAME_PLACEHOLDER = "item-placeholder";
4
4
  export interface ListEditableOptions<Type = unknown> {
5
5
  onDragStart?: () => void;
6
6
  onDragMove?: () => void;
@@ -2,7 +2,7 @@ import { createDragHandler } from './handlers.js';
2
2
  import { mouseDragTrigger, touchDragTrigger, scrollTrigger } from './trigger.js';
3
3
  export const CLASSNAME_LIST = 'editable-list';
4
4
  export const CLASSNAME_DRAG_ACTIVE = 'drag-active';
5
- export const CLASSNAME_PLACEHOLDER = 'item-placholder';
5
+ export const CLASSNAME_PLACEHOLDER = 'item-placeholder';
6
6
  export function listEditable(node, options = {}) {
7
7
  const { dragElementsSelector } = options;
8
8
  node.classList.add(CLASSNAME_LIST);
@@ -1,6 +1,9 @@
1
1
  import { type TippyProps } from '../utils/tippy.js';
2
- export declare function tip(node: HTMLElement, options?: Partial<TippyProps> & {
2
+ type TipOptions = Partial<TippyProps> & {
3
3
  disable?: boolean;
4
- }): {
4
+ };
5
+ export declare function tip(node: HTMLElement, options?: TipOptions): {
5
6
  destroy(): void;
6
- } | undefined;
7
+ update(newOptions: TipOptions): void;
8
+ };
9
+ export {};
@@ -1,12 +1,17 @@
1
1
  import { tippy } from '../utils/tippy.js';
2
2
  export function tip(node, options = { disable: false }) {
3
- const { disable, ...tippyProps } = options;
4
- if (disable)
5
- return;
6
- const _tip = tippy(node, tippyProps);
3
+ let _tip = null;
4
+ init(options);
5
+ function init({ disable, ...tippyProps }) {
6
+ _tip = disable ? null : tippy(node, tippyProps);
7
+ }
7
8
  return {
8
9
  destroy() {
9
- _tip.destroy();
10
+ _tip?.destroy();
11
+ },
12
+ update(newOptions) {
13
+ _tip?.destroy();
14
+ init(newOptions);
10
15
  }
11
16
  };
12
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "0.3.52",
3
+ "version": "0.3.54",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",