igniteui-astro-components 0.0.18 → 0.0.20

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.
Files changed (48) hide show
  1. package/package.json +1 -1
  2. package/src/assets/icons/{chatGPT,.svg → chatgpt.svg} +0 -1
  3. package/src/assets/ig-logo.svg +1 -1
  4. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +1 -3
  5. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +12 -3
  6. package/src/components/DocsSidebar/DocsSidebar.astro +26 -7
  7. package/src/components/DocsSidebar/DocsSidebar.scss +35 -28
  8. package/src/components/DocsSidebar/SidebarFilterInput.astro +2 -2
  9. package/src/components/DocsSidebar/SidebarFilterInput.scss +76 -51
  10. package/src/components/DocsSidebar/sidebar-filter.ts +3 -18
  11. package/src/components/DocsSubHeader/DocsSubHeader.astro +93 -114
  12. package/src/components/DocsSubHeader/DocsSubHeader.scss +69 -121
  13. package/src/components/DocsToc/DocsToc.astro +14 -10
  14. package/src/components/DocsToc/DocsToc.scss +7 -5
  15. package/src/components/DocsTree/docs-tree.scss +125 -54
  16. package/src/components/GlobalFooter/GlobalFooter.module.scss +1 -1
  17. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +1 -3
  18. package/src/components/Search/Search.astro +57 -23
  19. package/src/components/Search/Search.scss +15 -21
  20. package/src/components/SearchAdvanced/SearchAdvanced.astro +64 -49
  21. package/src/components/SearchAdvanced/SearchAdvanced.scss +22 -30
  22. package/src/components/mdx/ApiLink/ApiLink.astro +90 -149
  23. package/src/components/mdx/ApiLink/README.md +75 -73
  24. package/src/components/mdx/ApiLink/api-link-index.ts +223 -0
  25. package/src/components/mdx/DocsAside/DocsAside.scss +10 -14
  26. package/src/layouts/DocsLayout/DocsLayout.astro +5 -5
  27. package/src/layouts/DocsLayout/DocsLayout.scss +58 -97
  28. package/src/lib/types.ts +21 -7
  29. package/src/scripts/icon-manifest.ts +73 -0
  30. package/src/scripts/icon-registry.ts +4 -35
  31. package/src/styles/global/_breakpoints.scss +0 -1
  32. package/src/styles/global/_code-blocks.scss +1 -0
  33. package/src/styles/global/_component-themes.scss +133 -125
  34. package/src/styles/global/_icon-gallery.scss +108 -0
  35. package/src/styles/global/_index.scss +1 -0
  36. package/src/styles/global/_markdown.scss +127 -16
  37. package/src/styles/global/_palette.scss +101 -101
  38. package/src/styles/global/_search-shared.scss +302 -315
  39. package/src/styles/global/_type-scale.scss +17 -17
  40. package/src/styles/global/_variables.scss +15 -6
  41. package/src/styles/theme.scss +7 -61
  42. package/src/assets/icons/classes.svg +0 -3
  43. package/src/assets/icons/enumerations.svg +0 -3
  44. package/src/assets/icons/functions.svg +0 -5
  45. package/src/assets/icons/interfaces.svg +0 -3
  46. package/src/assets/icons/type-alias.svg +0 -3
  47. package/src/assets/icons/variables.svg +0 -3
  48. /package/src/assets/icons/{palette,.svg → palette.svg} +0 -0
