@senseihq/emaki-svelte 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +33 -2
- package/dist/MotionScene.svelte +26 -0
- package/dist/MotionScene.svelte.d.ts +12 -0
- package/dist/MotionShow.svelte +63 -0
- package/dist/MotionShow.svelte.d.ts +14 -0
- package/dist/ScenePlayer.svelte +45 -0
- package/dist/ScenePlayer.svelte.d.ts +9 -0
- package/dist/ShowPage.svelte +17 -0
- package/dist/ShowPage.svelte.d.ts +10 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/dist/player.svelte.d.ts +25 -0
- package/dist/player.svelte.js +31 -0
- package/package.json +44 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SenecaGlobal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @senseihq/emaki-svelte
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Svelte 5 components for motion stories, over `@senseihq/emaki`.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm i @senseihq/emaki @senseihq/emaki-svelte
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```svelte
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { MotionScene, MotionShow, ScenePlayer, ShowPage, ScenePlayerState } from '@senseihq/emaki-svelte';
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<MotionScene film="phishing-101" scene="signs" locale="es" /> <!-- an article figure: loops while visible -->
|
|
15
|
+
<div style="aspect-ratio:16/10"><MotionShow film="phishing-101" locale="es" bind:show /></div> <!-- the player -->
|
|
16
|
+
<ScenePlayer {player} controls /> <!-- a scene you drive (editors, previews) -->
|
|
17
|
+
<ShowPage film={data.film} capture={data.capture} layout={data.layout} locale={data.locale} /> <!-- /show/[film] -->
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Call `setupMotion({ source, site, logos })` once on the client before these mount (`emaki init` writes
|
|
21
|
+
`emaki-source.ts` with a `startMotion()` for this). In SvelteKit, set `ssr = false` on the `/show/[film]` route;
|
|
22
|
+
render the article text on the server and let the components hydrate.
|
|
23
|
+
|
|
24
|
+
| Component | Props |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `MotionScene` | `film`, `scene`, `layout` (`figure`), `locale`, `autoplay` (true) |
|
|
27
|
+
| `MotionShow` | `film`, `locale`, `layout` (`landscape`), `controls` (true), `slide`, `loop`, `bind:show` (state + controller) |
|
|
28
|
+
| `ScenePlayer` | `player: ScenePlayerState`, `locale`, `controls` |
|
|
29
|
+
| `ShowPage` | `film`, `layout`, `locale`, `capture` |
|
|
30
|
+
|
|
31
|
+
`reactivePlayer(() => player)` and `reactiveShow()` give Svelte-reactive reads of the core's state classes for your
|
|
32
|
+
own chrome. Keys on the player: ←/→ scene, Space play/pause, M sound, O orientation.
|
|
33
|
+
|
|
34
|
+
MIT © SenecaGlobal
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// An article figure: one scene, looping while it is on screen. <MotionScene film="..." scene="..." />
|
|
3
|
+
import { onMount, untrack } from 'svelte';
|
|
4
|
+
import { attachScene, figurePlayer, type Layout } from '@senseihq/emaki';
|
|
5
|
+
|
|
6
|
+
let { film, scene, layout = 'figure', locale = 'en', autoplay = true, class: cls = '' }:
|
|
7
|
+
{ film: string; scene: string; layout?: Layout; locale?: string; autoplay?: boolean; class?: string } = $props();
|
|
8
|
+
|
|
9
|
+
let host: HTMLDivElement;
|
|
10
|
+
let width = $state(0);
|
|
11
|
+
const player = figurePlayer({ film: '', scene: '', layout: 'figure' });
|
|
12
|
+
let view: ReturnType<typeof attachScene> | null = null;
|
|
13
|
+
|
|
14
|
+
onMount(() => {
|
|
15
|
+
player.load({ film, scene, layout });
|
|
16
|
+
view = attachScene(host, player, { locale, autoplay });
|
|
17
|
+
return () => view?.destroy();
|
|
18
|
+
});
|
|
19
|
+
$effect(() => { const ref = { film, scene, layout }; untrack(() => { if (view && (ref.film !== player.ref?.film || ref.scene !== player.ref?.scene || ref.layout !== player.ref?.layout)) player.load(ref); }); });
|
|
20
|
+
$effect(() => { view?.setLocale(locale); });
|
|
21
|
+
$effect(() => { if (width) view?.fit(width); });
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<div class="motion-scene {cls}" bind:clientWidth={width}><div bind:this={host}></div></div>
|
|
25
|
+
|
|
26
|
+
<style>.motion-scene { width: 100%; }</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Layout } from '@senseihq/emaki';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
film: string;
|
|
4
|
+
scene: string;
|
|
5
|
+
layout?: Layout;
|
|
6
|
+
locale?: string;
|
|
7
|
+
autoplay?: boolean;
|
|
8
|
+
class?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const MotionScene: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type MotionScene = ReturnType<typeof MotionScene>;
|
|
12
|
+
export default MotionScene;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// The story player: a film's scenes as slides, fitted to its box. Keys: ←/→ scene, Space play/pause, M sound,
|
|
3
|
+
// O orientation. Give it a size (it fills its parent). bind:show to drive it from your own chrome.
|
|
4
|
+
import { onMount, untrack } from 'svelte';
|
|
5
|
+
import { createShow, type Layout } from '@senseihq/emaki';
|
|
6
|
+
import { reactiveShow, type ShowHandle } from './player.svelte.js';
|
|
7
|
+
|
|
8
|
+
let { film, locale = 'en', layout = 'landscape', controls = true, slide = 1, loop = false, show = $bindable() }:
|
|
9
|
+
{ film: string; locale?: string; layout?: Layout; controls?: boolean; slide?: number; loop?: boolean; show?: ShowHandle } = $props();
|
|
10
|
+
|
|
11
|
+
let box: HTMLDivElement, stage: HTMLDivElement;
|
|
12
|
+
let w = $state(0), h = $state(0);
|
|
13
|
+
const s = reactiveShow();
|
|
14
|
+
|
|
15
|
+
// Each (re)start gets a ticket, so a slow createShow that a newer one overtook is thrown away.
|
|
16
|
+
let ticket = 0;
|
|
17
|
+
async function start() {
|
|
18
|
+
const mine = ++ticket;
|
|
19
|
+
s.detach();
|
|
20
|
+
const made = await createShow(stage, film, { locale, layout, slide, loop });
|
|
21
|
+
if (mine !== ticket) return made.destroy();
|
|
22
|
+
s.attach(made);
|
|
23
|
+
show = s;
|
|
24
|
+
made.fit(w, h);
|
|
25
|
+
}
|
|
26
|
+
onMount(() => () => { ticket++; s.detach(); });
|
|
27
|
+
// Starts on mount and restarts when the film or language changes (and on nothing else: untrack).
|
|
28
|
+
$effect(() => { film; locale; untrack(start); });
|
|
29
|
+
$effect(() => { if (s.api && s.layout !== layout) s.api.setLayout(layout); });
|
|
30
|
+
$effect(() => { s.layout; s.api?.fit(w, h); });
|
|
31
|
+
|
|
32
|
+
function onkeydown(e: KeyboardEvent) {
|
|
33
|
+
const a = s.api; if (!a) return;
|
|
34
|
+
const k = e.key.toLowerCase();
|
|
35
|
+
if (k === 'arrowright') a.next(); else if (k === 'arrowleft') a.prev();
|
|
36
|
+
else if (k === ' ') { a.toggle(); e.preventDefault(); }
|
|
37
|
+
else if (k === 'm') a.setSound(!s.sound);
|
|
38
|
+
else if (k === 'o') a.setLayout(s.layout === 'landscape' ? 'portrait' : 'landscape');
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<!-- svelte-ignore a11y_no_noninteractive_tabindex, a11y_no_noninteractive_element_interactions -->
|
|
43
|
+
<div class="motion-show" bind:this={box} tabindex="0" role="application" aria-label="Story player" {onkeydown}>
|
|
44
|
+
<div class="ms-fit" bind:clientWidth={w} bind:clientHeight={h}><div class="ms-stage" bind:this={stage}></div></div>
|
|
45
|
+
{#if controls && s.api}
|
|
46
|
+
<div class="ms-bar">
|
|
47
|
+
<button onclick={() => s.api?.prev()} aria-label="Previous scene">‹</button>
|
|
48
|
+
<button onclick={() => s.api?.toggle()} aria-label={s.playing ? 'Pause' : 'Play'}>{s.playing ? '❚❚' : '▶'}</button>
|
|
49
|
+
<button onclick={() => s.api?.next()} aria-label="Next scene">›</button>
|
|
50
|
+
<span class="ms-count">{s.index + 1} / {s.count}</span>
|
|
51
|
+
<button onclick={() => s.api?.setSound(!s.sound)} aria-pressed={s.sound}>{s.sound ? 'Sound on' : 'Sound off'}</button>
|
|
52
|
+
</div>
|
|
53
|
+
{/if}
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
.motion-show { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; outline: none; }
|
|
58
|
+
.ms-fit { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
|
|
59
|
+
.ms-stage { position: relative; }
|
|
60
|
+
.ms-bar { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 8px; font: 13px system-ui; }
|
|
61
|
+
.ms-bar button { min-width: 34px; height: 34px; border-radius: 17px; border: 1px solid currentColor; background: none; color: inherit; cursor: pointer; padding: 0 10px; }
|
|
62
|
+
.ms-count { font-variant-numeric: tabular-nums; opacity: .7; }
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Layout } from '@senseihq/emaki';
|
|
2
|
+
import { type ShowHandle } from './player.svelte.js';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
film: string;
|
|
5
|
+
locale?: string;
|
|
6
|
+
layout?: Layout;
|
|
7
|
+
controls?: boolean;
|
|
8
|
+
slide?: number;
|
|
9
|
+
loop?: boolean;
|
|
10
|
+
show?: ShowHandle;
|
|
11
|
+
};
|
|
12
|
+
declare const MotionShow: import("svelte").Component<$$ComponentProps, {}, "show">;
|
|
13
|
+
type MotionShow = ReturnType<typeof MotionShow>;
|
|
14
|
+
export default MotionShow;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// A scene driven by a ScenePlayerState you own (an editor, an admin preview, a step-through): the state holds what
|
|
3
|
+
// is loaded and where the playhead is; this mounts, renders and runs the clock. Remounts when player.key changes.
|
|
4
|
+
import { onMount } from 'svelte';
|
|
5
|
+
import { attachScene, type ScenePlayerState } from '@senseihq/emaki';
|
|
6
|
+
import { reactivePlayer } from './player.svelte.js';
|
|
7
|
+
|
|
8
|
+
let { player, locale = 'en', controls = false }: { player: ScenePlayerState; locale?: string; controls?: boolean } = $props();
|
|
9
|
+
const p = reactivePlayer(() => player);
|
|
10
|
+
let host: HTMLDivElement;
|
|
11
|
+
let width = $state(0);
|
|
12
|
+
let view: ReturnType<typeof attachScene> | null = null;
|
|
13
|
+
|
|
14
|
+
onMount(() => {
|
|
15
|
+
view = attachScene(host, player, { locale });
|
|
16
|
+
return () => view?.destroy();
|
|
17
|
+
});
|
|
18
|
+
$effect(() => { view?.setLocale(locale); });
|
|
19
|
+
$effect(() => { if (width) view?.fit(width); });
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<div class="motion-player" bind:clientWidth={width}>
|
|
23
|
+
<div bind:this={host}></div>
|
|
24
|
+
{#if p.status === 'error'}
|
|
25
|
+
<p class="mp-msg mp-error" role="alert">{p.error}</p>
|
|
26
|
+
{:else if p.status === 'idle'}
|
|
27
|
+
<p class="mp-msg">Loading the scene…</p>
|
|
28
|
+
{/if}
|
|
29
|
+
{#if controls && p.status === 'ready'}
|
|
30
|
+
<div class="mp-bar">
|
|
31
|
+
<button onclick={() => player.toggle()} aria-label={p.playing ? 'Pause' : 'Play'}>{p.playing ? '❚❚' : '▶'}</button>
|
|
32
|
+
<input type="range" aria-label="Seek" min="0" max={p.dur} step="0.05" value={p.t} oninput={(e) => player.seek(Number(e.currentTarget.value))} />
|
|
33
|
+
<span>{p.t.toFixed(1)} / {p.dur.toFixed(1)}</span>
|
|
34
|
+
</div>
|
|
35
|
+
{/if}
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<style>
|
|
39
|
+
.motion-player { position: relative; width: 100%; }
|
|
40
|
+
.mp-msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 14px system-ui; opacity: .7; }
|
|
41
|
+
.mp-error { color: #b42318; padding: 0 24px; text-align: center; opacity: 1; }
|
|
42
|
+
.mp-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; font: 12px ui-monospace, monospace; }
|
|
43
|
+
.mp-bar button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid currentColor; background: none; cursor: pointer; color: inherit; }
|
|
44
|
+
.mp-bar input { flex: 1; }
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ScenePlayerState } from '@senseihq/emaki';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
player: ScenePlayerState;
|
|
4
|
+
locale?: string;
|
|
5
|
+
controls?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const ScenePlayer: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type ScenePlayer = ReturnType<typeof ScenePlayer>;
|
|
9
|
+
export default ScenePlayer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// The capture page the video pipeline drives (`emaki render` opens /show/<film>?capture=1&o=landscape&lang=en):
|
|
3
|
+
// the stage at 1:1, no chrome, window.__show = { meta, ready, seek, audio }. Turn SSR off for this route.
|
|
4
|
+
import { onMount } from 'svelte';
|
|
5
|
+
import { installCapture, type Layout } from '@senseihq/emaki';
|
|
6
|
+
import MotionShow from './MotionShow.svelte';
|
|
7
|
+
|
|
8
|
+
let { film, layout = 'landscape', locale = 'en', capture = false }: { film: string; layout?: Layout; locale?: string; capture?: boolean } = $props();
|
|
9
|
+
let host: HTMLDivElement | undefined = $state();
|
|
10
|
+
onMount(() => { if (capture && host) installCapture(host, film, layout, locale); });
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
{#if capture}
|
|
14
|
+
<div bind:this={host}></div>
|
|
15
|
+
{:else}
|
|
16
|
+
<div style="position:fixed;inset:0"><MotionShow {film} {layout} {locale} /></div>
|
|
17
|
+
{/if}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Layout } from '@senseihq/emaki';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
film: string;
|
|
4
|
+
layout?: Layout;
|
|
5
|
+
locale?: string;
|
|
6
|
+
capture?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const ShowPage: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type ShowPage = ReturnType<typeof ShowPage>;
|
|
10
|
+
export default ShowPage;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as MotionScene } from './MotionScene.svelte';
|
|
2
|
+
export { default as MotionShow } from './MotionShow.svelte';
|
|
3
|
+
export { default as ScenePlayer } from './ScenePlayer.svelte';
|
|
4
|
+
export { default as ShowPage } from './ShowPage.svelte';
|
|
5
|
+
export { reactivePlayer, reactiveShow, type ShowHandle } from './player.svelte.js';
|
|
6
|
+
export { setupMotion, ScenePlayerState, type MotionSetup } from '@senseihq/emaki';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Svelte 5 components over @senseihq/emaki. Call setupMotion({ source, site, logos }) once on the client first.
|
|
2
|
+
export { default as MotionScene } from './MotionScene.svelte';
|
|
3
|
+
export { default as MotionShow } from './MotionShow.svelte';
|
|
4
|
+
export { default as ScenePlayer } from './ScenePlayer.svelte';
|
|
5
|
+
export { default as ShowPage } from './ShowPage.svelte';
|
|
6
|
+
export { reactivePlayer, reactiveShow } from './player.svelte.js';
|
|
7
|
+
export { setupMotion, ScenePlayerState } from '@senseihq/emaki';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { createShow, ScenePlayerState } from '@senseihq/emaki';
|
|
2
|
+
/** Reactive reads of a ScenePlayerState: `p.t`, `p.playing`, `p.status` update the UI as the player changes. */
|
|
3
|
+
export declare function reactivePlayer(get: () => ScenePlayerState): {
|
|
4
|
+
readonly t: any;
|
|
5
|
+
readonly dur: any;
|
|
6
|
+
readonly status: any;
|
|
7
|
+
readonly error: any;
|
|
8
|
+
readonly playing: any;
|
|
9
|
+
readonly key: any;
|
|
10
|
+
readonly ref: any;
|
|
11
|
+
};
|
|
12
|
+
type Show = Awaited<ReturnType<typeof createShow>>;
|
|
13
|
+
export type ShowHandle = ReturnType<typeof reactiveShow>;
|
|
14
|
+
/** Reactive state of a story player (createShow): index, playing, sound, layout, plus the controller as `api`. */
|
|
15
|
+
export declare function reactiveShow(): {
|
|
16
|
+
readonly api: any;
|
|
17
|
+
readonly index: number;
|
|
18
|
+
readonly playing: boolean;
|
|
19
|
+
readonly sound: boolean;
|
|
20
|
+
readonly layout: Layout;
|
|
21
|
+
readonly count: any;
|
|
22
|
+
attach(s: Show): void;
|
|
23
|
+
detach(): void;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Reactive reads of a ScenePlayerState: `p.t`, `p.playing`, `p.status` update the UI as the player changes. */
|
|
2
|
+
export function reactivePlayer(get) {
|
|
3
|
+
let v = $state(0);
|
|
4
|
+
$effect(() => get().subscribe(() => { v++; }));
|
|
5
|
+
const read = (f) => () => { v; return f(get()); };
|
|
6
|
+
return {
|
|
7
|
+
get t() { return read((p) => p.t)(); },
|
|
8
|
+
get dur() { return read((p) => p.dur)(); },
|
|
9
|
+
get status() { return read((p) => p.status)(); },
|
|
10
|
+
get error() { return read((p) => p.error)(); },
|
|
11
|
+
get playing() { return read((p) => p.playing)(); },
|
|
12
|
+
get key() { return read((p) => p.key)(); },
|
|
13
|
+
get ref() { return read((p) => p.ref)(); },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** Reactive state of a story player (createShow): index, playing, sound, layout, plus the controller as `api`. */
|
|
17
|
+
export function reactiveShow() {
|
|
18
|
+
let api = $state(null);
|
|
19
|
+
let st = $state({ index: 0, local: 0, playing: false, sound: false, layout: 'landscape' });
|
|
20
|
+
let off = null;
|
|
21
|
+
return {
|
|
22
|
+
get api() { return api; },
|
|
23
|
+
get index() { return st.index; },
|
|
24
|
+
get playing() { return st.playing; },
|
|
25
|
+
get sound() { return st.sound; },
|
|
26
|
+
get layout() { return st.layout; },
|
|
27
|
+
get count() { return api?.timeline.scenes.length ?? 0; },
|
|
28
|
+
attach(s) { api = s; st = { ...s.state }; off = s.on((x) => { st = { ...x }; }); },
|
|
29
|
+
detach() { off?.(); api?.destroy(); api = null; },
|
|
30
|
+
};
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@senseihq/emaki-svelte",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Svelte 5 components for motion stories: article figures, the story player, a controlled scene player and the video capture page.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "SenecaGlobal",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/sensei-hq/emaki.git",
|
|
11
|
+
"directory": "packages/emaki-svelte"
|
|
12
|
+
},
|
|
13
|
+
"keywords": ["emaki", "svelte", "sveltekit", "motion", "animation", "explainer", "i18n"],
|
|
14
|
+
"sideEffects": ["**/*.css"],
|
|
15
|
+
"files": ["dist", "!dist/**/*.spec.*", "README.md", "LICENSE"],
|
|
16
|
+
"svelte": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": "./package.json",
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"svelte": "./dist/index.js",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "svelte-package -i src/lib -o dist",
|
|
28
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
29
|
+
"prepublishOnly": "cp ../../LICENSE . && bun run build",
|
|
30
|
+
"postpublish": "rm -f LICENSE"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"svelte": "^5.0.0"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@senseihq/emaki": "0.1.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@sveltejs/package": "^2.3.10",
|
|
40
|
+
"svelte": "^5.28.0",
|
|
41
|
+
"svelte-check": "^4.2.1"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
}
|
|
46
|
+
}
|