fuma 1.0.11 → 1.0.12
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/index.d.ts +0 -2
- package/dist/action/list/index.js +0 -1
- package/dist/action/list/trigger.d.ts +1 -7
- package/dist/action/list/trigger.js +2 -2
- package/dist/ui/button/ButtonCopy.svelte +1 -1
- package/dist/ui/drawer/Drawer.svelte +1 -1
- package/dist/ui/form/Form.svelte +5 -6
- package/dist/ui/form/Form.svelte.d.ts +0 -1
- package/dist/ui/form/FormInput.svelte.d.ts +8 -14
- package/dist/ui/form/FormSection.svelte +1 -1
- package/dist/ui/form/formInput.d.ts +4 -7
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/input/FormControl.svelte +8 -14
- package/dist/ui/input/FormControl.svelte.d.ts +10 -5
- package/dist/ui/input/InputBoolean.svelte +14 -16
- package/dist/ui/input/InputBoolean.svelte.d.ts +1 -2
- package/dist/ui/input/InputCheckboxs.svelte +14 -15
- package/dist/ui/input/InputCheckboxs.svelte.d.ts +1 -2
- package/dist/ui/input/InputCheckboxsMenu.svelte +12 -13
- package/dist/ui/input/InputCheckboxsMenu.svelte.d.ts +1 -2
- package/dist/ui/input/InputCheckboxsTreeNodes.svelte +1 -1
- package/dist/ui/input/InputCombo.svelte +31 -33
- package/dist/ui/input/InputCombo.svelte.d.ts +1 -2
- package/dist/ui/input/InputDate.svelte +12 -14
- package/dist/ui/input/InputDateTime.svelte +12 -14
- package/dist/ui/input/InputNumber.svelte +17 -18
- package/dist/ui/input/InputNumber.svelte.d.ts +5 -1
- package/dist/ui/input/InputPassword.svelte +13 -15
- package/dist/ui/input/InputPassword.svelte.d.ts +1 -2
- package/dist/ui/input/InputRadio.svelte +14 -15
- package/dist/ui/input/InputRadio.svelte.d.ts +1 -2
- package/dist/ui/input/InputRelation.svelte +51 -52
- package/dist/ui/input/InputRelation.svelte.d.ts +18 -12
- package/dist/ui/input/InputRelations.svelte +18 -11
- package/dist/ui/input/InputRelations.svelte.d.ts +18 -11
- package/dist/ui/input/InputSearch.svelte +1 -1
- package/dist/ui/input/InputSelect.svelte +18 -20
- package/dist/ui/input/InputText.svelte +21 -21
- package/dist/ui/input/InputText.svelte.d.ts +3 -0
- package/dist/ui/input/InputTextarea.svelte +13 -14
- package/dist/ui/input/InputTextarea.svelte.d.ts +5 -1
- package/dist/ui/input/InputTime.svelte +12 -14
- package/dist/ui/input/SelectorList.svelte +1 -1
- package/dist/ui/input/SelectorList.svelte.d.ts +5 -5
- package/dist/ui/input/textRich/InputTextRich.svelte +9 -11
- package/dist/ui/input/textRich/InputTextRich.svelte.d.ts +1 -2
- package/dist/ui/input/textRich/ToolMarkColor.svelte +1 -1
- package/dist/ui/input/textRich/ToolsBar.svelte +2 -2
- package/dist/ui/login/Login.svelte +1 -1
- package/dist/ui/mode/ToggleMode.svelte +3 -14
- package/dist/ui/mode/ToggleMode.svelte.d.ts +0 -2
- package/dist/ui/range/RangePicker.svelte +1 -1
- package/dist/ui/slot/Slot.svelte +52 -0
- package/dist/ui/slot/Slot.svelte.d.ts +22 -0
- package/dist/ui/slot/Span.svelte +5 -0
- package/dist/ui/slot/Span.svelte.d.ts +16 -0
- package/dist/ui/slot/index.d.ts +1 -0
- package/dist/ui/slot/index.js +1 -0
- package/package.json +34 -34
|
@@ -29,18 +29,16 @@
|
|
|
29
29
|
}
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
|
-
<FormControl {...$$restProps}>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/>
|
|
45
|
-
{/snippet}
|
|
32
|
+
<FormControl {...$$restProps} let:key>
|
|
33
|
+
<input
|
|
34
|
+
value={value && dayjs(value).format('HH:mm')}
|
|
35
|
+
on:input={onInput}
|
|
36
|
+
on:focus
|
|
37
|
+
on:blur
|
|
38
|
+
type="time"
|
|
39
|
+
name={key}
|
|
40
|
+
id={key}
|
|
41
|
+
class="input input-bordered {inputClass}"
|
|
42
|
+
{...inputProps}
|
|
43
|
+
/>
|
|
46
44
|
</FormControl>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare class __sveltets_Render<Item extends {
|
|
3
|
-
id: string
|
|
3
|
+
id: string;
|
|
4
4
|
}> {
|
|
5
5
|
props(): {
|
|
6
6
|
class?: string | undefined;
|
|
@@ -29,16 +29,16 @@ declare class __sveltets_Render<Item extends {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
export type SelectorListProps<Item extends {
|
|
32
|
-
id: string
|
|
32
|
+
id: string;
|
|
33
33
|
}> = ReturnType<__sveltets_Render<Item>['props']>;
|
|
34
34
|
export type SelectorListEvents<Item extends {
|
|
35
|
-
id: string
|
|
35
|
+
id: string;
|
|
36
36
|
}> = ReturnType<__sveltets_Render<Item>['events']>;
|
|
37
37
|
export type SelectorListSlots<Item extends {
|
|
38
|
-
id: string
|
|
38
|
+
id: string;
|
|
39
39
|
}> = ReturnType<__sveltets_Render<Item>['slots']>;
|
|
40
40
|
export default class SelectorList<Item extends {
|
|
41
|
-
id: string
|
|
41
|
+
id: string;
|
|
42
42
|
}> extends SvelteComponent<SelectorListProps<Item>, SelectorListEvents<Item>, SelectorListSlots<Item>> {
|
|
43
43
|
}
|
|
44
44
|
export {};
|
|
@@ -52,16 +52,14 @@
|
|
|
52
52
|
}, 120)
|
|
53
53
|
</script>
|
|
54
54
|
|
|
55
|
-
<FormControl {...$$restProps}>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
<ToolsBar {editor} class={classToolbar} />
|
|
60
|
-
{/if}
|
|
61
|
-
<div bind:this={element} class="min-h-[20rem] p-4 pb-10"></div>
|
|
62
|
-
</div>
|
|
63
|
-
{#if key}
|
|
64
|
-
<input type="hidden" name={key} {value} />
|
|
55
|
+
<FormControl {...$$restProps} let:key>
|
|
56
|
+
<div class="bordered relative rounded-lg border">
|
|
57
|
+
{#if editor}
|
|
58
|
+
<ToolsBar {editor} class={classToolbar} />
|
|
65
59
|
{/if}
|
|
66
|
-
|
|
60
|
+
<div bind:this={element} class="min-h-[20rem] p-4 pb-10" />
|
|
61
|
+
</div>
|
|
62
|
+
{#if key}
|
|
63
|
+
<input type="hidden" name={key} {value} />
|
|
64
|
+
{/if}
|
|
67
65
|
</FormControl>
|
|
@@ -4,8 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
class?: string | undefined;
|
|
5
5
|
classLabel?: string | undefined;
|
|
6
6
|
key?: string | undefined;
|
|
7
|
-
label?: string | import("svelte").
|
|
8
|
-
labelAppend?: import("svelte").Snippet<[]> | null | undefined;
|
|
7
|
+
label?: string | import("svelte").ComponentType | import("../../..").ComponentAndProps | undefined;
|
|
9
8
|
error?: string | undefined;
|
|
10
9
|
hint?: string | undefined;
|
|
11
10
|
prefix?: string | number | undefined;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<div class="flex overflow-x-auto p-2">
|
|
25
25
|
<ToolMenuNode {editor} />
|
|
26
26
|
<ToolMenuAlign {editor} />
|
|
27
|
-
<div class="mx-1 my-auto h-6 border border-y-0 border-l-0"
|
|
27
|
+
<div class="mx-1 my-auto h-6 border border-y-0 border-l-0" />
|
|
28
28
|
|
|
29
29
|
<ToolMark
|
|
30
30
|
{editor}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
setColor={(color) => editor.commands.setHighlight({ color })}
|
|
55
55
|
/>
|
|
56
56
|
|
|
57
|
-
<div class="mx-1 my-auto h-6 border border-y-0 border-l-0"
|
|
57
|
+
<div class="mx-1 my-auto h-6 border border-y-0 border-l-0" />
|
|
58
58
|
|
|
59
59
|
<ToolMenuInsert
|
|
60
60
|
{editor}
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<button class="btn" formaction="/auth?/{state}">
|
|
89
89
|
{state === 'login' ? 'Connexion' : 'Valider'}
|
|
90
90
|
</button>
|
|
91
|
-
<div class="grow"
|
|
91
|
+
<div class="grow" />
|
|
92
92
|
|
|
93
93
|
<button class="link-hover link" formaction="/auth?/reset_password">
|
|
94
94
|
Mot de passe oublié
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { browser } from '$app/environment'
|
|
3
3
|
import { ModeWatcher, toggleMode, mode } from 'mode-watcher'
|
|
4
|
-
import { mdiWeatherNight, mdiWhiteBalanceSunny } from '@mdi/js'
|
|
5
4
|
|
|
6
5
|
import { Icon } from '../icon/index.js'
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
let klass = ''
|
|
10
|
-
export { klass as class }
|
|
11
|
-
export let defaultMode: 'dark' | 'light' | 'system' | undefined = undefined
|
|
12
|
-
|
|
13
|
-
onMount(() => {
|
|
14
|
-
const [html] = document.getElementsByTagName('html')
|
|
15
|
-
if (!html || !$mode) return
|
|
16
|
-
html.setAttribute('data-theme', $mode)
|
|
17
|
-
})
|
|
6
|
+
import { mdiWeatherNight, mdiWhiteBalanceSunny } from '@mdi/js'
|
|
18
7
|
|
|
19
8
|
mode.subscribe((_mode) => {
|
|
20
9
|
if (!browser) return
|
|
@@ -26,10 +15,10 @@
|
|
|
26
15
|
$: path = $mode === 'light' ? mdiWhiteBalanceSunny : mdiWeatherNight
|
|
27
16
|
</script>
|
|
28
17
|
|
|
29
|
-
<ModeWatcher
|
|
18
|
+
<ModeWatcher />
|
|
30
19
|
|
|
31
20
|
<slot {toggleMode} {path}>
|
|
32
|
-
<button class="btn btn-square btn-sm
|
|
21
|
+
<button class="btn btn-square btn-sm" on:click={toggleMode}>
|
|
33
22
|
<Icon {path} />
|
|
34
23
|
</button>
|
|
35
24
|
</slot>
|
|
@@ -2,8 +2,6 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import { toggleMode } from 'mode-watcher';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
class?: string | undefined;
|
|
6
|
-
defaultMode?: 'dark' | 'light' | 'system' | undefined;
|
|
7
5
|
children?: import("svelte").Snippet<[{
|
|
8
6
|
toggleMode: typeof toggleMode;
|
|
9
7
|
path: string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts" context="module">
|
|
2
|
+
type _Slot =
|
|
3
|
+
| ((...args: any) => ComponentAndProps | ComponentType | string)
|
|
4
|
+
| ComponentAndProps
|
|
5
|
+
| ComponentType
|
|
6
|
+
| string
|
|
7
|
+
//
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" generics="Slot extends _Slot">
|
|
11
|
+
import { type ComponentType } from 'svelte'
|
|
12
|
+
|
|
13
|
+
import { component, type ComponentAndProps } from '../../utils/component.js'
|
|
14
|
+
import Span from './Span.svelte'
|
|
15
|
+
|
|
16
|
+
type Args = Slot extends (...args: any) => any ? Parameters<Slot>[0] : undefined
|
|
17
|
+
|
|
18
|
+
type $$Props = {
|
|
19
|
+
slot?: Slot | null
|
|
20
|
+
args?: Args | null
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export let slot: Slot | undefined | null = undefined
|
|
24
|
+
export let args: Args | undefined | null = undefined
|
|
25
|
+
|
|
26
|
+
function getComponentAndProps(_slot: Slot): ComponentAndProps | null {
|
|
27
|
+
if (typeof _slot === 'function') {
|
|
28
|
+
if (isComponentType(_slot)) return { component: _slot, props: {} }
|
|
29
|
+
if (!args) {
|
|
30
|
+
console.error('args prop is required with slot as function')
|
|
31
|
+
return null
|
|
32
|
+
}
|
|
33
|
+
const result = _slot(args) as Slot
|
|
34
|
+
return getComponentAndProps(result)
|
|
35
|
+
}
|
|
36
|
+
if (typeof _slot === 'object') return _slot
|
|
37
|
+
return component(Span, { content: _slot })
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function isComponentType(fun: Function): fun is ComponentType {
|
|
41
|
+
return !!fun.prototype?.constructor?.name
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
{#if slot}
|
|
46
|
+
{@const s = getComponentAndProps(slot)}
|
|
47
|
+
{#if s !== null}
|
|
48
|
+
<svelte:component this={s.component} {...s.props} />
|
|
49
|
+
{/if}
|
|
50
|
+
{:else}
|
|
51
|
+
<slot />
|
|
52
|
+
{/if}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
type _Slot = ((...args: any) => ComponentAndProps | ComponentType | string) | ComponentAndProps | ComponentType | string;
|
|
3
|
+
import { type ComponentType } from 'svelte';
|
|
4
|
+
import { type ComponentAndProps } from '../../utils/component.js';
|
|
5
|
+
declare class __sveltets_Render<Slot extends _Slot> {
|
|
6
|
+
props(): {
|
|
7
|
+
slot?: Slot | null | undefined;
|
|
8
|
+
args?: (Slot extends (...args: any) => any ? Parameters<Slot>[0] : undefined) | null | undefined;
|
|
9
|
+
};
|
|
10
|
+
events(): {} & {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots(): {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type SlotProps<Slot extends _Slot> = ReturnType<__sveltets_Render<Slot>['props']>;
|
|
18
|
+
export type SlotEvents<Slot extends _Slot> = ReturnType<__sveltets_Render<Slot>['events']>;
|
|
19
|
+
export type SlotSlots<Slot extends _Slot> = ReturnType<__sveltets_Render<Slot>['slots']>;
|
|
20
|
+
export default class Slot<Slot extends _Slot> extends SvelteComponent<SlotProps<Slot>, SlotEvents<Slot>, SlotSlots<Slot>> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
content: string;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
};
|
|
11
|
+
export type SpanProps = typeof __propDef.props;
|
|
12
|
+
export type SpanEvents = typeof __propDef.events;
|
|
13
|
+
export type SpanSlots = typeof __propDef.slots;
|
|
14
|
+
export default class Span extends SvelteComponent<SpanProps, SpanEvents, SpanSlots> {
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Slot } from './Slot.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Slot } from './Slot.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fuma",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "My fullstack material build with sveltekit, daisyui, zod, prisma, lucia",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jonas Voisard",
|
|
@@ -70,43 +70,44 @@
|
|
|
70
70
|
"!dist/**/*.spec.*"
|
|
71
71
|
],
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@sveltejs/kit": "^2.5.6"
|
|
73
|
+
"@sveltejs/kit": "^2.5.6",
|
|
74
|
+
"svelte": "^4.0.0"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
|
-
"@sveltejs/adapter-auto": "^3.
|
|
77
|
-
"@sveltejs/kit": "^2.
|
|
77
|
+
"@sveltejs/adapter-auto": "^3.0.0",
|
|
78
|
+
"@sveltejs/kit": "^2.5.7",
|
|
78
79
|
"@sveltejs/package": "^2.3.1",
|
|
80
|
+
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
|
79
81
|
"@tailwindcss/typography": "^0.5.13",
|
|
80
82
|
"@types/debounce": "^1.2.4",
|
|
81
|
-
"@types/eslint": "^8.56.
|
|
83
|
+
"@types/eslint": "^8.56.0",
|
|
82
84
|
"@types/node": "^20.12.7",
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
84
|
-
"@typescript-eslint/parser": "^7.
|
|
85
|
-
"autoprefixer": "^10.4.
|
|
86
|
-
"daisyui": "
|
|
87
|
-
"eslint": "^8.
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
86
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
87
|
+
"autoprefixer": "^10.4.16",
|
|
88
|
+
"daisyui": "^4.10.2",
|
|
89
|
+
"eslint": "^8.56.0",
|
|
88
90
|
"eslint-config-prettier": "^9.1.0",
|
|
89
|
-
"eslint-plugin-svelte": "^2.
|
|
90
|
-
"postcss": "^8.4.
|
|
91
|
-
"postcss-load-config": "^5.0.
|
|
92
|
-
"prettier": "^3.
|
|
93
|
-
"prettier-plugin-svelte": "^3.2
|
|
94
|
-
"prettier-plugin-tailwindcss": "^0.5.
|
|
95
|
-
"prisma": "^5.
|
|
96
|
-
"publint": "^0.1.
|
|
97
|
-
"svelte
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
91
|
+
"eslint-plugin-svelte": "^2.35.1",
|
|
92
|
+
"postcss": "^8.4.32",
|
|
93
|
+
"postcss-load-config": "^5.0.2",
|
|
94
|
+
"prettier": "^3.1.1",
|
|
95
|
+
"prettier-plugin-svelte": "^3.1.2",
|
|
96
|
+
"prettier-plugin-tailwindcss": "^0.5.9",
|
|
97
|
+
"prisma": "^5.13.0",
|
|
98
|
+
"publint": "^0.1.9",
|
|
99
|
+
"svelte": "^4.2.15",
|
|
100
|
+
"svelte-check": "^3.6.0",
|
|
101
|
+
"tailwindcss": "^3.3.6",
|
|
102
|
+
"tslib": "^2.4.1",
|
|
103
|
+
"typescript": "^5.0.0",
|
|
104
|
+
"vite": "^5.2.11",
|
|
105
|
+
"vitest": "^1.2.0"
|
|
103
106
|
},
|
|
104
107
|
"dependencies": {
|
|
105
108
|
"@lucia-auth/adapter-prisma": "^4.0.1",
|
|
106
109
|
"@mdi/js": "^7.4.47",
|
|
107
|
-
"@prisma/client": "5.
|
|
108
|
-
"@sveltejs/vite-plugin-svelte": "5.0.1",
|
|
109
|
-
"@tailwindcss/vite": "^4.0.1",
|
|
110
|
+
"@prisma/client": "5.13.0",
|
|
110
111
|
"@tiptap/core": "^2.3.0",
|
|
111
112
|
"@tiptap/extension-color": "^2.3.0",
|
|
112
113
|
"@tiptap/extension-highlight": "^2.3.0",
|
|
@@ -124,16 +125,15 @@
|
|
|
124
125
|
"axios": "^1.6.8",
|
|
125
126
|
"dayjs": "^1.11.10",
|
|
126
127
|
"debounce": "^2.0.0",
|
|
127
|
-
"devalue": "^4.3.
|
|
128
|
+
"devalue": "^4.3.2",
|
|
128
129
|
"litepicker": "^2.0.12",
|
|
129
|
-
"lucia": "^3.
|
|
130
|
-
"mode-watcher": "^0.
|
|
130
|
+
"lucia": "^3.1.1",
|
|
131
|
+
"mode-watcher": "^0.3.0",
|
|
131
132
|
"oslo": "^1.2.0",
|
|
132
|
-
"svelte": "^
|
|
133
|
-
"svelte-
|
|
134
|
-
"svelte-sonner": "^0.3.28",
|
|
133
|
+
"svelte-easy-crop": "^2.0.3",
|
|
134
|
+
"svelte-sonner": "^0.3.22",
|
|
135
135
|
"tippy.js": "^6.3.7",
|
|
136
136
|
"ts-node": "^10.9.2",
|
|
137
|
-
"zod": "^3.22.
|
|
137
|
+
"zod": "^3.22.4"
|
|
138
138
|
}
|
|
139
139
|
}
|