yaxa-svelte 1.15.1 → 2.0.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 (130) hide show
  1. package/README.md +38 -20
  2. package/dist/actions/infiniteScroll.js +1 -1
  3. package/dist/admin/handler.d.ts +2 -2
  4. package/dist/admin/handler.js +2 -2
  5. package/dist/admin/hook.d.ts +3 -3
  6. package/dist/admin/hook.js +2 -2
  7. package/dist/components/blocks/FAQ.svelte +1 -1
  8. package/dist/components/blocks/FAQ.svelte.d.ts +1 -1
  9. package/dist/components/blocks/FeatureGrid.svelte +1 -1
  10. package/dist/components/blocks/FeatureGrid.svelte.d.ts +1 -1
  11. package/dist/components/blocks/Testimonials.svelte +1 -1
  12. package/dist/components/blocks/Testimonials.svelte.d.ts +1 -1
  13. package/dist/components/elements/Button.svelte +1 -1
  14. package/dist/components/elements/Button.svelte.d.ts +1 -1
  15. package/dist/components/elements/Carousel.svelte +17 -5
  16. package/dist/components/elements/Carousel.svelte.d.ts +4 -4
  17. package/dist/components/elements/CodeBlock.svelte +1 -1
  18. package/dist/components/elements/CodeDiff.svelte +1 -1
  19. package/dist/components/elements/CodeDiff.test.js +1 -1
  20. package/dist/components/elements/DataTable.dom.test.js +1 -1
  21. package/dist/components/elements/EmptyState.svelte +1 -1
  22. package/dist/components/elements/EmptyState.svelte.d.ts +1 -1
  23. package/dist/components/elements/Icon.svelte +1 -1
  24. package/dist/components/elements/Icon.test.js +1 -1
  25. package/dist/components/elements/Kbd.svelte +2 -2
  26. package/dist/components/elements/Kbd.svelte.d.ts +1 -1
  27. package/dist/components/elements/MetricCard.svelte +1 -1
  28. package/dist/components/elements/Progress.svelte +10 -3
  29. package/dist/components/elements/Progress.svelte.d.ts +1 -1
  30. package/dist/components/elements/Skeleton.svelte +1 -1
  31. package/dist/components/elements/Skeleton.svelte.d.ts +1 -1
  32. package/dist/components/elements/Skeleton.test.js +1 -1
  33. package/dist/components/elements/SortableList.svelte +1 -1
  34. package/dist/components/elements/Terminal.svelte +2 -2
  35. package/dist/components/elements/Terminal.svelte.d.ts +1 -1
  36. package/dist/components/elements/Timeline.svelte +1 -1
  37. package/dist/components/elements/Timeline.svelte.d.ts +1 -1
  38. package/dist/components/elements/Tree.svelte +1 -1
  39. package/dist/components/elements/Tree.svelte.d.ts +1 -1
  40. package/dist/components/elements/VirtualList.svelte +17 -5
  41. package/dist/components/elements/VirtualList.svelte.d.ts +1 -1
  42. package/dist/components/forms/Combobox.dom.test.js +1 -1
  43. package/dist/components/forms/Combobox.svelte +1 -1
  44. package/dist/components/forms/Combobox.svelte.d.ts +1 -1
  45. package/dist/components/forms/DatePicker.svelte +1 -1
  46. package/dist/components/forms/DateRangePicker.svelte +1 -1
  47. package/dist/components/forms/Dropzone.svelte +1 -1
  48. package/dist/components/forms/Form.dom.test.js +1 -1
  49. package/dist/components/forms/InputOTP.svelte +1 -1
  50. package/dist/components/forms/InputOTP.test.js +1 -1
  51. package/dist/components/forms/MultiSelect.svelte +1 -1
  52. package/dist/components/forms/MultiSelect.svelte.d.ts +1 -1
  53. package/dist/components/forms/NumberInput.svelte +1 -1
  54. package/dist/components/forms/NumberInput.svelte.d.ts +1 -1
  55. package/dist/components/forms/Select.svelte +1 -1
  56. package/dist/components/forms/Select.svelte.d.ts +1 -1
  57. package/dist/components/forms/Switch.svelte +1 -1
  58. package/dist/components/forms/Switch.svelte.d.ts +1 -1
  59. package/dist/components/forms/Textarea.svelte +2 -2
  60. package/dist/components/forms/Textarea.svelte.d.ts +1 -1
  61. package/dist/components/forms/ToggleGroup.svelte +1 -1
  62. package/dist/components/forms/advanced-forms.test.js +1 -1
  63. package/dist/components/layout/Container.svelte +1 -1
  64. package/dist/components/layout/Container.svelte.d.ts +1 -1
  65. package/dist/components/layout/DashboardShell.svelte +1 -1
  66. package/dist/components/layout/DashboardShell.svelte.d.ts +1 -1
  67. package/dist/components/layout/Footer.svelte +2 -2
  68. package/dist/components/layout/Footer.svelte.d.ts +1 -1
  69. package/dist/components/layout/Header.svelte +3 -3
  70. package/dist/components/layout/Header.svelte.d.ts +1 -1
  71. package/dist/components/layout/ResizablePanels.svelte +12 -4
  72. package/dist/components/layout/ResizablePanels.svelte.d.ts +1 -1
  73. package/dist/components/layout/YaxaApp.svelte +3 -3
  74. package/dist/components/layout/YaxaApp.svelte.d.ts +2 -2
  75. package/dist/components/legal/LegalDocument.svelte +2 -2
  76. package/dist/components/legal/LegalDocument.svelte.d.ts +1 -1
  77. package/dist/components/navigation/CommandPalette.svelte +1 -1
  78. package/dist/components/navigation/Stepper.svelte +1 -1
  79. package/dist/components/navigation/Stepper.svelte.d.ts +1 -1
  80. package/dist/components/overlays/Alert.svelte +1 -1
  81. package/dist/components/overlays/Alert.svelte.d.ts +1 -1
  82. package/dist/components/overlays/Drawer.svelte +1 -1
  83. package/dist/components/overlays/Drawer.svelte.d.ts +1 -1
  84. package/dist/components/overlays/Modal.dom.test.js +1 -1
  85. package/dist/components/overlays/Modal.svelte +1 -1
  86. package/dist/components/overlays/Modal.svelte.d.ts +1 -1
  87. package/dist/components/overlays/NotificationCenter.svelte +1 -1
  88. package/dist/components/overlays/NotificationCenter.svelte.d.ts +1 -1
  89. package/dist/components/overlays/Slideover.svelte +1 -1
  90. package/dist/components/overlays/Slideover.svelte.d.ts +1 -1
  91. package/dist/components/overlays/Toast.svelte +3 -3
  92. package/dist/components/overlays/Toast.svelte.d.ts +2 -2
  93. package/dist/components/overlays/Toast.test.js +2 -2
  94. package/dist/components/overlays/Toaster.svelte +2 -2
  95. package/dist/components/overlays/Toaster.svelte.d.ts +1 -1
  96. package/dist/components/overlays/Tooltip.dom.test.js +1 -1
  97. package/dist/components/saas/Gate.svelte +2 -2
  98. package/dist/components/saas/Gate.svelte.d.ts +1 -1
  99. package/dist/components/saas/OrgSwitcher.svelte +1 -1
  100. package/dist/components/saas/OrgSwitcher.svelte.d.ts +1 -1
  101. package/dist/components/saas/PasskeyUI.svelte +1 -1
  102. package/dist/components/saas/PasskeyUI.svelte.d.ts +1 -1
  103. package/dist/components/seo/Favicons.svelte +2 -2
  104. package/dist/components/seo/Favicons.svelte.d.ts +1 -1
  105. package/dist/components/seo/OgImage.svelte +2 -2
  106. package/dist/components/seo/OgImage.svelte.d.ts +1 -1
  107. package/dist/components/seo/Seo.svelte +3 -3
  108. package/dist/components/seo/Seo.svelte.d.ts +1 -1
  109. package/dist/components/theme/ThemeStudio.svelte +2 -2
  110. package/dist/composables/useClipboard.svelte.js +1 -1
  111. package/dist/composables/useColorMode.svelte.d.ts +1 -1
  112. package/dist/composables/useColorMode.svelte.js +1 -1
  113. package/dist/composables/useFormAction.svelte.d.ts +2 -2
  114. package/dist/composables/useFormAction.svelte.js +1 -1
  115. package/dist/composables/useGate.svelte.d.ts +1 -1
  116. package/dist/composables/useGate.svelte.js +1 -1
  117. package/dist/composables/useInfiniteScroll.svelte.js +1 -1
  118. package/dist/composables/useLocale.svelte.js +1 -1
  119. package/dist/composables/useMediaQuery.svelte.js +1 -1
  120. package/dist/composables/useShortcuts.svelte.js +1 -1
  121. package/dist/server/auth/hook.d.ts +1 -1
  122. package/dist/server/endpoints.test.js +5 -5
  123. package/dist/server/polar/webhook.js +1 -2
  124. package/dist/server/storage/storage.test.js +1 -1
  125. package/dist/site/hook.d.ts +1 -1
  126. package/dist/site/schema.js +1 -1
  127. package/dist/testing/setup.d.ts +1 -0
  128. package/dist/testing/setup.js +1 -1
  129. package/dist/theme/theme.svelte.js +1 -1
  130. package/package.json +10 -6
