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.
Files changed (136) hide show
  1. package/animate/define.d.ts +2 -0
  2. package/animate/define.iife.js +1 -0
  3. package/animate/define.js +1 -0
  4. package/animate.d.ts +54 -0
  5. package/animate.iife.js +1 -0
  6. package/animate.js +1 -0
  7. package/base/define.d.ts +2 -0
  8. package/base/define.iife.js +1 -0
  9. package/base/define.js +1 -0
  10. package/base.d.ts +69 -0
  11. package/base.iife.js +1 -0
  12. package/base.js +1 -0
  13. package/breakpoint/define.d.ts +2 -0
  14. package/breakpoint/define.iife.js +1 -0
  15. package/breakpoint/define.js +1 -0
  16. package/breakpoint.d.ts +24 -0
  17. package/breakpoint.iife.js +1 -0
  18. package/breakpoint.js +1 -0
  19. package/chunk-2ZZQECRY.js +1 -0
  20. package/chunk-57VEEUFG.js +1 -0
  21. package/chunk-5JV4T7GM.js +1 -0
  22. package/chunk-6HYPZWQ4.js +1 -0
  23. package/chunk-7F7CQUEG.js +1 -0
  24. package/chunk-7KU2PRW5.js +1 -0
  25. package/chunk-7S6DTKGH.js +1 -0
  26. package/chunk-FNJ7AESC.js +9 -0
  27. package/chunk-IQJQPZUL.js +1 -0
  28. package/chunk-JMJUWKN2.js +1 -0
  29. package/chunk-MXKU7AKV.js +1 -0
  30. package/chunk-T7RZI3ZL.js +1 -0
  31. package/chunk-TSTTUEAF.js +1 -0
  32. package/chunk-VEVFQB5N.js +1 -0
  33. package/contextmenu/define.d.ts +2 -0
  34. package/contextmenu/define.iife.js +1 -0
  35. package/contextmenu/define.js +1 -0
  36. package/contextmenu.d.ts +15 -0
  37. package/contextmenu.iife.js +1 -0
  38. package/contextmenu.js +1 -0
  39. package/copy/define.d.ts +2 -0
  40. package/copy/define.iife.js +1 -0
  41. package/copy/define.js +1 -0
  42. package/copy.d.ts +13 -0
  43. package/copy.iife.js +1 -0
  44. package/copy.js +1 -0
  45. package/define.d.ts +2 -0
  46. package/define.iife.js +9 -0
  47. package/define.js +1 -0
  48. package/details/define.d.ts +2 -0
  49. package/details/define.iife.js +1 -0
  50. package/details/define.js +1 -0
  51. package/details.d.ts +23 -0
  52. package/details.iife.js +1 -0
  53. package/details.js +1 -0
  54. package/dialog/define.d.ts +2 -0
  55. package/dialog/define.iife.js +1 -0
  56. package/dialog/define.js +1 -0
  57. package/dialog.d.ts +20 -0
  58. package/dialog.iife.js +1 -0
  59. package/dialog.js +1 -0
  60. package/editor/define.d.ts +2 -0
  61. package/editor/define.iife.js +9 -0
  62. package/editor/define.js +1 -0
  63. package/editor.d.ts +58 -0
  64. package/editor.iife.js +9 -0
  65. package/editor.js +1 -0
  66. package/fullscreen/define.d.ts +2 -0
  67. package/fullscreen/define.iife.js +1 -0
  68. package/fullscreen/define.js +1 -0
  69. package/fullscreen.d.ts +23 -0
  70. package/fullscreen.iife.js +1 -0
  71. package/fullscreen.js +1 -0
  72. package/index-22PHGcPf.d.ts +17 -0
  73. package/index.d.ts +14 -0
  74. package/index.iife.js +9 -0
  75. package/index.js +1 -0
  76. package/package.json +131 -59
  77. package/popover/define.d.ts +2 -0
  78. package/popover/define.iife.js +1 -0
  79. package/popover/define.js +1 -0
  80. package/popover.d.ts +29 -0
  81. package/popover.iife.js +1 -0
  82. package/popover.js +1 -0
  83. package/share/define.d.ts +2 -0
  84. package/share/define.iife.js +1 -0
  85. package/share/define.js +1 -0
  86. package/share.d.ts +19 -0
  87. package/share.iife.js +1 -0
  88. package/share.js +1 -0
  89. package/tablesort/define.d.ts +2 -0
  90. package/tablesort/define.iife.js +1 -0
  91. package/tablesort/define.js +1 -0
  92. package/tablesort.d.ts +21 -0
  93. package/tablesort.iife.js +1 -0
  94. package/tablesort.js +1 -0
  95. package/youtube/define.d.ts +2 -0
  96. package/youtube/define.iife.js +1 -0
  97. package/youtube/define.js +1 -0
  98. package/youtube.d.ts +29 -0
  99. package/youtube.iife.js +1 -0
  100. package/youtube.js +1 -0
  101. package/LICENSE.md +0 -21
  102. package/README.md +0 -131
  103. package/dist/components/Breakpoint.svelte +0 -55
  104. package/dist/components/Breakpoint.svelte.d.ts +0 -46
  105. package/dist/components/ContextMenu.svelte +0 -150
  106. package/dist/components/ContextMenu.svelte.d.ts +0 -76
  107. package/dist/components/CopyButton.svelte +0 -97
  108. package/dist/components/CopyButton.svelte.d.ts +0 -60
  109. package/dist/components/DataTable.svelte +0 -208
  110. package/dist/components/DataTable.svelte.d.ts +0 -155
  111. package/dist/components/Details.svelte +0 -101
  112. package/dist/components/Details.svelte.d.ts +0 -67
  113. package/dist/components/Editor.svelte +0 -404
  114. package/dist/components/Editor.svelte.d.ts +0 -111
  115. package/dist/components/FrettedChord.svelte +0 -213
  116. package/dist/components/FrettedChord.svelte.d.ts +0 -79
  117. package/dist/components/FullscreenButton.svelte +0 -95
  118. package/dist/components/FullscreenButton.svelte.d.ts +0 -62
  119. package/dist/components/Popover.svelte +0 -153
  120. package/dist/components/Popover.svelte.d.ts +0 -80
  121. package/dist/components/ShareButton.svelte +0 -133
  122. package/dist/components/ShareButton.svelte.d.ts +0 -93
  123. package/dist/components/Sheet.svelte +0 -180
  124. package/dist/components/Sheet.svelte.d.ts +0 -99
  125. package/dist/components/Tablature.svelte +0 -173
  126. package/dist/components/Tablature.svelte.d.ts +0 -93
  127. package/dist/components/YouTube.svelte +0 -51
  128. package/dist/components/YouTube.svelte.d.ts +0 -49
  129. package/dist/index.d.ts +0 -14
  130. package/dist/index.js +0 -14
  131. package/dist/util/accessibility.d.ts +0 -6
  132. package/dist/util/accessibility.js +0 -11
  133. package/dist/util/delay.d.ts +0 -1
  134. package/dist/util/delay.js +0 -1
  135. package/dist/util/transition.d.ts +0 -2
  136. 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,6 +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 declare const prefersReducedMotion: () => boolean;
@@ -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
- };
@@ -1 +0,0 @@
1
- export declare const delay = 800;
@@ -1 +0,0 @@
1
- export const delay = 800;
@@ -1,2 +0,0 @@
1
- export declare const duration = 200;
2
- export declare const start = 0.95;
@@ -1,2 +0,0 @@
1
- export const duration = 200;
2
- export const start = 0.95;