@astronox/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +66 -0
- package/package.json +77 -0
- package/src/client/clipboard.ts +7 -0
- package/src/client/focus.ts +17 -0
- package/src/client/index.ts +3 -0
- package/src/client/scroll.ts +15 -0
- package/src/components/actions/ActionListItem/ActionListItem.astro +78 -0
- package/src/components/actions/ActionListItem/ActionListItem.css +43 -0
- package/src/components/actions/Button/Button.astro +100 -0
- package/src/components/actions/Button/Button.css +165 -0
- package/src/components/actions/CardAction/CardAction.astro +97 -0
- package/src/components/actions/CardAction/CardAction.css +188 -0
- package/src/components/actions/MediaTrigger/MediaTrigger.astro +55 -0
- package/src/components/actions/MediaTrigger/MediaTrigger.css +175 -0
- package/src/components/actions/ScrollToTop/ScrollToTop.astro +36 -0
- package/src/components/actions/ScrollToTop/ScrollToTop.css +19 -0
- package/src/components/actions/ScrollToTop/scrollToTopController.ts +32 -0
- package/src/components/content/CardBody/CardBody.astro +31 -0
- package/src/components/content/CardBody/CardBody.css +74 -0
- package/src/components/content/CardFooter/CardFooter.astro +58 -0
- package/src/components/content/CardFooter/CardFooter.css +102 -0
- package/src/components/content/CardHeader/CardHeader.astro +96 -0
- package/src/components/content/CardHeader/CardHeader.css +164 -0
- package/src/components/content/CardLink/CardLink.astro +138 -0
- package/src/components/content/CardLink/CardLink.css +362 -0
- package/src/components/content/CodeBlock/CodeBlock.astro +102 -0
- package/src/components/content/CodeBlock/CodeBlock.css +85 -0
- package/src/components/content/CodeBlock/codeBlockController.ts +60 -0
- package/src/components/content/CodeBlock/contracts.ts +8 -0
- package/src/components/content/InlineDefinition/InlineDefinition.astro +31 -0
- package/src/components/content/InlineDefinition/InlineDefinition.css +9 -0
- package/src/components/content/MarkdownContent/MarkdownContent.astro +32 -0
- package/src/components/content/MarkdownContent/MarkdownContent.css +358 -0
- package/src/components/content/MarkdownContent/MarkdownInline.astro +44 -0
- package/src/components/content/MarkdownContent/MarkdownNode.astro +280 -0
- package/src/components/content/MarkdownContent/MarkdownSymbol.astro +47 -0
- package/src/components/content/MarkdownContent/contracts.ts +181 -0
- package/src/components/data-display/BadgeList/BadgeList.astro +54 -0
- package/src/components/data-display/BadgeList/BadgeList.css +29 -0
- package/src/components/data-display/IconList/IconList.astro +64 -0
- package/src/components/data-display/IconList/IconList.css +55 -0
- package/src/components/data-display/MetricTile/MetricTile.astro +68 -0
- package/src/components/data-display/MetricTile/MetricTile.css +103 -0
- package/src/components/data-display/MetricTile/MetricTileContent.astro +70 -0
- package/src/components/data-display/MetricTile/metricTileController.ts +9 -0
- package/src/components/data-display/Tag/Tag.astro +67 -0
- package/src/components/data-display/Tag/Tag.css +134 -0
- package/src/components/data-display/Tag/TagAffix.astro +33 -0
- package/src/components/data-display/TextPair/TextPair.astro +63 -0
- package/src/components/data-display/TextPair/TextPair.css +99 -0
- package/src/components/feedback/Spinner/Spinner.astro +32 -0
- package/src/components/feedback/Spinner/Spinner.css +37 -0
- package/src/components/feedback/Tooltip/Tooltip.astro +66 -0
- package/src/components/feedback/Tooltip/Tooltip.css +67 -0
- package/src/components/feedback/Tooltip/tooltipController.ts +371 -0
- package/src/components/forms/FieldError/FieldError.astro +31 -0
- package/src/components/forms/FieldError/FieldError.css +12 -0
- package/src/components/forms/FieldError/fieldErrorState.ts +21 -0
- package/src/components/forms/FieldLabel/FieldLabel.astro +32 -0
- package/src/components/forms/FieldLabel/FieldLabel.css +17 -0
- package/src/components/forms/TextInput/TextInput.astro +79 -0
- package/src/components/forms/TextInput/TextInput.css +121 -0
- package/src/components/forms/TextInput/textInputController.ts +53 -0
- package/src/components/icons/ArrowDownIcon.astro +26 -0
- package/src/components/icons/ArrowLeftIcon.astro +26 -0
- package/src/components/icons/ArrowRightIcon.astro +26 -0
- package/src/components/icons/ArrowUpDownIcon.astro +26 -0
- package/src/components/icons/ArrowUpIcon.astro +26 -0
- package/src/components/icons/BulletIcon.astro +21 -0
- package/src/components/icons/BurnIcon.astro +24 -0
- package/src/components/icons/CircleSymbolIcon.css +66 -0
- package/src/components/icons/ClearIcon.astro +28 -0
- package/src/components/icons/CloseIcon.astro +21 -0
- package/src/components/icons/CopyIcon.astro +30 -0
- package/src/components/icons/CurrencyIcon.css +9 -0
- package/src/components/icons/DayIcon.astro +33 -0
- package/src/components/icons/DollarIcon.astro +28 -0
- package/src/components/icons/DownloadIcon.astro +22 -0
- package/src/components/icons/EnterFullscreenIcon.astro +22 -0
- package/src/components/icons/EqualIcon.astro +25 -0
- package/src/components/icons/ExitFullscreenIcon.astro +22 -0
- package/src/components/icons/ExternalLinkIcon.astro +22 -0
- package/src/components/icons/FieldIcon.astro +28 -0
- package/src/components/icons/GrassIcon.astro +29 -0
- package/src/components/icons/InfoIcon.astro +24 -0
- package/src/components/icons/MinusIcon.astro +21 -0
- package/src/components/icons/MountainIcon.astro +31 -0
- package/src/components/icons/NightIcon.astro +32 -0
- package/src/components/icons/PlayIcon.astro +22 -0
- package/src/components/icons/PlusIcon.astro +21 -0
- package/src/components/icons/PoisonIcon.astro +24 -0
- package/src/components/icons/RibbonIcon.astro +25 -0
- package/src/components/icons/SlashIcon.astro +22 -0
- package/src/components/icons/SlowIcon.astro +25 -0
- package/src/components/icons/StarIcon.astro +28 -0
- package/src/components/icons/StunIcon.astro +22 -0
- package/src/components/icons/TableSortIcon.astro +34 -0
- package/src/components/icons/WaterIcon.astro +30 -0
- package/src/components/index.ts +83 -0
- package/src/components/media/CanvasFrame/CanvasFrame.astro +130 -0
- package/src/components/media/CanvasFrame/CanvasFrame.css +59 -0
- package/src/components/media/CanvasFrame/canvasFrameController.ts +104 -0
- package/src/components/media/EmbedFrame/EmbedFrame.astro +147 -0
- package/src/components/media/EmbedFrame/EmbedFrame.css +51 -0
- package/src/components/media/EmbedFrame/embedFrameController.ts +66 -0
- package/src/components/media/MediaFrame/MediaFrame.astro +34 -0
- package/src/components/media/MediaFrame/MediaFrame.css +66 -0
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.astro +55 -0
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.css +89 -0
- package/src/components/navigation/DesktopNavigation.astro +92 -0
- package/src/components/navigation/DesktopNavigation.css +99 -0
- package/src/components/navigation/Header.astro +73 -0
- package/src/components/navigation/Header.css +20 -0
- package/src/components/navigation/MobileNavigation.astro +124 -0
- package/src/components/navigation/MobileNavigation.css +177 -0
- package/src/components/navigation/NavigationBrand.astro +63 -0
- package/src/components/navigation/NavigationBrand.css +52 -0
- package/src/components/navigation/NavigationControl.css +166 -0
- package/src/components/navigation/NavigationItemContent.astro +24 -0
- package/src/components/navigation/NavigationLink.astro +121 -0
- package/src/components/navigation/NavigationLinks.astro +27 -0
- package/src/components/navigation/NavigationMenuList.astro +37 -0
- package/src/components/navigation/NavigationMenuList.css +6 -0
- package/src/components/navigation/SkipLink/SkipLink.astro +18 -0
- package/src/components/navigation/SkipLink/SkipLink.css +26 -0
- package/src/components/navigation/SubNavigation/SubNavigation.astro +124 -0
- package/src/components/navigation/SubNavigation/SubNavigation.css +211 -0
- package/src/components/navigation/mobileNavigationController.ts +122 -0
- package/src/components/navigation/navigationState.ts +35 -0
- package/src/components/navigation/navigationTypes.ts +18 -0
- package/src/components/seo/SeoHead.astro +194 -0
- package/src/components/widgetTypes.ts +3 -0
- package/src/composition/Grid/Grid.astro +82 -0
- package/src/composition/Grid/Grid.css +314 -0
- package/src/composition/GridItem/GridItem.astro +50 -0
- package/src/composition/GridItem/GridItem.css +95 -0
- package/src/composition/Inline/Inline.astro +48 -0
- package/src/composition/Inline/Inline.css +65 -0
- package/src/composition/Stack/Stack.astro +37 -0
- package/src/composition/Stack/Stack.css +31 -0
- package/src/composition/SurfaceGroup/SurfaceGroup.astro +44 -0
- package/src/composition/SurfaceGroup/SurfaceGroup.css +76 -0
- package/src/composition/SurfaceGroup/stickySurfaceGroupController.ts +89 -0
- package/src/composition/index.ts +6 -0
- package/src/config/index.ts +2 -0
- package/src/config/pageMeta.ts +55 -0
- package/src/config/siteConfig.ts +90 -0
- package/src/data/collectionValidation.ts +61 -0
- package/src/data/index.ts +1 -0
- package/src/display/contracts.ts +284 -0
- package/src/display/index.ts +1 -0
- package/src/index.ts +6 -0
- package/src/layouts/BaseLayout.astro +74 -0
- package/src/layouts/PageSurface.astro +15 -0
- package/src/layouts/PageSurface.css +24 -0
- package/src/layouts/index.ts +2 -0
- package/src/patterns/CircuitPuzzle/CircuitPuzzle.astro +93 -0
- package/src/patterns/CircuitPuzzle/CircuitPuzzle.css +118 -0
- package/src/patterns/CircuitPuzzle/circuitPuzzleController.ts +205 -0
- package/src/patterns/CircuitPuzzle/contracts.ts +42 -0
- package/src/patterns/Combobox/Combobox.astro +462 -0
- package/src/patterns/Combobox/Combobox.css +403 -0
- package/src/patterns/Combobox/comboboxController.ts +788 -0
- package/src/patterns/Combobox/contracts.ts +18 -0
- package/src/patterns/Dropdown/Dropdown.astro +127 -0
- package/src/patterns/Dropdown/Dropdown.css +100 -0
- package/src/patterns/Dropdown/dropdownController.ts +157 -0
- package/src/patterns/Fullscreen/FullscreenControl.astro +103 -0
- package/src/patterns/Fullscreen/FullscreenControl.css +49 -0
- package/src/patterns/Fullscreen/fullscreenController.ts +73 -0
- package/src/patterns/GlitchOverlay/GlitchOverlay.astro +50 -0
- package/src/patterns/GlitchOverlay/GlitchOverlay.css +234 -0
- package/src/patterns/GlitchOverlay/glitchOverlayController.ts +152 -0
- package/src/patterns/GuidedFlow/GuidedFlow.astro +60 -0
- package/src/patterns/GuidedFlow/GuidedFlow.css +82 -0
- package/src/patterns/GuidedFlow/contracts.ts +3 -0
- package/src/patterns/GuidedFlow/guidedFlowController.ts +49 -0
- package/src/patterns/MagneticFieldPuzzle/MagneticFieldPuzzle.astro +217 -0
- package/src/patterns/MagneticFieldPuzzle/MagneticFieldPuzzle.css +383 -0
- package/src/patterns/MagneticFieldPuzzle/contracts.ts +81 -0
- package/src/patterns/MagneticFieldPuzzle/magneticFieldPuzzleController.ts +802 -0
- package/src/patterns/MagneticFieldPuzzle/simulation.ts +244 -0
- package/src/patterns/MapViewport/MapViewport.astro +296 -0
- package/src/patterns/MapViewport/MapViewport.css +257 -0
- package/src/patterns/MapViewport/contracts.ts +79 -0
- package/src/patterns/MapViewport/geometry.ts +80 -0
- package/src/patterns/MapViewport/mapViewportController.ts +636 -0
- package/src/patterns/Modal/Modal.astro +64 -0
- package/src/patterns/Modal/Modal.css +87 -0
- package/src/patterns/Modal/ModalClose.astro +37 -0
- package/src/patterns/Modal/ModalOpen.astro +36 -0
- package/src/patterns/Modal/modalController.ts +118 -0
- package/src/patterns/PuzzleGrid/PuzzleGrid.astro +22 -0
- package/src/patterns/PuzzleGrid/PuzzleGrid.css +149 -0
- package/src/patterns/PuzzleGrid/contracts.ts +2 -0
- package/src/patterns/PuzzleGrid/selectionDismissal.ts +27 -0
- package/src/patterns/PuzzleGrid/state.ts +25 -0
- package/src/patterns/SpriteProjectilePreview/SpriteProjectilePreview.astro +65 -0
- package/src/patterns/SpriteProjectilePreview/SpriteProjectilePreview.css +35 -0
- package/src/patterns/SpriteProjectilePreview/contracts.ts +33 -0
- package/src/patterns/SpriteProjectilePreview/spriteProjectilePreviewController.ts +586 -0
- package/src/patterns/StageFlow/StageFlow.astro +57 -0
- package/src/patterns/StageFlow/StageFlow.css +54 -0
- package/src/patterns/StageFlow/StageFlowAlternative.astro +23 -0
- package/src/patterns/StageFlow/StageFlowArrow.astro +22 -0
- package/src/patterns/StageFlow/StageFlowConnector.astro +7 -0
- package/src/patterns/StageFlow/StageFlowConnector.css +4 -0
- package/src/patterns/StageFlow/StageFlowStage.astro +51 -0
- package/src/patterns/StageFlow/StageFlowStage.css +106 -0
- package/src/patterns/StageFlow/StageFlowStep.astro +24 -0
- package/src/patterns/StageFlow/StageFlowStep.css +19 -0
- package/src/patterns/StageFlow/StageFlowSymbol.css +28 -0
- package/src/patterns/Table/Table.astro +176 -0
- package/src/patterns/Table/Table.css +70 -0
- package/src/patterns/Table/TableBody.astro +185 -0
- package/src/patterns/Table/TableBody.css +262 -0
- package/src/patterns/Table/TableCell.astro +59 -0
- package/src/patterns/Table/TableCell.css +99 -0
- package/src/patterns/Table/TableCellValue.astro +86 -0
- package/src/patterns/Table/TableFooter.astro +32 -0
- package/src/patterns/Table/TableFooter.css +31 -0
- package/src/patterns/Table/TableHeader.astro +118 -0
- package/src/patterns/Table/TableHeader.css +209 -0
- package/src/patterns/Table/TablePagination.astro +70 -0
- package/src/patterns/Table/TablePagination.css +133 -0
- package/src/patterns/Table/TableSkeleton.astro +36 -0
- package/src/patterns/Table/TableSkeleton.css +81 -0
- package/src/patterns/Table/tableCellController.ts +11 -0
- package/src/patterns/Table/tableFilterController.ts +206 -0
- package/src/patterns/Table/tableHeaderOverflowController.ts +105 -0
- package/src/patterns/Table/tableLayout.ts +113 -0
- package/src/patterns/Table/tableProgressiveController.ts +319 -0
- package/src/patterns/Table/tableRowNavigationController.ts +91 -0
- package/src/patterns/Table/tableScrollController.ts +192 -0
- package/src/patterns/Table/tableSortController.ts +272 -0
- package/src/patterns/index.ts +46 -0
- package/src/primitives/index.ts +4 -0
- package/src/primitives/layout/Separator/Separator.astro +29 -0
- package/src/primitives/layout/Separator/Separator.css +20 -0
- package/src/primitives/media/AmbientAudio/AmbientAudio.astro +28 -0
- package/src/primitives/media/Media/Media.astro +122 -0
- package/src/primitives/media/Media/Media.css +161 -0
- package/src/primitives/text/TextBlock/TextBlock.astro +46 -0
- package/src/primitives/text/TextBlock/TextBlock.css +21 -0
- package/src/seo/StaticRedirect.astro +32 -0
- package/src/seo/index.ts +6 -0
- package/src/seo/pageSeo.ts +99 -0
- package/src/seo/robots.ts +16 -0
- package/src/seo/sitemap.ts +38 -0
- package/src/seo/structuredData.ts +133 -0
- package/src/seo/url.ts +64 -0
- package/src/styles/base.css +148 -0
- package/src/styles/interaction.css +108 -0
- package/src/styles/style.css +93 -0
- package/src/styles/tokens.css +256 -0
- package/src/theme/contracts.ts +7 -0
- package/src/theme/index.ts +1 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
.markdown-content {
|
|
2
|
+
display: grid;
|
|
3
|
+
min-width: 0;
|
|
4
|
+
gap: var(--nox-space-5);
|
|
5
|
+
color: var(--nox-text);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.markdown-content__section {
|
|
9
|
+
display: grid;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
gap: var(--nox-space-3);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.markdown-content__section-title,
|
|
15
|
+
.markdown-content__heading,
|
|
16
|
+
.markdown-content__resource-title {
|
|
17
|
+
margin: 0;
|
|
18
|
+
overflow-wrap: anywhere;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.markdown-content__section-title,
|
|
22
|
+
.markdown-content__heading {
|
|
23
|
+
color: var(--nox-text-muted);
|
|
24
|
+
font-family: var(--nox-font-body);
|
|
25
|
+
font-weight: var(--nox-font-weight-strong);
|
|
26
|
+
letter-spacing: var(--nox-letter-spacing-wide);
|
|
27
|
+
line-height: var(--nox-line-height-tight);
|
|
28
|
+
text-transform: uppercase;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.markdown-content
|
|
32
|
+
:is(
|
|
33
|
+
.markdown-content__section-title,
|
|
34
|
+
.markdown-content__heading
|
|
35
|
+
)[data-markdown-heading-level='2'] {
|
|
36
|
+
font-size: var(--nox-font-size-xl);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.markdown-content
|
|
40
|
+
:is(
|
|
41
|
+
.markdown-content__section-title,
|
|
42
|
+
.markdown-content__heading
|
|
43
|
+
)[data-markdown-heading-level='3'] {
|
|
44
|
+
font-size: var(--nox-font-size-lg);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.markdown-content
|
|
48
|
+
:is(
|
|
49
|
+
.markdown-content__section-title,
|
|
50
|
+
.markdown-content__heading
|
|
51
|
+
)[data-markdown-heading-level='4'] {
|
|
52
|
+
font-size: var(--nox-font-size-md);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.markdown-content
|
|
56
|
+
:is(
|
|
57
|
+
.markdown-content__section-title,
|
|
58
|
+
.markdown-content__heading
|
|
59
|
+
)[data-markdown-heading-level='5'] {
|
|
60
|
+
font-size: var(--nox-font-size-sm);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.markdown-content
|
|
64
|
+
:is(
|
|
65
|
+
.markdown-content__section-title,
|
|
66
|
+
.markdown-content__heading
|
|
67
|
+
)[data-markdown-heading-level='6'] {
|
|
68
|
+
font-size: var(--nox-font-size-xs);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.markdown-content__section-body,
|
|
72
|
+
.markdown-content__quote {
|
|
73
|
+
display: grid;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
gap: var(--nox-space-2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.markdown-content__list-item-body {
|
|
79
|
+
display: grid;
|
|
80
|
+
min-width: 0;
|
|
81
|
+
gap: var(--nox-space-1);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.markdown-content__paragraph {
|
|
85
|
+
min-width: 0;
|
|
86
|
+
margin: 0;
|
|
87
|
+
line-height: 1.55;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.markdown-content__list {
|
|
91
|
+
display: grid;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
margin: 0;
|
|
94
|
+
padding-inline-start: 1.25rem;
|
|
95
|
+
gap: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.markdown-content__list .markdown-content__list {
|
|
99
|
+
padding-inline-start: var(--nox-space-5);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.markdown-content__list[data-markdown-has-resources] {
|
|
103
|
+
padding-inline-start: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.markdown-content__list[data-markdown-has-headings] {
|
|
107
|
+
gap: var(--nox-space-2);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.markdown-content__list-item {
|
|
111
|
+
min-width: 0;
|
|
112
|
+
padding-inline-start: var(--nox-space-1);
|
|
113
|
+
line-height: 1.4;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.markdown-content__list-item[data-markdown-has-marker] {
|
|
117
|
+
display: grid;
|
|
118
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
119
|
+
align-items: start;
|
|
120
|
+
gap: var(--nox-space-2);
|
|
121
|
+
padding-inline-start: 0;
|
|
122
|
+
list-style: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.markdown-content__list-item[data-markdown-resource] {
|
|
126
|
+
list-style: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.markdown-content__list-item[data-markdown-resource-layout='compact'] {
|
|
130
|
+
padding-inline-start: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.markdown-content__list-item[data-markdown-resource-layout='detailed'] {
|
|
134
|
+
padding: var(--nox-space-2) 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.markdown-content__list-item[data-markdown-resource-media='lead'] {
|
|
138
|
+
display: grid;
|
|
139
|
+
grid-template-columns: 5.5rem minmax(0, 1fr);
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: var(--nox-space-4);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.markdown-content__list-item[data-markdown-resource-media='lead'][data-markdown-resource-media-scale='compact']
|
|
145
|
+
.markdown-content__lead-media {
|
|
146
|
+
inline-size: var(--nox-compact-media-responsive-size);
|
|
147
|
+
block-size: var(--nox-compact-media-responsive-size);
|
|
148
|
+
justify-self: center;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.markdown-content__list-item[data-markdown-resource-layout='detailed']
|
|
152
|
+
+ .markdown-content__list-item[data-markdown-resource-layout='detailed'] {
|
|
153
|
+
border-top: var(--nox-border-width) solid var(--nox-border);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.markdown-content__list-item[data-markdown-resource]
|
|
157
|
+
> .markdown-content__list-item-body {
|
|
158
|
+
align-content: center;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.markdown-content__list-item[data-markdown-resource-layout='compact']
|
|
162
|
+
> .markdown-content__list-item-body {
|
|
163
|
+
gap: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.markdown-content__list-item[data-markdown-resource]
|
|
167
|
+
.markdown-content__list {
|
|
168
|
+
padding-inline-start: 0;
|
|
169
|
+
list-style: none;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.markdown-content__resource-title {
|
|
173
|
+
font-size: var(--nox-font-size-md);
|
|
174
|
+
font-weight: var(--nox-font-weight-strong);
|
|
175
|
+
line-height: var(--nox-line-height-tight);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.markdown-content__list-item[data-markdown-resource-layout='compact']
|
|
179
|
+
.markdown-content__resource-title {
|
|
180
|
+
font-size: inherit;
|
|
181
|
+
line-height: inherit;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.markdown-content__resource-heading {
|
|
185
|
+
display: flex;
|
|
186
|
+
min-width: 0;
|
|
187
|
+
align-items: center;
|
|
188
|
+
gap: var(--nox-space-2);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.markdown-content__lead-media {
|
|
192
|
+
inline-size: 5.5rem;
|
|
193
|
+
block-size: 5.5rem;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.markdown-content__inline-media {
|
|
197
|
+
flex: none;
|
|
198
|
+
inline-size: var(--nox-compact-media-responsive-size);
|
|
199
|
+
block-size: var(--nox-compact-media-responsive-size);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.markdown-content__change {
|
|
203
|
+
display: flex;
|
|
204
|
+
min-width: 0;
|
|
205
|
+
align-items: center;
|
|
206
|
+
flex-wrap: wrap;
|
|
207
|
+
gap: 0 var(--nox-space-3);
|
|
208
|
+
line-height: 1.4;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.markdown-content__change-label {
|
|
212
|
+
min-width: 0;
|
|
213
|
+
flex: none;
|
|
214
|
+
font-weight: var(--nox-font-weight-medium);
|
|
215
|
+
overflow-wrap: anywhere;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.markdown-content__change-values,
|
|
219
|
+
.markdown-content__change-transition,
|
|
220
|
+
.markdown-content__change-delta,
|
|
221
|
+
.markdown-content__symbol {
|
|
222
|
+
display: inline-flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.markdown-content__change-values {
|
|
227
|
+
max-width: 100%;
|
|
228
|
+
min-width: 0;
|
|
229
|
+
flex: none;
|
|
230
|
+
flex-wrap: wrap;
|
|
231
|
+
gap: var(--nox-space-1);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.markdown-content__change-transition {
|
|
235
|
+
flex: none;
|
|
236
|
+
gap: var(--nox-space-1);
|
|
237
|
+
white-space: nowrap;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.markdown-content__change-delta {
|
|
241
|
+
color: var(--nox-tone-color);
|
|
242
|
+
font-weight: var(--nox-font-weight-strong);
|
|
243
|
+
gap: 0.1em;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.markdown-content__change-suffix {
|
|
247
|
+
min-width: 0;
|
|
248
|
+
color: var(--nox-text-muted);
|
|
249
|
+
overflow-wrap: anywhere;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.markdown-content__symbol {
|
|
253
|
+
flex: none;
|
|
254
|
+
justify-content: center;
|
|
255
|
+
color: var(--nox-tone-color, currentColor);
|
|
256
|
+
gap: 0.25em;
|
|
257
|
+
line-height: 1;
|
|
258
|
+
vertical-align: middle;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.markdown-content__list-item[data-markdown-has-marker]
|
|
262
|
+
> .markdown-content__symbol {
|
|
263
|
+
min-block-size: 1.4em;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.markdown-content__symbol-icon {
|
|
267
|
+
display: block;
|
|
268
|
+
inline-size: 1em;
|
|
269
|
+
block-size: 1em;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.markdown-content__symbol[data-markdown-symbol^='terrain-']
|
|
273
|
+
.markdown-content__symbol-icon {
|
|
274
|
+
inline-size: 1.25em;
|
|
275
|
+
block-size: 1.25em;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.markdown-content__symbol-label {
|
|
279
|
+
color: var(--nox-text);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.markdown-content__quote {
|
|
283
|
+
margin: 0;
|
|
284
|
+
padding: var(--nox-space-3) var(--nox-space-4);
|
|
285
|
+
border: var(--nox-border-width) solid var(--nox-border);
|
|
286
|
+
border-inline-start-width: calc(var(--nox-border-width) * 3);
|
|
287
|
+
border-radius: var(--nox-radius-sm);
|
|
288
|
+
background: var(--nox-surface-muted);
|
|
289
|
+
color: var(--nox-text);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.markdown-content__inline-code {
|
|
293
|
+
padding: 0.1em 0.35em;
|
|
294
|
+
border: var(--nox-border-width) solid var(--nox-border);
|
|
295
|
+
border-radius: var(--nox-radius-sm);
|
|
296
|
+
background: var(--nox-surface-muted);
|
|
297
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
298
|
+
font-size: 0.9em;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.markdown-content__link {
|
|
302
|
+
color: var(--nox-tone-color);
|
|
303
|
+
overflow-wrap: anywhere;
|
|
304
|
+
text-decoration: none;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.markdown-content__link[data-markdown-link-treatment='reference'] {
|
|
308
|
+
font-weight: var(--nox-font-weight-strong);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.markdown-content [data-tone] {
|
|
312
|
+
color: var(--nox-tone-color);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.markdown-content__visually-hidden {
|
|
316
|
+
position: absolute;
|
|
317
|
+
inline-size: 1px;
|
|
318
|
+
block-size: 1px;
|
|
319
|
+
padding: 0;
|
|
320
|
+
border: 0;
|
|
321
|
+
margin: -1px;
|
|
322
|
+
overflow: hidden;
|
|
323
|
+
clip: rect(0 0 0 0);
|
|
324
|
+
white-space: nowrap;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@container (width < 32rem) {
|
|
328
|
+
.markdown-content {
|
|
329
|
+
gap: var(--nox-space-4);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.markdown-content__list-item[data-markdown-resource-media='lead'] {
|
|
333
|
+
grid-template-columns: 4rem minmax(0, 1fr);
|
|
334
|
+
gap: var(--nox-space-3);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.markdown-content__lead-media {
|
|
338
|
+
inline-size: 4rem;
|
|
339
|
+
block-size: 4rem;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.markdown-content__change {
|
|
343
|
+
display: grid;
|
|
344
|
+
grid-template-columns: minmax(0, 1fr);
|
|
345
|
+
align-items: start;
|
|
346
|
+
gap: var(--nox-space-1);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.markdown-content__change-label,
|
|
350
|
+
.markdown-content__change-values {
|
|
351
|
+
inline-size: 100%;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.markdown-content__change-values {
|
|
355
|
+
box-sizing: border-box;
|
|
356
|
+
padding-inline-start: var(--nox-space-3);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
import MarkdownSymbol from './MarkdownSymbol.astro';
|
|
3
|
+
import type { MarkdownInline } from './contracts';
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
node: MarkdownInline;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const { node }: Props = Astro.props;
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
{
|
|
13
|
+
node.type === 'text' ? (
|
|
14
|
+
node.lang ? (
|
|
15
|
+
<span lang={node.lang}>{node.value}</span>
|
|
16
|
+
) : (
|
|
17
|
+
node.value
|
|
18
|
+
)
|
|
19
|
+
) : node.type === 'symbol' ? (
|
|
20
|
+
<MarkdownSymbol node={node} />
|
|
21
|
+
) : node.type === 'strong' ? (
|
|
22
|
+
<strong>
|
|
23
|
+
{node.children.map((child) => <Astro.self node={child} />)}
|
|
24
|
+
</strong>
|
|
25
|
+
) : node.type === 'emphasis' ? (
|
|
26
|
+
<em>{node.children.map((child) => <Astro.self node={child} />)}</em>
|
|
27
|
+
) : node.type === 'code' ? (
|
|
28
|
+
<code class="markdown-content__inline-code">{node.value}</code>
|
|
29
|
+
) : node.type === 'link' ? (
|
|
30
|
+
<a
|
|
31
|
+
class="markdown-content__link"
|
|
32
|
+
data-markdown-link-treatment={node.treatment}
|
|
33
|
+
data-tone="info"
|
|
34
|
+
href={node.href}
|
|
35
|
+
lang={node.lang}
|
|
36
|
+
rel={node.external ? 'noopener noreferrer' : undefined}
|
|
37
|
+
target={node.external ? '_blank' : undefined}
|
|
38
|
+
>
|
|
39
|
+
{node.children.map((child) => <Astro.self node={child} />)}
|
|
40
|
+
</a>
|
|
41
|
+
) : (
|
|
42
|
+
<br />
|
|
43
|
+
)
|
|
44
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
---
|
|
2
|
+
import CodeBlock from '../CodeBlock/CodeBlock.astro';
|
|
3
|
+
import type {
|
|
4
|
+
CodeBlockCopy,
|
|
5
|
+
} from '../CodeBlock/contracts';
|
|
6
|
+
import Media from '../../../primitives/media/Media/Media.astro';
|
|
7
|
+
import Separator from '../../../primitives/layout/Separator/Separator.astro';
|
|
8
|
+
import type { Tone } from '../../../theme/contracts';
|
|
9
|
+
import MarkdownInline from './MarkdownInline.astro';
|
|
10
|
+
import MarkdownSymbol from './MarkdownSymbol.astro';
|
|
11
|
+
import type {
|
|
12
|
+
MarkdownBlock,
|
|
13
|
+
MarkdownHeadingLevel,
|
|
14
|
+
MarkdownListMarker,
|
|
15
|
+
MarkdownSection,
|
|
16
|
+
} from './contracts';
|
|
17
|
+
|
|
18
|
+
type Props = {
|
|
19
|
+
codeBlockCopy?: CodeBlockCopy;
|
|
20
|
+
node: MarkdownBlock | MarkdownSection;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function toHeadingTag(
|
|
24
|
+
level: MarkdownHeadingLevel,
|
|
25
|
+
): 'h2' | 'h3' | 'h4' | 'h5' | 'h6' {
|
|
26
|
+
return `h${level}` as 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const defaultListMarker = {
|
|
30
|
+
symbol: 'bullet',
|
|
31
|
+
tone: 'neutral',
|
|
32
|
+
} as const satisfies MarkdownListMarker;
|
|
33
|
+
const nestedListMarker = {
|
|
34
|
+
symbol: 'arrow-right',
|
|
35
|
+
tone: 'neutral',
|
|
36
|
+
} as const satisfies MarkdownListMarker;
|
|
37
|
+
|
|
38
|
+
const codeBlockTones = new Set<Tone>([
|
|
39
|
+
'neutral',
|
|
40
|
+
'info',
|
|
41
|
+
'success',
|
|
42
|
+
'warning',
|
|
43
|
+
'danger',
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
function normalizeCodeLanguage(language?: string): string | undefined {
|
|
47
|
+
const normalized = language?.trim().toLowerCase();
|
|
48
|
+
return normalized || undefined;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function resolveCodeBlockTone(language?: string): Tone {
|
|
52
|
+
const normalized = normalizeCodeLanguage(language);
|
|
53
|
+
return normalized && codeBlockTones.has(normalized as Tone)
|
|
54
|
+
? (normalized as Tone)
|
|
55
|
+
: 'neutral';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const { codeBlockCopy, node }: Props = Astro.props;
|
|
59
|
+
const HeadingTag =
|
|
60
|
+
node.type === 'section' || node.type === 'heading'
|
|
61
|
+
? toHeadingTag(node.level)
|
|
62
|
+
: 'div';
|
|
63
|
+
const listItems =
|
|
64
|
+
node.type === 'list'
|
|
65
|
+
? node.items.map((item) => ({
|
|
66
|
+
item,
|
|
67
|
+
marker:
|
|
68
|
+
item.marker ??
|
|
69
|
+
(item.heading
|
|
70
|
+
? nestedListMarker
|
|
71
|
+
: item.resource
|
|
72
|
+
? undefined
|
|
73
|
+
: defaultListMarker),
|
|
74
|
+
}))
|
|
75
|
+
: [];
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
{
|
|
79
|
+
node.type === 'section' ? (
|
|
80
|
+
<section
|
|
81
|
+
class="markdown-content__section"
|
|
82
|
+
aria-labelledby={node.id}
|
|
83
|
+
>
|
|
84
|
+
<HeadingTag
|
|
85
|
+
class="markdown-content__section-title"
|
|
86
|
+
data-markdown-heading-level={node.level}
|
|
87
|
+
id={node.id}
|
|
88
|
+
>
|
|
89
|
+
{node.title}
|
|
90
|
+
</HeadingTag>
|
|
91
|
+
<div class="markdown-content__section-body">
|
|
92
|
+
{
|
|
93
|
+
node.blocks.map((block) => (
|
|
94
|
+
<Astro.self node={block} codeBlockCopy={codeBlockCopy} />
|
|
95
|
+
))
|
|
96
|
+
}
|
|
97
|
+
</div>
|
|
98
|
+
</section>
|
|
99
|
+
) : node.type === 'paragraph' ? (
|
|
100
|
+
<p class="markdown-content__paragraph">
|
|
101
|
+
{node.children.map((child) => <MarkdownInline node={child} />)}
|
|
102
|
+
</p>
|
|
103
|
+
) : node.type === 'heading' ? (
|
|
104
|
+
<HeadingTag
|
|
105
|
+
class="markdown-content__heading"
|
|
106
|
+
data-markdown-heading-level={node.level}
|
|
107
|
+
id={node.id}
|
|
108
|
+
>
|
|
109
|
+
{node.children.map((child) => <MarkdownInline node={child} />)}
|
|
110
|
+
</HeadingTag>
|
|
111
|
+
) : node.type === 'change' ? (
|
|
112
|
+
<div class="markdown-content__change">
|
|
113
|
+
<span class="markdown-content__change-label">
|
|
114
|
+
{node.label.map((child) => <MarkdownInline node={child} />)}
|
|
115
|
+
</span>
|
|
116
|
+
{node.presentation === 'statement' ? (
|
|
117
|
+
<span class="markdown-content__change-values">
|
|
118
|
+
{node.value.map((child) => <MarkdownInline node={child} />)}
|
|
119
|
+
</span>
|
|
120
|
+
) : (
|
|
121
|
+
<span class="markdown-content__change-values" lang={node.valueLang}>
|
|
122
|
+
<span class="markdown-content__change-transition">
|
|
123
|
+
<span>{node.before}</span>
|
|
124
|
+
<MarkdownSymbol
|
|
125
|
+
node={{
|
|
126
|
+
type: 'symbol',
|
|
127
|
+
name: 'arrow-right',
|
|
128
|
+
accessibleLabel: node.transitionLabel,
|
|
129
|
+
lang: node.valueLang,
|
|
130
|
+
}}
|
|
131
|
+
/>
|
|
132
|
+
<span>{node.after}</span>
|
|
133
|
+
{node.delta ? (
|
|
134
|
+
<span
|
|
135
|
+
class="markdown-content__change-delta"
|
|
136
|
+
data-tone={node.delta.tone}
|
|
137
|
+
>
|
|
138
|
+
<span aria-hidden="true">(</span>
|
|
139
|
+
{node.delta.sign === 'neutral' ? null : (
|
|
140
|
+
<>
|
|
141
|
+
<span class="markdown-content__visually-hidden">
|
|
142
|
+
{node.delta.accessibleLabel}
|
|
143
|
+
</span>
|
|
144
|
+
<span aria-hidden="true">
|
|
145
|
+
{node.delta.sign === 'plus' ? '+' : '-'}
|
|
146
|
+
</span>
|
|
147
|
+
</>
|
|
148
|
+
)}
|
|
149
|
+
<span>{node.delta.value}</span>
|
|
150
|
+
<span aria-hidden="true">)</span>
|
|
151
|
+
</span>
|
|
152
|
+
) : null}
|
|
153
|
+
</span>
|
|
154
|
+
{node.suffix?.length ? (
|
|
155
|
+
<span class="markdown-content__change-suffix">
|
|
156
|
+
{node.suffix.map((child) => (
|
|
157
|
+
<MarkdownInline node={child} />
|
|
158
|
+
))}
|
|
159
|
+
</span>
|
|
160
|
+
) : null}
|
|
161
|
+
</span>
|
|
162
|
+
)}
|
|
163
|
+
</div>
|
|
164
|
+
) : node.type === 'list' ? (
|
|
165
|
+
<ul
|
|
166
|
+
class="markdown-content__list"
|
|
167
|
+
data-markdown-has-headings={
|
|
168
|
+
node.items.some((item) => item.heading) ? true : undefined
|
|
169
|
+
}
|
|
170
|
+
data-markdown-has-resources={
|
|
171
|
+
node.items.some((item) => item.resource) ? true : undefined
|
|
172
|
+
}
|
|
173
|
+
>
|
|
174
|
+
{listItems.map(({ item, marker }) => (
|
|
175
|
+
<li
|
|
176
|
+
class="markdown-content__list-item"
|
|
177
|
+
data-markdown-has-marker={marker ? true : undefined}
|
|
178
|
+
data-markdown-resource={item.resource ? true : undefined}
|
|
179
|
+
data-markdown-resource-layout={item.resource?.layout}
|
|
180
|
+
data-markdown-resource-media={item.resource?.mediaPlacement}
|
|
181
|
+
data-markdown-resource-media-scale={item.resource?.mediaScale}
|
|
182
|
+
>
|
|
183
|
+
{item.resource?.mediaPlacement === 'lead' ? (
|
|
184
|
+
<Media
|
|
185
|
+
class="markdown-content__lead-media"
|
|
186
|
+
media={item.resource.media}
|
|
187
|
+
size="fill"
|
|
188
|
+
upscale={
|
|
189
|
+
item.resource.mediaScale === 'compact'
|
|
190
|
+
? 'prevent'
|
|
191
|
+
: undefined
|
|
192
|
+
}
|
|
193
|
+
/>
|
|
194
|
+
) : null}
|
|
195
|
+
{marker ? (
|
|
196
|
+
<MarkdownSymbol
|
|
197
|
+
node={{
|
|
198
|
+
type: 'symbol',
|
|
199
|
+
name: marker.symbol,
|
|
200
|
+
accessibleLabel: marker.label,
|
|
201
|
+
lang: marker.lang,
|
|
202
|
+
tone: marker.tone,
|
|
203
|
+
}}
|
|
204
|
+
/>
|
|
205
|
+
) : null}
|
|
206
|
+
<div class="markdown-content__list-item-body">
|
|
207
|
+
{item.heading ? (
|
|
208
|
+
<h5
|
|
209
|
+
class="markdown-content__heading"
|
|
210
|
+
data-markdown-heading-level="5"
|
|
211
|
+
>
|
|
212
|
+
{item.heading.map((child) => (
|
|
213
|
+
<MarkdownInline node={child} />
|
|
214
|
+
))}
|
|
215
|
+
</h5>
|
|
216
|
+
) : item.resource ? (
|
|
217
|
+
<div class="markdown-content__resource-heading">
|
|
218
|
+
{item.resource.mediaPlacement === 'inline' ? (
|
|
219
|
+
<Media
|
|
220
|
+
class="markdown-content__inline-media"
|
|
221
|
+
media={item.resource.media}
|
|
222
|
+
upscale={
|
|
223
|
+
item.resource.mediaScale === 'compact'
|
|
224
|
+
? 'prevent'
|
|
225
|
+
: undefined
|
|
226
|
+
}
|
|
227
|
+
/>
|
|
228
|
+
) : null}
|
|
229
|
+
{item.resource.layout === 'detailed' ? (
|
|
230
|
+
<h3 class="markdown-content__resource-title">
|
|
231
|
+
{item.resource.title.map((child) => (
|
|
232
|
+
<MarkdownInline node={child} />
|
|
233
|
+
))}
|
|
234
|
+
</h3>
|
|
235
|
+
) : (
|
|
236
|
+
<span class="markdown-content__resource-title">
|
|
237
|
+
{item.resource.title.map((child) => (
|
|
238
|
+
<MarkdownInline node={child} />
|
|
239
|
+
))}
|
|
240
|
+
</span>
|
|
241
|
+
)}
|
|
242
|
+
</div>
|
|
243
|
+
) : null}
|
|
244
|
+
{
|
|
245
|
+
item.children.map((block) => (
|
|
246
|
+
<Astro.self node={block} codeBlockCopy={codeBlockCopy} />
|
|
247
|
+
))
|
|
248
|
+
}
|
|
249
|
+
</div>
|
|
250
|
+
</li>
|
|
251
|
+
))}
|
|
252
|
+
</ul>
|
|
253
|
+
) : node.type === 'quote' ? (
|
|
254
|
+
<blockquote
|
|
255
|
+
class="markdown-content__quote"
|
|
256
|
+
data-tone={node.tone ?? 'neutral'}
|
|
257
|
+
>
|
|
258
|
+
{
|
|
259
|
+
node.children.map((block) => (
|
|
260
|
+
<Astro.self node={block} codeBlockCopy={codeBlockCopy} />
|
|
261
|
+
))
|
|
262
|
+
}
|
|
263
|
+
</blockquote>
|
|
264
|
+
) : node.type === 'separator' ? (
|
|
265
|
+
<Separator bleed emphasis={node.emphasis} />
|
|
266
|
+
) : (
|
|
267
|
+
<CodeBlock
|
|
268
|
+
aria-label={node.language}
|
|
269
|
+
copy={codeBlockCopy}
|
|
270
|
+
presentation={
|
|
271
|
+
normalizeCodeLanguage(node.language) === 'markdown'
|
|
272
|
+
? 'light'
|
|
273
|
+
: 'default'
|
|
274
|
+
}
|
|
275
|
+
text={node.value}
|
|
276
|
+
tone={resolveCodeBlockTone(node.language)}
|
|
277
|
+
wrap={false}
|
|
278
|
+
/>
|
|
279
|
+
)
|
|
280
|
+
}
|