@ai-matrx/records-ui 0.116.122 → 0.116.124
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 +9 -0
- package/dist/{SaveToTable-VNAYIDXB.js → SaveToTable-BEKANHD3.js} +4 -3
- package/dist/{chunk-KJAVVXRW.js → chunk-5RU7BPCU.js} +8 -230
- package/dist/chunk-5RU7BPCU.js.map +1 -0
- package/dist/chunk-6DK2DKTD.js +235 -0
- package/dist/chunk-6DK2DKTD.js.map +1 -0
- package/dist/{chunk-6RFL5KYR.js → chunk-B7A3B6F4.js} +2 -2
- package/dist/{chunk-U2B3TLDZ.js → chunk-EB6IVWGJ.js} +193 -77
- package/dist/chunk-EB6IVWGJ.js.map +1 -0
- package/dist/data-source.d.cts +1 -1
- package/dist/data-source.d.ts +1 -1
- package/dist/decision-gate.d.cts +4 -4
- package/dist/decision-gate.d.ts +4 -4
- package/dist/entity-doors.d.cts +24 -28
- package/dist/entity-doors.d.ts +24 -28
- package/dist/entity-ref.d.cts +48 -52
- package/dist/entity-ref.d.ts +48 -52
- package/dist/first-page.d.cts +4 -4
- package/dist/first-page.d.ts +4 -4
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +104 -106
- package/dist/helpers.d.ts +104 -106
- package/dist/helpers.js.map +1 -1
- package/dist/html-frame.d.cts +2 -2
- package/dist/html-frame.d.ts +2 -2
- package/dist/index.cjs +531 -282
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +488 -480
- package/dist/index.d.ts +488 -480
- package/dist/index.js +351 -214
- package/dist/index.js.map +1 -1
- package/dist/list-dimensions.cjs +203 -7
- package/dist/list-dimensions.cjs.map +1 -1
- package/dist/list-dimensions.d.cts +8 -8
- package/dist/list-dimensions.d.ts +8 -8
- package/dist/list-dimensions.js +10 -7
- package/dist/list-dimensions.js.map +1 -1
- package/dist/objectActions-DeP_tTmc.d.cts +12 -12
- package/dist/objectActions-DeP_tTmc.d.ts +12 -12
- package/dist/pickers.cjs +179 -55
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.d.cts +13 -13
- package/dist/pickers.d.ts +13 -13
- package/dist/pickers.js +3 -2
- package/dist/skeleton.d.cts +11 -11
- package/dist/skeleton.d.ts +11 -11
- package/dist/table-shape.d.cts +7 -7
- package/dist/table-shape.d.ts +7 -7
- package/package.json +2 -2
- package/dist/chunk-KJAVVXRW.js.map +0 -1
- package/dist/chunk-U2B3TLDZ.js.map +0 -1
- /package/dist/{SaveToTable-VNAYIDXB.js.map → SaveToTable-BEKANHD3.js.map} +0 -0
- /package/dist/{chunk-6RFL5KYR.js.map → chunk-B7A3B6F4.js.map} +0 -0
package/dist/pickers.d.cts
CHANGED
|
@@ -8,24 +8,24 @@ interface TableAnywhere {
|
|
|
8
8
|
table_name: string;
|
|
9
9
|
organization_id: Uuid;
|
|
10
10
|
organization_name: string;
|
|
11
|
-
kind:
|
|
11
|
+
kind: null | string;
|
|
12
12
|
platform_owned: boolean;
|
|
13
13
|
/** When the table last changed (the door's own column) — what tells two same-named tables apart. */
|
|
14
|
-
updated_at?:
|
|
14
|
+
updated_at?: null | string;
|
|
15
15
|
/** Who made it, when the door says. */
|
|
16
|
-
created_by_name?:
|
|
16
|
+
created_by_name?: null | string;
|
|
17
17
|
}
|
|
18
18
|
interface TablesAnywhere {
|
|
19
19
|
loading: boolean;
|
|
20
20
|
/** The store's own sentence when the list was refused. */
|
|
21
|
-
error:
|
|
21
|
+
error: null | string;
|
|
22
22
|
rows: TableAnywhere[];
|
|
23
23
|
}
|
|
24
24
|
/** Every Table the person can open, in every organization, sorted by name. */
|
|
25
25
|
declare function useTablesAnywhere(dataSource: RecordsDataSource): TablesAnywhere;
|
|
26
26
|
interface TablePickerProps {
|
|
27
27
|
dataSource: RecordsDataSource;
|
|
28
|
-
value:
|
|
28
|
+
value: null | string;
|
|
29
29
|
onChange: (tableId: string) => void;
|
|
30
30
|
disabled?: boolean;
|
|
31
31
|
/** Hand in an already-read list to skip a second read. */
|
|
@@ -37,7 +37,7 @@ interface TableScopeProps {
|
|
|
37
37
|
dataSource: RecordsDataSource;
|
|
38
38
|
/** The signed-in person — the actor every read runs as. */
|
|
39
39
|
userId: Uuid | null;
|
|
40
|
-
tableId:
|
|
40
|
+
tableId: null | string;
|
|
41
41
|
children: ReactNode;
|
|
42
42
|
/** Shown while the Table's organization is unknown, or when no Table is chosen. */
|
|
43
43
|
fallback?: ReactNode;
|
|
@@ -61,7 +61,7 @@ interface ColumnValuesEditorProps {
|
|
|
61
61
|
declare function ColumnValuesEditor({ tableId, value, onChange, disabled, addLabel }: ColumnValuesEditorProps): react.JSX.Element;
|
|
62
62
|
interface RecordPickerProps {
|
|
63
63
|
tableId: string;
|
|
64
|
-
value:
|
|
64
|
+
value: null | string;
|
|
65
65
|
onChange: (recordId: string) => void;
|
|
66
66
|
disabled?: boolean;
|
|
67
67
|
}
|
|
@@ -75,7 +75,7 @@ interface DataBinding {
|
|
|
75
75
|
table_id: string;
|
|
76
76
|
record_id?: string;
|
|
77
77
|
field_key?: string;
|
|
78
|
-
match?: Record<string,
|
|
78
|
+
match?: Record<string, boolean | null | number | string>;
|
|
79
79
|
limit?: number;
|
|
80
80
|
transform?: {
|
|
81
81
|
name: "list";
|
|
@@ -116,7 +116,7 @@ interface DataBindingPickerProps {
|
|
|
116
116
|
onChange: (binding: DataBinding) => void;
|
|
117
117
|
disabled?: boolean;
|
|
118
118
|
/** The host's starting row cap for a whole-table read (a knob the host reads), if any. */
|
|
119
|
-
defaultRowLimit?:
|
|
119
|
+
defaultRowLimit?: null | number;
|
|
120
120
|
}
|
|
121
121
|
/** "From my data": table → shape → record / field → template → when it's missing. */
|
|
122
122
|
declare function DataBindingPicker({ dataSource, userId, binding, onChange, disabled, defaultRowLimit }: DataBindingPickerProps): react.JSX.Element;
|
|
@@ -124,21 +124,21 @@ declare function DataBindingPicker({ dataSource, userId, binding, onChange, disa
|
|
|
124
124
|
/** The chosen table's name, or `—` when it is not one this person can open. */
|
|
125
125
|
declare function TableNameText({ dataSource, tableId }: {
|
|
126
126
|
dataSource: RecordsDataSource;
|
|
127
|
-
tableId:
|
|
127
|
+
tableId: null | string;
|
|
128
128
|
}): react.JSX.Element;
|
|
129
129
|
/** `{column key: value}` as "Column is value, Other is value" for one table. */
|
|
130
130
|
declare function ColumnValuesText({ dataSource, userId, tableId, value, }: {
|
|
131
131
|
dataSource: RecordsDataSource;
|
|
132
132
|
userId: Uuid | null;
|
|
133
|
-
tableId:
|
|
133
|
+
tableId: null | string;
|
|
134
134
|
value: Record<string, unknown>;
|
|
135
135
|
}): react.JSX.Element;
|
|
136
136
|
/** One record of a table, read back as its name. */
|
|
137
137
|
declare function RecordNameText({ dataSource, userId, tableId, recordId, }: {
|
|
138
138
|
dataSource: RecordsDataSource;
|
|
139
139
|
userId: Uuid | null;
|
|
140
|
-
tableId:
|
|
141
|
-
recordId:
|
|
140
|
+
tableId: null | string;
|
|
141
|
+
recordId: null | string;
|
|
142
142
|
}): react.JSX.Element;
|
|
143
143
|
|
|
144
144
|
interface HeldChangeDecisionProps {
|
package/dist/pickers.d.ts
CHANGED
|
@@ -8,24 +8,24 @@ interface TableAnywhere {
|
|
|
8
8
|
table_name: string;
|
|
9
9
|
organization_id: Uuid;
|
|
10
10
|
organization_name: string;
|
|
11
|
-
kind:
|
|
11
|
+
kind: null | string;
|
|
12
12
|
platform_owned: boolean;
|
|
13
13
|
/** When the table last changed (the door's own column) — what tells two same-named tables apart. */
|
|
14
|
-
updated_at?:
|
|
14
|
+
updated_at?: null | string;
|
|
15
15
|
/** Who made it, when the door says. */
|
|
16
|
-
created_by_name?:
|
|
16
|
+
created_by_name?: null | string;
|
|
17
17
|
}
|
|
18
18
|
interface TablesAnywhere {
|
|
19
19
|
loading: boolean;
|
|
20
20
|
/** The store's own sentence when the list was refused. */
|
|
21
|
-
error:
|
|
21
|
+
error: null | string;
|
|
22
22
|
rows: TableAnywhere[];
|
|
23
23
|
}
|
|
24
24
|
/** Every Table the person can open, in every organization, sorted by name. */
|
|
25
25
|
declare function useTablesAnywhere(dataSource: RecordsDataSource): TablesAnywhere;
|
|
26
26
|
interface TablePickerProps {
|
|
27
27
|
dataSource: RecordsDataSource;
|
|
28
|
-
value:
|
|
28
|
+
value: null | string;
|
|
29
29
|
onChange: (tableId: string) => void;
|
|
30
30
|
disabled?: boolean;
|
|
31
31
|
/** Hand in an already-read list to skip a second read. */
|
|
@@ -37,7 +37,7 @@ interface TableScopeProps {
|
|
|
37
37
|
dataSource: RecordsDataSource;
|
|
38
38
|
/** The signed-in person — the actor every read runs as. */
|
|
39
39
|
userId: Uuid | null;
|
|
40
|
-
tableId:
|
|
40
|
+
tableId: null | string;
|
|
41
41
|
children: ReactNode;
|
|
42
42
|
/** Shown while the Table's organization is unknown, or when no Table is chosen. */
|
|
43
43
|
fallback?: ReactNode;
|
|
@@ -61,7 +61,7 @@ interface ColumnValuesEditorProps {
|
|
|
61
61
|
declare function ColumnValuesEditor({ tableId, value, onChange, disabled, addLabel }: ColumnValuesEditorProps): react.JSX.Element;
|
|
62
62
|
interface RecordPickerProps {
|
|
63
63
|
tableId: string;
|
|
64
|
-
value:
|
|
64
|
+
value: null | string;
|
|
65
65
|
onChange: (recordId: string) => void;
|
|
66
66
|
disabled?: boolean;
|
|
67
67
|
}
|
|
@@ -75,7 +75,7 @@ interface DataBinding {
|
|
|
75
75
|
table_id: string;
|
|
76
76
|
record_id?: string;
|
|
77
77
|
field_key?: string;
|
|
78
|
-
match?: Record<string,
|
|
78
|
+
match?: Record<string, boolean | null | number | string>;
|
|
79
79
|
limit?: number;
|
|
80
80
|
transform?: {
|
|
81
81
|
name: "list";
|
|
@@ -116,7 +116,7 @@ interface DataBindingPickerProps {
|
|
|
116
116
|
onChange: (binding: DataBinding) => void;
|
|
117
117
|
disabled?: boolean;
|
|
118
118
|
/** The host's starting row cap for a whole-table read (a knob the host reads), if any. */
|
|
119
|
-
defaultRowLimit?:
|
|
119
|
+
defaultRowLimit?: null | number;
|
|
120
120
|
}
|
|
121
121
|
/** "From my data": table → shape → record / field → template → when it's missing. */
|
|
122
122
|
declare function DataBindingPicker({ dataSource, userId, binding, onChange, disabled, defaultRowLimit }: DataBindingPickerProps): react.JSX.Element;
|
|
@@ -124,21 +124,21 @@ declare function DataBindingPicker({ dataSource, userId, binding, onChange, disa
|
|
|
124
124
|
/** The chosen table's name, or `—` when it is not one this person can open. */
|
|
125
125
|
declare function TableNameText({ dataSource, tableId }: {
|
|
126
126
|
dataSource: RecordsDataSource;
|
|
127
|
-
tableId:
|
|
127
|
+
tableId: null | string;
|
|
128
128
|
}): react.JSX.Element;
|
|
129
129
|
/** `{column key: value}` as "Column is value, Other is value" for one table. */
|
|
130
130
|
declare function ColumnValuesText({ dataSource, userId, tableId, value, }: {
|
|
131
131
|
dataSource: RecordsDataSource;
|
|
132
132
|
userId: Uuid | null;
|
|
133
|
-
tableId:
|
|
133
|
+
tableId: null | string;
|
|
134
134
|
value: Record<string, unknown>;
|
|
135
135
|
}): react.JSX.Element;
|
|
136
136
|
/** One record of a table, read back as its name. */
|
|
137
137
|
declare function RecordNameText({ dataSource, userId, tableId, recordId, }: {
|
|
138
138
|
dataSource: RecordsDataSource;
|
|
139
139
|
userId: Uuid | null;
|
|
140
|
-
tableId:
|
|
141
|
-
recordId:
|
|
140
|
+
tableId: null | string;
|
|
141
|
+
recordId: null | string;
|
|
142
142
|
}): react.JSX.Element;
|
|
143
143
|
|
|
144
144
|
interface HeldChangeDecisionProps {
|
package/dist/pickers.js
CHANGED
|
@@ -17,8 +17,9 @@ import {
|
|
|
17
17
|
isCompleteDataBinding,
|
|
18
18
|
isDataBinding,
|
|
19
19
|
useTablesAnywhere
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-EB6IVWGJ.js";
|
|
21
|
+
import "./chunk-5RU7BPCU.js";
|
|
22
|
+
import "./chunk-6DK2DKTD.js";
|
|
22
23
|
import "./chunk-YHPVSUK6.js";
|
|
23
24
|
import "./chunk-LBZZDHV6.js";
|
|
24
25
|
import "./chunk-OY553AFP.js";
|
package/dist/skeleton.d.cts
CHANGED
|
@@ -2,10 +2,10 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
/** Every place a records surface shows while its first read is out. */
|
|
5
|
-
type RecordsSkeletonLayout = "
|
|
5
|
+
type RecordsSkeletonLayout = "calendar" | "chart" | "form" | "gallery" | "grid" | "home" | "kanban" | "list" | "map" | "orgchart" | "pivot" | "record" | "swipe" | "timeline";
|
|
6
6
|
declare const RECORDS_SKELETON_LAYOUTS: readonly RecordsSkeletonLayout[];
|
|
7
7
|
/** A layout word the address or a view carries, as the skeleton that stands for it. */
|
|
8
|
-
declare function skeletonLayoutFor(layout:
|
|
8
|
+
declare function skeletonLayoutFor(layout: null | string | undefined): RecordsSkeletonLayout;
|
|
9
9
|
/**
|
|
10
10
|
* THE GEOMETRY OF AN EMBEDDED GRID, MEASURED ON A LIVE SPACES PAGE (lane SKELETON-HEIGHT, 2026-10-17).
|
|
11
11
|
* A loading frame that is not the loaded frame moves everything under it when the rows land. The
|
|
@@ -26,7 +26,7 @@ declare const SKELETON_PAGE_ROWS = 100;
|
|
|
26
26
|
* `rowsVisible` is the count the store gave (`custom.where_id_opens` / the table bundle: the caller's own
|
|
27
27
|
* visible rows, capped), `pageSize` the rows the surface reads first. Null/undefined/invalid = not known.
|
|
28
28
|
*/
|
|
29
|
-
declare function skeletonRowsFor(rowsVisible:
|
|
29
|
+
declare function skeletonRowsFor(rowsVisible: null | number | undefined, pageSize: number): null | number;
|
|
30
30
|
/** The height (px) of an embedded grid's body with `rows` rows drawn: the loaded body's own height. */
|
|
31
31
|
declare function embeddedGridBodyPx(rows: number): number;
|
|
32
32
|
/**
|
|
@@ -34,7 +34,7 @@ declare function embeddedGridBodyPx(rows: number): number;
|
|
|
34
34
|
* per-group counts (`opening_view.groups`), each min(cards, page size). Null = not known (empty or invalid),
|
|
35
35
|
* so the board skeleton keeps its stand-in columns. A column with no card still draws (its header).
|
|
36
36
|
*/
|
|
37
|
-
declare function skeletonColumnsFor(groups: readonly number[] |
|
|
37
|
+
declare function skeletonColumnsFor(groups: null | readonly number[] | undefined, pageSize: number): null | number[];
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* HOW MANY ROWS THE SERVER SAYS THIS PERSON SEES (lane SKELETON-HEIGHT). A host that knows the count
|
|
@@ -45,27 +45,27 @@ declare function skeletonColumnsFor(groups: readonly number[] | null | undefined
|
|
|
45
45
|
* skeleton then draws that many columns, each min(cards, page size) tall; a gallery's draws `rows` cards.
|
|
46
46
|
*/
|
|
47
47
|
declare function ExpectedRows({ rows, groups, children }: {
|
|
48
|
-
rows:
|
|
49
|
-
groups?: readonly number[] |
|
|
48
|
+
rows: null | number | undefined;
|
|
49
|
+
groups?: null | readonly number[] | undefined;
|
|
50
50
|
children: ReactNode;
|
|
51
51
|
}): react.JSX.Element;
|
|
52
52
|
/** The rows a loading frame draws from what the host said it knows (null = nobody told it). */
|
|
53
|
-
declare function useExpectedRows(embedded: boolean):
|
|
53
|
+
declare function useExpectedRows(embedded: boolean): null | number;
|
|
54
54
|
/** The cards each board column draws (page size capped), or null when the host did not say. */
|
|
55
|
-
declare function useExpectedColumns(embedded: boolean): number[]
|
|
55
|
+
declare function useExpectedColumns(embedded: boolean): null | number[];
|
|
56
56
|
/**
|
|
57
57
|
* THE ROWS A TABLE PAGE PAINTED LAST VISIT, for a frame drawn before the table is known (the
|
|
58
58
|
* route's own loading frame, the page's first-read frame). The server render and the first client
|
|
59
59
|
* paint agree ("fill"); a browser that remembers the table then settles on its count with no
|
|
60
60
|
* hydration mismatch. The key is the one the grid writes (`<tableId>:page:last`).
|
|
61
61
|
*/
|
|
62
|
-
declare function useRememberedPageRows(tableId: string | undefined):
|
|
62
|
+
declare function useRememberedPageRows(tableId: string | undefined): "fill" | number;
|
|
63
63
|
/**
|
|
64
64
|
* THE LAYOUT A TABLE PAGE SETTLED ON LAST VISIT (null before a browser remembers one, and on the
|
|
65
65
|
* server). Server render and first client paint agree (null); a browser that remembers the table
|
|
66
66
|
* then settles on its layout with no hydration mismatch.
|
|
67
67
|
*/
|
|
68
|
-
declare function useRememberedLayout(tableId: string | undefined):
|
|
68
|
+
declare function useRememberedLayout(tableId: string | undefined): null | string;
|
|
69
69
|
/**
|
|
70
70
|
* THE TABLE PAGE'S TOOLBAR ROW — one class for the loaded row and its skeleton, so the two are
|
|
71
71
|
* the same height from the first frame. The row holds tap buttons and tap groups, whose footprint is
|
|
@@ -84,7 +84,7 @@ interface RecordsSkeletonProps {
|
|
|
84
84
|
/** Inside a page (a Spaces block): no frame, the data table's embedded look, content height. */
|
|
85
85
|
embedded?: boolean;
|
|
86
86
|
/** Rows to paint; default — page: to the frame's edge, embedded: five. */
|
|
87
|
-
rows?:
|
|
87
|
+
rows?: "fill" | number;
|
|
88
88
|
/** The table this page is for: a page frame then paints the rows that table showed last visit. */
|
|
89
89
|
tableId?: string;
|
|
90
90
|
className?: string;
|
package/dist/skeleton.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
/** Every place a records surface shows while its first read is out. */
|
|
5
|
-
type RecordsSkeletonLayout = "
|
|
5
|
+
type RecordsSkeletonLayout = "calendar" | "chart" | "form" | "gallery" | "grid" | "home" | "kanban" | "list" | "map" | "orgchart" | "pivot" | "record" | "swipe" | "timeline";
|
|
6
6
|
declare const RECORDS_SKELETON_LAYOUTS: readonly RecordsSkeletonLayout[];
|
|
7
7
|
/** A layout word the address or a view carries, as the skeleton that stands for it. */
|
|
8
|
-
declare function skeletonLayoutFor(layout:
|
|
8
|
+
declare function skeletonLayoutFor(layout: null | string | undefined): RecordsSkeletonLayout;
|
|
9
9
|
/**
|
|
10
10
|
* THE GEOMETRY OF AN EMBEDDED GRID, MEASURED ON A LIVE SPACES PAGE (lane SKELETON-HEIGHT, 2026-10-17).
|
|
11
11
|
* A loading frame that is not the loaded frame moves everything under it when the rows land. The
|
|
@@ -26,7 +26,7 @@ declare const SKELETON_PAGE_ROWS = 100;
|
|
|
26
26
|
* `rowsVisible` is the count the store gave (`custom.where_id_opens` / the table bundle: the caller's own
|
|
27
27
|
* visible rows, capped), `pageSize` the rows the surface reads first. Null/undefined/invalid = not known.
|
|
28
28
|
*/
|
|
29
|
-
declare function skeletonRowsFor(rowsVisible:
|
|
29
|
+
declare function skeletonRowsFor(rowsVisible: null | number | undefined, pageSize: number): null | number;
|
|
30
30
|
/** The height (px) of an embedded grid's body with `rows` rows drawn: the loaded body's own height. */
|
|
31
31
|
declare function embeddedGridBodyPx(rows: number): number;
|
|
32
32
|
/**
|
|
@@ -34,7 +34,7 @@ declare function embeddedGridBodyPx(rows: number): number;
|
|
|
34
34
|
* per-group counts (`opening_view.groups`), each min(cards, page size). Null = not known (empty or invalid),
|
|
35
35
|
* so the board skeleton keeps its stand-in columns. A column with no card still draws (its header).
|
|
36
36
|
*/
|
|
37
|
-
declare function skeletonColumnsFor(groups: readonly number[] |
|
|
37
|
+
declare function skeletonColumnsFor(groups: null | readonly number[] | undefined, pageSize: number): null | number[];
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* HOW MANY ROWS THE SERVER SAYS THIS PERSON SEES (lane SKELETON-HEIGHT). A host that knows the count
|
|
@@ -45,27 +45,27 @@ declare function skeletonColumnsFor(groups: readonly number[] | null | undefined
|
|
|
45
45
|
* skeleton then draws that many columns, each min(cards, page size) tall; a gallery's draws `rows` cards.
|
|
46
46
|
*/
|
|
47
47
|
declare function ExpectedRows({ rows, groups, children }: {
|
|
48
|
-
rows:
|
|
49
|
-
groups?: readonly number[] |
|
|
48
|
+
rows: null | number | undefined;
|
|
49
|
+
groups?: null | readonly number[] | undefined;
|
|
50
50
|
children: ReactNode;
|
|
51
51
|
}): react.JSX.Element;
|
|
52
52
|
/** The rows a loading frame draws from what the host said it knows (null = nobody told it). */
|
|
53
|
-
declare function useExpectedRows(embedded: boolean):
|
|
53
|
+
declare function useExpectedRows(embedded: boolean): null | number;
|
|
54
54
|
/** The cards each board column draws (page size capped), or null when the host did not say. */
|
|
55
|
-
declare function useExpectedColumns(embedded: boolean): number[]
|
|
55
|
+
declare function useExpectedColumns(embedded: boolean): null | number[];
|
|
56
56
|
/**
|
|
57
57
|
* THE ROWS A TABLE PAGE PAINTED LAST VISIT, for a frame drawn before the table is known (the
|
|
58
58
|
* route's own loading frame, the page's first-read frame). The server render and the first client
|
|
59
59
|
* paint agree ("fill"); a browser that remembers the table then settles on its count with no
|
|
60
60
|
* hydration mismatch. The key is the one the grid writes (`<tableId>:page:last`).
|
|
61
61
|
*/
|
|
62
|
-
declare function useRememberedPageRows(tableId: string | undefined):
|
|
62
|
+
declare function useRememberedPageRows(tableId: string | undefined): "fill" | number;
|
|
63
63
|
/**
|
|
64
64
|
* THE LAYOUT A TABLE PAGE SETTLED ON LAST VISIT (null before a browser remembers one, and on the
|
|
65
65
|
* server). Server render and first client paint agree (null); a browser that remembers the table
|
|
66
66
|
* then settles on its layout with no hydration mismatch.
|
|
67
67
|
*/
|
|
68
|
-
declare function useRememberedLayout(tableId: string | undefined):
|
|
68
|
+
declare function useRememberedLayout(tableId: string | undefined): null | string;
|
|
69
69
|
/**
|
|
70
70
|
* THE TABLE PAGE'S TOOLBAR ROW — one class for the loaded row and its skeleton, so the two are
|
|
71
71
|
* the same height from the first frame. The row holds tap buttons and tap groups, whose footprint is
|
|
@@ -84,7 +84,7 @@ interface RecordsSkeletonProps {
|
|
|
84
84
|
/** Inside a page (a Spaces block): no frame, the data table's embedded look, content height. */
|
|
85
85
|
embedded?: boolean;
|
|
86
86
|
/** Rows to paint; default — page: to the frame's edge, embedded: five. */
|
|
87
|
-
rows?:
|
|
87
|
+
rows?: "fill" | number;
|
|
88
88
|
/** The table this page is for: a page frame then paints the rows that table showed last visit. */
|
|
89
89
|
tableId?: string;
|
|
90
90
|
className?: string;
|
package/dist/table-shape.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What kind of thing the rows were read from. */
|
|
2
|
-
type TableShapeKind = "
|
|
2
|
+
type TableShapeKind = "csv" | "key_value" | "kind" | "list" | "rows" | "table" | "tsv";
|
|
3
3
|
/** Another honest way to read a list: every item split at the same delimiter. */
|
|
4
4
|
interface TableShapeSplit {
|
|
5
5
|
/** The delimiter, exactly as it sits in the items. */
|
|
@@ -18,14 +18,14 @@ interface TableShape {
|
|
|
18
18
|
/** One sentence a person reads: what was found and how big it is. */
|
|
19
19
|
said: string;
|
|
20
20
|
/** A name the text itself suggests (the heading above it), or null. */
|
|
21
|
-
name:
|
|
21
|
+
name: null | string;
|
|
22
22
|
/** For a list: the other readings on offer. Empty for everything else. */
|
|
23
23
|
splits: TableShapeSplit[];
|
|
24
24
|
/** Where the shape sits in the text, as character offsets (a kind value / JSON value has none). */
|
|
25
|
-
at: {
|
|
25
|
+
at: null | {
|
|
26
26
|
start: number;
|
|
27
27
|
end: number;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
}
|
|
30
30
|
/** The fewest items a plain list needs before it reads as rows ("even a few bullet points"). */
|
|
31
31
|
declare const FEWEST_LIST_ITEMS = 2;
|
|
@@ -43,7 +43,7 @@ declare function parseDelimited(text: string, delimiter: "," | "\t"): string[][]
|
|
|
43
43
|
* THE ROWS A VALUE HOLDS — a kind value (`__kind`, or a Matrx directive read by the one decoder),
|
|
44
44
|
* a JSON array of objects, or an object whose largest member is one. Null when it holds none.
|
|
45
45
|
*/
|
|
46
|
-
declare function shapeOfValue(value: unknown, name?:
|
|
46
|
+
declare function shapeOfValue(value: unknown, name?: null | string): TableShape | null;
|
|
47
47
|
/**
|
|
48
48
|
* EVERY SHAPE IN A TEXT, top to bottom: markdown tables, lists, runs of `Key: value` lines,
|
|
49
49
|
* fenced CSV / TSV / JSON blocks — and when the whole text is one CSV or TSV paste, that.
|
|
@@ -55,11 +55,11 @@ declare function readFirstTableShape(text: string): TableShape | null;
|
|
|
55
55
|
/** True when the text holds anything that reads as rows — every menu's "offer it?" predicate. */
|
|
56
56
|
declare function hasTableShape(text: string): boolean;
|
|
57
57
|
/** Headers + string rows — the shape a table renderer already holds, read as a TableShape. */
|
|
58
|
-
declare function shapeOfGrid(headers: readonly string[], cells: ReadonlyArray<ReadonlyArray<string>>, name?:
|
|
58
|
+
declare function shapeOfGrid(headers: readonly string[], cells: ReadonlyArray<ReadonlyArray<string>>, name?: null | string,
|
|
59
59
|
/** What the rows came out of, in a word: "table" (a rendered table), "sheet" (a workbook's sheet). */
|
|
60
60
|
from?: string): TableShape | null;
|
|
61
61
|
/** A type word `custom.field_declare` takes, from `FIELD_TYPE_CHOICES`. */
|
|
62
|
-
type GuessedFieldType = "
|
|
62
|
+
type GuessedFieldType = "checkbox" | "currency" | "datetime" | "email" | "long_text" | "number" | "percent" | "phone" | "select" | "text" | "url";
|
|
63
63
|
interface ColumnGuess {
|
|
64
64
|
type: GuessedFieldType;
|
|
65
65
|
/** A choice column's words, in the order the text first used them. */
|
package/dist/table-shape.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What kind of thing the rows were read from. */
|
|
2
|
-
type TableShapeKind = "
|
|
2
|
+
type TableShapeKind = "csv" | "key_value" | "kind" | "list" | "rows" | "table" | "tsv";
|
|
3
3
|
/** Another honest way to read a list: every item split at the same delimiter. */
|
|
4
4
|
interface TableShapeSplit {
|
|
5
5
|
/** The delimiter, exactly as it sits in the items. */
|
|
@@ -18,14 +18,14 @@ interface TableShape {
|
|
|
18
18
|
/** One sentence a person reads: what was found and how big it is. */
|
|
19
19
|
said: string;
|
|
20
20
|
/** A name the text itself suggests (the heading above it), or null. */
|
|
21
|
-
name:
|
|
21
|
+
name: null | string;
|
|
22
22
|
/** For a list: the other readings on offer. Empty for everything else. */
|
|
23
23
|
splits: TableShapeSplit[];
|
|
24
24
|
/** Where the shape sits in the text, as character offsets (a kind value / JSON value has none). */
|
|
25
|
-
at: {
|
|
25
|
+
at: null | {
|
|
26
26
|
start: number;
|
|
27
27
|
end: number;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
}
|
|
30
30
|
/** The fewest items a plain list needs before it reads as rows ("even a few bullet points"). */
|
|
31
31
|
declare const FEWEST_LIST_ITEMS = 2;
|
|
@@ -43,7 +43,7 @@ declare function parseDelimited(text: string, delimiter: "," | "\t"): string[][]
|
|
|
43
43
|
* THE ROWS A VALUE HOLDS — a kind value (`__kind`, or a Matrx directive read by the one decoder),
|
|
44
44
|
* a JSON array of objects, or an object whose largest member is one. Null when it holds none.
|
|
45
45
|
*/
|
|
46
|
-
declare function shapeOfValue(value: unknown, name?:
|
|
46
|
+
declare function shapeOfValue(value: unknown, name?: null | string): TableShape | null;
|
|
47
47
|
/**
|
|
48
48
|
* EVERY SHAPE IN A TEXT, top to bottom: markdown tables, lists, runs of `Key: value` lines,
|
|
49
49
|
* fenced CSV / TSV / JSON blocks — and when the whole text is one CSV or TSV paste, that.
|
|
@@ -55,11 +55,11 @@ declare function readFirstTableShape(text: string): TableShape | null;
|
|
|
55
55
|
/** True when the text holds anything that reads as rows — every menu's "offer it?" predicate. */
|
|
56
56
|
declare function hasTableShape(text: string): boolean;
|
|
57
57
|
/** Headers + string rows — the shape a table renderer already holds, read as a TableShape. */
|
|
58
|
-
declare function shapeOfGrid(headers: readonly string[], cells: ReadonlyArray<ReadonlyArray<string>>, name?:
|
|
58
|
+
declare function shapeOfGrid(headers: readonly string[], cells: ReadonlyArray<ReadonlyArray<string>>, name?: null | string,
|
|
59
59
|
/** What the rows came out of, in a word: "table" (a rendered table), "sheet" (a workbook's sheet). */
|
|
60
60
|
from?: string): TableShape | null;
|
|
61
61
|
/** A type word `custom.field_declare` takes, from `FIELD_TYPE_CHOICES`. */
|
|
62
|
-
type GuessedFieldType = "
|
|
62
|
+
type GuessedFieldType = "checkbox" | "currency" | "datetime" | "email" | "long_text" | "number" | "percent" | "phone" | "select" | "text" | "url";
|
|
63
63
|
interface ColumnGuess {
|
|
64
64
|
type: GuessedFieldType;
|
|
65
65
|
/** A choice column's words, in the order the text first used them. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/records-ui",
|
|
3
|
-
"version": "0.116.
|
|
3
|
+
"version": "0.116.124",
|
|
4
4
|
"description": "The thirty-one canonical screens of the AI Matrx record store: grid, generated record form, field editor, table settings, relation picker, peek, views, import/export, custom fields, action inbox, history, comments, forms, charts, documents, record chat, AI field fill, checklists, bookings, offline capture, portals, public pages and embeds. Built on @ai-matrx/design-system's data table, carrying @ai-matrx/alchemy's menu, and reading and writing ONLY through @ai-matrx/records.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
"node": ">=20"
|
|
193
193
|
},
|
|
194
194
|
"sideEffects": false,
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "a52ed01efef24eff37e1e85de003b29e398cc317"
|
|
196
196
|
}
|