@@ -0,0 +1,223 @@
1
+ import type { ApiPackageConfig, PlatformContext } from '../../../lib/types';
2
+
3
+ export type ApiKind = 'class' | 'interface' | 'enum' | 'type' | 'variable' | 'function' | 'sass';
4
+ export type TypeDocKind = Exclude<ApiKind, 'sass'>;
5
+
6
+ export const KIND_SEGMENT: Record<TypeDocKind, string> = {
7
+ class: 'classes',
8
+ interface: 'interfaces',
9
+ enum: 'enums',
10
+ type: 'types',
11
+ variable: 'variables',
12
+ function: 'functions',
13
+ };
14
+
15
+ type ApiLinkIndexSymbol = {
16
+ /** Package id. */
17
+ p?: string;
18
+ /** URL. */
19
+ u: string;
20
+ /** Kind. */
21
+ k?: TypeDocKind;
22
+ /** Member name to anchor map. */
23
+ m?: Record<string, string>;
24
+ };
25
+
26
+ type ApiLinkIndexFile = {
27
+ symbols?: Record<string, ApiLinkIndexSymbol | ApiLinkIndexSymbol[]>;
28
+ };
29
+
30
+ export type ApiLinkIndexResolution =
31
+ | { status: 'resolved'; url: string; symbolName: string; memberName: string; memberAnchor: string }
32
+ | { status: 'ambiguous'; candidate: string }
33
+ | { status: 'member-missing'; candidate: string }
34
+ | { status: 'missing' }
35
+ | { status: 'unavailable' };
36
+
37
+ const upperFirst = (value: string) => value ? value.charAt(0).toUpperCase() + value.slice(1) : value;
38
+
39
+ function buildCandidateNames(options: {
40
+ type: string;
41
+ explicitKind?: TypeDocKind;
42
+ prefix: string;
43
+ prefixed: boolean;
44
+ suffix: boolean;
45
+ classSuffix?: string;
46
+ }): string[] {
47
+ const candidates = new Set<string>();
48
+ const baseNames = new Set<string>();
49
+
50
+ if (options.prefixed) baseNames.add(`${options.prefix}${options.type}`);
51
+ baseNames.add(options.type);
52
+
53
+ for (const baseName of baseNames) {
54
+ if ((!options.explicitKind || options.explicitKind === 'class') && options.suffix && options.classSuffix) {
55
+ candidates.add(`${baseName}${options.classSuffix}`);
56
+ }
57
+ candidates.add(baseName);
58
+ }
59
+
60
+ return [...candidates];
61
+ }
62
+
63
+ function resolveIndexedMember(symbol: ApiLinkIndexSymbol, member: string | undefined): { memberName: string; memberAnchor: string } | null {
64
+ if (!member) return { memberName: '', memberAnchor: '' };
65
+
66
+ const members = symbol.m ?? {};
67
+ const candidates = new Set([member, upperFirst(member), member.toLowerCase()]);
68
+
69
+ for (const candidate of candidates) {
70
+ if (Object.hasOwn(members, candidate)) {
71
+ return { memberName: candidate, memberAnchor: members[candidate] };
72
+ }
73
+ }
74
+
75
+ const normalized = member.toLowerCase();
76
+ for (const [registryMember, memberAnchor] of Object.entries(members)) {
77
+ if (registryMember.toLowerCase() === normalized) {
78
+ return { memberName: registryMember, memberAnchor };
79
+ }
80
+ }
81
+
82
+ return null;
83
+ }
84
+
85
+ function findIndexedSymbol(options: {
86
+ index: ApiLinkIndexFile;
87
+ candidates: string[];
88
+ packageId?: string;
89
+ explicitKind?: TypeDocKind;
90
+ member?: string;
91
+ }): { name: string; symbol: ApiLinkIndexSymbol; memberName: string; memberAnchor: string } | { ambiguous: true; candidate: string } | { memberMissing: true; candidate: string } | null {
92
+ const symbols = options.index.symbols ?? {};
93
+ let ambiguity: { ambiguous: true; candidate: string } | null = null;
94
+ let memberMissing: { memberMissing: true; candidate: string } | null = null;
95
+
96
+ for (const name of options.candidates) {
97
+ const value = symbols[name];
98
+ if (!value) continue;
99
+
100
+ const symbolList = Array.isArray(value) ? value : [value];
101
+ const matches = new Map<string, {
102
+ name: string;
103
+ symbol: ApiLinkIndexSymbol;
104
+ memberName: string;
105
+ memberAnchor: string;
106
+ }>();
107
+ let matchedSymbol = false;
108
+
109
+ for (const symbol of symbolList) {
110
+ if (options.packageId && symbol.p !== options.packageId) continue;
111
+ if (options.explicitKind && symbol.k !== options.explicitKind) continue;
112
+ matchedSymbol = true;
113
+ const memberMatch = resolveIndexedMember(symbol, options.member);
114
+ if (memberMatch === null) continue;
115
+
116
+ const key = `${symbol.u}#${memberMatch.memberAnchor}`;
117
+ matches.set(key, {
118
+ name,
119
+ symbol,
120
+ memberName: memberMatch.memberName,
121
+ memberAnchor: memberMatch.memberAnchor,
122
+ });
123
+ }
124
+
125
+ if (matches.size === 1) {
126
+ return matches.values().next().value!;
127
+ }
128
+ if (matches.size > 1 && !ambiguity) {
129
+ ambiguity = { ambiguous: true, candidate: name };
130
+ }
131
+ if (matches.size === 0 && matchedSymbol && options.member && !memberMissing) {
132
+ memberMissing = { memberMissing: true, candidate: name };
133
+ }
134
+ }
135
+
136
+ return ambiguity ?? memberMissing;
137
+ }
138
+
139
+ function absolutizeIndexUrl(indexedPath: string, docRoot: string): string {
140
+ if (!indexedPath.startsWith('/')) return indexedPath;
141
+
142
+ try {
143
+ return `${new URL(docRoot).origin}${indexedPath}`;
144
+ } catch {
145
+ return indexedPath;
146
+ }
147
+ }
148
+
149
+ function getCandidateClassSuffixes(options: {
150
+ ctx: PlatformContext;
151
+ explicitPkg: boolean;
152
+ pkgConfig: ApiPackageConfig;
153
+ }): Array<string | undefined> {
154
+ if (options.explicitPkg) {
155
+ return [options.pkgConfig.classSuffix];
156
+ }
157
+
158
+ const suffixes = new Set<string | undefined>();
159
+ for (const pkg of Object.values(options.ctx.apiPackages)) {
160
+ suffixes.add(pkg.classSuffix);
161
+ }
162
+
163
+ // Put undefined (no suffix) last so suffixed names are tried first.
164
+ return [...suffixes].sort((a, b) => (a === undefined ? 1 : b === undefined ? -1 : 0));
165
+ }
166
+
167
+ export function resolveApiLinkFromIndex(options: {
168
+ ctx: PlatformContext;
169
+ pkgConfig: ApiPackageConfig;
170
+ explicitPkg: boolean;
171
+ type: string;
172
+ member?: string;
173
+ explicitKind?: TypeDocKind;
174
+ prefix: string;
175
+ prefixed: boolean;
176
+ suffix: boolean;
177
+ }): ApiLinkIndexResolution {
178
+ const index = options.ctx.apiLinkIndex as ApiLinkIndexFile | undefined;
179
+ if (!index?.symbols) {
180
+ return { status: 'unavailable' };
181
+ }
182
+
183
+ const candidates = new Set<string>();
184
+ for (const classSuffix of getCandidateClassSuffixes(options)) {
185
+ for (const candidate of buildCandidateNames({
186
+ type: options.type,
187
+ explicitKind: options.explicitKind,
188
+ prefix: options.prefix,
189
+ prefixed: options.prefixed,
190
+ suffix: options.suffix,
191
+ classSuffix,
192
+ })) {
193
+ candidates.add(candidate);
194
+ }
195
+ }
196
+
197
+ const indexed = findIndexedSymbol({
198
+ index,
199
+ candidates: [...candidates],
200
+ packageId: options.explicitPkg ? options.pkgConfig.packageId : undefined,
201
+ explicitKind: options.explicitKind,
202
+ member: options.member,
203
+ });
204
+
205
+ if (!indexed) return { status: 'missing' };
206
+ if ('ambiguous' in indexed) return { status: 'ambiguous', candidate: indexed.candidate };
207
+ if ('memberMissing' in indexed) return { status: 'member-missing', candidate: indexed.candidate };
208
+
209
+ // Use the resolved symbol's package docRoot when available, so cross-package
210
+ // symbols resolve against the correct origin rather than always core.
211
+ const resolvedDocRoot = (indexed.symbol.p
212
+ ? Object.values(options.ctx.apiPackages).find(pkg => pkg.packageId === indexed.symbol.p)?.docRoot
213
+ : undefined) ?? options.pkgConfig.docRoot;
214
+
215
+ const path = `${indexed.symbol.u}${indexed.memberAnchor ? `#${indexed.memberAnchor}` : ''}`;
216
+ return {
217
+ status: 'resolved',
218
+ url: absolutizeIndexUrl(path, resolvedDocRoot),
219
+ symbolName: indexed.name,
220
+ memberName: indexed.memberName,
221
+ memberAnchor: indexed.memberAnchor,
222
+ };
223
+ }
@@ -24,6 +24,11 @@ blockquote {
24
24
  }
