@astryxdesign/cli 0.1.4-canary.26fb921 → 0.1.4-canary.27a88a6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.1.4-canary.26fb921",
3
+ "version": "0.1.4-canary.27a88a6",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -75,10 +75,10 @@
75
75
  "zod": "^4.4.3"
76
76
  },
77
77
  "peerDependencies": {
78
- "@astryxdesign/charts": "0.1.4-canary.26fb921",
79
- "@astryxdesign/core": "0.1.4-canary.26fb921",
80
- "@astryxdesign/lab": "0.1.4-canary.26fb921",
81
- "@astryxdesign/theme-neutral": "0.1.4-canary.26fb921",
78
+ "@astryxdesign/charts": "0.1.4-canary.27a88a6",
79
+ "@astryxdesign/core": "0.1.4-canary.27a88a6",
80
+ "@astryxdesign/lab": "0.1.4-canary.27a88a6",
81
+ "@astryxdesign/theme-neutral": "0.1.4-canary.27a88a6",
82
82
  "gpt-tokenizer": "^3.4.0"
83
83
  },
84
84
  "peerDependenciesMeta": {
@@ -96,10 +96,10 @@
96
96
  }
97
97
  },
98
98
  "devDependencies": {
99
- "@astryxdesign/charts": "0.1.4-canary.26fb921",
100
- "@astryxdesign/core": "0.1.4-canary.26fb921",
101
- "@astryxdesign/lab": "0.1.4-canary.26fb921",
102
- "@astryxdesign/theme-neutral": "0.1.4-canary.26fb921",
99
+ "@astryxdesign/charts": "0.1.4-canary.27a88a6",
100
+ "@astryxdesign/core": "0.1.4-canary.27a88a6",
101
+ "@astryxdesign/lab": "0.1.4-canary.27a88a6",
102
+ "@astryxdesign/theme-neutral": "0.1.4-canary.27a88a6",
103
103
  "gpt-tokenizer": "^3.4.0"
104
104
  },
