fuma 0.1.32 → 0.2.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.
Files changed (111) hide show
  1. package/dist/Meta.svelte +4 -2
  2. package/dist/ui/{ButtonCopy.svelte → button/ButtonCopy.svelte} +1 -1
  3. package/dist/ui/button/index.d.ts +2 -0
  4. package/dist/ui/button/index.js +2 -0
  5. package/dist/ui/card/Card.svelte +1 -1
  6. package/dist/ui/card/CardCollapse.svelte +1 -1
  7. package/dist/ui/card/CardFullScreen.svelte +3 -2
  8. package/dist/ui/{Dialog.svelte → dialog/Dialog.svelte} +5 -5
  9. package/dist/ui/{DialogConfirm.svelte → dialog/DialogConfirm.svelte} +1 -1
  10. package/dist/ui/dialog/index.d.ts +2 -0
  11. package/dist/ui/dialog/index.js +2 -0
  12. package/dist/ui/drawer/Drawer.svelte +5 -16
  13. package/dist/ui/drawer/layers.js +47 -13
  14. package/dist/ui/form/FormSection.svelte +1 -1
  15. package/dist/ui/form/formInput.d.ts +13 -2
  16. package/dist/ui/form/formInput.js +12 -1
  17. package/dist/ui/{Icon.svelte → icon/Icon.svelte} +1 -1
  18. package/dist/ui/{Icon.svelte.d.ts → icon/Icon.svelte.d.ts} +1 -1
  19. package/dist/ui/icon/index.d.ts +1 -0
  20. package/dist/ui/icon/index.js +1 -0
  21. package/dist/ui/index.d.ts +8 -12
  22. package/dist/ui/index.js +8 -12
  23. package/dist/ui/input/FormControl.svelte.d.ts +1 -1
  24. package/dist/ui/input/InputBoolean.svelte.d.ts +1 -1
  25. package/dist/ui/input/InputCheckboxs.svelte.d.ts +1 -1
  26. package/dist/ui/input/InputCheckboxsMenu.svelte +2 -1
  27. package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +1 -1
  28. package/dist/ui/input/InputCombo.svelte +4 -2
  29. package/dist/ui/input/InputCombo.svelte.d.ts +3 -3
  30. package/dist/ui/input/InputImage.svelte +3 -1
  31. package/dist/ui/input/InputImagePreview.svelte +1 -1
  32. package/dist/ui/input/InputOptionInParam.svelte +1 -1
  33. package/dist/ui/input/InputOptions.svelte +1 -1
  34. package/dist/ui/input/InputPassword.svelte.d.ts +1 -1
  35. package/dist/ui/input/InputRadio.svelte.d.ts +1 -1
  36. package/dist/ui/input/InputRelation.svelte +5 -2
  37. package/dist/ui/input/InputRelation.svelte.d.ts +1 -1
  38. package/dist/ui/input/InputRelations.svelte +5 -2
  39. package/dist/ui/input/InputRelations.svelte.d.ts +1 -1
  40. package/dist/ui/input/InputSearch.svelte +2 -1
  41. package/dist/ui/input/InputSelect.svelte +7 -5
  42. package/dist/ui/input/InputSelect.svelte.d.ts +2 -2
  43. package/dist/ui/input/RelationAfter.svelte +4 -6
  44. package/dist/ui/input/action.js +1 -1
  45. package/dist/ui/input/index.d.ts +0 -1
  46. package/dist/ui/input/index.js +0 -1
  47. package/dist/ui/input/textRich/InputTextRich.svelte +1 -1
  48. package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +1 -1
  49. package/dist/ui/input/textRich/ToolMark.svelte +1 -1
  50. package/dist/ui/input/textRich/ToolMarkColor.svelte +1 -1
  51. package/dist/ui/input/textRich/ToolMarkLink.svelte +2 -1
  52. package/dist/ui/input/textRich/ToolMenu.svelte +2 -1
  53. package/dist/ui/input/textRich/ToolMenuInsert.svelte +1 -1
  54. package/dist/ui/{Login.svelte → login/Login.svelte} +2 -2
  55. package/dist/ui/login/index.d.ts +1 -0
  56. package/dist/ui/login/index.js +1 -0
  57. package/dist/ui/menu/ContextMenu.svelte +2 -1
  58. package/dist/ui/menu/DropDown.svelte +0 -2
  59. package/dist/ui/menu/DropDown.svelte.d.ts +0 -1
  60. package/dist/ui/menu/DropDownMenu.svelte +42 -0
  61. package/dist/ui/menu/DropDownMenu.svelte.d.ts +21 -0
  62. package/dist/ui/menu/index.d.ts +1 -0
  63. package/dist/ui/menu/index.js +1 -0
  64. package/dist/ui/{ToggleMode.svelte → mode/ToggleMode.svelte} +1 -1
  65. package/dist/ui/mode/index.d.ts +2 -0
  66. package/dist/ui/mode/index.js +2 -0
  67. package/dist/ui/{Pagination.svelte → pagination/Pagination.svelte} +2 -2
  68. package/dist/ui/pagination/index.d.ts +1 -0
  69. package/dist/ui/pagination/index.js +1 -0
  70. package/dist/ui/period/PeriodPickerButton.svelte +5 -2
  71. package/dist/ui/{PlaceholderImage.svelte → placeholder/PlaceholderImage.svelte} +1 -1
  72. package/dist/ui/placeholder/index.d.ts +2 -0
  73. package/dist/ui/placeholder/index.js +2 -0
  74. package/dist/ui/{Slot.svelte → slot/Slot.svelte} +1 -1
  75. package/dist/ui/slot/index.d.ts +1 -0
  76. package/dist/ui/slot/index.js +1 -0
  77. package/dist/ui/table/Table.svelte +1 -1
  78. package/dist/ui/table/TableBody.svelte +1 -1
  79. package/dist/ui/table/TableBody.svelte.d.ts +1 -1
  80. package/dist/ui/table/TableFieldsEdition.svelte +2 -1
  81. package/dist/ui/table/TableFieldsEdition.svelte.d.ts +1 -1
  82. package/dist/ui/table/TableViewSelect.svelte +4 -1
  83. package/dist/ui/table/cell/TableCellBoolean.svelte +1 -1
  84. package/dist/ui/table/field.d.ts +1 -1
  85. package/dist/ui/table/head/TableHeadDate.svelte +2 -1
  86. package/dist/ui/table/head/TableHeadDate.svelte.d.ts +1 -1
  87. package/dist/ui/table/head/TableHeadDefault.svelte.d.ts +1 -1
  88. package/dist/ui/table/head/TableHeadNumber.svelte +2 -1
  89. package/dist/ui/table/head/TableHeadSelect.svelte +2 -1
  90. package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +1 -1
  91. package/dist/ui/table/head/TableHeadString.svelte +3 -1
  92. package/dist/ui/table/head/TableHeadString.svelte.d.ts +1 -1
  93. package/dist/ui/tabs/Tabs.svelte +1 -1
  94. package/dist/ui/tabs/TabsIcon.svelte +2 -1
  95. package/dist/ui/tabs/TabsIcon.svelte.d.ts +1 -1
  96. package/dist/utils/component.js +0 -1
  97. package/dist/validation/zod.d.ts +1 -1
  98. package/package.json +23 -3
  99. /package/dist/ui/{ButtonCopy.svelte.d.ts → button/ButtonCopy.svelte.d.ts} +0 -0
  100. /package/dist/ui/{ButtonDelete.svelte → button/ButtonDelete.svelte} +0 -0
  101. /package/dist/ui/{ButtonDelete.svelte.d.ts → button/ButtonDelete.svelte.d.ts} +0 -0
  102. /package/dist/ui/{Dialog.svelte.d.ts → dialog/Dialog.svelte.d.ts} +0 -0
  103. /package/dist/ui/{DialogConfirm.svelte.d.ts → dialog/DialogConfirm.svelte.d.ts} +0 -0
  104. /package/dist/ui/{Login.svelte.d.ts → login/Login.svelte.d.ts} +0 -0
  105. /package/dist/ui/{ToggleMode.svelte.d.ts → mode/ToggleMode.svelte.d.ts} +0 -0
  106. /package/dist/ui/{Pagination.svelte.d.ts → pagination/Pagination.svelte.d.ts} +0 -0
  107. /package/dist/ui/{Placeholder.svelte → placeholder/Placeholder.svelte} +0 -0
  108. /package/dist/ui/{Placeholder.svelte.d.ts → placeholder/Placeholder.svelte.d.ts} +0 -0
  109. /package/dist/ui/{PlaceholderImage.svelte.d.ts → placeholder/PlaceholderImage.svelte.d.ts} +0 -0
  110. /package/dist/ui/{Span.svelte → slot/Span.svelte} +0 -0
  111. /package/dist/ui/{Span.svelte.d.ts → slot/Span.svelte.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type InputProps } from '../index.js';
