fuma 1.0.21 → 2.0.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.
Files changed (195) hide show
  1. package/README.md +1 -1
  2. package/dist/action/list/handlers.d.ts +2 -2
  3. package/dist/action/list/index.d.ts +2 -0
  4. package/dist/action/list/index.js +1 -0
  5. package/dist/action/list/trigger.d.ts +7 -1
  6. package/dist/action/list/trigger.js +2 -2
  7. package/dist/private/Meta.svelte +32 -27
  8. package/dist/private/Meta.svelte.d.ts +29 -17
  9. package/dist/private/api.d.ts +1 -1
  10. package/dist/private/store.d.ts +0 -1
  11. package/dist/server/parseFormData.d.ts +1 -1
  12. package/dist/server/parseQuery.d.ts +1 -1
  13. package/dist/server/sse.d.ts +0 -1
  14. package/dist/store/isSmallScreen.d.ts +0 -1
  15. package/dist/store/param.d.ts +0 -2
  16. package/dist/store/session.d.ts +0 -1
  17. package/dist/ui/badge/Badge.svelte +4 -3
  18. package/dist/ui/badge/Badge.svelte.d.ts +19 -15
  19. package/dist/ui/button/ButtonCopy.svelte +35 -32
  20. package/dist/ui/button/ButtonCopy.svelte.d.ts +23 -21
  21. package/dist/ui/button/ButtonDelete.svelte +23 -21
  22. package/dist/ui/button/ButtonDelete.svelte.d.ts +32 -20
  23. package/dist/ui/card/Card.svelte +13 -10
  24. package/dist/ui/card/Card.svelte.d.ts +39 -24
  25. package/dist/ui/card/CardBasic.svelte +5 -4
  26. package/dist/ui/card/CardBasic.svelte.d.ts +29 -18
  27. package/dist/ui/card/CardCollapse.svelte +35 -31
  28. package/dist/ui/card/CardCollapse.svelte.d.ts +37 -23
  29. package/dist/ui/card/CardFullScreen.svelte +8 -6
  30. package/dist/ui/card/CardFullScreen.svelte.d.ts +35 -20
  31. package/dist/ui/card/CardLink.svelte +5 -4
  32. package/dist/ui/card/CardLink.svelte.d.ts +29 -18
  33. package/dist/ui/dialog/Dialog.svelte +41 -34
  34. package/dist/ui/dialog/Dialog.svelte.d.ts +36 -23
  35. package/dist/ui/dialog/DialogConfirm.svelte +6 -4
  36. package/dist/ui/dialog/DialogConfirm.svelte.d.ts +33 -19
  37. package/dist/ui/drawer/Drawer.svelte +47 -38
  38. package/dist/ui/drawer/Drawer.svelte.d.ts +81 -46
  39. package/dist/ui/drawer/drawerFly.d.ts +0 -1
  40. package/dist/ui/drawer/layers.d.ts +0 -1
  41. package/dist/ui/form/Form.svelte +106 -87
  42. package/dist/ui/form/Form.svelte.d.ts +29 -16
  43. package/dist/ui/form/FormInput.svelte +12 -6
  44. package/dist/ui/form/FormSection.svelte +24 -17
  45. package/dist/ui/form/FormSection.svelte.d.ts +37 -25
  46. package/dist/ui/icon/Icon.svelte +35 -32
  47. package/dist/ui/icon/Icon.svelte.d.ts +25 -21
  48. package/dist/ui/index.d.ts +0 -1
  49. package/dist/ui/index.js +0 -1
  50. package/dist/ui/input/FormControl.svelte +48 -36
  51. package/dist/ui/input/FormControl.svelte.d.ts +32 -30
  52. package/dist/ui/input/InputBoolean.svelte +29 -22
  53. package/dist/ui/input/InputBoolean.svelte.d.ts +43 -35
  54. package/dist/ui/input/InputCheckboxs.svelte +37 -34
  55. package/dist/ui/input/InputCheckboxs.svelte.d.ts +54 -39
  56. package/dist/ui/input/InputCheckboxsMenu.svelte +64 -47
  57. package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +56 -41
  58. package/dist/ui/input/InputCheckboxsTree.svelte +9 -6
  59. package/dist/ui/input/InputCheckboxsTree.svelte.d.ts +22 -18
  60. package/dist/ui/input/InputCheckboxsTreeNodes.svelte +36 -28
  61. package/dist/ui/input/InputCheckboxsTreeNodes.svelte.d.ts +20 -16
  62. package/dist/ui/input/InputCombo.svelte +76 -65
  63. package/dist/ui/input/InputCombo.svelte.d.ts +55 -39
  64. package/dist/ui/input/InputDate.svelte +36 -29
  65. package/dist/ui/input/InputDate.svelte.d.ts +20 -16
  66. package/dist/ui/input/InputDateTime.svelte +37 -30
  67. package/dist/ui/input/InputDateTime.svelte.d.ts +20 -16
  68. package/dist/ui/input/InputImage.svelte +52 -45
  69. package/dist/ui/input/InputImage.svelte.d.ts +40 -27
  70. package/dist/ui/input/InputImagePreview.svelte +24 -20
  71. package/dist/ui/input/InputImagePreview.svelte.d.ts +25 -21
  72. package/dist/ui/input/InputNumber.svelte +28 -22
  73. package/dist/ui/input/InputNumber.svelte.d.ts +20 -20
  74. package/dist/ui/input/InputOptionInParam.svelte +12 -10
  75. package/dist/ui/input/InputOptionInParam.svelte.d.ts +21 -17
  76. package/dist/ui/input/InputOptions.svelte +40 -34
  77. package/dist/ui/input/InputOptions.svelte.d.ts +19 -15
  78. package/dist/ui/input/InputPassword.svelte +22 -18
  79. package/dist/ui/input/InputPassword.svelte.d.ts +43 -35
  80. package/dist/ui/input/InputRadio.svelte +51 -46
  81. package/dist/ui/input/InputRadio.svelte.d.ts +53 -38
  82. package/dist/ui/input/InputRelation.svelte +129 -112
  83. package/dist/ui/input/InputRelation.svelte.d.ts +39 -53
  84. package/dist/ui/input/InputRelations.svelte +96 -90
  85. package/dist/ui/input/InputRelations.svelte.d.ts +35 -37
  86. package/dist/ui/input/InputSearch.svelte +14 -11
  87. package/dist/ui/input/InputSearch.svelte.d.ts +25 -21
  88. package/dist/ui/input/InputSelect.svelte +59 -46
  89. package/dist/ui/input/InputSelect.svelte.d.ts +23 -19
  90. package/dist/ui/input/InputText.svelte +29 -28
  91. package/dist/ui/input/InputText.svelte.d.ts +41 -28
  92. package/dist/ui/input/InputTextarea.svelte +20 -19
  93. package/dist/ui/input/InputTextarea.svelte.d.ts +20 -20
  94. package/dist/ui/input/InputTime.svelte +43 -36
  95. package/dist/ui/input/InputTime.svelte.d.ts +21 -36
  96. package/dist/ui/input/RelationAfter.svelte +13 -9
  97. package/dist/ui/input/RelationAfter.svelte.d.ts +24 -20
  98. package/dist/ui/input/SelectorList.svelte +16 -12
  99. package/dist/ui/input/SelectorList.svelte.d.ts +29 -20
  100. package/dist/ui/input/textRich/InputTextRich.svelte +63 -59
  101. package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +36 -38
  102. package/dist/ui/input/textRich/SuggesionList.svelte +13 -9
  103. package/dist/ui/input/textRich/SuggesionList.svelte.d.ts +19 -15
  104. package/dist/ui/input/textRich/ToolMark.svelte +12 -9
  105. package/dist/ui/input/textRich/ToolMark.svelte.d.ts +22 -18
  106. package/dist/ui/input/textRich/ToolMarkColor.svelte +16 -12
  107. package/dist/ui/input/textRich/ToolMarkColor.svelte.d.ts +21 -17
  108. package/dist/ui/input/textRich/ToolMarkLink.svelte +46 -38
  109. package/dist/ui/input/textRich/ToolMarkLink.svelte.d.ts +18 -14
  110. package/dist/ui/input/textRich/ToolMenu.svelte +34 -19
  111. package/dist/ui/input/textRich/ToolMenu.svelte.d.ts +30 -26
  112. package/dist/ui/input/textRich/ToolMenuAlign.svelte +13 -9
  113. package/dist/ui/input/textRich/ToolMenuAlign.svelte.d.ts +18 -14
  114. package/dist/ui/input/textRich/ToolMenuInsert.svelte +12 -7
  115. package/dist/ui/input/textRich/ToolMenuInsert.svelte.d.ts +20 -16
  116. package/dist/ui/input/textRich/ToolMenuNode.svelte +14 -10
  117. package/dist/ui/input/textRich/ToolMenuNode.svelte.d.ts +18 -14
  118. package/dist/ui/input/textRich/ToolsBar.svelte +21 -14
  119. package/dist/ui/input/textRich/ToolsBar.svelte.d.ts +19 -17
  120. package/dist/ui/input/textRich/suggestion.d.ts +0 -1
  121. package/dist/ui/login/Login.svelte +37 -31
  122. package/dist/ui/login/Login.svelte.d.ts +18 -14
  123. package/dist/ui/menu/ContextMenu.svelte +37 -31
  124. package/dist/ui/menu/ContextMenu.svelte.d.ts +38 -25
  125. package/dist/ui/menu/DropDown.svelte +92 -83
  126. package/dist/ui/menu/DropDown.svelte.d.ts +46 -33
  127. package/dist/ui/menu/DropDownMenu.svelte +25 -18
  128. package/dist/ui/menu/DropDownMenu.svelte.d.ts +30 -19
  129. package/dist/ui/mode/ToggleMode.svelte +28 -16
  130. package/dist/ui/mode/ToggleMode.svelte.d.ts +34 -17
  131. package/dist/ui/pagination/Pagination.svelte +9 -8
  132. package/dist/ui/pagination/Pagination.svelte.d.ts +18 -14
  133. package/dist/ui/placeholder/Placeholder.svelte +4 -3
  134. package/dist/ui/placeholder/Placeholder.svelte.d.ts +28 -17
  135. package/dist/ui/placeholder/PlaceholderImage.svelte +6 -4
  136. package/dist/ui/placeholder/PlaceholderImage.svelte.d.ts +28 -17
  137. package/dist/ui/range/RangePicker.svelte +76 -63
  138. package/dist/ui/range/RangePicker.svelte.d.ts +29 -24
  139. package/dist/ui/range/RangePickerButton.svelte +45 -40
  140. package/dist/ui/range/RangePickerButton.svelte.d.ts +21 -19
  141. package/dist/ui/table/Table.svelte +35 -28
  142. package/dist/ui/table/Table.svelte.d.ts +24 -19
  143. package/dist/ui/table/TableBody.svelte +18 -12
  144. package/dist/ui/table/TableBody.svelte.d.ts +20 -15
  145. package/dist/ui/table/TableCell.svelte +13 -10
  146. package/dist/ui/table/TableCell.svelte.d.ts +19 -14
  147. package/dist/ui/table/TableFieldsEdition.svelte +58 -52
  148. package/dist/ui/table/TableFieldsEdition.svelte.d.ts +20 -15
  149. package/dist/ui/table/TableHead.svelte +20 -21
  150. package/dist/ui/table/TableHead.svelte.d.ts +19 -14
  151. package/dist/ui/table/TableViewSelect.svelte +50 -37
  152. package/dist/ui/table/TableViewSelect.svelte.d.ts +27 -23
  153. package/dist/ui/table/cell/TableCellArray.svelte +5 -3
  154. package/dist/ui/table/cell/TableCellArray.svelte.d.ts +18 -14
  155. package/dist/ui/table/cell/TableCellBoolean.svelte +4 -3
  156. package/dist/ui/table/cell/TableCellBoolean.svelte.d.ts +18 -14
  157. package/dist/ui/table/cell/TableCellNumber.svelte +2 -1
  158. package/dist/ui/table/cell/TableCellNumber.svelte.d.ts +18 -14
  159. package/dist/ui/table/cell/TableCellString.svelte +5 -2
  160. package/dist/ui/table/cell/TableCellString.svelte.d.ts +19 -25
  161. package/dist/ui/table/field.d.ts +32 -40
  162. package/dist/ui/table/field.js +1 -1
  163. package/dist/ui/table/head/TableHeadBoolean.svelte +6 -3
  164. package/dist/ui/table/head/TableHeadBoolean.svelte.d.ts +18 -24
  165. package/dist/ui/table/head/TableHeadDate.svelte +61 -113
  166. package/dist/ui/table/head/TableHeadDate.svelte.d.ts +18 -24
  167. package/dist/ui/table/head/TableHeadDefault.svelte +5 -2
  168. package/dist/ui/table/head/TableHeadDefault.svelte.d.ts +18 -24
  169. package/dist/ui/table/head/TableHeadNumber.svelte +67 -76
  170. package/dist/ui/table/head/TableHeadNumber.svelte.d.ts +18 -24
  171. package/dist/ui/table/head/TableHeadSelect.svelte +47 -41
  172. package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +21 -27
  173. package/dist/ui/table/head/TableHeadString.svelte +14 -8
  174. package/dist/ui/table/head/TableHeadString.svelte.d.ts +18 -24
  175. package/dist/ui/tabs/Tabs.svelte +8 -5
  176. package/dist/ui/tabs/Tabs.svelte.d.ts +19 -15
  177. package/dist/ui/tabs/TabsIcon.svelte +31 -28
  178. package/dist/ui/tabs/TabsIcon.svelte.d.ts +21 -17
  179. package/dist/utils/eventEmitter.d.ts +4 -4
  180. package/dist/utils/tippy.d.ts +1 -1
  181. package/dist/validation/form.d.ts +0 -1
  182. package/dist/validation/zod.d.ts +96 -162
  183. package/dist/validation/zod.js +2 -4
  184. package/package.json +134 -138
  185. package/dist/ui/form/FormInput.svelte.d.ts +0 -152
  186. package/dist/ui/form/formInput.d.ts +0 -90
  187. package/dist/ui/slot/Slot.svelte +0 -35
  188. package/dist/ui/slot/Slot.svelte.d.ts +0 -22
  189. package/dist/ui/slot/Span.svelte +0 -4
  190. package/dist/ui/slot/Span.svelte.d.ts +0 -16
  191. package/dist/ui/slot/index.d.ts +0 -1
  192. package/dist/ui/slot/index.js +0 -1
  193. package/dist/ui/table/head/OrderButtons.svelte +0 -37
  194. package/dist/ui/table/head/OrderButtons.svelte.d.ts +0 -20
  195. package/dist/ui/table/head/index.d.ts +0 -19
