drab 4.1.6 → 5.0.0-beta.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.
- package/animate/define.d.ts +2 -0
- package/animate/define.iife.js +1 -0
- package/animate/define.js +1 -0
- package/animate.d.ts +54 -0
- package/animate.iife.js +1 -0
- package/animate.js +1 -0
- package/base/define.d.ts +2 -0
- package/base/define.iife.js +1 -0
- package/base/define.js +1 -0
- package/base.d.ts +69 -0
- package/base.iife.js +1 -0
- package/base.js +1 -0
- package/breakpoint/define.d.ts +2 -0
- package/breakpoint/define.iife.js +1 -0
- package/breakpoint/define.js +1 -0
- package/breakpoint.d.ts +24 -0
- package/breakpoint.iife.js +1 -0
- package/breakpoint.js +1 -0
- package/chunk-2ZZQECRY.js +1 -0
- package/chunk-57VEEUFG.js +1 -0
- package/chunk-5JV4T7GM.js +1 -0
- package/chunk-6HYPZWQ4.js +1 -0
- package/chunk-7F7CQUEG.js +1 -0
- package/chunk-7KU2PRW5.js +1 -0
- package/chunk-7S6DTKGH.js +1 -0
- package/chunk-FNJ7AESC.js +9 -0
- package/chunk-IQJQPZUL.js +1 -0
- package/chunk-JMJUWKN2.js +1 -0
- package/chunk-MXKU7AKV.js +1 -0
- package/chunk-T7RZI3ZL.js +1 -0
- package/chunk-TSTTUEAF.js +1 -0
- package/chunk-VEVFQB5N.js +1 -0
- package/contextmenu/define.d.ts +2 -0
- package/contextmenu/define.iife.js +1 -0
- package/contextmenu/define.js +1 -0
- package/contextmenu.d.ts +15 -0
- package/contextmenu.iife.js +1 -0
- package/contextmenu.js +1 -0
- package/copy/define.d.ts +2 -0
- package/copy/define.iife.js +1 -0
- package/copy/define.js +1 -0
- package/copy.d.ts +13 -0
- package/copy.iife.js +1 -0
- package/copy.js +1 -0
- package/define.d.ts +2 -0
- package/define.iife.js +9 -0
- package/define.js +1 -0
- package/details/define.d.ts +2 -0
- package/details/define.iife.js +1 -0
- package/details/define.js +1 -0
- package/details.d.ts +23 -0
- package/details.iife.js +1 -0
- package/details.js +1 -0
- package/dialog/define.d.ts +2 -0
- package/dialog/define.iife.js +1 -0
- package/dialog/define.js +1 -0
- package/dialog.d.ts +20 -0
- package/dialog.iife.js +1 -0
- package/dialog.js +1 -0
- package/editor/define.d.ts +2 -0
- package/editor/define.iife.js +9 -0
- package/editor/define.js +1 -0
- package/editor.d.ts +58 -0
- package/editor.iife.js +9 -0
- package/editor.js +1 -0
- package/fullscreen/define.d.ts +2 -0
- package/fullscreen/define.iife.js +1 -0
- package/fullscreen/define.js +1 -0
- package/fullscreen.d.ts +23 -0
- package/fullscreen.iife.js +1 -0
- package/fullscreen.js +1 -0
- package/index-22PHGcPf.d.ts +17 -0
- package/index.d.ts +14 -0
- package/index.iife.js +9 -0
- package/index.js +1 -0
- package/package.json +131 -59
- package/popover/define.d.ts +2 -0
- package/popover/define.iife.js +1 -0
- package/popover/define.js +1 -0
- package/popover.d.ts +29 -0
- package/popover.iife.js +1 -0
- package/popover.js +1 -0
- package/share/define.d.ts +2 -0
- package/share/define.iife.js +1 -0
- package/share/define.js +1 -0
- package/share.d.ts +19 -0
- package/share.iife.js +1 -0
- package/share.js +1 -0
- package/tablesort/define.d.ts +2 -0
- package/tablesort/define.iife.js +1 -0
- package/tablesort/define.js +1 -0
- package/tablesort.d.ts +21 -0
- package/tablesort.iife.js +1 -0
- package/tablesort.js +1 -0
- package/youtube/define.d.ts +2 -0
- package/youtube/define.iife.js +1 -0
- package/youtube/define.js +1 -0
- package/youtube.d.ts +29 -0
- package/youtube.iife.js +1 -0
- package/youtube.js +1 -0
- package/LICENSE.md +0 -21
- package/README.md +0 -131
- package/dist/components/Breakpoint.svelte +0 -55
- package/dist/components/Breakpoint.svelte.d.ts +0 -46
- package/dist/components/ContextMenu.svelte +0 -150
- package/dist/components/ContextMenu.svelte.d.ts +0 -76
- package/dist/components/CopyButton.svelte +0 -97
- package/dist/components/CopyButton.svelte.d.ts +0 -60
- package/dist/components/DataTable.svelte +0 -208
- package/dist/components/DataTable.svelte.d.ts +0 -155
- package/dist/components/Details.svelte +0 -101
- package/dist/components/Details.svelte.d.ts +0 -67
- package/dist/components/Editor.svelte +0 -404
- package/dist/components/Editor.svelte.d.ts +0 -111
- package/dist/components/FrettedChord.svelte +0 -213
- package/dist/components/FrettedChord.svelte.d.ts +0 -79
- package/dist/components/FullscreenButton.svelte +0 -95
- package/dist/components/FullscreenButton.svelte.d.ts +0 -62
- package/dist/components/Popover.svelte +0 -153
- package/dist/components/Popover.svelte.d.ts +0 -80
- package/dist/components/ShareButton.svelte +0 -133
- package/dist/components/ShareButton.svelte.d.ts +0 -93
- package/dist/components/Sheet.svelte +0 -180
- package/dist/components/Sheet.svelte.d.ts +0 -99
- package/dist/components/Tablature.svelte +0 -173
- package/dist/components/Tablature.svelte.d.ts +0 -93
- package/dist/components/YouTube.svelte +0 -51
- package/dist/components/YouTube.svelte.d.ts +0 -49
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -14
- package/dist/util/accessibility.d.ts +0 -6
- package/dist/util/accessibility.js +0 -11
- package/dist/util/delay.d.ts +0 -1
- package/dist/util/delay.js +0 -1
- package/dist/util/transition.d.ts +0 -2
- package/dist/util/transition.js +0 -2
@@ -1,93 +0,0 @@
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
2
|
-
declare const __propDef: {
|
3
|
-
props: {
|
4
|
-
class?: string | undefined;
|
5
|
-
id?: string | undefined;
|
6
|
-
/** number of strings on the instrument, defaults to `6` */ strings?: number | undefined;
|
7
|
-
/** number of beats in the measure, defaults to `4` */ beats?: number | undefined;
|
8
|
-
/** puts a repeat at the start of the measure */ repeatStart?: boolean | undefined;
|
9
|
-
/** puts a repeat at the end of the measure */ repeatEnd?: boolean | undefined;
|
10
|
-
/** an array of notes */ notes?: {
|
11
|
-
/** string number */
|
12
|
-
string: number;
|
13
|
-
/** fret number */
|
14
|
-
fret: number | string;
|
15
|
-
/** beat number */
|
16
|
-
beat: number;
|
17
|
-
/** custom modifier - ex: "/3p2" signifies a slide to 3 and pull off to 2 */
|
18
|
-
mod?: string | undefined;
|
19
|
-
}[] | undefined;
|
20
|
-
};
|
21
|
-
events: {
|
22
|
-
[evt: string]: CustomEvent<any>;
|
23
|
-
};
|
24
|
-
slots: {};
|
25
|
-
};
|
26
|
-
export type TablatureProps = typeof __propDef.props;
|
27
|
-
export type TablatureEvents = typeof __propDef.events;
|
28
|
-
export type TablatureSlots = typeof __propDef.slots;
|
29
|
-
/**
|
30
|
-
* ### Tablature
|
31
|
-
*
|
32
|
-
* A complementary component to the `FrettedChord` for displaying a measure of tablature for a fretted instrument like guitar or ukulele. Created with HTML elements so it is customizable and responsive to the size of the container.
|
33
|
-
*
|
34
|
-
* @props
|
35
|
-
*
|
36
|
-
* - `beats` - number of beats in the measure, defaults to `4`
|
37
|
-
* - `class`
|
38
|
-
* - `id`
|
39
|
-
* - `notes` - an array of notes
|
40
|
-
* - `repeatEnd` - puts a repeat at the end of the measure
|
41
|
-
* - `repeatStart` - puts a repeat at the start of the measure
|
42
|
-
* - `strings` - number of strings on the instrument, defaults to `6`
|
43
|
-
*
|
44
|
-
* @example
|
45
|
-
*
|
46
|
-
* ```svelte
|
47
|
-
* <script lang="ts">
|
48
|
-
* import { Tablature } from "drab";
|
49
|
-
* import type { ComponentProps } from "svelte";
|
50
|
-
*
|
51
|
-
* const notes: ComponentProps<Tablature>["notes"] = [
|
52
|
-
* {
|
53
|
-
* fret: 0,
|
54
|
-
* beat: 1,
|
55
|
-
* string: 1,
|
56
|
-
* },
|
57
|
-
* {
|
58
|
-
* fret: 1,
|
59
|
-
* beat: 2,
|
60
|
-
* string: 2,
|
61
|
-
* },
|
62
|
-
* {
|
63
|
-
* fret: "X",
|
64
|
-
* beat: 2,
|
65
|
-
* string: 3,
|
66
|
-
* },
|
67
|
-
* {
|
68
|
-
* fret: 2,
|
69
|
-
* beat: 3,
|
70
|
-
* string: 4,
|
71
|
-
* mod: "/3p2",
|
72
|
-
* },
|
73
|
-
* {
|
74
|
-
* fret: 7,
|
75
|
-
* beat: 4,
|
76
|
-
* string: 3,
|
77
|
-
* },
|
78
|
-
* ];
|
79
|
-
* </script>
|
80
|
-
*
|
81
|
-
* <div class="font-mono font-semibold">
|
82
|
-
* <div class="mb-8 h-24">
|
83
|
-
* <Tablature {notes} repeatStart />
|
84
|
-
* </div>
|
85
|
-
* <div class="h-16 text-sm">
|
86
|
-
* <Tablature {notes} strings={4} repeatEnd />
|
87
|
-
* </div>
|
88
|
-
* </div>
|
89
|
-
* ```
|
90
|
-
*/
|
91
|
-
export default class Tablature extends SvelteComponent<TablatureProps, TablatureEvents, TablatureSlots> {
|
92
|
-
}
|
93
|
-
export {};
|
@@ -1,51 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
@component
|
3
|
-
|
4
|
-
### YouTube
|
5
|
-
|
6
|
-
Embeds a YouTube video `iframe` into a website with the video `uid`, using [www.youtube-nocookie.com](https://support.google.com/youtube/answer/171780?hl=en#zippy=%2Cturn-on-privacy-enhanced-mode).
|
7
|
-
|
8
|
-
@props
|
9
|
-
|
10
|
-
- `autoplay` - auto-plays the video
|
11
|
-
- `class`
|
12
|
-
- `id`
|
13
|
-
- `start` - start time (seconds)
|
14
|
-
- `title`
|
15
|
-
- `uid` - unique YouTube id
|
16
|
-
|
17
|
-
@example
|
18
|
-
|
19
|
-
```svelte
|
20
|
-
<script lang="ts">
|
21
|
-
import { YouTube } from "drab";
|
22
|
-
</script>
|
23
|
-
|
24
|
-
<YouTube
|
25
|
-
class="aspect-video w-full rounded"
|
26
|
-
title="Renegade - Kevin Olusola"
|
27
|
-
uid="gouiY85kD2o"
|
28
|
-
/>
|
29
|
-
```
|
30
|
-
-->
|
31
|
-
|
32
|
-
<script>let className = "";
|
33
|
-
export { className as class };
|
34
|
-
export let id = "";
|
35
|
-
export let uid;
|
36
|
-
export let title = "";
|
37
|
-
export let autoplay = false;
|
38
|
-
export let start = 0;
|
39
|
-
</script>
|
40
|
-
|
41
|
-
<iframe
|
42
|
-
class={className}
|
43
|
-
{id}
|
44
|
-
src="https://www.youtube-nocookie.com/embed/{uid}?start={start}{autoplay
|
45
|
-
? '&autoplay=1'
|
46
|
-
: ''}"
|
47
|
-
{title}
|
48
|
-
frameborder="0"
|
49
|
-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
50
|
-
allowfullscreen
|
51
|
-
/>
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
2
|
-
declare const __propDef: {
|
3
|
-
props: {
|
4
|
-
class?: string | undefined;
|
5
|
-
id?: string | undefined;
|
6
|
-
/** unique YouTube id */ uid: string;
|
7
|
-
title?: string | undefined;
|
8
|
-
/** auto-plays the video */ autoplay?: boolean | undefined;
|
9
|
-
/** start time (seconds) */ start?: number | undefined;
|
10
|
-
};
|
11
|
-
events: {
|
12
|
-
[evt: string]: CustomEvent<any>;
|
13
|
-
};
|
14
|
-
slots: {};
|
15
|
-
};
|
16
|
-
export type YouTubeProps = typeof __propDef.props;
|
17
|
-
export type YouTubeEvents = typeof __propDef.events;
|
18
|
-
export type YouTubeSlots = typeof __propDef.slots;
|
19
|
-
/**
|
20
|
-
* ### YouTube
|
21
|
-
*
|
22
|
-
* Embeds a YouTube video `iframe` into a website with the video `uid`, using [www.youtube-nocookie.com](https://support.google.com/youtube/answer/171780?hl=en#zippy=%2Cturn-on-privacy-enhanced-mode).
|
23
|
-
*
|
24
|
-
* @props
|
25
|
-
*
|
26
|
-
* - `autoplay` - auto-plays the video
|
27
|
-
* - `class`
|
28
|
-
* - `id`
|
29
|
-
* - `start` - start time (seconds)
|
30
|
-
* - `title`
|
31
|
-
* - `uid` - unique YouTube id
|
32
|
-
*
|
33
|
-
* @example
|
34
|
-
*
|
35
|
-
* ```svelte
|
36
|
-
* <script lang="ts">
|
37
|
-
* import { YouTube } from "drab";
|
38
|
-
* </script>
|
39
|
-
*
|
40
|
-
* <YouTube
|
41
|
-
* class="aspect-video w-full rounded"
|
42
|
-
* title="Renegade - Kevin Olusola"
|
43
|
-
* uid="gouiY85kD2o"
|
44
|
-
* />
|
45
|
-
* ```
|
46
|
-
*/
|
47
|
-
export default class YouTube extends SvelteComponent<YouTubeProps, YouTubeEvents, YouTubeSlots> {
|
48
|
-
}
|
49
|
-
export {};
|
package/dist/index.d.ts
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
import Breakpoint from "./components/Breakpoint.svelte";
|
2
|
-
import ContextMenu from "./components/ContextMenu.svelte";
|
3
|
-
import CopyButton from "./components/CopyButton.svelte";
|
4
|
-
import DataTable from "./components/DataTable.svelte";
|
5
|
-
import Details from "./components/Details.svelte";
|
6
|
-
import Editor from "./components/Editor.svelte";
|
7
|
-
import FrettedChord from "./components/FrettedChord.svelte";
|
8
|
-
import FullscreenButton from "./components/FullscreenButton.svelte";
|
9
|
-
import Popover from "./components/Popover.svelte";
|
10
|
-
import ShareButton from "./components/ShareButton.svelte";
|
11
|
-
import Sheet from "./components/Sheet.svelte";
|
12
|
-
import Tablature from "./components/Tablature.svelte";
|
13
|
-
import YouTube from "./components/YouTube.svelte";
|
14
|
-
export { Breakpoint, ContextMenu, CopyButton, DataTable, Details, Editor, FrettedChord, FullscreenButton, Popover, ShareButton, Sheet, Tablature, YouTube, };
|
package/dist/index.js
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
import Breakpoint from "./components/Breakpoint.svelte";
|
2
|
-
import ContextMenu from "./components/ContextMenu.svelte";
|
3
|
-
import CopyButton from "./components/CopyButton.svelte";
|
4
|
-
import DataTable from "./components/DataTable.svelte";
|
5
|
-
import Details from "./components/Details.svelte";
|
6
|
-
import Editor from "./components/Editor.svelte";
|
7
|
-
import FrettedChord from "./components/FrettedChord.svelte";
|
8
|
-
import FullscreenButton from "./components/FullscreenButton.svelte";
|
9
|
-
import Popover from "./components/Popover.svelte";
|
10
|
-
import ShareButton from "./components/ShareButton.svelte";
|
11
|
-
import Sheet from "./components/Sheet.svelte";
|
12
|
-
import Tablature from "./components/Tablature.svelte";
|
13
|
-
import YouTube from "./components/YouTube.svelte";
|
14
|
-
export { Breakpoint, ContextMenu, CopyButton, DataTable, Details, Editor, FrettedChord, FullscreenButton, Popover, ShareButton, Sheet, Tablature, YouTube, };
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Checks to see if the user prefers reduced motion
|
3
|
-
*
|
4
|
-
* @returns `true` if the user prefers reduced motion
|
5
|
-
*/
|
6
|
-
export const prefersReducedMotion = () => {
|
7
|
-
const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
|
8
|
-
if (mediaQuery.matches)
|
9
|
-
return true;
|
10
|
-
return false;
|
11
|
-
};
|
package/dist/util/delay.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare const delay = 800;
|
package/dist/util/delay.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export const delay = 800;
|
package/dist/util/transition.js
DELETED