inertiax-svelte 2.6.2 → 5.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 (42) hide show
  1. package/dist/components/Deferred.svelte +14 -0
  2. package/dist/components/Deferred.svelte.d.ts +21 -0
  3. package/dist/components/Frame.svelte +110 -0
  4. package/dist/components/Frame.svelte.d.ts +27 -0
  5. package/dist/components/Link.svelte +62 -0
  6. package/dist/components/Link.svelte.d.ts +53 -0
  7. package/dist/components/Render.svelte +34 -0
  8. package/dist/components/Render.svelte.d.ts +34 -0
  9. package/dist/components/WhenVisible.svelte +73 -0
  10. package/dist/components/WhenVisible.svelte.d.ts +26 -0
  11. package/dist/createInertiaApp.d.ts +10 -0
  12. package/dist/createInertiaApp.js +46 -0
  13. package/dist/index.d.ts +9 -0
  14. package/dist/index.js +9 -0
  15. package/dist/link.d.ts +22 -0
  16. package/dist/link.js +158 -0
  17. package/dist/server.d.ts +1 -0
  18. package/dist/server.js +1 -0
  19. package/dist/store.d.ts +9 -0
  20. package/dist/store.js +7 -0
  21. package/dist/types.d.ts +9 -0
  22. package/dist/types.js +1 -0
  23. package/dist/useForm.d.ts +34 -0
  24. package/dist/useForm.js +183 -0
  25. package/dist/usePoll.d.ts +5 -0
  26. package/dist/usePoll.js +21 -0
  27. package/dist/usePrefetch.d.ts +7 -0
  28. package/dist/usePrefetch.js +41 -0
  29. package/dist/useRemember.d.ts +1 -0
  30. package/dist/useRemember.js +11 -0
  31. package/package.json +48 -17
  32. package/src/App.svelte +0 -19
  33. package/src/Frame.svelte +0 -39
  34. package/src/Render.svelte +0 -37
  35. package/src/createInertiaApp.js +0 -62
  36. package/src/index.js +0 -7
  37. package/src/link.js +0 -55
  38. package/src/page.js +0 -6
  39. package/src/remember.js +0 -15
  40. package/src/server.js +0 -1
  41. package/src/store.js +0 -11
  42. package/src/useForm.js +0 -222
