igniteui-astro-components 0.0.27 → 0.0.29
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 +82 -74
- package/package.json +16 -2
- package/src/assets/images/anatomy-test.png +0 -0
- package/src/components/CopyCode/CopyCode.astro +21 -7
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +33 -21
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +44 -43
- package/src/components/DocsBreadcrumb/README.md +10 -14
- package/src/components/DocsSidebar/DocsSidebar.astro +47 -45
- package/src/components/DocsSidebar/DocsSidebar.scss +120 -122
- package/src/components/DocsSidebar/README.md +25 -21
- package/src/components/DocsSidebar/SidebarFilterInput.astro +24 -29
- package/src/components/DocsSidebar/SidebarFilterInput.scss +90 -89
- package/src/components/DocsSidebar/SidebarLabel.astro +35 -26
- package/src/components/DocsSidebar/sidebar-filter.ts +93 -56
- package/src/components/DocsSubHeader/DocsSubHeader.astro +256 -195
- package/src/components/DocsSubHeader/DocsSubHeader.scss +181 -178
- package/src/components/DocsSubHeader/README.md +18 -16
- package/src/components/DocsToc/DocsToc.astro +301 -280
- package/src/components/DocsToc/DocsToc.scss +20 -21
- package/src/components/DocsToc/README.md +11 -9
- package/src/components/DocsToc/toTreeNodes.ts +3 -8
- package/src/components/DocsTree/DocsTree.astro +32 -20
- package/src/components/DocsTree/DocsTreeItem.astro +35 -30
- package/src/components/DocsTree/README.md +16 -15
- package/src/components/DocsTree/docs-tree.scss +267 -268
- package/src/components/GlobalFooter/GlobalFooter.astro +10 -10
- package/src/components/GlobalFooter/README.md +3 -2
- package/src/components/GlobalNavBar/GlobalNavBar.astro +4 -2
- package/src/components/GlobalNavBar/GlobalNavBar.module.scss +222 -222
- package/src/components/GlobalNavBar/README.md +3 -2
- package/src/components/LicenseIndicator/LicenseIndicator.astro +7 -5
- package/src/components/LicenseIndicator/LicenseIndicator.scss +3 -3
- package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +16 -17
- package/src/components/MobileSidebarToggle/README.md +3 -2
- package/src/components/MobileTocToggle/MobileTocToggle.astro +75 -61
- package/src/components/MobileTocToggle/MobileTocToggle.scss +65 -59
- package/src/components/Search/README.md +1 -0
- package/src/components/Search/Search.astro +137 -109
- package/src/components/Search/Search.scss +20 -20
- package/src/components/SearchAdvanced/README.md +21 -15
- package/src/components/SearchAdvanced/SearchAdvanced.astro +205 -133
- package/src/components/SearchAdvanced/SearchAdvanced.scss +152 -153
- package/src/components/mdx/Anatomy/Anatomy.astro +51 -0
- package/src/components/mdx/Anatomy/Anatomy.scss +40 -0
- package/src/components/mdx/ApiLink/ApiLink.astro +133 -113
- package/src/components/mdx/ApiLink/ApiLink.scss +9 -9
- package/src/components/mdx/ApiLink/README.md +26 -22
- package/src/components/mdx/ApiLink/api-link-index.ts +196 -173
- package/src/components/mdx/ApiRef/ApiRef.astro +54 -51
- package/src/components/mdx/ApiRef/README.md +20 -15
- package/src/components/mdx/Badge/Badge.astro +14 -14
- package/src/components/mdx/Badge/Badge.scss +61 -56
- package/src/components/mdx/Badge/README.md +24 -19
- package/src/components/mdx/DocsAside/DocsAside.astro +30 -37
- package/src/components/mdx/DocsAside/DocsAside.scss +82 -82
- package/src/components/mdx/DocsAside/README.md +22 -22
- package/src/components/mdx/Faq/Faq.astro +86 -0
- package/src/components/mdx/Faq/Faq.scss +105 -0
- package/src/components/mdx/Faq/FaqItem.astro +117 -0
- package/src/components/mdx/Faq/README.md +223 -0
- package/src/components/mdx/Faq/types.ts +34 -0
- package/src/components/mdx/PlatformBlock/PlatformBlock.astro +3 -2
- package/src/components/mdx/PlatformBlock/README.md +6 -8
- package/src/components/mdx/Sample/README.md +21 -16
- package/src/components/mdx/Sample/Sample.astro +97 -74
- package/src/components/mdx/Sample/Sample.scss +132 -132
- package/src/content-helper.ts +71 -72
- package/src/content.config.ts +1 -6
- package/src/integration.ts +566 -512
- package/src/layouts/DocsLayout/DocsLayout.astro +228 -182
- package/src/layouts/DocsLayout/DocsLayout.scss +261 -261
- package/src/layouts/DocsLayout/README.md +24 -35
- package/src/lib/nav-helpers.ts +88 -82
- package/src/lib/types.ts +76 -76
- package/src/llms.ts +205 -166
- package/src/platform.ts +312 -162
- package/src/plugins/rehype-heading-anchors.ts +45 -45
- package/src/plugins/rehype-pagefind-ignore.ts +19 -19
- package/src/plugins/rehype-table-wrapper.ts +30 -30
- package/src/plugins/remark-docfx.ts +12 -0
- package/src/plugins/remark-env-vars.ts +12 -4
- package/src/plugins/remark-md-links.ts +10 -4
- package/src/scripts/icon-manifest.ts +13 -5
- package/src/scripts/sample-widget.ts +557 -501
- package/src/sidebar.ts +103 -97
- package/src/styles/global/_code-blocks.scss +43 -44
- package/src/styles/global/_component-themes.scss +151 -153
- package/src/styles/global/_icon-gallery.scss +81 -81
- package/src/styles/global/_index.scss +0 -1
- package/src/styles/global/_markdown.scss +816 -787
- package/src/styles/global/_palette.scss +456 -110
- package/src/styles/global/_search-shared.scss +402 -398
- package/src/styles/global/_type-scale.scss +127 -127
- package/src/styles/global/_variables.scss +138 -111
- package/src/styles/theme.scss +41 -41
- package/src/virtual-modules.d.ts +11 -2
|
@@ -8,7 +8,6 @@ import DocsSubHeader from '../../components/DocsSubHeader/DocsSubHeader.astro';
|
|
|
8
8
|
import DocsBreadcrumb from '../../components/DocsBreadcrumb/DocsBreadcrumb.astro';
|
|
9
9
|
import LicenseIndicator from '../../components/LicenseIndicator/LicenseIndicator.astro';
|
|
10
10
|
import igLogoRaw from '../../assets/ig-logo.svg?raw';
|
|
11
|
-
import MobileSidebarToggle from '../../components/MobileSidebarToggle/MobileSidebarToggle.astro';
|
|
12
11
|
import CopyCode from '../../components/CopyCode/CopyCode.astro';
|
|
13
12
|
import { platform as virtualPlatform } from 'virtual:docs-template/nav-html';
|
|
14
13
|
import { title as siteTitle, headEntries, navLang } from 'virtual:docs-template/site-meta';
|
|
@@ -53,179 +52,218 @@ export interface Props {
|
|
|
53
52
|
themeStorageKey?: string;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
const {
|
|
55
|
+
const {
|
|
56
|
+
title,
|
|
57
|
+
description,
|
|
58
|
+
keywords,
|
|
59
|
+
hasToc = true,
|
|
60
|
+
hasSidebar = true,
|
|
61
|
+
currentSlug = '',
|
|
62
|
+
siteTitle: siteTitleProp,
|
|
63
|
+
license,
|
|
64
|
+
is404 = false,
|
|
65
|
+
packages,
|
|
66
|
+
selectedPackage,
|
|
67
|
+
packageLabel,
|
|
68
|
+
versions,
|
|
69
|
+
selectedVersion,
|
|
70
|
+
versionLabel,
|
|
71
|
+
showThemeToggle,
|
|
72
|
+
themeStorageKey,
|
|
73
|
+
} = Astro.props;
|
|
57
74
|
const resolvedSiteTitle = siteTitleProp ?? siteTitle;
|
|
58
75
|
const licenseType = license === 'commercial' ? 'premium' : license === 'MIT' ? 'opensource' : false;
|
|
59
76
|
const navTheme = (virtualPlatform ?? import.meta.env.VITE_NAV_THEME ?? 'igniteui') as string;
|
|
60
77
|
const showGlobalNav = navTheme !== 'none';
|
|
61
78
|
const pageTitle = title ? `${title} | ${resolvedSiteTitle}` : resolvedSiteTitle;
|
|
62
79
|
|
|
63
|
-
type HeadEntry = {
|
|
80
|
+
type HeadEntry = {
|
|
81
|
+
tag: string;
|
|
82
|
+
attrs?: Record<string, string | boolean | undefined>;
|
|
83
|
+
content?: string;
|
|
84
|
+
};
|
|
64
85
|
---
|
|
65
86
|
|
|
66
|
-
<!
|
|
67
|
-
<html
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
var stored;
|
|
85
|
-
try { stored = localStorage.getItem('docs-theme'); } catch (_) {}
|
|
86
|
-
document.documentElement.setAttribute('data-theme', stored || 'light');
|
|
87
|
+
<!doctype html>
|
|
88
|
+
<html
|
|
89
|
+
lang="en"
|
|
90
|
+
data-theme="light"
|
|
91
|
+
style={!showGlobalNav ? '--docs-global-nav-height: 0' : undefined}
|
|
92
|
+
>
|
|
93
|
+
<head>
|
|
94
|
+
<meta charset="UTF-8" />
|
|
95
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
96
|
+
<title>{pageTitle}</title>
|
|
97
|
+
{description && <meta name="description" content={description} />}
|
|
98
|
+
{keywords && <meta name="keywords" content={keywords} />}
|
|
99
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
100
|
+
<link rel="stylesheet" href="https://use.typekit.net/bng2zgw.css" />
|
|
101
|
+
{
|
|
102
|
+
(headEntries as HeadEntry[]).map(({ tag: Tag, attrs = {}, content }) =>
|
|
103
|
+
content ? <Tag {...attrs} set:html={content} /> : <Tag {...attrs} />,
|
|
104
|
+
)
|
|
87
105
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
document.addEventListener('astro:before-swap', function () {
|
|
99
|
-
document.documentElement.style.removeProperty('scroll-behavior');
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// Root cause: Sample.astro SSR-renders an <igc-tab selected>. During Astro's
|
|
103
|
-
// client-side swap, <igc-tabs> connects and Lit runs firstUpdated() after
|
|
104
|
-
// Astro's moveToLocation() has already called scrollTo(0,0), but before
|
|
105
|
-
// astro:page-load. IgcTabsComponent then applies the selected tab and calls
|
|
106
|
-
// scrollIntoView() for its tab header, which can move the page down to the
|
|
107
|
-
// sample widget.
|
|
108
|
-
//
|
|
109
|
-
// Re-apply scroll-to-top on astro:page-load inside rAF, after Lit microtasks
|
|
110
|
-
// and selected-tab scrollIntoView() have settled. Do not override hash
|
|
111
|
-
// navigation, because hash fragments should keep their anchor behavior.
|
|
112
|
-
document.addEventListener('astro:page-load', function () {
|
|
113
|
-
if (!location.hash) {
|
|
114
|
-
requestAnimationFrame(function () {
|
|
115
|
-
if (!location.hash && window.scrollY > 0) {
|
|
116
|
-
window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
|
|
117
|
-
}
|
|
118
|
-
});
|
|
106
|
+
<slot name="head" />
|
|
107
|
+
<ClientRouter />
|
|
108
|
+
<script is:inline>
|
|
109
|
+
// Restore persisted theme (or default to light) on load and after every View Transitions swap
|
|
110
|
+
function applyStoredTheme() {
|
|
111
|
+
var stored;
|
|
112
|
+
try {
|
|
113
|
+
stored = localStorage.getItem('docs-theme');
|
|
114
|
+
} catch (_) {}
|
|
115
|
+
document.documentElement.setAttribute('data-theme', stored || 'light');
|
|
119
116
|
}
|
|
120
|
-
|
|
117
|
+
applyStoredTheme();
|
|
118
|
+
document.addEventListener('astro:after-swap', applyStoredTheme);
|
|
121
119
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
style.setAttribute('data-vt-preserved', String(++_styleIndex));
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
new MutationObserver(function (mutations) {
|
|
135
|
-
mutations.forEach(function (m) {
|
|
136
|
-
m.addedNodes.forEach(function (node) {
|
|
137
|
-
if (node instanceof HTMLStyleElement) tagStyle(node);
|
|
138
|
-
});
|
|
120
|
+
// Enable smooth scrolling only after the page is fully loaded so the
|
|
121
|
+
// browser's scroll-position restoration on refresh is instant (no visible
|
|
122
|
+
// animated scroll). Remove it before a View Transition swap so navigation
|
|
123
|
+
// between pages is also instant, then re-enable after the new page loads.
|
|
124
|
+
document.addEventListener('astro:page-load', function () {
|
|
125
|
+
document.documentElement.style.scrollBehavior = 'smooth';
|
|
126
|
+
});
|
|
127
|
+
document.addEventListener('astro:before-swap', function () {
|
|
128
|
+
document.documentElement.style.removeProperty('scroll-behavior');
|
|
139
129
|
});
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
130
|
+
|
|
131
|
+
// Root cause: Sample.astro SSR-renders an <igc-tab selected>. During Astro's
|
|
132
|
+
// client-side swap, <igc-tabs> connects and Lit runs firstUpdated() after
|
|
133
|
+
// Astro's moveToLocation() has already called scrollTo(0,0), but before
|
|
134
|
+
// astro:page-load. IgcTabsComponent then applies the selected tab and calls
|
|
135
|
+
// scrollIntoView() for its tab header, which can move the page down to the
|
|
136
|
+
// sample widget.
|
|
137
|
+
//
|
|
138
|
+
// Re-apply scroll-to-top on astro:page-load inside rAF, after Lit microtasks
|
|
139
|
+
// and selected-tab scrollIntoView() have settled. Do not override hash
|
|
140
|
+
// navigation, because hash fragments should keep their anchor behavior.
|
|
141
|
+
document.addEventListener('astro:page-load', function () {
|
|
142
|
+
if (!location.hash) {
|
|
143
|
+
requestAnimationFrame(function () {
|
|
144
|
+
if (!location.hash && window.scrollY > 0) {
|
|
145
|
+
window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
|
|
146
|
+
}
|
|
147
|
+
});
|
|
146
148
|
}
|
|
147
149
|
});
|
|
148
|
-
});
|
|
149
150
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
// Preserve dynamically-injected <style> tags across View Transitions.
|
|
152
|
+
// Only styles added by JS at runtime (e.g. the IG nav widget) need
|
|
153
|
+
// preserving — Astro re-injects its own component styles on every page
|
|
154
|
+
// automatically. Tagging the initial styles caused duplicates: the
|
|
155
|
+
// preserved copy + the freshly-injected copy from the new page.
|
|
156
|
+
var _styleIndex = 0;
|
|
157
|
+
function tagStyle(style) {
|
|
158
|
+
var isAstroStyle = Array.from(style.attributes).some(function (a) {
|
|
159
|
+
return a.name.startsWith('data-astro');
|
|
160
|
+
});
|
|
161
|
+
if (!isAstroStyle && !style.hasAttribute('data-vt-preserved')) {
|
|
162
|
+
style.setAttribute('data-vt-preserved', String(++_styleIndex));
|
|
163
|
+
}
|
|
158
164
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
+
new MutationObserver(function (mutations) {
|
|
166
|
+
mutations.forEach(function (m) {
|
|
167
|
+
m.addedNodes.forEach(function (node) {
|
|
168
|
+
if (node instanceof HTMLStyleElement) tagStyle(node);
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}).observe(document.head, { childList: true });
|
|
172
|
+
document.addEventListener('astro:before-swap', function (e) {
|
|
173
|
+
document.head.querySelectorAll('style[data-vt-preserved]').forEach(function (style) {
|
|
174
|
+
var id = style.getAttribute('data-vt-preserved');
|
|
175
|
+
if (!e.newDocument.head.querySelector('style[data-vt-preserved="' + id + '"]')) {
|
|
176
|
+
e.newDocument.head.appendChild(style.cloneNode(true));
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
165
180
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
var rafId = 0;
|
|
177
|
-
function update() {
|
|
178
|
-
var sidebarTop = sidebar.getBoundingClientRect().top;
|
|
179
|
-
var footerTop = footer.getBoundingClientRect().top;
|
|
180
|
-
// Always clamp to viewport bottom; additionally clamp to footer
|
|
181
|
-
// top when the footer is on screen.
|
|
182
|
-
var maxH = Math.max(0, window.innerHeight - sidebarTop);
|
|
183
|
-
if (footerTop < window.innerHeight) {
|
|
184
|
-
maxH = Math.max(0, Math.min(maxH, footerTop - sidebarTop));
|
|
181
|
+
function updateNavHeight() {
|
|
182
|
+
var navChild = document.querySelector(
|
|
183
|
+
'[data-astro-transition-persist="global-nav-bar"] > *:first-child',
|
|
184
|
+
);
|
|
185
|
+
if (!navChild) return;
|
|
186
|
+
var h = navChild.getBoundingClientRect().height;
|
|
187
|
+
if (h > 0) {
|
|
188
|
+
document.documentElement.style.setProperty('--docs-global-nav-height', h + 'px');
|
|
189
|
+
var wrapper = document.querySelector('[data-nav-height-wrapper]');
|
|
190
|
+
if (wrapper) wrapper.style.setProperty('--docs-global-nav-height', h + 'px');
|
|
185
191
|
}
|
|
186
|
-
var next = maxH + 'px';
|
|
187
|
-
if (sidebar.style.maxHeight !== next) sidebar.style.maxHeight = next;
|
|
188
|
-
}
|
|
189
|
-
function schedule() {
|
|
190
|
-
if (rafId) return;
|
|
191
|
-
rafId = requestAnimationFrame(function() { update(); rafId = 0; });
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
_cleanupSidebarHeights = function() {
|
|
201
|
-
window.removeEventListener('scroll', schedule);
|
|
202
|
-
window.removeEventListener('resize', schedule);
|
|
203
|
-
ro.disconnect();
|
|
204
|
-
cancelAnimationFrame(rafId);
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
document.addEventListener('astro:page-load', initSidebarHeights);
|
|
208
|
-
initSidebarHeights();
|
|
193
|
+
document.addEventListener('astro:page-load', updateNavHeight);
|
|
194
|
+
window.addEventListener('resize', updateNavHeight);
|
|
195
|
+
updateNavHeight();
|
|
196
|
+
var _navChild = document.querySelector(
|
|
197
|
+
'[data-astro-transition-persist="global-nav-bar"] > *:first-child',
|
|
198
|
+
);
|
|
199
|
+
if (_navChild) new ResizeObserver(updateNavHeight).observe(_navChild);
|
|
209
200
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
201
|
+
// Clamp sidebar height so it never overlaps the footer.
|
|
202
|
+
// Uses the direct-child footer of .igd-page-layout to avoid matching
|
|
203
|
+
// any example/demo footers rendered inside page content (e.g. /nav-bar).
|
|
204
|
+
var _cleanupSidebarHeights;
|
|
205
|
+
function initSidebarHeights() {
|
|
206
|
+
if (_cleanupSidebarHeights) _cleanupSidebarHeights();
|
|
207
|
+
var footer = document.querySelector('.igd-page-layout > [data-igd-footer]');
|
|
208
|
+
if (!footer) return;
|
|
209
|
+
var sidebar = document.querySelector('.docs-sidebar');
|
|
210
|
+
if (!sidebar) return;
|
|
211
|
+
var rafId = 0;
|
|
214
212
|
function update() {
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
var sidebarTop = sidebar.getBoundingClientRect().top;
|
|
214
|
+
var footerTop = footer.getBoundingClientRect().top;
|
|
215
|
+
// Always clamp to viewport bottom; additionally clamp to footer
|
|
216
|
+
// top when the footer is on screen.
|
|
217
|
+
var maxH = Math.max(0, window.innerHeight - sidebarTop);
|
|
218
|
+
if (footerTop < window.innerHeight) {
|
|
219
|
+
maxH = Math.max(0, Math.min(maxH, footerTop - sidebarTop));
|
|
220
|
+
}
|
|
221
|
+
var next = maxH + 'px';
|
|
222
|
+
if (sidebar.style.maxHeight !== next) sidebar.style.maxHeight = next;
|
|
217
223
|
}
|
|
218
|
-
|
|
224
|
+
function schedule() {
|
|
225
|
+
if (rafId) return;
|
|
226
|
+
rafId = requestAnimationFrame(function () {
|
|
227
|
+
update();
|
|
228
|
+
rafId = 0;
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
window.addEventListener('scroll', schedule, { passive: true });
|
|
232
|
+
// ResizeObserver covers content-driven layout changes; the resize event
|
|
233
|
+
// covers viewport-only changes such as DevTools docking/undocking.
|
|
234
|
+
window.addEventListener('resize', schedule, { passive: true });
|
|
235
|
+
var ro = new ResizeObserver(schedule);
|
|
236
|
+
ro.observe(footer);
|
|
219
237
|
update();
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
238
|
+
_cleanupSidebarHeights = function () {
|
|
239
|
+
window.removeEventListener('scroll', schedule);
|
|
240
|
+
window.removeEventListener('resize', schedule);
|
|
241
|
+
ro.disconnect();
|
|
242
|
+
cancelAnimationFrame(rafId);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
document.addEventListener('astro:page-load', initSidebarHeights);
|
|
246
|
+
initSidebarHeights();
|
|
247
|
+
|
|
248
|
+
// Toggle data-scrolled-y / data-scrolled-x on each .igd-table-wrapper
|
|
249
|
+
// so the sticky header/column can show a double border while scrolled.
|
|
250
|
+
function initTableScrollStates() {
|
|
251
|
+
document.querySelectorAll('.igd-table-wrapper').forEach(function (wrapper) {
|
|
252
|
+
function update() {
|
|
253
|
+
wrapper.toggleAttribute('data-scrolled-y', wrapper.scrollTop > 0);
|
|
254
|
+
wrapper.toggleAttribute('data-scrolled-x', wrapper.scrollLeft > 0);
|
|
255
|
+
}
|
|
256
|
+
wrapper.addEventListener('scroll', update, { passive: true });
|
|
257
|
+
update();
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
document.addEventListener('astro:page-load', initTableScrollStates);
|
|
261
|
+
initTableScrollStates();
|
|
262
|
+
</script>
|
|
263
|
+
</head>
|
|
264
|
+
<body>
|
|
227
265
|
<!-- INFRAGISTICS HEADER/NAVIGATION -->
|
|
228
|
-
{
|
|
266
|
+
{showGlobalNav && <GlobalNavBar lang={navLang} />}
|
|
229
267
|
|
|
230
268
|
<!-- MAIN PAGE GRID LAYOUT -->
|
|
231
269
|
<!-- We don't set the CSS grid directly to the body -->
|
|
@@ -237,45 +275,53 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
|
|
|
237
275
|
Any igc component rendered dynamically on body level should have .ig-typography in order to have proper type styles.
|
|
238
276
|
-->
|
|
239
277
|
<div class={`igd-page-layout${is404 ? ' igd-page-layout--404' : ''}`}>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
278
|
+
<!-- TODO: WE DONT NEED TO CALCULAtE THE IG HEADER HEIGHT ANYMORE - REMOVE IT -->
|
|
279
|
+
<!-- <DocsSubHeader style={ `--docs-global-nav-height: ${ showGlobalNav ? '4.7rem': '0' }` } data-nav-height-wrapper/> -->
|
|
280
|
+
<slot name="subheader">
|
|
281
|
+
<DocsSubHeader
|
|
282
|
+
pageTitle={title}
|
|
283
|
+
currentSlug={currentSlug}
|
|
284
|
+
siteTitle={siteTitleProp}
|
|
285
|
+
packages={packages}
|
|
286
|
+
selectedPackage={selectedPackage}
|
|
287
|
+
packageLabel={packageLabel}
|
|
288
|
+
versions={versions}
|
|
289
|
+
selectedVersion={selectedVersion}
|
|
290
|
+
versionLabel={versionLabel}
|
|
291
|
+
showThemeToggle={showThemeToggle}
|
|
292
|
+
themeStorageKey={themeStorageKey}
|
|
293
|
+
/>
|
|
294
|
+
</slot>
|
|
245
295
|
|
|
296
|
+
{hasSidebar && <slot name="sidebar" />}
|
|
246
297
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<slot name="sidebar"/>
|
|
250
|
-
) }
|
|
298
|
+
<!-- Mobile TOC trigger row — only visible on mobile, provided by the page -->
|
|
299
|
+
<slot name="mobile-toc" />
|
|
251
300
|
|
|
252
|
-
|
|
253
|
-
<
|
|
301
|
+
<div class="igd-main-content">
|
|
302
|
+
<div class="igd-main-content__inner">
|
|
303
|
+
<div class="igd-main-content__page">
|
|
304
|
+
<main class="igd-main-content__markdown" data-pagefind-body>
|
|
305
|
+
<Fragment set:html={igLogoRaw} />
|
|
306
|
+
<LicenseIndicator license={licenseType} />
|
|
307
|
+
<DocsBreadcrumb
|
|
308
|
+
pageTitle={title}
|
|
309
|
+
currentSlug={currentSlug}
|
|
310
|
+
siteTitle={siteTitleProp}
|
|
311
|
+
/>
|
|
312
|
+
<slot />
|
|
313
|
+
</main>
|
|
314
|
+
</div>
|
|
254
315
|
|
|
255
|
-
|
|
256
|
-
<div class="igd-main-content__inner">
|
|
257
|
-
|
|
258
|
-
<div class="igd-main-content__page">
|
|
259
|
-
<main class="igd-main-content__markdown" data-pagefind-body>
|
|
260
|
-
<Fragment set:html={igLogoRaw} />
|
|
261
|
-
<LicenseIndicator license={licenseType} />
|
|
262
|
-
<DocsBreadcrumb pageTitle={ title } currentSlug={ currentSlug } siteTitle={ siteTitleProp }/>
|
|
263
|
-
<slot/>
|
|
264
|
-
</main>
|
|
265
|
-
</div>
|
|
266
|
-
|
|
267
|
-
{ hasToc && (
|
|
268
|
-
<slot name="toc"/>
|
|
269
|
-
) }
|
|
270
|
-
</div>
|
|
316
|
+
{hasToc && <slot name="toc" />}
|
|
271
317
|
</div>
|
|
318
|
+
</div>
|
|
272
319
|
|
|
273
|
-
|
|
320
|
+
<CopyCode />
|
|
274
321
|
|
|
275
|
-
|
|
322
|
+
<!-- Footer is inside the grid so the sidebar's sticky containing block extends through it.
|
|
276
323
|
The JS initSidebarHeights() clamps sidebar max-height to prevent visual overlap. -->
|
|
277
|
-
|
|
324
|
+
<GlobalFooter lang={navLang} />
|
|
278
325
|
</div>
|
|
279
|
-
</body>
|
|
326
|
+
</body>
|
|
280
327
|
</html>
|
|
281
|
-
|