@ark-ui/svelte 5.11.2 → 5.12.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/components/anatomy.d.ts +1 -0
- package/dist/components/anatomy.js +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/marquee/index.d.ts +12 -0
- package/dist/components/marquee/index.js +11 -0
- package/dist/components/marquee/marquee-content.svelte +36 -0
- package/dist/components/marquee/marquee-content.svelte.d.ts +10 -0
- package/dist/components/marquee/marquee-context.svelte +18 -0
- package/dist/components/marquee/marquee-context.svelte.d.ts +8 -0
- package/dist/components/marquee/marquee-edge.svelte +22 -0
- package/dist/components/marquee/marquee-edge.svelte.d.ts +9 -0
- package/dist/components/marquee/marquee-item.svelte +19 -0
- package/dist/components/marquee/marquee-item.svelte.d.ts +8 -0
- package/dist/components/marquee/marquee-root-provider.svelte +25 -0
- package/dist/components/marquee/marquee-root-provider.svelte.d.ts +12 -0
- package/dist/components/marquee/marquee-root.svelte +51 -0
- package/dist/components/marquee/marquee-root.svelte.d.ts +9 -0
- package/dist/components/marquee/marquee-viewport.svelte +19 -0
- package/dist/components/marquee/marquee-viewport.svelte.d.ts +8 -0
- package/dist/components/marquee/marquee.anatomy.d.ts +1 -0
- package/dist/components/marquee/marquee.anatomy.js +1 -0
- package/dist/components/marquee/marquee.d.ts +8 -0
- package/dist/components/marquee/marquee.js +7 -0
- package/dist/components/marquee/use-marquee-context.d.ts +4 -0
- package/dist/components/marquee/use-marquee-context.js +5 -0
- package/dist/components/marquee/use-marquee.svelte.d.ts +9 -0
- package/dist/components/marquee/use-marquee.svelte.js +20 -0
- package/package.json +72 -71
|
@@ -18,6 +18,7 @@ export { fileUploadAnatomy } from './file-upload/file-upload.anatomy';
|
|
|
18
18
|
export { floatingPanelAnatomy } from './floating-panel/floating-panel.anatomy';
|
|
19
19
|
export { hoverCardAnatomy } from './hover-card/hover-card.anatomy';
|
|
20
20
|
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
21
|
+
export { marqueeAnatomy } from './marquee/marquee.anatomy';
|
|
21
22
|
export { menuAnatomy } from './menu/menu.anatomy';
|
|
22
23
|
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
23
24
|
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
|
@@ -18,6 +18,7 @@ export { fileUploadAnatomy } from './file-upload/file-upload.anatomy';
|
|
|
18
18
|
export { floatingPanelAnatomy } from './floating-panel/floating-panel.anatomy';
|
|
19
19
|
export { hoverCardAnatomy } from './hover-card/hover-card.anatomy';
|
|
20
20
|
export { listboxAnatomy } from './listbox/listbox.anatomy';
|
|
21
|
+
export { marqueeAnatomy } from './marquee/marquee.anatomy';
|
|
21
22
|
export { menuAnatomy } from './menu/menu.anatomy';
|
|
22
23
|
export { numberInputAnatomy } from './number-input/number-input.anatomy';
|
|
23
24
|
export { paginationAnatomy } from './pagination/pagination.anatomy';
|
package/dist/components/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type { PauseStatusDetails as MarqueePauseStatusDetails, Side as MarqueeSide } from '@zag-js/marquee';
|
|
2
|
+
export { default as MarqueeContent, type MarqueeContentBaseProps, type MarqueeContentProps, } from './marquee-content.svelte';
|
|
3
|
+
export { default as MarqueeContext, type MarqueeContextProps } from './marquee-context.svelte';
|
|
4
|
+
export { default as MarqueeEdge, type MarqueeEdgeBaseProps, type MarqueeEdgeProps } from './marquee-edge.svelte';
|
|
5
|
+
export { default as MarqueeItem, type MarqueeItemBaseProps, type MarqueeItemProps } from './marquee-item.svelte';
|
|
6
|
+
export { default as MarqueeRoot, type MarqueeRootBaseProps, type MarqueeRootProps } from './marquee-root.svelte';
|
|
7
|
+
export { default as MarqueeRootProvider, type MarqueeRootProviderBaseProps, type MarqueeRootProviderProps, } from './marquee-root-provider.svelte';
|
|
8
|
+
export { default as MarqueeViewport, type MarqueeViewportBaseProps, type MarqueeViewportProps, } from './marquee-viewport.svelte';
|
|
9
|
+
export { marqueeAnatomy } from './marquee.anatomy';
|
|
10
|
+
export { useMarquee, type UseMarqueeProps, type UseMarqueeReturn } from './use-marquee.svelte';
|
|
11
|
+
export { useMarqueeContext, type UseMarqueeContext } from './use-marquee-context';
|
|
12
|
+
export * as Marquee from './marquee';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as MarqueeContent, } from './marquee-content.svelte';
|
|
2
|
+
export { default as MarqueeContext } from './marquee-context.svelte';
|
|
3
|
+
export { default as MarqueeEdge } from './marquee-edge.svelte';
|
|
4
|
+
export { default as MarqueeItem } from './marquee-item.svelte';
|
|
5
|
+
export { default as MarqueeRoot } from './marquee-root.svelte';
|
|
6
|
+
export { default as MarqueeRootProvider, } from './marquee-root-provider.svelte';
|
|
7
|
+
export { default as MarqueeViewport, } from './marquee-viewport.svelte';
|
|
8
|
+
export { marqueeAnatomy } from './marquee.anatomy';
|
|
9
|
+
export { useMarquee } from './use-marquee.svelte';
|
|
10
|
+
export { useMarqueeContext } from './use-marquee-context';
|
|
11
|
+
export * as Marquee from './marquee';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { HTMLProps, PolymorphicProps, RefAttribute } from '../../types'
|
|
3
|
+
import type { Snippet } from 'svelte'
|
|
4
|
+
|
|
5
|
+
export interface MarqueeContentBaseProps extends PolymorphicProps<'div'>, RefAttribute {
|
|
6
|
+
children?: Snippet
|
|
7
|
+
}
|
|
8
|
+
export interface MarqueeContentProps extends HTMLProps<'div'>, MarqueeContentBaseProps {}
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { useMarqueeContext } from './use-marquee-context'
|
|
13
|
+
import { mergeProps } from '@zag-js/svelte'
|
|
14
|
+
import { Ark } from '../factory'
|
|
15
|
+
|
|
16
|
+
let { ref = $bindable(null), children, ...props }: MarqueeContentProps = $props()
|
|
17
|
+
|
|
18
|
+
const marquee = useMarqueeContext()
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
{#each Array.from({ length: marquee().contentCount }) as _, index (index)}
|
|
22
|
+
{@const mergedProps = mergeProps(marquee().getContentProps({ index }), props)}
|
|
23
|
+
{#if index === 0}
|
|
24
|
+
<Ark as="div" bind:ref {...mergedProps}>
|
|
25
|
+
{#if children}
|
|
26
|
+
{@render children()}
|
|
27
|
+
{/if}
|
|
28
|
+
</Ark>
|
|
29
|
+
{:else}
|
|
30
|
+
<Ark as="div" {...mergedProps}>
|
|
31
|
+
{#if children}
|
|
32
|
+
{@render children()}
|
|
33
|
+
{/if}
|
|
34
|
+
</Ark>
|
|
35
|
+
{/if}
|
|
36
|
+
{/each}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLProps, PolymorphicProps, RefAttribute } from '../../types';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
export interface MarqueeContentBaseProps extends PolymorphicProps<'div'>, RefAttribute {
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
}
|
|
6
|
+
export interface MarqueeContentProps extends HTMLProps<'div'>, MarqueeContentBaseProps {
|
|
7
|
+
}
|
|
8
|
+
declare const MarqueeContent: import("svelte").Component<MarqueeContentProps, {}, "ref">;
|
|
9
|
+
type MarqueeContent = ReturnType<typeof MarqueeContent>;
|
|
10
|
+
export default MarqueeContent;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
import type { UseMarqueeContext } from './use-marquee-context'
|
|
4
|
+
|
|
5
|
+
export interface MarqueeContextProps {
|
|
6
|
+
children: Snippet<[UseMarqueeContext]>
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { useMarqueeContext } from './use-marquee-context'
|
|
12
|
+
|
|
13
|
+
let { children }: MarqueeContextProps = $props()
|
|
14
|
+
|
|
15
|
+
const context = useMarqueeContext()
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
{@render children(context)}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { UseMarqueeContext } from './use-marquee-context';
|
|
3
|
+
export interface MarqueeContextProps {
|
|
4
|
+
children: Snippet<[UseMarqueeContext]>;
|
|
5
|
+
}
|
|
6
|
+
declare const MarqueeContext: import("svelte").Component<MarqueeContextProps, {}, "">;
|
|
7
|
+
type MarqueeContext = ReturnType<typeof MarqueeContext>;
|
|
8
|
+
export default MarqueeContext;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { EdgeProps } from '@zag-js/marquee'
|
|
3
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types'
|
|
4
|
+
|
|
5
|
+
export interface MarqueeEdgeBaseProps extends EdgeProps, PolymorphicProps<'div'>, RefAttribute {}
|
|
6
|
+
export interface MarqueeEdgeProps extends Assign<HTMLProps<'div'>, MarqueeEdgeBaseProps> {}
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { mergeProps } from '@zag-js/svelte'
|
|
11
|
+
import { createSplitProps } from '../../utils/create-split-props'
|
|
12
|
+
import { Ark } from '../factory'
|
|
13
|
+
import { useMarqueeContext } from './use-marquee-context'
|
|
14
|
+
|
|
15
|
+
let { ref = $bindable(null), ...props }: MarqueeEdgeProps = $props()
|
|
16
|
+
|
|
17
|
+
const [edgeProps, localProps] = $derived(createSplitProps<EdgeProps>()(props, ['side']))
|
|
18
|
+
const marquee = useMarqueeContext()
|
|
19
|
+
const mergedProps = $derived(mergeProps(marquee().getEdgeProps(edgeProps), localProps))
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<Ark as="div" bind:ref {...mergedProps} />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EdgeProps } from '@zag-js/marquee';
|
|
2
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types';
|
|
3
|
+
export interface MarqueeEdgeBaseProps extends EdgeProps, PolymorphicProps<'div'>, RefAttribute {
|
|
4
|
+
}
|
|
5
|
+
export interface MarqueeEdgeProps extends Assign<HTMLProps<'div'>, MarqueeEdgeBaseProps> {
|
|
6
|
+
}
|
|
7
|
+
declare const MarqueeEdge: import("svelte").Component<MarqueeEdgeProps, {}, "ref">;
|
|
8
|
+
type MarqueeEdge = ReturnType<typeof MarqueeEdge>;
|
|
9
|
+
export default MarqueeEdge;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types'
|
|
3
|
+
|
|
4
|
+
export interface MarqueeItemBaseProps extends PolymorphicProps<'div'>, RefAttribute {}
|
|
5
|
+
export interface MarqueeItemProps extends Assign<HTMLProps<'div'>, MarqueeItemBaseProps> {}
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { mergeProps } from '@zag-js/svelte'
|
|
10
|
+
import { Ark } from '../factory'
|
|
11
|
+
import { useMarqueeContext } from './use-marquee-context'
|
|
12
|
+
|
|
13
|
+
let { ref = $bindable(null), ...props }: MarqueeItemProps = $props()
|
|
14
|
+
|
|
15
|
+
const marquee = useMarqueeContext()
|
|
16
|
+
const mergedProps = $derived(mergeProps(marquee().getItemProps(), props))
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Ark as="div" bind:ref {...mergedProps} />
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types';
|
|
2
|
+
export interface MarqueeItemBaseProps extends PolymorphicProps<'div'>, RefAttribute {
|
|
3
|
+
}
|
|
4
|
+
export interface MarqueeItemProps extends Assign<HTMLProps<'div'>, MarqueeItemBaseProps> {
|
|
5
|
+
}
|
|
6
|
+
declare const MarqueeItem: import("svelte").Component<MarqueeItemProps, {}, "ref">;
|
|
7
|
+
type MarqueeItem = ReturnType<typeof MarqueeItem>;
|
|
8
|
+
export default MarqueeItem;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types'
|
|
3
|
+
import type { UseMarqueeReturn } from './use-marquee.svelte'
|
|
4
|
+
|
|
5
|
+
interface RootProviderProps {
|
|
6
|
+
value: UseMarqueeReturn
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface MarqueeRootProviderBaseProps extends RootProviderProps, PolymorphicProps<'div'>, RefAttribute {}
|
|
10
|
+
export interface MarqueeRootProviderProps extends Assign<HTMLProps<'div'>, MarqueeRootProviderBaseProps> {}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<script lang="ts">
|
|
14
|
+
import { mergeProps } from '@zag-js/svelte'
|
|
15
|
+
import { Ark } from '../factory'
|
|
16
|
+
import { MarqueeProvider } from './use-marquee-context'
|
|
17
|
+
|
|
18
|
+
let { ref = $bindable(null), ...props }: MarqueeRootProviderProps = $props()
|
|
19
|
+
const { value: marquee, ...localProps } = props
|
|
20
|
+
const mergedProps = $derived(mergeProps(marquee().getRootProps(), localProps))
|
|
21
|
+
|
|
22
|
+
MarqueeProvider(marquee)
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<Ark as="div" bind:ref {...mergedProps} />
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types';
|
|
2
|
+
import type { UseMarqueeReturn } from './use-marquee.svelte';
|
|
3
|
+
interface RootProviderProps {
|
|
4
|
+
value: UseMarqueeReturn;
|
|
5
|
+
}
|
|
6
|
+
export interface MarqueeRootProviderBaseProps extends RootProviderProps, PolymorphicProps<'div'>, RefAttribute {
|
|
7
|
+
}
|
|
8
|
+
export interface MarqueeRootProviderProps extends Assign<HTMLProps<'div'>, MarqueeRootProviderBaseProps> {
|
|
9
|
+
}
|
|
10
|
+
declare const MarqueeRootProvider: import("svelte").Component<MarqueeRootProviderProps, {}, "ref">;
|
|
11
|
+
type MarqueeRootProvider = ReturnType<typeof MarqueeRootProvider>;
|
|
12
|
+
export default MarqueeRootProvider;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Assign, HTMLProps, Optional, PolymorphicProps, RefAttribute } from '../../types'
|
|
3
|
+
import type { UseMarqueeProps } from './use-marquee.svelte'
|
|
4
|
+
|
|
5
|
+
export interface MarqueeRootBaseProps extends Optional<UseMarqueeProps, 'id'>, PolymorphicProps<'div'>, RefAttribute {}
|
|
6
|
+
export interface MarqueeRootProps extends Assign<HTMLProps<'div'>, MarqueeRootBaseProps> {}
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { mergeProps } from '@zag-js/svelte'
|
|
11
|
+
import { createSplitProps } from '../../utils/create-split-props'
|
|
12
|
+
import { Ark } from '../factory'
|
|
13
|
+
import { MarqueeProvider } from './use-marquee-context'
|
|
14
|
+
import { useMarquee } from './use-marquee.svelte'
|
|
15
|
+
|
|
16
|
+
let { ref = $bindable(null), ...props }: MarqueeRootProps = $props()
|
|
17
|
+
const providedId = $props.id()
|
|
18
|
+
|
|
19
|
+
const [useMarqueeProps, localProps] = $derived(
|
|
20
|
+
createSplitProps<Optional<UseMarqueeProps, 'id'>>()(props, [
|
|
21
|
+
'autoFill',
|
|
22
|
+
'defaultPaused',
|
|
23
|
+
'delay',
|
|
24
|
+
'id',
|
|
25
|
+
'ids',
|
|
26
|
+
'loopCount',
|
|
27
|
+
'onComplete',
|
|
28
|
+
'onLoopComplete',
|
|
29
|
+
'onPauseChange',
|
|
30
|
+
'paused',
|
|
31
|
+
'pauseOnInteraction',
|
|
32
|
+
'reverse',
|
|
33
|
+
'side',
|
|
34
|
+
'spacing',
|
|
35
|
+
'speed',
|
|
36
|
+
'translations',
|
|
37
|
+
]),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
const resolvedProps = $derived({
|
|
41
|
+
...useMarqueeProps,
|
|
42
|
+
id: providedId,
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const marquee = useMarquee(() => resolvedProps)
|
|
46
|
+
const mergedProps = $derived(mergeProps(marquee().getRootProps(), localProps))
|
|
47
|
+
|
|
48
|
+
MarqueeProvider(marquee)
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<Ark as="div" bind:ref {...mergedProps} />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Assign, HTMLProps, Optional, PolymorphicProps, RefAttribute } from '../../types';
|
|
2
|
+
import type { UseMarqueeProps } from './use-marquee.svelte';
|
|
3
|
+
export interface MarqueeRootBaseProps extends Optional<UseMarqueeProps, 'id'>, PolymorphicProps<'div'>, RefAttribute {
|
|
4
|
+
}
|
|
5
|
+
export interface MarqueeRootProps extends Assign<HTMLProps<'div'>, MarqueeRootBaseProps> {
|
|
6
|
+
}
|
|
7
|
+
declare const MarqueeRoot: import("svelte").Component<MarqueeRootProps, {}, "ref">;
|
|
8
|
+
type MarqueeRoot = ReturnType<typeof MarqueeRoot>;
|
|
9
|
+
export default MarqueeRoot;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types'
|
|
3
|
+
|
|
4
|
+
export interface MarqueeViewportBaseProps extends PolymorphicProps<'div'>, RefAttribute {}
|
|
5
|
+
export interface MarqueeViewportProps extends Assign<HTMLProps<'div'>, MarqueeViewportBaseProps> {}
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { mergeProps } from '@zag-js/svelte'
|
|
10
|
+
import { Ark } from '../factory'
|
|
11
|
+
import { useMarqueeContext } from './use-marquee-context'
|
|
12
|
+
|
|
13
|
+
let { ref = $bindable(null), ...props }: MarqueeViewportProps = $props()
|
|
14
|
+
|
|
15
|
+
const marquee = useMarqueeContext()
|
|
16
|
+
const mergedProps = $derived(mergeProps(marquee().getViewportProps(), props))
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Ark as="div" bind:ref {...mergedProps} />
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types';
|
|
2
|
+
export interface MarqueeViewportBaseProps extends PolymorphicProps<'div'>, RefAttribute {
|
|
3
|
+
}
|
|
4
|
+
export interface MarqueeViewportProps extends Assign<HTMLProps<'div'>, MarqueeViewportBaseProps> {
|
|
5
|
+
}
|
|
6
|
+
declare const MarqueeViewport: import("svelte").Component<MarqueeViewportProps, {}, "ref">;
|
|
7
|
+
type MarqueeViewport = ReturnType<typeof MarqueeViewport>;
|
|
8
|
+
export default MarqueeViewport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { anatomy as marqueeAnatomy } from '@zag-js/marquee';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { anatomy as marqueeAnatomy } from '@zag-js/marquee';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { PauseStatusDetails, Side } from '@zag-js/marquee';
|
|
2
|
+
export { default as Content, type MarqueeContentBaseProps as ContentBaseProps, type MarqueeContentProps as ContentProps, } from './marquee-content.svelte';
|
|
3
|
+
export { default as Context, type MarqueeContextProps as ContextProps } from './marquee-context.svelte';
|
|
4
|
+
export { default as Edge, type MarqueeEdgeBaseProps as EdgeBaseProps, type MarqueeEdgeProps as EdgeProps, } from './marquee-edge.svelte';
|
|
5
|
+
export { default as Item, type MarqueeItemBaseProps as ItemBaseProps, type MarqueeItemProps as ItemProps, } from './marquee-item.svelte';
|
|
6
|
+
export { default as Root, type MarqueeRootBaseProps as RootBaseProps, type MarqueeRootProps as RootProps, } from './marquee-root.svelte';
|
|
7
|
+
export { default as RootProvider, type MarqueeRootProviderBaseProps as RootProviderBaseProps, type MarqueeRootProviderProps as RootProviderProps, } from './marquee-root-provider.svelte';
|
|
8
|
+
export { default as Viewport, type MarqueeViewportBaseProps as ViewportBaseProps, type MarqueeViewportProps as ViewportProps, } from './marquee-viewport.svelte';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Content, } from './marquee-content.svelte';
|
|
2
|
+
export { default as Context } from './marquee-context.svelte';
|
|
3
|
+
export { default as Edge, } from './marquee-edge.svelte';
|
|
4
|
+
export { default as Item, } from './marquee-item.svelte';
|
|
5
|
+
export { default as Root, } from './marquee-root.svelte';
|
|
6
|
+
export { default as RootProvider, } from './marquee-root-provider.svelte';
|
|
7
|
+
export { default as Viewport, } from './marquee-viewport.svelte';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { UseMarqueeReturn } from './use-marquee.svelte';
|
|
2
|
+
export interface UseMarqueeContext extends UseMarqueeReturn {
|
|
3
|
+
}
|
|
4
|
+
export declare const MarqueeProvider: (opts: UseMarqueeContext) => void, useMarqueeContext: (fallback?: UseMarqueeContext | undefined) => UseMarqueeContext;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Accessor } from '../../types';
|
|
2
|
+
import * as marquee from '@zag-js/marquee';
|
|
3
|
+
import { type PropTypes } from '@zag-js/svelte';
|
|
4
|
+
import { type MaybeFunction } from '@zag-js/utils';
|
|
5
|
+
export interface UseMarqueeProps extends Omit<marquee.Props, 'dir' | 'getRootNode'> {
|
|
6
|
+
}
|
|
7
|
+
export interface UseMarqueeReturn extends Accessor<marquee.Api<PropTypes>> {
|
|
8
|
+
}
|
|
9
|
+
export declare const useMarquee: (props: MaybeFunction<UseMarqueeProps>) => () => marquee.Api<PropTypes>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useEnvironmentContext } from '../../providers/environment';
|
|
2
|
+
import { useLocaleContext } from '../../providers/locale';
|
|
3
|
+
import * as marquee from '@zag-js/marquee';
|
|
4
|
+
import { normalizeProps, useMachine } from '@zag-js/svelte';
|
|
5
|
+
import { runIfFn } from '@zag-js/utils';
|
|
6
|
+
export const useMarquee = (props) => {
|
|
7
|
+
const env = useEnvironmentContext();
|
|
8
|
+
const locale = useLocaleContext();
|
|
9
|
+
const machineProps = $derived.by(() => {
|
|
10
|
+
const resolvedProps = runIfFn(props);
|
|
11
|
+
return {
|
|
12
|
+
dir: locale().dir,
|
|
13
|
+
getRootNode: env().getRootNode,
|
|
14
|
+
...resolvedProps,
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
const service = useMachine(marquee.machine, () => machineProps);
|
|
18
|
+
const api = $derived(marquee.connect(service, normalizeProps));
|
|
19
|
+
return () => api;
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark-ui/svelte",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.12.1",
|
|
5
5
|
"description": "A collection of unstyled, accessible UI components for Svelte",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"accordion",
|
|
@@ -137,76 +137,77 @@
|
|
|
137
137
|
"sideEffects": false,
|
|
138
138
|
"dependencies": {
|
|
139
139
|
"@internationalized/date": "3.10.0",
|
|
140
|
-
"@zag-js/accordion": "1.
|
|
141
|
-
"@zag-js/anatomy": "1.
|
|
142
|
-
"@zag-js/angle-slider": "1.
|
|
143
|
-
"@zag-js/async-list": "1.
|
|
144
|
-
"@zag-js/auto-resize": "1.
|
|
145
|
-
"@zag-js/avatar": "1.
|
|
146
|
-
"@zag-js/bottom-sheet": "1.
|
|
147
|
-
"@zag-js/carousel": "1.
|
|
148
|
-
"@zag-js/checkbox": "1.
|
|
149
|
-
"@zag-js/clipboard": "1.
|
|
150
|
-
"@zag-js/collapsible": "1.
|
|
151
|
-
"@zag-js/collection": "1.
|
|
152
|
-
"@zag-js/color-picker": "1.
|
|
153
|
-
"@zag-js/color-utils": "1.
|
|
154
|
-
"@zag-js/combobox": "1.
|
|
155
|
-
"@zag-js/core": "1.
|
|
156
|
-
"@zag-js/date-picker": "1.
|
|
157
|
-
"@zag-js/date-utils": "1.
|
|
158
|
-
"@zag-js/dialog": "1.
|
|
159
|
-
"@zag-js/dom-query": "1.
|
|
160
|
-
"@zag-js/editable": "1.
|
|
161
|
-
"@zag-js/file-upload": "1.
|
|
162
|
-
"@zag-js/file-utils": "1.
|
|
163
|
-
"@zag-js/floating-panel": "1.
|
|
164
|
-
"@zag-js/focus-trap": "1.
|
|
165
|
-
"@zag-js/highlight-word": "1.
|
|
166
|
-
"@zag-js/hover-card": "1.
|
|
167
|
-
"@zag-js/i18n-utils": "1.
|
|
168
|
-
"@zag-js/json-tree-utils": "1.
|
|
169
|
-
"@zag-js/listbox": "1.
|
|
170
|
-
"@zag-js/
|
|
171
|
-
"@zag-js/
|
|
172
|
-
"@zag-js/
|
|
173
|
-
"@zag-js/
|
|
174
|
-
"@zag-js/
|
|
175
|
-
"@zag-js/
|
|
176
|
-
"@zag-js/
|
|
177
|
-
"@zag-js/
|
|
178
|
-
"@zag-js/
|
|
179
|
-
"@zag-js/
|
|
180
|
-
"@zag-js/
|
|
181
|
-
"@zag-js/
|
|
182
|
-
"@zag-js/
|
|
183
|
-
"@zag-js/
|
|
184
|
-
"@zag-js/
|
|
185
|
-
"@zag-js/
|
|
186
|
-
"@zag-js/
|
|
187
|
-
"@zag-js/
|
|
188
|
-
"@zag-js/
|
|
189
|
-
"@zag-js/
|
|
190
|
-
"@zag-js/
|
|
191
|
-
"@zag-js/
|
|
192
|
-
"@zag-js/
|
|
193
|
-
"@zag-js/
|
|
194
|
-
"@zag-js/toggle
|
|
195
|
-
"@zag-js/
|
|
196
|
-
"@zag-js/
|
|
197
|
-
"@zag-js/
|
|
198
|
-
"@zag-js/
|
|
199
|
-
"@zag-js/
|
|
140
|
+
"@zag-js/accordion": "1.27.0",
|
|
141
|
+
"@zag-js/anatomy": "1.27.0",
|
|
142
|
+
"@zag-js/angle-slider": "1.27.0",
|
|
143
|
+
"@zag-js/async-list": "1.27.0",
|
|
144
|
+
"@zag-js/auto-resize": "1.27.0",
|
|
145
|
+
"@zag-js/avatar": "1.27.0",
|
|
146
|
+
"@zag-js/bottom-sheet": "1.27.0",
|
|
147
|
+
"@zag-js/carousel": "1.27.0",
|
|
148
|
+
"@zag-js/checkbox": "1.27.0",
|
|
149
|
+
"@zag-js/clipboard": "1.27.0",
|
|
150
|
+
"@zag-js/collapsible": "1.27.0",
|
|
151
|
+
"@zag-js/collection": "1.27.0",
|
|
152
|
+
"@zag-js/color-picker": "1.27.0",
|
|
153
|
+
"@zag-js/color-utils": "1.27.0",
|
|
154
|
+
"@zag-js/combobox": "1.27.0",
|
|
155
|
+
"@zag-js/core": "1.27.0",
|
|
156
|
+
"@zag-js/date-picker": "1.27.0",
|
|
157
|
+
"@zag-js/date-utils": "1.27.0",
|
|
158
|
+
"@zag-js/dialog": "1.27.0",
|
|
159
|
+
"@zag-js/dom-query": "1.27.0",
|
|
160
|
+
"@zag-js/editable": "1.27.0",
|
|
161
|
+
"@zag-js/file-upload": "1.27.0",
|
|
162
|
+
"@zag-js/file-utils": "1.27.0",
|
|
163
|
+
"@zag-js/floating-panel": "1.27.0",
|
|
164
|
+
"@zag-js/focus-trap": "1.27.0",
|
|
165
|
+
"@zag-js/highlight-word": "1.27.0",
|
|
166
|
+
"@zag-js/hover-card": "1.27.0",
|
|
167
|
+
"@zag-js/i18n-utils": "1.27.0",
|
|
168
|
+
"@zag-js/json-tree-utils": "1.27.0",
|
|
169
|
+
"@zag-js/listbox": "1.27.0",
|
|
170
|
+
"@zag-js/marquee": "1.27.0",
|
|
171
|
+
"@zag-js/menu": "1.27.0",
|
|
172
|
+
"@zag-js/number-input": "1.27.0",
|
|
173
|
+
"@zag-js/pagination": "1.27.0",
|
|
174
|
+
"@zag-js/password-input": "1.27.0",
|
|
175
|
+
"@zag-js/pin-input": "1.27.0",
|
|
176
|
+
"@zag-js/popover": "1.27.0",
|
|
177
|
+
"@zag-js/presence": "1.27.0",
|
|
178
|
+
"@zag-js/progress": "1.27.0",
|
|
179
|
+
"@zag-js/qr-code": "1.27.0",
|
|
180
|
+
"@zag-js/radio-group": "1.27.0",
|
|
181
|
+
"@zag-js/rating-group": "1.27.0",
|
|
182
|
+
"@zag-js/scroll-area": "1.27.0",
|
|
183
|
+
"@zag-js/select": "1.27.0",
|
|
184
|
+
"@zag-js/signature-pad": "1.27.0",
|
|
185
|
+
"@zag-js/slider": "1.27.0",
|
|
186
|
+
"@zag-js/splitter": "1.27.0",
|
|
187
|
+
"@zag-js/steps": "1.27.0",
|
|
188
|
+
"@zag-js/svelte": "1.27.0",
|
|
189
|
+
"@zag-js/switch": "1.27.0",
|
|
190
|
+
"@zag-js/tabs": "1.27.0",
|
|
191
|
+
"@zag-js/tags-input": "1.27.0",
|
|
192
|
+
"@zag-js/timer": "1.27.0",
|
|
193
|
+
"@zag-js/toast": "1.27.0",
|
|
194
|
+
"@zag-js/toggle": "1.27.0",
|
|
195
|
+
"@zag-js/toggle-group": "1.27.0",
|
|
196
|
+
"@zag-js/tooltip": "1.27.0",
|
|
197
|
+
"@zag-js/tour": "1.27.0",
|
|
198
|
+
"@zag-js/tree-view": "1.27.0",
|
|
199
|
+
"@zag-js/types": "1.27.0",
|
|
200
|
+
"@zag-js/utils": "1.27.0"
|
|
200
201
|
},
|
|
201
202
|
"devDependencies": {
|
|
202
|
-
"@storybook/addon-a11y": "9.1.
|
|
203
|
-
"@storybook/svelte": "9.1.
|
|
204
|
-
"@storybook/sveltekit": "9.1.
|
|
205
|
-
"@sveltejs/adapter-auto": "
|
|
206
|
-
"@sveltejs/kit": "2.
|
|
203
|
+
"@storybook/addon-a11y": "9.1.15",
|
|
204
|
+
"@storybook/svelte": "9.1.15",
|
|
205
|
+
"@storybook/sveltekit": "9.1.15",
|
|
206
|
+
"@sveltejs/adapter-auto": "7.0.0",
|
|
207
|
+
"@sveltejs/kit": "2.48.0",
|
|
207
208
|
"@sveltejs/package": "2.5.4",
|
|
208
209
|
"@sveltejs/vite-plugin-svelte": "6.2.1",
|
|
209
|
-
"@tanstack/svelte-form": "1.23.
|
|
210
|
+
"@tanstack/svelte-form": "1.23.8",
|
|
210
211
|
"@testing-library/dom": "10.4.1",
|
|
211
212
|
"@testing-library/jest-dom": "6.9.1",
|
|
212
213
|
"@testing-library/svelte": "5.2.8",
|
|
@@ -216,13 +217,13 @@
|
|
|
216
217
|
"clean-package": "2.2.0",
|
|
217
218
|
"image-conversion": "2.1.1",
|
|
218
219
|
"jsdom": "26.1.0",
|
|
219
|
-
"lucide-svelte": "0.
|
|
220
|
-
"storybook": "9.1.
|
|
221
|
-
"svelte": "5.
|
|
220
|
+
"lucide-svelte": "0.548.0",
|
|
221
|
+
"storybook": "9.1.15",
|
|
222
|
+
"svelte": "5.42.2",
|
|
222
223
|
"svelte-check": "4.3.3",
|
|
223
224
|
"tslib": "2.8.1",
|
|
224
225
|
"typescript": "5.9.3",
|
|
225
|
-
"vite": "7.1.
|
|
226
|
+
"vite": "7.1.12",
|
|
226
227
|
"vitest": "3.2.4",
|
|
227
228
|
"vitest-axe": "1.0.0-pre.5"
|
|
228
229
|
},
|