@refraction-ui/astro 0.15.0 → 0.15.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/astro-accordion/Accordion.astro +7 -0
- package/dist/astro-accordion/Accordion.stories.ts +10 -4
- package/dist/astro-ai/AIScript.astro +1 -1
- package/dist/astro-analytics/Analytics.stories.ts +5 -3
- package/dist/astro-analytics/AnalyticsScript.astro +1 -1
- package/dist/astro-animated-text/AnimatedText.stories.ts +7 -3
- package/dist/astro-app-shell/AppShell.stories.ts +14 -3
- package/dist/astro-auth/Auth.stories.ts +8 -3
- package/dist/astro-avatar/Avatar.stories.ts +6 -3
- package/dist/astro-avatar-group/AvatarGroup.stories.ts +10 -3
- package/dist/astro-badge/Badge.stories.ts +7 -7
- package/dist/astro-bottom-nav/BottomNav.stories.ts +6 -3
- package/dist/astro-breadcrumbs/Breadcrumbs.stories.ts +9 -3
- package/dist/astro-button/Button.stories.ts +9 -3
- package/dist/astro-calendar/Calendar.stories.ts +9 -3
- package/dist/astro-callout/Callout.stories.ts +6 -3
- package/dist/astro-card/Card.stories.ts +6 -3
- package/dist/astro-card-grid/CardGrid.stories.ts +5 -3
- package/dist/astro-carousel/Carousel.astro +7 -0
- package/dist/astro-carousel/Carousel.stories.ts +10 -4
- package/dist/astro-charts/Charts.stories.ts +9 -4
- package/dist/astro-checkbox/Checkbox.stories.ts +9 -3
- package/dist/astro-code-block/CodeBlock.stories.ts +5 -3
- package/dist/astro-code-editor/CodeEditor.astro +1 -1
- package/dist/astro-code-editor/CodeEditor.stories.ts +10 -3
- package/dist/astro-collapsible/Collapsible.stories.ts +7 -3
- package/dist/astro-command/Command.stories.ts +6 -3
- package/dist/astro-command-input/CommandInput.stories.ts +5 -3
- package/dist/astro-content-protection/ContentProtection.stories.ts +9 -3
- package/dist/astro-conversation/Chat.astro +1 -1
- package/dist/astro-conversation/Conversation.stories.ts +7 -3
- package/dist/astro-data-table/DataTable.astro +1 -1
- package/dist/astro-data-table/DataTable.stories.ts +15 -3
- package/dist/astro-date-picker/DatePicker.stories.ts +11 -3
- package/dist/astro-device-frame/DeviceFrame.stories.ts +7 -3
- package/dist/astro-dialog/Dialog.stories.ts +7 -3
- package/dist/astro-diff-viewer/DiffViewer.stories.ts +19 -3
- package/dist/astro-dropdown-menu/DropdownMenu.stories.ts +6 -3
- package/dist/astro-emoji-picker/EmojiPicker.stories.ts +5 -3
- package/dist/astro-feedback-dialog/FeedbackDialog.stories.ts +6 -3
- package/dist/astro-file-tree/FileTree.stories.ts +5 -3
- package/dist/astro-file-upload/FileUpload.stories.ts +9 -3
- package/dist/astro-floating-reactions/FloatingReactions.astro +1 -1
- package/dist/astro-footer/Footer.stories.ts +7 -3
- package/dist/astro-icon-system/IconSystem.stories.ts +5 -3
- package/dist/astro-inline-editor/InlineEditor.stories.ts +5 -3
- package/dist/astro-input/Input.stories.ts +11 -3
- package/dist/astro-input-group/InputGroup.stories.ts +6 -3
- package/dist/astro-install-prompt/InstallPrompt.stories.ts +9 -3
- package/dist/astro-keyboard-shortcut/KeyboardShortcut.stories.ts +7 -3
- package/dist/astro-language-selector/LanguageSelector.stories.ts +11 -3
- package/dist/astro-link-card/LinkCard.stories.ts +5 -3
- package/dist/astro-logger/Logger.stories.ts +10 -3
- package/dist/astro-logger/TelemetryScript.astro +1 -1
- package/dist/astro-markdown-renderer/MarkdownRenderer.stories.ts +8 -3
- package/dist/astro-mascot/Mascot.astro +274 -0
- package/dist/astro-mascot/Mascot.stories.ts +46 -0
- package/dist/astro-mascot/index.ts +11 -0
- package/dist/astro-mobile-nav/MobileNav.stories.ts +6 -3
- package/dist/astro-navbar/Navbar.stories.ts +16 -3
- package/dist/astro-otp-input/OtpInput.stories.ts +20 -3
- package/dist/astro-pagination/Pagination.stories.ts +3 -3
- package/dist/astro-password-input/PasswordInput.stories.ts +29 -0
- package/dist/astro-payment/Payment.stories.ts +8 -3
- package/dist/astro-popover/Popover.stories.ts +10 -3
- package/dist/astro-popover/PopoverClose.stories.ts +17 -0
- package/dist/astro-popover/PopoverContent.stories.ts +19 -0
- package/dist/astro-popover/PopoverTrigger.stories.ts +17 -0
- package/dist/astro-presence-indicator/PresenceIndicator.stories.ts +14 -3
- package/dist/astro-progress-display/BadgeDisplay.astro +1 -1
- package/dist/astro-progress-display/BadgeDisplay.stories.ts +17 -0
- package/dist/astro-progress-display/ProgressBar.stories.ts +21 -0
- package/dist/astro-progress-display/StatsGrid.astro +1 -1
- package/dist/astro-progress-display/StatsGrid.stories.ts +19 -0
- package/dist/astro-radio/RadioGroup.stories.ts +25 -0
- package/dist/astro-radio/RadioItem.stories.ts +23 -0
- package/dist/astro-reaction-bar/ReactionBar.astro +1 -1
- package/dist/astro-reaction-bar/ReactionBar.stories.ts +10 -3
- package/dist/astro-resizable-layout/ResizableDivider.stories.ts +19 -0
- package/dist/astro-resizable-layout/ResizableLayout.stories.ts +18 -3
- package/dist/astro-resizable-layout/ResizablePane.stories.ts +21 -0
- package/dist/astro-rich-editor/RichEditor.stories.ts +20 -3
- package/dist/astro-search-bar/SearchBar.stories.ts +14 -3
- package/dist/astro-search-bar/SearchResultItem.stories.ts +17 -0
- package/dist/astro-search-bar/SearchResults.stories.ts +17 -0
- package/dist/astro-segmented-control/SegmentedControl.stories.ts +23 -0
- package/dist/astro-segmented-control/SegmentedControlItem.stories.ts +25 -0
- package/dist/astro-select/Select.stories.ts +16 -3
- package/dist/astro-select/SelectContent.stories.ts +17 -0
- package/dist/astro-select/SelectItem.stories.ts +23 -0
- package/dist/astro-select/SelectTrigger.stories.ts +21 -0
- package/dist/astro-separator/Separator.stories.ts +23 -0
- package/dist/astro-sidebar/Sidebar.astro +1 -1
- package/dist/astro-sidebar/Sidebar.stories.ts +14 -3
- package/dist/astro-skeleton/Skeleton.stories.ts +14 -3
- package/dist/astro-skeleton/SkeletonText.stories.ts +19 -0
- package/dist/astro-skip-to-content/SkipToContent.stories.ts +3 -3
- package/dist/astro-slide-viewer/SlideViewer.stories.ts +14 -3
- package/dist/astro-social-auth-button/SocialAuthButton.stories.ts +23 -0
- package/dist/astro-social-auth-button/SocialAuthRow.stories.ts +17 -0
- package/dist/astro-status-indicator/StatusIndicator.stories.ts +14 -3
- package/dist/astro-steps/Steps.stories.ts +3 -3
- package/dist/astro-switch/Switch.stories.ts +14 -3
- package/dist/astro-table-of-contents/TableOfContents.stories.ts +8 -3
- package/dist/astro-tabs/Tabs.stories.ts +12 -3
- package/dist/astro-tabs/TabsContent.stories.ts +21 -0
- package/dist/astro-tabs/TabsList.stories.ts +17 -0
- package/dist/astro-tabs/TabsTrigger.stories.ts +21 -0
- package/dist/astro-textarea/Textarea.stories.ts +22 -3
- package/dist/astro-theme/ThemeScript.stories.ts +23 -0
- package/dist/astro-theme/ThemeToggle.stories.ts +21 -0
- package/dist/astro-thread-view/ThreadView.astro +1 -1
- package/dist/astro-thread-view/ThreadView.stories.ts +10 -3
- package/dist/astro-toast/Toast.stories.ts +16 -3
- package/dist/astro-toast/Toaster.stories.ts +17 -0
- package/dist/astro-tooltip/Tooltip.stories.ts +10 -3
- package/dist/astro-tooltip/TooltipContent.stories.ts +19 -0
- package/dist/astro-tooltip/TooltipTrigger.stories.ts +17 -0
- package/dist/astro-version-selector/VersionSelector.astro +2 -2
- package/dist/astro-version-selector/VersionSelector.stories.ts +12 -3
- package/dist/astro-video-grid/VideoGrid.astro +1 -1
- package/dist/astro-video-player/VideoPlayer.stories.ts +16 -3
- package/dist/astro-voice-pill/VoicePill.stories.ts +24 -3
- package/dist/astro-waveform/Waveform.stories.ts +26 -3
- package/dist/index.ts +1 -0
- package/dist/mascot/index.ts +2 -0
- package/dist/mascot/mascot.styles.ts +33 -0
- package/dist/mascot/mascot.ts +121 -0
- package/package.json +2 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './Dialog.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/Dialog',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,10 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
default: '<span>Default Slot Content</span>',
|
|
13
|
+
defaultOpen: false,
|
|
14
|
+
modal: false
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './DiffViewer.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/DiffViewer',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,22 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
files: [
|
|
13
|
+
{ name: 'example.js', original: 'const a = 1;', modified: 'const a = 2;' }
|
|
14
|
+
],
|
|
15
|
+
original: 'const a = 1;',
|
|
16
|
+
modified: 'const a = 2;',
|
|
17
|
+
language: 'javascript',
|
|
18
|
+
theme: 'dark',
|
|
19
|
+
viewMode: 'split',
|
|
20
|
+
showSidebar: false,
|
|
21
|
+
showTabs: false,
|
|
22
|
+
showStatusBar: false,
|
|
23
|
+
sidebarWidth: 100,
|
|
24
|
+
activeFileIndex: 0,
|
|
25
|
+
statusBarTitle: 'Status',
|
|
26
|
+
statusBarStatus: 'Ready'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './DropdownMenu.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/DropdownMenu',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,9 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
default: '<span>Default Slot Content</span>',
|
|
13
|
+
defaultOpen: false
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './EmojiPicker.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/EmojiPicker',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,8 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
category: undefined
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './FeedbackDialog.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/FeedbackDialog',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,9 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
open: false,
|
|
13
|
+
type: 'default'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './astro-file-tree.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/FileTree',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,8 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './FileUpload.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/FileUpload',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,12 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
default: '<span>Default Slot Content</span>',
|
|
13
|
+
accept: 'Example accept',
|
|
14
|
+
maxSize: 42,
|
|
15
|
+
maxFiles: 42,
|
|
16
|
+
multiple: false
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './Footer.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/Footer',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,10 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
copyright: 'Example copyright',
|
|
13
|
+
socialLinks: undefined,
|
|
14
|
+
columns: undefined
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './astro-icon-system.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/IconSystem',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,8 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './InlineEditor.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/InlineEditor',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,8 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
value: 'Example value'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './Input.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/Input',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,14 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
type: 'Example type',
|
|
13
|
+
size: 'default',
|
|
14
|
+
disabled: false,
|
|
15
|
+
readonly: false,
|
|
16
|
+
required: false,
|
|
17
|
+
'aria-invalid': false,
|
|
18
|
+
validationState: undefined
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './InputGroup.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/InputGroup',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,9 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
default: '<span>Default Slot Content</span>',
|
|
13
|
+
orientation: 'default'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './InstallPrompt.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/InstallPrompt',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,12 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
delay: 42,
|
|
13
|
+
storageKey: 'Example storageKey',
|
|
14
|
+
installLabel: 'Example installLabel',
|
|
15
|
+
dismissLabel: 'Example dismissLabel',
|
|
16
|
+
message: 'Example message'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './KeyboardShortcut.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/KeyboardShortcut',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,10 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
keys: ['Item 1', 'Item 2'],
|
|
13
|
+
enabled: false,
|
|
14
|
+
preventDefault: false
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './LanguageSelector.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/LanguageSelector',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,14 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
value: 'en',
|
|
13
|
+
options: [
|
|
14
|
+
{ label: 'English', value: 'en' },
|
|
15
|
+
{ label: 'Spanish', value: 'es' }
|
|
16
|
+
],
|
|
17
|
+
multiple: false,
|
|
18
|
+
placeholder: 'Select a language'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './LinkCard.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/LinkCard',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,8 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
default: '<span>Default Slot Content</span>'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './TelemetryScript.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/Logger',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,13 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
app: 'Example app',
|
|
13
|
+
env: undefined,
|
|
14
|
+
endpoint: 'Example endpoint',
|
|
15
|
+
enabled: false,
|
|
16
|
+
sampleRate: 42,
|
|
17
|
+
redactKeys: ['Item 1', 'Item 2']
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
* TelemetryScript — injects a
|
|
3
|
+
* TelemetryScript — injects a \<script\> that initializes the telemetry client
|
|
4
4
|
* on the page. Exposes `window.__rfr_telemetry` for other scripts to call
|
|
5
5
|
* debug / info / warn / error / fatal / child / startSpan / flush.
|
|
6
6
|
*
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Component from './MarkdownRenderer.astro'
|
|
2
2
|
|
|
3
|
-
// Auto-generated baseline story. Renders the component with empty args;
|
|
4
|
-
// components that require props show a render error (enrich by hand as needed).
|
|
5
3
|
const meta = {
|
|
6
4
|
title: 'Astro/MarkdownRenderer',
|
|
7
5
|
component: Component,
|
|
@@ -9,4 +7,11 @@ const meta = {
|
|
|
9
7
|
|
|
10
8
|
export default meta
|
|
11
9
|
|
|
12
|
-
export const Default = {
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
content: 'Example content',
|
|
13
|
+
components: 'Example components',
|
|
14
|
+
linkResolver: 'Example linkResolver',
|
|
15
|
+
size: 'default'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { createMascot, type MascotMood, type MascotAnimation, type MascotSize } from '../mascot/index.ts'
|
|
3
|
+
import { mascotVariants } from '../mascot/index.ts'
|
|
4
|
+
import { cn } from '../shared/index.ts'
|
|
5
|
+
|
|
6
|
+
interface Props extends astroHTML.JSX.HTMLAttributes {
|
|
7
|
+
mood?: MascotMood
|
|
8
|
+
animation?: MascotAnimation
|
|
9
|
+
size?: MascotSize
|
|
10
|
+
animate?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
mood = 'happy',
|
|
15
|
+
animation = 'none',
|
|
16
|
+
size = 'md',
|
|
17
|
+
animate = true,
|
|
18
|
+
class: className,
|
|
19
|
+
style,
|
|
20
|
+
...restProps
|
|
21
|
+
} = Astro.props
|
|
22
|
+
|
|
23
|
+
const api = createMascot({ mood, animation, size, animate })
|
|
24
|
+
|
|
25
|
+
const styleString = [
|
|
26
|
+
Object.entries(api.style).map(([k, v]) => `${k}:${v}`).join(';'),
|
|
27
|
+
style
|
|
28
|
+
].filter(Boolean).join(';')
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
<svg
|
|
32
|
+
class={cn('mascot', mascotVariants({ size, animation }), className)}
|
|
33
|
+
viewBox="0 0 340 300"
|
|
34
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
+
style={styleString}
|
|
36
|
+
{...api.ariaProps}
|
|
37
|
+
{...api.dataAttributes}
|
|
38
|
+
{...restProps}
|
|
39
|
+
>
|
|
40
|
+
<defs>
|
|
41
|
+
<style>
|
|
42
|
+
/* Base styles and fallback HSL values */
|
|
43
|
+
svg.mascot {
|
|
44
|
+
--primary: 138 60% 51%;
|
|
45
|
+
--primary-200: 138 60% 83%;
|
|
46
|
+
--primary-300: 138 59% 74%;
|
|
47
|
+
--primary-400: 138 59% 63%;
|
|
48
|
+
--primary-600: 138 58% 43%;
|
|
49
|
+
--primary-700: 138 58% 36%;
|
|
50
|
+
--primary-800: 138 58% 29%;
|
|
51
|
+
--primary-900: 138 58% 22%;
|
|
52
|
+
--primary-950: 139 59% 16%;
|
|
53
|
+
--sunshine: 42 100% 62%;
|
|
54
|
+
--accent-solid: 26 100% 67%;
|
|
55
|
+
|
|
56
|
+
--rfr-mascot-stroke: var(--primary-950);
|
|
57
|
+
|
|
58
|
+
fill: none;
|
|
59
|
+
stroke-linecap: round;
|
|
60
|
+
stroke-linejoin: round;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Mapping elements to tokens */
|
|
64
|
+
svg.mascot .shadow {
|
|
65
|
+
fill: hsl(var(--primary-900) / 0.15);
|
|
66
|
+
}
|
|
67
|
+
svg.mascot .stem {
|
|
68
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
69
|
+
stroke-width: 3px;
|
|
70
|
+
fill: none;
|
|
71
|
+
}
|
|
72
|
+
svg.mascot .leaf {
|
|
73
|
+
fill: hsl(var(--rfr-mascot-leaf));
|
|
74
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
75
|
+
stroke-width: 3px;
|
|
76
|
+
}
|
|
77
|
+
svg.mascot .skin-d {
|
|
78
|
+
fill: hsl(var(--rfr-mascot-skin-d));
|
|
79
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
80
|
+
stroke-width: 3px;
|
|
81
|
+
}
|
|
82
|
+
svg.mascot .skin {
|
|
83
|
+
fill: hsl(var(--rfr-mascot-skin));
|
|
84
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
85
|
+
stroke-width: 3px;
|
|
86
|
+
}
|
|
87
|
+
svg.mascot .shell-rim {
|
|
88
|
+
fill: hsl(var(--rfr-mascot-shell-rim));
|
|
89
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
90
|
+
stroke-width: 3px;
|
|
91
|
+
}
|
|
92
|
+
svg.mascot .shell {
|
|
93
|
+
fill: hsl(var(--rfr-mascot-shell));
|
|
94
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
95
|
+
stroke-width: 3px;
|
|
96
|
+
}
|
|
97
|
+
svg.mascot .belly {
|
|
98
|
+
fill: hsl(var(--rfr-mascot-belly));
|
|
99
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
100
|
+
stroke-width: 3px;
|
|
101
|
+
}
|
|
102
|
+
svg.mascot .scute {
|
|
103
|
+
fill: hsl(var(--rfr-mascot-scute));
|
|
104
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
105
|
+
stroke-width: 2.5px;
|
|
106
|
+
}
|
|
107
|
+
svg.mascot .scute.alt {
|
|
108
|
+
fill: hsl(var(--rfr-mascot-scute-alt));
|
|
109
|
+
}
|
|
110
|
+
svg.mascot .ln {
|
|
111
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
112
|
+
stroke-width: 3px;
|
|
113
|
+
fill: none;
|
|
114
|
+
}
|
|
115
|
+
svg.mascot .eye-w {
|
|
116
|
+
fill: #ffffff;
|
|
117
|
+
stroke: hsl(var(--rfr-mascot-stroke));
|
|
118
|
+
stroke-width: 3px;
|
|
119
|
+
}
|
|
120
|
+
svg.mascot .pupil {
|
|
121
|
+
fill: hsl(var(--rfr-mascot-stroke));
|
|
122
|
+
}
|
|
123
|
+
svg.mascot .glint {
|
|
124
|
+
fill: #ffffff;
|
|
125
|
+
}
|
|
126
|
+
svg.mascot .cheek {
|
|
127
|
+
fill: hsl(var(--rfr-mascot-cheek));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Float Animation keyframes */
|
|
131
|
+
@keyframes rfrMascotFloat {
|
|
132
|
+
0%, 100% {
|
|
133
|
+
transform: translateY(0);
|
|
134
|
+
}
|
|
135
|
+
50% {
|
|
136
|
+
transform: translateY(-8px);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Sway/antenna animation keyframes */
|
|
141
|
+
@keyframes rfrMascotSway {
|
|
142
|
+
0%, 100% {
|
|
143
|
+
transform: rotate(0deg);
|
|
144
|
+
}
|
|
145
|
+
50% {
|
|
146
|
+
transform: rotate(4deg);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Waving animation keyframes */
|
|
151
|
+
@keyframes rfrMascotWave {
|
|
152
|
+
0%, 100% {
|
|
153
|
+
transform: rotate(0deg);
|
|
154
|
+
}
|
|
155
|
+
50% {
|
|
156
|
+
transform: rotate(-18deg);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Bounce animation keyframes */
|
|
161
|
+
@keyframes rfrMascotBounce {
|
|
162
|
+
0%, 100% {
|
|
163
|
+
transform: translateY(0) scaleY(1);
|
|
164
|
+
}
|
|
165
|
+
50% {
|
|
166
|
+
transform: translateY(-16px) scaleY(0.96);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Animation hook connections (only active if data-animate is true or not false) */
|
|
171
|
+
svg.mascot[data-animate="true"].rfr-mascot-float .m-bob {
|
|
172
|
+
animation: rfrMascotFloat 3s ease-in-out infinite;
|
|
173
|
+
}
|
|
174
|
+
svg.mascot[data-animate="true"].rfr-mascot-float .m-sprout {
|
|
175
|
+
animation: rfrMascotSway 3s ease-in-out infinite;
|
|
176
|
+
transform-origin: 158px 92px;
|
|
177
|
+
}
|
|
178
|
+
svg.mascot[data-animate="true"].rfr-mascot-float .m-wave {
|
|
179
|
+
animation: rfrMascotWave 1.2s ease-in-out infinite;
|
|
180
|
+
transform-origin: 250px 120px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
svg.mascot[data-animate="true"].motion-safe\:animate-bounce .m-bob {
|
|
184
|
+
animation: rfrMascotBounce 1.2s ease-in-out infinite;
|
|
185
|
+
}
|
|
186
|
+
svg.mascot[data-animate="true"].motion-safe\:animate-bounce .m-sprout {
|
|
187
|
+
animation: rfrMascotSway 1.2s ease-in-out infinite;
|
|
188
|
+
transform-origin: 158px 92px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Stationary wave arm if not floating (only active if data-animate is true) */
|
|
192
|
+
svg.mascot[data-animate="true"]:not(.rfr-mascot-float) .m-wave {
|
|
193
|
+
animation: rfrMascotWave 1.2s ease-in-out infinite;
|
|
194
|
+
transform-origin: 250px 120px;
|
|
195
|
+
}
|
|
196
|
+
</style>
|
|
197
|
+
</defs>
|
|
198
|
+
|
|
199
|
+
{/* Flat Shadow at the base */}
|
|
200
|
+
<ellipse class="shadow" cx="166" cy="280" rx="116" ry="16"/>
|
|
201
|
+
|
|
202
|
+
{/* Main Bobbing Group */}
|
|
203
|
+
<g class="m-bob">
|
|
204
|
+
{/* Head Sprout */}
|
|
205
|
+
<g class="m-sprout">
|
|
206
|
+
<path class="stem" d="M158 92 C158 70 158 58 158 44"/>
|
|
207
|
+
<path class="leaf" d="M158 56 C140 50 126 58 128 74 C146 76 158 70 158 56 Z"/>
|
|
208
|
+
<path class="leaf" d="M158 50 C176 42 192 50 190 66 C172 70 158 64 158 50 Z"/>
|
|
209
|
+
</g>
|
|
210
|
+
|
|
211
|
+
{/* Back Legs & Tail (Rendered behind body) */}
|
|
212
|
+
<ellipse class="skin-d" cx="96" cy="222" rx="27" ry="32"/>
|
|
213
|
+
<ellipse class="skin-d" cx="214" cy="224" rx="27" ry="32"/>
|
|
214
|
+
<path class="skin-d" d="M58 176 C40 178 28 190 26 204 C44 206 60 196 66 182 Z"/>
|
|
215
|
+
|
|
216
|
+
{/* Shell Rim */}
|
|
217
|
+
<path class="shell-rim" d="M36 196 C30 86 92 70 162 70 C232 70 294 86 288 196 C288 210 252 220 162 220 C72 220 36 210 36 196 Z"/>
|
|
218
|
+
|
|
219
|
+
{/* Main Shell */}
|
|
220
|
+
<path class="shell" d="M44 190 C40 92 96 78 162 78 C228 78 284 92 280 190 C280 200 246 206 162 206 C78 206 44 200 44 190 Z"/>
|
|
221
|
+
|
|
222
|
+
{/* Underbelly */}
|
|
223
|
+
<path class="belly" d="M50 192 C92 206 232 206 274 192 C274 202 240 210 162 210 C84 210 50 202 50 192 Z"/>
|
|
224
|
+
|
|
225
|
+
{/* Shell Scutes (Plates) */}
|
|
226
|
+
<polygon class="scute" points="162,86 190,102 190,134 162,150 134,134 134,102"/>
|
|
227
|
+
<polygon class="scute alt" points="162,150 186,162 186,184 162,196 138,184 138,162"/>
|
|
228
|
+
<polygon class="scute alt" points="104,108 126,120 126,148 104,160 82,148 82,120"/>
|
|
229
|
+
<polygon class="scute alt" points="220,108 242,120 242,148 220,160 198,148 198,120"/>
|
|
230
|
+
<polygon class="scute" points="108,162 126,172 126,190 108,200 90,190 90,172"/>
|
|
231
|
+
<polygon class="scute" points="216,162 234,172 234,190 216,200 198,190 198,172"/>
|
|
232
|
+
|
|
233
|
+
{/* Front Legs */}
|
|
234
|
+
<ellipse class="skin" cx="116" cy="232" rx="25" ry="31"/>
|
|
235
|
+
<ellipse class="skin" cx="236" cy="234" rx="25" ry="31"/>
|
|
236
|
+
<path class="ln" d="M104 250 H128 M224 252 H248" opacity="0.4"/>
|
|
237
|
+
|
|
238
|
+
{/* Waving Arm (Conditional or animated) */}
|
|
239
|
+
{mood === 'wave' && (
|
|
240
|
+
<g class="m-wave">
|
|
241
|
+
<ellipse class="skin" cx="250" cy="120" rx="15" ry="22"/>
|
|
242
|
+
<path class="ln" d="M244 104 q6 -8 12 0" opacity="0.4"/>
|
|
243
|
+
</g>
|
|
244
|
+
)}
|
|
245
|
+
|
|
246
|
+
{/* Head, Neck, Blush */}
|
|
247
|
+
<path class="skin" d="M262 150 C276 142 296 142 310 150 L312 176 C300 188 274 188 262 178 Z"/>
|
|
248
|
+
<ellipse class="skin" cx="296" cy="156" rx="40" ry="36"/>
|
|
249
|
+
<ellipse class="cheek" cx="280" cy="174" rx="11" ry="8"/>
|
|
250
|
+
|
|
251
|
+
{/* Facial Features (Eyes and Mouth) */}
|
|
252
|
+
{mood === 'think' ? (
|
|
253
|
+
<g class="mascot-face-think">
|
|
254
|
+
<ellipse class="eye-w" cx="286" cy="150" rx="11" ry="13"/>
|
|
255
|
+
<ellipse class="eye-w" cx="314" cy="152" rx="10" ry="12"/>
|
|
256
|
+
<circle class="pupil" cx="288" cy="146" r="5.5"/>
|
|
257
|
+
<circle class="pupil" cx="315" cy="148" r="5"/>
|
|
258
|
+
<circle class="glint" cx="290" cy="143" r="1.9"/>
|
|
259
|
+
<circle class="glint" cx="317" cy="145" r="1.7"/>
|
|
260
|
+
<path class="ln" d="M280 174 q10 -5 18 1"/>
|
|
261
|
+
</g>
|
|
262
|
+
) : (
|
|
263
|
+
<g class="mascot-face-happy">
|
|
264
|
+
<ellipse class="eye-w" cx="286" cy="150" rx="11" ry="13"/>
|
|
265
|
+
<ellipse class="eye-w" cx="314" cy="152" rx="10" ry="12"/>
|
|
266
|
+
<circle class="pupil" cx="289" cy="152" r="5.5"/>
|
|
267
|
+
<circle class="pupil" cx="316" cy="154" r="5"/>
|
|
268
|
+
<circle class="glint" cx="291" cy="149" r="1.9"/>
|
|
269
|
+
<circle class="glint" cx="318" cy="151" r="1.7"/>
|
|
270
|
+
<path class="ln" d="M286 172 C294 180 306 180 314 171"/>
|
|
271
|
+
</g>
|
|
272
|
+
)}
|
|
273
|
+
</g>
|
|
274
|
+
</svg>
|