package/README.md CHANGED
@@ -25,7 +25,7 @@ px prisma init --datasource-provider mysql
25
25
  mkdir -p ./src/lib/server
26
26
  source="https://raw.githubusercontent.com/peufo/fuma/main"
27
27
  curl "$source/prisma/schema.prisma" -o ./prisma/schema.prisma
28
- curl "$source/src/lib/server/prisma.ts" -o ./src/lib/server/prisma.ts
28
+ curl "$source/src/lib/private/prisma.ts" -o ./src/lib/server/prisma.ts
29
29
 
30
30
  echo "DATABASE_URL=\"mysql://$mysql_username@localhost:3306/$project_name\"" > .env
31
31
  cp .env .env.example
@@ -11,11 +11,11 @@ export declare function createDragHandler<Type = unknown>(listElement: HTMLDivEl
11
11
  dragMove: void;
12
12
  dragEnd: void;
13
13
  }[K]) => unknown) => () => void;
14
- off: <K_1 extends "dragStart" | "dragMove" | "dragEnd">(eventKey: K_1, callback: (arg: {
14
+ off: <K extends "dragStart" | "dragMove" | "dragEnd">(eventKey: K, callback: (arg: {
15
15
  dragStart: void;
16
16
  dragMove: void;
17
17
  dragEnd: void;
18
- }[K_1]) => unknown) => void;
18
+ }[K]) => unknown) => void;
19
19
  start(position: Position): void;
