@warkypublic/svelix 0.1.4 → 0.1.6

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.
@@ -34,6 +34,7 @@
34
34
  onerror?: (message: string) => void;
35
35
  onselect?: (ids: (string | number)[]) => void;
36
36
  onrowclick?: (event: SvarkRowInteractionEvent) => void;
37
+ onrowdblclick?: (event: SvarkRowInteractionEvent) => void;
37
38
  onrowcontextmenu?: (event: SvarkRowInteractionEvent) => void;
38
39
  }
39
40
 
@@ -57,6 +58,7 @@
57
58
  onerror,
58
59
  onselect,
59
60
  onrowclick,
61
+ onrowdblclick,
60
62
  onrowcontextmenu
61
63
  }: Props = $props();
62
64
 
@@ -174,11 +176,19 @@
174
176
  onrowcontextmenu?.({ ...resolved, event: ev });
175
177
  }
176
178
 
179
+ function handleDoubleClick(ev: MouseEvent) {
180
+ const resolved = resolveRowFromTarget(ev.target);
181
+ if (!resolved) return;
182
+ onrowdblclick?.({ ...resolved, event: ev });
183
+ }
184
+
177
185
  node.addEventListener('click', handleClick);
186
+ node.addEventListener('dblclick', handleDoubleClick);
178
187
  node.addEventListener('contextmenu', handleContextMenu);
179
188
 
180
189
  return () => {
181
190
  node.removeEventListener('click', handleClick);
191
+ node.removeEventListener('dblclick', handleDoubleClick);
182
192
  node.removeEventListener('contextmenu', handleContextMenu);
183
193
  };
184
194
  });
@@ -19,6 +19,7 @@ interface Props {
19
19
  onerror?: (message: string) => void;
20
20
  onselect?: (ids: (string | number)[]) => void;
21
21
  onrowclick?: (event: SvarkRowInteractionEvent) => void;
22
+ onrowdblclick?: (event: SvarkRowInteractionEvent) => void;
22
23
  onrowcontextmenu?: (event: SvarkRowInteractionEvent) => void;
23
24
  }
24
25
  declare const Svark: import("svelte").Component<Props, {}, "">;
@@ -59,5 +59,6 @@ export interface SvarkProps {
59
59
  onerror?: (message: string) => void;
60
60
  onselect?: (ids: (string | number)[]) => void;
61
61
  onrowclick?: (event: SvarkRowInteractionEvent) => void;
62
+ onrowdblclick?: (event: SvarkRowInteractionEvent) => void;
62
63
  onrowcontextmenu?: (event: SvarkRowInteractionEvent) => void;
63
64
  }
@@ -0,0 +1 @@
1
+ @source "../**/*.{svelte,js,ts}";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warkypublic/svelix",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Svelte 5 component library with Skeleton UI and Tailwind CSS",
5
5
  "license": "Apache-2.0",
6
6
  "exports": {
@@ -8,8 +8,9 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "svelte": "./dist/index.js"
10
10
  },
11
- "./themes/*.css": "./dist/themes/*.css",
12
- "./themes/svelix_orange.css": "./dist/themes/svelix_orange.css"
11
+ "./css/tailwind-source.css": "./dist/css/tailwind-source.css",
12
+ "./css/*.css": "./dist/css/*.css",
13
+ "./css/svelix_orange.css": "./dist/css/svelix_orange.css"
13
14
  },
14
15
  "files": [
15
16
  "dist",
@@ -70,7 +71,7 @@
70
71
  "dev": "vite dev",
71
72
  "build": "vite build",
72
73
  "preview": "vite preview",
73
- "package": "svelte-kit sync && svelte-package && publint",
74
+ "package": "svelte-kit sync && svelte-package && mkdir -p dist/css && cp src/lib/css/tailwind-source.css dist/css/tailwind-source.css && publint",
74
75
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
75
76
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
76
77
  "storybook": "storybook dev -p 6006",
File without changes