@master/internal-site 0.1.1 → 0.1.3
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 +17 -0
- package/dist/astro.mjs +145 -10
- package/package.json +1 -1
- package/src/astro/index.ts +2 -0
- package/src/astro/routes.template.ts +1 -0
- package/src/astro/style-assets.ts +107 -0
- package/src/benchmarks/BenchmarkBarRows.astro +3 -2
- package/src/benchmarks/BenchmarkBars.astro +1 -1
- package/src/benchmarks/BenchmarkChart.astro +1 -0
- package/src/benchmarks/BenchmarkChartGroup.astro +1 -1
- package/src/benchmarks/BenchmarkDataTable.astro +1 -1
- package/src/benchmarks/BenchmarkFigure.astro +2 -1
- package/src/benchmarks/BenchmarkMetricTable.astro +1 -1
- package/src/benchmarks/BenchmarkMetrics.astro +1 -1
- package/src/benchmarks/BenchmarkSampleSummary.astro +1 -1
- package/src/benchmarks/BenchmarkScrollRegion.svelte +2 -1
- package/src/benchmarks/BenchmarkSource.astro +1 -1
- package/src/benchmarks/BenchmarkStackedBars.astro +2 -1
- package/src/benchmarks/types.ts +2 -0
- package/src/blog/article/BlogArticleContents.svelte +1 -1
- package/src/blog/article/BlogArticleMasthead.astro +12 -1
- package/src/css/NamespaceUtilityTable.astro +1 -1
- package/src/css/ThemeNumberVariableTable.astro +1 -1
- package/src/css/markdown.ts +14 -5
- package/src/demo/Demo.svelte +4 -0
- package/src/demo/DemoAsset.astro +1 -0
- package/src/demo/DemoCatalog.astro +1 -0
- package/src/demo/DemoComparison.svelte +3 -0
- package/src/demo/DemoContainer.svelte +3 -0
- package/src/demo/DemoControls.svelte +2 -0
- package/src/demo/DemoCopyButton.svelte +3 -0
- package/src/demo/DemoCopyGroup.svelte +2 -0
- package/src/demo/DemoFeatureSupport.svelte +2 -0
- package/src/demo/DemoGeneratedCSS.svelte +2 -0
- package/src/demo/DemoIndex.astro +1 -0
- package/src/demo/DemoMotion.svelte +1 -0
- package/src/demo/DemoScrollArea.svelte +2 -0
- package/src/demo/DemoStyleComparison.astro +1 -0
- package/src/demo/DemoSurface.svelte +2 -0
- package/src/demo/DemoThemeComparison.astro +1 -0
- package/src/demo/DemoTokenTable.astro +1 -1
- package/src/demo/DemoViewport.svelte +5 -0
- package/src/demo/DemoWaterfall.astro +1 -1
- package/src/demo/foundations/FoundationDialog.astro +1 -0
- package/src/demo/foundations/FoundationMedia.astro +1 -0
- package/src/demo/foundations/FoundationShrink.astro +1 -0
- package/src/demo/foundations/Palette.svelte +2 -0
- package/src/demo/illustration-materials.ts +1 -1
- package/src/demo/illustration.css +218 -0
- package/src/docs-shell/components/ArticleHeader.astro +2 -0
- package/src/docs-shell/components/Callout.astro +1 -0
- package/src/docs-shell/components/CodeCopyButton.astro +2 -0
- package/src/docs-shell/components/CodeTabBar.astro +2 -0
- package/src/docs-shell/components/CodeTabs.astro +2 -1
- package/src/docs-shell/components/CodeView.astro +1 -1
- package/src/docs-shell/components/DocHeader.svelte +10 -13
- package/src/docs-shell/components/DocMenuButton.svelte +126 -60
- package/src/docs-shell/components/DocSidebar.svelte +2 -0
- package/src/docs-shell/components/DocVersionSelect.svelte +2 -0
- package/src/docs-shell/components/DocumentAPIIndex.astro +1 -1
- package/src/docs-shell/components/DocumentChoices.astro +1 -1
- package/src/docs-shell/components/DocumentCodeExampleView.astro +3 -1
- package/src/docs-shell/components/DocumentCodeTable.astro +1 -1
- package/src/docs-shell/components/DocumentCopyButton.svelte +3 -0
- package/src/docs-shell/components/DocumentDisclosure.astro +2 -0
- package/src/docs-shell/components/DocumentFileTree.astro +3 -0
- package/src/docs-shell/components/DocumentFlow.astro +4 -1
- package/src/docs-shell/components/DocumentIllustration.astro +5 -11
- package/src/docs-shell/components/DocumentKeyList.astro +1 -1
- package/src/docs-shell/components/DocumentNamespaceTable.astro +1 -1
- package/src/docs-shell/components/DocumentOptionEntry.astro +0 -1
- package/src/docs-shell/components/DocumentOptionList.astro +1 -1
- package/src/docs-shell/components/DocumentOptions.astro +0 -1
- package/src/docs-shell/components/DocumentParameters.astro +1 -1
- package/src/docs-shell/components/DocumentPrompt.astro +2 -0
- package/src/docs-shell/components/DocumentValueList.astro +1 -1
- package/src/docs-shell/components/DocumentationIndex.svelte +2 -0
- package/src/docs-shell/components/ExpandContent.svelte +3 -0
- package/src/docs-shell/components/ExplorerView.astro +1 -0
- package/src/docs-shell/components/Footer.svelte +2 -2
- package/src/docs-shell/components/FooterLink.svelte +17 -0
- package/src/docs-shell/components/GeneratedCSS.astro +1 -0
- package/src/docs-shell/components/Header.svelte +1 -1
- package/src/docs-shell/components/InlineCode.astro +1 -0
- package/src/docs-shell/components/InteractingIndicator.astro +1 -0
- package/src/docs-shell/components/LanguageButton.svelte +1 -0
- package/src/docs-shell/components/LanguageSelect.svelte +2 -0
- package/src/docs-shell/components/NotFound.astro +3 -0
- package/src/docs-shell/components/PMAction.astro +1 -0
- package/src/docs-shell/components/PageContent.svelte +1 -1
- package/src/docs-shell/components/PageContentDisclosure.astro +2 -1
- package/src/docs-shell/components/PageContentList.svelte +2 -0
- package/src/docs-shell/components/PageNavs.astro +1 -0
- package/src/docs-shell/components/SearchButton.svelte +3 -0
- package/src/docs-shell/components/SearchDialog.svelte +6 -1
- package/src/docs-shell/components/Segments.svelte +2 -0
- package/src/docs-shell/components/StepSection.astro +1 -2
- package/src/docs-shell/components/Tabs.astro +1 -0
- package/src/docs-shell/components/ThemeSelect.svelte +2 -0
- package/src/docs-shell/components/markdown/Table.astro +1 -0
- package/src/docs-shell/components/markdown-components.ts +0 -1
- package/src/docs-shell/remark/markdown-components.js +28 -7
- package/src/docs-shell/scripts/document.ts +1 -1
- package/src/docs-shell/types/Metadata.ts +11 -0
- package/src/docs-shell/utils/generate-metadata.ts +3 -1
- package/src/docs-shell/utils/head.ts +5 -2
- package/src/examples/components/ArticleTransitionScene.svelte +4 -0
- package/src/examples/layout-system/page.astro +0 -1
- package/src/home/HomeBentoFrame.astro +1 -0
- package/src/home/HomeBentoGrid.astro +1 -0
- package/src/home/HomeFooter.svelte +2 -2
- package/src/home/bento.css +167 -0
- package/src/home/design.css +1 -1
- package/src/home/home.css +4 -576
- package/src/home/segmented-control.css +94 -0
- package/src/layouts/Document.astro +3 -1
- package/src/public/icons/json.svg +1 -0
- package/src/scripts/atomic-class-authoring.ts +98 -0
- package/src/scripts/style-delivery.mjs +110 -0
- package/src/sections/blog.astro +1 -1
- package/src/sections/guide.astro +1 -2
- package/src/styles/blog-article.css +10 -7
- package/src/styles/blog-materials.css +13 -0
- package/src/styles/demo.css +0 -1
- package/src/styles/docs-shell/code.css +5 -61
- package/src/styles/docs-shell/documentation-search.css +1 -0
- package/src/styles/docs-shell/footer-link.css +5 -0
- package/src/styles/docs-shell/header.css +2 -73
- package/src/styles/docs-shell/menu.css +37 -17
- package/src/styles/docs-shell/page-content.css +2 -37
- package/src/styles/docs-shell/prose.css +18 -9
- package/src/styles/docs-shell/steps.css +2 -39
- package/src/styles/document-comparison.css +5 -2
- package/src/styles/documentation-illustration.css +1 -9
- package/src/styles/documentation-index.css +2 -1
- package/src/styles/documents.css +2 -4
- package/src/styles/interface.css +5 -3
- package/src/styles/system/DESIGN.md +34 -14
- package/src/styles/system/browser.css +21 -0
- package/src/styles/system/button-feedback.css +13 -0
- package/src/styles/system/callout.css +14 -0
- package/src/styles/system/chart.css +18 -0
- package/src/styles/system/checks.css +18 -0
- package/src/styles/system/code-panel.css +82 -0
- package/src/styles/system/code-tabs.css +40 -0
- package/src/styles/system/code.css +8 -85
- package/src/styles/system/compare.css +7 -0
- package/src/styles/system/controls.css +10 -109
- package/src/styles/system/copy.css +32 -0
- package/src/styles/system/data.css +10 -134
- package/src/styles/system/dialog.css +16 -0
- package/src/styles/system/disclosure.css +19 -0
- package/src/styles/system/expand.css +11 -0
- package/src/styles/system/fields.css +25 -0
- package/src/styles/system/header-core.css +101 -0
- package/src/styles/system/hint.css +5 -0
- package/src/styles/system/index.css +13 -0
- package/src/styles/system/inline-code.css +4 -0
- package/src/styles/system/kbd.css +4 -0
- package/src/styles/system/logos.css +10 -0
- package/src/styles/system/menu.css +14 -0
- package/src/styles/system/metrics.css +22 -0
- package/src/styles/system/pagehead.css +13 -0
- package/src/styles/system/pager.css +13 -0
- package/src/styles/system/parameters.css +17 -0
- package/src/styles/system/prompt.css +7 -0
- package/src/styles/system/prose.css +4 -75
- package/src/styles/system/range.css +12 -0
- package/src/styles/system/reading.css +44 -0
- package/src/styles/system/scroll.css +6 -0
- package/src/styles/system/search-trigger.css +10 -0
- package/src/styles/system/segmented.css +22 -0
- package/src/styles/system/sheet.css +8 -0
- package/src/styles/system/shell.css +8 -102
- package/src/styles/system/sidebar.css +14 -0
- package/src/styles/system/source.css +5 -0
- package/src/styles/system/specimens.css +3 -0
- package/src/styles/system/stage.css +18 -0
- package/src/styles/system/steps.css +51 -0
- package/src/styles/system/surfaces.css +8 -104
- package/src/styles/system/table.css +23 -0
- package/src/styles/system/toc.css +59 -0
- package/src/styles/system/tooltip.css +6 -0
- package/src/styles/system/tray-code.css +6 -0
- package/src/styles/system/tray.css +20 -0
- package/src/styles/system/tree.css +15 -0
- package/src/styles/system/waterfall.css +14 -0
|
@@ -1,96 +1,162 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Attachment } from 'svelte/attachments'
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
const portal: Attachment<
|
|
4
|
+
/** Keep the modal outside the header's transforms and stacking context. */
|
|
5
|
+
const portal: Attachment<HTMLDialogElement> = (node) => {
|
|
6
6
|
document.body.append(node)
|
|
7
|
-
return () => node.remove()
|
|
7
|
+
return () => { node.close(); node.remove() }
|
|
8
8
|
}
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<script lang="ts">
|
|
12
|
+
import '@master/internal-site/styles/interface.css'
|
|
13
|
+
import '@master/internal-site/styles/system/dialog.css'
|
|
14
|
+
import '@master/internal-site/styles/system/header-core.css'
|
|
15
|
+
|
|
12
16
|
import '../../styles/docs-shell/menu.css'
|
|
17
|
+
import { onMount } from 'svelte'
|
|
13
18
|
import clsx from 'clsx'
|
|
14
19
|
import Link from './Link.svelte'
|
|
15
|
-
import DocSidebar, { type DocSidebarProps } from './DocSidebar.svelte'
|
|
16
20
|
import SearchButton from './SearchButton.svelte'
|
|
17
21
|
import IconArrowUpRight from '@tabler/icons-svelte-runes/icons/arrow-up-right'
|
|
18
|
-
import
|
|
19
|
-
import
|
|
22
|
+
import IconSearch from '@tabler/icons-svelte-runes/icons/search'
|
|
23
|
+
import IconMenu from '@tabler/icons-svelte-runes/icons/menu'
|
|
20
24
|
import ThemeSelect from './ThemeSelect.svelte'
|
|
21
25
|
import DocVersionSelect from './DocVersionSelect.svelte'
|
|
22
26
|
import LanguageSelect from './LanguageSelect.svelte'
|
|
27
|
+
import { openSearch } from '../contexts/search'
|
|
23
28
|
import app from 'virtual:master-site/app'
|
|
24
29
|
import { getSite } from '../site'
|
|
25
30
|
|
|
26
|
-
interface Props {
|
|
27
|
-
class?: string
|
|
28
|
-
documentNavigation?: DocSidebarProps['pageCategories']
|
|
29
|
-
documentNavigationTitle?: string
|
|
30
|
-
}
|
|
31
|
+
interface Props { class?: string }
|
|
31
32
|
|
|
32
|
-
/**
|
|
33
|
-
let { class: className
|
|
33
|
+
/** Primary destinations, with community and preferences kept in a quiet footer. */
|
|
34
|
+
let { class: className }: Props = $props()
|
|
34
35
|
let opened = $state(false)
|
|
35
36
|
const id = $props.id()
|
|
36
|
-
let dialog
|
|
37
|
-
let trigger
|
|
37
|
+
let dialog: HTMLDialogElement
|
|
38
|
+
let trigger: HTMLButtonElement
|
|
39
|
+
let closing: ReturnType<typeof setTimeout> | undefined
|
|
38
40
|
const { t, locale, i18n } = getSite()
|
|
39
41
|
const tw = locale === 'tw'
|
|
40
42
|
|
|
43
|
+
function finishClose(restoreFocus = true) {
|
|
44
|
+
clearTimeout(closing)
|
|
45
|
+
closing = undefined
|
|
46
|
+
opened = false
|
|
47
|
+
dialog.close()
|
|
48
|
+
if (restoreFocus) {
|
|
49
|
+
const target = trigger.getClientRects().length ? trigger : trigger.closest('header')?.querySelector<HTMLElement>('.ui-header-brand')
|
|
50
|
+
target?.focus({ preventScroll: true })
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function open() {
|
|
55
|
+
clearTimeout(closing)
|
|
56
|
+
closing = undefined
|
|
57
|
+
if (!dialog.open) {
|
|
58
|
+
dialog.showModal()
|
|
59
|
+
dialog.scrollTop = 0
|
|
60
|
+
// Establish the closed style before changing the target; CSS can reverse an interrupted transition.
|
|
61
|
+
getComputedStyle(dialog).opacity
|
|
62
|
+
}
|
|
63
|
+
opened = true
|
|
64
|
+
}
|
|
65
|
+
|
|
41
66
|
function close() {
|
|
42
|
-
dialog?.close()
|
|
43
67
|
opened = false
|
|
44
|
-
|
|
68
|
+
clearTimeout(closing)
|
|
69
|
+
if (matchMedia('(prefers-reduced-motion: reduce)').matches) finishClose()
|
|
70
|
+
else closing = setTimeout(finishClose, 220)
|
|
45
71
|
}
|
|
46
72
|
|
|
47
|
-
|
|
48
|
-
if (!opened)
|
|
49
|
-
|
|
50
|
-
|
|
73
|
+
function transitionEnd(event: TransitionEvent) {
|
|
74
|
+
if (event.target === dialog && event.propertyName === 'opacity' && !opened) finishClose()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function search(event: Event) {
|
|
78
|
+
event.preventDefault()
|
|
79
|
+
const searchTrigger = trigger.closest('header')?.querySelector<HTMLElement>('.ui-header-search')
|
|
80
|
+
const target = searchTrigger?.getClientRects().length ? searchTrigger : trigger
|
|
81
|
+
finishClose(false)
|
|
82
|
+
openSearch(target)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function keydown(event: KeyboardEvent) {
|
|
86
|
+
if (event.key === 'Tab') {
|
|
87
|
+
const controls = Array.from(dialog.querySelectorAll<HTMLElement>('a[href], button:not(:disabled), select:not(:disabled)'))
|
|
88
|
+
.filter(element => element.getClientRects().length)
|
|
89
|
+
const first = controls[0]
|
|
90
|
+
const last = controls.at(-1)
|
|
91
|
+
if (event.shiftKey && document.activeElement === first) { event.preventDefault(); last?.focus() }
|
|
92
|
+
else if (!event.shiftKey && document.activeElement === last) { event.preventDefault(); first?.focus() }
|
|
93
|
+
}
|
|
94
|
+
if (!event.isComposing && (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'k') {
|
|
95
|
+
event.stopPropagation()
|
|
96
|
+
search(event)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
onMount(() => {
|
|
51
101
|
const wide = matchMedia('(width >= 64rem)')
|
|
52
|
-
const
|
|
102
|
+
const motion = matchMedia('(prefers-reduced-motion: reduce)')
|
|
103
|
+
const resize = () => { if (wide.matches && dialog.open) finishClose() }
|
|
104
|
+
const reduceMotion = () => { if (motion.matches && closing) finishClose() }
|
|
53
105
|
wide.addEventListener('change', resize)
|
|
54
|
-
|
|
106
|
+
motion.addEventListener('change', reduceMotion)
|
|
107
|
+
return () => {
|
|
108
|
+
clearTimeout(closing)
|
|
109
|
+
wide.removeEventListener('change', resize)
|
|
110
|
+
motion.removeEventListener('change', reduceMotion)
|
|
111
|
+
}
|
|
55
112
|
})
|
|
56
113
|
</script>
|
|
57
114
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
115
|
+
{#snippet lines()}
|
|
116
|
+
<IconMenu class="ui-menu-glyph" size={18} stroke={1.5} data-open={opened} aria-hidden="true" />
|
|
117
|
+
{/snippet}
|
|
118
|
+
|
|
119
|
+
<button bind:this={trigger} type="button" class={clsx('ui-button ui-menu-toggle', className)} data-variant="quiet" data-shape="icon"
|
|
120
|
+
aria-label={t('Menu')} aria-expanded={opened} aria-haspopup="dialog" aria-controls={id} onclick={open}>
|
|
121
|
+
{@render lines()}
|
|
62
122
|
</button>
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
123
|
+
<dialog bind:this={dialog} {@attach portal} {id} class="ui-dialog ui-mobile-menu" data-variant="sheet" data-open={opened}
|
|
124
|
+
aria-labelledby={`${id}-title`} oncancel={event => { event.preventDefault(); close() }} ontransitionend={transitionEnd}
|
|
125
|
+
onkeydown={keydown} onclose={() => { if (!dialog.open) { opened = false; clearTimeout(closing) } }}>
|
|
126
|
+
<div class="ui-mobile-menu-bar">
|
|
127
|
+
<button type="button" class="ui-button ui-header-control ui-menu-toggle" data-variant="quiet" data-shape="icon"
|
|
128
|
+
onclick={() => opened ? close() : open()} aria-label={opened ? (tw ? '關閉選單' : 'Close menu') : t('Menu')} aria-expanded={opened} aria-controls={id}>
|
|
129
|
+
{@render lines()}
|
|
130
|
+
</button>
|
|
131
|
+
<Link href="/" class="ui-header-brand" onclick={() => finishClose(false)} aria-label={`${app.name} ${tw ? '首頁' : 'home'}`}><app.Logotype style="height: 20px; width: auto" aria-hidden="true" /></Link>
|
|
132
|
+
<SearchButton class="ui-button ui-header-control ui-menu-search" data-variant="quiet" data-shape="icon" onclick={search}><IconSearch size={18} stroke={1.5} aria-hidden="true" /></SearchButton>
|
|
133
|
+
</div>
|
|
134
|
+
<div class="ui-mobile-menu-body">
|
|
135
|
+
<h2 class="sr-only" id={`${id}-title`}>{tw ? '網站導覽' : 'Navigation'}</h2>
|
|
136
|
+
<nav class="ui-mobile-menu-nav" aria-label={tw ? '主要導覽' : 'Main navigation'}>
|
|
137
|
+
{#each app.navs as { Icon: _Icon, disabled, fullName, ...link }, index (link.name)}
|
|
138
|
+
<Link class="ui-mobile-menu-link" current="true" ambiguous {...link} {disabled} style={`--menu-order: ${index}`} onclick={() => finishClose(false)}>
|
|
139
|
+
<span>{t(fullName || link.name)}</span>
|
|
140
|
+
{#if link.href?.startsWith('http')}<IconArrowUpRight size={16} stroke={1.5} aria-hidden="true" />{/if}
|
|
141
|
+
</Link>
|
|
142
|
+
{/each}
|
|
143
|
+
</nav>
|
|
144
|
+
<div class="ui-mobile-menu-footer">
|
|
145
|
+
{#if app.communityNavs?.length}
|
|
146
|
+
<nav class="ui-mobile-menu-community" aria-label={t('Community')}>
|
|
147
|
+
{#each app.communityNavs as { Icon, disabled, fullName, ...link } (link.name)}
|
|
148
|
+
<Link {...link} {disabled} aria-label={fullName || link.name} title={fullName || link.name} onclick={() => finishClose(false)}>
|
|
149
|
+
{#if Icon}<Icon size={20} stroke={1.5} aria-hidden="true" />{:else}{t(fullName || link.name)}{/if}
|
|
150
|
+
{#if Icon && link.href?.startsWith('http')}<IconArrowUpRight class="ui-menu-external" size={10} stroke={1.5} aria-hidden="true" />{/if}
|
|
151
|
+
</Link>
|
|
152
|
+
{/each}
|
|
153
|
+
</nav>
|
|
154
|
+
{/if}
|
|
155
|
+
<div class="ui-mobile-menu-preferences">
|
|
156
|
+
<ThemeSelect aria-label={t('Theme')} data-variant={undefined} />
|
|
157
|
+
{#if i18n.locales.length > 1}<LanguageSelect aria-label={t('Language')} data-variant={undefined} />{/if}
|
|
158
|
+
{#if app.versions.length > 0}<DocVersionSelect aria-label={t('Version')} data-variant={undefined} />{/if}
|
|
159
|
+
</div>
|
|
94
160
|
</div>
|
|
95
|
-
</
|
|
96
|
-
|
|
161
|
+
</div>
|
|
162
|
+
</dialog>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '@master/internal-site/styles/system/
|
|
2
|
+
import '@master/internal-site/styles/system/index.css'
|
|
3
3
|
import Link from '@master/internal-site/components/Link.svelte'
|
|
4
4
|
import DocumentIdentifier from '@master/internal-site/components/DocumentIdentifier.astro'
|
|
5
5
|
import type { DocumentAPIEntry } from '@master/internal-site/components/document-types.ts'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '@master/internal-site/styles/system/
|
|
2
|
+
import '@master/internal-site/styles/system/index.css'
|
|
3
3
|
import Link from '@master/internal-site/components/Link.svelte'
|
|
4
4
|
import RenderNode from '@master/internal-site/components/RenderNode.astro'
|
|
5
5
|
import type { DocumentChoice } from '@master/internal-site/components/document-types.ts'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '@master/internal-site/styles/system/
|
|
2
|
+
import '@master/internal-site/styles/system/callout.css'
|
|
3
|
+
import '@master/internal-site/styles/system/tray.css'
|
|
4
|
+
import '@master/internal-site/styles/system/tray-code.css'
|
|
3
5
|
import IconAlertTriangle from '@tabler/icons-svelte-runes/icons/alert-triangle'
|
|
4
6
|
import IconCircleX from '@tabler/icons-svelte-runes/icons/circle-x'
|
|
5
7
|
import RenderNode from '@master/internal-site/components/RenderNode.astro'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import '@master/internal-site/styles/interface.css'
|
|
3
|
+
import '@master/internal-site/styles/system/copy.css'
|
|
4
|
+
|
|
2
5
|
import { onMount } from 'svelte'
|
|
3
6
|
import IconCheck from '@tabler/icons-svelte-runes/icons/check'
|
|
4
7
|
import IconCopy from '@tabler/icons-svelte-runes/icons/copy'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
import '@master/internal-site/styles/system/tray.css'
|
|
3
|
+
import '@master/internal-site/styles/system/tray-code.css'
|
|
4
|
+
import '@master/internal-site/styles/system/tree.css'
|
|
2
5
|
import IconFile from '@tabler/icons-svelte-runes/icons/file'
|
|
3
6
|
import IconFolder from '@tabler/icons-svelte-runes/icons/folder'
|
|
4
7
|
import type { DocumentFileEntry, DocumentFileTreeProps } from '@master/internal-site/components/document-types.ts'
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '@master/internal-site/styles/system/
|
|
2
|
+
import '@master/internal-site/styles/system/stage.css'
|
|
3
|
+
import '@master/internal-site/styles/system/steps.css'
|
|
4
|
+
import '@master/internal-site/styles/system/tray.css'
|
|
5
|
+
import '@master/internal-site/styles/system/tray-code.css'
|
|
3
6
|
import type { DocumentFlowProps } from '@master/internal-site/components/document-types.ts'
|
|
4
7
|
|
|
5
8
|
export type { DocumentFlowStep, DocumentFlowProps } from '@master/internal-site/components/document-types.ts'
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
+
import '@master/internal-site/styles/system/disclosure.css'
|
|
3
|
+
import '@master/internal-site/styles/system/tray.css'
|
|
4
|
+
import '@master/internal-site/styles/system/tray-code.css'
|
|
2
5
|
import '@master/internal-site/styles/documentation-illustration.css'
|
|
3
|
-
import IconArrowsMaximize from '@tabler/icons-svelte-runes/icons/arrows-maximize'
|
|
4
6
|
import Image from '@master/internal-site/components/Image.svelte'
|
|
5
7
|
import type { IllustrationImages } from '../types/IllustrationImages'
|
|
6
8
|
|
|
@@ -11,23 +13,15 @@ interface Props {
|
|
|
11
13
|
alt: string
|
|
12
14
|
images: IllustrationImages
|
|
13
15
|
caption: string
|
|
14
|
-
fullSize?: boolean
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
/** A static figure with one accessible image and an independent text description. */
|
|
18
|
-
const { title, alt, images, caption
|
|
19
|
+
const { title, alt, images, caption } = Astro.props
|
|
19
20
|
---
|
|
20
21
|
|
|
21
|
-
<figure class="ui-tray" aria-label={title}
|
|
22
|
+
<figure class="ui-tray" aria-label={title}>
|
|
22
23
|
<figcaption class="ui-tray-head">
|
|
23
24
|
<p class="ui-tray-title">{title}</p>
|
|
24
|
-
{fullSize && (['light', 'dark'] as const).map(scheme => <a
|
|
25
|
-
class="document-illustration-expand ui-button"
|
|
26
|
-
data-variant="quiet" data-shape="icon" data-size="sm" data-scheme={scheme}
|
|
27
|
-
href={images[scheme].src} target="_blank" rel="noopener noreferrer"
|
|
28
|
-
aria-label={`View full-size illustration: ${title} (opens in a new tab)`}
|
|
29
|
-
title="View full-size illustration (opens in a new tab)"
|
|
30
|
-
><IconArrowsMaximize aria-hidden="true" /></a>)}
|
|
31
25
|
</figcaption>
|
|
32
26
|
<div class="document-illustration" role="img" aria-label={alt}>
|
|
33
27
|
{(['light', 'dark'] as const).map(scheme => <Image
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '@master/internal-site/styles/system/data.css'
|
|
3
2
|
import RenderNode from '@master/internal-site/components/RenderNode.astro'
|
|
4
3
|
import DocumentOptionEntry from '@master/internal-site/components/DocumentOptionEntry.astro'
|
|
5
4
|
import DocumentOptionList from '@master/internal-site/components/DocumentOptionList.astro'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '@master/internal-site/styles/system/
|
|
2
|
+
import '@master/internal-site/styles/system/parameters.css'
|
|
3
3
|
import '@master/internal-site/styles/system/specimens.css'
|
|
4
4
|
import RenderNode from '@master/internal-site/components/RenderNode.astro'
|
|
5
5
|
import DocumentIdentifier from '@master/internal-site/components/DocumentIdentifier.astro'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
+
import '@master/internal-site/styles/system/code-panel.css'
|
|
3
|
+
import '@master/internal-site/styles/system/prompt.css'
|
|
2
4
|
import DocumentCopyButton from '@master/internal-site/components/DocumentCopyButton.svelte'
|
|
3
5
|
import type { DocumentPromptProps } from '@master/internal-site/components/document-types.ts'
|
|
4
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '@master/internal-site/styles/system/
|
|
2
|
+
import '@master/internal-site/styles/system/parameters.css'
|
|
3
3
|
import type { DocumentValueRow } from '@master/internal-site/components/document-types.ts'
|
|
4
4
|
|
|
5
5
|
export type { DocumentValueRow } from '@master/internal-site/components/document-types.ts'
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script lang="ts">
|
|
6
|
+
import '@master/internal-site/styles/system/segmented.css'
|
|
7
|
+
|
|
6
8
|
import '@master/internal-site/styles/documentation-index.css'
|
|
7
9
|
import Link from '@master/internal-site/components/Link.svelte'
|
|
8
10
|
import { getSite } from '@master/internal-site/site'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import '@master/internal-site/styles/interface.css'
|
|
3
|
+
import '@master/internal-site/styles/system/expand.css'
|
|
4
|
+
|
|
2
5
|
import type { Snippet } from 'svelte'
|
|
3
6
|
import IconChevronDown from '@tabler/icons-svelte-runes/icons/chevron-down'
|
|
4
7
|
import { getSite } from '../site'
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<script lang="ts">
|
|
24
24
|
import '../../styles/docs-shell/footer.css'
|
|
25
25
|
import clsx from 'clsx'
|
|
26
|
-
import
|
|
26
|
+
import FooterNavLink from './FooterLink.svelte'
|
|
27
27
|
import LanguageSelect from './LanguageSelect.svelte'
|
|
28
28
|
import ThemeSelect from './ThemeSelect.svelte'
|
|
29
29
|
import { useThemeMode } from '../contexts/theme-mode.svelte'
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<ul>
|
|
54
54
|
{#each group.links as link (link.href || link.name)}
|
|
55
55
|
<li>
|
|
56
|
-
<
|
|
56
|
+
<FooterNavLink href={link.href} disabled={link.disabled}>{t(link.name)}</FooterNavLink>
|
|
57
57
|
</li>
|
|
58
58
|
{/each}
|
|
59
59
|
</ul>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
import IconArrowUpRight from '@tabler/icons-svelte-runes/icons/arrow-up-right'
|
|
4
|
+
import Link from './Link.svelte'
|
|
5
|
+
import '../../styles/docs-shell/footer-link.css'
|
|
6
|
+
|
|
7
|
+
let { href, disabled, class: className, children }: {
|
|
8
|
+
href?: string
|
|
9
|
+
disabled?: boolean
|
|
10
|
+
class?: string
|
|
11
|
+
children?: Snippet
|
|
12
|
+
} = $props()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Link {href} {disabled} class={className}>
|
|
16
|
+
<span>{@render children?.()}{#if href?.startsWith('http') && !disabled}<span class="ui-footer-link-mark" aria-hidden="true"><IconArrowUpRight size={10} stroke={1.5} /></span>{/if}</span>
|
|
17
|
+
</Link>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
import '@master/internal-site/styles/interface.css'
|
|
3
|
+
import '@master/internal-site/styles/system/pagehead.css'
|
|
4
|
+
import '@master/internal-site/styles/system/search-trigger.css'
|
|
2
5
|
import '../../styles/docs-shell/not-found.css'
|
|
3
6
|
import { siteOf } from '../../astro/site-context'
|
|
4
7
|
import SearchButton from './SearchButton.svelte'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
import '
|
|
2
|
+
import '@master/internal-site/styles/system/disclosure.css'
|
|
3
|
+
import '../../styles/system/toc.css'
|
|
3
4
|
import type { PageContentItem } from './page-content.svelte'
|
|
4
5
|
import PageContentTitle from './PageContentTitle.svelte'
|
|
5
6
|
import groupPageContent from '../utils/group-page-content'
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
+
import '@master/internal-site/styles/system/toc.css'
|
|
10
|
+
|
|
9
11
|
import Link from './Link.svelte'
|
|
10
12
|
import PageContentTitle from './PageContentTitle.svelte'
|
|
11
13
|
import { usePageContent, type PageContentItem } from './page-content.svelte'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import '@master/internal-site/styles/interface.css'
|
|
3
|
+
import '@master/internal-site/styles/system/search-trigger.css'
|
|
4
|
+
|
|
2
5
|
import type { Snippet } from 'svelte'
|
|
3
6
|
import type { HTMLButtonAttributes } from 'svelte/elements'
|
|
4
7
|
import IconSearch from '@tabler/icons-svelte-runes/icons/search'
|