20
20
  move(position?: Position): void;
21
21
  end(): void;
@@ -1,6 +1,8 @@
1
+ import { mouseDragTrigger, touchDragTrigger, scrollTrigger } from './trigger.js';
1
2
  export declare const CLASSNAME_LIST = "editable-list";
2
3
  export declare const CLASSNAME_DRAG_ACTIVE = "drag-active";
3
4
  export declare const CLASSNAME_PLACEHOLDER = "item-placeholder";
5
+ export { mouseDragTrigger, touchDragTrigger, scrollTrigger };
4
6
  export interface ListEditableOptions<Type = unknown> {
5
7
  onDragStart?: () => void;
6
8
  onDragMove?: () => void;
@@ -3,6 +3,7 @@ import { mouseDragTrigger, touchDragTrigger, scrollTrigger } from './trigger.js'
3
3
  export const CLASSNAME_LIST = 'editable-list';
4
4
  export const CLASSNAME_DRAG_ACTIVE = 'drag-active';
5
5
  export const CLASSNAME_PLACEHOLDER = 'item-placeholder';
6
+ export { mouseDragTrigger, touchDragTrigger, scrollTrigger };
6
7
  export function listEditable(node, options = {}) {
7
8
  const { dragElementsSelector } = options;
8
9
  node.classList.add(CLASSNAME_LIST);
@@ -1,6 +1,11 @@
1
1
  import type { DragHandler } from './handlers.js';
2
+ type Handler = {
3
+ start: (event: MouseEvent) => unknown;
4
+ move: (event: MouseEvent) => unknown;
5
+ end: (event: MouseEvent) => unknown;
6
+ };
2
7
  /** Gestion du cycle de vie des évènements de la souris */
3
- export declare function mouseDragTrigger(element: HTMLElement, handler: DragHandler): {
8
+ export declare function mouseDragTrigger(element: HTMLElement, handler: Handler): {
4
9
  destroy(): void;
5
10
  };
6
11
  /** Gestion du cycle de vie des évènements de l'écran tactile */
@@ -10,3 +15,4 @@ export declare function touchDragTrigger(element: HTMLElement, handler: DragHand
10
15
  export declare function scrollTrigger(handler: DragHandler, scrollContainer: Element): {
11
16
  destroy(): void;
12
17
  };
18
+ export {};
@@ -6,9 +6,9 @@ export function mouseDragTrigger(element, handler) {
6
6
  document.addEventListener('mousemove', handler.move);
7
7
  document.addEventListener('mouseup', endHandler, { once: true });
8
8
  }
9
- function endHandler() {
9
+ function endHandler(event) {
10
10
  document.removeEventListener('mousemove', handler.move);
11
- handler.end();
11
+ handler.end(event);
12
12
  }
13
13
  function stopPropagation(event) {
14
14
  event.stopPropagation();
@@ -1,30 +1,35 @@
1
- <script>import {} from "svelte";
2
- import { slide } from "svelte/transition";
3
- import { mdiEyeOffOutline, mdiEyeOutline } from "@mdi/js";
4
- import { Card } from "../ui/card/index.js";
5
- import { Table } from "../ui/table/index.js";
6
- import { Icon } from "../ui/icon/index.js";
7
- export let name = "";
8
- export let description = "";
9
- export let component;
10
- let props = [];
11
- let isPropsVisible = false;
12
- $:
13
- initMeta(component);
14
- function initMeta(c) {
15
- if (!c)
16
- return;
17
- updateComponentMeta(c);
18
- component.$$.after_update.push(() => updateComponentMeta(c));
19
- }
20
- function updateComponentMeta(c) {
21
- const ctx = c.$$.ctx;
22
- const propsIndex = Object.entries(c.$$.props);
23
- props = propsIndex.map(([id, index]) => ({
24
- id,
25
- value: ctx[index]
26
- }));
27
- }
1
+ <script lang="ts">
2
+ import { type SvelteComponent } from 'svelte'
3
+ import { slide } from 'svelte/transition'
4
+ import { mdiEyeOffOutline, mdiEyeOutline } from '@mdi/js'
5
+ import { Card } from '../ui/card/index.js'
6
+ import { Table } from '../ui/table/index.js'
7
+ import { Icon } from '../ui/icon/index.js'
8
+
9
+ export let name = ''
10
+ export let description = ''
11
+ export let component: SvelteComponent
12
+
13
+ type Props = { id: string; value: string }[]
14
+ let props: Props = []
15
+ let isPropsVisible = false
16
+
17
+ $: initMeta(component)
18
+
19
+ function initMeta(c: SvelteComponent | undefined) {
20
+ if (!c) return
21
+ updateComponentMeta(c)
22
+ component.$$.after_update.push(() => updateComponentMeta(c))
23
+ }
24
+
25
+ function updateComponentMeta(c: SvelteComponent) {
26
+ const ctx = c.$$.ctx
27
+ const propsIndex = Object.entries<number>(c.$$.props)
28
+ props = propsIndex.map(([id, index]) => ({
29
+ id,
30
+ value: ctx[index] as string
31
+ }))
32
+ }
28
33
  </script>
29
34
 
30
35
  <Card class="mx-auto mb-6 max-w-4xl">
@@ -1,20 +1,32 @@
1
1
  import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- name?: string | undefined;
5
- description?: string | undefined;
6
- component: SvelteComponent;
2
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports & {
10
+ $set?: any;
11
+ $on?: any;
7
12
  };
8
- events: {
9
- [evt: string]: CustomEvent<any>;
10
- };
11
- slots: {
12
- default: {};
13
- };
14
- };
15
- export type MetaProps = typeof __propDef.props;
16
- export type MetaEvents = typeof __propDef.events;
17
- export type MetaSlots = typeof __propDef.slots;
18
- export default class Meta extends SvelteComponent<MetaProps, MetaEvents, MetaSlots> {
13
+ z_$$bindings?: Bindings;
19
14
  }
20
- export {};
15
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
16
+ default: any;
17
+ } ? Props extends Record<string, never> ? any : {
18
+ children?: any;
19
+ } : {});
20
+ declare const Meta: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
21
+ name?: string;
22
+ description?: string;
23
+ component: SvelteComponent;
24
+ }, {
25
+ default: {};
26
+ }>, {
27
+ [evt: string]: CustomEvent<any>;
28
+ }, {
29
+ default: {};
30
+ }, {}, string>;
31
+ type Meta = InstanceType<typeof Meta>;
32
+ export default Meta;
@@ -29,7 +29,7 @@ export declare const apiConfig: {
29
29
  };
30
30
  };
31
31
  };
