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.
- package/README.md +38 -20
- 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 +2 -2
- 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/Button.svelte +1 -1
- package/dist/components/elements/Button.svelte.d.ts +1 -1
- package/dist/components/elements/Carousel.svelte +17 -5
- 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 +1 -1
- 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 +2 -2
- package/dist/components/elements/Kbd.svelte.d.ts +1 -1
- package/dist/components/elements/MetricCard.svelte +1 -1
- package/dist/components/elements/Progress.svelte +10 -3
- 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 +17 -5
- 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/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/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 +12 -4
- package/dist/components/layout/ResizablePanels.svelte.d.ts +1 -1
- package/dist/components/layout/YaxaApp.svelte +3 -3
- package/dist/components/layout/YaxaApp.svelte.d.ts +2 -2
- 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 +2 -2
- package/dist/composables/useFormAction.svelte.js +1 -1
- 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/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/storage.test.js +1 -1
- package/dist/site/hook.d.ts +1 -1
- package/dist/site/schema.js +1 -1
- 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 +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
|
|
6
|
+
_Nuxt UI v4 & Nuxt UI Pro Equivalent for SvelteKit 2 & 3 & Svelte 5 with Built-in SEO & SaaS Parity._
|
|
7
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/yaxa-svelte)
|
|
9
9
|
[](https://www.npmjs.com/package/yaxa-svelte)
|
|
10
10
|
[](https://svelte.dev)
|
|
11
|
-
[](https://kit.svelte.dev)
|
|
12
12
|
[](https://tailwindcss.com)
|
|
13
13
|
[](https://bits-ui.com)
|
|
14
14
|
[](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
|
|
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
|
|
230
|
-
|
|
|
231
|
-
| `yaxa-svelte`
|
|
232
|
-
| `yaxa-svelte/admin`
|
|
233
|
-
| `yaxa-svelte/server`
|
|
234
|
-
| `yaxa-svelte/auth`
|
|
235
|
-
| `yaxa-svelte/db`
|
|
236
|
-
| `yaxa-svelte/polar`
|
|
237
|
-
| `yaxa-svelte/email`
|
|
238
|
-
| `yaxa-svelte/storage`
|
|
239
|
-
| `yaxa-svelte/
|
|
240
|
-
| `yaxa-svelte/
|
|
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
|
|
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 '../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 });
|
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 '../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 });
|
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 '../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' })
|
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 '../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
|
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="
|
|
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,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
|
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/
|
|
60
|
+
import { browser } from '$app/env';
|
|
61
61
|
|
|
62
62
|
let { value, keys, combo, size = 'sm', class: className = '', children }: KbdProps = $props();
|
|
63
63
|
|
|
@@ -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-
|
|
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,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,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,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="
|
|
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
|
|
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,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' },
|