105
105
  "scripts": {
@@ -939,15 +939,9 @@ export function registerTheme(program) {
939
939
  if (component.length > 0) {
940
940
  const componentInner = component.join('\n\n');
941
941
  const componentScope = `@scope (${scopeSelector}) to (${scopeTo}) {\n${componentInner}\n}`;
942
- // light-dark() needs a color-scheme declaration in this bundle, but a
943
- // bare `:root { color-scheme: light dark }` outranks reset.css's
944
- // `html[data-theme]` mapping (astryx-theme layer comes after reset),
945
- // silently defeating `<Theme mode>` forcing on <html>. Mirror the
946
- // attribute-keyed mapping so the declaration follows the active mode.
942
+ // #3658: also emit attribute-specific rules so <Theme mode> can override color-scheme
947
943
  const colorSchemeDecl = componentScope.includes('light-dark(')
948
- ? ' :root { color-scheme: light dark; }\n' +
949
- ' html[data-theme="light"] { color-scheme: light; }\n' +
950
- ' html[data-theme="dark"] { color-scheme: dark; }\n\n'
944
+ ? ' :root { color-scheme: light dark; }\n html[data-theme="light"] { color-scheme: light; }\n html[data-theme="dark"] { color-scheme: dark; }\n\n'
951
945
  : '';
952
946
  cssParts.push(
953
947
  `@layer astryx-theme {\n${colorSchemeDecl}${componentScope}\n}`,
@@ -6,7 +6,7 @@ export const doc = {
6
6
  exampleFor: 'Collapsible',
7
7
  name: 'Collapsible — Divided Accordion',
8
8
  displayName: 'Collapsible — Divided Accordion',
9
- description: 'FAQ-style accordion using the dividers prop on CollapsibleGroup: built-in row hairlines and density padding with zero custom CSS. Use for FAQs, settings lists, and nav sections.',
9
+ description: 'FAQ-style accordion using the hasDividers prop on CollapsibleGroup: built-in row hairlines and density padding with zero custom CSS. Use for FAQs, settings lists, and nav sections.',
10
10
  isReady: true,
11
11
  aspectRatio: 4 / 3,
12
12
  componentsUsed: ['Collapsible', 'CollapsibleGroup', 'Text'],
@@ -8,7 +8,7 @@ import {Text} from '@astryxdesign/core/Text';
8
8
  export default function CollapsibleDividedAccordion() {
9
9
  return (
10
10
  <div style={{width: '100%', maxWidth: 400}}>
11
- <CollapsibleGroup type="single" dividers="between" defaultValue="reset">
11
+ <CollapsibleGroup type="single" hasDividers defaultValue="reset">
12
12
  <Collapsible trigger="How do I reset my password?" value="reset">
13
13
  <Text type="body">
14
14
  Go to Settings → Security → Change Password. You'll receive a
@@ -439,8 +439,11 @@ export default function KanbanBoardTemplate() {
439
439
  let cb = columnRefCbs.current.get(id);
440
440
  if (!cb) {
441
441
  cb = el => {
442
- if (el) {columnEls.current.set(id, el);}
443
- else {columnEls.current.delete(id);}
442
+ if (el) {
443
+ columnEls.current.set(id, el);
444
+ } else {
445
+ columnEls.current.delete(id);
446
+ }
444
447
  };
445
448
  columnRefCbs.current.set(id, cb);
446
449
  }
@@ -451,8 +454,11 @@ export default function KanbanBoardTemplate() {
451
454
  let cb = cardRefCbs.current.get(id);
452
455
  if (!cb) {
453
456
  cb = el => {
454
- if (el) {cardEls.current.set(id, el);}
455
- else {cardEls.current.delete(id);}
457
+ if (el) {
458
+ cardEls.current.set(id, el);
459
+ } else {
460
+ cardEls.current.delete(id);
461
+ }
456
462
  };
457
463
  cardRefCbs.current.set(id, cb);
458
464
  }
@@ -487,7 +493,9 @@ export default function KanbanBoardTemplate() {
487
493
  ): DropTarget | null => {
488
494
  for (const [colId, el] of Array.from(columnEls.current.entries())) {
489
495
  const r = el.getBoundingClientRect();
490
- if (px < r.left || px > r.right || py < r.top || py > r.bottom) {continue;}
496
+ if (px < r.left || px > r.right || py < r.top || py > r.bottom) {
497
+ continue;
498
+ }
491
499
 
492
500
  const ids = itemsByColumn[colId]
493
501
  .filter(it => it.id !== draggedId)
@@ -496,7 +504,9 @@ export default function KanbanBoardTemplate() {
496
504
  let index = ids.length;
497
505
  for (let i = 0; i < ids.length; i++) {
498
506
  const cardEl = cardEls.current.get(ids[i]);
499
- if (!cardEl) {continue;}
507
+ if (!cardEl) {
508
+ continue;
509
+ }
500
510
  const cr = cardEl.getBoundingClientRect();
501
511
  if (py < cr.top + cr.height / 2) {
502
512
  index = i;
@@ -513,21 +523,27 @@ export default function KanbanBoardTemplate() {
513
523
  const commitDrag = (id: string, target: DropTarget) => {
514
524
  setItems(prev => {
515
525
  const moved = prev.find(it => it.id === id);
516
- if (!moved) {return prev;}
526
+ if (!moved) {
527
+ return prev;
528
+ }
517
529
 
518
530
  const rest = prev.filter(it => it.id !== id);
519
531
  const updated: WorkItem = {...moved, column: target.column};
520
532
  const colItems = rest.filter(it => it.column === target.column);
521
533
  const anchor = colItems[target.index];
522
534
 
523
- if (!anchor) {return [...rest, updated];}
535
+ if (!anchor) {
536
+ return [...rest, updated];
537
+ }
524
538
  const at = rest.indexOf(anchor);
525
539
  return [...rest.slice(0, at), updated, ...rest.slice(at)];
526
540
  });
527
541
  };
528
542
 
529
543
  const onCardPointerDown = (e: ReactPointerEvent, id: string) => {
530
- if (e.button !== 0) {return;}
544
+ if (e.button !== 0) {
545
+ return;
546
+ }
531
547
  // Let the card's own controls (the actions menu) handle the press.
532
548
  if (
533
549
  (e.target as HTMLElement).closest(
@@ -538,7 +554,9 @@ export default function KanbanBoardTemplate() {
538
554
  }
539
555
 
540
556
  const el = cardEls.current.get(id);
541
- if (!el) {return;}
557
+ if (!el) {
558
+ return;
559
+ }
542
560
 
543
561
  const rect = el.getBoundingClientRect();
544
562
  const startX = e.clientX;
@@ -574,7 +592,9 @@ export default function KanbanBoardTemplate() {
574
592
 
575
593
  const onUp = () => {
576
594
  teardownRef.current?.();
577
- if (started && target) {commitDrag(id, target);}
595
+ if (started && target) {
596
+ commitDrag(id, target);
597
+ }
578
598
  setDrag(null);
579
599
  };
580
600
 
@@ -594,7 +614,9 @@ export default function KanbanBoardTemplate() {
594
614
 
595
615
  // Suppress selection while dragging and detach listeners on unmount.
596
616
  useEffect(() => {
597
- if (!isDragging) {return;}
617
+ if (!isDragging) {
618
+ return;
619
+ }
598
620
  const previous = document.body.style.userSelect;
599
621
  document.body.style.userSelect = 'none';
600
622
  return () => {
@@ -612,7 +634,9 @@ export default function KanbanBoardTemplate() {
612
634
  const ghostTarget =
613
635
  drag && drag.target && drag.target.column === colId ? drag : null;
614
636
 
615
- if (visible.length === 0 && !ghostTarget) {return null;}
637
+ if (visible.length === 0 && !ghostTarget) {
638
+ return null;
639
+ }
616
640
 
617
641
  const nodes: ReactNode[] = visible.map(it => (
618
642
  <BoardCard