@functionalcms/svelte-components 4.14.4 → 4.16.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/dist/components/form/Button.svelte +8 -0
- package/dist/components/form/Button.svelte.d.ts +2 -0
- package/dist/index-server.d.ts +1 -0
- package/dist/index-server.js +1 -0
- package/dist/index.server.d.ts +1 -0
- package/dist/index.server.js +1 -0
- package/dist/server-side/redirection.d.ts +6 -0
- package/dist/server-side/redirection.js +16 -0
- package/package.json +1 -1
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
tabIndex?: number;
|
|
28
28
|
ariaLabel: string;
|
|
29
29
|
noStyle: boolean;
|
|
30
|
+
dataPreload: "hover" | "tap";
|
|
31
|
+
codePreload: "eager" | "viewport" | "hover" | "tap";
|
|
30
32
|
click?: (event: MouseEvent) => void;
|
|
31
33
|
keydown?: (event: KeyboardEvent) => void;
|
|
32
34
|
}
|
|
@@ -58,6 +60,8 @@
|
|
|
58
60
|
click = undefined,
|
|
59
61
|
keydown = undefined,
|
|
60
62
|
ariaLabel = '',
|
|
63
|
+
dataPreload = 'hover',
|
|
64
|
+
codePreload = 'hover',
|
|
61
65
|
...restProps
|
|
62
66
|
}: Partial<Props> = $props();
|
|
63
67
|
|
|
@@ -96,6 +100,8 @@
|
|
|
96
100
|
onclick={click}
|
|
97
101
|
onkeydown={keydown}
|
|
98
102
|
{...restProps}
|
|
103
|
+
data-sveltekit-preload-data={dataPreload}
|
|
104
|
+
data-sveltekit-preload-code={codePreload}
|
|
99
105
|
>
|
|
100
106
|
{@render children?.()}
|
|
101
107
|
</a>
|
|
@@ -112,6 +118,8 @@
|
|
|
112
118
|
disabled={isDisabled}
|
|
113
119
|
onclick={click}
|
|
114
120
|
onkeydown={keydown}
|
|
121
|
+
data-sveltekit-preload-data={dataPreload}
|
|
122
|
+
data-sveltekit-preload-code={codePreload}
|
|
115
123
|
{...restProps}
|
|
116
124
|
>
|
|
117
125
|
{@render children?.()}
|
|
@@ -24,6 +24,8 @@ declare const Button: import("svelte").Component<Partial<{
|
|
|
24
24
|
tabIndex?: number;
|
|
25
25
|
ariaLabel: string;
|
|
26
26
|
noStyle: boolean;
|
|
27
|
+
dataPreload: "hover" | "tap";
|
|
28
|
+
codePreload: "eager" | "viewport" | "hover" | "tap";
|
|
27
29
|
click?: (event: MouseEvent) => void;
|
|
28
30
|
keydown?: (event: KeyboardEvent) => void;
|
|
29
31
|
}>, {}, "">;
|
package/dist/index-server.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { authenticationHandle } from './auth/authenticationHandle.js';
|
|
2
2
|
export { default as authorizationHandle } from './auth/authorizationHandle.js';
|
|
3
3
|
export { default as errorHandler } from './auth/errorHandle.js';
|
|
4
|
+
export { default as getRedirection } from './server-side/redirection.ts';
|
|
4
5
|
export { redisSessionProvider } from './auth/redisSessionProvider.js';
|
|
5
6
|
export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.js';
|
|
6
7
|
export { userAuthenticationProvider } from './auth/userAuthenticationProvider.js';
|
package/dist/index-server.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { authenticationHandle } from './auth/authenticationHandle.js';
|
|
2
2
|
export { default as authorizationHandle } from './auth/authorizationHandle.js';
|
|
3
3
|
export { default as errorHandler } from './auth/errorHandle.js';
|
|
4
|
+
export { default as getRedirection } from './server-side/redirection.ts';
|
|
4
5
|
export { redisSessionProvider } from './auth/redisSessionProvider.js';
|
|
5
6
|
export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.js';
|
|
6
7
|
export { userAuthenticationProvider } from './auth/userAuthenticationProvider.js';
|
package/dist/index.server.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { authenticationHandle } from './auth/authenticationHandle.ts';
|
|
2
2
|
export { default as authorizationHandle } from './auth/authorizationHandle.ts';
|
|
3
3
|
export { default as errorHandler } from './auth/errorHandle.ts';
|
|
4
|
+
export { default as getRedirection } from './server-side/redirection.ts';
|
|
4
5
|
export { redisSessionProvider } from './auth/redisSessionProvider.ts';
|
|
5
6
|
export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.ts';
|
|
6
7
|
export { userAuthenticationProvider } from './auth/userAuthenticationProvider.ts';
|
package/dist/index.server.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { authenticationHandle } from './auth/authenticationHandle.ts';
|
|
2
2
|
export { default as authorizationHandle } from './auth/authorizationHandle.ts';
|
|
3
3
|
export { default as errorHandler } from './auth/errorHandle.ts';
|
|
4
|
+
export { default as getRedirection } from './server-side/redirection.ts';
|
|
4
5
|
export { redisSessionProvider } from './auth/redisSessionProvider.ts';
|
|
5
6
|
export { machineAuthenticationProvider } from './auth/machineAuthenticationProvider.ts';
|
|
6
7
|
export { userAuthenticationProvider } from './auth/userAuthenticationProvider.ts';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { redirect } from '@sveltejs/kit';
|
|
2
|
+
const getRedirection = (redirects) => {
|
|
3
|
+
const redirection = async ({ event, resolve }) => {
|
|
4
|
+
const { url } = event;
|
|
5
|
+
const redirectUrl = redirects.find(redirect => redirect.path === url.pathname);
|
|
6
|
+
;
|
|
7
|
+
if (redirectUrl) {
|
|
8
|
+
throw redirect(307, redirectUrl.destination);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return await resolve(event);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
return redirection;
|
|
15
|
+
};
|
|
16
|
+
export default getRedirection;
|