@astryxdesign/cli 0.1.4 → 0.1.5-canary.76e6697
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/CHANGELOG.md +45 -1
- package/docs/getting-started.doc.mjs +4 -0
- package/docs/migration.doc.mjs +134 -0
- package/docs/styling.doc.mjs +53 -0
- package/docs/working-with-ai.doc.mjs +1 -1
- package/package.json +15 -10
- package/src/api/component.mjs +2 -1
- package/src/api/doctor.mjs +13 -2
- package/src/api/template.mjs +14 -3
- package/src/codemods/__tests__/registry.test.mjs +1 -0
- package/src/codemods/__tests__/runner.test.mjs +38 -0
- package/src/codemods/registry.mjs +1 -0
- package/src/codemods/runner.mjs +2 -0
- package/src/codemods/transforms/v0.1.5/__tests__/rename-switch-label-spacing-default-to-hug.test.mjs +93 -0
- package/src/codemods/transforms/v0.1.5/index.mjs +19 -0
- package/src/codemods/transforms/v0.1.5/rename-switch-label-spacing-default-to-hug.mjs +140 -0
- package/src/commands/agent-docs.mjs +9 -6
- package/src/commands/agent-docs.test.mjs +33 -0
- package/src/commands/build-theme.color-scheme.test.mjs +153 -0
- package/src/commands/build-theme.mjs +112 -14
- package/src/commands/build-theme.variants.test.mjs +193 -0
- package/src/commands/component-resolution.test.mjs +4 -4
- package/src/commands/doctor.test.mjs +34 -0
- package/src/commands/init.mjs +1 -1
- package/src/commands/swizzle.mjs +34 -0
- package/src/commands/swizzle.routing.test.mjs +67 -0
- package/src/lib/component-discovery.mjs +8 -4
- package/templates/blocks/components/AspectRatio/AspectRatioCircleImage.tsx +1 -6
- package/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx +2 -7
- package/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +2 -5
- package/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx +1 -6
- package/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx +1 -6
- package/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.doc.mjs +14 -0
- package/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.tsx +58 -0
- package/templates/blocks/components/CodeBlock/CodeBlockTerminal.doc.mjs +14 -0
- package/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +24 -0
- package/templates/blocks/components/Collapsible/CollapsibleDividedAccordion.doc.mjs +13 -0
- package/templates/blocks/components/Collapsible/CollapsibleDividedAccordion.tsx +33 -0
- package/templates/blocks/components/Collapsible/CollapsibleWithoutCard.tsx +25 -23
- package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupShowcase.tsx +27 -48
- package/templates/blocks/components/CommandPaletteInput/CommandPaletteInputBasic.doc.mjs +15 -0
- package/templates/blocks/components/CommandPaletteInput/CommandPaletteInputBasic.tsx +39 -0
- package/templates/blocks/components/CommandPaletteInput/CommandPaletteInputShowcase.doc.mjs +15 -0
- package/templates/blocks/components/CommandPaletteInput/CommandPaletteInputShowcase.tsx +39 -0
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx +31 -54
- package/templates/blocks/components/CommandPaletteList/CommandPaletteListBasic.doc.mjs +15 -0
- package/templates/blocks/components/CommandPaletteList/CommandPaletteListBasic.tsx +27 -0
- package/templates/blocks/components/CommandPaletteList/CommandPaletteListShowcase.doc.mjs +15 -0
- package/templates/blocks/components/CommandPaletteList/CommandPaletteListShowcase.tsx +38 -0
- package/templates/blocks/components/ContextMenuItem/ContextMenuItemBasic.doc.mjs +14 -0
- package/templates/blocks/components/ContextMenuItem/ContextMenuItemBasic.tsx +44 -0
- package/templates/blocks/components/ContextMenuItem/ContextMenuItemShowcase.doc.mjs +15 -0
- package/templates/blocks/components/ContextMenuItem/ContextMenuItemShowcase.tsx +107 -0
- package/templates/blocks/components/NavHeadingMenu/NavHeadingMenuShowcase.doc.mjs +15 -0
- package/templates/blocks/components/NavHeadingMenu/NavHeadingMenuShowcase.tsx +47 -0
- package/templates/blocks/components/Table/TableGroupedRowsTable.doc.mjs +14 -0
- package/templates/blocks/components/Table/TableGroupedRowsTable.tsx +66 -0
- package/templates/pages/classic-gallery/page.tsx +1 -1
- package/templates/pages/dashboard/page.tsx +1 -1
- package/templates/pages/documentation/page.tsx +1 -1
- package/templates/pages/incident-console/page.tsx +580 -0
- package/templates/pages/incident-console/template.doc.mjs +12 -0
- package/templates/pages/kanban-board/page.tsx +37 -13
- package/templates/pages/messaging-shell/page.tsx +676 -0
- package/templates/pages/messaging-shell/template.doc.mjs +12 -0
- package/templates/pages/mixed-gallery/page.tsx +1 -1
- package/templates/pages/payment-form/page.tsx +2 -6
- package/templates/pages/product-detail/page.tsx +3 -11
- package/templates/pages/product-gallery/page.tsx +1 -1
- package/templates/pages/settings/page.tsx +1 -1
- package/templates/pages/side-gallery/page.tsx +1 -1
- package/templates/pages/table-page/page.tsx +1 -1
- package/templates/pages/table-page-chart/page.tsx +4 -14
- package/templates/pages/table-page-heatmap-status/page.tsx +1 -1
- package/templates/pages/table-page-shoe-store-heatmap/page.tsx +5 -19
|
@@ -153,10 +153,6 @@ const fmt = (n: number) => `$${n.toFixed(2)}`;
|
|
|
153
153
|
// :root by `@astryxdesign/core/astryx.css`). No StyleX compiler required.
|
|
154
154
|
|
|
155
155
|
const fullWidth: CSSProperties = {width: '100%'};
|
|
156
|
-
// LayoutContent clips overflow by default, which traps position:sticky
|
|
157
|
-
// children (the sticky order summary). With height="auto" the page scrolls
|
|
158
|
-
// at the window, so let overflow be visible here so sticky can pin.
|
|
159
|
-
const visibleOverflow: CSSProperties = {overflow: 'visible'};
|
|
160
156
|
// Form column flex-basis so the two checkout columns share width evenly.
|
|
161
157
|
const formColBasis: CSSProperties = {flexBasis: 0};
|
|
162
158
|
// Space the Order Summary content below its collapsible trigger title.
|
|
@@ -266,9 +262,9 @@ export default function PaymentFormPage() {
|
|
|
266
262
|
|
|
267
263
|
return (
|
|
268
264
|
<Layout
|
|
269
|
-
height="
|
|
265
|
+
height="fill"
|
|
270
266
|
content={
|
|
271
|
-
<LayoutContent padding={0}
|
|
267
|
+
<LayoutContent padding={0}>
|
|
272
268
|
<Center axis="horizontal">
|
|
273
269
|
<Section
|
|
274
270
|
variant="transparent"
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
|
-
import {
|
|
7
|
-
VStack,
|
|
8
|
-
HStack,
|
|
9
|
-
Layout,
|
|
10
|
-
LayoutContent,
|
|
11
|
-
} from '@astryxdesign/core/Layout';
|
|
6
|
+
import {VStack, HStack, Layout, LayoutContent} from '@astryxdesign/core/Layout';
|
|
12
7
|
import {Center} from '@astryxdesign/core/Center';
|
|
13
8
|
import {Grid} from '@astryxdesign/core/Grid';
|
|
14
9
|
import {Text, Heading} from '@astryxdesign/core/Text';
|
|
@@ -203,10 +198,7 @@ function ProductInfo() {
|
|
|
203
198
|
<VStack gap={2}>
|
|
204
199
|
<Text type="label">Finish</Text>
|
|
205
200
|
<VStack hAlign="start">
|
|
206
|
-
<SegmentedControl
|
|
207
|
-
value={finish}
|
|
208
|
-
onChange={setFinish}
|
|
209
|
-
label="Finish">
|
|
201
|
+
<SegmentedControl value={finish} onChange={setFinish} label="Finish">
|
|
210
202
|
{FINISHES.map(f => (
|
|
211
203
|
<SegmentedControlItem
|
|
212
204
|
key={f.value}
|
|
@@ -286,7 +278,7 @@ export default function ProductDetailTemplate() {
|
|
|
286
278
|
|
|
287
279
|
return (
|
|
288
280
|
<Layout
|
|
289
|
-
height="
|
|
281
|
+
height="fill"
|
|
290
282
|
contentWidth={1200}
|
|
291
283
|
content={
|
|
292
284
|
<LayoutContent padding={6}>
|
|
@@ -19,13 +19,7 @@ import {Link} from '@astryxdesign/core/Link';
|
|
|
19
19
|
import {Thumbnail} from '@astryxdesign/core/Thumbnail';
|
|
20
20
|
import {Table, proportional, pixel} from '@astryxdesign/core/Table';
|
|
21
21
|
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
22
|
-
import {
|
|
23
|
-
ChartV2 as Chart,
|
|
24
|
-
ChartGrid,
|
|
25
|
-
ChartAxis,
|
|
26
|
-
area,
|
|
27
|
-
line,
|
|
28
|
-
} from '@astryxdesign/lab';
|
|
22
|
+
import {Chart, ChartGrid, ChartAxis, area, line} from '@astryxdesign/charts';
|
|
29
23
|
import {
|
|
30
24
|
FunnelIcon,
|
|
31
25
|
ArrowDownTrayIcon,
|
|
@@ -481,17 +475,13 @@ const columns: TableColumn<OrderRow>[] = [
|
|
|
481
475
|
key: 'amount',
|
|
482
476
|
header: 'Amount',
|
|
483
477
|
width: pixel(90),
|
|
484
|
-
renderCell: (item: OrderRow) =>
|
|
485
|
-
<Text type="body">${item.amount}</Text>
|
|
486
|
-
),
|
|
478
|
+
renderCell: (item: OrderRow) => <Text type="body">${item.amount}</Text>,
|
|
487
479
|
},
|
|
488
480
|
{
|
|
489
481
|
key: 'customer',
|
|
490
482
|
header: 'Customer',
|
|
491
483
|
width: proportional(2),
|
|
492
|
-
renderCell: (item: OrderRow) =>
|
|
493
|
-
<Text type="body">{item.customer}</Text>
|
|
494
|
-
),
|
|
484
|
+
renderCell: (item: OrderRow) => <Text type="body">{item.customer}</Text>,
|
|
495
485
|
},
|
|
496
486
|
{
|
|
497
487
|
key: 'email',
|
|
@@ -523,7 +513,7 @@ const columns: TableColumn<OrderRow>[] = [
|
|
|
523
513
|
export default function TablePageChartTemplate() {
|
|
524
514
|
return (
|
|
525
515
|
<Layout
|
|
526
|
-
height="
|
|
516
|
+
height="fill"
|
|
527
517
|
header={
|
|
528
518
|
<LayoutHeader hasDivider>
|
|
529
519
|
<HStack gap={2} vAlign="center">
|
|
@@ -19,13 +19,7 @@ import {Link} from '@astryxdesign/core/Link';
|
|
|
19
19
|
import {Thumbnail} from '@astryxdesign/core/Thumbnail';
|
|
20
20
|
import {Table, proportional, pixel} from '@astryxdesign/core/Table';
|
|
21
21
|
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
22
|
-
import {
|
|
23
|
-
ChartV2 as Chart,
|
|
24
|
-
ChartGrid,
|
|
25
|
-
ChartAxis,
|
|
26
|
-
area,
|
|
27
|
-
line,
|
|
28
|
-
} from '@astryxdesign/lab';
|
|
22
|
+
import {Chart, ChartGrid, ChartAxis, area, line} from '@astryxdesign/charts';
|
|
29
23
|
import {
|
|
30
24
|
FunnelIcon,
|
|
31
25
|
ArrowDownTrayIcon,
|
|
@@ -35,11 +29,7 @@ import {
|
|
|
35
29
|
// ============= DATA =============
|
|
36
30
|
|
|
37
31
|
type ProductCategory =
|
|
38
|
-
| '
|
|
39
|
-
| 'Lifestyle'
|
|
40
|
-
| 'Basketball'
|
|
41
|
-
| 'Training'
|
|
42
|
-
| 'Skateboarding';
|
|
32
|
+
'Running' | 'Lifestyle' | 'Basketball' | 'Training' | 'Skateboarding';
|
|
43
33
|
|
|
44
34
|
function shoeSvg(bg: string, accent: string) {
|
|
45
35
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" rx="12" fill="${bg}"/><g transform="translate(22.5, 22.5) scale(2.29)" fill="none" stroke="${accent}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m15 10.42 4.8-5.07"/><path d="M19 18h3"/><path d="M9.5 22 21.414 9.415A2 2 0 0 0 21.2 6.4l-5.61-4.208A1 1 0 0 0 14 3v2a2 2 0 0 1-1.394 1.906L8.677 8.053A1 1 0 0 0 8 9c-.155 6.393-2.082 9-4 9a2 2 0 0 0 0 4h14"/></g></svg>`;
|
|
@@ -839,17 +829,13 @@ const columns: TableColumn<OrderRow>[] = [
|
|
|
839
829
|
key: 'amount',
|
|
840
830
|
header: 'Amount',
|
|
841
831
|
width: pixel(90),
|
|
842
|
-
renderCell: (item: OrderRow) =>
|
|
843
|
-
<Text type="body">${item.amount}</Text>
|
|
844
|
-
),
|
|
832
|
+
renderCell: (item: OrderRow) => <Text type="body">${item.amount}</Text>,
|
|
845
833
|
},
|
|
846
834
|
{
|
|
847
835
|
key: 'customer',
|
|
848
836
|
header: 'Customer',
|
|
849
837
|
width: proportional(2),
|
|
850
|
-
renderCell: (item: OrderRow) =>
|
|
851
|
-
<Text type="body">{item.customer}</Text>
|
|
852
|
-
),
|
|
838
|
+
renderCell: (item: OrderRow) => <Text type="body">{item.customer}</Text>,
|
|
853
839
|
},
|
|
854
840
|
{
|
|
855
841
|
key: 'email',
|
|
@@ -881,7 +867,7 @@ const columns: TableColumn<OrderRow>[] = [
|
|
|
881
867
|
export default function TablePageShoeStoreHeatmapTemplate() {
|
|
882
868
|
return (
|
|
883
869
|
<Layout
|
|
884
|
-
height="
|
|
870
|
+
height="fill"
|
|
885
871
|
header={
|
|
886
872
|
<LayoutHeader hasDivider>
|
|
887
873
|
<HStack gap={2} vAlign="center">
|