compote-ui 0.55.2 → 0.55.4

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.
@@ -12,11 +12,18 @@ export function createTable(options) {
12
12
  ...createColumnVisibility(options.columns),
13
13
  ...options.initialState?.columnVisibility
14
14
  };
15
+ // Recompute the resolved column defs only when the source columns change.
16
+ // $derived keeps the reference stable between changes so TanStack's column
17
+ // memoization isn't invalidated on every access. Pass `columns` through a
18
+ // getter (like `data`) to make adding/removing/reordering columns reactive.
19
+ const columnDefs = $derived(createColumns(options.columns, localeCtx));
15
20
  const table = createSvelteTable({
16
21
  get data() {
17
22
  return options.data;
18
23
  },
19
- columns: createColumns(options.columns, localeCtx),
24
+ get columns() {
25
+ return columnDefs;
26
+ },
20
27
  getCoreRowModel: getCoreRowModel(),
21
28
  getSortedRowModel: getSortedRowModel(),
22
29
  getFilteredRowModel: getFilteredRowModel(),
@@ -12,6 +12,7 @@
12
12
  invalid,
13
13
  readOnly,
14
14
  disabled,
15
+ hideTimeZone = true,
15
16
  ...restProps
16
17
  }: DateInputProps = $props();
17
18
 
@@ -26,6 +27,7 @@
26
27
 
27
28
  <DateInput.Root
28
29
  {...restProps}
30
+ {hideTimeZone}
29
31
  invalid={isInvalid}
30
32
  readOnly={isReadOnly}
31
33
  disabled={isDisabled}
@@ -8,7 +8,7 @@
8
8
 
9
9
  <Field.Textarea
10
10
  {...rest}
11
- {value}
11
+ bind:value
12
12
  class={cn(
13
13
  'flex min-h-20 w-full resize-y rounded-md border bg-surface-1 px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-ink-dim focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-invalid:border-danger data-invalid:focus-visible:ring-danger data-readonly:cursor-default data-readonly:opacity-70',
14
14
  className
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.55.2",
3
+ "version": "0.55.4",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "dev": "vite dev --open",