@skeletonlabs/skeleton 2.7.0 → 2.7.1

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.
@@ -1,10 +1,11 @@
1
+ import type { ActionReturn } from 'svelte/action';
1
2
  type ClipboardArgs = string | {
2
3
  element: string;
3
4
  } | {
4
5
  input: string;
5
6
  };
6
- export declare function clipboard(node: HTMLElement, args: ClipboardArgs): {
7
- update(newArgs: ClipboardArgs): void;
8
- destroy(): void;
9
- } | undefined;
7
+ type ClipboardAttributes = {
8
+ 'on:copyComplete'?: () => void;
9
+ };
10
+ export declare function clipboard(node: HTMLElement, args: ClipboardArgs): ActionReturn<ClipboardArgs, ClipboardAttributes>;
10
11
  export {};
@@ -1,7 +1,7 @@
1
1
  export function clipboard(node, args) {
2
2
  if (!window.isSecureContext) {
3
3
  console.error('Clipboard action failed: app not running in secure context, see: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard');
4
- return;
4
+ return {};
5
5
  }
6
6
  const fireCopyCompleteEvent = () => {
7
7
  node.dispatchEvent(new CustomEvent('copyComplete'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "A SvelteKit component library.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "repository": {
@@ -1,5 +0,0 @@
1
- declare namespace svelteHTML {
2
- interface HTMLAttributes {
3
- 'on:copyComplete'?: () => void;
4
- }
5
- }