32
- export declare const api: import("../api/config.js").ApiClient<Prisma.TypeMap<import("@prisma/client/runtime/library").DefaultArgs>, {
32
+ export declare const api: import("../api/config.js").ApiClient<Prisma.TypeMap<import("@prisma/client/runtime/library").DefaultArgs, {}>, {
33
33
  Tag: (search: string) => {
34
34
  where: {
35
35
  name: {
@@ -1,2 +1 @@
1
- /// <reference types="svelte" />
2
1
  export declare let drawerTransitionX: import("svelte/store").Writable<number>;
@@ -5,6 +5,6 @@ export type Issue = z.ZodIssue & {
5
5
  unionErrors?: z.ZodError[];
6
6
  };
7
7
  export declare function parseFormData<Shape extends z.ZodRawShape>(requestOrFormData: Request | FormData, shapes: Shape | Shape[], validation?: z.SuperRefinement<z.objectOutputType<Shape, z.ZodTypeAny>>): Promise<{
8
- data: { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<Shape>, { [k in keyof z.baseObjectOutputType<Shape>]: undefined extends z.baseObjectOutputType<Shape>[k] ? never : k; }[keyof Shape]>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<Shape>, { [k_2 in keyof z.baseObjectOutputType<Shape>]: undefined extends z.baseObjectOutputType<Shape>[k_2] ? never : k_2; }[keyof Shape]>[k_1]; };
8
+ data: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<Shape>, any> extends infer T ? { [k in keyof T]: T[k]; } : never;
9
9
  formData: FormData;
10
10
  }>;
@@ -1,2 +1,2 @@
1
1
  import type { ZodRawShape } from 'zod';
2
- export declare function parseQuery<Type extends ZodRawShape>(url: URL, shape: Type): { [k_1 in keyof import("zod").objectUtil.addQuestionMarks<import("zod").baseObjectOutputType<Type>, { [k in keyof import("zod").baseObjectOutputType<Type>]: undefined extends import("zod").baseObjectOutputType<Type>[k] ? never : k; }[keyof Type]>]: import("zod").objectUtil.addQuestionMarks<import("zod").baseObjectOutputType<Type>, { [k_2 in keyof import("zod").baseObjectOutputType<Type>]: undefined extends import("zod").baseObjectOutputType<Type>[k_2] ? never : k_2; }[keyof Type]>[k_1]; };
2
+ export declare function parseQuery<Type extends ZodRawShape>(url: URL, shape: Type): import("zod").objectUtil.addQuestionMarks<import("zod").baseObjectOutputType<Type>, any> extends infer T ? { [k in keyof T]: T[k]; } : never;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { EventEmitter } from 'node:events';
3
2
  export declare function createSSE(last_id?: number, retry?: number): {
4
3
  readable: ReadableStream<any>;
@@ -1,2 +1 @@
1
- /// <reference types="svelte" />
2
1
  export declare const isSmallScreen: import("svelte/store").Readable<boolean>;
@@ -1,5 +1,3 @@
1
- /// <reference types="svelte" />
2
- /// <reference types="@sveltejs/kit" />
3
1
  export declare const param: import("svelte/store").Readable<{
4
2
  with: (params: Record<string, string | number>, ...keysToRemove: string[]) => string;
5
3
  without: (...keys: string[]) => string;
@@ -1,2 +1 @@
1
- /// <reference types="svelte" />
2
1
  export declare function sessionStore<T>(key: string, value: T): import("svelte/store").Writable<T>;
@@ -1,6 +1,7 @@
1
- <script>let klass = "";
2
- export { klass as class };
3
- export let content;
1
+ <script lang="ts">
2
+ let klass = ''
3
+ export { klass as class }
4
+ export let content: string
4
5
  </script>
5
6
 
6
7
  <span class="badge mr-1 whitespace-nowrap {klass}">
@@ -1,17 +1,21 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- class?: string | undefined;
5
- content: string;
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
6
11
  };
7
- events: {
8
- [evt: string]: CustomEvent<any>;
9
- };
10
- slots: {};
11
- };
12
- export type BadgeProps = typeof __propDef.props;
13
- export type BadgeEvents = typeof __propDef.events;
14
- export type BadgeSlots = typeof __propDef.slots;
15
- export default class Badge extends SvelteComponent<BadgeProps, BadgeEvents, BadgeSlots> {
12
+ z_$$bindings?: Bindings;
16
13
  }
17
- export {};
14
+ declare const Badge: $$__sveltets_2_IsomorphicComponent<{
15
+ class?: string;
16
+ content: string;
17
+ }, {
18
+ [evt: string]: CustomEvent<any>;
19
+ }, {}, {}, string>;
20
+ type Badge = InstanceType<typeof Badge>;
21
+ export default Badge;
@@ -1,34 +1,37 @@
1
- <script>import { mdiClipboardTextOutline } from "@mdi/js";
2
- import { toast } from "svelte-sonner";
3
- import { Icon } from "../icon/index.js";
4
- import { createEventDispatcher } from "svelte";
5
- let valueOrGetValue;
6
- export { valueOrGetValue as value };
7
- export let title = "";
8
- export let label = "";
9
- export let icon = mdiClipboardTextOutline;
10
- export let successMessage = "Copied";
11
- let klass = "";
12
- export { klass as class };
13
- let isLoading = false;
14
- const disptach = createEventDispatcher();
15
- async function loadValue() {
16
- if (typeof valueOrGetValue === "string")
17
- return valueOrGetValue;
18
- return valueOrGetValue();
19
- }
20
- async function handleClick() {
21
- if (isLoading)
22
- return;
23
- isLoading = true;
24
- const value = await loadValue().finally(() => isLoading = false);
25
- navigator.clipboard.writeText(value).then(() => {
26
- toast.success(successMessage);
27
- disptach("success");
28
- }).catch((error) => {
29
- toast.error(error);
30
- });
31
- }
1
+ <script lang="ts">
2
+ import { mdiClipboardTextOutline } from '@mdi/js'
3
+ import { toast } from 'svelte-sonner'
4
+ import { Icon } from '../icon/index.js'
5
+ let valueOrGetValue: string | (() => Promise<string>)
6
+ export { valueOrGetValue as value }
7
+ export let title = ''
8
+ export let label = ''
9
+ export let icon = mdiClipboardTextOutline
10
+ export let successMessage = 'Copied'
11
+ let klass = ''
12
+ export { klass as class }
13
+
14
+ let isLoading = false
15
+
16
+ async function loadValue(): Promise<string> {
17
+ if (typeof valueOrGetValue === 'string') return valueOrGetValue
18
+ return valueOrGetValue()
19
+ }
20
+
21
+ async function handleClick() {
22
+ if (isLoading) return
23
+ isLoading = true
24
+ const value = await loadValue().finally(() => (isLoading = false))
25
+
26
+ navigator.clipboard
27
+ .writeText(value)
28
+ .then(() => {
29
+ toast.success(successMessage)
30
+ })
31
+ .catch((error) => {
32
+ toast.error(error)
33
+ })
34
+ }
32
35
  </script>
33
36
 
34
37
  <div class="relative">
@@ -36,7 +39,7 @@ async function handleClick() {
36
39
  <span class="loading loading-spinner absolute left-1 top-1 scale-125 opacity-25"></span>
37
40
  {/if}
38
41
  <button
39
- class={klass ? klass : `btn btn-sm ${label ? '' : ' btn-square'}`}
42
+ class="{klass} btn btn-sm {label ? '' : 'btn-square'}"
40
43
  on:click|preventDefault={handleClick}
41
44
  class:btn-disabled={isLoading}
42
45
  >
@@ -1,23 +1,25 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- value: string | (() => Promise<string>);
5
- title?: string | undefined;
6
- label?: string | undefined;
7
- icon?: string | undefined;
8
- successMessage?: string | undefined;
9
- class?: string | undefined;
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
10
11
  };
11
- events: {
12
- success: CustomEvent<void>;
13
- } & {
14
- [evt: string]: CustomEvent<any>;
15
- };
16
- slots: {};
17
- };
18
- export type ButtonCopyProps = typeof __propDef.props;
19
- export type ButtonCopyEvents = typeof __propDef.events;
20
- export type ButtonCopySlots = typeof __propDef.slots;
21
- export default class ButtonCopy extends SvelteComponent<ButtonCopyProps, ButtonCopyEvents, ButtonCopySlots> {
12
+ z_$$bindings?: Bindings;
22
13
  }
23
- export {};
14
+ declare const ButtonCopy: $$__sveltets_2_IsomorphicComponent<{
15
+ value: string | (() => Promise<string>);
16
+ title?: string;
17
+ label?: string;
18
+ icon?: string;
19
+ successMessage?: string;
20
+ class?: string;
21
+ }, {
22
+ [evt: string]: CustomEvent<any>;
23
+ }, {}, {}, string>;
24
+ type ButtonCopy = InstanceType<typeof ButtonCopy>;
25
+ export default ButtonCopy;
@@ -1,24 +1,26 @@
1
- <script>let klass = "";
2
- export { klass as class };
3
- export let formaction;
4
- export let disabled = false;
5
- export let btn = true;
6
- let button;
7
- let width = 0;
8
- let ready = false;
9
- let timeout;
10
- function handleClick(event) {
11
- if (ready)
12
- return;
13
- width = button.offsetWidth;
14
- event.preventDefault();
15
- ready = true;
16
- timeout = setTimeout(() => ready = false, 2e3);
17
- }
18
- function handleLeave() {
19
- ready = false;
20
- clearTimeout(timeout);
21
- }
1
+ <script lang="ts">
2
+ let klass = ''
3
+ export { klass as class }
4
+ export let formaction: string
5
+ export let disabled = false
6
+ export let btn = true
7
+
8
+ let button: HTMLButtonElement
9
+ let width = 0
10
+ let ready = false
11
+ let timeout: NodeJS.Timeout
12
+ function handleClick(event: MouseEvent) {
13
+ if (ready) return
14
+ width = button.offsetWidth
15
+ event.preventDefault()
16
+ ready = true
17
+ timeout = setTimeout(() => (ready = false), 2000)
18
+ }
19
+
20
+ function handleLeave() {
21
+ ready = false
22
+ clearTimeout(timeout)
23
+ }
22
24
  </script>
23
25
 
24
26
  <button
@@ -1,22 +1,34 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- class?: string | undefined;
5
- formaction: string;
6
- disabled?: boolean | undefined;
7
- btn?: boolean | undefined;
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
8
11
  };
9
- events: {
10
- [evt: string]: CustomEvent<any>;
11
- };
12
- slots: {
13
- ready: {};
14
- default: {};
15
- };
16
- };
17
- export type ButtonDeleteProps = typeof __propDef.props;
18
- export type ButtonDeleteEvents = typeof __propDef.events;
19
- export type ButtonDeleteSlots = typeof __propDef.slots;
20
- export default class ButtonDelete extends SvelteComponent<ButtonDeleteProps, ButtonDeleteEvents, ButtonDeleteSlots> {
12
+ z_$$bindings?: Bindings;
21
13
  }
22
- export {};
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const ButtonDelete: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ class?: string;
21
+ formaction: string;
22
+ disabled?: boolean;
23
+ btn?: boolean;
24
+ }, {
25
+ ready: {};
26
+ default: {};
27
+ }>, {
28
+ [evt: string]: CustomEvent<any>;
29
+ }, {
30
+ ready: {};
31
+ default: {};
32
+ }, {}, string>;
33
+ type ButtonDelete = InstanceType<typeof ButtonDelete>;
34
+ export default ButtonDelete;
@@ -1,13 +1,16 @@
1
- <script>import { mdiArrowLeft } from "@mdi/js";
2
- import { Icon } from "../icon/index.js";
3
- import { contextContainer } from "../context.js";
4
- let klass = "";
5
- export { klass as class };
6
- export let bodyClass = "";
7
- export let headerClass = "";
8
- export let returnUrl = "";
9
- export let style = "";
10
- contextContainer.set("card");
1
+ <script lang="ts">
2
+ import { mdiArrowLeft } from '@mdi/js'
3
+ import { Icon } from '../icon/index.js'
4
+ import { contextContainer } from '../context.js'
5
+
6
+ let klass = ''
7
+ export { klass as class }
8
+ export let bodyClass = ''
9
+ export let headerClass = ''
10
+ export let returnUrl = ''
11
+ export let style = ''
12
+
13
+ contextContainer.set('card')
11
14
  </script>
12
15
 
13
16
  <div class="card bordered border bg-base-100 shadow-lg {klass}" {style}>
@@ -1,26 +1,41 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- class?: string | undefined;
5
- bodyClass?: string | undefined;
6
- headerClass?: string | undefined;
7
- returnUrl?: string | undefined;
8
- style?: string | undefined;
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
9
11
  };
