@argus-table/react 0.0.0-stage → 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Joessst-Dev and Argus Table contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,98 @@
1
- # Temporary Holding Version
1
+ # @argus-table/react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React components for [`<argus-table>`](https://www.npmjs.com/package/argus-table): `<ArgusTable>` and `<ArgusColumn>`, with typed props and typed events. The row type is inferred from `data`.
4
+
5
+ **[Docs and live examples](https://joessst-dev.github.io/argus-table/)** · [GitHub](https://github.com/Joessst-Dev/argus-table)
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i @argus-table/react @argus-table/themes
11
+ ```
12
+
13
+ `argus-table` comes with it. React 18.3 or 19 is a peer dependency.
14
+
15
+ ## A first table
16
+
17
+ ```tsx
18
+ import { ArgusTable, type ColumnDef } from '@argus-table/react';
19
+ import '@argus-table/themes/default.css';
20
+
21
+ interface Order {
22
+ id: string;
23
+ customer: string;
24
+ total: number;
25
+ }
26
+
27
+ const columns: ColumnDef<Order>[] = [
28
+ { id: 'id', header: 'Order', accessor: 'id', width: 90, pin: 'start' },
29
+ { id: 'customer', header: 'Customer', accessor: 'customer', width: { flex: 1 }, sortable: true },
30
+ { id: 'total', header: 'Total', accessor: 'total', width: 110, align: 'end', sortable: true },
31
+ ];
32
+
33
+ export function Orders({ orders }: { orders: Order[] }) {
34
+ return (
35
+ <ArgusTable
36
+ aria-label="Orders"
37
+ style={{ height: 400 }}
38
+ columns={columns}
39
+ data={orders}
40
+ getRowId={(order) => order.id}
41
+ onRowClick={(e) => console.log(e.detail.row)} // e.detail.row is an Order
42
+ />
43
+ );
44
+ }
45
+ ```
46
+
47
+ - **Props** set the element's properties: `columns`, `data`, `dataSource`, `pinnedRows`, `getRowId`, `rowHeight`, `density`, `overscan`, `sorting`, `columnSizing` and `columnOrder`. Other props (`aria-label`, `className`, `style`, …) go to the element as usual.
48
+ - **Events** are `on*` props that get the element's `CustomEvent`: `onSortChange`, `onColumnResize`, `onColumnReorder`, `onCellClick`, `onRowClick`, `onRangeChange` and `onLoadError`. The details are in the [`argus-table` README](https://www.npmjs.com/package/argus-table).
49
+ - **Cells:** a column's `cell` function returns a string, a number, a DOM node or a Lit template. React elements in cells are planned.
50
+ - **Height:** the table virtualizes its rows, so it needs a bounded height. Its default is 400 px.
51
+
52
+ ## Controlled state
53
+
54
+ `sorting`, `columnSizing` and `columnOrder` work like a controlled input. Leave the prop out and the table keeps the state itself. Set it, and the table shows what you pass and only proposes changes through the event:
55
+
56
+ ```tsx
57
+ const [sorting, setSorting] = useState<SortState>([]);
58
+
59
+ <ArgusTable
60
+ columns={columns}
61
+ data={orders}
62
+ sorting={sorting}
63
+ onSortChange={(e) => setSorting(e.detail.sorting)}
64
+ />;
65
+ ```
66
+
67
+ ## Methods
68
+
69
+ A `ref` gives you the element, with `refresh()`, `scrollToRow(index)` and `autosizeColumns(ids?)`:
70
+
71
+ ```tsx
72
+ const table = useRef<ArgusTableElement<Order>>(null);
73
+
74
+ <ArgusTable ref={table} columns={columns} data={orders} />;
75
+ // later
76
+ await table.current?.scrollToRow(0);
77
+ ```
78
+
79
+ ## Columns as children
80
+
81
+ `<ArgusColumn>` renders an `<argus-column>`, so columns can come from a `.map()`. Changing, adding, removing or moving one keeps the widths, the order and the sort:
82
+
83
+ ```tsx
84
+ <ArgusTable<Order> data={orders}>
85
+ <ArgusColumn columnId="id" header="Order" accessor="id" width={90} pin="start" />
86
+ <ArgusColumn<Order> columnId="total" header="Total" accessor={(o) => o.total} sortable />
87
+ </ArgusTable>
88
+ ```
89
+
90
+ A non-empty `columns` prop wins over the children.
91
+
92
+ ## Server rendering
93
+
94
+ The modules start with `'use client'`, so they work in React Server Components apps such as the Next.js App Router. On the server the table renders as an empty `<argus-table>` and fills in once the browser has loaded it.
95
+
96
+ ## License
97
+
98
+ MIT
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { ArgusTable as ArgusTableElement, ArgusColumn as ArgusColumnElement } from 'argus-table';
3
+ import type { CellClickDetail, ColumnReorderDetail, ColumnResizeDetail, LoadErrorDetail, RangeChangeDetail, RowClickDetail, SortChangeDetail } from 'argus-table';
4
+ /** The properties of `<argus-table>` that `<ArgusTable>` sets on the element. */
5
+ export type ArgusTableElementProps<T = unknown> = Partial<Pick<ArgusTableElement<T>, 'columns' | 'data' | 'dataSource' | 'pinnedRows' | 'getRowId' | 'rowHeight' | 'density' | 'overscan' | 'sorting' | 'columnSizing' | 'columnOrder'>>;
6
+ /** The event props of `<ArgusTable>`: each gets the element's `CustomEvent`. */
7
+ export interface ArgusTableEventProps<T = unknown> {
8
+ /** `argus-sort-change`: A sortable header was clicked, or activated with Enter or Space. `detail: { sorting }`: the new order, or the proposed one when `sorting` is controlled. */
9
+ onSortChange?: (event: CustomEvent<SortChangeDetail>) => void;
10
+ /** `argus-column-resize`: A column was resized: by dragging its handle, with Alt+Arrow on its header, by a double-click on its handle (fit to content) or by `autosizeColumns()`. `detail: { columnId, width, sizing }`: the new widths, or the proposed ones when `columnSizing` is controlled. Fires on every frame of a drag, and once per column that `autosizeColumns()` changes. */
11
+ onColumnResize?: (event: CustomEvent<ColumnResizeDetail>) => void;
12
+ /** `argus-column-reorder`: A column was moved: by dragging its header, or with Alt+Shift+Arrow on its focused header. Columns move within their own group (start-pinned, scrolling, end-pinned). `detail: { columnId, order }`: the new order, or the proposed one when `columnOrder` is controlled. Fires once per move, on drop. */
13
+ onColumnReorder?: (event: CustomEvent<ColumnReorderDetail>) => void;
14
+ /** `argus-cell-click`: A body or pinned-row cell was clicked, or Enter was pressed on it. `detail: { row, columnId, value, pinned? }`; `pinned` is `'top'` or `'bottom'` for a pinned row. Fires before `argus-row-click`. */
15
+ onCellClick?: (event: CustomEvent<CellClickDetail<T>>) => void;
16
+ /** `argus-row-click`: A body or pinned row was clicked, or Enter was pressed on one of its cells. `detail: { row, rowId, index, pinned? }`; for a pinned row, `index` is its index in its list. */
17
+ onRowClick?: (event: CustomEvent<RowClickDetail<T>>) => void;
18
+ /** `argus-range-change`: The visible rows changed. `detail: { start, end }` (row indices, inclusive). */
19
+ onRangeChange?: (event: CustomEvent<RangeChangeDetail>) => void;
20
+ /** `argus-load-error`: A `dataSource` page failed to load: `getRows()` rejected or threw. `detail: { error, start, end }` (`end` exclusive). The rows show a Retry button. */
21
+ onLoadError?: (event: CustomEvent<LoadErrorDetail>) => void;
22
+ }
23
+ /** Props of `<ArgusTable>`: element properties, event handlers and the usual HTML attributes. */
24
+ export type ArgusTableProps<T = unknown> = Omit<React.HTMLAttributes<ArgusTableElement<T>>, keyof ArgusTableElementProps<T> | keyof ArgusTableEventProps<T>> & ArgusTableElementProps<T> & ArgusTableEventProps<T> & {
25
+ /** The `<argus-table>` element, for its methods. */
26
+ ref?: React.Ref<ArgusTableElement<T>>;
27
+ };
28
+ /** `<argus-table>` as a React component. */
29
+ export declare const ArgusTable: <T = unknown>(props: ArgusTableProps<T>) => React.ReactElement | null;
30
+ /** The properties of `<argus-column>` that `<ArgusColumn>` sets on the element. */
31
+ export type ArgusColumnElementProps<T = unknown> = Partial<Pick<ArgusColumnElement<T>, 'columnId' | 'header' | 'accessor' | 'cell' | 'width' | 'minWidth' | 'maxWidth' | 'pin' | 'align' | 'sortable' | 'resizable' | 'reorderable'>>;
32
+ /** Props of `<ArgusColumn>`: element properties and the usual HTML attributes. */
33
+ export type ArgusColumnProps<T = unknown> = Omit<React.HTMLAttributes<ArgusColumnElement<T>>, keyof ArgusColumnElementProps<T>> & ArgusColumnElementProps<T> & {
34
+ /** The `<argus-column>` element. */
35
+ ref?: React.Ref<ArgusColumnElement<T>>;
36
+ };
37
+ /** `<argus-column>` as a React component. */
38
+ export declare const ArgusColumn: <T = unknown>(props: ArgusColumnProps<T>) => React.ReactElement | null;
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { ownEvents } from "../own-events.js";
3
+ import * as React from "react";
4
+ import { createComponent } from "@lit/react";
5
+ import { ArgusColumn, ArgusTable } from "argus-table";
6
+ // src/generated/elements.ts
7
+ /** `<argus-table>` as a React component. */
8
+ var ArgusTable$1 = ownEvents(createComponent({
9
+ tagName: "argus-table",
10
+ elementClass: ArgusTable,
11
+ react: React,
12
+ events: {
13
+ onSortChange: "argus-sort-change",
14
+ onColumnResize: "argus-column-resize",
15
+ onColumnReorder: "argus-column-reorder",
16
+ onCellClick: "argus-cell-click",
17
+ onRowClick: "argus-row-click",
18
+ onRangeChange: "argus-range-change",
19
+ onLoadError: "argus-load-error"
20
+ },
21
+ displayName: "ArgusTable"
22
+ }), [
23
+ "onSortChange",
24
+ "onColumnResize",
25
+ "onColumnReorder",
26
+ "onCellClick",
27
+ "onRowClick",
28
+ "onRangeChange",
29
+ "onLoadError"
30
+ ], "ArgusTable");
31
+ /** `<argus-column>` as a React component. */
32
+ var ArgusColumn$1 = createComponent({
33
+ tagName: "argus-column",
34
+ elementClass: ArgusColumn,
35
+ react: React,
36
+ events: {},
37
+ displayName: "ArgusColumn"
38
+ });
39
+ export { ArgusColumn$1 as ArgusColumn, ArgusTable$1 as ArgusTable };
40
+
41
+ //# sourceMappingURL=elements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements.js","names":["ArgusTable","ArgusTableElement","ArgusColumn","ArgusColumnElement"],"sources":["../../src/generated/elements.ts"],"sourcesContent":["// Generated by tools/generate-wrappers from argus-table's Custom Elements Manifest.\n// Don't edit by hand: run `pnpm --filter @argus-table/react generate`.\nimport * as React from 'react';\nimport { createComponent } from '@lit/react';\nimport { ArgusTable as ArgusTableElement, ArgusColumn as ArgusColumnElement } from 'argus-table';\nimport type {\n CellClickDetail,\n ColumnReorderDetail,\n ColumnResizeDetail,\n LoadErrorDetail,\n RangeChangeDetail,\n RowClickDetail,\n SortChangeDetail,\n} from 'argus-table';\nimport { ownEvents } from '../own-events.js';\n\n/** The properties of `<argus-table>` that `<ArgusTable>` sets on the element. */\nexport type ArgusTableElementProps<T = unknown> = Partial<\n Pick<\n ArgusTableElement<T>,\n | 'columns'\n | 'data'\n | 'dataSource'\n | 'pinnedRows'\n | 'getRowId'\n | 'rowHeight'\n | 'density'\n | 'overscan'\n | 'sorting'\n | 'columnSizing'\n | 'columnOrder'\n >\n>;\n\n/** The event props of `<ArgusTable>`: each gets the element's `CustomEvent`. */\nexport interface ArgusTableEventProps<T = unknown> {\n /** `argus-sort-change`: A sortable header was clicked, or activated with Enter or Space. `detail: { sorting }`: the new order, or the proposed one when `sorting` is controlled. */\n onSortChange?: (event: CustomEvent<SortChangeDetail>) => void;\n /** `argus-column-resize`: A column was resized: by dragging its handle, with Alt+Arrow on its header, by a double-click on its handle (fit to content) or by `autosizeColumns()`. `detail: { columnId, width, sizing }`: the new widths, or the proposed ones when `columnSizing` is controlled. Fires on every frame of a drag, and once per column that `autosizeColumns()` changes. */\n onColumnResize?: (event: CustomEvent<ColumnResizeDetail>) => void;\n /** `argus-column-reorder`: A column was moved: by dragging its header, or with Alt+Shift+Arrow on its focused header. Columns move within their own group (start-pinned, scrolling, end-pinned). `detail: { columnId, order }`: the new order, or the proposed one when `columnOrder` is controlled. Fires once per move, on drop. */\n onColumnReorder?: (event: CustomEvent<ColumnReorderDetail>) => void;\n /** `argus-cell-click`: A body or pinned-row cell was clicked, or Enter was pressed on it. `detail: { row, columnId, value, pinned? }`; `pinned` is `'top'` or `'bottom'` for a pinned row. Fires before `argus-row-click`. */\n onCellClick?: (event: CustomEvent<CellClickDetail<T>>) => void;\n /** `argus-row-click`: A body or pinned row was clicked, or Enter was pressed on one of its cells. `detail: { row, rowId, index, pinned? }`; for a pinned row, `index` is its index in its list. */\n onRowClick?: (event: CustomEvent<RowClickDetail<T>>) => void;\n /** `argus-range-change`: The visible rows changed. `detail: { start, end }` (row indices, inclusive). */\n onRangeChange?: (event: CustomEvent<RangeChangeDetail>) => void;\n /** `argus-load-error`: A `dataSource` page failed to load: `getRows()` rejected or threw. `detail: { error, start, end }` (`end` exclusive). The rows show a Retry button. */\n onLoadError?: (event: CustomEvent<LoadErrorDetail>) => void;\n}\n\n/** Props of `<ArgusTable>`: element properties, event handlers and the usual HTML attributes. */\nexport type ArgusTableProps<T = unknown> = Omit<\n React.HTMLAttributes<ArgusTableElement<T>>,\n keyof ArgusTableElementProps<T> | keyof ArgusTableEventProps<T>\n> &\n ArgusTableElementProps<T> &\n ArgusTableEventProps<T> & {\n /** The `<argus-table>` element, for its methods. */\n ref?: React.Ref<ArgusTableElement<T>>;\n };\n\n/** `<argus-table>` as a React component. */\nexport const ArgusTable = ownEvents(\n createComponent({\n tagName: 'argus-table',\n elementClass: ArgusTableElement,\n react: React,\n events: {\n onSortChange: 'argus-sort-change',\n onColumnResize: 'argus-column-resize',\n onColumnReorder: 'argus-column-reorder',\n onCellClick: 'argus-cell-click',\n onRowClick: 'argus-row-click',\n onRangeChange: 'argus-range-change',\n onLoadError: 'argus-load-error',\n },\n displayName: 'ArgusTable',\n }),\n [\n 'onSortChange',\n 'onColumnResize',\n 'onColumnReorder',\n 'onCellClick',\n 'onRowClick',\n 'onRangeChange',\n 'onLoadError',\n ],\n 'ArgusTable',\n) as unknown as <T = unknown>(props: ArgusTableProps<T>) => React.ReactElement | null;\n\n/** The properties of `<argus-column>` that `<ArgusColumn>` sets on the element. */\nexport type ArgusColumnElementProps<T = unknown> = Partial<\n Pick<\n ArgusColumnElement<T>,\n | 'columnId'\n | 'header'\n | 'accessor'\n | 'cell'\n | 'width'\n | 'minWidth'\n | 'maxWidth'\n | 'pin'\n | 'align'\n | 'sortable'\n | 'resizable'\n | 'reorderable'\n >\n>;\n\n/** Props of `<ArgusColumn>`: element properties and the usual HTML attributes. */\nexport type ArgusColumnProps<T = unknown> = Omit<\n React.HTMLAttributes<ArgusColumnElement<T>>,\n keyof ArgusColumnElementProps<T>\n> &\n ArgusColumnElementProps<T> & {\n /** The `<argus-column>` element. */\n ref?: React.Ref<ArgusColumnElement<T>>;\n };\n\n/** `<argus-column>` as a React component. */\nexport const ArgusColumn = createComponent({\n tagName: 'argus-column',\n elementClass: ArgusColumnElement,\n react: React,\n events: {},\n displayName: 'ArgusColumn',\n}) as unknown as <T = unknown>(props: ArgusColumnProps<T>) => React.ReactElement | null;\n"],"mappings":";;;;;;;AAgEA,IAAaA,eAAa,UACxB,gBAAgB;CACd,SAAS;CACT,cAAcC;CACd,OAAO;CACP,QAAQ;EACN,cAAc;EACd,gBAAgB;EAChB,iBAAiB;EACjB,aAAa;EACb,YAAY;EACZ,eAAe;EACf,aAAa;CACf;CACA,aAAa;AACf,CAAC,GACD;CACE;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GACA,YACF;;AAgCA,IAAaC,gBAAc,gBAAgB;CACzC,SAAS;CACT,cAAcC;CACd,OAAO;CACP,QAAQ,CAAC;CACT,aAAa;AACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ArgusColumn, ArgusTable } from './generated/elements.js';
2
+ export type { ArgusColumnElementProps, ArgusColumnProps, ArgusTableElementProps, ArgusTableEventProps, ArgusTableProps, } from './generated/elements.js';
3
+ export type { ArgusColumn as ArgusColumnElement, ArgusTable as ArgusTableElement, } from 'argus-table';
4
+ export type { CellClickDetail, CellContent, CellContext, ColumnAlign, ColumnDef, ColumnOrderState, ColumnPin, ColumnReorderDetail, ColumnResizeDetail, ColumnSizingState, ColumnWidth, DataSource, Density, LoadErrorDetail, PinnedRows, RangeChangeDetail, RowClickDetail, RowPin, RowsRequest, RowsResponse, SortChangeDetail, SortItem, SortState, } from 'argus-table';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export { ArgusColumn, ArgusTable } from "./generated/elements.js";
@@ -0,0 +1,3 @@
1
+ import { type ElementType } from 'react';
2
+ /** Wraps a @lit/react component so that its event props only see the element's own events. */
3
+ export declare function ownEvents(component: ElementType, eventProps: readonly string[], displayName: string): import("react").ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & import("react").RefAttributes<unknown>>;
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { createElement, forwardRef } from "react";
3
+ // src/own-events.ts
4
+ /** One wrapper per handler, so @lit/react sees the same function on every render. */
5
+ var wrappers = /* @__PURE__ */ new WeakMap();
6
+ /**
7
+ * A handler that only runs for the element's own events. The table's events
8
+ * bubble, so those of a table nested in a cell also pass the outer table.
9
+ */
10
+ function own(handler) {
11
+ let wrapper = wrappers.get(handler);
12
+ if (!wrapper) {
13
+ wrapper = (event) => {
14
+ if (event.target === event.currentTarget) handler(event);
15
+ };
16
+ wrappers.set(handler, wrapper);
17
+ }
18
+ return wrapper;
19
+ }
20
+ /** Wraps a @lit/react component so that its event props only see the element's own events. */
21
+ function ownEvents(component, eventProps, displayName) {
22
+ const wrapped = forwardRef((props, ref) => {
23
+ const next = {
24
+ ...props,
25
+ ref
26
+ };
27
+ for (const key of eventProps) {
28
+ const handler = next[key];
29
+ if (typeof handler === "function") next[key] = own(handler);
30
+ }
31
+ return createElement(component, next);
32
+ });
33
+ wrapped.displayName = displayName;
34
+ return wrapped;
35
+ }
36
+ export { ownEvents };
37
+
38
+ //# sourceMappingURL=own-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"own-events.js","names":[],"sources":["../src/own-events.ts"],"sourcesContent":["import { createElement, forwardRef, type ElementType } from 'react';\n\ntype Handler = (event: Event) => void;\n\n/** One wrapper per handler, so @lit/react sees the same function on every render. */\nconst wrappers = new WeakMap<Handler, Handler>();\n\n/**\n * A handler that only runs for the element's own events. The table's events\n * bubble, so those of a table nested in a cell also pass the outer table.\n */\nfunction own(handler: Handler): Handler {\n let wrapper = wrappers.get(handler);\n if (!wrapper) {\n wrapper = (event) => {\n if (event.target === event.currentTarget) handler(event);\n };\n wrappers.set(handler, wrapper);\n }\n return wrapper;\n}\n\n/** Wraps a @lit/react component so that its event props only see the element's own events. */\nexport function ownEvents(\n component: ElementType,\n eventProps: readonly string[],\n displayName: string,\n) {\n const wrapped = forwardRef<unknown, Record<string, unknown>>((props, ref) => {\n const next: Record<string, unknown> = { ...props, ref };\n for (const key of eventProps) {\n const handler = next[key];\n if (typeof handler === 'function') next[key] = own(handler as Handler);\n }\n return createElement(component, next);\n });\n wrapped.displayName = displayName;\n return wrapped;\n}\n"],"mappings":";;;;AAKA,IAAM,2BAAW,IAAI,QAA0B;;;;;AAM/C,SAAS,IAAI,SAA2B;CACtC,IAAI,UAAU,SAAS,IAAI,OAAO;CAClC,IAAI,CAAC,SAAS;EACZ,WAAW,UAAU;GACnB,IAAI,MAAM,WAAW,MAAM,eAAe,QAAQ,KAAK;EACzD;EACA,SAAS,IAAI,SAAS,OAAO;CAC/B;CACA,OAAO;AACT;;AAGA,SAAgB,UACd,WACA,YACA,aACA;CACA,MAAM,UAAU,YAA8C,OAAO,QAAQ;EAC3E,MAAM,OAAgC;GAAE,GAAG;GAAO;EAAI;EACtD,KAAK,MAAM,OAAO,YAAY;GAC5B,MAAM,UAAU,KAAK;GACrB,IAAI,OAAO,YAAY,YAAY,KAAK,OAAO,IAAI,OAAkB;EACvE;EACA,OAAO,cAAc,WAAW,IAAI;CACtC,CAAC;CACD,QAAQ,cAAc;CACtB,OAAO;AACT"}
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@argus-table/react",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "React components for argus-table: typed props and events for <argus-table> and <argus-column>.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Joessst-Dev/argus-table.git",
9
+ "directory": "packages/react"
10
+ },
11
+ "type": "module",
12
+ "nx": {
13
+ "name": "react",
14
+ "implicitDependencies": [
15
+ "generate-wrappers"
16
+ ]
17
+ },
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/index.js"
22
+ },
23
+ "./package.json": "./package.json"
24
+ },
25
+ "types": "./dist/index.d.ts",
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "sideEffects": false,
32
+ "dependencies": {
33
+ "@lit/react": "^1.0.8",
34
+ "argus-table": "0.2.0"
35
+ },
36
+ "peerDependencies": {
37
+ "react": "^18.3.0 || ^19.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@arethetypeswrong/cli": "^0.18.5",
41
+ "@types/react": "^19.3.0",
42
+ "@types/react-dom": "^19.3.0",
43
+ "@vitest/browser-playwright": "^5.1.0",
44
+ "playwright": "1.63.0",
45
+ "publint": "^0.3.25",
46
+ "react": "^19.3.1",
47
+ "react-dom": "^19.3.1",
48
+ "vite": "^8.3.5",
49
+ "vitest": "^5.1.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "scripts": {
55
+ "build": "vite build && tsc -p tsconfig.build.json && publint --strict && attw --pack . --profile esm-only",
56
+ "generate": "node ../../tools/generate-wrappers/src/cli.ts react",
57
+ "typecheck": "tsc -p tsconfig.json --noEmit",
58
+ "lint": "node ../../tools/generate-wrappers/src/cli.ts react --check && eslint .",
59
+ "test": "vitest run"
60
+ }
6
61
  }