@astryxdesign/lab 0.7.17-canary.g5a3fd39 → 0.7.17-canary.g5c48123
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/blocks/AudioPlayerShowcase.doc.mjs +16 -0
- package/blocks/AudioPlayerShowcase.tsx +24 -0
- package/blocks/AudioPlayerVoiceMemo.doc.mjs +15 -0
- package/blocks/AudioPlayerVoiceMemo.tsx +25 -0
- package/blocks/MediaPlayerInlineNote.doc.mjs +21 -0
- package/blocks/MediaPlayerInlineNote.tsx +32 -0
- package/blocks/MediaPlayerShowcase.doc.mjs +27 -0
- package/blocks/MediaPlayerShowcase.tsx +54 -0
- package/blocks/VideoPlayerAutoplayLoop.doc.mjs +15 -0
- package/blocks/VideoPlayerAutoplayLoop.tsx +25 -0
- package/blocks/VideoPlayerShowcase.doc.mjs +22 -0
- package/blocks/VideoPlayerShowcase.tsx +23 -0
- package/dist/CircularProgress/CircularProgress.d.ts +3 -2
- package/dist/CircularProgress/CircularProgress.d.ts.map +1 -1
- package/dist/CircularProgress/CircularProgress.js +12 -33
- package/dist/Comments/CommentParts.d.ts +2 -2
- package/dist/Comments/CommentParts.js +1 -1
- package/dist/DiffViewer/DiffViewer.d.ts.map +1 -1
- package/dist/DiffViewer/DiffViewer.js +1 -6
- package/dist/EmojiPicker/EmojiPicker.js +1 -1
- package/dist/MediaPlayer/AudioPlayer.d.ts +77 -0
- package/dist/MediaPlayer/AudioPlayer.d.ts.map +1 -0
- package/dist/MediaPlayer/AudioPlayer.js +359 -0
- package/dist/MediaPlayer/MediaPlayer.d.ts +50 -0
- package/dist/MediaPlayer/MediaPlayer.d.ts.map +1 -0
- package/dist/MediaPlayer/MediaPlayer.js +442 -0
- package/dist/MediaPlayer/MediaPlayerContext.d.ts +83 -0
- package/dist/MediaPlayer/MediaPlayerContext.d.ts.map +1 -0
- package/dist/MediaPlayer/MediaPlayerContext.js +171 -0
- package/dist/MediaPlayer/MediaPlayerControls.d.ts +246 -0
- package/dist/MediaPlayer/MediaPlayerControls.d.ts.map +1 -0
- package/dist/MediaPlayer/MediaPlayerControls.js +1124 -0
- package/dist/MediaPlayer/MediaPlayerElement.d.ts +61 -0
- package/dist/MediaPlayer/MediaPlayerElement.d.ts.map +1 -0
- package/dist/MediaPlayer/MediaPlayerElement.js +118 -0
- package/dist/MediaPlayer/VideoPlayer.d.ts +63 -0
- package/dist/MediaPlayer/VideoPlayer.d.ts.map +1 -0
- package/dist/MediaPlayer/VideoPlayer.js +373 -0
- package/dist/MediaPlayer/index.d.ts +14 -0
- package/dist/MediaPlayer/index.d.ts.map +1 -0
- package/dist/MediaPlayer/index.js +16 -0
- package/dist/MediaPlayer/mediaIcons.d.ts +35 -0
- package/dist/MediaPlayer/mediaIcons.d.ts.map +1 -0
- package/dist/MediaPlayer/mediaIcons.js +209 -0
- package/dist/MediaPlayer/mediaStore.d.ts +83 -0
- package/dist/MediaPlayer/mediaStore.d.ts.map +1 -0
- package/dist/MediaPlayer/mediaStore.js +445 -0
- package/dist/NavigationStack/NavigationStack.d.ts +2 -1
- package/dist/NavigationStack/NavigationStack.d.ts.map +1 -1
- package/dist/NavigationStack/NavigationStack.js +78 -19
- package/dist/Schedule/shared.d.ts +28 -28
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/internal/LoadingMessage.d.ts.map +1 -0
- package/dist/lab.css +65 -6
- package/package.json +5 -5
- package/src/CircularProgress/CircularProgress.test.tsx +68 -0
- package/src/CircularProgress/CircularProgress.tsx +22 -26
- package/src/CircularProgress/__tests__/CircularProgressMotion.a11y.chromium.spec.ts +31 -16
- package/src/Comments/CommentParts.tsx +1 -1
- package/src/DiffViewer/DiffViewer.tsx +0 -7
- package/src/EmojiPicker/EmojiPicker.tsx +1 -1
- package/src/MediaPlayer/AudioPlayer.tsx +501 -0
- package/src/MediaPlayer/MediaPlayer.doc.mjs +664 -0
- package/src/MediaPlayer/MediaPlayer.test.tsx +999 -0
- package/src/MediaPlayer/MediaPlayer.tsx +576 -0
- package/src/MediaPlayer/MediaPlayerContext.ts +252 -0
- package/src/MediaPlayer/MediaPlayerControls.tsx +1494 -0
- package/src/MediaPlayer/MediaPlayerElement.tsx +180 -0
- package/src/MediaPlayer/VideoPlayer.tsx +545 -0
- package/src/MediaPlayer/index.ts +56 -0
- package/src/MediaPlayer/mediaIcons.tsx +163 -0
- package/src/MediaPlayer/mediaStore.ts +586 -0
- package/src/NavigationStack/NavigationStack.doc.mjs +1 -1
- package/src/NavigationStack/NavigationStack.test.tsx +52 -0
- package/src/NavigationStack/NavigationStack.tsx +96 -17
- package/src/NavigationStack/__tests__/NavigationStack.interaction.browser.spec.ts +121 -1
- package/src/TabBar/TabBar.test.tsx +7 -5
- package/src/TransferList/TransferList.doc.mjs +3 -3
- package/src/TransferList/TransferList.doc.test.mjs +29 -0
- package/src/TransferList/TransferListSelector.test.tsx +2 -3
- package/src/index.ts +41 -0
- package/dist/LoadingMessage.d.ts.map +0 -1
- /package/dist/{LoadingMessage.d.ts → internal/LoadingMessage.d.ts} +0 -0
- /package/dist/{LoadingMessage.js → internal/LoadingMessage.js} +0 -0
- /package/src/{LoadingMessage.tsx → internal/LoadingMessage.tsx} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'block',
|
|
6
|
+
name: 'Podcast episode',
|
|
7
|
+
displayName: 'Podcast episode',
|
|
8
|
+
description:
|
|
9
|
+
'An episode player in a Section container: title, timeline, skip back 15 and forward 30 seconds, and speed and volume buttons whose sliders open while the button is hovered or focused.',
|
|
10
|
+
exampleFor: 'AudioPlayer',
|
|
11
|
+
alsoExampleFor: ['MediaSeekButton'],
|
|
12
|
+
isReady: true,
|
|
13
|
+
isShowcase: true,
|
|
14
|
+
aspectRatio: 16 / 9,
|
|
15
|
+
componentsUsed: ['AudioPlayer', 'VStack'],
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @input A CC0 sample recording and episode details
|
|
7
|
+
* @output An AudioPlayer with skip, speed, and volume controls
|
|
8
|
+
* @position Lab AudioPlayer's docsite showcase and copyable CLI block
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {VStack} from '@astryxdesign/core/Layout';
|
|
12
|
+
import {AudioPlayer} from '@astryxdesign/lab';
|
|
13
|
+
|
|
14
|
+
export default function AudioPlayerShowcase() {
|
|
15
|
+
return (
|
|
16
|
+
<VStack width={560} maxWidth="100%">
|
|
17
|
+
<AudioPlayer
|
|
18
|
+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
|
|
19
|
+
title="Designing for every screen"
|
|
20
|
+
subtitle="The Interface Show · Episode 12"
|
|
21
|
+
/>
|
|
22
|
+
</VStack>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'block',
|
|
6
|
+
name: 'Voice memo',
|
|
7
|
+
displayName: 'Voice memo',
|
|
8
|
+
description:
|
|
9
|
+
'A short recording with 5 and 10 second skips, which suit a clip measured in seconds rather than minutes.',
|
|
10
|
+
exampleFor: 'AudioPlayer',
|
|
11
|
+
isReady: true,
|
|
12
|
+
isShowcase: false,
|
|
13
|
+
aspectRatio: 16 / 9,
|
|
14
|
+
componentsUsed: ['AudioPlayer', 'VStack'],
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @input A CC0 sample recording
|
|
7
|
+
* @output An AudioPlayer with short skip intervals for a voice memo
|
|
8
|
+
* @position Lab AudioPlayer docsite example and copyable CLI block
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {VStack} from '@astryxdesign/core/Layout';
|
|
12
|
+
import {AudioPlayer} from '@astryxdesign/lab';
|
|
13
|
+
|
|
14
|
+
export default function AudioPlayerVoiceMemo() {
|
|
15
|
+
return (
|
|
16
|
+
<VStack width={420} maxWidth="100%">
|
|
17
|
+
<AudioPlayer
|
|
18
|
+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
|
|
19
|
+
title="Voice memo"
|
|
20
|
+
skipBackSeconds={5}
|
|
21
|
+
skipForwardSeconds={10}
|
|
22
|
+
/>
|
|
23
|
+
</VStack>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'block',
|
|
6
|
+
name: 'Inline voice note',
|
|
7
|
+
displayName: 'Inline voice note',
|
|
8
|
+
description:
|
|
9
|
+
'The smallest useful player for a message thread: one play button and the time left.',
|
|
10
|
+
exampleFor: 'MediaPlayer',
|
|
11
|
+
isReady: true,
|
|
12
|
+
isShowcase: false,
|
|
13
|
+
aspectRatio: 16 / 9,
|
|
14
|
+
componentsUsed: [
|
|
15
|
+
'MediaPlayer',
|
|
16
|
+
'MediaPlayerElement',
|
|
17
|
+
'MediaPlayButton',
|
|
18
|
+
'MediaTime',
|
|
19
|
+
'HStack',
|
|
20
|
+
],
|
|
21
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @input A CC0 sample recording
|
|
7
|
+
* @output A compact voice note made of a play button and the time left
|
|
8
|
+
* @position Lab MediaPlayer docsite example and copyable CLI block
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {HStack} from '@astryxdesign/core/Layout';
|
|
12
|
+
import {
|
|
13
|
+
MediaPlayButton,
|
|
14
|
+
MediaPlayer,
|
|
15
|
+
MediaPlayerElement,
|
|
16
|
+
MediaTime,
|
|
17
|
+
} from '@astryxdesign/lab';
|
|
18
|
+
|
|
19
|
+
export default function MediaPlayerInlineNote() {
|
|
20
|
+
return (
|
|
21
|
+
<MediaPlayer label="Voice note">
|
|
22
|
+
<MediaPlayerElement
|
|
23
|
+
kind="audio"
|
|
24
|
+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
|
|
25
|
+
/>
|
|
26
|
+
<HStack gap={1} vAlign="center">
|
|
27
|
+
<MediaPlayButton size="sm" />
|
|
28
|
+
<MediaTime display="remaining" />
|
|
29
|
+
</HStack>
|
|
30
|
+
</MediaPlayer>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'block',
|
|
6
|
+
name: 'Custom layout',
|
|
7
|
+
displayName: 'Custom layout',
|
|
8
|
+
description:
|
|
9
|
+
'A one-row player built from the parts, with the speed as a menu and Mute with its volume slider. Every part reads the MediaPlayer around it, and useMediaPlayer turns the playback state into a custom readout.',
|
|
10
|
+
exampleFor: 'MediaPlayer',
|
|
11
|
+
alsoExampleFor: ['useMediaPlayer', 'MediaPlaybackRate', 'MediaPlayerElement'],
|
|
12
|
+
isReady: true,
|
|
13
|
+
isShowcase: true,
|
|
14
|
+
aspectRatio: 16 / 9,
|
|
15
|
+
componentsUsed: [
|
|
16
|
+
'MediaPlayer',
|
|
17
|
+
'MediaPlayerElement',
|
|
18
|
+
'MediaPlayButton',
|
|
19
|
+
'MediaTimeSlider',
|
|
20
|
+
'MediaTime',
|
|
21
|
+
'MediaPlaybackRate',
|
|
22
|
+
'MediaVolume',
|
|
23
|
+
'HStack',
|
|
24
|
+
'VStack',
|
|
25
|
+
'Text',
|
|
26
|
+
],
|
|
27
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @input A CC0 sample recording
|
|
7
|
+
* @output A custom player layout from the MediaPlayer parts and
|
|
8
|
+
* useMediaPlayer
|
|
9
|
+
* @position Lab MediaPlayer's docsite showcase and copyable CLI block
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import {HStack, VStack} from '@astryxdesign/core/Layout';
|
|
13
|
+
import {Text} from '@astryxdesign/core/Text';
|
|
14
|
+
import {
|
|
15
|
+
MediaPlayButton,
|
|
16
|
+
MediaPlayer,
|
|
17
|
+
MediaPlaybackRate,
|
|
18
|
+
MediaPlayerElement,
|
|
19
|
+
MediaTime,
|
|
20
|
+
MediaTimeSlider,
|
|
21
|
+
MediaVolume,
|
|
22
|
+
useMediaPlayer,
|
|
23
|
+
} from '@astryxdesign/lab';
|
|
24
|
+
|
|
25
|
+
function ElapsedPercent() {
|
|
26
|
+
const {state} = useMediaPlayer();
|
|
27
|
+
const percent = state.duration > 0 ? state.currentTime / state.duration : 0;
|
|
28
|
+
return (
|
|
29
|
+
<Text type="supporting" color="secondary">
|
|
30
|
+
{Math.round(percent * 100)}%
|
|
31
|
+
</Text>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default function MediaPlayerShowcase() {
|
|
36
|
+
return (
|
|
37
|
+
<VStack width={560} maxWidth="100%">
|
|
38
|
+
<MediaPlayer label="Recording">
|
|
39
|
+
<MediaPlayerElement
|
|
40
|
+
kind="audio"
|
|
41
|
+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3"
|
|
42
|
+
/>
|
|
43
|
+
<HStack gap={2} vAlign="center">
|
|
44
|
+
<MediaPlayButton variant="primary" />
|
|
45
|
+
<MediaTimeSlider />
|
|
46
|
+
<MediaTime display="remaining" />
|
|
47
|
+
<ElapsedPercent />
|
|
48
|
+
<MediaPlaybackRate variant="menu" />
|
|
49
|
+
<MediaVolume />
|
|
50
|
+
</HStack>
|
|
51
|
+
</MediaPlayer>
|
|
52
|
+
</VStack>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'block',
|
|
6
|
+
name: 'Muted autoplay loop',
|
|
7
|
+
displayName: 'Muted autoplay loop',
|
|
8
|
+
description:
|
|
9
|
+
'An ambient clip that starts muted on load and loops. Its pause control stays one press away, because it moves for longer than five seconds.',
|
|
10
|
+
exampleFor: 'VideoPlayer',
|
|
11
|
+
isReady: true,
|
|
12
|
+
isShowcase: false,
|
|
13
|
+
aspectRatio: 16 / 9,
|
|
14
|
+
componentsUsed: ['VideoPlayer', 'VStack'],
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @input A CC0 sample video
|
|
7
|
+
* @output A muted, looping VideoPlayer that starts on load
|
|
8
|
+
* @position Lab VideoPlayer docsite example and copyable CLI block
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {VStack} from '@astryxdesign/core/Layout';
|
|
12
|
+
import {VideoPlayer} from '@astryxdesign/lab';
|
|
13
|
+
|
|
14
|
+
export default function VideoPlayerAutoplayLoop() {
|
|
15
|
+
return (
|
|
16
|
+
<VStack width={480} maxWidth="100%">
|
|
17
|
+
<VideoPlayer
|
|
18
|
+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm"
|
|
19
|
+
label="Bee on a flower"
|
|
20
|
+
hasAutoPlay
|
|
21
|
+
isLooping
|
|
22
|
+
/>
|
|
23
|
+
</VStack>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'block',
|
|
6
|
+
name: 'Video player',
|
|
7
|
+
displayName: 'Video player',
|
|
8
|
+
description:
|
|
9
|
+
'A video with themed controls in a frosted bar that floats 8px inside the video. The bar shows on hover, pointer movement, and keyboard focus, hides after two idle seconds while the video plays, and on touch shows and hides with a tap.',
|
|
10
|
+
exampleFor: 'VideoPlayer',
|
|
11
|
+
alsoExampleFor: [
|
|
12
|
+
'MediaPlayButton',
|
|
13
|
+
'MediaTimeSlider',
|
|
14
|
+
'MediaTime',
|
|
15
|
+
'MediaVolume',
|
|
16
|
+
'MediaFullscreenButton',
|
|
17
|
+
],
|
|
18
|
+
isReady: true,
|
|
19
|
+
isShowcase: true,
|
|
20
|
+
aspectRatio: 16 / 9,
|
|
21
|
+
componentsUsed: ['VideoPlayer', 'VStack'],
|
|
22
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @input A CC0 sample video
|
|
7
|
+
* @output A VideoPlayer with its floating, frosted control bar
|
|
8
|
+
* @position Lab VideoPlayer's docsite showcase and copyable CLI block
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {VStack} from '@astryxdesign/core/Layout';
|
|
12
|
+
import {VideoPlayer} from '@astryxdesign/lab';
|
|
13
|
+
|
|
14
|
+
export default function VideoPlayerShowcase() {
|
|
15
|
+
return (
|
|
16
|
+
<VStack width={640} maxWidth="100%">
|
|
17
|
+
<VideoPlayer
|
|
18
|
+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm"
|
|
19
|
+
label="Bee on a flower"
|
|
20
|
+
/>
|
|
21
|
+
</VStack>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -99,8 +99,9 @@ export interface CircularProgressProps extends BaseProps<HTMLDivElement> {
|
|
|
99
99
|
*/
|
|
100
100
|
isIndeterminate?: boolean;
|
|
101
101
|
/**
|
|
102
|
-
* When true, the circular progress is visually disabled
|
|
103
|
-
*
|
|
102
|
+
* When true, the circular progress is visually disabled: the ring takes the
|
|
103
|
+
* neutral fill and the whole ring, center content included, draws at half
|
|
104
|
+
* opacity. Use for canceled or inactive operations.
|
|
104
105
|
* @default false
|
|
105
106
|
*/
|
|
106
107
|
isDisabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularProgress.d.ts","sourceRoot":"","sources":["../../src/CircularProgress/CircularProgress.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAiC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAiBrE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAGlD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,C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K,EACL,aAAa,EAAE,UAAU,EACzB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,qBAAqB,+BAwRvB;yBA1Se,gBAAgB"}
|
|
@@ -81,11 +81,6 @@ const styles = {
|
|
|
81
81
|
k1xSpc: "x1lliihq",
|
|
82
82
|
$$css: true
|
|
83
83
|
},
|
|
84
|
-
track: {
|
|
85
|
-
kDwRjp: "xbh8q5q",
|
|
86
|
-
kjVXCG: "xpi25hw",
|
|
87
|
-
$$css: true
|
|
88
|
-
},
|
|
89
84
|
fill: {
|
|
90
85
|
kVAEAm: "x10l6tqk",
|
|
91
86
|
kpwlN0: "x10a8y8t",
|
|
@@ -120,33 +115,11 @@ const variantStyles = {
|
|
|
120
115
|
$$css: true
|
|
121
116
|
},
|
|
122
117
|
neutral: {
|
|
123
|
-
kjVXCG: "
|
|
118
|
+
kjVXCG: "xxvau67",
|
|
124
119
|
$$css: true
|
|
125
120
|
},
|
|
126
121
|
disabled: {
|
|
127
|
-
kjVXCG: "
|
|
128
|
-
$$css: true
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
const trackVariantStyles = {
|
|
132
|
-
accent: {
|
|
133
|
-
kjVXCG: "ximx5ud",
|
|
134
|
-
$$css: true
|
|
135
|
-
},
|
|
136
|
-
success: {
|
|
137
|
-
kjVXCG: "x1uro670",
|
|
138
|
-
$$css: true
|
|
139
|
-
},
|
|
140
|
-
warning: {
|
|
141
|
-
kjVXCG: "x1wjzxuj",
|
|
142
|
-
$$css: true
|
|
143
|
-
},
|
|
144
|
-
error: {
|
|
145
|
-
kjVXCG: "xjswp7v",
|
|
146
|
-
$$css: true
|
|
147
|
-
},
|
|
148
|
-
neutral: {
|
|
149
|
-
kjVXCG: "xpi25hw",
|
|
122
|
+
kjVXCG: "xxvau67",
|
|
150
123
|
$$css: true
|
|
151
124
|
}
|
|
152
125
|
};
|
|
@@ -336,7 +309,6 @@ export function CircularProgress({
|
|
|
336
309
|
const showValueLabel = hasValueLabel && !isIndeterminate;
|
|
337
310
|
const centerContent = children != null ? children : showValueLabel ? valueText : null;
|
|
338
311
|
const fillVariant = isDisabled ? 'disabled' : variant;
|
|
339
|
-
const trackVariant = isDisabled ? 'neutral' : variant;
|
|
340
312
|
|
|
341
313
|
// A value change turns the fill's layers with Web Animations on the
|
|
342
314
|
// compositor, from wherever the arc is drawn now (mid-change, the running
|
|
@@ -447,8 +419,13 @@ export function CircularProgress({
|
|
|
447
419
|
children: label
|
|
448
420
|
}), /*#__PURE__*/_jsxs("div", {
|
|
449
421
|
...{
|
|
450
|
-
|
|
451
|
-
|
|
422
|
+
0: {
|
|
423
|
+
className: "x1n2onr6 x3nfvp2"
|
|
424
|
+
},
|
|
425
|
+
1: {
|
|
426
|
+
className: "x1n2onr6 x3nfvp2 xbyyjgo"
|
|
427
|
+
}
|
|
428
|
+
}[!!isDisabled << 0],
|
|
452
429
|
children: [/*#__PURE__*/_jsxs("svg", {
|
|
453
430
|
role: "progressbar",
|
|
454
431
|
"aria-labelledby": labelId,
|
|
@@ -462,7 +439,9 @@ export function CircularProgress({
|
|
|
462
439
|
ref: isIndeterminate ? syncRotationPhase : undefined,
|
|
463
440
|
...stylex.props(isIndeterminate ? styles.svgIndeterminate : styles.svg, isIndeterminate && spinnerRotorStyles.turn),
|
|
464
441
|
children: [/*#__PURE__*/_jsx("circle", {
|
|
465
|
-
...mergeProps(themeProps('circular-progress-track'),
|
|
442
|
+
...mergeProps(themeProps('circular-progress-track'), {
|
|
443
|
+
className: "xbh8q5q x1o3judk"
|
|
444
|
+
}),
|
|
466
445
|
cx: center,
|
|
467
446
|
cy: center,
|
|
468
447
|
r: radius,
|
|
@@ -72,8 +72,8 @@ export declare const partStyles: Readonly<{
|
|
|
72
72
|
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", "0.25rem">;
|
|
73
73
|
}>;
|
|
74
74
|
readonly progressLabel: Readonly<{
|
|
75
|
-
readonly color: stylex.StyleXClassNameFor<"color", "transparent" | "CanvasText" | "light-dark(#
|
|
76
|
-
readonly backgroundImage: stylex.StyleXClassNameFor<"backgroundImage", "none" | `linear-gradient(90deg, ${stylex.StyleXVar<"light-dark(#
|
|
75
|
+
readonly color: stylex.StyleXClassNameFor<"color", "transparent" | "CanvasText" | "light-dark(#445564, #B0B5BB)">;
|
|
76
|
+
readonly backgroundImage: stylex.StyleXClassNameFor<"backgroundImage", "none" | `linear-gradient(90deg, ${stylex.StyleXVar<"light-dark(#445564, #B0B5BB)">} 40%, ${stylex.StyleXVar<"light-dark(#0A1317, #DFE2E5)">} 50%, ${stylex.StyleXVar<"light-dark(#445564, #B0B5BB)">} 60%)`>;
|
|
77
77
|
readonly backgroundSize: stylex.StyleXClassNameFor<"backgroundSize", "250% 100%">;
|
|
78
78
|
readonly backgroundClip: stylex.StyleXClassNameFor<"backgroundClip", "text">;
|
|
79
79
|
readonly animationName: stylex.StyleXClassNameFor<"animationName", string>;
|
|
@@ -39,7 +39,7 @@ import '@astryxdesign/core/theme/tokens.stylex';
|
|
|
39
39
|
import { borderVars, colorVars, durationVars, easeVars, radiusVars, spacingVars } from '@astryxdesign/core/theme/tokens.stylex';
|
|
40
40
|
import { CommentIcon } from "./icons.js";
|
|
41
41
|
import { eventAnchorId } from "./utils.js";
|
|
42
|
-
import { LoadingMessage } from "../LoadingMessage.js";
|
|
42
|
+
import { LoadingMessage } from "../internal/LoadingMessage.js";
|
|
43
43
|
import { useStatusAnnouncement } from "../useStatusAnnouncement.js";
|
|
44
44
|
|
|
45
45
|
/** The 28px avatar column every comment row, reply, and event aligns to. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiffViewer.d.ts","sourceRoot":"","sources":["../../src/DiffViewer/DiffViewer.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EA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,QAAQ,EAAE,YAAY,EACtB,aAAa,EACb,cAAqB,EACrB,SAAiB,EACjB,eAA2B,EAC3B,eAAwB,EACxB,mBAA0B,EAC1B,aAAoB,EACpB,WAAW,EAAE,eAAe,EAC5B,kBAA0B,EAC1B,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,eAAe,+BA2yBjB;yBAn0Be,UAAU"}
|
|
@@ -624,10 +624,6 @@ const styles = {
|
|
|
624
624
|
kMwMTN: "xv1l7n4",
|
|
625
625
|
$$css: true
|
|
626
626
|
},
|
|
627
|
-
markerSlim: {
|
|
628
|
-
kg3NbH: "xnjsko4",
|
|
629
|
-
$$css: true
|
|
630
|
-
},
|
|
631
627
|
sticky: {
|
|
632
628
|
kVAEAm: "x7wzq59",
|
|
633
629
|
kY2c9j: "x1vjfegm",
|
|
@@ -986,7 +982,6 @@ export function DiffViewer({
|
|
|
986
982
|
const isPinned = !isWrapped;
|
|
987
983
|
const gutter = gutterWidth(digits);
|
|
988
984
|
const markerWidth = MARKER_WIDTH[changeIndicator];
|
|
989
|
-
const isSlimMarker = changeIndicator !== 'classic';
|
|
990
985
|
const pinAt = offset => isPinned && offset != null && [styles.sticky, dynamicStyles.stickyAt(offset)];
|
|
991
986
|
const tint = kind => hasChangeBackground && (kind === 'added' ? styles.added : kind === 'removed' && styles.removed);
|
|
992
987
|
const cellRole = tag => tag === 'div' ? {
|
|
@@ -1025,7 +1020,7 @@ export function DiffViewer({
|
|
|
1025
1020
|
const isChange = kind === 'added' || kind === 'removed';
|
|
1026
1021
|
return /*#__PURE__*/_jsxs(Cell, {
|
|
1027
1022
|
...cellRole(tag),
|
|
1028
|
-
...stylex.props(styles.marker,
|
|
1023
|
+
...stylex.props(styles.marker, pinAt(pinOffset), tint(kind), kind === 'added' && styles.markerAdded, kind === 'removed' && styles.markerRemoved, cell == null && styles.filler),
|
|
1029
1024
|
children: [isChange && changeIndicator === 'classic' && /*#__PURE__*/_jsx("span", {
|
|
1030
1025
|
"aria-hidden": "true",
|
|
1031
1026
|
children: kind === 'added' ? '+' : '-'
|
|
@@ -38,7 +38,7 @@ import { HStack, VStack } from '@astryxdesign/core/Layout';
|
|
|
38
38
|
import { ScrollableArea } from '@astryxdesign/core/ScrollableArea';
|
|
39
39
|
import { Text } from '@astryxdesign/core/Text';
|
|
40
40
|
import { TextInput } from '@astryxdesign/core/TextInput';
|
|
41
|
-
import { LoadingMessage } from "../LoadingMessage.js";
|
|
41
|
+
import { LoadingMessage } from "../internal/LoadingMessage.js";
|
|
42
42
|
import { useStatusAnnouncement } from "../useStatusAnnouncement.js";
|
|
43
43
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
44
44
|
/** The emoji listed first, before the groups, when the host passes none. */
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file AudioPlayer.tsx
|
|
3
|
+
* @input An audio source, a title with optional subtitle and artwork, skip
|
|
4
|
+
* intervals, playback options, and root style props
|
|
5
|
+
* @output Exports AudioPlayer, a ready-made player for spoken audio and music
|
|
6
|
+
* with skip, speed, volume, and system media controls
|
|
7
|
+
* @position Lab media preset; composes MediaPlayer with its audio and control
|
|
8
|
+
* parts inside a Section container
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactNode } from 'react';
|
|
11
|
+
import { type MediaPlayerProps } from './MediaPlayer.js';
|
|
12
|
+
import { type MediaTimelineChapter, type MediaTimelineMarker } from './MediaPlayerControls.js';
|
|
13
|
+
export interface AudioPlayerProps extends Omit<MediaPlayerProps, 'children' | 'label' | 'title'> {
|
|
14
|
+
/** URL of the audio. */
|
|
15
|
+
src: string;
|
|
16
|
+
/** Title of the episode or track. It also names the player. */
|
|
17
|
+
title: string;
|
|
18
|
+
/** Show, artist, or other supporting line. */
|
|
19
|
+
subtitle?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Artwork image URL, such as cover art. The player shows it in front of
|
|
22
|
+
* the title and offers it to the system media controls.
|
|
23
|
+
*/
|
|
24
|
+
artworkSrc?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Media in front of the title, such as a video still. It takes the place of
|
|
27
|
+
* `artworkSrc` on screen; `artworkSrc` still goes to the system media
|
|
28
|
+
* controls. Without either, the player shows a generic audio file icon.
|
|
29
|
+
*/
|
|
30
|
+
artwork?: ReactNode;
|
|
31
|
+
/** Width divided by height of the artwork. Defaults to 1, a square. */
|
|
32
|
+
artworkAspectRatio?: number;
|
|
33
|
+
/** Accessible name of the player. Defaults to `title`. */
|
|
34
|
+
label?: string;
|
|
35
|
+
/** Seconds the skip-back control moves. Defaults to 15. */
|
|
36
|
+
skipBackSeconds?: number;
|
|
37
|
+
/** Seconds the skip-forward control moves. Defaults to 30. */
|
|
38
|
+
skipForwardSeconds?: number;
|
|
39
|
+
/** How much to load before playback. Defaults to `'metadata'`. */
|
|
40
|
+
preload?: 'none' | 'metadata' | 'auto';
|
|
41
|
+
/** CORS mode for the audio. */
|
|
42
|
+
crossOrigin?: 'anonymous' | 'use-credentials';
|
|
43
|
+
/**
|
|
44
|
+
* Goes to the previous track in the product's queue. The previous-track
|
|
45
|
+
* control and the matching system media action appear when it is set.
|
|
46
|
+
*/
|
|
47
|
+
onPreviousTrack?: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* Goes to the next track in the product's queue. The next-track control
|
|
50
|
+
* and the matching system media action appear when it is set.
|
|
51
|
+
*/
|
|
52
|
+
onNextTrack?: () => void;
|
|
53
|
+
/** Chapters, drawn as segments of the timeline and named in its preview. */
|
|
54
|
+
chapters?: readonly MediaTimelineChapter[];
|
|
55
|
+
/** Points of interest, such as timestamped comments, drawn on the timeline. */
|
|
56
|
+
markers?: readonly MediaTimelineMarker[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A ready-made audio player for episodes, recordings, and music: title and
|
|
60
|
+
* artwork, a timeline, skip back and forward, playback speed, and volume.
|
|
61
|
+
* It sits in a Section container, so its background and padding follow the
|
|
62
|
+
* theme. Queues and playlists belong to the product.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```
|
|
66
|
+
* <AudioPlayer
|
|
67
|
+
* src="/media/episode-12.mp3"
|
|
68
|
+
* title="Designing for every screen"
|
|
69
|
+
* subtitle="The Interface Show · Episode 12"
|
|
70
|
+
* />
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function AudioPlayer({ src, title, subtitle, artworkSrc, artwork, artworkAspectRatio, label, skipBackSeconds, skipForwardSeconds, preload, crossOrigin, onPreviousTrack, onNextTrack, chapters, markers, xstyle, className, style, ...rest }: AudioPlayerProps): import("react").JSX.Element;
|
|
74
|
+
export declare namespace AudioPlayer {
|
|
75
|
+
var displayName: string;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=AudioPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../src/MediaPlayer/AudioPlayer.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAAY,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAehD,OAAO,EAAc,KAAK,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAEjE,OAAO,EAOL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAoF/B,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,gBAAgB,EAChB,UAAU,GAAG,OAAO,GAAG,OAAO,CAC/B;IACC,wBAAwB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;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