compote-ui 0.70.0 → 0.71.1

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.
@@ -10,10 +10,10 @@ export declare const button: import("tailwind-variants").TVReturnType<{
10
10
  sm: "h-8 gap-1.5 px-2";
11
11
  default: "h-9 gap-2 px-3";
12
12
  lg: "h-10 gap-2.5 px-4";
13
- icon: "size-8";
14
- 'icon-xs': "size-6";
15
- 'icon-sm': "size-7";
16
- 'icon-lg': "size-9";
13
+ icon: "size-8 shrink-0";
14
+ 'icon-xs': "size-6 shrink-0";
15
+ 'icon-sm': "size-7 shrink-0";
16
+ 'icon-lg': "size-9 shrink-0";
17
17
  };
18
18
  }, undefined, "inline-flex cursor-pointer items-center justify-center rounded bg-transparent text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50", {
19
19
  variant: {
@@ -26,10 +26,10 @@ export declare const button: import("tailwind-variants").TVReturnType<{
26
26
  sm: "h-8 gap-1.5 px-2";
27
27
  default: "h-9 gap-2 px-3";
28
28
  lg: "h-10 gap-2.5 px-4";
29
- icon: "size-8";
30
- 'icon-xs': "size-6";
31
- 'icon-sm': "size-7";
32
- 'icon-lg': "size-9";
29
+ icon: "size-8 shrink-0";
30
+ 'icon-xs': "size-6 shrink-0";
31
+ 'icon-sm': "size-7 shrink-0";
32
+ 'icon-lg': "size-9 shrink-0";
33
33
  };
34
34
  }, undefined, import("tailwind-variants").TVReturnTypeLike<{
35
35
  variant: {
@@ -42,10 +42,10 @@ export declare const button: import("tailwind-variants").TVReturnType<{
42
42
  sm: "h-8 gap-1.5 px-2";
43
43
  default: "h-9 gap-2 px-3";
44
44
  lg: "h-10 gap-2.5 px-4";
45
- icon: "size-8";
46
- 'icon-xs': "size-6";
47
- 'icon-sm': "size-7";
48
- 'icon-lg': "size-9";
45
+ icon: "size-8 shrink-0";
46
+ 'icon-xs': "size-6 shrink-0";
47
+ 'icon-sm': "size-7 shrink-0";
48
+ 'icon-lg': "size-9 shrink-0";
49
49
  };
50
50
  }, undefined>>;
51
51
  export type ButtonVariant = VariantProps<typeof button>['variant'];
@@ -12,10 +12,10 @@ export const button = tv({
12
12
  sm: 'h-8 gap-1.5 px-2',
13
13
  default: 'h-9 gap-2 px-3',
14
14
  lg: 'h-10 gap-2.5 px-4',
15
- icon: 'size-8',
16
- 'icon-xs': 'size-6',
17
- 'icon-sm': 'size-7',
18
- 'icon-lg': 'size-9'
15
+ icon: 'size-8 shrink-0',
16
+ 'icon-xs': 'size-6 shrink-0',
17
+ 'icon-sm': 'size-7 shrink-0',
18
+ 'icon-lg': 'size-9 shrink-0'
19
19
  }
20
20
  },
21
21
  defaultVariants: { variant: 'default', size: 'default' }
@@ -72,5 +72,5 @@ export declare function createTable<T extends RowData>(options: CreateDataTableO
72
72
  weakEquals: import("@tanstack/table-core").CreatedFilterFn<any, any>;
73
73
  };
74
74
  columnMeta: DataTableColumnMeta;
75
- }, T, import("@tanstack/table-core").TableState_ColumnFiltering & import("@tanstack/table-core").TableState_ColumnPinning & import("@tanstack/table-core").TableState_ColumnResizing & import("@tanstack/table-core").TableState_ColumnSizing & import("@tanstack/table-core").TableState_ColumnVisibility & import("@tanstack/table-core").TableState_GlobalFiltering & import("@tanstack/table-core").TableState_RowSelection & import("@tanstack/table-core").TableState_RowSorting>;
75
+ }, T>;
76
76
  export declare function getColumnId<T extends RowData>(column: DataTableLeafColumn<T>): string;
@@ -1,6 +1,6 @@
1
1
  import { createTable as createSvelteTable } from '@tanstack/svelte-table';
2
2
  import { useLocaleContext } from '@ark-ui/svelte/locale';
3
- import { onDestroy, untrack } from 'svelte';
3
+ import { onDestroy } from 'svelte';
4
4
  import { renderComponent, renderSnippet } from '@tanstack/svelte-table';
5
5
  import { dataTableFeatures } from './features';
6
6
  import { TYPE_NUMBER_FORMAT_DEFAULTS } from './data-table-utils';
@@ -60,26 +60,6 @@ export function createTable(options) {
60
60
  columnFilters: options.initialState?.columnFilters ?? []
61
61
  }
62
62
  });
63
- // The svelte adapter's internal $effect.pre only tracks `data` and `state` — not
64
- // `columns` — so reactive add/remove/reorder of columns never reaches the table.
65
- // Track the derived column defs here and push them through setOptions ourselves.
66
- // Re-supply the `data` getter so spreading `prev` doesn't freeze data reactivity.
67
- // CAUTION: upstream guidance says a second setOptions sync can race the adapter's
68
- // own $effect.pre (which getter-merges the original options on data/state change).
69
- // Both syncs write consistent values here, but revisit if the beta adapter ever
70
- // starts tracking `columns` itself.
71
- $effect.pre(() => {
72
- const columns = columnDefs;
73
- untrack(() => {
74
- table.setOptions((prev) => ({
75
- ...prev,
76
- get data() {
77
- return options.data;
78
- },
79
- columns
80
- }));
81
- });
82
- });
83
63
  // Notify consumers of visibility changes without taking control of the slice
