@diegopluna/narvi 0.1.0 → 0.2.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/README.md +102 -41
- package/dist/base.css +2 -2
- package/dist/color.d.ts +1 -1
- package/dist/color.js +1 -1
- package/dist/components/activity/ActivityContent.svelte +3 -15
- package/dist/components/activity/ActivityStep.svelte +12 -12
- package/dist/components/activity/ActivityThought.svelte +4 -4
- package/dist/components/activity/ActivityTrigger.svelte +3 -3
- package/dist/components/app-shell/AppShellBar.svelte +89 -0
- package/dist/components/app-shell/AppShellBar.svelte.d.ts +20 -0
- package/dist/components/app-shell/AppShellHeader.svelte +17 -16
- package/dist/components/app-shell/AppShellHeader.svelte.d.ts +2 -2
- package/dist/components/app-shell/AppShellMain.svelte +4 -20
- package/dist/components/app-shell/AppShellPanel.svelte +21 -19
- package/dist/components/app-shell/AppShellPanes.svelte +58 -0
- package/dist/components/app-shell/AppShellPanes.svelte.d.ts +11 -0
- package/dist/components/app-shell/AppShellRail.svelte +85 -0
- package/dist/components/app-shell/AppShellRail.svelte.d.ts +11 -0
- package/dist/components/app-shell/AppShellRoot.svelte +50 -24
- package/dist/components/app-shell/AppShellRoot.svelte.d.ts +8 -6
- package/dist/components/app-shell/AppShellSheet.svelte +95 -0
- package/dist/components/app-shell/AppShellSheet.svelte.d.ts +17 -0
- package/dist/components/app-shell/AppShellSidebar.svelte +37 -61
- package/dist/components/app-shell/AppShellSidebar.svelte.d.ts +1 -5
- package/dist/components/app-shell/AppShellToggle.svelte +62 -23
- package/dist/components/app-shell/AppShellToggle.svelte.d.ts +2 -0
- package/dist/components/app-shell/context.d.ts +6 -0
- package/dist/components/app-shell/index.d.ts +9 -1
- package/dist/components/app-shell/index.js +5 -1
- package/dist/components/approval/Approval.svelte +91 -19
- package/dist/components/approval/Approval.svelte.d.ts +7 -0
- package/dist/components/avatar/AvatarFallback.svelte +1 -2
- package/dist/components/avatar/AvatarRoot.svelte +2 -2
- package/dist/components/badge/Badge.svelte +5 -5
- package/dist/components/button/Button.svelte +219 -40
- package/dist/components/button/Button.svelte.d.ts +38 -2
- package/dist/components/card/Card.svelte +15 -26
- package/dist/components/change-stats/ChangeStats.svelte +1 -2
- package/dist/components/changes-summary/ChangesSummary.svelte +14 -15
- package/dist/components/checkbox/Checkbox.svelte +18 -15
- package/dist/components/checkbox/Checkbox.svelte.d.ts +5 -0
- package/dist/components/code/Code.svelte +1 -2
- package/dist/components/collapsible/CollapsibleTrigger.svelte +2 -2
- package/dist/components/command/CommandItem.svelte +1 -1
- package/dist/components/command/styles.d.ts +3 -2
- package/dist/components/command/styles.js +13 -10
- package/dist/components/composer/ComposerAttachButton.svelte +1 -1
- package/dist/components/composer/ComposerAttachment.svelte +9 -12
- package/dist/components/composer/ComposerModelPicker.svelte +18 -20
- package/dist/components/composer/ComposerRoot.svelte +8 -7
- package/dist/components/composer/ComposerSubmit.svelte +8 -15
- package/dist/components/composer/ComposerTextarea.svelte +1 -1
- package/dist/components/composer/ComposerToggle.svelte +9 -11
- package/dist/components/composer/ComposerTray.svelte +78 -0
- package/dist/components/composer/ComposerTray.svelte.d.ts +15 -0
- package/dist/components/composer/index.d.ts +3 -1
- package/dist/components/composer/index.js +3 -2
- package/dist/components/conversation/ConversationContent.svelte +3 -2
- package/dist/components/conversation/ConversationEmpty.svelte +1 -1
- package/dist/components/conversation/ConversationScrollButton.svelte +3 -3
- package/dist/components/dialog/ConfirmDialog.svelte +1 -1
- package/dist/components/dialog/styles.d.ts +2 -3
- package/dist/components/dialog/styles.js +5 -6
- package/dist/components/divider/Divider.svelte +3 -3
- package/dist/components/empty-state/EmptyState.svelte +4 -5
- package/dist/components/field/Field.svelte +4 -4
- package/dist/components/frame/Frame.svelte +6 -7
- package/dist/components/frame/Frame.svelte.d.ts +1 -1
- package/dist/components/heading/Heading.svelte +2 -2
- package/dist/components/kbd/Kbd.svelte +12 -7
- package/dist/components/link/Link.svelte +7 -3
- package/dist/components/link/Link.svelte.d.ts +4 -1
- package/dist/components/markdown/Markdown.svelte +714 -0
- package/dist/components/markdown/Markdown.svelte.d.ts +80 -0
- package/dist/components/markdown/MarkdownBlock.svelte +231 -0
- package/dist/components/markdown/MarkdownBlock.svelte.d.ts +11 -0
- package/dist/components/markdown/MarkdownBlocks.svelte +115 -0
- package/dist/components/markdown/MarkdownBlocks.svelte.d.ts +15 -0
- package/dist/components/markdown/MarkdownCode.svelte +583 -0
- package/dist/components/markdown/MarkdownCode.svelte.d.ts +23 -0
- package/dist/components/markdown/MarkdownDiagram.svelte +310 -0
- package/dist/components/markdown/MarkdownDiagram.svelte.d.ts +6 -0
- package/dist/components/markdown/MarkdownFile.svelte +134 -0
- package/dist/components/markdown/MarkdownFile.svelte.d.ts +19 -0
- package/dist/components/markdown/MarkdownFootnotes.svelte +61 -0
- package/dist/components/markdown/MarkdownFootnotes.svelte.d.ts +8 -0
- package/dist/components/markdown/MarkdownFresh.svelte +69 -0
- package/dist/components/markdown/MarkdownFresh.svelte.d.ts +6 -0
- package/dist/components/markdown/MarkdownHtml.svelte +72 -0
- package/dist/components/markdown/MarkdownHtml.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownImage.svelte +150 -0
- package/dist/components/markdown/MarkdownImage.svelte.d.ts +8 -0
- package/dist/components/markdown/MarkdownInlines.svelte +225 -0
- package/dist/components/markdown/MarkdownInlines.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownLink.svelte +120 -0
- package/dist/components/markdown/MarkdownLink.svelte.d.ts +25 -0
- package/dist/components/markdown/MarkdownMath.svelte +138 -0
- package/dist/components/markdown/MarkdownMath.svelte.d.ts +7 -0
- package/dist/components/markdown/MarkdownTable.svelte +265 -0
- package/dist/components/markdown/MarkdownTable.svelte.d.ts +17 -0
- package/dist/components/markdown/caret.d.ts +14 -0
- package/dist/components/markdown/caret.js +67 -0
- package/dist/components/markdown/context.d.ts +93 -0
- package/dist/components/markdown/context.js +128 -0
- package/dist/components/markdown/copy.d.ts +13 -0
- package/dist/components/markdown/copy.js +74 -0
- package/dist/components/markdown/hidden.d.ts +12 -0
- package/dist/components/markdown/hidden.js +31 -0
- package/dist/components/markdown/kept.d.ts +32 -0
- package/dist/components/markdown/kept.js +71 -0
- package/dist/components/markdown/labels.d.ts +46 -0
- package/dist/components/markdown/labels.js +35 -0
- package/dist/components/markdown/save.d.ts +11 -0
- package/dist/components/markdown/save.js +58 -0
- package/dist/components/markdown/scrollable.d.ts +24 -0
- package/dist/components/markdown/scrollable.js +152 -0
- package/dist/components/markdown/static.d.ts +37 -0
- package/dist/components/markdown/static.js +233 -0
- package/dist/components/markdown/styles.d.ts +328 -0
- package/dist/components/markdown/styles.js +302 -0
- package/dist/components/menu/MenuRadioItem.svelte +3 -3
- package/dist/components/menu/index.d.ts +23 -0
- package/dist/components/menu/index.js +3 -1
- package/dist/components/message/MessageAction.svelte +22 -2
- package/dist/components/message/MessageAction.svelte.d.ts +9 -0
- package/dist/components/message/MessageContent.svelte +2 -3
- package/dist/components/message/MessageCopy.svelte +62 -3
- package/dist/components/message/MessageCopy.svelte.d.ts +17 -1
- package/dist/components/message/MessageHeader.svelte +3 -3
- package/dist/components/message/MessagePending.svelte +1 -1
- package/dist/components/message/MessageTime.svelte +1 -1
- package/dist/components/notice/Notice.svelte +14 -10
- package/dist/components/plan/Plan.svelte +22 -17
- package/dist/components/progress/Progress.svelte +31 -33
- package/dist/components/questionnaire/Questionnaire.svelte +19 -22
- package/dist/components/queued-message/QueuedMessage.svelte +14 -7
- package/dist/components/rail/RailItem.svelte +37 -34
- package/dist/components/rail/RailItem.svelte.d.ts +3 -1
- package/dist/components/rail/RailRoot.svelte +18 -4
- package/dist/components/rail/RailRoot.svelte.d.ts +1 -1
- package/dist/components/rail/RailSeparator.svelte +17 -0
- package/dist/components/rail/RailSeparator.svelte.d.ts +18 -0
- package/dist/components/rail/index.d.ts +2 -1
- package/dist/components/rail/index.js +2 -1
- package/dist/components/reasoning/ReasoningContent.svelte +4 -8
- package/dist/components/reasoning/ReasoningTrigger.svelte +2 -2
- package/dist/components/resize-handle/ResizeHandle.svelte +2 -3
- package/dist/components/segmented/SegmentedControl.svelte +7 -8
- package/dist/components/select/Select.svelte +1 -1
- package/dist/components/separator/Separator.svelte +1 -1
- package/dist/components/settings-row/SettingsRow.svelte +5 -5
- package/dist/components/shimmer/Shimmer.svelte +34 -21
- package/dist/components/sidebar/SidebarContent.svelte +1 -1
- package/dist/components/sidebar/SidebarFolder.svelte +142 -0
- package/dist/components/sidebar/SidebarFolder.svelte.d.ts +19 -0
- package/dist/components/sidebar/SidebarFooter.svelte +1 -1
- package/dist/components/sidebar/SidebarGroup.svelte +36 -32
- package/dist/components/sidebar/SidebarGroup.svelte.d.ts +3 -3
- package/dist/components/sidebar/SidebarHeader.svelte +12 -6
- package/dist/components/sidebar/SidebarHeader.svelte.d.ts +4 -1
- package/dist/components/sidebar/SidebarItem.svelte +26 -32
- package/dist/components/sidebar/SidebarRoot.svelte +62 -0
- package/dist/components/sidebar/SidebarRoot.svelte.d.ts +14 -0
- package/dist/components/sidebar/index.d.ts +5 -1
- package/dist/components/sidebar/index.js +3 -1
- package/dist/components/skeleton/Skeleton.svelte +26 -15
- package/dist/components/slider/Slider.svelte +11 -10
- package/dist/components/spinner/Spinner.svelte +4 -11
- package/dist/components/status-indicator/StatusIndicator.svelte +1 -1
- package/dist/components/suggestions/SuggestionsItem.svelte +5 -5
- package/dist/components/switch/Switch.svelte +9 -14
- package/dist/components/tab-strip/TabStrip.svelte +340 -0
- package/dist/components/tab-strip/TabStrip.svelte.d.ts +31 -0
- package/dist/components/tabs/Tabs.svelte +13 -9
- package/dist/components/tabs/Tabs.svelte.d.ts +4 -0
- package/dist/components/text/Text.svelte +31 -23
- package/dist/components/text/Text.svelte.d.ts +8 -4
- package/dist/components/toast/Toaster.svelte +5 -5
- package/dist/components/tool/ToolContent.svelte +3 -8
- package/dist/components/tool/ToolSection.svelte +4 -5
- package/dist/components/tool/ToolTrigger.svelte +10 -9
- package/dist/components/tooltip/TooltipContent.svelte +3 -3
- package/dist/components/work-fold/WorkFold.svelte +5 -9
- package/dist/index.d.ts +16 -8
- package/dist/index.js +17 -10
- package/dist/internal/Code.svelte +3 -4
- package/dist/internal/Glyph.svelte +16 -0
- package/dist/internal/Glyph.svelte.d.ts +6 -0
- package/dist/internal/Tile.svelte +17 -37
- package/dist/internal/control.d.ts +4 -4
- package/dist/internal/control.js +20 -17
- package/dist/internal/layer.d.ts +3 -5
- package/dist/internal/layer.js +10 -12
- package/dist/internal/markers.stylex.d.ts +8 -0
- package/dist/internal/markers.stylex.js +4 -0
- package/dist/internal/plugin-order.d.ts +8 -0
- package/dist/internal/plugin-order.js +16 -0
- package/dist/internal/roving.js +5 -2
- package/dist/internal/shared.d.ts +8 -1
- package/dist/internal/shared.js +21 -5
- package/dist/internal/sx.d.ts +1 -1
- package/dist/internal/toggle.d.ts +1 -2
- package/dist/internal/toggle.js +8 -12
- package/dist/internal/visible.d.ts +32 -0
- package/dist/internal/visible.js +44 -0
- package/dist/markdown/ast.d.ts +209 -0
- package/dist/markdown/ast.js +10 -0
- package/dist/markdown/blocks.d.ts +177 -0
- package/dist/markdown/blocks.js +1489 -0
- package/dist/markdown/code-info.d.ts +10 -0
- package/dist/markdown/code-info.js +16 -0
- package/dist/markdown/common.d.ts +25 -0
- package/dist/markdown/common.js +107 -0
- package/dist/markdown/diagrams.d.ts +2 -0
- package/dist/markdown/diagrams.js +18 -0
- package/dist/markdown/file-paths.d.ts +29 -0
- package/dist/markdown/file-paths.js +80 -0
- package/dist/markdown/files.d.ts +16 -0
- package/dist/markdown/files.js +133 -0
- package/dist/markdown/highlight.d.ts +30 -0
- package/dist/markdown/highlight.js +127 -0
- package/dist/markdown/html.d.ts +23 -0
- package/dist/markdown/html.js +289 -0
- package/dist/markdown/images.d.ts +15 -0
- package/dist/markdown/images.js +45 -0
- package/dist/markdown/index.d.ts +12 -0
- package/dist/markdown/index.js +5 -0
- package/dist/markdown/inlines.d.ts +48 -0
- package/dist/markdown/inlines.js +1714 -0
- package/dist/markdown/math.d.ts +2 -0
- package/dist/markdown/math.js +22 -0
- package/dist/markdown/parse.d.ts +81 -0
- package/dist/markdown/parse.js +204 -0
- package/dist/markdown/plugin.d.ts +178 -0
- package/dist/markdown/plugin.js +160 -0
- package/dist/markdown/sanitize.d.ts +78 -0
- package/dist/markdown/sanitize.js +522 -0
- package/dist/markdown/share.d.ts +12 -0
- package/dist/markdown/share.js +59 -0
- package/dist/markdown/table.d.ts +13 -0
- package/dist/markdown/table.js +60 -0
- package/dist/preset.d.ts +40 -16
- package/dist/preset.js +169 -51
- package/dist/tokens.stylex.d.ts +55 -37
- package/dist/tokens.stylex.js +107 -62
- package/dist/typography.d.ts +48 -0
- package/dist/typography.js +55 -0
- package/dist/vite.d.ts +7 -1
- package/dist/vite.js +27 -2
- package/package.json +53 -6
- package/skills/building-ui/SKILL.md +242 -0
- package/skills/building-ui/references/components.md +207 -0
- package/skills/markdown/SKILL.md +452 -0
- package/skills/markdown/references/plugins.md +103 -0
- package/skills/setup/SKILL.md +191 -0
- package/skills/styling/SKILL.md +269 -0
- package/skills/theming/SKILL.md +184 -0
- package/dist/internal/loop.d.ts +0 -35
- package/dist/internal/loop.js +0 -72
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
5
|
import { attrs, type Sx } from '../../internal/sx.js';
|
|
6
6
|
import { colors, font } from '../../tokens.stylex.js';
|
|
7
|
+
import { typography } from '../../typography.js';
|
|
7
8
|
|
|
8
|
-
/**
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* What the text is. Each role is one size, weight and line height: `title`, `reading`
|
|
11
|
+
* (a reply, the prompt), `label` (what names a thing), `body` (running copy), `meta`,
|
|
12
|
+
* `caption` and `micro`. `lead` is a lede: the line under a page's title.
|
|
13
|
+
*/
|
|
14
|
+
export type TextVariant =
|
|
15
|
+
'title' | 'reading' | 'label' | 'body' | 'meta' | 'caption' | 'micro' | 'lead';
|
|
10
16
|
export type TextTone = 'default' | 'muted' | 'subtle' | 'accent' | 'danger' | 'success';
|
|
11
17
|
export type TextWeight = 'regular' | 'medium' | 'semibold';
|
|
12
18
|
/** `body` is the page's own face; `display` is the serif that large headings are set in. */
|
|
@@ -15,9 +21,9 @@
|
|
|
15
21
|
export type TextProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
|
|
16
22
|
/** Element to render. */
|
|
17
23
|
as?: 'p' | 'span' | 'div' | 'label' | 'strong' | 'em' | 'small' | 'figcaption' | 'blockquote';
|
|
18
|
-
|
|
24
|
+
variant?: TextVariant;
|
|
19
25
|
tone?: TextTone;
|
|
20
|
-
/**
|
|
26
|
+
/** Over the role's own weight. In the display face the weight is the heading's. */
|
|
21
27
|
weight?: TextWeight;
|
|
22
28
|
face?: TextFace;
|
|
23
29
|
italic?: boolean;
|
|
@@ -32,7 +38,6 @@
|
|
|
32
38
|
margin: 0,
|
|
33
39
|
fontFamily: font.body,
|
|
34
40
|
fontStyle: 'normal',
|
|
35
|
-
lineHeight: font.leadingNormal,
|
|
36
41
|
textWrap: 'pretty'
|
|
37
42
|
},
|
|
38
43
|
display: {
|
|
@@ -51,23 +56,26 @@
|
|
|
51
56
|
}
|
|
52
57
|
});
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
// A lede has no role among the seven: it is a page's, set fluid between two sizes
|
|
60
|
+
const lead = stylex.create({
|
|
61
|
+
body: {
|
|
62
|
+
fontSize: 'clamp(1.125rem, 1rem + 0.5vw, 1.25rem)',
|
|
63
|
+
fontWeight: font.weightRegular,
|
|
64
|
+
lineHeight: font.leadingNormal,
|
|
65
|
+
textWrap: 'balance'
|
|
66
|
+
}
|
|
61
67
|
});
|
|
62
68
|
|
|
63
69
|
// The display serif has a small lowercase, so at the same size it reads a step smaller than
|
|
64
|
-
// the body face. Each
|
|
70
|
+
// the body face. Each role is set larger in it, to read as the same size beside body text.
|
|
65
71
|
const displaySizes = stylex.create({
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
micro: { fontSize: '0.8125rem' },
|
|
73
|
+
caption: { fontSize: '0.875rem' },
|
|
74
|
+
meta: { fontSize: '1rem' },
|
|
75
|
+
body: { fontSize: '1.125rem' },
|
|
76
|
+
label: { fontSize: '1.125rem' },
|
|
77
|
+
reading: { fontSize: '1.25rem' },
|
|
78
|
+
title: { fontSize: '1.375rem' },
|
|
71
79
|
lead: {
|
|
72
80
|
fontSize: 'clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem)',
|
|
73
81
|
lineHeight: font.leadingTight,
|
|
@@ -79,7 +87,7 @@
|
|
|
79
87
|
default: { color: colors.text },
|
|
80
88
|
muted: { color: colors.textMuted },
|
|
81
89
|
subtle: { color: colors.textSubtle },
|
|
82
|
-
accent: { color: colors.
|
|
90
|
+
accent: { color: colors.accent },
|
|
83
91
|
danger: { color: colors.danger },
|
|
84
92
|
success: { color: colors.success }
|
|
85
93
|
});
|
|
@@ -94,7 +102,7 @@
|
|
|
94
102
|
<script lang="ts">
|
|
95
103
|
let {
|
|
96
104
|
as = 'p',
|
|
97
|
-
|
|
105
|
+
variant = 'body',
|
|
98
106
|
tone = 'default',
|
|
99
107
|
weight,
|
|
100
108
|
face = 'body',
|
|
@@ -115,10 +123,10 @@
|
|
|
115
123
|
{...attrs(
|
|
116
124
|
[
|
|
117
125
|
styles.base,
|
|
118
|
-
|
|
119
|
-
display
|
|
126
|
+
variant === 'lead' ? lead.body : typography[variant],
|
|
127
|
+
display && [styles.display, displaySizes[variant]],
|
|
120
128
|
tones[tone],
|
|
121
|
-
weight
|
|
129
|
+
weight && weights[weight],
|
|
122
130
|
italic && styles.italic,
|
|
123
131
|
truncate && styles.truncate,
|
|
124
132
|
sx
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
3
|
import { type Sx } from '../../internal/sx.js';
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* What the text is. Each role is one size, weight and line height: `title`, `reading`
|
|
6
|
+
* (a reply, the prompt), `label` (what names a thing), `body` (running copy), `meta`,
|
|
7
|
+
* `caption` and `micro`. `lead` is a lede: the line under a page's title.
|
|
8
|
+
*/
|
|
9
|
+
export type TextVariant = 'title' | 'reading' | 'label' | 'body' | 'meta' | 'caption' | 'micro' | 'lead';
|
|
6
10
|
export type TextTone = 'default' | 'muted' | 'subtle' | 'accent' | 'danger' | 'success';
|
|
7
11
|
export type TextWeight = 'regular' | 'medium' | 'semibold';
|
|
8
12
|
/** `body` is the page's own face; `display` is the serif that large headings are set in. */
|
|
@@ -10,9 +14,9 @@ export type TextFace = 'body' | 'display';
|
|
|
10
14
|
export type TextProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
|
|
11
15
|
/** Element to render. */
|
|
12
16
|
as?: 'p' | 'span' | 'div' | 'label' | 'strong' | 'em' | 'small' | 'figcaption' | 'blockquote';
|
|
13
|
-
|
|
17
|
+
variant?: TextVariant;
|
|
14
18
|
tone?: TextTone;
|
|
15
|
-
/**
|
|
19
|
+
/** Over the role's own weight. In the display face the weight is the heading's. */
|
|
16
20
|
weight?: TextWeight;
|
|
17
21
|
face?: TextFace;
|
|
18
22
|
italic?: boolean;
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
paddingBlock: '0.75rem',
|
|
49
49
|
paddingInlineStart: '0.875rem',
|
|
50
50
|
paddingInlineEnd: '0.5rem',
|
|
51
|
-
borderRadius: radius.
|
|
51
|
+
borderRadius: radius.card,
|
|
52
52
|
backgroundColor: colors.bgRaised,
|
|
53
|
-
boxShadow: `inset 0 0 0 1px ${colors.
|
|
53
|
+
boxShadow: `inset 0 0 0 1px ${colors.borderStrong}, 0 16px 40px -12px ${colors.shadow}`,
|
|
54
54
|
color: colors.text,
|
|
55
55
|
fontFamily: font.body,
|
|
56
|
-
fontSize: font.
|
|
56
|
+
fontSize: font.sizeBody,
|
|
57
57
|
lineHeight: font.leadingSnug,
|
|
58
58
|
pointerEvents: 'auto',
|
|
59
59
|
opacity: { default: 1, '@starting-style': 0 },
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
width: '0.375rem',
|
|
76
76
|
height: '0.375rem',
|
|
77
77
|
borderRadius: '9999px',
|
|
78
|
-
backgroundColor: colors.
|
|
78
|
+
backgroundColor: colors.accent
|
|
79
79
|
},
|
|
80
80
|
success: { color: colors.success },
|
|
81
81
|
error: { color: colors.danger },
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
// What went wrong can be selected and copied
|
|
92
92
|
description: {
|
|
93
93
|
color: colors.textMuted,
|
|
94
|
-
fontSize: font.
|
|
94
|
+
fontSize: font.sizeMeta,
|
|
95
95
|
userSelect: 'text',
|
|
96
96
|
overflowWrap: 'anywhere'
|
|
97
97
|
},
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
5
|
import Collapse from '../../internal/Collapse.svelte';
|
|
6
6
|
import type { Sx } from '../../internal/sx.js';
|
|
7
|
-
import { colors } from '../../tokens.stylex.js';
|
|
8
7
|
import { getToolContext } from './context.js';
|
|
9
8
|
|
|
10
9
|
export type ToolContentProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
@@ -14,19 +13,15 @@
|
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
const styles = stylex.create({
|
|
17
|
-
// Input and output
|
|
16
|
+
// Input and output are set in under the icon, in line with the title
|
|
18
17
|
body: {
|
|
19
18
|
display: 'flex',
|
|
20
19
|
flexDirection: 'column',
|
|
21
20
|
gap: '0.75rem',
|
|
22
21
|
marginTop: '0.5rem',
|
|
23
22
|
marginBottom: '0.25rem',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
paddingBlock: '0.125rem',
|
|
27
|
-
borderInlineStartWidth: '1px',
|
|
28
|
-
borderInlineStartStyle: 'solid',
|
|
29
|
-
borderInlineStartColor: colors.line
|
|
23
|
+
paddingInlineStart: '1.625rem',
|
|
24
|
+
paddingBlock: '0.125rem'
|
|
30
25
|
}
|
|
31
26
|
});
|
|
32
27
|
</script>
|
|
@@ -40,11 +40,10 @@
|
|
|
40
40
|
margin: 0,
|
|
41
41
|
paddingBlock: '0.5625rem',
|
|
42
42
|
paddingInline: '0.75rem',
|
|
43
|
-
borderRadius: radius.
|
|
44
|
-
backgroundColor: colors.
|
|
45
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}`,
|
|
43
|
+
borderRadius: radius.control,
|
|
44
|
+
backgroundColor: colors.fillSunken,
|
|
46
45
|
fontFamily: font.mono,
|
|
47
|
-
fontSize: font.
|
|
46
|
+
fontSize: font.sizeCaption,
|
|
48
47
|
lineHeight: font.leadingSnug
|
|
49
48
|
},
|
|
50
49
|
key: { margin: 0, color: colors.textSubtle },
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
literal: { color: colors.codeLiteral },
|
|
55
54
|
custom: {
|
|
56
55
|
minWidth: 0,
|
|
57
|
-
fontSize: font.
|
|
56
|
+
fontSize: font.sizeMeta,
|
|
58
57
|
lineHeight: font.leadingNormal
|
|
59
58
|
}
|
|
60
59
|
});
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const styles = stylex.create({
|
|
32
|
-
// A row
|
|
32
|
+
// A row of the turn, like thinking and activity: an icon, then the words
|
|
33
33
|
trigger: {
|
|
34
34
|
display: 'flex',
|
|
35
35
|
alignItems: 'center',
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
margin: 0,
|
|
41
41
|
padding: 0,
|
|
42
42
|
borderWidth: 0,
|
|
43
|
-
borderRadius: radius.
|
|
43
|
+
borderRadius: radius.chip,
|
|
44
44
|
backgroundColor: 'transparent',
|
|
45
45
|
color: { default: colors.textMuted, ':hover': { default: null, [media.hover]: colors.text } },
|
|
46
46
|
fontFamily: 'inherit',
|
|
47
|
-
fontSize: font.
|
|
47
|
+
fontSize: font.sizeBody,
|
|
48
48
|
lineHeight: font.leadingSnug,
|
|
49
49
|
textAlign: 'start',
|
|
50
50
|
cursor: 'pointer',
|
|
@@ -81,8 +81,9 @@
|
|
|
81
81
|
textOverflow: 'ellipsis',
|
|
82
82
|
whiteSpace: 'nowrap',
|
|
83
83
|
color: colors.textSubtle,
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
// A `<code>`, in the text's own face: a name, not a listing
|
|
85
|
+
fontFamily: 'inherit',
|
|
86
|
+
fontSize: font.sizeCaption
|
|
86
87
|
},
|
|
87
88
|
// A new state settles into place, so the change from spinner to tick is seen
|
|
88
89
|
status: {
|
|
@@ -90,7 +91,7 @@
|
|
|
90
91
|
alignItems: 'center',
|
|
91
92
|
gap: '0.25rem',
|
|
92
93
|
flexShrink: 0,
|
|
93
|
-
fontSize: font.
|
|
94
|
+
fontSize: font.sizeCaption,
|
|
94
95
|
fontWeight: font.weightMedium,
|
|
95
96
|
opacity: { default: 1, '@starting-style': 0 },
|
|
96
97
|
scale: { default: null, [media.motion]: { default: 1, '@starting-style': 0.6 } },
|
|
@@ -99,14 +100,14 @@
|
|
|
99
100
|
transitionTimingFunction: motion.easeOut
|
|
100
101
|
},
|
|
101
102
|
nameAsTitle: { color: 'inherit' },
|
|
102
|
-
running: { color: colors.
|
|
103
|
+
running: { color: colors.accent },
|
|
103
104
|
complete: { color: colors.success },
|
|
104
105
|
error: {
|
|
105
106
|
paddingBlock: '0.125rem',
|
|
106
107
|
paddingInline: '0.4375rem',
|
|
107
|
-
borderRadius: radius.
|
|
108
|
+
borderRadius: radius.panel,
|
|
108
109
|
backgroundColor: colors.dangerSoft,
|
|
109
|
-
color: colors.
|
|
110
|
+
color: colors.dangerText
|
|
110
111
|
},
|
|
111
112
|
chevron: {
|
|
112
113
|
display: 'grid',
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
maxWidth: '18rem',
|
|
27
27
|
paddingBlock: '0.3125rem',
|
|
28
28
|
paddingInline: '0.5rem',
|
|
29
|
-
borderRadius: radius.
|
|
29
|
+
borderRadius: radius.control,
|
|
30
30
|
backgroundColor: colors.bgRaised,
|
|
31
|
-
boxShadow: `inset 0 0 0 1px ${colors.
|
|
31
|
+
boxShadow: `inset 0 0 0 1px ${colors.borderStrong}, 0 4px 12px -4px ${colors.shadow}`,
|
|
32
32
|
color: colors.text,
|
|
33
33
|
fontFamily: font.body,
|
|
34
|
-
fontSize: font.
|
|
34
|
+
fontSize: font.sizeCaption,
|
|
35
35
|
lineHeight: font.leadingSnug,
|
|
36
36
|
transformOrigin: 'var(--bits-floating-transform-origin)',
|
|
37
37
|
opacity: { default: 1, '@starting-style': 0, [CLOSED]: 0 },
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
margin: 0,
|
|
36
36
|
padding: 0,
|
|
37
37
|
borderWidth: 0,
|
|
38
|
-
borderRadius: radius.
|
|
38
|
+
borderRadius: radius.chip,
|
|
39
39
|
backgroundColor: 'transparent',
|
|
40
40
|
color: { default: colors.textMuted, ':hover': { default: null, [media.hover]: colors.text } },
|
|
41
41
|
fontFamily: 'inherit',
|
|
42
|
-
fontSize: font.
|
|
42
|
+
fontSize: font.sizeBody,
|
|
43
43
|
cursor: 'pointer',
|
|
44
44
|
outlineStyle: 'solid',
|
|
45
45
|
outlineWidth: { default: 0, ':focus-visible': '2px' },
|
|
@@ -51,19 +51,15 @@
|
|
|
51
51
|
},
|
|
52
52
|
label: { display: 'inline-flex', alignItems: 'center', gap: '0.25rem' },
|
|
53
53
|
chevron: { display: 'grid', color: colors.textSubtle },
|
|
54
|
-
// The work
|
|
54
|
+
// The work is set in under the icon, its rows in line with the label
|
|
55
55
|
work: {
|
|
56
56
|
display: 'flex',
|
|
57
57
|
flexDirection: 'column',
|
|
58
58
|
gap: '0.75rem',
|
|
59
59
|
marginTop: '0.5rem',
|
|
60
60
|
marginBottom: '0.25rem',
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
paddingBlock: '0.25rem',
|
|
64
|
-
borderInlineStartWidth: '1px',
|
|
65
|
-
borderInlineStartStyle: 'solid',
|
|
66
|
-
borderInlineStartColor: colors.line
|
|
61
|
+
paddingInlineStart: '1.625rem',
|
|
62
|
+
paddingBlock: '0.25rem'
|
|
67
63
|
}
|
|
68
64
|
});
|
|
69
65
|
</script>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { default as Approval } from './components/approval/Approval.svelte';
|
|
2
|
-
export type { ApprovalAnswer, ApprovalChoice, ApprovalProps } from './components/approval/Approval.svelte';
|
|
2
|
+
export type { ApprovalAnswer, ApprovalChoice, ApprovalProps, ApprovalShortcut } from './components/approval/Approval.svelte';
|
|
3
3
|
export * as AppShell from './components/app-shell/index.js';
|
|
4
4
|
export { getAppShellContext } from './components/app-shell/index.js';
|
|
5
|
-
export type { AppShellContext, AppShellHeaderProps, AppShellMainProps, AppShellPanelProps, AppShellRootProps, AppShellSidebarProps, AppShellToggleProps } from './components/app-shell/index.js';
|
|
5
|
+
export type { AppShellBarProps, AppShellContext, AppShellHeaderProps, AppShellMainProps, AppShellPanelProps, AppShellPanesProps, AppShellRailProps, AppShellRootProps, AppShellSheetProps, AppShellSidebarProps, AppShellToggleProps } from './components/app-shell/index.js';
|
|
6
6
|
export * as Activity from './components/activity/index.js';
|
|
7
7
|
export type { ActivityContentProps, ActivityRootProps, ActivityStepKind, ActivityStepProps, ActivityStepStatus, ActivityThoughtProps, ActivityTriggerProps } from './components/activity/index.js';
|
|
8
8
|
export { default as Announcer } from './components/announcer/Announcer.svelte';
|
|
@@ -12,7 +12,7 @@ export type { AvatarFallbackProps, AvatarImageProps, AvatarRootProps, AvatarSize
|
|
|
12
12
|
export { default as Badge } from './components/badge/Badge.svelte';
|
|
13
13
|
export type { BadgeProps, BadgeTone } from './components/badge/Badge.svelte';
|
|
14
14
|
export { default as Button } from './components/button/Button.svelte';
|
|
15
|
-
export type { ButtonProps, ButtonSize, ButtonVariant } from './components/button/Button.svelte';
|
|
15
|
+
export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from './components/button/Button.svelte';
|
|
16
16
|
export { default as Card } from './components/card/Card.svelte';
|
|
17
17
|
export type { CardPadding, CardProps, CardVariant } from './components/card/Card.svelte';
|
|
18
18
|
export { default as ChangeStats } from './components/change-stats/ChangeStats.svelte';
|
|
@@ -29,7 +29,7 @@ export * as Command from './components/command/index.js';
|
|
|
29
29
|
export type { CommandDialogProps, CommandEmptyProps, CommandFooterProps, CommandGroupProps, CommandInputProps, CommandItemProps, CommandListProps, CommandRootProps } from './components/command/index.js';
|
|
30
30
|
export * as Composer from './components/composer/index.js';
|
|
31
31
|
export { getComposerContext } from './components/composer/index.js';
|
|
32
|
-
export type { ComposerAttachButtonProps, ComposerAttachmentProps, ComposerAttachmentsProps, ComposerContext, ComposerMessage, ComposerModel, ComposerModelPickerProps, ComposerRejection, ComposerRootProps, ComposerStatus, ComposerSubmitProps, ComposerTextareaProps, ComposerToggleProps, ComposerToolbarProps } from './components/composer/index.js';
|
|
32
|
+
export type { ComposerAttachButtonProps, ComposerAttachmentProps, ComposerAttachmentsProps, ComposerContext, ComposerMessage, ComposerModel, ComposerModelPickerProps, ComposerRejection, ComposerRootProps, ComposerStatus, ComposerSubmitProps, ComposerTextareaProps, ComposerToggleProps, ComposerToolbarProps, ComposerTrayProps } from './components/composer/index.js';
|
|
33
33
|
export * as ContextMenu from './components/menu/context-menu.js';
|
|
34
34
|
export type { ContextMenuContentProps, ContextMenuTriggerProps } from './components/menu/context-menu.js';
|
|
35
35
|
export * as Conversation from './components/conversation/index.js';
|
|
@@ -66,6 +66,11 @@ export * as Menu from './components/menu/index.js';
|
|
|
66
66
|
export type { MenuCheckboxItemProps, MenuContentProps, MenuItemProps, MenuLabelProps, MenuRadioItemProps, MenuSeparatorProps, MenuSubContentProps, MenuSubTriggerProps } from './components/menu/index.js';
|
|
67
67
|
export * as Message from './components/message/index.js';
|
|
68
68
|
export type { MessageActionProps, MessageActionsProps, MessageContentProps, MessageCopyProps, MessageFrom, MessageHeaderProps, MessagePendingProps, MessageRootProps, MessageTimeProps } from './components/message/index.js';
|
|
69
|
+
export { default as Markdown } from './components/markdown/Markdown.svelte';
|
|
70
|
+
export type { MarkdownProps } from './components/markdown/Markdown.svelte';
|
|
71
|
+
export { copyAsWritten } from './components/markdown/copy.js';
|
|
72
|
+
export type { MarkdownLabels } from './components/markdown/labels.js';
|
|
73
|
+
export type { MarkdownPlugin, LinkPolicy, Highlighter, HighlightToken, NodeProps } from './markdown/plugin.js';
|
|
69
74
|
export { default as Notice } from './components/notice/Notice.svelte';
|
|
70
75
|
export type { NoticeProps, NoticeTone } from './components/notice/Notice.svelte';
|
|
71
76
|
export { default as Plan } from './components/plan/Plan.svelte';
|
|
@@ -102,7 +107,7 @@ export type { ShimmerProps } from './components/shimmer/Shimmer.svelte';
|
|
|
102
107
|
export * as Sheet from './components/sheet/index.js';
|
|
103
108
|
export type { SheetContentProps, SheetSide } from './components/sheet/index.js';
|
|
104
109
|
export * as Sidebar from './components/sidebar/index.js';
|
|
105
|
-
export type { SidebarContentProps, SidebarFooterProps, SidebarGroupProps, SidebarHeaderProps, SidebarItemProps } from './components/sidebar/index.js';
|
|
110
|
+
export type { SidebarContentProps, SidebarFolderProps, SidebarFooterProps, SidebarGroupProps, SidebarHeaderProps, SidebarItemProps, SidebarRootProps } from './components/sidebar/index.js';
|
|
106
111
|
export { default as Skeleton } from './components/skeleton/Skeleton.svelte';
|
|
107
112
|
export type { SkeletonProps } from './components/skeleton/Skeleton.svelte';
|
|
108
113
|
export { default as Slider } from './components/slider/Slider.svelte';
|
|
@@ -117,10 +122,14 @@ export { default as StatusIndicator } from './components/status-indicator/Status
|
|
|
117
122
|
export type { Status, StatusIndicatorProps } from './components/status-indicator/StatusIndicator.svelte';
|
|
118
123
|
export { default as Switch } from './components/switch/Switch.svelte';
|
|
119
124
|
export type { SwitchProps } from './components/switch/Switch.svelte';
|
|
125
|
+
export { default as TabStrip } from './components/tab-strip/TabStrip.svelte';
|
|
126
|
+
export type { TabStripProps, TabStripTab } from './components/tab-strip/TabStrip.svelte';
|
|
120
127
|
export { default as Tabs } from './components/tabs/Tabs.svelte';
|
|
121
128
|
export type { TabItem, TabsProps } from './components/tabs/Tabs.svelte';
|
|
122
129
|
export { default as Text } from './components/text/Text.svelte';
|
|
123
|
-
export type { TextFace, TextProps,
|
|
130
|
+
export type { TextFace, TextProps, TextTone, TextVariant, TextWeight } from './components/text/Text.svelte';
|
|
131
|
+
export { typography } from './typography.js';
|
|
132
|
+
export type { TypeRole } from './typography.js';
|
|
124
133
|
export { default as Textarea } from './components/textarea/Textarea.svelte';
|
|
125
134
|
export type { TextareaProps } from './components/textarea/Textarea.svelte';
|
|
126
135
|
export { default as Toggle } from './components/toggle/Toggle.svelte';
|
|
@@ -140,8 +149,7 @@ export { default as Theme } from './components/theme/Theme.svelte';
|
|
|
140
149
|
export type { ThemeOverrides, ThemeProps, ThemeScheme } from './components/theme/Theme.svelte';
|
|
141
150
|
export { default as WorkFold } from './components/work-fold/WorkFold.svelte';
|
|
142
151
|
export type { WorkFoldProps } from './components/work-fold/WorkFold.svelte';
|
|
143
|
-
export {
|
|
144
|
-
export type { LoopFrame } from './internal/loop.js';
|
|
152
|
+
export { whileVisible } from './internal/visible.js';
|
|
145
153
|
export { resolveColor, resolveRgba } from './color.js';
|
|
146
154
|
export type { ResolveColorOptions, Rgba } from './color.js';
|
|
147
155
|
export { classes, sx } from './internal/sx.js';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Components
|
|
2
2
|
export { default as Approval } from './components/approval/Approval.svelte';
|
|
3
|
-
// Compound: <AppShell.Root>, <AppShell.
|
|
4
|
-
// <AppShell.Panel>, <AppShell.Toggle>
|
|
3
|
+
// Compound: <AppShell.Root>, <AppShell.Bar>, <AppShell.Rail>, <AppShell.Panes>, <AppShell.Sheet>,
|
|
4
|
+
// <AppShell.Sidebar>, <AppShell.Main>, <AppShell.Header>, <AppShell.Panel>, <AppShell.Toggle>
|
|
5
5
|
export * as AppShell from './components/app-shell/index.js';
|
|
6
6
|
export { getAppShellContext } from './components/app-shell/index.js';
|
|
7
7
|
// Compound: <Activity.Root>, <Activity.Trigger>, <Activity.Content>, <Activity.Step>, <Activity.Thought>
|
|
@@ -21,8 +21,9 @@ export * as Collapsible from './components/collapsible/index.js';
|
|
|
21
21
|
// Compound: <Command.Dialog>, <Command.Root>, <Command.Input>, <Command.List>, <Command.Group>,
|
|
22
22
|
// <Command.Item>, <Command.Empty>, <Command.Separator>, <Command.Footer>
|
|
23
23
|
export * as Command from './components/command/index.js';
|
|
24
|
-
// Compound: <Composer.
|
|
25
|
-
// <Composer.
|
|
24
|
+
// Compound: <Composer.Tray>, <Composer.Root>, <Composer.Attachments>, <Composer.Textarea>,
|
|
25
|
+
// <Composer.Toolbar>, <Composer.AttachButton>, <Composer.Toggle>, <Composer.ModelPicker>,
|
|
26
|
+
// <Composer.Submit>
|
|
26
27
|
export * as Composer from './components/composer/index.js';
|
|
27
28
|
export { getComposerContext } from './components/composer/index.js';
|
|
28
29
|
// Compound: <ContextMenu.Root>, <ContextMenu.Trigger>, <ContextMenu.Content>, filled with Menu's parts
|
|
@@ -52,6 +53,8 @@ export { default as Link } from './components/link/Link.svelte';
|
|
|
52
53
|
export * as Menu from './components/menu/index.js';
|
|
53
54
|
// Compound: <Message.Root>, <Message.Header>, <Message.Pending>, <Message.Content>, <Message.Actions>, <Message.Action>, <Message.Copy>
|
|
54
55
|
export * as Message from './components/message/index.js';
|
|
56
|
+
export { default as Markdown } from './components/markdown/Markdown.svelte';
|
|
57
|
+
export { copyAsWritten } from './components/markdown/copy.js';
|
|
55
58
|
export { default as Notice } from './components/notice/Notice.svelte';
|
|
56
59
|
export { default as Plan } from './components/plan/Plan.svelte';
|
|
57
60
|
export { default as Progress } from './components/progress/Progress.svelte';
|
|
@@ -59,7 +62,7 @@ export { default as Progress } from './components/progress/Progress.svelte';
|
|
|
59
62
|
export * as Popover from './components/popover/index.js';
|
|
60
63
|
export { default as Questionnaire } from './components/questionnaire/Questionnaire.svelte';
|
|
61
64
|
export { default as QueuedMessage } from './components/queued-message/QueuedMessage.svelte';
|
|
62
|
-
// Compound: <Rail.Root>, <Rail.Item>, <Rail.Spacer>
|
|
65
|
+
// Compound: <Rail.Root>, <Rail.Item>, <Rail.Separator>, <Rail.Spacer>
|
|
63
66
|
export * as Rail from './components/rail/index.js';
|
|
64
67
|
// Compound: <Reasoning.Root>, <Reasoning.Trigger>, <Reasoning.Content>
|
|
65
68
|
export * as Reasoning from './components/reasoning/index.js';
|
|
@@ -76,7 +79,8 @@ export { default as Shimmer } from './components/shimmer/Shimmer.svelte';
|
|
|
76
79
|
// Compound: <Sheet.Root>, <Sheet.Trigger>, <Sheet.Content>, <Sheet.Header>, <Sheet.Title>,
|
|
77
80
|
// <Sheet.Description>, <Sheet.Body>, <Sheet.Footer>, <Sheet.Close>
|
|
78
81
|
export * as Sheet from './components/sheet/index.js';
|
|
79
|
-
// Compound: <Sidebar.
|
|
82
|
+
// Compound: <Sidebar.Root>, <Sidebar.Header>, <Sidebar.Content>, <Sidebar.Group>, <Sidebar.Folder>,
|
|
83
|
+
// <Sidebar.Item>, <Sidebar.Footer>
|
|
80
84
|
export * as Sidebar from './components/sidebar/index.js';
|
|
81
85
|
export { default as Skeleton } from './components/skeleton/Skeleton.svelte';
|
|
82
86
|
export { default as Slider } from './components/slider/Slider.svelte';
|
|
@@ -86,8 +90,11 @@ export { default as Stack } from './components/stack/Stack.svelte';
|
|
|
86
90
|
export * as Suggestions from './components/suggestions/index.js';
|
|
87
91
|
export { default as StatusIndicator } from './components/status-indicator/StatusIndicator.svelte';
|
|
88
92
|
export { default as Switch } from './components/switch/Switch.svelte';
|
|
93
|
+
export { default as TabStrip } from './components/tab-strip/TabStrip.svelte';
|
|
89
94
|
export { default as Tabs } from './components/tabs/Tabs.svelte';
|
|
90
95
|
export { default as Text } from './components/text/Text.svelte';
|
|
96
|
+
// The type roles as styles, for an element of your own: `stylex.attrs(typography.caption, …)`
|
|
97
|
+
export { typography } from './typography.js';
|
|
91
98
|
export { default as Textarea } from './components/textarea/Textarea.svelte';
|
|
92
99
|
export { default as Toggle } from './components/toggle/Toggle.svelte';
|
|
93
100
|
// Compound: <ToggleGroup.Root>, <ToggleGroup.Item>
|
|
@@ -100,10 +107,10 @@ export { toast } from './components/toast/toasts.svelte.js';
|
|
|
100
107
|
export * as Tooltip from './components/tooltip/index.js';
|
|
101
108
|
export { default as Theme } from './components/theme/Theme.svelte';
|
|
102
109
|
export { default as WorkFold } from './components/work-fold/WorkFold.svelte';
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
export {
|
|
110
|
+
// For an animation of your own that never ends: `whileVisible` runs it only while it can be
|
|
111
|
+
// seen, with `animationPlayState: play.whileVisible` from the tokens. Spinner, Shimmer,
|
|
112
|
+
// Skeleton and Progress use it.
|
|
113
|
+
export { whileVisible } from './internal/visible.js';
|
|
107
114
|
// The colour a token paints as, for a <canvas>, WebGL or a chart library, which
|
|
108
115
|
// cannot read `var()` or `light-dark()` themselves.
|
|
109
116
|
export { resolveColor, resolveRgba } from './color.js';
|
|
@@ -16,12 +16,11 @@
|
|
|
16
16
|
paddingBlock: '0.625rem',
|
|
17
17
|
paddingInline: '0.75rem',
|
|
18
18
|
overflow: 'auto',
|
|
19
|
-
borderRadius: radius.
|
|
20
|
-
backgroundColor: colors.
|
|
21
|
-
boxShadow: `inset 0 0 0 1px ${colors.line}`,
|
|
19
|
+
borderRadius: radius.control,
|
|
20
|
+
backgroundColor: colors.fillSunken,
|
|
22
21
|
color: colors.text,
|
|
23
22
|
fontFamily: font.mono,
|
|
24
|
-
fontSize: font.
|
|
23
|
+
fontSize: font.sizeCaption,
|
|
25
24
|
lineHeight: font.leadingNormal,
|
|
26
25
|
tabSize: 2,
|
|
27
26
|
whiteSpace: 'pre',
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
'M10.25 5.75V4.25c0-.83-.67-1.5-1.5-1.5h-4.5c-.83 0-1.5.67-1.5 1.5v4.5c0 .83.67 1.5 1.5 1.5h.5'
|
|
13
13
|
],
|
|
14
14
|
check: ['M3.25 8.5 6.5 11.75 12.75 4.75'],
|
|
15
|
+
download: ['M8 2.75v7.5', 'M4.75 7 8 10.25 11.25 7', 'M3 13.25h10'],
|
|
15
16
|
alert: ['M8 5v3.5', 'M8 11h.01', 'M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z'],
|
|
16
17
|
dashed: ['M13 8A5 5 0 1 1 3 8a5 5 0 0 1 10 0Z'],
|
|
17
18
|
paperclip: [
|
|
@@ -54,6 +55,21 @@
|
|
|
54
55
|
} as const;
|
|
55
56
|
|
|
56
57
|
export type GlyphName = keyof typeof paths;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A glyph as markup, as the component draws it: for the parts of Markdown that are written
|
|
61
|
+
* as a string. `name` is one of this file's own, and `className` a class of Narvi's.
|
|
62
|
+
*/
|
|
63
|
+
export function glyphHtml(name: GlyphName, size = 16, stroke = 1.5, className = ''): string {
|
|
64
|
+
return (
|
|
65
|
+
`<svg width="${size}" height="${size}" viewBox="0 0 16 16" fill="none" stroke="currentColor" ` +
|
|
66
|
+
`stroke-width="${stroke}" stroke-linecap="round" stroke-linejoin="round"` +
|
|
67
|
+
(name === 'dashed' ? ' stroke-dasharray="2.4 2.4"' : '') +
|
|
68
|
+
` aria-hidden="true"${className ? ` class="${className}"` : ''}>` +
|
|
69
|
+
paths[name].map((d) => `<path d="${d}"></path>`).join('') +
|
|
70
|
+
'</svg>'
|
|
71
|
+
);
|
|
72
|
+
}
|
|
57
73
|
</script>
|
|
58
74
|
|
|
59
75
|
<script lang="ts">
|
|
@@ -4,6 +4,7 @@ declare const paths: {
|
|
|
4
4
|
readonly chevron: readonly ["M4.75 6.25 8 9.5l3.25-3.25"];
|
|
5
5
|
readonly copy: readonly ["M6.25 5.75h5.5c.83 0 1.5.67 1.5 1.5v5.5c0 .83-.67 1.5-1.5 1.5h-5.5c-.83 0-1.5-.67-1.5-1.5v-5.5c0-.83.67-1.5 1.5-1.5Z", "M10.25 5.75V4.25c0-.83-.67-1.5-1.5-1.5h-4.5c-.83 0-1.5.67-1.5 1.5v4.5c0 .83.67 1.5 1.5 1.5h.5"];
|
|
6
6
|
readonly check: readonly ["M3.25 8.5 6.5 11.75 12.75 4.75"];
|
|
7
|
+
readonly download: readonly ["M8 2.75v7.5", "M4.75 7 8 10.25 11.25 7", "M3 13.25h10"];
|
|
7
8
|
readonly alert: readonly ["M8 5v3.5", "M8 11h.01", "M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"];
|
|
8
9
|
readonly dashed: readonly ["M13 8A5 5 0 1 1 3 8a5 5 0 0 1 10 0Z"];
|
|
9
10
|
readonly paperclip: readonly ["m13 7.5-5.1 5.1a3.25 3.25 0 0 1-4.6-4.6l5.3-5.3a2.17 2.17 0 0 1 3.06 3.06L6.4 11.02a1.08 1.08 0 0 1-1.53-1.53l4.6-4.6"];
|
|
@@ -26,6 +27,11 @@ declare const paths: {
|
|
|
26
27
|
readonly minus: readonly ["M5 8h6"];
|
|
27
28
|
};
|
|
28
29
|
export type GlyphName = keyof typeof paths;
|
|
30
|
+
/**
|
|
31
|
+
* A glyph as markup, as the component draws it: for the parts of Markdown that are written
|
|
32
|
+
* as a string. `name` is one of this file's own, and `className` a class of Narvi's.
|
|
33
|
+
*/
|
|
34
|
+
export declare function glyphHtml(name: GlyphName, size?: number, stroke?: number, className?: string): string;
|
|
29
35
|
import type { SVGAttributes } from 'svelte/elements';
|
|
30
36
|
type $$ComponentProps = {
|
|
31
37
|
name: GlyphName;
|