@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.
Files changed (68) hide show
  1. package/api/build/kit/rank.mjs +21 -4
  2. package/api/build/kit/words.d.mts +1 -0
  3. package/api/build/kit/words.mjs +1 -1
  4. package/api/icon/_adapter.d.mts +3 -2
  5. package/api/icon/_adapter.mjs +8 -2
  6. package/api/icon/_authoring.d.mts +1 -0
  7. package/api/icon/_authoring.mjs +586 -66
  8. package/api/icon/_default-look.d.mts +155 -0
  9. package/api/icon/_default-look.mjs +474 -0
  10. package/api/icon/_records.d.mts +1 -1
  11. package/api/icon/_records.mjs +1 -0
  12. package/api/icon/add/add.mjs +224 -38
  13. package/api/icon/icon.type.d.mts +22 -2
  14. package/api/icon/icon.type.mjs +6 -2
  15. package/api/icon/iconAdd.doc.mjs +2 -2
  16. package/api/icon/iconNewDefinition.doc.mjs +3 -2
  17. package/api/icon/iconNewSet.doc.mjs +4 -4
  18. package/api/icon/search/search.mjs +10 -9
  19. package/api/integration/add-helpers.d.mts +11 -1
  20. package/api/integration/add-helpers.mjs +5 -2
  21. package/api/integration/authoring-checks.d.mts +0 -2
  22. package/api/integration/authoring-checks.mjs +1 -6
  23. package/api/logger.mjs +2 -1
  24. package/api/swizzle/_adapter.d.mts +1 -0
  25. package/api/swizzle/_adapter.mjs +4 -1
  26. package/api/swizzle/_moduleGraph.d.mts +171 -0
  27. package/api/swizzle/_moduleGraph.mjs +795 -0
  28. package/api/swizzle/copy/copy.d.mts +2 -43
  29. package/api/swizzle/copy/copy.mjs +195 -314
  30. package/api/swizzle/swizzle.d.mts +0 -2
  31. package/api/swizzle/swizzle.doc.mjs +9 -4
  32. package/api/swizzle/swizzle.mjs +3 -7
  33. package/api/swizzle/swizzle.type.d.mts +2 -1
  34. package/api/swizzle/swizzle.type.mjs +3 -2
  35. package/assets/discover/official-packages.json +20 -0
  36. package/assets/docs/tree/icon-sets.doc.mjs +11 -5
  37. package/assets/templates/blocks/components/Table/TableRowIndexTable.doc.mjs +1 -1
  38. package/assets/templates/blocks/components/Table/TableRowIndexTable.tsx +2 -2
  39. package/assets/templates/pages/course-detail/page.tsx +699 -0
  40. package/assets/templates/pages/course-detail/template.doc.mjs +37 -0
  41. package/assets/templates/pages/file-explorer/page.tsx +103 -79
  42. package/assets/templates/pages/table-grouped/page.tsx +160 -232
  43. package/assets/templates/pages/table-grouped/template.doc.mjs +0 -2
  44. package/assets/templates/pages/theme-showcase/page.tsx +724 -792
  45. package/assets/templates/pages/theme-showcase/template.doc.mjs +4 -5
  46. package/authoring/doctypes/template/type.ts +1 -0
  47. package/clients/cli/commands/experimental/icon.mjs +31 -10
  48. package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
  49. package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +2 -1
  50. package/clients/cli/commands/experimental-icon-new-set.doc.mjs +2 -2
  51. package/clients/cli/commands/swizzle.doc.mjs +8 -3
  52. package/clients/cli/commands/swizzle.mjs +21 -9
  53. package/foundation/discovery/component-loader.d.mts +1 -1
  54. package/foundation/discovery/doc-types.mjs +9 -2
  55. package/foundation/discovery/icon-ranking.d.mts +27 -3
  56. package/foundation/discovery/icon-ranking.mjs +125 -8
  57. package/foundation/discovery/icon-set-checks.mjs +44 -35
  58. package/foundation/discovery/icon-set-discovery.d.mts +13 -0
  59. package/foundation/discovery/icon-set-discovery.mjs +25 -0
  60. package/foundation/discovery/icon-set-writer.d.mts +238 -16
  61. package/foundation/discovery/icon-set-writer.mjs +676 -79
  62. package/foundation/discovery/module-exports.d.mts +3 -2
  63. package/foundation/discovery/module-exports.mjs +167 -37
  64. package/foundation/fs/paths.d.mts +2 -1
  65. package/foundation/fs/paths.mjs +3 -4
  66. package/foundation/text/shell-arg.d.mts +14 -0
  67. package/foundation/text/shell-arg.mjs +17 -0
  68. 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
- const columnRow: CSSProperties = {overflowX: 'auto', overflowY: 'hidden'};
264
- const scrollable: CSSProperties = {overflowY: 'auto'};
265
- const fixedColumn: CSSProperties = {flexShrink: 0};
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={<Icon icon={ChevronLeftIcon} size="sm" />}
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={<Icon icon={ChevronRightIcon} size="sm" />}
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%" style={columnRow}>
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
- <Section
466
+ <StackItem
458
467
  key={colIndex}
459
- width={240}
460
- padding={2}
461
- variant="transparent"
462
- dividers={showDivider ? ['end'] : undefined}
463
- style={{...scrollable, ...fixedColumn}}>
464
- <List density="compact" hasDividers={false}>
465
- {col.items.map(item => {
466
- const isSelected = col.selectedId === item.id;
467
- const hasChildren =
468
- item.type === 'folder' &&
469
- item.children != null &&
470
- item.children.length > 0;
471
- return (
472
- <ListItem
473
- key={item.id}
474
- label={item.name}
475
- startContent={
476
- <Icon
477
- icon={
478
- item.type === 'folder'
479
- ? FolderIcon
480
- : DocumentIcon
481
- }
482
- color={
483
- item.type === 'folder' ? 'accent' : 'secondary'
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={ChevronRightIcon}
492
- size="xsm"
493
- color="secondary"
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
- ) : undefined
496
- }
497
- onClick={() => handleSelect(colIndex, item.id)}
498
- isSelected={isSelected}
499
- />
500
- );
501
- })}
502
- </List>
503
- </Section>
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
- <Section
508
- padding={6}
509
- variant="transparent"
510
- style={{...scrollable, ...detailColumn}}>
511
- <VStack gap={4} hAlign="center">
512
- <Avatar name={selectedFile.name} size={96} />
513
- <VStack gap={1} hAlign="center">
514
- <Text type="label">{selectedFile.name}</Text>
515
- <Text type="supporting">
516
- {getFileExtension(selectedFile.name)} Document
517
- </Text>
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
- <MetadataList title="Information">
520
- <MetadataListItem label="Created">
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>