ui-ingredients 0.0.43 → 0.0.44
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -0
- package/dist/floating-panel/body.svelte +24 -0
- package/dist/floating-panel/body.svelte.d.ts +18 -0
- package/dist/floating-panel/close-trigger.svelte +27 -0
- package/dist/floating-panel/close-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/content.svelte +36 -0
- package/dist/floating-panel/content.svelte.d.ts +18 -0
- package/dist/floating-panel/context.svelte.d.ts +2 -0
- package/dist/floating-panel/context.svelte.js +2 -0
- package/dist/floating-panel/create-floating-panel.svelte.d.ts +2 -1
- package/dist/floating-panel/create-floating-panel.svelte.js +1 -0
- package/dist/floating-panel/drag-trigger.svelte +27 -0
- package/dist/floating-panel/drag-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/floating-panel.d.ts +13 -0
- package/dist/floating-panel/floating-panel.js +13 -0
- package/dist/floating-panel/header.svelte +25 -0
- package/dist/floating-panel/header.svelte.d.ts +18 -0
- package/dist/floating-panel/index.d.ts +16 -0
- package/dist/floating-panel/index.js +3 -0
- package/dist/floating-panel/maximize-trigger.svelte +28 -0
- package/dist/floating-panel/maximize-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/minimize-trigger.svelte +28 -0
- package/dist/floating-panel/minimize-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/positioner.svelte +35 -0
- package/dist/floating-panel/positioner.svelte.d.ts +18 -0
- package/dist/floating-panel/resize-trigger.svelte +36 -0
- package/dist/floating-panel/resize-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/restore-trigger.svelte +28 -0
- package/dist/floating-panel/restore-trigger.svelte.d.ts +18 -0
- package/dist/floating-panel/root.svelte +50 -0
- package/dist/floating-panel/root.svelte.d.ts +18 -0
- package/dist/floating-panel/title.svelte +25 -0
- package/dist/floating-panel/title.svelte.d.ts +18 -0
- package/dist/floating-panel/trigger.svelte +27 -0
- package/dist/floating-panel/trigger.svelte.d.ts +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/is-object.d.ts +2 -0
- package/dist/is-object.js +4 -0
- package/dist/merge-props.js +1 -4
- package/dist/presence/root.svelte +5 -1
- package/dist/tour/arrow-tip.svelte +24 -0
- package/dist/tour/arrow-tip.svelte.d.ts +18 -0
- package/dist/tour/arrow.svelte +24 -0
- package/dist/tour/arrow.svelte.d.ts +18 -0
- package/dist/tour/close-trigger.svelte +25 -0
- package/dist/tour/close-trigger.svelte.d.ts +18 -0
- package/dist/tour/content.svelte +30 -0
- package/dist/tour/content.svelte.d.ts +18 -0
- package/dist/tour/context.svelte.d.ts +2 -0
- package/dist/tour/context.svelte.js +3 -0
- package/dist/tour/create-tour.svelte.js +1 -0
- package/dist/tour/description.svelte +24 -0
- package/dist/tour/description.svelte.d.ts +18 -0
- package/dist/tour/index.d.ts +17 -0
- package/dist/tour/index.js +3 -0
- package/dist/tour/next-trigger.svelte +24 -0
- package/dist/tour/next-trigger.svelte.d.ts +18 -0
- package/dist/tour/overlay.svelte +43 -0
- package/dist/tour/overlay.svelte.d.ts +18 -0
- package/dist/tour/positioner.svelte +30 -0
- package/dist/tour/positioner.svelte.d.ts +18 -0
- package/dist/tour/prev-trigger.svelte +24 -0
- package/dist/tour/prev-trigger.svelte.d.ts +18 -0
- package/dist/tour/progress-text.svelte +28 -0
- package/dist/tour/progress-text.svelte.d.ts +18 -0
- package/dist/tour/root.svelte +52 -0
- package/dist/tour/root.svelte.d.ts +18 -0
- package/dist/tour/skip-trigger.svelte +24 -0
- package/dist/tour/skip-trigger.svelte.d.ts +18 -0
- package/dist/tour/spotlight.svelte +24 -0
- package/dist/tour/spotlight.svelte.d.ts +18 -0
- package/dist/tour/title.svelte +24 -0
- package/dist/tour/title.svelte.d.ts +18 -0
- package/dist/tour/tour.d.ts +14 -0
- package/dist/tour/tour.js +14 -0
- package/dist/types.d.ts +10 -16
- package/package.json +1 -1
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Root: $$__sveltets_2_IsomorphicComponent<FloatingPanelProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Root = InstanceType<typeof Root>;
|
18
|
+
export default Root;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface FloatingPanelTitleProps
|
5
|
+
extends HtmlIngredientProps<'span'> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '../merge-props.js';
|
10
|
+
import {getFloatingPanelContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {asChild, children, ...props}: FloatingPanelTitleProps = $props();
|
13
|
+
|
14
|
+
let floatingPanel = getFloatingPanelContext();
|
15
|
+
|
16
|
+
let mergedProps = $derived(mergeProps(props, floatingPanel.getTitleProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
{#if asChild}
|
20
|
+
{@render asChild(mergedProps)}
|
21
|
+
{:else}
|
22
|
+
<span {...mergedProps}>
|
23
|
+
{@render children?.()}
|
24
|
+
</span>
|
25
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Title: $$__sveltets_2_IsomorphicComponent<FloatingPanelTitleProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Title = InstanceType<typeof Title>;
|
18
|
+
export default Title;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface FloatingPanelTriggerProps
|
5
|
+
extends HtmlIngredientProps<'button'> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '../merge-props.js';
|
10
|
+
import {getFloatingPanelContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {asChild, children, ...props}: FloatingPanelTriggerProps = $props();
|
13
|
+
|
14
|
+
let floatingPanel = getFloatingPanelContext();
|
15
|
+
|
16
|
+
let mergedProps = $derived(
|
17
|
+
mergeProps(props, floatingPanel.getTriggerProps()),
|
18
|
+
);
|
19
|
+
</script>
|
20
|
+
|
21
|
+
{#if asChild}
|
22
|
+
{@render asChild(mergedProps)}
|
23
|
+
{:else}
|
24
|
+
<button type="button" {...mergedProps}>
|
25
|
+
{@render children?.()}
|
26
|
+
</button>
|
27
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Trigger: $$__sveltets_2_IsomorphicComponent<FloatingPanelTriggerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Trigger = InstanceType<typeof Trigger>;
|
18
|
+
export default Trigger;
|
package/dist/index.d.ts
CHANGED
@@ -12,6 +12,7 @@ export * from './editable/index.js';
|
|
12
12
|
export * from './environment-provider/index.js';
|
13
13
|
export * from './field/index.js';
|
14
14
|
export * from './file-upload/index.js';
|
15
|
+
export * from './floating-panel/index.js';
|
15
16
|
export * from './hover-card/index.js';
|
16
17
|
export * from './locale-provider/index.js';
|
17
18
|
export * from './menu/index.js';
|
@@ -39,4 +40,5 @@ export * from './timer/index.js';
|
|
39
40
|
export * from './toast/index.js';
|
40
41
|
export * from './toggle-group/index.js';
|
41
42
|
export * from './tooltip/index.js';
|
43
|
+
export * from './tour/index.js';
|
42
44
|
export * from './tree-view/index.js';
|
package/dist/index.js
CHANGED
@@ -12,6 +12,7 @@ export * from './editable/index.js';
|
|
12
12
|
export * from './environment-provider/index.js';
|
13
13
|
export * from './field/index.js';
|
14
14
|
export * from './file-upload/index.js';
|
15
|
+
export * from './floating-panel/index.js';
|
15
16
|
export * from './hover-card/index.js';
|
16
17
|
export * from './locale-provider/index.js';
|
17
18
|
export * from './menu/index.js';
|
@@ -39,4 +40,5 @@ export * from './timer/index.js';
|
|
39
40
|
export * from './toast/index.js';
|
40
41
|
export * from './toggle-group/index.js';
|
41
42
|
export * from './tooltip/index.js';
|
43
|
+
export * from './tour/index.js';
|
42
44
|
export * from './tree-view/index.js';
|
package/dist/merge-props.js
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
import { mergeProps as fn } from '@zag-js/svelte';
|
2
|
-
|
3
|
-
return (Object.prototype.toString.call(value) === '[object Object]' &&
|
4
|
-
value === Object(value));
|
5
|
-
}
|
2
|
+
import { isObject } from './is-object.js';
|
6
3
|
export function mergeProps(...args) {
|
7
4
|
const r = fn(...args);
|
8
5
|
const i = 'style';
|
@@ -19,7 +19,11 @@
|
|
19
19
|
let {asChild, children, ...props}: PresenceProps = $props();
|
20
20
|
|
21
21
|
let [presenceProps, otherProps] = $derived(
|
22
|
-
createSplitProps<CreatePresenceProps>([
|
22
|
+
createSplitProps<CreatePresenceProps>([
|
23
|
+
'present',
|
24
|
+
'lazyMount',
|
25
|
+
'keepMounted',
|
26
|
+
])(props),
|
23
27
|
);
|
24
28
|
|
25
29
|
let presence = createPresence(reflect(() => presenceProps));
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourArrowTipProps extends HtmlIngredientProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getTourContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {asChild, children, ...props}: TourArrowTipProps = $props();
|
12
|
+
|
13
|
+
let tour = getTourContext();
|
14
|
+
|
15
|
+
let mergedProps = $derived(mergeProps(props, tour.getArrowTipProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
{#if asChild}
|
19
|
+
{@render asChild(mergedProps)}
|
20
|
+
{:else}
|
21
|
+
<span {...mergedProps}>
|
22
|
+
{@render children?.()}
|
23
|
+
</span>
|
24
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const ArrowTip: $$__sveltets_2_IsomorphicComponent<TourArrowTipProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type ArrowTip = InstanceType<typeof ArrowTip>;
|
18
|
+
export default ArrowTip;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourArrowProps extends HtmlIngredientProps<'span'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getTourContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {asChild, children, ...props}: TourArrowProps = $props();
|
12
|
+
|
13
|
+
let tour = getTourContext();
|
14
|
+
|
15
|
+
let mergedProps = $derived(mergeProps(props, tour.getArrowProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
{#if asChild}
|
19
|
+
{@render asChild(mergedProps)}
|
20
|
+
{:else}
|
21
|
+
<span {...mergedProps}>
|
22
|
+
{@render children?.()}
|
23
|
+
</span>
|
24
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Arrow: $$__sveltets_2_IsomorphicComponent<TourArrowProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Arrow = InstanceType<typeof Arrow>;
|
18
|
+
export default Arrow;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourCloseTriggerProps
|
5
|
+
extends HtmlIngredientProps<'button'> {}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script lang="ts">
|
9
|
+
import {mergeProps} from '../merge-props.js';
|
10
|
+
import {getTourContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {asChild, children, ...props}: TourCloseTriggerProps = $props();
|
13
|
+
|
14
|
+
let tour = getTourContext();
|
15
|
+
|
16
|
+
let mergedProps = $derived(mergeProps(props, tour.getCloseTriggerProps()));
|
17
|
+
</script>
|
18
|
+
|
19
|
+
{#if asChild}
|
20
|
+
{@render asChild(mergedProps)}
|
21
|
+
{:else}
|
22
|
+
<button type="button" {...mergedProps}>
|
23
|
+
{@render children?.()}
|
24
|
+
</button>
|
25
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const CloseTrigger: $$__sveltets_2_IsomorphicComponent<TourCloseTriggerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type CloseTrigger = InstanceType<typeof CloseTrigger>;
|
18
|
+
export default CloseTrigger;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourContentProps extends HtmlIngredientProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getPresenceContext} from '../presence/context.svelte.js';
|
10
|
+
import {getTourContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {asChild, children, ...props}: TourContentProps = $props();
|
13
|
+
|
14
|
+
let tour = getTourContext();
|
15
|
+
let presence = getPresenceContext();
|
16
|
+
|
17
|
+
let mergedProps = $derived(
|
18
|
+
mergeProps(props, tour.getContentProps(), presence.getPresenceProps()),
|
19
|
+
);
|
20
|
+
</script>
|
21
|
+
|
22
|
+
{#if presence.mounted}
|
23
|
+
{#if asChild}
|
24
|
+
{@render asChild(mergedProps)}
|
25
|
+
{:else}
|
26
|
+
<div use:presence.ref {...mergedProps}>
|
27
|
+
{@render children?.()}
|
28
|
+
</div>
|
29
|
+
{/if}
|
30
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Content: $$__sveltets_2_IsomorphicComponent<TourContentProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Content = InstanceType<typeof Content>;
|
18
|
+
export default Content;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourDescriptionProps extends HtmlIngredientProps<'p'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getTourContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {asChild, children, ...props}: TourDescriptionProps = $props();
|
12
|
+
|
13
|
+
let tour = getTourContext();
|
14
|
+
|
15
|
+
let mergedProps = $derived(mergeProps(props, tour.getDescriptionProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
{#if asChild}
|
19
|
+
{@render asChild(mergedProps)}
|
20
|
+
{:else}
|
21
|
+
<p {...mergedProps}>
|
22
|
+
{@render children?.()}
|
23
|
+
</p>
|
24
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Description: $$__sveltets_2_IsomorphicComponent<TourDescriptionProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Description = InstanceType<typeof Description>;
|
18
|
+
export default Description;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export * as Tour from './tour.js';
|
2
|
+
export type { TourArrowTipProps } from './arrow-tip.svelte';
|
3
|
+
export type { TourArrowProps } from './arrow.svelte';
|
4
|
+
export type { TourCloseTriggerProps } from './close-trigger.svelte';
|
5
|
+
export type { TourContentProps } from './content.svelte';
|
6
|
+
export type { TourDescriptionProps } from './description.svelte';
|
7
|
+
export type { TourNextTriggerProps } from './next-trigger.svelte';
|
8
|
+
export type { TourOverlayProps } from './overlay.svelte';
|
9
|
+
export type { TourPositionerProps } from './positioner.svelte';
|
10
|
+
export type { TourPrevTriggerProps } from './prev-trigger.svelte';
|
11
|
+
export type { TourProgressTextProps } from './progress-text.svelte';
|
12
|
+
export type { TourProps } from './root.svelte';
|
13
|
+
export type { TourSkipTriggerProps } from './skip-trigger.svelte';
|
14
|
+
export type { TourSpotlightProps } from './spotlight.svelte';
|
15
|
+
export type { TourTitleProps } from './title.svelte';
|
16
|
+
export { anatomy as tourAnatomy } from '@zag-js/tour';
|
17
|
+
export { getTourContext } from './context.svelte.js';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourNextTriggerProps extends HtmlIngredientProps<'button'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getTourContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {asChild, children, ...props}: TourNextTriggerProps = $props();
|
12
|
+
|
13
|
+
let tour = getTourContext();
|
14
|
+
|
15
|
+
let mergedProps = $derived(mergeProps(props, tour.getNextTriggerProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
{#if asChild}
|
19
|
+
{@render asChild(mergedProps)}
|
20
|
+
{:else}
|
21
|
+
<button type="button" {...mergedProps}>
|
22
|
+
{@render children?.()}
|
23
|
+
</button>
|
24
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const NextTrigger: $$__sveltets_2_IsomorphicComponent<TourNextTriggerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type NextTrigger = InstanceType<typeof NextTrigger>;
|
18
|
+
export default NextTrigger;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourOverlayProps extends HtmlIngredientProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getPresenceStrategyPropsContext} from '../presence/context.svelte.js';
|
10
|
+
import {createPresence} from '../presence/create-presence.svelte.js';
|
11
|
+
import {getTourContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {asChild, children, ...props}: TourOverlayProps = $props();
|
14
|
+
|
15
|
+
let tour = getTourContext();
|
16
|
+
|
17
|
+
let presenceStrategyProps = getPresenceStrategyPropsContext();
|
18
|
+
let presence = createPresence({
|
19
|
+
get present() {
|
20
|
+
return tour.currentStep != null;
|
21
|
+
},
|
22
|
+
get lazyMount() {
|
23
|
+
return presenceStrategyProps.lazyMount;
|
24
|
+
},
|
25
|
+
get keepMounted() {
|
26
|
+
return presenceStrategyProps.keepMounted;
|
27
|
+
},
|
28
|
+
});
|
29
|
+
|
30
|
+
let mergedProps = $derived(
|
31
|
+
mergeProps(props, tour.getOverlayProps(), presence.getPresenceProps()),
|
32
|
+
);
|
33
|
+
</script>
|
34
|
+
|
35
|
+
{#if presence.mounted}
|
36
|
+
{#if asChild}
|
37
|
+
{@render asChild(mergedProps)}
|
38
|
+
{:else}
|
39
|
+
<div use:presence.ref {...mergedProps}>
|
40
|
+
{@render children?.()}
|
41
|
+
</div>
|
42
|
+
{/if}
|
43
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Overlay: $$__sveltets_2_IsomorphicComponent<TourOverlayProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Overlay = InstanceType<typeof Overlay>;
|
18
|
+
export default Overlay;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourPositionerProps extends HtmlIngredientProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getPresenceContext} from '../presence/context.svelte.js';
|
10
|
+
import {getTourContext} from './context.svelte.js';
|
11
|
+
|
12
|
+
let {asChild, children, ...props}: TourPositionerProps = $props();
|
13
|
+
|
14
|
+
let tour = getTourContext();
|
15
|
+
let presence = getPresenceContext();
|
16
|
+
|
17
|
+
let mergedProps = $derived(
|
18
|
+
mergeProps(props, tour.getPositionerProps(), presence.getPresenceProps()),
|
19
|
+
);
|
20
|
+
</script>
|
21
|
+
|
22
|
+
{#if presence.mounted}
|
23
|
+
{#if asChild}
|
24
|
+
{@render asChild(mergedProps)}
|
25
|
+
{:else}
|
26
|
+
<div {...mergedProps}>
|
27
|
+
{@render children?.()}
|
28
|
+
</div>
|
29
|
+
{/if}
|
30
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const Positioner: $$__sveltets_2_IsomorphicComponent<TourPositionerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type Positioner = InstanceType<typeof Positioner>;
|
18
|
+
export default Positioner;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlIngredientProps} from '../types.js';
|
3
|
+
|
4
|
+
export interface TourPrevTriggerProps extends HtmlIngredientProps<'button'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '../merge-props.js';
|
9
|
+
import {getTourContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {asChild, children, ...props}: TourPrevTriggerProps = $props();
|
12
|
+
|
13
|
+
let tour = getTourContext();
|
14
|
+
|
15
|
+
let mergedProps = $derived(mergeProps(props, tour.getPrevTriggerProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
{#if asChild}
|
19
|
+
{@render asChild(mergedProps)}
|
20
|
+
{:else}
|
21
|
+
<button type="button" {...mergedProps}>
|
22
|
+
{@render children?.()}
|
23
|
+
</button>
|
24
|
+
{/if}
|
@@ -0,0 +1,18 @@
|
|
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;
|
11
|
+
};
|
12
|
+
z_$$bindings?: Bindings;
|
13
|
+
}
|
14
|
+
declare const PrevTrigger: $$__sveltets_2_IsomorphicComponent<TourPrevTriggerProps, {
|
15
|
+
[evt: string]: CustomEvent<any>;
|
16
|
+
}, {}, {}, "">;
|
17
|
+
type PrevTrigger = InstanceType<typeof PrevTrigger>;
|
18
|
+
export default PrevTrigger;
|