@nemigo/layout 2.1.3 → 2.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.
package/dist/Context.svelte
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<script module lang="ts">
|
|
2
|
-
</script>
|
|
1
|
+
<script module lang="ts"></script>
|
|
3
2
|
|
|
4
|
-
<script lang="ts">
|
|
3
|
+
<script lang="ts">import { setContext } from "svelte";
|
|
4
|
+
const { key, value, children } = $props();
|
|
5
5
|
setContext(key, value);
|
|
6
6
|
</script>
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script module lang="ts"></script>
|
|
2
2
|
|
|
3
3
|
<script lang="ts">import { preventStop, usePreventStop } from "@nemigo/helpers/html/events";
|
|
4
|
-
|
|
4
|
+
const {
|
|
5
5
|
id,
|
|
6
6
|
label,
|
|
7
7
|
class: className,
|
|
@@ -15,7 +15,7 @@ let {
|
|
|
15
15
|
oncontextmenu,
|
|
16
16
|
children
|
|
17
17
|
} = $props();
|
|
18
|
-
|
|
18
|
+
const ariaLabel = $derived(label ?? void 0);
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
{#if onClick}
|
|
@@ -38,17 +38,15 @@ let ariaLabel = $derived(label ?? void 0);
|
|
|
38
38
|
if (e.altKey) {
|
|
39
39
|
if (oncontextmenu) {
|
|
40
40
|
preventStop(e);
|
|
41
|
-
// @ts-expect-error
|
|
41
|
+
// @ts-expect-error : сужение на уровне типов у компонента
|
|
42
42
|
oncontextmenu(e);
|
|
43
43
|
}
|
|
44
|
-
} else
|
|
45
|
-
|
|
46
|
-
onenterdown ? onenterdown(e) : onClick(e);
|
|
47
|
-
}
|
|
44
|
+
} else if (onenterdown) onenterdown(e);
|
|
45
|
+
else onClick(e);
|
|
48
46
|
} else if (e.key === "ContextMenu") {
|
|
49
47
|
if (oncontextmenu) {
|
|
50
48
|
preventStop(e);
|
|
51
|
-
// @ts-expect-error
|
|
49
|
+
// @ts-expect-error : сужение на уровне типов у компонента
|
|
52
50
|
oncontextmenu(e);
|
|
53
51
|
}
|
|
54
52
|
} else {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script module lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<script lang="ts">import { delay as
|
|
3
|
+
<script lang="ts">import { delay as useDelay } from "@nemigo/helpers/async";
|
|
4
4
|
import { isSSR } from "@nemigo/helpers/html";
|
|
5
|
-
|
|
6
|
-
const _trigger = isSSR ? trigger ??
|
|
5
|
+
const { delay, trigger, load } = $props();
|
|
6
|
+
const _trigger = isSSR ? trigger ?? useDelay(delay ?? 500) : null;
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
{#if !isSSR}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { Navigation } from "@nemigo/svelte/kit/navigation";
|
|
3
3
|
import { linear } from "svelte/easing";
|
|
4
4
|
import { blur } from "svelte/transition";
|
|
5
|
-
|
|
5
|
+
const { class: className, duration = 290, handler, children } = $props();
|
|
6
6
|
const __navigation = Navigation.default(handler).hydrate();
|
|
7
7
|
let animate = $state(false);
|
|
8
|
-
|
|
8
|
+
const show = $derived(!__navigation.state.signal && !animate);
|
|
9
9
|
const stepper = {
|
|
10
10
|
in: {
|
|
11
11
|
get duration() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nemigo/layout",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Vlad Logvin",
|
|
@@ -8,14 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "svelte-package && rimraf .svelte-kit",
|
|
12
|
-
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
11
|
+
"build": "bunx --bun svelte-package && bunx --bun rimraf .svelte-kit",
|
|
12
|
+
"check": "bunx --bun svelte-check --tsconfig ./tsconfig.json",
|
|
13
13
|
"eslint": "bunx --bun eslint ./",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"lint:fix:unsafe": "biome lint --fix --unsafe",
|
|
18
|
-
"format": "bunx --bun prettier --write ./ && biome check --write --linter-enabled=false"
|
|
14
|
+
"oxlint": "bunx --bun oxlint --config .././../oxlintrc.jsonc --ignore-path ../configs/.eslint.ignore ./",
|
|
15
|
+
"bilint": "bunx --bun biome lint",
|
|
16
|
+
"format": "bunx --bun prettier --write ./ && bunx --bun biome check --write --linter-enabled=false"
|
|
19
17
|
},
|
|
20
18
|
"exports": {
|
|
21
19
|
"./Context": {
|
|
@@ -40,10 +38,10 @@
|
|
|
40
38
|
}
|
|
41
39
|
},
|
|
42
40
|
"peerDependencies": {
|
|
43
|
-
"@nemigo/helpers": ">=2.
|
|
44
|
-
"@nemigo/svelte": ">=2.
|
|
45
|
-
"@sveltejs/kit": ">=2.
|
|
46
|
-
"svelte": ">=5.
|
|
41
|
+
"@nemigo/helpers": ">=2.2.0",
|
|
42
|
+
"@nemigo/svelte": ">=2.2.0",
|
|
43
|
+
"@sveltejs/kit": ">=2.49.0",
|
|
44
|
+
"svelte": ">=5.45.0"
|
|
47
45
|
},
|
|
48
46
|
"peerDependenciesMeta": {
|
|
49
47
|
"@sveltejs/kit": {
|
|
@@ -51,8 +49,8 @@
|
|
|
51
49
|
}
|
|
52
50
|
},
|
|
53
51
|
"devDependencies": {
|
|
54
|
-
"@nemigo/configs": "2.
|
|
55
|
-
"@nemigo/helpers": "2.0
|
|
56
|
-
"@nemigo/svelte": "2.
|
|
52
|
+
"@nemigo/configs": "2.2.3",
|
|
53
|
+
"@nemigo/helpers": "2.2.0",
|
|
54
|
+
"@nemigo/svelte": "2.2.1"
|
|
57
55
|
}
|
|
58
56
|
}
|