compote-ui 0.76.0 → 0.78.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.
@@ -2,7 +2,7 @@
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { ClassValue } from 'svelte/elements';
4
4
  import { cn } from 'tailwind-variants';
5
- import { ScrollArea } from '../..';
5
+ import { ScrollArea } from '../../index.js';
6
6
 
7
7
  interface Props {
8
8
  class?: ClassValue;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import * as Dialog from '../dialog';
3
3
  import ImageCropper from '../image-cropper/image-cropper.svelte';
4
- import { Button } from '../..';
4
+ import { Button } from '../../index.js';
5
5
  import { cropImage, processImage } from '../../utils/image-processing';
6
6
  import type { ImageCropperCropData } from '../image-cropper/types';
7
7
  import type { ImageCropDialogProps } from './types';
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { ImageCropper, useImageCropper } from '@ark-ui/svelte/image-cropper';
3
3
  import type { ImageCropperProps } from './types';
4
- import { Button } from '../..';
4
+ import { Button } from '../../index.js';
5
5
  import { cropImage } from '../../utils/image-processing';
6
6
  import type { ProcessImageOptions } from '../../utils/image-processing';
7
7
  import { PhArrowClockwise, PhArrowCounterClockwise } from '../../icons';
@@ -1,9 +1,17 @@
1
1
  import { createToaster } from '@ark-ui/svelte/toast';
2
- const toaster = createToaster({ placement: 'bottom-end', pauseOnPageIdle: true });
2
+ const toaster = createToaster({
3
+ placement: 'bottom-end',
4
+ pauseOnPageIdle: true,
5
+ duration: 5000
6
+ });
7
+ const typeDurations = { success: 4000, error: 10000 };
3
8
  function shorthand(type) {
9
+ const duration = typeDurations[type];
10
+ // Only set when defined: an explicit `duration: undefined` would override the global default.
11
+ const defaults = duration === undefined ? {} : { duration };
4
12
  return (title, options) => typeof title === 'string'
5
- ? toaster.create({ ...options, title, type })
6
- : toaster.create({ ...title, type });
13
+ ? toaster.create({ ...defaults, ...options, title, type })
14
+ : toaster.create({ ...defaults, ...title, type });
7
15
  }
8
16
  export const toast = Object.assign(toaster, {
9
17
  info: shorthand('info'),
@@ -12,7 +12,7 @@
12
12
  PhMinus,
13
13
  PhX
14
14
  } from '../../icons';
15
- import { Button, Field, ScrollArea } from '../..';
15
+ import { Button, Field, ScrollArea } from '../../index.js';
16
16
  import { SvelteSet } from 'svelte/reactivity';
17
17
 
18
18
  let {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.76.0",
3
+ "version": "0.78.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,6 +22,10 @@
22
22
  "patch": "npm version patch && npm publish",
23
23
  "minor": "npm version minor && npm publish"
24
24
  },
25
+ "imports": {
26
+ "#lib": "./src/lib/index.ts",
27
+ "#lib/*": "./src/lib/*"
28
+ },
25
29
  "files": [
26
30
  "dist",
27
31
  "!dist/**/*.test.*",
@@ -63,10 +67,10 @@
63
67
  "@eslint/js": "^10.0.1",
64
68
  "@faker-js/faker": "^10.6.0",
65
69
  "@iconify-json/ph": "^1.2.2",
66
- "@sveltejs/adapter-auto": "^7.0.0",
67
- "@sveltejs/adapter-cloudflare": "^7.2.9",
68
- "@sveltejs/kit": "^2.70.3",
69
- "@sveltejs/package": "^2.5.8",
70
+ "@sveltejs/adapter-auto": "^8.0.0",
71
+ "@sveltejs/adapter-cloudflare": "^8.0.0",
72
+ "@sveltejs/kit": "^3.0.1",
73
+ "@sveltejs/package": "^3.0.0",
70
74
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
71
75
  "@tailwindcss/vite": "^4.3.3",
72
76
  "@tanstack/intent": "^0.4.0",
@@ -80,7 +84,7 @@
80
84
  "prettier-plugin-svelte": "^4.1.1",
81
85
  "prettier-plugin-tailwindcss": "^0.8.1",
82
86
  "publint": "^0.3.24",
83
- "svelte": "^5.57.0",
87
+ "svelte": "^5.57.1",
84
88
  "svelte-check": "^4.7.6",
85
89
  "tailwindcss": "^4.3.3",
86
90
  "tw-animate-css": "^1.4.0",
@@ -88,7 +92,8 @@
88
92
  "typescript-eslint": "^8.70.0",
89
93
  "unplugin-icons": "^24.0.0",
90
94
  "vite": "^8.3.0",
91
- "vitest": "^5.0.1"
95
+ "vitest": "^5.0.1",
96
+ "wrangler": "^4.118.0"
92
97
  },
93
98
  "keywords": [
94
99
  "svelte",