@autumnsgrove/groveengine 0.1.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/README.md +163 -0
- package/dist/auth/jwt.d.ts +14 -0
- package/dist/auth/jwt.js +109 -0
- package/dist/auth/session.d.ts +42 -0
- package/dist/auth/session.js +105 -0
- package/dist/components/admin/GutterManager.svelte +910 -0
- package/dist/components/admin/GutterManager.svelte.d.ts +15 -0
- package/dist/components/admin/MarkdownEditor.svelte +3114 -0
- package/dist/components/admin/MarkdownEditor.svelte.d.ts +43 -0
- package/dist/components/custom/CollapsibleSection.svelte +74 -0
- package/dist/components/custom/CollapsibleSection.svelte.d.ts +15 -0
- package/dist/components/custom/ContentWithGutter.svelte +646 -0
- package/dist/components/custom/ContentWithGutter.svelte.d.ts +19 -0
- package/dist/components/custom/GutterItem.svelte +201 -0
- package/dist/components/custom/GutterItem.svelte.d.ts +11 -0
- package/dist/components/custom/LeftGutter.svelte +271 -0
- package/dist/components/custom/LeftGutter.svelte.d.ts +17 -0
- package/dist/components/custom/MobileTOC.svelte +273 -0
- package/dist/components/custom/MobileTOC.svelte.d.ts +11 -0
- package/dist/components/custom/TableOfContents.svelte +163 -0
- package/dist/components/custom/TableOfContents.svelte.d.ts +11 -0
- package/dist/components/gallery/ImageGallery.svelte +681 -0
- package/dist/components/gallery/ImageGallery.svelte.d.ts +11 -0
- package/dist/components/gallery/Lightbox.svelte +107 -0
- package/dist/components/gallery/Lightbox.svelte.d.ts +19 -0
- package/dist/components/gallery/LightboxCaption.svelte +25 -0
- package/dist/components/gallery/LightboxCaption.svelte.d.ts +11 -0
- package/dist/components/gallery/ZoomableImage.svelte +163 -0
- package/dist/components/gallery/ZoomableImage.svelte.d.ts +17 -0
- package/dist/components/ui/Accordion.svelte +74 -0
- package/dist/components/ui/Accordion.svelte.d.ts +42 -0
- package/dist/components/ui/Badge.svelte +48 -0
- package/dist/components/ui/Badge.svelte.d.ts +26 -0
- package/dist/components/ui/Button.svelte +74 -0
- package/dist/components/ui/Button.svelte.d.ts +34 -0
- package/dist/components/ui/Card.svelte +102 -0
- package/dist/components/ui/Card.svelte.d.ts +46 -0
- package/dist/components/ui/Dialog.svelte +91 -0
- package/dist/components/ui/Dialog.svelte.d.ts +43 -0
- package/dist/components/ui/Input.svelte +81 -0
- package/dist/components/ui/Input.svelte.d.ts +35 -0
- package/dist/components/ui/Select.svelte +69 -0
- package/dist/components/ui/Select.svelte.d.ts +36 -0
- package/dist/components/ui/Sheet.svelte +98 -0
- package/dist/components/ui/Sheet.svelte.d.ts +45 -0
- package/dist/components/ui/Skeleton.svelte +31 -0
- package/dist/components/ui/Skeleton.svelte.d.ts +26 -0
- package/dist/components/ui/Table.svelte +59 -0
- package/dist/components/ui/Table.svelte.d.ts +44 -0
- package/dist/components/ui/Tabs.svelte +76 -0
- package/dist/components/ui/Tabs.svelte.d.ts +41 -0
- package/dist/components/ui/Textarea.svelte +81 -0
- package/dist/components/ui/Textarea.svelte.d.ts +35 -0
- package/dist/components/ui/Toast.svelte +18 -0
- package/dist/components/ui/Toast.svelte.d.ts +7 -0
- package/dist/components/ui/accordion/accordion-content.svelte +24 -0
- package/dist/components/ui/accordion/accordion-content.svelte.d.ts +4 -0
- package/dist/components/ui/accordion/accordion-item.svelte +12 -0
- package/dist/components/ui/accordion/accordion-item.svelte.d.ts +4 -0
- package/dist/components/ui/accordion/accordion-trigger.svelte +29 -0
- package/dist/components/ui/accordion/accordion-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/accordion/index.d.ts +6 -0
- package/dist/components/ui/accordion/index.js +8 -0
- package/dist/components/ui/badge/badge.svelte +50 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +60 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/button/button.svelte +82 -0
- package/dist/components/ui/button/button.svelte.d.ts +132 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/card/card-content.svelte +16 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +16 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +16 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +16 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +25 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +8 -0
- package/dist/components/ui/card/card.svelte +20 -0
- package/dist/components/ui/card/card.svelte.d.ts +5 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/card/index.js +9 -0
- package/dist/components/ui/dialog/dialog-content.svelte +38 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +9 -0
- package/dist/components/ui/dialog/dialog-description.svelte +16 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +20 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +19 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-title.svelte +16 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +12 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/index.d.ts +26 -0
- package/dist/components/ui/index.js +29 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +46 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +13 -0
- package/dist/components/ui/select/select-content.svelte +39 -0
- package/dist/components/ui/select/select-content.svelte.d.ts +7 -0
- package/dist/components/ui/select/select-group-heading.svelte +16 -0
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-item.svelte +37 -0
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-separator.svelte +13 -0
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-trigger.svelte +24 -0
- package/dist/components/ui/select/select-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +22 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/index.d.ts +12 -0
- package/dist/components/ui/sheet/index.js +14 -0
- package/dist/components/ui/sheet/sheet-content.svelte +53 -0
- package/dist/components/ui/sheet/sheet-content.svelte.d.ts +62 -0
- package/dist/components/ui/sheet/sheet-description.svelte +16 -0
- package/dist/components/ui/sheet/sheet-description.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/sheet-footer.svelte +20 -0
- package/dist/components/ui/sheet/sheet-footer.svelte.d.ts +5 -0
- package/dist/components/ui/sheet/sheet-header.svelte +20 -0
- package/dist/components/ui/sheet/sheet-header.svelte.d.ts +5 -0
- package/dist/components/ui/sheet/sheet-overlay.svelte +21 -0
- package/dist/components/ui/sheet/sheet-overlay.svelte.d.ts +6 -0
- package/dist/components/ui/sheet/sheet-title.svelte +16 -0
- package/dist/components/ui/sheet/sheet-title.svelte.d.ts +4 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/dist/components/ui/skeleton/skeleton.svelte +17 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/components/ui/table/index.d.ts +9 -0
- package/dist/components/ui/table/index.js +11 -0
- package/dist/components/ui/table/table-body.svelte +16 -0
- package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-caption.svelte +16 -0
- package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-cell.svelte +20 -0
- package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-footer.svelte +16 -0
- package/dist/components/ui/table/table-footer.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-head.svelte +23 -0
- package/dist/components/ui/table/table-head.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-header.svelte +16 -0
- package/dist/components/ui/table/table-header.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-row.svelte +23 -0
- package/dist/components/ui/table/table-row.svelte.d.ts +5 -0
- package/dist/components/ui/table/table.svelte +18 -0
- package/dist/components/ui/table/table.svelte.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts +6 -0
- package/dist/components/ui/tabs/index.js +8 -0
- package/dist/components/ui/tabs/tabs-content.svelte +19 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +19 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +19 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +24 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +6 -0
- package/dist/components/ui/toast.d.ts +86 -0
- package/dist/components/ui/toast.js +99 -0
- package/dist/db/schema.sql +238 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +20 -0
- package/dist/payments/index.d.ts +33 -0
- package/dist/payments/index.js +47 -0
- package/dist/payments/shop.d.ts +165 -0
- package/dist/payments/shop.js +588 -0
- package/dist/payments/stripe/client.d.ts +231 -0
- package/dist/payments/stripe/client.js +198 -0
- package/dist/payments/stripe/index.d.ts +18 -0
- package/dist/payments/stripe/index.js +17 -0
- package/dist/payments/stripe/provider.d.ts +50 -0
- package/dist/payments/stripe/provider.js +530 -0
- package/dist/payments/types.d.ts +355 -0
- package/dist/payments/types.js +7 -0
- package/dist/server/logger.d.ts +53 -0
- package/dist/server/logger.js +252 -0
- package/dist/styles/content.css +514 -0
- package/dist/styles/tokens.css +175 -0
- package/dist/utils/api.d.ts +20 -0
- package/dist/utils/api.js +109 -0
- package/dist/utils/cn.d.ts +15 -0
- package/dist/utils/cn.js +18 -0
- package/dist/utils/csrf.d.ts +22 -0
- package/dist/utils/csrf.js +72 -0
- package/dist/utils/debounce.d.ts +7 -0
- package/dist/utils/debounce.js +14 -0
- package/dist/utils/gallery.d.ts +66 -0
- package/dist/utils/gallery.js +181 -0
- package/dist/utils/gutter.d.ts +54 -0
- package/dist/utils/gutter.js +169 -0
- package/dist/utils/imageProcessor.d.ts +58 -0
- package/dist/utils/imageProcessor.js +205 -0
- package/dist/utils/json.d.ts +17 -0
- package/dist/utils/json.js +26 -0
- package/dist/utils/markdown.d.ts +101 -0
- package/dist/utils/markdown.js +947 -0
- package/dist/utils/sanitize.d.ts +25 -0
- package/dist/utils/sanitize.js +127 -0
- package/dist/utils/validation.d.ts +46 -0
- package/dist/utils/validation.js +169 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +5 -0
- package/package.json +129 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog as SheetPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: SheetPrimitive.TitleProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<SheetPrimitive.Title
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn("text-foreground text-lg font-semibold", className)}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef, WithoutChildren } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
class={cn("bg-muted animate-pulse rounded-md", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
></div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const Skeleton: import("svelte").Component<Omit<WithElementRef<HTMLAttributes<HTMLDivElement>>, "children">, {}, "ref">;
|
|
4
|
+
type Skeleton = ReturnType<typeof Skeleton>;
|
|
5
|
+
export default Skeleton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Root from "./table.svelte";
|
|
2
|
+
import Body from "./table-body.svelte";
|
|
3
|
+
import Caption from "./table-caption.svelte";
|
|
4
|
+
import Cell from "./table-cell.svelte";
|
|
5
|
+
import Footer from "./table-footer.svelte";
|
|
6
|
+
import Head from "./table-head.svelte";
|
|
7
|
+
import Header from "./table-header.svelte";
|
|
8
|
+
import Row from "./table-row.svelte";
|
|
9
|
+
export { Root, Body, Caption, Cell, Footer, Head, Header, Row, Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Root from "./table.svelte";
|
|
2
|
+
import Body from "./table-body.svelte";
|
|
3
|
+
import Caption from "./table-caption.svelte";
|
|
4
|
+
import Cell from "./table-cell.svelte";
|
|
5
|
+
import Footer from "./table-footer.svelte";
|
|
6
|
+
import Head from "./table-head.svelte";
|
|
7
|
+
import Header from "./table-header.svelte";
|
|
8
|
+
import Row from "./table-row.svelte";
|
|
9
|
+
export { Root, Body, Caption, Cell, Footer, Head, Header, Row,
|
|
10
|
+
//
|
|
11
|
+
Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<tbody bind:this={ref} class={cn("[&_tr:last-child]:border-0", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</tbody>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const TableBody: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableBody = ReturnType<typeof TableBody>;
|
|
5
|
+
export default TableBody;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<caption bind:this={ref} class={cn("text-muted-foreground mt-4 text-sm", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</caption>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const TableCaption: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
|
+
type TableCaption = ReturnType<typeof TableCaption>;
|
|
5
|
+
export default TableCaption;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLTdAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLTdAttributes> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<td
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
class={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</td>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLTdAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const TableCell: import("svelte").Component<WithElementRef<HTMLTdAttributes>, {}, "ref">;
|
|
4
|
+
type TableCell = ReturnType<typeof TableCell>;
|
|
5
|
+
export default TableCell;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<tfoot bind:this={ref} class={cn("bg-muted/50 font-medium", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</tfoot>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const TableFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableFooter = ReturnType<typeof TableFooter>;
|
|
5
|
+
export default TableFooter;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLThAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLThAttributes> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<th
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
class={cn(
|
|
17
|
+
"text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</th>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLThAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const TableHead: import("svelte").Component<WithElementRef<HTMLThAttributes>, {}, "ref">;
|
|
4
|
+
type TableHead = ReturnType<typeof TableHead>;
|
|
5
|
+
export default TableHead;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<thead bind:this={ref} class={cn("[&_tr]:border-b", className)} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</thead>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const TableHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableHeader = ReturnType<typeof TableHeader>;
|
|
5
|
+
export default TableHeader;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLTableRowElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<tr
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
class={cn(
|
|
17
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</tr>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const TableRow: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableRowElement>>, {}, "ref">;
|
|
4
|
+
type TableRow = ReturnType<typeof TableRow>;
|
|
5
|
+
export default TableRow;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLTableAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLTableAttributes> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div class="relative w-full overflow-auto">
|
|
15
|
+
<table bind:this={ref} class={cn("w-full caption-bottom text-sm", className)} {...restProps}>
|
|
16
|
+
{@render children?.()}
|
|
17
|
+
</table>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLTableAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
declare const Table: import("svelte").Component<WithElementRef<HTMLTableAttributes>, {}, "ref">;
|
|
4
|
+
type Table = ReturnType<typeof Table>;
|
|
5
|
+
export default Table;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
|
+
import Content from "./tabs-content.svelte";
|
|
3
|
+
import List from "./tabs-list.svelte";
|
|
4
|
+
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
+
declare const Root: import("svelte").Component<TabsPrimitive.RootProps, {}, "value" | "ref">;
|
|
6
|
+
export { Root, Content, List, Trigger, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
|
+
import Content from "./tabs-content.svelte";
|
|
3
|
+
import List from "./tabs-list.svelte";
|
|
4
|
+
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
+
const Root = TabsPrimitive.Root;
|
|
6
|
+
export { Root, Content, List, Trigger,
|
|
7
|
+
//
|
|
8
|
+
Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: TabsPrimitive.ContentProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<TabsPrimitive.Content
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn(
|
|
15
|
+
"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: TabsPrimitive.ListProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<TabsPrimitive.List
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn(
|
|
15
|
+
"bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: TabsPrimitive.TriggerProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<TabsPrimitive.Trigger
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn(
|
|
15
|
+
"ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
type Props = WithElementRef<HTMLTextareaAttributes>;
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
ref = $bindable(null),
|
|
10
|
+
value = $bindable(),
|
|
11
|
+
class: className,
|
|
12
|
+
...restProps
|
|
13
|
+
}: Props = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<textarea
|
|
17
|
+
bind:this={ref}
|
|
18
|
+
class={cn(
|
|
19
|
+
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-base focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
bind:value
|
|
23
|
+
{...restProps}
|
|
24
|
+
/>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
type Props = WithElementRef<HTMLTextareaAttributes>;
|
|
4
|
+
declare const Textarea: import("svelte").Component<Props, {}, "value" | "ref">;
|
|
5
|
+
type Textarea = ReturnType<typeof Textarea>;
|
|
6
|
+
export default Textarea;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast notification utility for displaying temporary messages
|
|
3
|
+
* Wraps sonner toast with consistent defaults and API
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { toast } from "./";
|
|
7
|
+
* toast.success("Profile updated!");
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* toast.error("Failed to save changes", { description: "Please try again" });
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const toastId = toast.loading("Saving...");
|
|
14
|
+
* // later...
|
|
15
|
+
* toast.dismiss(toastId);
|
|
16
|
+
*/
|
|
17
|
+
export declare const toast: {
|
|
18
|
+
/**
|
|
19
|
+
* Show a success toast notification
|
|
20
|
+
*
|
|
21
|
+
* @param message - Success message to display
|
|
22
|
+
* @param options - Optional duration (default: 3000ms) and description
|
|
23
|
+
*/
|
|
24
|
+
success: (message: string, options?: {
|
|
25
|
+
duration?: number;
|
|
26
|
+
description?: string;
|
|
27
|
+
}) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Show an error toast notification
|
|
30
|
+
*
|
|
31
|
+
* @param message - Error message to display
|
|
32
|
+
* @param options - Optional duration (default: 4000ms) and description
|
|
33
|
+
*/
|
|
34
|
+
error: (message: string, options?: {
|
|
35
|
+
duration?: number;
|
|
36
|
+
description?: string;
|
|
37
|
+
}) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Show an info toast notification
|
|
40
|
+
*
|
|
41
|
+
* @param message - Info message to display
|
|
42
|
+
* @param options - Optional duration (default: 3000ms) and description
|
|
43
|
+
*/
|
|
44
|
+
info: (message: string, options?: {
|
|
45
|
+
duration?: number;
|
|
46
|
+
description?: string;
|
|
47
|
+
}) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Show a warning toast notification
|
|
50
|
+
*
|
|
51
|
+
* @param message - Warning message to display
|
|
52
|
+
* @param options - Optional duration (default: 3500ms) and description
|
|
53
|
+
*/
|
|
54
|
+
warning: (message: string, options?: {
|
|
55
|
+
duration?: number;
|
|
56
|
+
description?: string;
|
|
57
|
+
}) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Show a loading toast notification (persists until dismissed)
|
|
60
|
+
*
|
|
61
|
+
* @param message - Loading message to display
|
|
62
|
+
* @returns Toast ID for later dismissal
|
|
63
|
+
*/
|
|
64
|
+
loading: (message: string) => string | number;
|
|
65
|
+
/**
|
|
66
|
+
* Show a promise-based toast that updates based on promise state
|
|
67
|
+
*
|
|
68
|
+
* @param promise - Promise to track
|
|
69
|
+
* @param messages - Loading, success, and error messages
|
|
70
|
+
*/
|
|
71
|
+
promise: <T>(promise: Promise<T>, messages: {
|
|
72
|
+
loading: string;
|
|
73
|
+
success: string;
|
|
74
|
+
error: string;
|
|
75
|
+
}) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Dismiss a specific toast by ID
|
|
78
|
+
*
|
|
79
|
+
* @param toastId - Optional toast ID (from loading() return value)
|
|
80
|
+
*/
|
|
81
|
+
dismiss: (toastId?: string | number) => void;
|
|
82
|
+
/**
|
|
83
|
+
* Dismiss all toasts
|
|
84
|
+
*/
|
|
85
|
+
dismissAll: () => void;
|
|
86
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { toast as sonnerToast } from "sonner";
|
|
2
|
+
/**
|
|
3
|
+
* Toast notification utility for displaying temporary messages
|
|
4
|
+
* Wraps sonner toast with consistent defaults and API
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { toast } from "./";
|
|
8
|
+
* toast.success("Profile updated!");
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* toast.error("Failed to save changes", { description: "Please try again" });
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const toastId = toast.loading("Saving...");
|
|
15
|
+
* // later...
|
|
16
|
+
* toast.dismiss(toastId);
|
|
17
|
+
*/
|
|
18
|
+
export const toast = {
|
|
19
|
+
/**
|
|
20
|
+
* Show a success toast notification
|
|
21
|
+
*
|
|
22
|
+
* @param message - Success message to display
|
|
23
|
+
* @param options - Optional duration (default: 3000ms) and description
|
|
24
|
+
*/
|
|
25
|
+
success: (message, options) => {
|
|
26
|
+
sonnerToast.success(message, {
|
|
27
|
+
duration: options?.duration || 3000,
|
|
28
|
+
description: options?.description
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Show an error toast notification
|
|
33
|
+
*
|
|
34
|
+
* @param message - Error message to display
|
|
35
|
+
* @param options - Optional duration (default: 4000ms) and description
|
|
36
|
+
*/
|
|
37
|
+
error: (message, options) => {
|
|
38
|
+
sonnerToast.error(message, {
|
|
39
|
+
duration: options?.duration || 4000,
|
|
40
|
+
description: options?.description
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Show an info toast notification
|
|
45
|
+
*
|
|
46
|
+
* @param message - Info message to display
|
|
47
|
+
* @param options - Optional duration (default: 3000ms) and description
|
|
48
|
+
*/
|
|
49
|
+
info: (message, options) => {
|
|
50
|
+
sonnerToast.info(message, {
|
|
51
|
+
duration: options?.duration || 3000,
|
|
52
|
+
description: options?.description
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Show a warning toast notification
|
|
57
|
+
*
|
|
58
|
+
* @param message - Warning message to display
|
|
59
|
+
* @param options - Optional duration (default: 3500ms) and description
|
|
60
|
+
*/
|
|
61
|
+
warning: (message, options) => {
|
|
62
|
+
sonnerToast.warning(message, {
|
|
63
|
+
duration: options?.duration || 3500,
|
|
64
|
+
description: options?.description
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* Show a loading toast notification (persists until dismissed)
|
|
69
|
+
*
|
|
70
|
+
* @param message - Loading message to display
|
|
71
|
+
* @returns Toast ID for later dismissal
|
|
72
|
+
*/
|
|
73
|
+
loading: (message) => {
|
|
74
|
+
return sonnerToast.loading(message);
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Show a promise-based toast that updates based on promise state
|
|
78
|
+
*
|
|
79
|
+
* @param promise - Promise to track
|
|
80
|
+
* @param messages - Loading, success, and error messages
|
|
81
|
+
*/
|
|
82
|
+
promise: (promise, messages) => {
|
|
83
|
+
sonnerToast.promise(promise, messages);
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Dismiss a specific toast by ID
|
|
87
|
+
*
|
|
88
|
+
* @param toastId - Optional toast ID (from loading() return value)
|
|
89
|
+
*/
|
|
90
|
+
dismiss: (toastId) => {
|
|
91
|
+
sonnerToast.dismiss(toastId);
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* Dismiss all toasts
|
|
95
|
+
*/
|
|
96
|
+
dismissAll: () => {
|
|
97
|
+
sonnerToast.dismiss();
|
|
98
|
+
}
|
|
99
|
+
};
|