package/README.md CHANGED
@@ -3,12 +3,12 @@
3
3
  # Yaxa
4
4
 
5
5
  **The Intuitive Svelte UI & Solo SaaS Library**
6
- _Nuxt UI v4 & Nuxt UI Pro Equivalent for SvelteKit 2.7+ & Svelte 5 with Built-in SEO & SaaS Parity._
6
+ _Nuxt UI v4 & Nuxt UI Pro Equivalent for SvelteKit 2 & 3 & Svelte 5 with Built-in SEO & SaaS Parity._
7
7
 
8
8
  [![npm version](https://img.shields.io/npm/v/yaxa-svelte.svg?color=CB3837&logo=npm)](https://www.npmjs.com/package/yaxa-svelte)
9
9
  [![npm downloads](https://img.shields.io/npm/dm/yaxa-svelte.svg?color=blue)](https://www.npmjs.com/package/yaxa-svelte)
10
10
  [![Svelte 5](https://img.shields.io/badge/Svelte-5.0+-FF3E00?style=flat&logo=svelte&logoColor=white)](https://svelte.dev)
11
- [![SvelteKit](https://img.shields.io/badge/SvelteKit-2.7+-FF3E00?style=flat&logo=svelte&logoColor=white)](https://kit.svelte.dev)
11
+ [![SvelteKit](https://img.shields.io/badge/SvelteKit-2_%26_3-FF3E00?style=flat&logo=svelte&logoColor=white)](https://kit.svelte.dev)
12
12
  [![Tailwind CSS v4](https://img.shields.io/badge/Tailwind_CSS-v4.0-38B2AC?style=flat&logo=tailwind-css&logoColor=white)](https://tailwindcss.com)
13
13
  [![Bits UI](https://img.shields.io/badge/Bits_UI-v2.0-18181b?style=flat)](https://bits-ui.com)
14
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-emerald.svg)](LICENSE)
@@ -21,7 +21,7 @@ _Nuxt UI v4 & Nuxt UI Pro Equivalent for SvelteKit 2.7+ & Svelte 5 with Built-in
21
21
 
22
22
  ## 🌟 Overview
23
23
 
24
- **Yaxa** brings the full developer experience, visual elegance, and full-stack toolkit of **Nuxt UI** and the **Nuxt SEO + SaaS ecosystem** to **SvelteKit 2.7+** and **Svelte 5**.
24
+ **Yaxa** brings the full developer experience, visual elegance, and full-stack toolkit of **Nuxt UI** and the **Nuxt SEO + SaaS ecosystem** to **SvelteKit 2 & 3** and **Svelte 5**.
25
25
 
26
26
  - 🎨 **Tailwind CSS v4 Native Tokens**: Styled with `@theme` variables; harmonic radius scale (`--radius-xs` to `--radius-4xl`), chart palette tokens (`--color-chart-1` to `--color-chart-5`), atmospheric utilities (`yaxa-grain` & `yaxa-mesh-glow`), and auto-adaptive scrollbars.
27
27
  - 🎛️ **Visual Web Theme Studio**: Interactive runtime palette designer (`/theme` and `<ThemeStudio />`) with live sandbox preview and 1-click token export.
@@ -115,12 +115,12 @@ Import `yaxa-svelte/yaxa.css` and wrap your app in `<YaxaApp>`:
115
115
  <script lang="ts">
116
116
  import 'yaxa-svelte/yaxa.css';
117
117
  import { YaxaApp } from 'yaxa-svelte';
118
- import { siteConfig } from '../site.config';
118
+ import { siteConfig } from '../site.config'; // or $lib/site.config
119
119
 
120
- let { children } = $props();
120
+ let { data, children } = $props();
121
121
  </script>
122
122
 
123
- <YaxaApp config={siteConfig}>
123
+ <YaxaApp config={siteConfig} user={data?.user}>
124
124
  {@render children()}
125
125
  </YaxaApp>
126
126
  ```
@@ -136,6 +136,23 @@ If your project already imports Tailwind in `src/app.css`, import the standalone
136
136
  @source '../node_modules/yaxa-svelte/dist/**/*.{js,svelte}';
137
137
  ```
138
138
 
139
+ Then in `src/routes/+layout.svelte`, simply import `../app.css` instead of `yaxa.css`:
140
+
141
+ ```svelte
142
+ <!-- src/routes/+layout.svelte -->
143
+ <script lang="ts">
144
+ import '../app.css';
145
+ import { YaxaApp } from 'yaxa-svelte';
146
+ import { siteConfig } from '../site.config';
147
+
148
+ let { data, children } = $props();
149
+ </script>
150
+
151
+ <YaxaApp config={siteConfig} user={data?.user}>
152
+ {@render children()}
153
+ </YaxaApp>
154
+ ```
155
+
139
156
  ---
140
157
 
141
158
  ## 🛡️ 1-Line Server SEO & Auth Automation
@@ -189,8 +206,7 @@ Dual-mode Drizzle ORM administration and introspection suite with live CRUD tabl
189
206
  // Approach A (Zero-File Route Interceptor in src/hooks.server.ts)
190
207
  import { sequence } from '@sveltejs/kit/hooks';
191
208
  import { createYaxaAdminHook } from 'yaxa-svelte/admin';
192
- import { db } from '$lib/server/db';
193
- import * as schema from '$lib/server/db/schema-pg';
209
+ import { db, schemaPg as schema } from 'yaxa-svelte/db'; // or your project's $lib/server/db
194
210
 
195
211
  export const handle = sequence(createYaxaAdminHook({ db, schema, path: '/admin' }));
196
212
  ```
@@ -226,18 +242,20 @@ export const POST = createPolarWebhookHandler();
226
242
 
227
243
  ## 📦 Subpath Exports Architecture
228
244
 
229
- | Subpath | Description |
230
- | :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
231
- | `yaxa-svelte` | Core UI Primitives, SEO Components, `<Gate />`, Theme System & Composables (`useGate`, `useUpload`, `useToast`, `useClipboard`, etc.) |
232
- | `yaxa-svelte/admin` | Drizzle ORM Schema Introspection, `<AdminDashboard />`, `createYaxaAdminHook`, `createDrizzleAdmin`, `<DevSandbox />`, `<RecordDrawer />` |
233
- | `yaxa-svelte/server` | Universal Server Hooks, SEO endpoints, Drizzle DB drivers, Cloud Storage handlers, and Email dispatch |
234
- | `yaxa-svelte/auth` | Better-Auth client & server integration (`useAuth`, `<AuthCard />`, `<PasskeyUI />`, `<TwoFactorModal />`, `createYaxaAuth`) |
235
- | `yaxa-svelte/db` | Multi-dialect Drizzle ORM clients & schemas for Neon (PostgreSQL) and Turso (SQLite/LibSQL) |
236
- | `yaxa-svelte/polar` | Polar.sh billing, customer portal sessions, and webhook synchronization |
237
- | `yaxa-svelte/email` | Resend transactional email templates with automatic development console fallback |
238
- | `yaxa-svelte/storage` | AWS S3 and Cloudflare R2 presigned upload URL generators |
239
- | `yaxa-svelte/vite` | Turnkey Vite plugin (`yaxa()`) |
240
- | `yaxa-svelte/yaxa.css` | Tailwind CSS v4 design tokens and base stylesheet |
245
+ | Subpath | Description |
246
+ | :---------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
247
+ | `yaxa-svelte` | Core UI Primitives, SEO Components, `<Gate />`, Theme System & Composables (`useGate`, `useUpload`, `useToast`, `useClipboard`, etc.) |
248
+ | `yaxa-svelte/admin` | Drizzle ORM Schema Introspection, `<AdminDashboard />`, `createYaxaAdminHook`, `createDrizzleAdmin`, `<DevSandbox />`, `<RecordDrawer />` |
249
+ | `yaxa-svelte/server` | Universal Server Hooks, SEO endpoints, Drizzle DB drivers, Cloud Storage handlers, and Email dispatch |
250
+ | `yaxa-svelte/auth` | Better-Auth client & server integration (`useAuth`, `<AuthCard />`, `<PasskeyUI />`, `<TwoFactorModal />`, `createYaxaAuth`) |
251
+ | `yaxa-svelte/db` | Multi-dialect Drizzle ORM clients & schemas for Neon (PostgreSQL) and Turso (SQLite/LibSQL) |
252
+ | `yaxa-svelte/polar` | Polar.sh billing, customer portal sessions, and webhook synchronization |
253
+ | `yaxa-svelte/email` | Resend transactional email templates with automatic development console fallback |
254
+ | `yaxa-svelte/storage` | AWS S3 and Cloudflare R2 presigned upload URL generators |
255
+ | `yaxa-svelte/testing` | Test mocks & utilities (`createMockSiteConfig`, `createMockUser`, `createTestWrapperProps`) |
256
+ | `yaxa-svelte/vite` | Turnkey Vite plugin (`yaxa()`) |
257
+ | `yaxa-svelte/yaxa.css` | Standalone turnkey Tailwind CSS v4 stylesheet with base styling, `@theme`, and scrollbars |
258
+ | `yaxa-svelte/theme.css` | Pure Tailwind CSS v4 design tokens, `:root` variables, and harmonic radius scale without `@import 'tailwindcss'` |
241
259
 
242
260
  ---
243
261
 
@@ -1,4 +1,4 @@
1
- import { browser } from '$app/environment';
1
+ import { browser } from '$app/env';
2
2
  /**
3
3
  * Headless Svelte Action to trigger loading callbacks when scrolling near the edges.
4
4
  *
@@ -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 '../server/db';
43
- * import * as schema from '../server/db/schema-pg';
42
+ * import { db } from '../server/db/index.js';
43
+ * import * as schema from '../server/db/schema-pg.js';
44
44
  * import { createDrizzleAdmin } from 'yaxa-svelte/admin';
45
45
  *
46
46
  * export const { load, actions } = createDrizzleAdmin({ db, schema });
@@ -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 '../server/db';
236
- * import * as schema from '../server/db/schema-pg';
235
+ * import { db } from '../server/db/index.js';
236
+ * import * as schema from '../server/db/schema-pg.js';
237
237
  * import { createDrizzleAdmin } from 'yaxa-svelte/admin';
238
238
  *
239
239
  * export const { load, actions } = createDrizzleAdmin({ db, schema });
@@ -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 '../server/db';
12
- * import * as schema from '../server/db/schema-pg';
11
+ * import { db } from '../server/db/index.js';
12
+ * import * as schema from '../server/db/schema-pg.js';
13
13
  *
14
14
  * export const handle = sequence(
15
15
  * createYaxaAdminHook({ db, schema, path: '/admin' })
@@ -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 '../server/db';
13
- * import * as schema from '../server/db/schema-pg';
12
+ * import { db } from '../server/db/index.js';
13
+ * import * as schema from '../server/db/schema-pg.js';
14
14
  *
15
15
  * export const handle = sequence(
16
16
  * createYaxaAdminHook({ db, schema, path: '/admin' })
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
 
4
4
  export interface FAQItem {
5
5
  id: string | number;
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  export interface FAQItem {
3
3
  id: string | number;
4
4
  question: string;
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { IconSource } from '../elements/Icon.svelte';
4
4
 
5
5
  export interface FeatureItem {
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { IconSource } from '../elements/Icon.svelte';
3
3
  export interface FeatureItem {
4
4
  id: string | number;
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
 
4
4
  export interface TestimonialItem {
5
5
  id: string | number;
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  export interface TestimonialItem {
3
3
  id: string | number;
4
4
  quote: string;
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../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 '../../utils/cn';
1
+ import { type VariantProps } from '../../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,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { Snippet } from 'svelte';
4
4
 
5
5
  export const carouselVariants = tv({
@@ -127,12 +127,12 @@
127
127
  </div>
128
128
  {:else}
129
129
  <!-- Viewport -->
130
- <div class={slots.viewport()}>
130
+ <div class="{slots.viewport()} yaxa-carousel-viewport">
131
131
  <div
132
- class="flex w-full transition-transform duration-500 ease-out"
133
- style="transform: translateX(-{currentIndex * 100}%);"
132
+ class="yaxa-carousel-track flex w-full transition-transform duration-500 ease-out"
133
+ style="--yaxa-carousel-offset: -{currentIndex * 100}%;"
134
134
  >
135
- {#each items as slide, index}
135
+ {#each items as slide, index (index)}
136
136
  <div
137
137
  class="min-w-full flex-shrink-0"
138
138
  role="group"
@@ -198,3 +198,15 @@
198
198
  {/if}
199
199
  {/if}
200
200
  </div>
201
+
202
+ <style>
203
+ .yaxa-carousel-viewport {
204
+ touch-action: pan-y;
205
+ -webkit-overflow-scrolling: touch;
206
+ }
207
+
208
+ .yaxa-carousel-track {
209
+ transform: translate3d(var(--yaxa-carousel-offset, 0%), 0, 0);
210
+ will-change: transform;
211
+ }
212
+ </style>
@@ -1,10 +1,10 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../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 '../../composables/useToast.svelte';
246
+ import { useToast } from '../../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 '../../composables/useToast.svelte';
159
+ import { useToast } from '../../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 '../../testing';
2
+ import { renderComponent } from '../../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', () => {
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, vi } from 'vitest';
2
2
  import { flushSync } from 'svelte';
3
- import { renderComponent } from '../../testing';
3
+ import { renderComponent } from '../../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,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { Snippet } from 'svelte';
4
4
  import type { IconSource } from './Icon.svelte';
5
5
 
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../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
  <script module lang="ts">
2
- import { tv } from '../../utils/cn';
2
+ import { tv } from '../../utils/cn.js';
3
3
  import type { Component, Snippet } from 'svelte';
4
4
 
5
5
  export const iconVariants = tv({
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import { renderComponent } from '../../testing';
2
+ import { renderComponent } from '../../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 '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { Snippet } from 'svelte';
4
4
 
5
5
  export const kbdVariants = tv({
@@ -57,7 +57,7 @@
57
57
  </script>
58
58
 
59
59
  <script lang="ts">
60
- import { browser } from '$app/environment';
60
+ import { browser } from '$app/env';
61
61
 
62
62
  let { value, keys, combo, size = 'sm', class: className = '', children }: KbdProps = $props();
63
63
 
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  export declare const kbdVariants: import("tailwind-variants").TVReturnType<{
4
4
  size: {
@@ -3,7 +3,7 @@
3
3
  import Icon, { type IconSource } from './Icon.svelte';
4
4
  import Badge from './Badge.svelte';
5
5
  import Skeleton from './Skeleton.svelte';
6
- import { cn } from '../../utils/cn';
6
+ import { cn } from '../../utils/cn.js';
7
7
 
8
8
  interface Props {
9
9
  title: string;
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../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',
@@ -47,6 +47,7 @@
47
47
 
48
48
  <div
49
49
  class={progressVariants({ size, color, class: className })}
50
+ style="--yaxa-progress: {percentage ?? 0}%;"
50
51
  role="progressbar"
51
52
  aria-valuenow={value}
52
53
  aria-valuemin={0}
@@ -54,10 +55,16 @@
54
55
  >
55
56
  {#if percentage !== undefined}
56
57
  <div
57
- class="h-full rounded-full transition-all duration-300 ease-in-out"
58
- style="width: {percentage}%"
58
+ class="yaxa-progress-bar h-full rounded-full transition-[width] duration-300 ease-in-out"
59
59
  ></div>
60
60
  {:else}
61
61
  <div class="h-full w-1/3 animate-pulse rounded-full"></div>
62
62
  {/if}
63
63
  </div>
64
+
65
+ <style>
66
+ .yaxa-progress-bar {
67
+ width: var(--yaxa-progress, 0%);
68
+ will-change: width;
69
+ }
70
+ </style>
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  export declare const progressVariants: import("tailwind-variants").TVReturnType<{
3
3
  size: {
4
4
  xs: "h-1";
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, cn, type VariantProps } from '../../utils/cn';
2
+ import { tv, cn, type VariantProps } from '../../utils/cn.js';
3
3
 
4
4
  export const skeletonVariants = tv({
5
5
  base: 'relative overflow-hidden bg-neutral-200 select-none motion-reduce:animate-none dark:bg-neutral-800',
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  export declare const skeletonVariants: import("tailwind-variants").TVReturnType<{
3
3
  variant: {
4
4
  pulse: "animate-pulse";
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import { renderComponent } from '../../testing';
2
+ import { renderComponent } from '../../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 '../../composables/useSortable.svelte';
14
+ import { useSortable } from '../../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 '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../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 '../../composables/useClipboard.svelte';
25
+ import { useClipboard } from '../../composables/useClipboard.svelte.js';
26
26
 
27
27
  let {
28
28
  title = 'bash',
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  export interface TerminalLine {
3
3
  command?: string;
4
4
  output?: string;
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { Snippet } from 'svelte';
4
4
  import type { IconSource } from './Icon.svelte';
5
5
 
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { IconSource } from './Icon.svelte';
4
4
  export interface TimelineItem {
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { IconSource } from './Icon.svelte';
4
4
 
5
5
  export interface TreeNode {
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { IconSource } from './Icon.svelte';
3
3
  export interface TreeNode {
4
4
  id: string;
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { Snippet } from 'svelte';
4
4
 
5
5
  export const virtualListVariants = tv({
@@ -73,8 +73,8 @@
73
73
  </script>
74
74
 
75
75
  <div
76
- class={virtualListVariants({ bordered, class: className })}
77
- style="height: {heightStyle};"
76
+ class="{virtualListVariants({ bordered, class: className })} h-[var(--yaxa-vl-height)]"
77
+ style="--yaxa-vl-height: {heightStyle};"
78
78
  onscroll={onScroll}
79
79
  role="feed"
80
80
  aria-busy={false}
@@ -91,9 +91,12 @@
91
91
  </div>
92
92
  {:else}
93
93
  <!-- Total virtual space height holder -->
94
- <div class="relative w-full" style="height: {totalHeight}px;">
94
+ <div class="relative h-[var(--yaxa-vl-total)] w-full" style="--yaxa-vl-total: {totalHeight}px;">
95
95
  {#each visibleItems as { data, index, top } (index)}
96
- <div class="absolute right-0 left-0 w-full" style="top: {top}px; height: {itemHeight}px;">
96
+ <div
97
+ class="yaxa-virtual-row absolute right-0 left-0 h-[var(--yaxa-vl-item-height)] w-full"
98
+ style="--yaxa-vl-top: {top}px; --yaxa-vl-item-height: {itemHeight}px;"
99
+ >
97
100
  {#if item}
98
101
  {@render item(data, index)}
99
102
  {:else}
@@ -108,3 +111,12 @@
108
111
  </div>
109
112
  {/if}
110
113
  </div>
114
+
115
+ <style>
116
+ .yaxa-virtual-row {
117
+ top: 0;
118
+ transform: translate3d(0, var(--yaxa-vl-top, 0px), 0);
119
+ will-change: transform;
120
+ contain: layout size;
121
+ }
122
+ </style>
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  export declare const virtualListVariants: import("tailwind-variants").TVReturnType<{
4
4
  bordered: {
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import { renderComponent } from '../../testing';
2
+ import { renderComponent } from '../../testing/index.js';
3
3
  import Combobox, { comboboxVariants } from './Combobox.svelte';
4
4
  const testOptions = [
5
5
  { value: 'svelte', label: 'Svelte 5' },
@@ -1,5 +1,5 @@
1
1
  <script module lang="ts">
2
- import { tv, type VariantProps } from '../../utils/cn';
2
+ import { tv, type VariantProps } from '../../utils/cn.js';
3
3
  import type { Snippet } from 'svelte';
4
4
  import type { IconSource } from '../elements/Icon.svelte';
5
5
 
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from '../../utils/cn';
1
+ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { IconSource } from '../elements/Icon.svelte';
4
4
  export interface ComboboxOption {
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { Popover } from 'bits-ui';
3
3
  import Icon from '../elements/Icon.svelte';
4
- import { cn } from '../../utils/cn';
4
+ import { cn } from '../../utils/cn.js';
5
5
 
6
6
  export interface DatePreset {
7
7
  label: string;