runeforge 0.0.14 → 0.0.16

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.
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" generics="T extends object = Record<string, unknown>">
2
- import 'cally';
2
+ import { onMount } from 'svelte';
3
3
  import Avatar from '../Avatar.svelte';
4
4
  import Label from '../form/Label.svelte';
5
5
  import Select from '../form/Select.svelte';
@@ -9,6 +9,10 @@
9
9
 
10
10
  const strings = getStrings();
11
11
 
12
+ onMount(() => {
13
+ import('cally');
14
+ });
15
+
12
16
  let {
13
17
  field,
14
18
  record = $bindable({} as Record<string, unknown>),
@@ -108,7 +112,7 @@
108
112
  <calendar-date
109
113
  class="cally rounded-box border border-base-300 bg-base-100 shadow-sm"
110
114
  value={String(record[field.attribute] ?? '')}
111
- onchange={(e: Event) => { record[field.attribute] = (e as Event & { detail: { value: string } }).detail.value; }}
115
+ onchange={(e: Event) => { record[field.attribute] = (e.currentTarget as HTMLElement & { value: string }).value; }}
112
116
  >
113
117
  <svg aria-label={strings.previous} class="fill-current size-4" {...{"slot": "previous"}} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M15.75 19.5 8.25 12l7.5-7.5"/></svg>
114
118
  <svg aria-label={strings.next} class="fill-current size-4" {...{"slot": "next"}} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="m8.25 4.5 7.5 7.5-7.5 7.5"/></svg>
@@ -1,4 +1,3 @@
1
- import 'cally';
2
1
  import type { FieldDefinition } from '../../types/crud.js';
3
2
  declare function $$render<T extends object = Record<string, unknown>>(): {
4
3
  props: {
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" generics="T extends object">
2
- import 'cally';
2
+ import { onMount } from 'svelte';
3
3
  import Label from '../form/Label.svelte';
4
4
  import Button from '../form/Button.svelte';
5
5
  import { getIconSet } from '../../icons/context.js';
@@ -7,6 +7,10 @@
7
7
  import { getStrings } from '../../i18n/context.js';
8
8
 
9
9
  const strings = getStrings();
10
+
11
+ onMount(() => {
12
+ import('cally');
13
+ });
10
14
  import type { DistinctEntry } from '../../types/table.js';
11
15
  import type { FilterState } from './state.svelte.js';
12
16
  import type { ColumnDefinition } from '../../types/crud.js';
@@ -39,8 +43,8 @@
39
43
 
40
44
  $effect(() => {
41
45
  if (!calendarEl) return;
42
- function handler(e: Event) {
43
- const value = (e as CustomEvent<{ value: string }>).detail?.value ?? '';
46
+ function handler() {
47
+ const value = (calendarEl as HTMLElement & { value: string }).value ?? '';
44
48
  const [from = '', to = ''] = value.split('/');
45
49
  filter.setDateRange(column.attribute, from, to);
46
50
  onchange?.();
@@ -1,4 +1,3 @@
1
- import 'cally';
2
1
  import type { DistinctEntry } from '../../types/table.js';
3
2
  import type { FilterState } from './state.svelte.js';
4
3
  import type { ColumnDefinition } from '../../types/crud.js';
@@ -23,7 +23,7 @@
23
23
  } = $props();
24
24
  </script>
25
25
 
26
- <tbody>
26
+ <tbody data-testid="paginated-table-body">
27
27
  {#if rows.length === 0}
28
28
  <tr>
29
29
  <td colspan={colCount} class="py-10 text-center text-base-content/50">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runeforge",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "SvelteKit toolkit for building metadata-driven CRUD interfaces with tables, forms, and actions",
5
5
  "license": "MIT",
6
6
  "author": "Ezequiel Puerta",