yaxa-svelte 1.13.1 → 1.14.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 +2 -2
- package/dist/actions/infiniteScroll.js +1 -1
- package/dist/admin/handler.d.ts +2 -2
- package/dist/admin/handler.js +2 -2
- package/dist/admin/hook.d.ts +3 -3
- package/dist/admin/hook.js +6 -6
- package/dist/auth/index.d.ts +5 -1
- package/dist/auth/index.js +2 -0
- package/dist/components/ai/AiChat.svelte +1 -1
- package/dist/components/ai/PromptBar.svelte +1 -1
- package/dist/components/blocks/FAQ.svelte +1 -1
- package/dist/components/blocks/FAQ.svelte.d.ts +1 -1
- package/dist/components/blocks/FeatureGrid.svelte +1 -1
- package/dist/components/blocks/FeatureGrid.svelte.d.ts +1 -1
- package/dist/components/blocks/Testimonials.svelte +1 -1
- package/dist/components/blocks/Testimonials.svelte.d.ts +1 -1
- package/dist/components/elements/Avatar.svelte +1 -1
- package/dist/components/elements/Avatar.svelte.d.ts +1 -1
- package/dist/components/elements/Badge.svelte +1 -1
- package/dist/components/elements/Badge.svelte.d.ts +1 -1
- package/dist/components/elements/Button.svelte +1 -1
- package/dist/components/elements/Button.svelte.d.ts +1 -1
- package/dist/components/elements/Carousel.svelte +1 -1
- package/dist/components/elements/Carousel.svelte.d.ts +4 -4
- package/dist/components/elements/CodeBlock.svelte +1 -1
- package/dist/components/elements/CodeDiff.svelte +1 -1
- package/dist/components/elements/CodeDiff.test.js +3 -3
- package/dist/components/elements/DataTable.dom.test.js +1 -1
- package/dist/components/elements/EmptyState.svelte +1 -1
- package/dist/components/elements/EmptyState.svelte.d.ts +1 -1
- package/dist/components/elements/Icon.svelte +1 -1
- package/dist/components/elements/Icon.test.js +1 -1
- package/dist/components/elements/Kbd.svelte +1 -1
- package/dist/components/elements/Kbd.svelte.d.ts +1 -1
- package/dist/components/elements/MetricCard.svelte +1 -1
- package/dist/components/elements/Progress.svelte +1 -1
- package/dist/components/elements/Progress.svelte.d.ts +1 -1
- package/dist/components/elements/Skeleton.svelte +1 -1
- package/dist/components/elements/Skeleton.svelte.d.ts +1 -1
- package/dist/components/elements/Skeleton.test.js +1 -1
- package/dist/components/elements/SortableList.svelte +1 -1
- package/dist/components/elements/Terminal.svelte +2 -2
- package/dist/components/elements/Terminal.svelte.d.ts +1 -1
- package/dist/components/elements/Timeline.svelte +1 -1
- package/dist/components/elements/Timeline.svelte.d.ts +1 -1
- package/dist/components/elements/Tree.svelte +1 -1
- package/dist/components/elements/Tree.svelte.d.ts +1 -1
- package/dist/components/elements/VirtualList.svelte +1 -1
- package/dist/components/elements/VirtualList.svelte.d.ts +1 -1
- package/dist/components/forms/Combobox.dom.test.js +1 -1
- package/dist/components/forms/Combobox.svelte +1 -1
- package/dist/components/forms/Combobox.svelte.d.ts +1 -1
- package/dist/components/forms/DatePicker.svelte +1 -1
- package/dist/components/forms/DateRangePicker.svelte +1 -1
- package/dist/components/forms/Dropzone.svelte +1 -1
- package/dist/components/forms/Form.dom.test.js +1 -1
- package/dist/components/forms/Input.svelte +1 -1
- package/dist/components/forms/Input.svelte.d.ts +1 -1
- package/dist/components/forms/InputOTP.svelte +1 -1
- package/dist/components/forms/InputOTP.test.js +1 -1
- package/dist/components/forms/MultiSelect.svelte +1 -1
- package/dist/components/forms/MultiSelect.svelte.d.ts +1 -1
- package/dist/components/forms/NumberInput.svelte +1 -1
- package/dist/components/forms/NumberInput.svelte.d.ts +1 -1
- package/dist/components/forms/Select.svelte +1 -1
- package/dist/components/forms/Select.svelte.d.ts +1 -1
- package/dist/components/forms/Switch.svelte +1 -1
- package/dist/components/forms/Switch.svelte.d.ts +1 -1
- package/dist/components/forms/Textarea.svelte +2 -2
- package/dist/components/forms/Textarea.svelte.d.ts +1 -1
- package/dist/components/forms/ToggleGroup.svelte +1 -1
- package/dist/components/forms/advanced-forms.test.js +1 -1
- package/dist/components/layout/Card.svelte +1 -1
- package/dist/components/layout/Card.svelte.d.ts +1 -1
- package/dist/components/layout/Container.svelte +1 -1
- package/dist/components/layout/Container.svelte.d.ts +1 -1
- package/dist/components/layout/DashboardShell.svelte +1 -1
- package/dist/components/layout/DashboardShell.svelte.d.ts +1 -1
- package/dist/components/layout/Footer.svelte +2 -2
- package/dist/components/layout/Footer.svelte.d.ts +1 -1
- package/dist/components/layout/Header.svelte +3 -3
- package/dist/components/layout/Header.svelte.d.ts +1 -1
- package/dist/components/layout/ResizablePanels.svelte +1 -1
- package/dist/components/layout/ResizablePanels.svelte.d.ts +1 -1
- package/dist/components/layout/YaxaApp.svelte +4 -4
- package/dist/components/layout/YaxaApp.svelte.d.ts +3 -3
- package/dist/components/legal/LegalDocument.svelte +2 -2
- package/dist/components/legal/LegalDocument.svelte.d.ts +1 -1
- package/dist/components/navigation/CommandPalette.svelte +1 -1
- package/dist/components/navigation/Stepper.svelte +1 -1
- package/dist/components/navigation/Stepper.svelte.d.ts +1 -1
- package/dist/components/overlays/Alert.svelte +1 -1
- package/dist/components/overlays/Alert.svelte.d.ts +1 -1
- package/dist/components/overlays/Drawer.svelte +1 -1
- package/dist/components/overlays/Drawer.svelte.d.ts +1 -1
- package/dist/components/overlays/Modal.dom.test.js +1 -1
- package/dist/components/overlays/Modal.svelte +1 -1
- package/dist/components/overlays/Modal.svelte.d.ts +1 -1
- package/dist/components/overlays/NotificationCenter.svelte +1 -1
- package/dist/components/overlays/NotificationCenter.svelte.d.ts +1 -1
- package/dist/components/overlays/Slideover.svelte +1 -1
- package/dist/components/overlays/Slideover.svelte.d.ts +1 -1
- package/dist/components/overlays/Toast.svelte +3 -3
- package/dist/components/overlays/Toast.svelte.d.ts +2 -2
- package/dist/components/overlays/Toast.test.js +2 -2
- package/dist/components/overlays/Toaster.svelte +2 -2
- package/dist/components/overlays/Toaster.svelte.d.ts +1 -1
- package/dist/components/overlays/Tooltip.dom.test.js +1 -1
- package/dist/components/saas/Gate.svelte +2 -2
- package/dist/components/saas/Gate.svelte.d.ts +1 -1
- package/dist/components/saas/OrgSwitcher.svelte +1 -1
- package/dist/components/saas/OrgSwitcher.svelte.d.ts +1 -1
- package/dist/components/saas/PasskeyUI.svelte +1 -1
- package/dist/components/saas/PasskeyUI.svelte.d.ts +1 -1
- package/dist/components/seo/Favicons.svelte +2 -2
- package/dist/components/seo/Favicons.svelte.d.ts +1 -1
- package/dist/components/seo/OgImage.svelte +2 -2
- package/dist/components/seo/OgImage.svelte.d.ts +1 -1
- package/dist/components/seo/Seo.svelte +3 -3
- package/dist/components/seo/Seo.svelte.d.ts +1 -1
- package/dist/components/theme/ThemeStudio.svelte +2 -2
- package/dist/composables/useClipboard.svelte.js +1 -1
- package/dist/composables/useColorMode.svelte.d.ts +1 -1
- package/dist/composables/useColorMode.svelte.js +1 -1
- package/dist/composables/useFormAction.svelte.d.ts +11 -10
- package/dist/composables/useFormAction.svelte.js +10 -9
- package/dist/composables/useGate.svelte.d.ts +1 -1
- package/dist/composables/useGate.svelte.js +1 -1
- package/dist/composables/useInfiniteScroll.svelte.js +1 -1
- package/dist/composables/useLocale.svelte.js +1 -1
- package/dist/composables/useMediaQuery.svelte.js +1 -1
- package/dist/composables/useShortcuts.svelte.js +1 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -4
- package/dist/server/auth/hook.d.ts +1 -1
- package/dist/server/endpoints.test.js +5 -5
- package/dist/server/polar/webhook.js +1 -2
- package/dist/server/storage/index.js +5 -19
- package/dist/server/storage/storage.test.js +1 -1
- package/dist/site/hook.d.ts +1 -1
- package/dist/site/sitemap-xsl.js +2 -2
- package/dist/testing/setup.d.ts +1 -0
- package/dist/testing/setup.js +1 -1
- package/dist/theme/theme.svelte.js +1 -1
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -216,10 +216,10 @@ export const POST = createPolarWebhookHandler();
|
|
|
216
216
|
|
|
217
217
|
| Subpath | Description |
|
|
218
218
|
| :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
219
|
-
| `yaxa-svelte` | Core UI Primitives, SEO Components, `<Gate />`, Theme System & Composables (`useGate`, `useUpload`, `
|
|
219
|
+
| `yaxa-svelte` | Core UI Primitives, SEO Components, `<Gate />`, Theme System & Composables (`useGate`, `useUpload`, `useToast`, `useClipboard`, etc.) |
|
|
220
220
|
| `yaxa-svelte/admin` | Drizzle ORM Schema Introspection, `<AdminDashboard />`, `createYaxaAdminHook`, `createDrizzleAdmin`, `<DevSandbox />`, `<RecordDrawer />` |
|
|
221
221
|
| `yaxa-svelte/server` | Universal Server Hooks, SEO endpoints, Drizzle DB drivers, Cloud Storage handlers, and Email dispatch |
|
|
222
|
-
| `yaxa-svelte/auth` | Better-Auth
|
|
222
|
+
| `yaxa-svelte/auth` | Better-Auth client & server integration (`useAuth`, `<AuthCard />`, `<PasskeyUI />`, `<TwoFactorModal />`, `createYaxaAuth`) |
|
|
223
223
|
| `yaxa-svelte/db` | Multi-dialect Drizzle ORM clients & schemas for Neon (PostgreSQL) and Turso (SQLite/LibSQL) |
|
|
224
224
|
| `yaxa-svelte/polar` | Polar.sh billing, customer portal sessions, and webhook synchronization |
|
|
225
225
|
| `yaxa-svelte/email` | Resend transactional email templates with automatic development console fallback |
|
package/dist/admin/handler.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ export declare class DrizzleAdminService {
|
|
|
39
39
|
* Example:
|
|
40
40
|
* ```ts
|
|
41
41
|
* // src/routes/admin/+page.server.ts
|
|
42
|
-
* import { db } from '
|
|
43
|
-
* import * as schema from '
|
|
42
|
+
* import { db } from '#lib/server/db/index.js';
|
|
43
|
+
* import * as schema from '#lib/server/db/schema-pg.js';
|
|
44
44
|
* import { createDrizzleAdmin } from 'yaxa-svelte/admin';
|
|
45
45
|
*
|
|
46
46
|
* export const { load, actions } = createDrizzleAdmin({ db, schema });
|
package/dist/admin/handler.js
CHANGED
|
@@ -232,8 +232,8 @@ export class DrizzleAdminService {
|
|
|
232
232
|
* Example:
|
|
233
233
|
* ```ts
|
|
234
234
|
* // src/routes/admin/+page.server.ts
|
|
235
|
-
* import { db } from '
|
|
236
|
-
* import * as schema from '
|
|
235
|
+
* import { db } from '#lib/server/db/index.js';
|
|
236
|
+
* import * as schema from '#lib/server/db/schema-pg.js';
|
|
237
237
|
* import { createDrizzleAdmin } from 'yaxa-svelte/admin';
|
|
238
238
|
*
|
|
239
239
|
* export const { load, actions } = createDrizzleAdmin({ db, schema });
|
package/dist/admin/hook.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Handle } from '@sveltejs/kit';
|
|
1
|
+
import type { Handle } from '@sveltejs/kit/hooks';
|
|
2
2
|
import type { YaxaAdminHookOptions } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a SvelteKit Handle hook for zero-file route interception and automatic Drizzle admin dashboard.
|
|
@@ -8,8 +8,8 @@ import type { YaxaAdminHookOptions } from './types';
|
|
|
8
8
|
* // src/hooks.server.ts
|
|
9
9
|
* import { sequence } from '@sveltejs/kit/hooks';
|
|
10
10
|
* import { createYaxaAdminHook } from 'yaxa-svelte/admin';
|
|
11
|
-
* import { db } from '
|
|
12
|
-
* import * as schema from '
|
|
11
|
+
* import { db } from '#lib/server/db/index.js';
|
|
12
|
+
* import * as schema from '#lib/server/db/schema-pg.js';
|
|
13
13
|
*
|
|
14
14
|
* export const handle = sequence(
|
|
15
15
|
* createYaxaAdminHook({ db, schema, path: '/admin' })
|
package/dist/admin/hook.js
CHANGED
|
@@ -9,8 +9,8 @@ import { createPresignedUploadUrl } from '../server/storage/index';
|
|
|
9
9
|
* // src/hooks.server.ts
|
|
10
10
|
* import { sequence } from '@sveltejs/kit/hooks';
|
|
11
11
|
* import { createYaxaAdminHook } from 'yaxa-svelte/admin';
|
|
12
|
-
* import { db } from '
|
|
13
|
-
* import * as schema from '
|
|
12
|
+
* import { db } from '#lib/server/db/index.js';
|
|
13
|
+
* import * as schema from '#lib/server/db/schema-pg.js';
|
|
14
14
|
*
|
|
15
15
|
* export const handle = sequence(
|
|
16
16
|
* createYaxaAdminHook({ db, schema, path: '/admin' })
|
|
@@ -172,8 +172,8 @@ function renderAdminHtml(data, title, adminPath) {
|
|
|
172
172
|
<meta charset="utf-8" />
|
|
173
173
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
174
174
|
<title>${title}</title>
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
<${'script'} src="https://cdn.tailwindcss.com"></${'script'}>
|
|
176
|
+
<${'script'}>
|
|
177
177
|
tailwind.config = {
|
|
178
178
|
darkMode: 'class',
|
|
179
179
|
theme: {
|
|
@@ -188,8 +188,8 @@ function renderAdminHtml(data, title, adminPath) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
}
|
|
192
|
-
|
|
191
|
+
};
|
|
192
|
+
</${'script'}>
|
|
193
193
|
</head>
|
|
194
194
|
<body class="bg-neutral-950 text-neutral-100 antialiased min-h-screen font-sans">
|
|
195
195
|
<div class="flex h-14 items-center justify-between border-b border-neutral-800 bg-neutral-900/90 px-6 backdrop-blur">
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { default as AuthCard } from '../components/saas/AuthCard.svelte';
|
|
2
|
+
export type { AuthCardMode } from '../components/saas/AuthCard.svelte';
|
|
3
|
+
export { default as PasskeyUI, passkeyUiVariants } from '../components/saas/PasskeyUI.svelte';
|
|
4
|
+
export type { PasskeyUiProps } from '../components/saas/PasskeyUI.svelte';
|
|
5
|
+
export { default as TwoFactorModal } from '../components/saas/TwoFactorModal.svelte';
|
|
2
6
|
export { useAuth } from '../composables/useAuth.svelte';
|
|
3
|
-
export type { UseAuthOptions, SocialProvider } from '../composables/useAuth.svelte';
|
|
7
|
+
export type { UseAuthOptions, SocialProvider, PasskeyInfo } from '../composables/useAuth.svelte';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
// Yaxa SaaS Auth Suite (Better-Auth integration for Svelte 5 & SvelteKit)
|
|
2
2
|
export { default as AuthCard } from '../components/saas/AuthCard.svelte';
|
|
3
|
+
export { default as PasskeyUI, passkeyUiVariants } from '../components/saas/PasskeyUI.svelte';
|
|
4
|
+
export { default as TwoFactorModal } from '../components/saas/TwoFactorModal.svelte';
|
|
3
5
|
export { useAuth } from '../composables/useAuth.svelte';
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
import PromptBar from './PromptBar.svelte';
|
|
50
50
|
import AiThought from './AiThought.svelte';
|
|
51
51
|
import AiToolCall from './AiToolCall.svelte';
|
|
52
|
-
import { useToast } from '
|
|
52
|
+
import { useToast } from '#lib/composables/useToast.svelte.js';
|
|
53
53
|
|
|
54
54
|
let {
|
|
55
55
|
messages = [],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { tv, type VariantProps } from '
|
|
2
|
+
import { tv, type VariantProps } from '#lib/utils/cn.js';
|
|
3
3
|
|
|
4
4
|
export const avatarVariants = tv({
|
|
5
5
|
base: 'relative inline-flex shrink-0 items-center justify-center font-medium select-none overflow-hidden rounded-full bg-neutral-200 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VariantProps } from '
|
|
1
|
+
import { type VariantProps } from '#lib/utils/cn.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { IconSource } from './Icon.svelte';
|
|
4
4
|
export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { tv, type VariantProps } from '
|
|
2
|
+
import { tv, type VariantProps } from '#lib/utils/cn.js';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
import type { HTMLButtonAttributes, HTMLAnchorAttributes } from 'svelte/elements';
|
|
5
5
|
import type { IconSource } from './Icon.svelte';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VariantProps } from '
|
|
1
|
+
import { type VariantProps } from '#lib/utils/cn.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { IconSource } from './Icon.svelte';
|
|
4
4
|
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type VariantProps } from '
|
|
1
|
+
import { type VariantProps } from '#lib/utils/cn.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
export declare const carouselVariants: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
[key: string]: {
|
|
5
5
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
6
|
-
root?: import("tailwind-variants").ClassValue;
|
|
7
6
|
viewport?: import("tailwind-variants").ClassValue;
|
|
7
|
+
root?: import("tailwind-variants").ClassValue;
|
|
8
8
|
slide?: import("tailwind-variants").ClassValue;
|
|
9
9
|
controls?: import("tailwind-variants").ClassValue;
|
|
10
10
|
arrowBtn?: import("tailwind-variants").ClassValue;
|
|
@@ -15,8 +15,8 @@ export declare const carouselVariants: import("tailwind-variants").TVReturnType<
|
|
|
15
15
|
} | {
|
|
16
16
|
[x: string]: {
|
|
17
17
|
[x: string]: import("tailwind-variants").ClassValue | {
|
|
18
|
-
root?: import("tailwind-variants").ClassValue;
|
|
19
18
|
viewport?: import("tailwind-variants").ClassValue;
|
|
19
|
+
root?: import("tailwind-variants").ClassValue;
|
|
20
20
|
slide?: import("tailwind-variants").ClassValue;
|
|
21
21
|
controls?: import("tailwind-variants").ClassValue;
|
|
22
22
|
arrowBtn?: import("tailwind-variants").ClassValue;
|
|
@@ -35,8 +35,8 @@ export declare const carouselVariants: import("tailwind-variants").TVReturnType<
|
|
|
35
35
|
}, undefined, {
|
|
36
36
|
[key: string]: {
|
|
37
37
|
[key: string]: import("tailwind-variants").ClassValue | {
|
|
38
|
-
root?: import("tailwind-variants").ClassValue;
|
|
39
38
|
viewport?: import("tailwind-variants").ClassValue;
|
|
39
|
+
root?: import("tailwind-variants").ClassValue;
|
|
40
40
|
slide?: import("tailwind-variants").ClassValue;
|
|
41
41
|
controls?: import("tailwind-variants").ClassValue;
|
|
42
42
|
arrowBtn?: import("tailwind-variants").ClassValue;
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
<script lang="ts">
|
|
244
244
|
import Button from './Button.svelte';
|
|
245
245
|
import Icon from './Icon.svelte';
|
|
246
|
-
import { useToast } from '
|
|
246
|
+
import { useToast } from '#lib/composables/useToast.svelte.js';
|
|
247
247
|
|
|
248
248
|
let {
|
|
249
249
|
code,
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
import Button from './Button.svelte';
|
|
157
157
|
import Icon from './Icon.svelte';
|
|
158
158
|
import Badge from './Badge.svelte';
|
|
159
|
-
import { useToast } from '
|
|
159
|
+
import { useToast } from '#lib/composables/useToast.svelte.js';
|
|
160
160
|
|
|
161
161
|
let {
|
|
162
162
|
original = '',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { renderComponent } from '
|
|
2
|
+
import { renderComponent } from '#lib/testing/index.js';
|
|
3
3
|
import CodeDiff, { computeDiff } from './CodeDiff.svelte';
|
|
4
4
|
describe('CodeDiff Component & Diff Algorithm', () => {
|
|
5
5
|
it('should correctly compute line additions, deletions, and unchanged lines', () => {
|
|
@@ -36,8 +36,8 @@ describe('CodeDiff Component & Diff Algorithm', () => {
|
|
|
36
36
|
cleanup();
|
|
37
37
|
});
|
|
38
38
|
it('should render split side-by-side mode', () => {
|
|
39
|
-
const original =
|
|
40
|
-
const modified =
|
|
39
|
+
const original = `<${'script'}>\n export let name = 'world';\n</${'script'}>`;
|
|
40
|
+
const modified = `<${'script'}>\n let { name = 'world' } = $props();\n</${'script'}>`;
|
|
41
41
|
const { target, cleanup } = renderComponent(CodeDiff, {
|
|
42
42
|
original,
|
|
43
43
|
modified,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, vi } from 'vitest';
|
|
2
2
|
import { flushSync } from 'svelte';
|
|
3
|
-
import { renderComponent } from '
|
|
3
|
+
import { renderComponent } from '#lib/testing/index.js';
|
|
4
4
|
import DataTable, {} from './DataTable.svelte';
|
|
5
5
|
const testData = [
|
|
6
6
|
{ id: '1', name: 'Alice Smith', role: 'Engineer', score: 95 },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VariantProps } from '
|
|
1
|
+
import { type VariantProps } from '#lib/utils/cn.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { IconSource } from './Icon.svelte';
|
|
4
4
|
export declare const emptyStateVariants: import("tailwind-variants").TVReturnType<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { renderComponent } from '
|
|
2
|
+
import { renderComponent } from '#lib/testing/index.js';
|
|
3
3
|
import Icon from './Icon.svelte';
|
|
4
4
|
describe('Icon Component', () => {
|
|
5
5
|
it('renders built-in SVG icons by string name', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { tv, type VariantProps } from '
|
|
2
|
+
import { tv, type VariantProps } from '#lib/utils/cn.js';
|
|
3
3
|
|
|
4
4
|
export const progressVariants = tv({
|
|
5
5
|
base: 'relative w-full overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-800',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { renderComponent } from '
|
|
2
|
+
import { renderComponent } from '#lib/testing/index.js';
|
|
3
3
|
import Skeleton, { skeletonVariants } from './Skeleton.svelte';
|
|
4
4
|
describe('Skeleton Component (DOM & Variants)', () => {
|
|
5
5
|
it('generates pulse animation classes by default', () => {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<script lang="ts" generics="T extends Record<string, any> | string | number">
|
|
12
12
|
import type { Snippet } from 'svelte';
|
|
13
13
|
import Icon from './Icon.svelte';
|
|
14
|
-
import { useSortable } from '
|
|
14
|
+
import { useSortable } from '#lib/composables/useSortable.svelte.js';
|
|
15
15
|
|
|
16
16
|
interface Props extends SortableListProps<T> {
|
|
17
17
|
children?: Snippet<
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { tv, type VariantProps } from '
|
|
2
|
+
import { tv, type VariantProps } from '#lib/utils/cn.js';
|
|
3
3
|
|
|
4
4
|
export interface TerminalLine {
|
|
5
5
|
command?: string;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<script lang="ts">
|
|
24
24
|
import Icon from './Icon.svelte';
|
|
25
|
-
import { useClipboard } from '
|
|
25
|
+
import { useClipboard } from '#lib/composables/useClipboard.svelte.js';
|
|
26
26
|
|
|
27
27
|
let {
|
|
28
28
|
title = 'bash',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { renderComponent } from '
|
|
2
|
+
import { renderComponent } from '#lib/testing/index.js';
|
|
3
3
|
import Combobox, { comboboxVariants } from './Combobox.svelte';
|
|
4
4
|
const testOptions = [
|
|
5
5
|
{ value: 'svelte', label: 'Svelte 5' },
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import Icon from '../elements/Icon.svelte';
|
|
25
25
|
import Button from '../elements/Button.svelte';
|
|
26
26
|
import Progress from '../elements/Progress.svelte';
|
|
27
|
-
import { useUpload } from '
|
|
27
|
+
import { useUpload } from '#lib/composables/useUpload.svelte.js';
|
|
28
28
|
|
|
29
29
|
let {
|
|
30
30
|
id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { renderComponent } from '
|
|
2
|
+
import { renderComponent } from '#lib/testing/index.js';
|
|
3
3
|
import Form from './Form.svelte';
|
|
4
4
|
import FormField from './FormField.svelte';
|
|
5
5
|
describe('Form & FormField Components with Context Auto-Wiring', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script module lang="ts">
|
|
2
|
-
import { tv, type VariantProps } from '
|
|
2
|
+
import { tv, type VariantProps } from '#lib/utils/cn.js';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
5
5
|
import type { IconSource } from '../elements/Icon.svelte';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { renderComponent } from '
|
|
2
|
+
import { renderComponent } from '#lib/testing/index.js';
|
|
3
3
|
import InputOTP from './InputOTP.svelte';
|
|
4
4
|
describe('InputOTP Component (DOM & Interactions)', () => {
|
|
5
5
|
it('renders specified number of input slots with aria-labels', () => {
|