25
25
 
26
26
  .igd-aside__title {
27
+ @include type-style('h5') {
28
+ font-weight: bold;
29
+ margin: 0;
30
+ };
31
+
27
32
  grid-row: 1;
28
33
  grid-column: 2;
29
34
  align-self: center;
@@ -35,6 +40,11 @@ blockquote {
35
40
  }
36
41
 
37
42
  .igd-aside__content {
43
+ @include type-style('body-1') {
44
+ margin: 0;
45
+ font-weight: 400;
46
+ }
47
+
38
48
  grid-column: 2;
39
49
  grid-row: 2;
40
50
 
@@ -97,17 +107,3 @@ blockquote {
97
107
  }
98
108
 
99
109
  // TYPOGRAPHY STYLES
100
- .igd-aside__title {
101
- @include type-style('body-2') {
102
- font-weight: bold;
103
- margin: 0;
104
- };
105
-
106
- }
107
-
108
- .igd-aside__content {
109
- @include type-style('detail-1', false) {
110
- margin: 0;
111
- }
112
- }
113
-
@@ -1,7 +1,5 @@
1
1
  ---
2
2
  import { ClientRouter } from 'astro:transitions';
3
- import '@fontsource-variable/inter/wght.css';
4
- import '@fontsource-variable/inter/wght-italic.css';
5
3
  import '@fontsource-variable/jetbrains-mono/wght.css';
6
4
  import '@fontsource-variable/jetbrains-mono/wght-italic.css';
7
5
  import GlobalNavBar from '../../components/GlobalNavBar/GlobalNavBar.astro';
@@ -9,6 +7,7 @@ import GlobalFooter from '../../components/GlobalFooter/GlobalFooter.astro';
9
7
  import DocsSubHeader from '../../components/DocsSubHeader/DocsSubHeader.astro';
10
8
  import DocsBreadcrumb from '../../components/DocsBreadcrumb/DocsBreadcrumb.astro';
11
9
  import LicenseIndicator from '../../components/LicenseIndicator/LicenseIndicator.astro';
10
+ import igLogoRaw from '../../assets/ig-logo.svg?raw';
12
11
  import MobileSidebarToggle from '../../components/MobileSidebarToggle/MobileSidebarToggle.astro';
13
12
  import CopyCode from '../../components/CopyCode/CopyCode.astro';
14
13
  import { widgetScriptSrc, platform as virtualPlatform } from 'virtual:docs-template/nav-html';
@@ -73,6 +72,7 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
73
72
  {description && <meta name="description" content={description} />}
74
73
  {keywords && <meta name="keywords" content={keywords} />}
75
74
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
75
+ <link rel="stylesheet" href="https://use.typekit.net/bng2zgw.css" />
76
76
  {widgetScriptSrc && <script is:inline src={widgetScriptSrc} async></script>}
77
77
  {(headEntries as HeadEntry[]).map(({ tag: Tag, attrs = {}, content }) =>
78
78
  content ? <Tag {...attrs} set:html={content} /> : <Tag {...attrs} />
@@ -255,8 +255,10 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
255
255
 
256
256
  <div class="igd-main-content">
257
257
  <div class="igd-main-content__inner">
258
+
258
259
  <div class="igd-main-content__page">
259
260
  <main class="igd-main-content__markdown">
261
+ <Fragment set:html={igLogoRaw} />
260
262
  <LicenseIndicator license={licenseType} />
261
263
  <DocsBreadcrumb pageTitle={ title } currentSlug={ currentSlug } siteTitle={ siteTitleProp }/>
262
264
  <slot/>
@@ -264,9 +266,7 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
264
266
  </div>
265
267
 
266
268
  { hasToc && (
267
- <aside>
268
- <slot name="toc"/>
269
- </aside>
269
+ <slot name="toc"/>
270
270
  ) }
271
271
  </div>
272
272
  </div>
@@ -14,6 +14,7 @@
14
14
  background: var(--igd-app-bg);
15
15
  color: var(--igd-on-app-bg);
16
16
  margin: 0;
17
+ position: relative;
17
18
  z-index: 0;
18
19
 
19
20
  &:not(:has(.igd-right-sidebar)) {
@@ -28,6 +29,7 @@
28
29
  .igd-main-content {
29
30
  display: grid;
30
31
  position: relative;
32
+ //background: var(--ig-surface-500);
31
33
 
32
34
  &:not(:has(.igd-right-sidebar)) {
33
35
  .igd-main-pane {
@@ -36,48 +38,6 @@
36
38
  }
37
39
  }
38
40
  }
39
-
40
- // ── Static square grid background ────────────────────────────────────────────
41
- // Pure CSS: two repeating-linear-gradients intersected via mask-composite
42
- // create 4×4px squares at a 35px grid pitch.
43
- // A radial vignette mask (3rd layer) fades them toward the edges.
44
- &::before {
45
- content: '';
46
- position: absolute;
47
- inset: 0;
48
- inset-block-start: 0;
49
- pointer-events: none;
50
- user-select: none;
51
- z-index: 0;
52
-
53
- $pitch: 35px;
54
- $sq: 3px;
55
- $pad: 15.5px;
56
-
57
- background-color: light-dark(var(--ig-gray-500), var(--igd-accent));
58
-
59
- // Two mask layers intersected:
60
- // horizontal-strips ∩ vertical-strips → squares with no edge fade
61
- mask-image:
62
- // 1. Horizontal 4px bands at 35px pitch (repeating-linear 0deg = top-to-bottom)
63
- repeating-linear-gradient(0deg,
64
- transparent 0, transparent #{$pad},
65
- black #{$pad}, black #{$pad + $sq},
66
- transparent #{$pad + $sq}, transparent #{$pitch}
67
- ),
68
- // 2. Vertical 4px bands at 35px pitch (repeating-linear 90deg = left-to-right)
69
- repeating-linear-gradient(90deg,
70
- transparent 0, transparent #{$pad},
71
- black #{$pad}, black #{$pad + $sq},
72
- transparent #{$pad + $sq}, transparent #{$pitch}
73
- );
74
-
75
- mask-size: #{$pitch} #{$pitch}, #{$pitch} #{$pitch};
76
- mask-composite: intersect;
77
- -webkit-mask-composite: source-in;
78
-
79
- opacity: .5;
80
- }
81
41
  }
82
42
 
83
43
  .igd-main-content__page {
@@ -137,50 +97,28 @@
137
97
  border-inline: var(--igd-app-outline);
138
98
  width: clamp(rem(1200px), 100%, rem(1200px));
139
99
  }
140
-
141
- .igd-main-content__inner {
142
- gap: rem(70px);
143
- padding-inline: rem(70px) rem(32px);
144
- }
145
-
146
- .toc-sidebar {
147
- border-inline: var(--igd-app-outline);
148
- }
149
100
  }
150
101
 
151
102
  // ── Mobile + Tablet (< 1280px) — everything below desktop ──────────────────
152
103
  @media (max-width: #{$bp-tablet-max}) {
153
104
  :root {
154
- --igd-header-height: #{rem(50px)};
155
- --igd-page-padding: #{rem(38px)};
105
+ --igd-header-height: #{rem(60px)};
106
+ --igd-page-padding: #{rem(24px)};
156
107
  }
157
-
108
+
158
109
  // Single-column page grid; subheader follows via subgrid.
159
110
  .igd-page-layout {
160
- --igd-page-layout-grid: 1fr;
111
+ --igd-page-layout-grid: auto 1fr;
161
112
  }
162
113
 
163
- .igd-main-content {
164
- grid-row: 2;
165
- }
166
-
167
- // Logo only shown on desktop, where it can sit in its own sidebar-aligned column.
168
- .igd-logo {
114
+ .igd-logo__text {
169
115
  display: none;
170
116
  }
171
-
172
- // Search: collapse trigger to icon-only and reveal the mobile-only close UI.
173
- .search-trigger {
174
- max-width: none;
175
- width: auto;
176
- }
177
-
178
- .search-trigger__label,
179
- .search-trigger__lable,
180
- .search-trigger__hint {
181
- display: none;
117
+
118
+ .igd-main-content {
119
+ grid-row: 2;
182
120
  }
183
-
121
+
184
122
  .igd-search-mobile-bar {
185
123
  display: flex;
186
124
  }
@@ -225,6 +163,13 @@
225
163
  backdrop-filter: blur(10px);
226
164
  }
227
165
  }
166
+
167
+ body[data-sidebar-open],
168
+ body[data-search-modal-open] {
169
+ .globalnav {
170
+ z-index: 0;
171
+ }
172
+ }
228
173
 
229
174
  // Subheader sidebar toggle reveals when the sidebar is not persistent.
230
175
  .subheader-sidebar-toggle {
@@ -233,9 +178,8 @@
233
178
  }
234
179
 
235
180
  // Logo inside the slide-in sidebar (visible only when sidebar is an overlay).
236
- .sidebar-logo {
181
+ .igd-sidebar-logo {
237
182
  display: flex;
238
- margin-block-end: rem(16px);
239
183
  }
240
184
 
241
185
  .igd-main-content__inner {
@@ -245,21 +189,41 @@
245
189
  // This is the height of the input in fluent theme + 8px padding + height of the logo above
246
190
  .sidebar-gutter {
247
191
  min-height: rem(80px);
192
+ align-items: center;
248
193
  }
249
194
  }
250
195
 
251
196
  // ── Mobile only (< 768px) ──────────────────────────────────────────────────
252
197
  @media (max-width: #{$bp-mobile-max}) {
253
- .igd-main-content::before {
254
- display: none;
198
+ .search-decoration {
199
+ width: 40px;
200
+ aspect-ratio: 1;
201
+
202
+ .search-trigger {
203
+ display: none;
204
+ }
255
205
  }
256
-
206
+
207
+ .search-trigger-mobile {
208
+ --size: 100%;
209
+ --border-radius: #{rem(10px)};
210
+
211
+ display: flex;
212
+
213
+ width: 100%;
214
+ height: 100%;
215
+ }
216
+
217
+ .igniteui-page-logo {
218
+ display: block;
219
+ }
220
+
257
221
  .igd-version-select {
258
222
  max-width: rem(90px);
259
223
  }
260
224
 
261
225
  .igd-docs-subheader {
262
- padding-inline-end: rem(16px);
226
+ padding-inline: rem(16px);
263
227
  }
264
228
 
265
229
  .igd-docs-subheader__content:last-child {
@@ -286,31 +250,30 @@
286
250
  // (those files load after this one in the Astro bundle).
287
251
  .igd-page-layout .search-dialog,
288
252
  .igd-page-layout .igd-search-dialog::part(base) {
253
+ --border-radius: #{rem(8px)};
254
+
289
255
  margin: 0;
290
256
  width: 100%;
291
257
  max-width: 100%;
292
258
  height: 100dvh;
293
259
  max-height: 100dvh;
294
- border-radius: 0;
295
260
  }
296
261
 
297
- .search-trigger.search-close {
298
- display: flex;
299
- flex-shrink: 0;
300
- padding-inline: var(--igd-padding-sm);
301
- }
302
262
 
303
- igc-input {
304
- &::part(container) {
305
- &:focus-within {
306
- box-shadow:
307
- 0 0 0 1px var(--igd-accent),
308
- inset 0 1px 0 var(--igd-accent),
309
- inset 0 -1px 0 var(--igd-accent),
310
- -1px 0 0 var(--igd-accent);
311
- }
263
+ .igd-search-shell {
264
+ grid-template-rows: auto calc(100% - (var(--search-header-footer-height) * 2)) auto;
265
+
266
+ igc-divider {
267
+ margin-block-start: auto;
312
268
  }
313
269
  }
270
+
271
+ .igd-search-footer {
272
+ display: flex;
273
+ align-items: center;
274
+ justify-content: end;
275
+ border-block-start: var(--igd-app-outline);
276
+ }
314
277
  }
315
278
 
316
279
  @media (max-width: #{$bp-hide-toc}) {
@@ -320,7 +283,6 @@
320
283
  }
321
284
  }
322
285
 
323
-
324
286
  .igd-main-content__page {
325
287
  border: none;
326
288
  }
@@ -329,7 +291,7 @@
329
291
  // ── Tablet + Desktop (≥ 768px) ─────────────────────────────────────────────
330
292
  @media (min-width: #{$bp-tablet-min}) {
331
293
  .sidebar-gutter {
332
- &:has(.sidebar-logo:only-child) {
294
+ &:has(.igd-sidebar-logo:only-child) {
333
295
  display: none;
334
296
  }
335
297
  }
@@ -337,5 +299,4 @@
337
299
  .igd-page-layout {
338
300
  justify-content: center;
339
301
  }
340
-
341
302
  }
package/src/lib/types.ts CHANGED
@@ -4,9 +4,8 @@ export interface ApiPackageConfig {
4
4
  /** TypeDoc documentation root URL (no trailing slash). */
5
5
  docRoot: string;
6
6
  /**
7
- * Package identifier as it appears in the TypeDoc URL path.
8
- * Core packages use hyphens ("igniteui-react"),
9
- * sub-packages use underscores ("igniteui_react_charts").
7
+ * Package identifier as it appears in the API docs registry and route,
8
+ * e.g. "igniteui-react" or "igniteui-react-charts".
10
9
  */
11
10
  packageId: string;
12
11
  /**
@@ -20,10 +19,9 @@ export interface ApiPackageConfig {
20
19
  */
21
20
  preserveCase?: boolean;
22
21
  /**
23
- * Optional suffix appended to the class name before lowercasing, e.g.
24
- * Angular DV packages append "Component" so `CategoryChart` resolves to
25
- * `igniteui_angular_charts.igxcategorychartcomponent.html`.
26
- * Only applied when `prefixed={true}`.
22
+ * Preferred class-name suffix used by ApiLink. The generated registry tries
23
+ * both the suffixed and unsuffixed names, so this does not mean every API
24
+ * symbol is expected to have the suffix.
27
25
  */
28
26
  classSuffix?: string;
29
27
  /**
@@ -33,8 +31,24 @@ export interface ApiPackageConfig {
33
31
  pascalCaseMembers?: boolean;
34
32
  }
35
33
 
34
+ /** Compact ApiLink symbol entry as stored in the generated registry JSON. */
35
+ type ApiLinkIndexEntry = {
36
+ /** Package id that owns this symbol. */
37
+ p?: string;
38
+ /** Root-relative URL to the symbol page, e.g. "/api/react/igniteui-react/19.5/classes/IgrGrid". */
39
+ u: string;
40
+ /** Symbol kind, e.g. "class", "interface", "enum". */
41
+ k?: string;
42
+ /** Member name to anchor map, e.g. { rowSelection: "rowSelection" }. */
43
+ m?: Record<string, string>;
44
+ };
45
+
36
46
  export interface PlatformContext {
37
47
  name: PlatformName;
48
+ /** Optional compact ApiLink symbol index loaded by the docs host at build time. */
49
+ apiLinkIndex?: {
50
+ symbols?: Record<string, ApiLinkIndexEntry | ApiLinkIndexEntry[]>;
51
+ };
38
52
  /** Lower-case slug used in URLs, e.g. "angular" */
39
53
  lower: string;
40
54
  /** Component class prefix, e.g. "Igx" / "Igr" / "Igc" / "Igb" */
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Icon Manifest — side-effect-free module.
3
+ *
4
+ * Provides the full list of icon names and their raw SVG content.
5
+ * Imported by both icon-registry.ts (to register icons) and
6
+ * the playground IconGallery component (to render the gallery).
7
+ */
8
+
9
+ export const DOCS_COLLECTION = 'docs';
10
+
11
+ /**
12
+ * Legacy aliases: maps the icon name used in markup → actual filename stem.
13
+ * Only needed when the desired name differs from the filename (minus .svg).
14
+ */
15
+ export const ALIASES: Record<string, string> = {
16
+ 'expand': 'expand-icon',
17
+ 'react-logo': 'react',
18
+ 'wc-logo': 'web-component-logo',
19
+ };
20
+
21
+ /** Icon names that belong to the "brand" category (logos). */
22
+ export const BRAND_ICONS = new Set([
23
+ 'angular-logo', 'blazor-logo', 'react-logo', 'wc-logo',
24
+ 'github-logo', 'chatgpt', 'claude',
25
+ ]);
26
+
27
+ // Vite glob — imports raw SVG content at build time.
28
+ const svgModules = import.meta.glob('../assets/icons/*.svg', {
29
+ query: '?raw',
30
+ import: 'default',
31
+ eager: true,
32
+ }) as Record<string, string>;
33
+
34
+ export interface IconEntry {
35
+ /** The name used in `<igc-icon name="...">` */
36
+ name: string;
37
+ /** The actual filename stem (without .svg) */
38
+ stem: string;
39
+ /** The actual filename (with .svg) */
40
+ filename: string;
41
+ /** Raw SVG content */
42
+ svg: string;
43
+ }
44
+
45
+ function buildIconList(): IconEntry[] {
46
+ const stemToSvg = new Map<string, string>();
47
+ for (const [p, svg] of Object.entries(svgModules)) {
48
+ const stem = p.split('/').pop()!.replace(/\.svg$/, '');
49
+ stemToSvg.set(stem, svg);
50
+ }
51
+
52
+ const entries: IconEntry[] = [];
53
+ const registeredStems = new Set<string>();
54
+
55
+ // Alias entries first
56
+ for (const [alias, stem] of Object.entries(ALIASES)) {
57
+ if (stemToSvg.has(stem)) {
58
+ entries.push({ name: alias, stem, filename: stem + '.svg', svg: stemToSvg.get(stem)! });
59
+ registeredStems.add(stem);
60
+ }
61
+ }
62
+
63
+ // Remaining icons use stem as name
64
+ for (const [stem, svg] of stemToSvg) {
65
+ if (!registeredStems.has(stem)) {
66
+ entries.push({ name: stem, stem, filename: stem + '.svg', svg });
67
+ }
68
+ }
69
+
70
+ return entries.sort((a, b) => a.name.localeCompare(b.name));
71
+ }
72
+
73
+ export const ICON_LIST: IconEntry[] = buildIconList();