fuma 1.0.20 → 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.
- package/README.md +1 -1
- package/dist/action/list/handlers.d.ts +2 -2
- package/dist/action/list/index.d.ts +2 -0
- package/dist/action/list/index.js +1 -0
- package/dist/action/list/trigger.d.ts +7 -1
- package/dist/action/list/trigger.js +2 -2
- package/dist/private/Meta.svelte +32 -27
- package/dist/private/Meta.svelte.d.ts +29 -17
- package/dist/private/api.d.ts +1 -1
- package/dist/private/store.d.ts +0 -1
- package/dist/server/parseFormData.d.ts +1 -1
- package/dist/server/parseQuery.d.ts +1 -1
- package/dist/server/sse.d.ts +0 -1
- package/dist/store/isSmallScreen.d.ts +0 -1
- package/dist/store/param.d.ts +0 -2
- package/dist/store/session.d.ts +0 -1
- package/dist/ui/badge/Badge.svelte +4 -3
- package/dist/ui/badge/Badge.svelte.d.ts +19 -15
- package/dist/ui/button/ButtonCopy.svelte +35 -32
- package/dist/ui/button/ButtonCopy.svelte.d.ts +23 -21
- package/dist/ui/button/ButtonDelete.svelte +23 -21
- package/dist/ui/button/ButtonDelete.svelte.d.ts +32 -20
- package/dist/ui/card/Card.svelte +13 -10
- package/dist/ui/card/Card.svelte.d.ts +39 -24
- package/dist/ui/card/CardBasic.svelte +5 -4
- package/dist/ui/card/CardBasic.svelte.d.ts +29 -18
- package/dist/ui/card/CardCollapse.svelte +35 -31
- package/dist/ui/card/CardCollapse.svelte.d.ts +37 -23
- package/dist/ui/card/CardFullScreen.svelte +8 -6
- package/dist/ui/card/CardFullScreen.svelte.d.ts +35 -20
- package/dist/ui/card/CardLink.svelte +5 -4
- package/dist/ui/card/CardLink.svelte.d.ts +29 -18
- package/dist/ui/dialog/Dialog.svelte +41 -34
- package/dist/ui/dialog/Dialog.svelte.d.ts +36 -23
- package/dist/ui/dialog/DialogConfirm.svelte +6 -4
- package/dist/ui/dialog/DialogConfirm.svelte.d.ts +33 -19
- package/dist/ui/drawer/Drawer.svelte +47 -38
- package/dist/ui/drawer/Drawer.svelte.d.ts +81 -46
- package/dist/ui/drawer/drawerFly.d.ts +0 -1
- package/dist/ui/drawer/layers.d.ts +0 -1
- package/dist/ui/form/Form.svelte +106 -87
- package/dist/ui/form/Form.svelte.d.ts +29 -16
- package/dist/ui/form/FormInput.svelte +12 -6
- package/dist/ui/form/FormSection.svelte +24 -17
- package/dist/ui/form/FormSection.svelte.d.ts +37 -25
- package/dist/ui/icon/Icon.svelte +35 -32
- package/dist/ui/icon/Icon.svelte.d.ts +25 -21
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/input/FormControl.svelte +48 -36
- package/dist/ui/input/FormControl.svelte.d.ts +32 -30
- package/dist/ui/input/InputBoolean.svelte +29 -22
- package/dist/ui/input/InputBoolean.svelte.d.ts +43 -35
- package/dist/ui/input/InputCheckboxs.svelte +37 -34
- package/dist/ui/input/InputCheckboxs.svelte.d.ts +54 -39
- package/dist/ui/input/InputCheckboxsMenu.svelte +64 -47
- package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +56 -41
- package/dist/ui/input/InputCheckboxsTree.svelte +9 -6
- package/dist/ui/input/InputCheckboxsTree.svelte.d.ts +22 -18
- package/dist/ui/input/InputCheckboxsTreeNodes.svelte +36 -28
- package/dist/ui/input/InputCheckboxsTreeNodes.svelte.d.ts +20 -16
- package/dist/ui/input/InputCombo.svelte +76 -65
- package/dist/ui/input/InputCombo.svelte.d.ts +55 -39
- package/dist/ui/input/InputDate.svelte +36 -29
- package/dist/ui/input/InputDate.svelte.d.ts +20 -16
- package/dist/ui/input/InputDateTime.svelte +37 -30
- package/dist/ui/input/InputDateTime.svelte.d.ts +20 -16
- package/dist/ui/input/InputImage.svelte +52 -45
- package/dist/ui/input/InputImage.svelte.d.ts +40 -27
- package/dist/ui/input/InputImagePreview.svelte +24 -20
- package/dist/ui/input/InputImagePreview.svelte.d.ts +25 -21
- package/dist/ui/input/InputNumber.svelte +28 -22
- package/dist/ui/input/InputNumber.svelte.d.ts +20 -20
- package/dist/ui/input/InputOptionInParam.svelte +12 -10
- package/dist/ui/input/InputOptionInParam.svelte.d.ts +21 -17
- package/dist/ui/input/InputOptions.svelte +40 -34
- package/dist/ui/input/InputOptions.svelte.d.ts +19 -15
- package/dist/ui/input/InputPassword.svelte +22 -18
- package/dist/ui/input/InputPassword.svelte.d.ts +43 -35
- package/dist/ui/input/InputRadio.svelte +51 -46
- package/dist/ui/input/InputRadio.svelte.d.ts +53 -38
- package/dist/ui/input/InputRelation.svelte +129 -112
- package/dist/ui/input/InputRelation.svelte.d.ts +39 -53
- package/dist/ui/input/InputRelations.svelte +96 -90
- package/dist/ui/input/InputRelations.svelte.d.ts +35 -37
- package/dist/ui/input/InputSearch.svelte +14 -11
- package/dist/ui/input/InputSearch.svelte.d.ts +25 -21
- package/dist/ui/input/InputSelect.svelte +59 -46
- package/dist/ui/input/InputSelect.svelte.d.ts +23 -19
- package/dist/ui/input/InputText.svelte +29 -28
- package/dist/ui/input/InputText.svelte.d.ts +41 -28
- package/dist/ui/input/InputTextarea.svelte +20 -19
- package/dist/ui/input/InputTextarea.svelte.d.ts +20 -20
- package/dist/ui/input/InputTime.svelte +43 -36
- package/dist/ui/input/InputTime.svelte.d.ts +21 -36
- package/dist/ui/input/RelationAfter.svelte +13 -9
- package/dist/ui/input/RelationAfter.svelte.d.ts +24 -20
- package/dist/ui/input/SelectorList.svelte +16 -12
- package/dist/ui/input/SelectorList.svelte.d.ts +29 -20
- package/dist/ui/input/textRich/InputTextRich.svelte +63 -59
- package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +36 -38
- package/dist/ui/input/textRich/SuggesionList.svelte +13 -9
- package/dist/ui/input/textRich/SuggesionList.svelte.d.ts +19 -15
- package/dist/ui/input/textRich/ToolMark.svelte +12 -9
- package/dist/ui/input/textRich/ToolMark.svelte.d.ts +22 -18
- package/dist/ui/input/textRich/ToolMarkColor.svelte +16 -12
- package/dist/ui/input/textRich/ToolMarkColor.svelte.d.ts +21 -17
- package/dist/ui/input/textRich/ToolMarkLink.svelte +46 -38
- package/dist/ui/input/textRich/ToolMarkLink.svelte.d.ts +18 -14
- package/dist/ui/input/textRich/ToolMenu.svelte +34 -19
- package/dist/ui/input/textRich/ToolMenu.svelte.d.ts +30 -26
- package/dist/ui/input/textRich/ToolMenuAlign.svelte +13 -9
- package/dist/ui/input/textRich/ToolMenuAlign.svelte.d.ts +18 -14
- package/dist/ui/input/textRich/ToolMenuInsert.svelte +12 -7
- package/dist/ui/input/textRich/ToolMenuInsert.svelte.d.ts +20 -16
- package/dist/ui/input/textRich/ToolMenuNode.svelte +14 -10
- package/dist/ui/input/textRich/ToolMenuNode.svelte.d.ts +18 -14
- package/dist/ui/input/textRich/ToolsBar.svelte +21 -14
- package/dist/ui/input/textRich/ToolsBar.svelte.d.ts +19 -17
- package/dist/ui/input/textRich/suggestion.d.ts +0 -1
- package/dist/ui/login/Login.svelte +37 -31
- package/dist/ui/login/Login.svelte.d.ts +18 -14
- package/dist/ui/menu/ContextMenu.svelte +37 -31
- package/dist/ui/menu/ContextMenu.svelte.d.ts +38 -25
- package/dist/ui/menu/DropDown.svelte +92 -83
- package/dist/ui/menu/DropDown.svelte.d.ts +46 -33
- package/dist/ui/menu/DropDownMenu.svelte +25 -18
- package/dist/ui/menu/DropDownMenu.svelte.d.ts +30 -19
- package/dist/ui/mode/ToggleMode.svelte +28 -16
- package/dist/ui/mode/ToggleMode.svelte.d.ts +34 -17
- package/dist/ui/pagination/Pagination.svelte +9 -8
- package/dist/ui/pagination/Pagination.svelte.d.ts +18 -14
- package/dist/ui/placeholder/Placeholder.svelte +4 -3
- package/dist/ui/placeholder/Placeholder.svelte.d.ts +28 -17
- package/dist/ui/placeholder/PlaceholderImage.svelte +6 -4
- package/dist/ui/placeholder/PlaceholderImage.svelte.d.ts +28 -17
- package/dist/ui/range/RangePicker.svelte +76 -63
- package/dist/ui/range/RangePicker.svelte.d.ts +29 -24
- package/dist/ui/range/RangePickerButton.svelte +43 -35
- package/dist/ui/range/RangePickerButton.svelte.d.ts +21 -17
- package/dist/ui/table/Table.svelte +35 -28
- package/dist/ui/table/Table.svelte.d.ts +24 -19
- package/dist/ui/table/TableBody.svelte +18 -12
- package/dist/ui/table/TableBody.svelte.d.ts +20 -15
- package/dist/ui/table/TableCell.svelte +13 -10
- package/dist/ui/table/TableCell.svelte.d.ts +19 -14
- package/dist/ui/table/TableFieldsEdition.svelte +58 -52
- package/dist/ui/table/TableFieldsEdition.svelte.d.ts +20 -15
- package/dist/ui/table/TableHead.svelte +20 -21
- package/dist/ui/table/TableHead.svelte.d.ts +19 -14
- package/dist/ui/table/TableViewSelect.svelte +50 -37
- package/dist/ui/table/TableViewSelect.svelte.d.ts +27 -23
- package/dist/ui/table/cell/TableCellArray.svelte +5 -3
- package/dist/ui/table/cell/TableCellArray.svelte.d.ts +18 -14
- package/dist/ui/table/cell/TableCellBoolean.svelte +4 -3
- package/dist/ui/table/cell/TableCellBoolean.svelte.d.ts +18 -14
- package/dist/ui/table/cell/TableCellNumber.svelte +2 -1
- package/dist/ui/table/cell/TableCellNumber.svelte.d.ts +18 -14
- package/dist/ui/table/cell/TableCellString.svelte +5 -2
- package/dist/ui/table/cell/TableCellString.svelte.d.ts +19 -25
- package/dist/ui/table/field.d.ts +32 -40
- package/dist/ui/table/field.js +1 -1
- package/dist/ui/table/head/TableHeadBoolean.svelte +6 -3
- package/dist/ui/table/head/TableHeadBoolean.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadDate.svelte +61 -113
- package/dist/ui/table/head/TableHeadDate.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadDefault.svelte +5 -2
- package/dist/ui/table/head/TableHeadDefault.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadNumber.svelte +67 -76
- package/dist/ui/table/head/TableHeadNumber.svelte.d.ts +18 -24
- package/dist/ui/table/head/TableHeadSelect.svelte +47 -41
- package/dist/ui/table/head/TableHeadSelect.svelte.d.ts +21 -27
- package/dist/ui/table/head/TableHeadString.svelte +14 -8
- package/dist/ui/table/head/TableHeadString.svelte.d.ts +18 -24
- package/dist/ui/tabs/Tabs.svelte +8 -5
- package/dist/ui/tabs/Tabs.svelte.d.ts +19 -15
- package/dist/ui/tabs/TabsIcon.svelte +31 -28
- package/dist/ui/tabs/TabsIcon.svelte.d.ts +21 -17
- package/dist/utils/eventEmitter.d.ts +4 -4
- package/dist/utils/tippy.d.ts +1 -1
- package/dist/validation/form.d.ts +0 -1
- package/dist/validation/zod.d.ts +96 -162
- package/dist/validation/zod.js +2 -4
- package/package.json +134 -138
- package/dist/ui/form/FormInput.svelte.d.ts +0 -152
- package/dist/ui/form/formInput.d.ts +0 -90
- package/dist/ui/slot/Slot.svelte +0 -35
- package/dist/ui/slot/Slot.svelte.d.ts +0 -22
- package/dist/ui/slot/Span.svelte +0 -4
- package/dist/ui/slot/Span.svelte.d.ts +0 -16
- package/dist/ui/slot/index.d.ts +0 -1
- package/dist/ui/slot/index.js +0 -1
- package/dist/ui/table/head/OrderButtons.svelte +0 -37
- package/dist/ui/table/head/OrderButtons.svelte.d.ts +0 -20
- 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/
|
|
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: <
|
|
14
|
+
off: <K extends "dragStart" | "dragMove" | "dragEnd">(eventKey: K, callback: (arg: {
|
|
15
15
|
dragStart: void;
|
|
16
16
|
dragMove: void;
|
|
17
17
|
dragEnd: void;
|
|
18
|
-
}[
|
|
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:
|
|
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();
|
package/dist/private/Meta.svelte
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export let
|
|
10
|
-
let
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/dist/private/api.d.ts
CHANGED
|
@@ -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: {
|
package/dist/private/store.d.ts
CHANGED
|
@@ -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:
|
|
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):
|
|
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;
|
package/dist/server/sse.d.ts
CHANGED
package/dist/store/param.d.ts
CHANGED
package/dist/store/session.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 =
|
|
11
|
-
let klass =
|
|
12
|
-
export { klass as class }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export let
|
|
5
|
-
export let
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/dist/ui/card/Card.svelte
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export let
|
|
9
|
-
export let
|
|
10
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
let
|
|
3
|
-
|
|
4
|
-
export
|
|
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}>
|