@astryxdesign/cli 0.1.5-canary.c4c1f5b → 0.1.5-canary.efe7cc3
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.5-canary.
|
|
3
|
+
"version": "0.1.5-canary.efe7cc3",
|
|
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.5-canary.
|
|
79
|
-
"@astryxdesign/core": "0.1.5-canary.
|
|
80
|
-
"@astryxdesign/lab": "0.1.5-canary.
|
|
81
|
-
"@astryxdesign/theme-neutral": "0.1.5-canary.
|
|
78
|
+
"@astryxdesign/charts": "0.1.5-canary.efe7cc3",
|
|
79
|
+
"@astryxdesign/core": "0.1.5-canary.efe7cc3",
|
|
80
|
+
"@astryxdesign/lab": "0.1.5-canary.efe7cc3",
|
|
81
|
+
"@astryxdesign/theme-neutral": "0.1.5-canary.efe7cc3",
|
|
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.5-canary.
|
|
100
|
-
"@astryxdesign/core": "0.1.5-canary.
|
|
101
|
-
"@astryxdesign/lab": "0.1.5-canary.
|
|
102
|
-
"@astryxdesign/theme-neutral": "0.1.5-canary.
|
|
99
|
+
"@astryxdesign/charts": "0.1.5-canary.efe7cc3",
|
|
100
|
+
"@astryxdesign/core": "0.1.5-canary.efe7cc3",
|
|
101
|
+
"@astryxdesign/lab": "0.1.5-canary.efe7cc3",
|
|
102
|
+
"@astryxdesign/theme-neutral": "0.1.5-canary.efe7cc3",
|
|
103
103
|
"gpt-tokenizer": "^3.4.0"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
-
export const doc = {
|
|
5
|
-
type: 'block',
|
|
6
|
-
exampleFor: 'useTableRowIndex',
|
|
7
|
-
name: 'useTableRowIndex — Numbered Rows',
|
|
8
|
-
displayName: 'useTableRowIndex — Numbered Rows',
|
|
9
|
-
description:
|
|
10
|
-
'A table with a prepended row-number column via useTableRowIndex. Numbering is monospaced, right-aligned, and follows the rendered data order.',
|
|
11
|
-
isReady: true,
|
|
12
|
-
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['Table'],
|
|
14
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Table,
|
|
7
|
-
useTableRowIndex,
|
|
8
|
-
proportional,
|
|
9
|
-
pixel,
|
|
10
|
-
} from '@astryxdesign/core/Table';
|
|
11
|
-
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
12
|
-
|
|
13
|
-
interface Track extends Record<string, unknown> {
|
|
14
|
-
id: string;
|
|
15
|
-
title: string;
|
|
16
|
-
artist: string;
|
|
17
|
-
plays: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const tracks: Track[] = [
|
|
21
|
-
{id: 't1', title: 'Nightfall', artist: 'Ava Chen', plays: 1820},
|
|
22
|
-
{id: 't2', title: 'Ember', artist: 'Liam Park', plays: 942},
|
|
23
|
-
{id: 't3', title: 'Tidal', artist: 'Zoe Vega', plays: 3310},
|
|
24
|
-
{id: 't4', title: 'Cinder', artist: 'Max Ross', plays: 604},
|
|
25
|
-
{id: 't5', title: 'Halcyon', artist: 'Mia Cole', plays: 2075},
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
const columns: TableColumn<Track>[] = [
|
|
29
|
-
{key: 'title', header: 'Title', width: proportional(2)},
|
|
30
|
-
{key: 'artist', header: 'Artist', width: proportional(2)},
|
|
31
|
-
{key: 'plays', header: 'Plays', width: pixel(90), align: 'end'},
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
export default function TableRowIndexTable() {
|
|
35
|
-
// Pass the rendered data array — numbering follows its order.
|
|
36
|
-
const rowIndex = useTableRowIndex<Track>({data: tracks});
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<Table
|
|
40
|
-
data={tracks}
|
|
41
|
-
columns={columns}
|
|
42
|
-
idKey="id"
|
|
43
|
-
hasHover
|
|
44
|
-
plugins={{rowIndex}}
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
47
|
-
}
|