@multitrack/svelte 0.1.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/FixedStage.svelte +22 -0
- package/dist/FixedStage.svelte.d.ts +9 -0
- package/dist/FixedStage.svelte.d.ts.map +1 -0
- package/dist/MultitrackProvider.svelte +23 -0
- package/dist/MultitrackProvider.svelte.d.ts +12 -0
- package/dist/MultitrackProvider.svelte.d.ts.map +1 -0
- package/dist/ScrollContainer.svelte +21 -0
- package/dist/ScrollContainer.svelte.d.ts +9 -0
- package/dist/ScrollContainer.svelte.d.ts.map +1 -0
- package/dist/Show.svelte +17 -0
- package/dist/Show.svelte.d.ts +9 -0
- package/dist/Show.svelte.d.ts.map +1 -0
- package/dist/composables.svelte.d.ts +27 -0
- package/dist/composables.svelte.d.ts.map +1 -0
- package/dist/composables.svelte.js +49 -0
- package/dist/context.d.ts +11 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +1 -0
- package/dist/context.svelte.d.ts +14 -0
- package/dist/context.svelte.d.ts.map +1 -0
- package/dist/context.svelte.js +61 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/package.json +58 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
children: Snippet;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { class: className, children }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div
|
|
13
|
+
class={className}
|
|
14
|
+
style:position="fixed"
|
|
15
|
+
style:top="0"
|
|
16
|
+
style:left="0"
|
|
17
|
+
style:width="100%"
|
|
18
|
+
style:height="100vh"
|
|
19
|
+
style:touch-action="pan-y"
|
|
20
|
+
>
|
|
21
|
+
{@render children()}
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
class?: string;
|
|
4
|
+
children: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const FixedStage: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type FixedStage = ReturnType<typeof FixedStage>;
|
|
8
|
+
export default FixedStage;
|
|
9
|
+
//# sourceMappingURL=FixedStage.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixedStage.svelte.d.ts","sourceRoot":"","sources":["../src/FixedStage.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGpC,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAcH,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { StepConfig } from "@multitrack/core";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
import { onDestroy } from "svelte";
|
|
5
|
+
import { createMultitrackContext } from "./context.svelte.js";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
config: StepConfig[];
|
|
9
|
+
devtools?: boolean;
|
|
10
|
+
breakpoints?: Record<string, string>;
|
|
11
|
+
children: Snippet;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { config, devtools = false, breakpoints, children }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const ctx = createMultitrackContext({ config, devtools, breakpoints });
|
|
17
|
+
|
|
18
|
+
onDestroy(() => {
|
|
19
|
+
ctx._dispose();
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{@render children()}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StepConfig } from "@multitrack/core";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
interface Props {
|
|
4
|
+
config: StepConfig[];
|
|
5
|
+
devtools?: boolean;
|
|
6
|
+
breakpoints?: Record<string, string>;
|
|
7
|
+
children: Snippet;
|
|
8
|
+
}
|
|
9
|
+
declare const MultitrackProvider: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type MultitrackProvider = ReturnType<typeof MultitrackProvider>;
|
|
11
|
+
export default MultitrackProvider;
|
|
12
|
+
//# sourceMappingURL=MultitrackProvider.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultitrackProvider.svelte.d.ts","sourceRoot":"","sources":["../src/MultitrackProvider.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKpC,UAAU,KAAK;IACb,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAqBH,QAAA,MAAM,kBAAkB,2CAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import { useScrollProgress } from "./composables.svelte.js";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
class?: string;
|
|
7
|
+
children: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className, children }: Props = $props();
|
|
11
|
+
|
|
12
|
+
const { totalSteps } = useScrollProgress();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div
|
|
16
|
+
class={className}
|
|
17
|
+
style:height="{totalSteps * 100}vh"
|
|
18
|
+
style:position="relative"
|
|
19
|
+
>
|
|
20
|
+
{@render children()}
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
class?: string;
|
|
4
|
+
children: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const ScrollContainer: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type ScrollContainer = ReturnType<typeof ScrollContainer>;
|
|
8
|
+
export default ScrollContainer;
|
|
9
|
+
//# sourceMappingURL=ScrollContainer.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollContainer.svelte.d.ts","sourceRoot":"","sources":["../src/ScrollContainer.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIpC,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAiBH,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
package/dist/Show.svelte
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import { getMultitrackContext } from "./context.svelte.js";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
when: string;
|
|
7
|
+
children: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { when, children }: Props = $props();
|
|
11
|
+
|
|
12
|
+
const ctx = getMultitrackContext();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#if (ctx.opacities[when] ?? 0) > 0}
|
|
16
|
+
{@render children()}
|
|
17
|
+
{/if}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
when: string;
|
|
4
|
+
children: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const Show: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type Show = ReturnType<typeof Show>;
|
|
8
|
+
export default Show;
|
|
9
|
+
//# sourceMappingURL=Show.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Show.svelte.d.ts","sourceRoot":"","sources":["../src/Show.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIpC,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAiBH,QAAA,MAAM,IAAI,2CAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Timeline, Opacities } from "@multitrack/core";
|
|
2
|
+
/**
|
|
3
|
+
* Access the Timeline instance directly.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useTimeline(): Timeline;
|
|
6
|
+
/**
|
|
7
|
+
* Get current opacities for all steps.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useOpacities<T extends string = string>(): {
|
|
10
|
+
readonly current: Opacities<T>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Get opacity and active state for a single named step.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useStep(name: string): {
|
|
16
|
+
readonly opacity: number;
|
|
17
|
+
readonly isActive: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Get raw scroll progress and current step position.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useScrollProgress(): {
|
|
23
|
+
readonly scrollPercentage: number;
|
|
24
|
+
readonly currentStep: number;
|
|
25
|
+
readonly totalSteps: number;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=composables.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composables.svelte.d.ts","sourceRoot":"","sources":["../src/composables.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG5D;;GAEG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAEtC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,KAAK;IACzD,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CAChC,CAOA;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B,CAUA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAaA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { getMultitrackContext } from "./context.svelte.js";
|
|
2
|
+
/**
|
|
3
|
+
* Access the Timeline instance directly.
|
|
4
|
+
*/
|
|
5
|
+
export function useTimeline() {
|
|
6
|
+
return getMultitrackContext().timeline;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Get current opacities for all steps.
|
|
10
|
+
*/
|
|
11
|
+
export function useOpacities() {
|
|
12
|
+
const ctx = getMultitrackContext();
|
|
13
|
+
return {
|
|
14
|
+
get current() {
|
|
15
|
+
return ctx.opacities;
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get opacity and active state for a single named step.
|
|
21
|
+
*/
|
|
22
|
+
export function useStep(name) {
|
|
23
|
+
const ctx = getMultitrackContext();
|
|
24
|
+
return {
|
|
25
|
+
get opacity() {
|
|
26
|
+
return ctx.opacities[name] ?? 0;
|
|
27
|
+
},
|
|
28
|
+
get isActive() {
|
|
29
|
+
return (ctx.opacities[name] ?? 0) > 0;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get raw scroll progress and current step position.
|
|
35
|
+
*/
|
|
36
|
+
export function useScrollProgress() {
|
|
37
|
+
const ctx = getMultitrackContext();
|
|
38
|
+
return {
|
|
39
|
+
get scrollPercentage() {
|
|
40
|
+
return ctx.scrollPercentage;
|
|
41
|
+
},
|
|
42
|
+
get currentStep() {
|
|
43
|
+
return ctx.currentStep;
|
|
44
|
+
},
|
|
45
|
+
get totalSteps() {
|
|
46
|
+
return ctx.totalSteps;
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Timeline, Opacities, Step } from "@multitrack/core";
|
|
2
|
+
export interface MultitrackContextValue {
|
|
3
|
+
readonly timeline: Timeline;
|
|
4
|
+
readonly steps: Step[];
|
|
5
|
+
readonly totalSteps: number;
|
|
6
|
+
readonly scrollPercentage: number;
|
|
7
|
+
readonly currentStep: number;
|
|
8
|
+
readonly opacities: Opacities;
|
|
9
|
+
}
|
|
10
|
+
export declare const MULTITRACK_CTX_KEY: unique symbol;
|
|
11
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB,eAAuB,CAAC"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const MULTITRACK_CTX_KEY = Symbol("multitrack");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type StepConfig } from "@multitrack/core";
|
|
2
|
+
import { type MultitrackContextValue } from "./context.js";
|
|
3
|
+
export interface MultitrackContextOptions {
|
|
4
|
+
config: StepConfig[];
|
|
5
|
+
devtools?: boolean;
|
|
6
|
+
breakpoints?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
interface MultitrackContextWithDispose extends MultitrackContextValue {
|
|
9
|
+
_dispose(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function createMultitrackContext(options: MultitrackContextOptions): MultitrackContextWithDispose;
|
|
12
|
+
export declare function getMultitrackContext(): MultitrackContextValue;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=context.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.svelte.d.ts","sourceRoot":"","sources":["../src/context.svelte.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAsB,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE/E,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED,UAAU,4BAA6B,SAAQ,sBAAsB;IACnE,QAAQ,IAAI,IAAI,CAAC;CAClB;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,4BAA4B,CAyD9B;AAED,wBAAgB,oBAAoB,IAAI,sBAAsB,CAQ7D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { getContext, setContext } from "svelte";
|
|
2
|
+
import { Timeline } from "@multitrack/core";
|
|
3
|
+
import { MULTITRACK_CTX_KEY } from "./context.js";
|
|
4
|
+
export function createMultitrackContext(options) {
|
|
5
|
+
const timeline = new Timeline({
|
|
6
|
+
config: options.config,
|
|
7
|
+
devtools: options.devtools ?? false,
|
|
8
|
+
breakpoints: options.breakpoints,
|
|
9
|
+
});
|
|
10
|
+
let scrollPercentage = $state(0);
|
|
11
|
+
let currentStep = $state(0);
|
|
12
|
+
let opacities = $state(timeline.getOpacities(0));
|
|
13
|
+
let steps = $state(timeline.steps);
|
|
14
|
+
let totalSteps = $state(timeline.totalSteps);
|
|
15
|
+
const scope = timeline.scope(() => {
|
|
16
|
+
timeline.on("scroll", (payload) => {
|
|
17
|
+
scrollPercentage = payload.scrollPercentage;
|
|
18
|
+
currentStep = payload.currentStep;
|
|
19
|
+
opacities = timeline.getOpacities(payload.scrollPercentage);
|
|
20
|
+
});
|
|
21
|
+
timeline.on("timeline:reconfigure", () => {
|
|
22
|
+
steps = timeline.steps;
|
|
23
|
+
totalSteps = timeline.totalSteps;
|
|
24
|
+
opacities = timeline.getOpacities(timeline.scrollPercentage);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
timeline.start();
|
|
28
|
+
const value = {
|
|
29
|
+
get timeline() {
|
|
30
|
+
return timeline;
|
|
31
|
+
},
|
|
32
|
+
get steps() {
|
|
33
|
+
return steps;
|
|
34
|
+
},
|
|
35
|
+
get totalSteps() {
|
|
36
|
+
return totalSteps;
|
|
37
|
+
},
|
|
38
|
+
get scrollPercentage() {
|
|
39
|
+
return scrollPercentage;
|
|
40
|
+
},
|
|
41
|
+
get currentStep() {
|
|
42
|
+
return currentStep;
|
|
43
|
+
},
|
|
44
|
+
get opacities() {
|
|
45
|
+
return opacities;
|
|
46
|
+
},
|
|
47
|
+
_dispose() {
|
|
48
|
+
scope.dispose();
|
|
49
|
+
timeline.destroy();
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
setContext(MULTITRACK_CTX_KEY, value);
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
export function getMultitrackContext() {
|
|
56
|
+
const ctx = getContext(MULTITRACK_CTX_KEY);
|
|
57
|
+
if (!ctx) {
|
|
58
|
+
throw new Error("[@multitrack/svelte] Composables must be used within a <MultitrackProvider>");
|
|
59
|
+
}
|
|
60
|
+
return ctx;
|
|
61
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as MultitrackProvider } from "./MultitrackProvider.svelte";
|
|
2
|
+
export { useTimeline, useOpacities, useStep, useScrollProgress, } from "./composables.svelte.js";
|
|
3
|
+
export { default as ScrollContainer } from "./ScrollContainer.svelte";
|
|
4
|
+
export { default as FixedStage } from "./FixedStage.svelte";
|
|
5
|
+
export { default as Show } from "./Show.svelte";
|
|
6
|
+
export { createMultitrackContext, getMultitrackContext, } from "./context.svelte.js";
|
|
7
|
+
export type { StepConfig, Opacities, EasingPreset } from "@multitrack/core";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAG5E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,OAAO,EACP,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Provider
|
|
2
|
+
export { default as MultitrackProvider } from "./MultitrackProvider.svelte";
|
|
3
|
+
// Composables
|
|
4
|
+
export { useTimeline, useOpacities, useStep, useScrollProgress, } from "./composables.svelte.js";
|
|
5
|
+
// Components
|
|
6
|
+
export { default as ScrollContainer } from "./ScrollContainer.svelte";
|
|
7
|
+
export { default as FixedStage } from "./FixedStage.svelte";
|
|
8
|
+
export { default as Show } from "./Show.svelte";
|
|
9
|
+
// Context (advanced usage)
|
|
10
|
+
export { createMultitrackContext, getMultitrackContext, } from "./context.svelte.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@multitrack/svelte",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Svelte 5 bindings for @multitrack/core",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"svelte": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"svelte": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": ["dist"],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "svelte-package -i src -o dist",
|
|
18
|
+
"dev": "svelte-package -i src -o dist --watch"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"svelte": ">=5.0.0"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@multitrack/core": "workspace:^"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@sveltejs/package": "^2.0.0",
|
|
28
|
+
"svelte": "^5.46.4"
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"author": "Jack Hsu",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/jakhsu/multitrack.git",
|
|
36
|
+
"directory": "packages/svelte"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/jakhsu/multitrack/tree/main/packages/svelte",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/jakhsu/multitrack/issues"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"scroll-animation",
|
|
44
|
+
"scroll-driven",
|
|
45
|
+
"timeline",
|
|
46
|
+
"svelte",
|
|
47
|
+
"svelte5",
|
|
48
|
+
"runes",
|
|
49
|
+
"scrollytelling",
|
|
50
|
+
"multi-track"
|
|
51
|
+
],
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=20"
|
|
57
|
+
}
|
|
58
|
+
}
|