@@ -0,0 +1,14 @@
1
+ <script>import { getContext } from "svelte";
2
+ const { page } = getContext("inertia");
3
+ export let data;
4
+ const keys = Array.isArray(data) ? data : [data];
5
+ if (!$$slots.fallback) {
6
+ throw new Error('`<Deferred>` requires a `<svelte:fragment slot="fallback">` slot');
7
+ }
8
+ </script>
9
+
10
+ {#if keys.every((key) => $page.props[key] !== undefined)}
11
+ <slot />
12
+ {:else}
13
+ <slot name="fallback" />
14
+ {/if}
@@ -0,0 +1,21 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ data: string | string[];
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {
10
+ default: {};
11
+ fallback: {};
12
+ };
13
+ exports?: {} | undefined;
14
+ bindings?: string | undefined;
15
+ };
16
+ export type DeferredProps = typeof __propDef.props;
17
+ export type DeferredEvents = typeof __propDef.events;
18
+ export type DeferredSlots = typeof __propDef.slots;
19
+ export default class Deferred extends SvelteComponent<DeferredProps, DeferredEvents, DeferredSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,110 @@
1
+ <script>
2
+ import { setContext } from 'svelte'
3
+ import { toStore } from 'svelte/store';
4
+ import { Router } from 'inertiax-core';
5
+
6
+ import Render, { h } from './Render.svelte';
7
+
8
+ let {
9
+ name = Math.random(),
10
+ renderLayout = name == '_top',
11
+ component,
12
+ props,
13
+ url,
14
+ version
15
+ } = $props()
16
+
17
+
18
+ // const store = writable({ component: null, frame: null, key: null })
19
+
20
+ let resolvedComponent = $state(null)
21
+ let key = $state(null)
22
+
23
+ export const router = new Router({
24
+ frame: name,
25
+ initialState: {component, props, url, version},
26
+ swapComponent: async (opts) => {
27
+ ({ component: resolvedComponent, frame: {component, props, url} } = opts);
28
+ if (!opts.preserveState) key = Date.now();
29
+ },
30
+ })
31
+
32
+ if (url) {
33
+ router.visit(url, {
34
+ preserveState: true,
35
+ preserveScroll: true
36
+ })
37
+ }
38
+
39
+ if (component) {
40
+ Promise.all([Router.resolveComponent(component), router.decryptHistory().catch(() => {})]).then(
41
+ ([initialComponent]) => {
42
+ resolvedComponent = initialComponent
43
+ key = null
44
+ },
45
+ )
46
+ }
47
+
48
+ const page = toStore(() => {component, props, url, version})
49
+
50
+ const context = {router, page}
51
+ setContext('inertia', context)
52
+ setContext(`inertia:${name}`, context)
53
+
54
+ const resolvedProps = $derived(resolveProps())
55
+
56
+ function resolveProps() {
57
+ if (!resolvedComponent) return
58
+ const child = h(resolvedComponent.default, props, [], key);
59
+
60
+ const layout = renderLayout && resolvedComponent.layout;
61
+
62
+ return layout ? resolveLayout(layout, child, props, key) : child;
63
+ }
64
+
65
+ function resolveLayout(layout, child, resolvedProps, key) {
66
+ if (isLayoutFunction(layout)) {
67
+ return layout(h, child);
68
+ }
69
+
70
+ if (Array.isArray(layout)) {
71
+ return layout
72
+ .slice()
73
+ .reverse()
74
+ .reduce((currentRender, layoutComponent) => h(layoutComponent, pageProps, [currentRender], key), child);
75
+ }
76
+
77
+ return h(layout, resolvedProps, child ? [child] : [], key);
78
+ }
79
+
80
+ function isLayoutFunction(layout) {
81
+ return typeof layout === 'function' && layout.length === 2 && typeof layout.prototype === 'undefined';
82
+ }
83
+
84
+ function onclick(event) {
85
+ if (event.defaultPrevented) return
86
+ if (event.target.closest('[data-inertia-ignore]')) return;
87
+
88
+
89
+ const href = event.target.closest('[href]')?.getAttribute('href')
90
+ if (!href) return
91
+
92
+ event.preventDefault();
93
+
94
+ router.visit(href);
95
+ }
96
+ </script>
97
+
98
+ <!-- svelte-ignore a11y_click_events_have_key_events -->
99
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
100
+ <div class="frame" {onclick}>
101
+ {#if resolvedProps}
102
+ <Render {...resolvedProps} />
103
+ {/if}
104
+ </div>
105
+
106
+ <style>
107
+ .frame {
108
+ display: contents;
109
+ }
110
+ </style>
@@ -0,0 +1,27 @@
1
+ /** @typedef {typeof __propDef.props} FrameProps */
2
+ /** @typedef {typeof __propDef.events} FrameEvents */
3
+ /** @typedef {typeof __propDef.slots} FrameSlots */
4
+ export default class Frame extends SvelteComponent<{
5
+ router?: Router | undefined;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ get router(): Router;
10
+ }
11
+ export type FrameProps = typeof __propDef.props;
12
+ export type FrameEvents = typeof __propDef.events;
13
+ export type FrameSlots = typeof __propDef.slots;
14
+ import { Router } from 'inertiax-core';
15
+ import { SvelteComponent } from "svelte";
16
+ declare const __propDef: {
17
+ props: {
18
+ router?: Router | undefined;
19
+ };
20
+ events: {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
23
+ slots: {};
24
+ exports?: undefined;
25
+ bindings?: undefined;
26
+ };
27
+ export {};
@@ -0,0 +1,62 @@
1
+ <script>import { inertia } from "../index";
2
+ export let href;
3
+ export let as = "a";
4
+ export let data = {};
5
+ export let method = "get";
6
+ export let replace = false;
7
+ export let preserveScroll = false;
8
+ export let preserveState = null;
9
+ export let only = [];
10
+ export let except = [];
11
+ export let headers = {};
12
+ export let queryStringArrayFormat = "brackets";
13
+ export let async = false;
14
+ export let prefetch = false;
15
+ export let cacheFor = 0;
16
+ $: asProp = method !== "get" ? "button" : as.toLowerCase();
17
+ $: elProps = {
18
+ a: { href },
19
+ button: { type: "button" }
20
+ }[asProp] || {};
21
+ </script>
22
+
23
+ <!-- svelte-ignore a11y-no-static-element-interactions -->
24
+ <svelte:element
25
+ this={asProp}
26
+ use:inertia={{
27
+ ...(as !== 'a' ? { href } : {}),
28
+ data,
29
+ method,
30
+ replace,
31
+ preserveScroll,
32
+ preserveState: preserveState ?? method !== 'get',
33
+ only,
34
+ except,
35
+ headers,
36
+ queryStringArrayFormat,
37
+ async,
38
+ prefetch,
39
+ cacheFor,
40
+ }}
41
+ {...$$restProps}
42
+ {...elProps}
43
+ on:focus
44
+ on:blur
45
+ on:click
46
+ on:dblclick
47
+ on:mousedown
48
+ on:mousemove
49
+ on:mouseout
50
+ on:mouseover
51
+ on:mouseup
52
+ on:cancel-token
53
+ on:before
54
+ on:start
55
+ on:progress
56
+ on:finish
57
+ on:cancel
58
+ on:success
59
+ on:error
60
+ >
61
+ <slot />
62
+ </svelte:element>
@@ -0,0 +1,53 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { CacheForOption, FormDataConvertible, LinkPrefetchOption, Method, PreserveStateOption } from 'inertiax-core';
3
+ declare const __propDef: {
4
+ props: {
5
+ [x: string]: any;
6
+ href: string;
7
+ as?: keyof HTMLElementTagNameMap | undefined;
8
+ data?: Record<string, FormDataConvertible> | undefined;
9
+ method?: Method | undefined;
10
+ replace?: boolean | undefined;
11
+ preserveScroll?: PreserveStateOption | undefined;
12
+ preserveState?: (PreserveStateOption | null) | undefined;
13
+ only?: string[] | undefined;
14
+ except?: string[] | undefined;
15
+ headers?: Record<string, string> | undefined;
16
+ queryStringArrayFormat?: ("brackets" | "indices") | undefined;
17
+ async?: boolean | undefined;
18
+ prefetch?: (boolean | LinkPrefetchOption | LinkPrefetchOption[]) | undefined;
19
+ cacheFor?: (CacheForOption | CacheForOption[]) | undefined;
20
+ };
21
+ events: {
22
+ focus: FocusEvent;
23
+ blur: FocusEvent;
24
+ click: MouseEvent;
25
+ dblclick: MouseEvent;
26
+ mousedown: MouseEvent;
27
+ mousemove: MouseEvent;
28
+ mouseout: MouseEvent;
29
+ mouseover: MouseEvent;
30
+ mouseup: MouseEvent;
31
+ 'cancel-token': Event | MouseEvent | UIEvent | KeyboardEvent | ProgressEvent<EventTarget> | ErrorEvent | SubmitEvent | AnimationEvent | InputEvent | FocusEvent | CompositionEvent | ClipboardEvent | DragEvent | FormDataEvent | PointerEvent | SecurityPolicyViolationEvent | TouchEvent | TransitionEvent | WheelEvent;
32
+ before: Event | MouseEvent | UIEvent | KeyboardEvent | ProgressEvent<EventTarget> | ErrorEvent | SubmitEvent | AnimationEvent | InputEvent | FocusEvent | CompositionEvent | ClipboardEvent | DragEvent | FormDataEvent | PointerEvent | SecurityPolicyViolationEvent | TouchEvent | TransitionEvent | WheelEvent;
33
+ start: Event | MouseEvent | UIEvent | KeyboardEvent | ProgressEvent<EventTarget> | ErrorEvent | SubmitEvent | AnimationEvent | InputEvent | FocusEvent | CompositionEvent | ClipboardEvent | DragEvent | FormDataEvent | PointerEvent | SecurityPolicyViolationEvent | TouchEvent | TransitionEvent | WheelEvent;
34
+ progress: ProgressEvent<EventTarget>;
35
+ finish: Event | MouseEvent | UIEvent | KeyboardEvent | ProgressEvent<EventTarget> | ErrorEvent | SubmitEvent | AnimationEvent | InputEvent | FocusEvent | CompositionEvent | ClipboardEvent | DragEvent | FormDataEvent | PointerEvent | SecurityPolicyViolationEvent | TouchEvent | TransitionEvent | WheelEvent;
36
+ cancel: Event;
37
+ success: Event | MouseEvent | UIEvent | KeyboardEvent | ProgressEvent<EventTarget> | ErrorEvent | SubmitEvent | AnimationEvent | InputEvent | FocusEvent | CompositionEvent | ClipboardEvent | DragEvent | FormDataEvent | PointerEvent | SecurityPolicyViolationEvent | TouchEvent | TransitionEvent | WheelEvent;
38
+ error: ErrorEvent;
39
+ } & {
40
+ [evt: string]: CustomEvent<any>;
41
+ };
42
+ slots: {
43
+ default: {};
44
+ };
45
+ exports?: undefined;
46
+ bindings?: undefined;
47
+ };
48
+ export type LinkProps = typeof __propDef.props;
49
+ export type LinkEvents = typeof __propDef.events;
50
+ export type LinkSlots = typeof __propDef.slots;
51
+ export default class Link extends SvelteComponent<LinkProps, LinkEvents, LinkSlots> {
52
+ }
53
+ export {};
@@ -0,0 +1,34 @@
1
+ <script context="module">export const h = (component, propsOrChildren, childrenOrKey, key = null) => {
2
+ const hasProps = typeof propsOrChildren === "object" && propsOrChildren !== null && !Array.isArray(propsOrChildren);
3
+ return {
4
+ component,
5
+ key: hasProps ? key : typeof childrenOrKey === "number" ? childrenOrKey : null,
6
+ props: hasProps ? propsOrChildren : {},
7
+ children: hasProps ? Array.isArray(childrenOrKey) ? childrenOrKey : childrenOrKey !== null ? [childrenOrKey] : [] : Array.isArray(propsOrChildren) ? propsOrChildren : propsOrChildren !== null ? [propsOrChildren] : []
8
+ };
9
+ };
10
+ </script>
11
+
12
+ <script>export let component;
13
+ export let props = {};
14
+ export let children = [];
15
+ export let key = null;
16
+ </script>
17
+
18
+ {#if component}
19
+ <!--
20
+ Add the `key` only to the last (page) component in the tree.
21
+ This ensures that the page component re-renders when `preserveState` is disabled,
22
+ while the layout components are persisted across page changes. -->
23
+ {#key children?.length === 0 ? key : null}
24
+ {#if children.length > 0}
25
+ <svelte:component this={component} {...props}>
26
+ {#each children as child}
27
+ <svelte:self {...child} />
28
+ {/each}
29
+ </svelte:component>
30
+ {:else}
31
+ <svelte:component this={component} {...props} />
32
+ {/if}
33
+ {/key}
34
+ {/if}
@@ -0,0 +1,34 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { PageProps } from 'inertiax-core';
3
+ import type { ComponentType } from 'svelte';
4
+ export type RenderProps = {
5
+ component: ComponentType;
6
+ props?: PageProps;
7
+ children?: RenderProps[];
8
+ key?: number | null;
9
+ } | null;
10
+ export type RenderFunction = {
11
+ (component: ComponentType, props?: PageProps, children?: RenderProps[], key?: number | null): RenderProps;
12
+ (component: ComponentType, children?: RenderProps[], key?: number | null): RenderProps;
13
+ };
14
+ export declare const h: RenderFunction;
15
+ declare const __propDef: {
16
+ props: {
17
+ component: ComponentType;
18
+ props?: PageProps;
19
+ children?: RenderProps[];
20
+ key?: number | null;
21
+ };
22
+ events: {
23
+ [evt: string]: CustomEvent<any>;
24
+ };
25
+ slots: {};
26
+ exports?: {} | undefined;
27
+ bindings?: string | undefined;
28
+ };
29
+ type RenderProps_ = typeof __propDef.props;
30
+ export type RenderEvents = typeof __propDef.events;
31
+ export type RenderSlots = typeof __propDef.slots;
32
+ export default class Render extends SvelteComponent<RenderProps_, RenderEvents, RenderSlots> {
33
+ }
34
+ export {};
@@ -0,0 +1,73 @@
1
+ <script>import {} from "inertiax-core";
2
+ import { getContext, onDestroy, onMount } from "svelte";
3
+ export let data = "";
4
+ export let params = {};
5
+ export let buffer = 0;
6
+ export let as = "div";
7
+ export let always = false;
8
+ const { router } = getContext("inertia");
9
+ let loaded = false;
10
+ let fetching = false;
11
+ let el;
12
+ let observer = null;
13
+ onMount(() => {
14
+ if (!el) {
15
+ return;
16
+ }
17
+ observer = new IntersectionObserver(
18
+ (entries) => {
19
+ if (!entries[0].isIntersecting) {
20
+ return;
21
+ }
22
+ if (!always) {
23
+ observer?.disconnect();
24
+ }
25
+ if (fetching) {
26
+ return;
27
+ }
28
+ fetching = true;
29
+ const reloadParams = getReloadParams();
30
+ router.reload({
31
+ ...reloadParams,
32
+ onStart: (event) => {
33
+ fetching = true;
34
+ reloadParams.onStart?.(event);
35
+ },
36
+ onFinish: (event) => {
37
+ loaded = true;
38
+ fetching = false;
39
+ reloadParams.onFinish?.(event);
40
+ }
41
+ });
42
+ },
43
+ {
44
+ rootMargin: `${buffer}px`
45
+ }
46
+ );
47
+ observer.observe(el);
48
+ });
49
+ onDestroy(() => {
50
+ observer?.disconnect();
51
+ });
52
+ function getReloadParams() {
53
+ if (data !== "") {
54
+ return {
55
+ only: Array.isArray(data) ? data : [data]
56
+ };
57
+ }
58
+ if (!params.data) {
59
+ throw new Error("You must provide either a `data` or `params` prop.");
60
+ }
61
+ return params;
62
+ }
63
+ </script>
64
+
65
+ {#if always || !loaded}
66
+ <svelte:element this={as} bind:this={el} />
67
+ {/if}
68
+
69
+ {#if loaded}
70
+ <slot />
71
+ {:else if $$slots.fallback}
72
+ <slot name="fallback" />
73
+ {/if}
@@ -0,0 +1,26 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type ReloadOptions } from 'inertiax-core';
3
+ declare const __propDef: {
4
+ props: {
5
+ data?: string | string[];
6
+ params?: ReloadOptions;
7
+ buffer?: number;
8
+ as?: keyof HTMLElementTagNameMap;
9
+ always?: boolean;
10
+ };
11
+ events: {
12
+ [evt: string]: CustomEvent<any>;
13
+ };
14
+ slots: {
15
+ default: {};
16
+ fallback: {};
17
+ };
18
+ exports?: {} | undefined;
19
+ bindings?: string | undefined;
20
+ };
21
+ export type WhenVisibleProps = typeof __propDef.props;
22
+ export type WhenVisibleEvents = typeof __propDef.events;
23
+ export type WhenVisibleSlots = typeof __propDef.slots;
24
+ export default class WhenVisible extends SvelteComponent<WhenVisibleProps, WhenVisibleEvents, WhenVisibleSlots> {
25
+ }
26
+ export {};
@@ -0,0 +1,10 @@
1
+ export default function createInertiaApp({ id, resolve, setup, progress, page, }: {
2
+ id?: string | undefined;
3
+ resolve: any;
4
+ setup: any;
5
+ progress?: {} | undefined;
6
+ page: any;
7
+ }): Promise<{
8
+ body: string;
9
+ head: any[];
10
+ } | undefined>;
@@ -0,0 +1,46 @@
1
+ import { setupProgress, Router } from 'inertiax-core';
2
+ import escape from 'html-escape';
3
+ import Frame from './components/Frame.svelte';
4
+ export default async function createInertiaApp({ id = 'app', resolve, setup, progress = {}, page, }) {
5
+ const el = import.meta.env.SSR ? null : document.getElementById(id);
6
+ const initialState = page || JSON.parse(el?.dataset?.page || '{}');
7
+ // Router.setVersion(initialState.version);
8
+ Router.resolveComponent = (name) => Promise.resolve(resolve(name));
9
+ if (import.meta.env.SSR) {
10
+ const { render } = await dynamicImport('svelte/server');
11
+ const { html, head } = await (async () => {
12
+ return render(Frame, {
13
+ props: {
14
+ name: "_top",
15
+ ...initialState,
16
+ },
17
+ });
18
+ })();
19
+ return {
20
+ body: `<div data-server-rendered="true" id="${id}" data-page="${escape(JSON.stringify(initialState))}">${html}</div>`,
21
+ head: [head],
22
+ };
23
+ }
24
+ if (!el) {
25
+ throw new Error(`Element with ID "${id}" not found.`);
26
+ }
27
+ if (progress) {
28
+ setupProgress(progress);
29
+ }
30
+ setup({
31
+ el,
32
+ App: Frame,
33
+ props: {
34
+ name: "_top",
35
+ ...initialState,
36
+ },
37
+ });
38
+ }
39
+ async function dynamicImport(module) {
40
+ try {
41
+ return await import(/* @vite-ignore */ module);
42
+ }
43
+ catch {
44
+ return null;
45
+ }
46
+ }
@@ -0,0 +1,9 @@
1
+ export { default as Frame } from './components/Frame.svelte';
2
+ export { default as Deferred } from './components/Deferred.svelte';
3
+ export { default as WhenVisible } from './components/WhenVisible.svelte';
4
+ export { default as createInertiaApp } from './createInertiaApp';
5
+ export { type ResolvedComponent } from './types';
6
+ export { default as useForm, type InertiaForm, type InertiaFormProps } from './useForm';
7
+ export { default as usePoll } from './usePoll';
8
+ export { default as usePrefetch } from './usePrefetch';
9
+ export { default as useRemember } from './useRemember';
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ export { default as Frame } from './components/Frame.svelte';
2
+ export { default as Deferred } from './components/Deferred.svelte';
3
+ export { default as WhenVisible } from './components/WhenVisible.svelte';
4
+ export { default as createInertiaApp } from './createInertiaApp';
5
+ export {} from './types';
6
+ export { default as useForm } from './useForm';
7
+ export { default as usePoll } from './usePoll';
8
+ export { default as usePrefetch } from './usePrefetch';
9
+ export { default as useRemember } from './useRemember';
package/dist/link.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { type CacheForOption, type FormDataConvertible, type GlobalEventsMap, type LinkPrefetchOption, type VisitOptions } from 'inertiax-core';
2
+ import type { CancelTokenSource } from 'axios';
3
+ import type { ActionReturn } from 'svelte/action';
4
+ interface ActionElement extends HTMLElement {
5
+ href?: string;
6
+ }
7
+ type ActionParameters = Omit<VisitOptions, 'data' | 'prefetch'> & {
8
+ href?: string;
9
+ data?: Record<string, FormDataConvertible>;
10
+ prefetch?: boolean | LinkPrefetchOption | LinkPrefetchOption[];
11
+ cacheFor?: CacheForOption | CacheForOption[];
12
+ };
13
+ type SelectedEventKeys = 'start' | 'progress' | 'finish' | 'before' | 'cancel' | 'success' | 'error';
14
+ type SelectedGlobalEventsMap = Pick<GlobalEventsMap, SelectedEventKeys>;
15
+ type ActionAttributes = {
16
+ [K in keyof SelectedGlobalEventsMap as `on:${K}` | `on${K}`]?: (event: CustomEvent<SelectedGlobalEventsMap[K]['details']>) => void;
17
+ } & {
18
+ 'on:cancel-token'?: (event: CustomEvent<CancelTokenSource>) => void;
19
+ oncanceltoken?: (event: CustomEvent<CancelTokenSource>) => void;
20
+ };
21
+ declare function link(node: ActionElement, initialParams?: ActionParameters): ActionReturn<ActionParameters, ActionAttributes>;
22
+ export default link;