84
64
  // (overriding the table's own `onColumnVisibilityChange` option would suppress
85
65
  // internal updates). The atom's `subscribe` is an explicit observer that runs
@@ -8,8 +8,8 @@ export type DataTableHeaderSection = 'left' | 'center' | 'right';
8
8
  *
9
9
  * Writable slice atoms are rune-backed, so reading them inside a $derived
10
10
  * registers the dependency. Derived table APIs (getRowModel, header groups,
11
- * getVisibleLeafColumns, …) are not reliably tracked by the beta adapter, so
12
- * each derived below first reads the slices its result depends on.
11
+ * getVisibleLeafColumns, …) aren't themselves reactive, so each derived below
12
+ * first reads the slices its result depends on.
13
13
  */
14
14
  export declare function createTableViewState<T extends RowData>(getTable: () => DataTableInstance<T>): {
15
15
  readonly table: DataTableInstance<T>;
@@ -4,8 +4,8 @@ import { getColumnMeta } from './data-table-utils';
4
4
  *
5
5
  * Writable slice atoms are rune-backed, so reading them inside a $derived
6
6
  * registers the dependency. Derived table APIs (getRowModel, header groups,
7
- * getVisibleLeafColumns, …) are not reliably tracked by the beta adapter, so
8
- * each derived below first reads the slices its result depends on.
7
+ * getVisibleLeafColumns, …) aren't themselves reactive, so each derived below
8
+ * first reads the slices its result depends on.
9
9
  */
10
10
  export function createTableViewState(getTable) {
11
11
  const table = $derived.by(getTable);
@@ -1,7 +1,7 @@
1
1
  import type { CreateToasterReturn } from '@ark-ui/svelte/toast';
2
2
  export type ToastOptions = Parameters<CreateToasterReturn['create']>[0];
3
3
  export type ToastType = NonNullable<ToastOptions['type']>;
4
- export declare const toast: import("@zag-js/toast").Store<any> & {
4
+ export declare const toast: CreateToasterReturn<any> & {
5
5
  info: (title: string | ToastOptions, options?: Omit<ToastOptions, "type">) => string;
6
6
  success: (title: string | ToastOptions, options?: Omit<ToastOptions, "type">) => string;
7
7
  warning: (title: string | ToastOptions, options?: Omit<ToastOptions, "type">) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.70.0",
3
+ "version": "0.71.1",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "dev": "vite dev --open",
@@ -59,43 +59,43 @@
59
59
  "@iconify-json/ph": "^1.2.2",
60
60
  "@sveltejs/adapter-auto": "^7.0.0",
61
61
  "@sveltejs/adapter-cloudflare": "^7.2.9",
62
- "@sveltejs/kit": "^2.70.1",
62
+ "@sveltejs/kit": "^2.70.2",
63
63
  "@sveltejs/package": "^2.5.8",
64
64
  "@sveltejs/vite-plugin-svelte": "^7.2.0",
65
65
  "@tailwindcss/vite": "^4.3.3",
66
66
  "@tanstack/intent": "^0.3.6",
67
- "@tanstack/svelte-table": "9.0.0-beta.47",
67
+ "@tanstack/svelte-table": "9.0.0",
68
68
  "@types/node": "^22.20.0",
69
69
  "eslint": "^10.8.0",
70
70
  "eslint-config-prettier": "^10.1.8",
71
71
  "eslint-plugin-svelte": "^3.22.0",
72
- "globals": "^17.8.0",
72
+ "globals": "^17.9.0",
73
73
  "prettier": "^3.9.6",
74
74
  "prettier-plugin-svelte": "^4.1.1",
75
75
  "prettier-plugin-tailwindcss": "^0.8.1",
76
- "publint": "^0.3.22",
76
+ "publint": "^0.3.23",
77
77
  "svelte": "^5.56.8",
78
78
  "svelte-check": "^4.7.4",
79
79
  "tailwindcss": "^4.3.3",
80
80
  "tw-animate-css": "^1.4.0",
81
81
  "typescript": "^6.0.3",
82
- "typescript-eslint": "^8.65.0",
82
+ "typescript-eslint": "^8.66.0",
83
83
  "unplugin-icons": "^23.0.1",
84
- "vite": "^8.1.5"
84
+ "vite": "^8.2.0"
85
85
  },
86
86
  "keywords": [
87
87
  "svelte",
88
88
  "tanstack-intent"
89
89
  ],
90
90
  "dependencies": {
91
- "@ark-ui/svelte": "^5.22.1",
91
+ "@ark-ui/svelte": "^5.23.0",
92
92
  "@fontsource-variable/nunito-sans": "^5.2.7",
93
- "@internationalized/date": "^3.12.2",
94
- "@tanstack/svelte-virtual": "^3.13.34",
93
+ "@internationalized/date": "^3.12.3",
94
+ "@tanstack/svelte-virtual": "^3.13.35",
95
95
  "runed": "^0.37.1",
96
96
  "svelte-tel-input": "^4.3.2",
97
97
  "tailwind-merge": "^3.6.0",
98
- "tailwind-variants": "^3.3.0"
98
+ "tailwind-variants": "^3.3.1"
99
99
  },
100
100
  "intent": {
101
101
  "skills": [