ai-design-system 0.1.106 → 0.1.108
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/components/composites/ScenePlayer/index.ts +8 -2
- package/components/composites/{ScenePlayer/ScenePlayer.stories.tsx → StoryPlayer/StoryPlayer.stories.tsx} +36 -35
- package/components/composites/{ScenePlayer/ScenePlayer.tsx → StoryPlayer/StoryPlayer.tsx} +226 -102
- package/components/composites/StoryPlayer/index.ts +8 -0
- package/components/composites/index.ts +3 -3
- package/components/index.ts +3 -0
- package/dist/index.cjs +181 -93
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -0
- package/dist/index.d.ts +76 -63
- package/dist/index.js +181 -94
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export { ScenePlayer } from "
|
|
2
|
-
export type {
|
|
1
|
+
export { StoryPlayer, ScenePlayer } from "@/components/composites/StoryPlayer";
|
|
2
|
+
export type {
|
|
3
|
+
StoryPlayerProps,
|
|
4
|
+
ScenePlayerProps,
|
|
5
|
+
StorySegment,
|
|
6
|
+
StoryItem,
|
|
7
|
+
SceneItem,
|
|
8
|
+
} from "@/components/composites/StoryPlayer";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import {
|
|
2
|
+
import { StoryPlayer, type StorySegment } from "./StoryPlayer";
|
|
3
3
|
import { fn } from "@storybook/test";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* StoryPlayer Composite Stories
|
|
7
7
|
*
|
|
8
|
-
* Full-screen segmented video player for
|
|
9
|
-
* mute toggle, step zones, and
|
|
8
|
+
* Full-screen segmented video player for story-by-story review with progress tracks,
|
|
9
|
+
* mute toggle, step zones, and prompt action.
|
|
10
10
|
*/
|
|
11
11
|
const meta = {
|
|
12
|
-
title: "Composites/
|
|
13
|
-
component:
|
|
12
|
+
title: "Composites/StoryPlayer",
|
|
13
|
+
component: StoryPlayer,
|
|
14
14
|
tags: ["autodocs"],
|
|
15
15
|
parameters: { layout: "fullscreen" },
|
|
16
16
|
args: {
|
|
@@ -18,68 +18,69 @@ const meta = {
|
|
|
18
18
|
onClose: fn(),
|
|
19
19
|
onSubmit: fn(),
|
|
20
20
|
onPublish: fn(),
|
|
21
|
+
onStoryChange: fn(),
|
|
21
22
|
onSceneChange: fn(),
|
|
22
23
|
onPlayingChange: fn(),
|
|
23
24
|
onDownload: fn(),
|
|
24
25
|
},
|
|
25
|
-
} satisfies Meta<typeof
|
|
26
|
+
} satisfies Meta<typeof StoryPlayer>;
|
|
26
27
|
|
|
27
28
|
export default meta;
|
|
28
29
|
type Story = StoryObj<typeof meta>;
|
|
29
30
|
|
|
30
|
-
const
|
|
31
|
+
const mockStories: StorySegment[] = [
|
|
31
32
|
{
|
|
32
33
|
id: "001",
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
segmentNumber: 1,
|
|
35
|
+
totalSegments: 3,
|
|
35
36
|
start_sec: 0,
|
|
36
37
|
duration_sec: 1.6,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
scene_clip_url:
|
|
38
|
+
caption: "iOS apps used to mean one thing",
|
|
39
|
+
clip_url:
|
|
40
40
|
"https://hel1.your-objectstorage.com/waypoint-s3-dev/01M32NJZHXKCX1CQKVEVA49SJT/playground-1790017380397-6ffe0ec0/artifacts/scenes/scene001/clip.mp4",
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: "002",
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
segmentNumber: 2,
|
|
45
|
+
totalSegments: 3,
|
|
46
46
|
start_sec: 1.6,
|
|
47
47
|
duration_sec: 1.5,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
scene_clip_url:
|
|
48
|
+
caption: "You needed a Mac",
|
|
49
|
+
clip_url:
|
|
51
50
|
"https://hel1.your-objectstorage.com/waypoint-s3-dev/01M32NJZHXKCX1CQKVEVA49SJT/playground-1790017380397-6ffe0ec0/artifacts/scenes/scene002/clip.mp4",
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
id: "003",
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
segmentNumber: 3,
|
|
55
|
+
totalSegments: 3,
|
|
57
56
|
start_sec: 3.1,
|
|
58
57
|
duration_sec: 1.5,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
scene_clip_url:
|
|
58
|
+
caption: "And nobody told the AI",
|
|
59
|
+
clip_url:
|
|
62
60
|
"https://hel1.your-objectstorage.com/waypoint-s3-dev/01M32NJZHXKCX1CQKVEVA49SJT/playground-1790017380397-6ffe0ec0/artifacts/scenes/scene003/clip.mp4",
|
|
63
61
|
},
|
|
64
62
|
];
|
|
65
63
|
|
|
66
|
-
/**
|
|
67
|
-
* Default usage with multiple scenes
|
|
68
|
-
*/
|
|
69
64
|
export const Default: Story = {
|
|
70
65
|
args: {
|
|
71
|
-
|
|
72
|
-
title: "
|
|
73
|
-
|
|
66
|
+
stories: mockStories,
|
|
67
|
+
title: "Building iOS App on Devin",
|
|
68
|
+
isPlaying: true,
|
|
74
69
|
},
|
|
75
70
|
};
|
|
76
71
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
export const Paused: Story = {
|
|
73
|
+
args: {
|
|
74
|
+
stories: mockStories,
|
|
75
|
+
title: "Building iOS App on Devin",
|
|
76
|
+
isPlaying: false,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const Muted: Story = {
|
|
81
81
|
args: {
|
|
82
|
-
|
|
83
|
-
title: "
|
|
82
|
+
stories: mockStories,
|
|
83
|
+
title: "Building iOS App on Devin",
|
|
84
|
+
initialMuted: true,
|
|
84
85
|
},
|
|
85
86
|
};
|