2
+ import { type InputProps } from './index.js';
3
3
  import { type Options } from '../../utils/options.js';
4
- import type { TippyProps } from '../../index.js';
4
+ import type { TippyProps } from '../../utils/tippy.js';
5
5
  declare const __propDef: {
6
6
  props: Omit<InputProps, "input" | "inputElement"> & {
7
7
  options: Options;
@@ -1,7 +1,7 @@
1
1
  <script>import { fade } from "svelte/transition";
2
2
  import { createEventDispatcher } from "svelte";
3
3
  import { mdiLoading, mdiPlus } from "@mdi/js";
4
- import Icon from "../Icon.svelte";
4
+ import Icon from "../icon/Icon.svelte";
5
5
  export let isLoading;
6
6
  export let createUrl = "";
7
7
  export let createTitle = "";
@@ -10,17 +10,15 @@ const dispatch = createEventDispatcher();
10
10
  </script>
11
11
 
12
12
  {#if isLoading}
13
- <div class:right-10={createUrl} transition:fade|local>
13
+ <div in:fade|local>
14
14
  <Icon
15
15
  path={mdiLoading}
16
16
  class="w-9"
17
17
  classSVG="animate-spin fill-primary-ligther stroke-primary-ligther"
18
18
  />
19
19
  </div>
20
- {/if}
21
-
22
- {#if createUrl}
23
- <a href={createUrl} class="btn btn-square btn-sm">
20
+ {:else if createUrl}
21
+ <a href={createUrl} class="btn btn-square btn-sm" in:fade|local={{ duration: 200 }}>
24
22
  <Icon path={createIcon} on:click={() => dispatch('create')} title={createTitle} />
25
23
  </a>
26
24
  {/if}
@@ -1,6 +1,6 @@
1
1
  import { get } from 'svelte/store';
2
2
  import debounce from 'debounce';
3
- import { urlParam } from '../../index.js';
3
+ import { urlParam } from '../../store/param.js';
4
4
  import { goto } from '$app/navigation';
5
5
  export function bindValueWithParams(node, { bindEnable = false, debounceTime = 200, initValue = (initalValue) => (node.value = initalValue), listenerType = 'input' }) {
6
6
  const { name } = node;
@@ -2,7 +2,6 @@ export * from './types.js';
2
2
  export * from './action.js';
3
3
  export { default as FormControl } from './FormControl.svelte';
4
4
  export { default as InputText } from './InputText.svelte';
5
- export { default as InputTextRich } from './textRich/InputTextRich.svelte';
6
5
  export { default as InputPassword } from './InputPassword.svelte';
7
6
  export { default as InputTextarea } from './InputTextarea.svelte';
8
7
  export { default as InputRelations } from './InputRelations.svelte';
@@ -2,7 +2,6 @@ export * from './types.js';
2
2
  export * from './action.js';
3
3
  export { default as FormControl } from './FormControl.svelte';
4
4
  export { default as InputText } from './InputText.svelte';
5
- export { default as InputTextRich } from './textRich/InputTextRich.svelte';
6
5
  export { default as InputPassword } from './InputPassword.svelte';
7
6
  export { default as InputTextarea } from './InputTextarea.svelte';
8
7
  export { default as InputRelations } from './InputRelations.svelte';
@@ -2,7 +2,7 @@
2
2
  import { Editor } from "@tiptap/core";
3
3
  import debounce from "debounce";
4
4
  import { jsonParse } from "../../../utils/jsonParse.js";
5
- import { FormControl } from "../../index.js";
5
+ import { FormControl } from "../index.js";
6
6
  import ToolsBar from "./ToolsBar.svelte";
7
7
  import { extensions } from "./extensions.js";
8
8
  export let value = "";
@@ -10,7 +10,7 @@ declare const __propDef: {
10
10
  prefix?: string | number | undefined;
11
11
  prefixFor?: string | number | undefined;
12
12
  enhanceDisabled?: boolean | undefined;
13
- labelPosition?: ("top" | "left" | "right") | undefined;
13
+ labelPosition?: ("top" | "right" | "left") | undefined;
14
14
  } & {
15
15
  value?: string | undefined;
16
16
  classToolbar?: string | undefined;
@@ -1,4 +1,4 @@
1
- <script>import { Icon } from "../../index.js";
1
+ <script>import { Icon } from "../../icon/index.js";
2
2
  import { tip } from "../../../action/tip.js";
3
3
  export let editor;
4
4
  export let key;
@@ -1,4 +1,4 @@
1
- <script>import { Icon } from "../../index.js";
1
+ <script>import { Icon } from "../../icon/index.js";
2
2
  import { tip } from "../../../action/tip.js";
3
3
  export let icon;
4
4
  export let label;
@@ -1,5 +1,6 @@
1
1
  <script>import { mdiLinkVariant } from "@mdi/js";
2
- import { Dialog, InputText } from "../../index.js";
2
+ import { Dialog } from "../../dialog/index.js";
3
+ import { InputText } from "../index.js";
3
4
  import { z } from "../../../validation/zod.js";
4
5
  import ToolMark from "./ToolMark.svelte";
5
6
  export let editor;
@@ -1,5 +1,6 @@
1
1
  <script>import { mdiChevronDown } from "@mdi/js";
2
- import { Icon, DropDown } from "../../index.js";
2
+ import { Icon } from "../../icon/index.js";
3
+ import { DropDown } from "../../menu/index.js";
3
4
  export let editor;
4
5
  export let tools;
5
6
  export let hideLabel = false;
@@ -1,6 +1,6 @@
1
1
  <script>import { createEventDispatcher } from "svelte";
2
2
  import { mdiPlus, mdiMinus, mdiImageOutline, mdiYoutube, mdiAt } from "@mdi/js";
3
- import { Icon } from "../../index.js";
3
+ import { Icon } from "../../icon/index.js";
4
4
  import ToolMenu from "./ToolMenu.svelte";
5
5
  import { suggestionItems } from "./suggestion.js";
6
6
  export let editor;
@@ -1,7 +1,7 @@
1
1
  <script>import { slide } from "svelte/transition";
2
- import { InputText, InputPassword } from "./index.js";
3
- import { useForm } from "../validation/form.js";
4
2
  import { page } from "$app/stores";
3
+ import { InputText, InputPassword } from "../input/index.js";
4
+ import { useForm } from "../../validation/form.js";
5
5
  export let onSuccess = void 0;
6
6
  const { enhance } = useForm({
7
7
  onSuccess,
@@ -0,0 +1 @@
1
+ export { default as Login } from './Login.svelte';
@@ -0,0 +1 @@
1
+ export { default as Login } from './Login.svelte';
@@ -1,5 +1,6 @@
1
1
  <script>import { createEventDispatcher } from "svelte";
2
- import { Dialog, DropDown } from "../../index.js";
2
+ import { Dialog } from "../dialog/index.js";
3
+ import { DropDown } from "./index.js";
3
4
  import { isSmallScreen } from "../../store/index.js";
4
5
  export let tippyProps = {};
5
6
  let klass = "";
@@ -26,7 +26,6 @@ export let hideOnNav = true;
26
26
  export let tip = void 0;
27
27
  export let disable = false;
28
28
  export let content = void 0;
29
- export let isWidthOfActivator = false;
30
29
  let activator;
31
30
  beforeNavigate(() => hideOnNav && hide());
32
31
  onMount(() => {
@@ -94,7 +93,6 @@ export function setTippyProps(props) {
94
93
 
95
94
  <div class="hidden">
96
95
  <div
97
- style={isWidthOfActivator ? `width: ${activator?.offsetWidth}px;` : ''}
98
96
  class="{klass} max-h-80 overflow-auto rounded-lg border bg-base-100 p-1 shadow-lg"
99
97
  bind:this={content}
100
98
  >
@@ -15,7 +15,6 @@ declare const __propDef: {
15
15
  tip?: TippyInstance | undefined;
16
16
  disable?: boolean | undefined;
17
17
  content?: HTMLDivElement | undefined;
18
- isWidthOfActivator?: boolean | undefined;
19
18
  hide?: (() => void) | undefined;
20
19
  show?: (() => void) | undefined;
21
20
  setTippyProps?: ((props: Partial<TippyProps>) => void) | undefined;
@@ -0,0 +1,42 @@
1
+ <script>import { createEventDispatcher } from "svelte";
2
+ import { mdiUnfoldMoreHorizontal } from "@mdi/js";
3
+ import { Icon } from "../icon/index.js";
4
+ import { DropDown } from "./index.js";
5
+ import { SelectorList } from "../input/index.js";
6
+ import { parseOptions } from "../../utils/options.js";
7
+ export let options;
8
+ $:
9
+ _options = parseOptions(options);
10
+ let trigger;
11
+ let dropDown;
12
+ const dispatch = createEventDispatcher();
13
+ function onSelect(index) {
14
+ const option = _options[index];
15
+ dispatch("select", option.value);
16
+ dropDown.hide();
17
+ }
18
+ </script>
19
+
20
+ <DropDown bind:this={dropDown}>
21
+ <div class="contents" bind:this={trigger} slot="activator">
22
+ <slot>
23
+ <button type="button" class="flex h-12 items-center gap-2 rounded-lg border pl-4 pr-2">
24
+ <span>Menu</span>
25
+ <Icon class="ml-auto" path={mdiUnfoldMoreHorizontal} size={18} />
26
+ </button>
27
+ </slot>
28
+ </div>
29
+
30
+ <SelectorList
31
+ {trigger}
32
+ items={_options.map((opt) => ({ id: opt.value, ...opt }))}
33
+ let:item
34
+ on:select={({ detail }) => onSelect(detail)}
35
+ class="w-full"
36
+ >
37
+ {#if item.icon}
38
+ <Icon path={item.icon} size={18} class="opacity-70" />
39
+ {/if}
40
+ <span class="whitespace-nowrap pr-4">{item.label}</span>
41
+ </SelectorList>
42
+ </DropDown>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type Options } from '../../utils/options.js';
3
+ declare const __propDef: {
4
+ props: {
5
+ options: Options;
6
+ };
7
+ events: {
8
+ select: CustomEvent<string>;
9
+ } & {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export type DropDownMenuProps = typeof __propDef.props;
17
+ export type DropDownMenuEvents = typeof __propDef.events;
18
+ export type DropDownMenuSlots = typeof __propDef.slots;
19
+ export default class DropDownMenu extends SvelteComponent<DropDownMenuProps, DropDownMenuEvents, DropDownMenuSlots> {
20
+ }
21
+ export {};
@@ -1,2 +1,3 @@
1
1
  export { default as DropDown } from './DropDown.svelte';
2
2
  export { default as ContextMenu } from './ContextMenu.svelte';
3
+ export { default as DropDownMenu } from './DropDownMenu.svelte';
@@ -1,2 +1,3 @@
1
1
  export { default as DropDown } from './DropDown.svelte';
2
2
  export { default as ContextMenu } from './ContextMenu.svelte';
3
+ export { default as DropDownMenu } from './DropDownMenu.svelte';
@@ -1,6 +1,6 @@
1
1
  <script>import { browser } from "$app/environment";
2
2
  import { ModeWatcher, toggleMode, mode } from "mode-watcher";
3
- import { Icon } from "../index.js";
3
+ import { Icon } from "../icon/index.js";
4
4
  import { mdiWeatherNight, mdiWhiteBalanceSunny } from "@mdi/js";
5
5
  mode.subscribe((_mode) => {
6
6
  if (!browser)
@@ -0,0 +1,2 @@
1
+ export { default as ToggleMode } from './ToggleMode.svelte';
2
+ export { mode, setMode, resetMode, toggleMode, userPrefersMode, systemPrefersMode } from 'mode-watcher';
@@ -0,0 +1,2 @@
1
+ export { default as ToggleMode } from './ToggleMode.svelte';
2
+ export { mode, setMode, resetMode, toggleMode, userPrefersMode, systemPrefersMode } from 'mode-watcher';
@@ -1,6 +1,6 @@
1
1
  <script>import { mdiChevronLeft, mdiChevronRight } from "@mdi/js";
2
- import { Icon } from "../index.js";
3
- import { urlParam } from "../store/index.js";
2
+ import { Icon } from "../icon/index.js";
3
+ import { urlParam } from "../../store/index.js";
4
4
  export let take = 20;
5
5
  $:
6
6
  skip = +($urlParam.get("skip") || 0);
@@ -0,0 +1 @@
1
+ export { default as Pagination } from './Pagination.svelte';
@@ -0,0 +1 @@
1
+ export { default as Pagination } from './Pagination.svelte';
@@ -1,9 +1,12 @@
1
1
  <script>import { mdiCalendarMonthOutline, mdiClose } from "@mdi/js";
2
2
  import { goto } from "$app/navigation";
3
3
  import { page } from "$app/stores";
4
- import { Icon, DropDown, InputTime, PeriodPicker } from "../index.js";
5
- import { formatRange } from "../../utils/formatRange.js";
6
4
  import { urlParam } from "../../store/param.js";
5
+ import { formatRange } from "../../utils/formatRange.js";
6
+ import { Icon } from "../icon/index.js";
7
+ import { DropDown } from "../menu/index.js";
8
+ import { InputTime } from "../input/index.js";
9
+ import { PeriodPicker } from "./index.js";
7
10
  let dropDown;
8
11
  const start = $page.url.searchParams.get("start")?.split("T") || [];
9
12
  const end = $page.url.searchParams.get("end")?.split("T") || [];
@@ -1,5 +1,5 @@
1
1
  <script>import { mdiPlus } from "@mdi/js";
2
- import { Icon } from "../index.js";
2
+ import { Icon } from "../icon/index.js";
3
3
  export let x;
4
4
  export let y;
5
5
  </script>
@@ -0,0 +1,2 @@
1
+ export { default as Placeholder } from './Placeholder.svelte';
2
+ export { default as PlaceholderImage } from './PlaceholderImage.svelte';
@@ -0,0 +1,2 @@
1
+ export { default as Placeholder } from './Placeholder.svelte';
2
+ export { default as PlaceholderImage } from './PlaceholderImage.svelte';
@@ -1,5 +1,5 @@
1
1
  <script>import {} from "svelte";
2
- import { component } from "../index.js";
2
+ import { component } from "../../utils/component.js";
3
3
  import Span from "./Span.svelte";
4
4
  export let slot = void 0;
5
5
  export let args = void 0;
@@ -0,0 +1 @@
1
+ export { default as Slot } from './Slot.svelte';
@@ -0,0 +1 @@
1
+ export { default as Slot } from './Slot.svelte';
@@ -1,5 +1,5 @@
1
1
  <script>import { afterNavigate } from "$app/navigation";
2
- import { Placeholder } from "../index.js";
2
+ import { Placeholder } from "../placeholder/index.js";
3
3
  import {
4
4
  TableHead,
5
5
  TableBody,
@@ -1,5 +1,5 @@
1
1
  <script>import { createEventDispatcher } from "svelte";
2
- import { TableCell } from "../index.js";
2
+ import { TableCell } from "./index.js";
3
3
  export let items;
4
4
  export let fields;
5
5
  export let action = void 0;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type TableField } from '../index.js';
2
+ import { type TableField } from './index.js';
3
3
  import type { ComponentAndProps } from '../../utils/component.js';
4
4
  declare class __sveltets_Render<Item extends {
5
5
  id: string;
@@ -11,8 +11,9 @@ import { page } from "$app/stores";
11
11
  import { urlParam } from "../../store/param.js";
12
12
  import { listEditable } from "../../action/list/index.js";
13
13
  import { jsonParse } from "../../utils/jsonParse.js";
14
- import { Icon, DropDown } from "../index.js";
15
14
  import { context } from "./context.js";
15
+ import { Icon } from "../icon/index.js";
16
+ import { DropDown } from "../menu/index.js";
16
17
  export let fields;
17
18
  export let key;
18
19
  export let onCreateField = void 0;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type TableField } from '../index.js';
2
+ import type { TableField } from './index.js';
3
3
  declare class __sveltets_Render<Item extends {
4
4
  id: string;
5
5
  }> {
@@ -2,7 +2,10 @@
2
2
  import { mdiChevronDown, mdiContentSaveEditOutline, mdiPlus } from "@mdi/js";
3
3
  import { page } from "$app/stores";
4
4
  import { enhance } from "$app/forms";
5
- import { Dialog, DropDown, Icon, InputText } from "../index.js";
5
+ import { Icon } from "../icon/index.js";
6
+ import { Dialog } from "../dialog/index.js";
7
+ import { DropDown } from "../menu/index.js";
8
+ import { InputText } from "../input/index.js";
6
9
  import { useForm } from "../../validation/form.js";
7
10
  export let key;
8
11
  export let views;
@@ -1,5 +1,5 @@
1
1
  <script>import { mdiCheck, mdiClose } from "@mdi/js";
2
- import { Icon } from "../../index.js";
2
+ import { Icon } from "../../icon/index.js";
3
3
  export let value;
4
4
  </script>
5
5
 
@@ -49,7 +49,7 @@ export declare function syncFieldsWithParams(tablekey: string, fields: TableFiel
49
49
  $visible: boolean;
50
50
  key: string;
51
51
  label: string;
52
- type: "string" | "number" | "boolean" | "date" | "textarea";
52
+ type: "string" | "number" | "boolean" | "textarea" | "date";
53
53
  options?: Options | undefined;
54
54
  hint?: string | undefined;
55
55
  locked?: boolean | undefined;
@@ -1,6 +1,7 @@
1
1
  <script>import { goto } from "$app/navigation";
2
2
  import { page } from "$app/stores";
3
- import { DropDown, InputTime } from "../../index.js";
3
+ import { DropDown } from "../../menu/index.js";
4
+ import { InputTime } from "../../input/index.js";
4
5
  import { formatRange } from "../../../utils/formatRange.js";
5
6
  import { PeriodPicker } from "../../period/index.js";
6
7
  import { urlParam } from "../../../store/param.js";
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type TableField } from '../../index.js';
2
+ import type { TableField } from '../index.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  field: TableField;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { TableField } from '../../index.js';
2
+ import type { TableField } from '../index.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  field: TableField;
@@ -2,7 +2,8 @@
2
2
  import debounce from "debounce";
3
3
  import { goto } from "$app/navigation";
4
4
  import { page } from "$app/stores";
5
- import { DropDown, InputNumber } from "../../index.js";
5
+ import { DropDown } from "../../menu/index.js";
6
+ import { InputNumber } from "../../input/index.js";
6
7
  import { urlParam } from "../../../store/param.js";
7
8
  import { jsonParse } from "../../../utils/jsonParse.js";
8
9
  export let field;
@@ -1,7 +1,8 @@
1
1
  <script>import { derived } from "svelte/store";
2
2
  import { page } from "$app/stores";
3
3
  import { jsonParse } from "../../../utils/jsonParse.js";
4
- import { DropDown, Icon } from "../../index.js";
4
+ import { DropDown } from "../../menu/index.js";
5
+ import { Icon } from "../../icon/index.js";
5
6
  import { parseOptions } from "../../../utils/options.js";
6
7
  import { urlParam } from "../../../store/param.js";
7
8
  export let field;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type TableField } from '../../index.js';
2
+ import type { TableField } from '../index.js';
3
3
  import { type Options } from '../../../utils/options.js';
4
4
  declare const __propDef: {
5
5
  props: {
@@ -1,6 +1,8 @@
1
1
  <script>import { mdiMagnify } from "@mdi/js";
2
2
  import { page } from "$app/stores";
3
- import { DropDown, Icon, InputSearch } from "../../index.js";
3
+ import { DropDown } from "../../menu/index.js";
4
+ import { Icon } from "../../icon/index.js";
5
+ import { InputSearch } from "../../input/index.js";
4
6
  export let field;
5
7
  let tip;
6
8
  let searchValue = $page.url.searchParams.get(field.key) || "";
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type TableField } from '../../index.js';
2
+ import type { TableField } from '../index.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  field: TableField;
@@ -1,5 +1,5 @@
1
1
  <script>import { page } from "$app/stores";
2
- import { Icon } from "../../index.js";
2
+ import { Icon } from "../icon/index.js";
3
3
  export let tabs;
4
4
  let klass = "";
5
5
  export { klass as class };
@@ -1,7 +1,8 @@
1
1
  <script>import { page } from "$app/stores";
2
2
  import { onMount } from "svelte";
3
3
  import { urlParam } from "../../store/index.js";
4
- import { Icon, parseOptions } from "../../index.js";
4
+ import { Icon } from "../icon/index.js";
5
+ import { parseOptions } from "../../utils/options.js";
5
6
  export let options;
6
7
  export let showLabel = false;
7
8
  export let key;
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type Options } from '../../index.js';
2
+ import { type Options } from '../../utils/options.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  options: Options;
@@ -1,4 +1,3 @@
1
- import { InputSelect } from '../ui/index.js';
2
1
  export function component(component, props) {
3
2
  return { component, props };
4
3
  }
@@ -164,7 +164,7 @@ export declare const z: {
164
164
  map: "map";
165
165
  set: "set";
166
166
  };
167
- getParsedType: (data: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "nan" | "integer" | "float" | "date" | "null" | "array" | "unknown" | "promise" | "void" | "never" | "map" | "set";
167
+ getParsedType: (data: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "date" | "map" | "set" | "nan" | "integer" | "float" | "null" | "array" | "unknown" | "promise" | "void" | "never";
168
168
  ZodType: typeof zod.ZodType;
169
169
  ZodString: typeof zod.ZodString;
170
170
  ZodNumber: typeof zod.ZodNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuma",
3
- "version": "0.1.32",
3
+ "version": "0.2.1",
4
4
  "description": "My fullstack material build with sveltekit, daisyui, zod and more",
5
5
  "author": {
6
6
  "name": "Jonas Voisard",
@@ -12,7 +12,27 @@
12
12
  "exports": {
13
13
  ".": {
14
14
  "types": "./dist/index.d.ts",
15
- "svelte": "./dist/index.js"
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./ui": {
18
+ "types": "./dist/ui/index.d.ts",
19
+ "default": "./dist/ui/index.js"
20
+ },
21
+ "./utils": {
22
+ "types": "./dist/utils/index.d.ts",
23
+ "default": "./dist/utils/index.js"
24
+ },
25
+ "./store": {
26
+ "types": "./dist/store/index.d.ts",
27
+ "default": "./dist/store/index.js"
28
+ },
29
+ "./validation": {
30
+ "types": "./dist/validation/index.d.ts",
31
+ "default": "./dist/validation/index.js"
32
+ },
33
+ "./action": {
34
+ "types": "./dist/action/index.d.ts",
35
+ "default": "./dist/action/index.js"
16
36
  },
17
37
  "./server": {
18
38
  "types": "./dist/server/index.d.ts",
@@ -56,7 +76,7 @@
56
76
  "tailwindcss": "^3.3.6",
57
77
  "tslib": "^2.4.1",
58
78
  "typescript": "^5.0.0",
59
- "vite": "^5.0.11",
79
+ "vite": "^5.2.10",
60
80
  "vitest": "^1.2.0"
61
81
  },
62
82
  "dependencies": {
File without changes