@astryxdesign/cli 0.7.11 → 0.7.12-canary.ccb4a6d
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/api/build/kit/rank.mjs +21 -4
- package/api/build/kit/words.d.mts +1 -0
- package/api/build/kit/words.mjs +1 -1
- package/api/icon/_adapter.d.mts +3 -2
- package/api/icon/_adapter.mjs +8 -2
- package/api/icon/_authoring.d.mts +1 -0
- package/api/icon/_authoring.mjs +586 -66
- package/api/icon/_default-look.d.mts +155 -0
- package/api/icon/_default-look.mjs +474 -0
- package/api/icon/_records.d.mts +1 -1
- package/api/icon/_records.mjs +1 -0
- package/api/icon/add/add.mjs +224 -38
- package/api/icon/icon.type.d.mts +22 -2
- package/api/icon/icon.type.mjs +6 -2
- package/api/icon/iconAdd.doc.mjs +2 -2
- package/api/icon/iconNewDefinition.doc.mjs +3 -2
- package/api/icon/iconNewSet.doc.mjs +4 -4
- package/api/icon/search/search.mjs +10 -9
- package/api/integration/add-helpers.d.mts +11 -1
- package/api/integration/add-helpers.mjs +5 -2
- package/api/integration/authoring-checks.d.mts +0 -2
- package/api/integration/authoring-checks.mjs +1 -6
- package/api/logger.mjs +2 -1
- package/api/swizzle/_adapter.d.mts +1 -0
- package/api/swizzle/_adapter.mjs +4 -1
- package/api/swizzle/_moduleGraph.d.mts +171 -0
- package/api/swizzle/_moduleGraph.mjs +795 -0
- package/api/swizzle/copy/copy.d.mts +2 -43
- package/api/swizzle/copy/copy.mjs +195 -314
- package/api/swizzle/swizzle.d.mts +0 -2
- package/api/swizzle/swizzle.doc.mjs +9 -4
- package/api/swizzle/swizzle.mjs +3 -7
- package/api/swizzle/swizzle.type.d.mts +2 -1
- package/api/swizzle/swizzle.type.mjs +3 -2
- package/assets/discover/official-packages.json +20 -0
- package/assets/docs/tree/icon-sets.doc.mjs +11 -5
- package/assets/templates/blocks/components/Table/TableRowIndexTable.doc.mjs +1 -1
- package/assets/templates/blocks/components/Table/TableRowIndexTable.tsx +2 -2
- package/assets/templates/pages/course-detail/page.tsx +699 -0
- package/assets/templates/pages/course-detail/template.doc.mjs +37 -0
- package/assets/templates/pages/file-explorer/page.tsx +103 -79
- package/assets/templates/pages/table-grouped/page.tsx +160 -232
- package/assets/templates/pages/table-grouped/template.doc.mjs +0 -2
- package/assets/templates/pages/theme-showcase/page.tsx +724 -792
- package/assets/templates/pages/theme-showcase/template.doc.mjs +4 -5
- package/authoring/doctypes/template/type.ts +1 -0
- package/clients/cli/commands/experimental/icon.mjs +31 -10
- package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +2 -1
- package/clients/cli/commands/experimental-icon-new-set.doc.mjs +2 -2
- package/clients/cli/commands/swizzle.doc.mjs +8 -3
- package/clients/cli/commands/swizzle.mjs +21 -9
- package/foundation/discovery/component-loader.d.mts +1 -1
- package/foundation/discovery/doc-types.mjs +9 -2
- package/foundation/discovery/icon-ranking.d.mts +27 -3
- package/foundation/discovery/icon-ranking.mjs +125 -8
- package/foundation/discovery/icon-set-checks.mjs +44 -35
- package/foundation/discovery/icon-set-discovery.d.mts +13 -0
- package/foundation/discovery/icon-set-discovery.mjs +25 -0
- package/foundation/discovery/icon-set-writer.d.mts +238 -16
- package/foundation/discovery/icon-set-writer.mjs +676 -79
- package/foundation/discovery/module-exports.d.mts +3 -2
- package/foundation/discovery/module-exports.mjs +167 -37
- package/foundation/fs/paths.d.mts +2 -1
- package/foundation/fs/paths.mjs +3 -4
- package/foundation/text/shell-arg.d.mts +14 -0
- package/foundation/text/shell-arg.mjs +17 -0
- package/package.json +6 -6
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'page',
|
|
6
|
+
name: 'Course Detail',
|
|
7
|
+
displayName: 'Course Detail',
|
|
8
|
+
description:
|
|
9
|
+
'Long-form sales page for a single offering, in two columns — read the pitch, then enroll from a sticky rail. The main column holds a preview poster with a fact row, an about block with skill chips, a module syllabus whose sections collapse module by module, an instructor card, reviews with a scored-aspects panel, and a FAQ; the rail holds the price, a self-paced or cohort start picker, and a weekly-pace slider that computes a finish date. The shape for any offering with a curriculum and a purchase panel — a course, class, masterclass, bootcamp, workshop, or training.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'course',
|
|
12
|
+
'class',
|
|
13
|
+
'lesson',
|
|
14
|
+
'curriculum',
|
|
15
|
+
'syllabus',
|
|
16
|
+
'e-learning',
|
|
17
|
+
'enroll',
|
|
18
|
+
'cohort',
|
|
19
|
+
'masterclass',
|
|
20
|
+
'bootcamp',
|
|
21
|
+
'training',
|
|
22
|
+
'education',
|
|
23
|
+
],
|
|
24
|
+
isReady: true,
|
|
25
|
+
category: 'Content - Course Detail',
|
|
26
|
+
icons: {
|
|
27
|
+
PlayIcon: 'play',
|
|
28
|
+
CheckIcon: 'check',
|
|
29
|
+
StarIcon: 'star',
|
|
30
|
+
ClockIcon: 'clock',
|
|
31
|
+
UsersIcon: 'users',
|
|
32
|
+
GlobeAltIcon: 'globe',
|
|
33
|
+
BoltIcon: 'bolt',
|
|
34
|
+
ArrowRightIcon: 'arrowRight',
|
|
35
|
+
BookOpenIcon: 'book',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -7,6 +7,8 @@ import {Layout, LayoutContent} from '@astryxdesign/core/Layout';
|
|
|
7
7
|
import {Toolbar} from '@astryxdesign/core/Toolbar';
|
|
8
8
|
import {List, ListItem} from '@astryxdesign/core/List';
|
|
9
9
|
import {HStack, VStack} from '@astryxdesign/core/Layout';
|
|
10
|
+
import {StackItem} from '@astryxdesign/core/Stack';
|
|
11
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
10
12
|
import {Text} from '@astryxdesign/core/Text';
|
|
11
13
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
12
14
|
import {IconButton} from '@astryxdesign/core/IconButton';
|
|
@@ -260,14 +262,9 @@ const FILESYSTEM: FileSystemItem[] = [
|
|
|
260
262
|
];
|
|
261
263
|
|
|
262
264
|
const page: CSSProperties = {height: '100dvh'};
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const
|
|
266
|
-
const detailColumn: CSSProperties = {
|
|
267
|
-
flexGrow: 1,
|
|
268
|
-
flexShrink: 0,
|
|
269
|
-
flexBasis: 320,
|
|
270
|
-
};
|
|
265
|
+
// The detail column fills the rest of the row but never narrows below 320px;
|
|
266
|
+
// past that, the row scrolls sideways.
|
|
267
|
+
const detailFloor: CSSProperties = {flexShrink: 0, flexBasis: 320};
|
|
271
268
|
|
|
272
269
|
function findItem(items: FileSystemItem[], id: string): FileSystemItem | null {
|
|
273
270
|
for (const item of items) {
|
|
@@ -361,7 +358,13 @@ export default function FileExplorerPage() {
|
|
|
361
358
|
<IconButton
|
|
362
359
|
variant="ghost"
|
|
363
360
|
size="sm"
|
|
364
|
-
icon={
|
|
361
|
+
icon={
|
|
362
|
+
<Icon
|
|
363
|
+
icon={ChevronLeftIcon}
|
|
364
|
+
size="sm"
|
|
365
|
+
xstyle={rtlStyles.mirror}
|
|
366
|
+
/>
|
|
367
|
+
}
|
|
365
368
|
onClick={() => {
|
|
366
369
|
if (selectedPath.length > 0) {
|
|
367
370
|
setSelectedPath(selectedPath.slice(0, -1));
|
|
@@ -373,7 +376,13 @@ export default function FileExplorerPage() {
|
|
|
373
376
|
<IconButton
|
|
374
377
|
variant="ghost"
|
|
375
378
|
size="sm"
|
|
376
|
-
icon={
|
|
379
|
+
icon={
|
|
380
|
+
<Icon
|
|
381
|
+
icon={ChevronRightIcon}
|
|
382
|
+
size="sm"
|
|
383
|
+
xstyle={rtlStyles.mirror}
|
|
384
|
+
/>
|
|
385
|
+
}
|
|
377
386
|
isDisabled
|
|
378
387
|
label="Go forward"
|
|
379
388
|
/>
|
|
@@ -449,86 +458,101 @@ export default function FileExplorerPage() {
|
|
|
449
458
|
}
|
|
450
459
|
content={
|
|
451
460
|
<LayoutContent padding={0} isScrollable={false}>
|
|
452
|
-
<HStack height="100%"
|
|
461
|
+
<HStack height="100%" isScrollable>
|
|
453
462
|
{columns.map((col, colIndex) => {
|
|
454
463
|
const showDivider =
|
|
455
464
|
colIndex < columns.length - 1 || selectedFile != null;
|
|
456
465
|
return (
|
|
457
|
-
<
|
|
466
|
+
<StackItem
|
|
458
467
|
key={colIndex}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
size="sm"
|
|
486
|
-
/>
|
|
487
|
-
}
|
|
488
|
-
endContent={
|
|
489
|
-
hasChildren ? (
|
|
468
|
+
size="static"
|
|
469
|
+
isScrollable
|
|
470
|
+
aria-label={
|
|
471
|
+
colIndex === 0
|
|
472
|
+
? 'Home'
|
|
473
|
+
: findItem(FILESYSTEM, selectedPath[colIndex - 1])?.name
|
|
474
|
+
}>
|
|
475
|
+
<Section
|
|
476
|
+
width={240}
|
|
477
|
+
height="100%"
|
|
478
|
+
padding={2}
|
|
479
|
+
variant="transparent"
|
|
480
|
+
dividers={showDivider ? ['end'] : undefined}>
|
|
481
|
+
<List density="compact" hasDividers={false}>
|
|
482
|
+
{col.items.map(item => {
|
|
483
|
+
const isSelected = col.selectedId === item.id;
|
|
484
|
+
const hasChildren =
|
|
485
|
+
item.type === 'folder' &&
|
|
486
|
+
item.children != null &&
|
|
487
|
+
item.children.length > 0;
|
|
488
|
+
return (
|
|
489
|
+
<ListItem
|
|
490
|
+
key={item.id}
|
|
491
|
+
label={item.name}
|
|
492
|
+
startContent={
|
|
490
493
|
<Icon
|
|
491
|
-
icon={
|
|
492
|
-
|
|
493
|
-
|
|
494
|
+
icon={
|
|
495
|
+
item.type === 'folder'
|
|
496
|
+
? FolderIcon
|
|
497
|
+
: DocumentIcon
|
|
498
|
+
}
|
|
499
|
+
color={
|
|
500
|
+
item.type === 'folder'
|
|
501
|
+
? 'accent'
|
|
502
|
+
: 'secondary'
|
|
503
|
+
}
|
|
504
|
+
size="sm"
|
|
494
505
|
/>
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
506
|
+
}
|
|
507
|
+
endContent={
|
|
508
|
+
hasChildren ? (
|
|
509
|
+
<Icon
|
|
510
|
+
icon={ChevronRightIcon}
|
|
511
|
+
size="xsm"
|
|
512
|
+
color="secondary"
|
|
513
|
+
xstyle={rtlStyles.mirror}
|
|
514
|
+
/>
|
|
515
|
+
) : undefined
|
|
516
|
+
}
|
|
517
|
+
onClick={() => handleSelect(colIndex, item.id)}
|
|
518
|
+
isSelected={isSelected}
|
|
519
|
+
/>
|
|
520
|
+
);
|
|
521
|
+
})}
|
|
522
|
+
</List>
|
|
523
|
+
</Section>
|
|
524
|
+
</StackItem>
|
|
504
525
|
);
|
|
505
526
|
})}
|
|
506
527
|
{selectedFile && (
|
|
507
|
-
<
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
<VStack gap={
|
|
514
|
-
<
|
|
515
|
-
<
|
|
516
|
-
{
|
|
517
|
-
|
|
528
|
+
<StackItem
|
|
529
|
+
size="fill"
|
|
530
|
+
isScrollable
|
|
531
|
+
aria-label={selectedFile.name}
|
|
532
|
+
style={detailFloor}>
|
|
533
|
+
<Section padding={6} variant="transparent">
|
|
534
|
+
<VStack gap={4} hAlign="center">
|
|
535
|
+
<Avatar name={selectedFile.name} size={96} />
|
|
536
|
+
<VStack gap={1} hAlign="center">
|
|
537
|
+
<Text type="label">{selectedFile.name}</Text>
|
|
538
|
+
<Text type="supporting">
|
|
539
|
+
{getFileExtension(selectedFile.name)} Document
|
|
540
|
+
</Text>
|
|
541
|
+
</VStack>
|
|
542
|
+
<MetadataList title="Information">
|
|
543
|
+
<MetadataListItem label="Created">
|
|
544
|
+
March 28, 2026 at 2:15 PM
|
|
545
|
+
</MetadataListItem>
|
|
546
|
+
<MetadataListItem label="Modified">
|
|
547
|
+
Yesterday, 10:27 PM
|
|
548
|
+
</MetadataListItem>
|
|
549
|
+
<MetadataListItem label="Kind">
|
|
550
|
+
{getFileExtension(selectedFile.name)} Document
|
|
551
|
+
</MetadataListItem>
|
|
552
|
+
</MetadataList>
|
|
518
553
|
</VStack>
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
March 28, 2026 at 2:15 PM
|
|
522
|
-
</MetadataListItem>
|
|
523
|
-
<MetadataListItem label="Modified">
|
|
524
|
-
Yesterday, 10:27 PM
|
|
525
|
-
</MetadataListItem>
|
|
526
|
-
<MetadataListItem label="Kind">
|
|
527
|
-
{getFileExtension(selectedFile.name)} Document
|
|
528
|
-
</MetadataListItem>
|
|
529
|
-
</MetadataList>
|
|
530
|
-
</VStack>
|
|
531
|
-
</Section>
|
|
554
|
+
</Section>
|
|
555
|
+
</StackItem>
|
|
532
556
|
)}
|
|
533
557
|
</HStack>
|
|
534
558
|
</LayoutContent>
|