10
- events: {
11
- [evt: string]: CustomEvent<any>;
12
- };
13
- slots: {
14
- top: {};
15
- title: {};
16
- action: {};
17
- subtitle: {};
18
- default: {};
19
- };
20
- };
21
- export type CardProps = typeof __propDef.props;
22
- export type CardEvents = typeof __propDef.events;
23
- export type CardSlots = typeof __propDef.slots;
24
- export default class Card extends SvelteComponent<CardProps, CardEvents, CardSlots> {
12
+ z_$$bindings?: Bindings;
25
13
  }
26
- export {};
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const Card: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ class?: string;
21
+ bodyClass?: string;
22
+ headerClass?: string;
23
+ returnUrl?: string;
24
+ style?: string;
25
+ }, {
26
+ top: {};
27
+ title: {};
28
+ action: {};
29
+ subtitle: {};
30
+ default: {};
31
+ }>, {
32
+ [evt: string]: CustomEvent<any>;
33
+ }, {
34
+ top: {};
35
+ title: {};
36
+ action: {};
37
+ subtitle: {};
38
+ default: {};
39
+ }, {}, string>;
40
+ type Card = InstanceType<typeof Card>;
41
+ export default Card;
@@ -1,7 +1,8 @@
1
- <script>export let title = "";
2
- let klass = "";
3
- export { klass as class };
4
- export let style = "";
1
+ <script lang="ts">
2
+ export let title = ''
3
+ let klass = ''
4
+ export { klass as class }
5
+ export let style = ''
5
6
  </script>
6
7
 
7
8
  <div class="{klass} bg-base-100 border rounded-lg p-2 sm:p-5" {style}>