@substrat-run/elements 0.0.0-stage → 0.1.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.
Files changed (47) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +58 -2
  3. package/dist/avatar.d.ts +56 -0
  4. package/dist/avatar.d.ts.map +1 -0
  5. package/dist/avatar.js +107 -0
  6. package/dist/avatar.js.map +1 -0
  7. package/dist/controls.d.ts +21 -0
  8. package/dist/controls.d.ts.map +1 -0
  9. package/dist/controls.js +21 -0
  10. package/dist/controls.js.map +1 -0
  11. package/dist/entity-table-model.d.ts +269 -0
  12. package/dist/entity-table-model.d.ts.map +1 -0
  13. package/dist/entity-table-model.js +490 -0
  14. package/dist/entity-table-model.js.map +1 -0
  15. package/dist/entity-table.d.ts +187 -0
  16. package/dist/entity-table.d.ts.map +1 -0
  17. package/dist/entity-table.js +1004 -0
  18. package/dist/entity-table.js.map +1 -0
  19. package/dist/index.d.ts +6 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +6 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/internal/session-controller.d.ts +25 -0
  24. package/dist/internal/session-controller.d.ts.map +1 -0
  25. package/dist/internal/session-controller.js +46 -0
  26. package/dist/internal/session-controller.js.map +1 -0
  27. package/dist/internal/substrat-element.d.ts +36 -0
  28. package/dist/internal/substrat-element.d.ts.map +1 -0
  29. package/dist/internal/substrat-element.js +195 -0
  30. package/dist/internal/substrat-element.js.map +1 -0
  31. package/dist/jsx.d.ts +8 -0
  32. package/dist/jsx.d.ts.map +1 -0
  33. package/dist/jsx.js +2 -0
  34. package/dist/jsx.js.map +1 -0
  35. package/dist/session.d.ts +84 -0
  36. package/dist/session.d.ts.map +1 -0
  37. package/dist/session.js +158 -0
  38. package/dist/session.js.map +1 -0
  39. package/dist/themes/atelier.css +59 -0
  40. package/dist/themes/base.css +7 -0
  41. package/dist/themes/ledger.css +59 -0
  42. package/dist/themes/native.css +11 -0
  43. package/dist/user-menu.d.ts +95 -0
  44. package/dist/user-menu.d.ts.map +1 -0
  45. package/dist/user-menu.js +212 -0
  46. package/dist/user-menu.js.map +1 -0
  47. package/package.json +47 -3
@@ -0,0 +1,269 @@
1
+ /**
2
+ * What an entity table knows, with no DOM in it.
3
+ *
4
+ * The element renders this and forwards clicks; everything that decides what the screen
5
+ * says lives here, so a second renderer (React Native, later) gets the same answers from
6
+ * the same code. The contract is the one a vertical's generated client already speaks:
7
+ * a read returns a `Page` (`entries`, `next`, `total`), `next` is followed rather than
8
+ * reassembled, and a refusal is a 403 on the error's `status`.
9
+ *
10
+ * The table owns a QUERY — the view, the sort, the equality filters, the search term —
11
+ * and hands it to `source.read`. What the query may say is what the read declares: `sort`
12
+ * is one of its `sortable` columns, a filter one of its `filterable` ones, and the
13
+ * generated client types both, so a sort with no index behind it does not compile. Paging
14
+ * is the keyset walk the platform has: forward through `next`, never a jump to "page 7 of
15
+ * 40". Previous works anyway — the table keeps the `next` link that led to each page it has
16
+ * shown, so going back re-reads exactly the page it came from.
17
+ * Search is a different read — ranked and capped, not sorted and paged — so a term
18
+ * switches the table into search mode rather than into a filtered page.
19
+ *
20
+ * Answers a hand-written list screen keeps getting wrong, held here once:
21
+ *
22
+ * - a 403 on the read is a WALL ("you may not see this"), never an empty list;
23
+ * - a 403 on a row action is about that row: the rows stay, the refusal is shown;
24
+ * - a 409 or 404 on a row action means the view went stale (another tab moved it),
25
+ * so the view is read again before the problem is shown;
26
+ * - an empty answer to a search or a filter is "no matches", not "nothing here";
27
+ * - a capped search says so, rather than passing its first N off as all of them;
28
+ * - a re-sort keeps the rows it is replacing on screen until the new ones land.
29
+ */
30
+ /** One page of a paged read — the generated client's `Paged<T>`, structurally. */
31
+ export interface Page<T> {
32
+ entries: T[];
33
+ /** A URL to follow, or null when the walk is over. */
34
+ next: string | null;
35
+ total: number | null;
36
+ }
37
+ /** A capped search read's answer — `{ results, capped }`, as a vertical's search ops return it. */
38
+ export interface SearchResult<T> {
39
+ results: T[];
40
+ capped: boolean;
41
+ }
42
+ /** What the table asks its source for. `S` is the read's sortable columns. */
43
+ export interface TableQuery<S extends string = string> {
44
+ /** The id of the chosen view, or null when the table declares none. */
45
+ view: string | null;
46
+ /** A declared sortable column, or null for the read's own default order. */
47
+ sort: S | null;
48
+ order: 'asc' | 'desc';
49
+ /** Equality filters by declared filterable column. An absent key is "any". */
50
+ filters: Readonly<Record<string, string>>;
51
+ /** The search term as typed. Shorter than the source's minimum, it searches nothing. */
52
+ q: string;
53
+ /** Rows per page, or null for the read's own default. Pass it on as the read's `limit`. */
54
+ limit: number | null;
55
+ }
56
+ /** Where the rows come from. `read` is the generated client's read; `follow` its `follow`. */
57
+ export interface TableSource<T, S extends string = string> {
58
+ read(query: TableQuery<S>): Promise<Page<T>>;
59
+ follow(next: string): Promise<Page<T>>;
60
+ /** The entity's search read, when it has one. Its answer replaces the page. */
61
+ search?(q: string, query: TableQuery<S>): Promise<SearchResult<T>>;
62
+ /**
63
+ * The views search covers, when it does not cover them all — an index that leaves archived
64
+ * rows out cannot search the archive, and a search box over it would answer "no matches".
65
+ */
66
+ searchViews?: readonly string[];
67
+ }
68
+ /** How a cell's value is drawn. Every kind is a fact about the field, not about a screen. */
69
+ export type CellKind = 'text' | 'number' | 'money' | 'date' | 'datetime' | 'relative' | 'badge' | 'boolean' | 'code';
70
+ export type Tone = 'brand' | 'neutral' | 'success' | 'warning' | 'danger';
71
+ /** The renderer-independent half of a column. */
72
+ export interface ColumnSpec<T, S extends string = string> {
73
+ key: string;
74
+ label: string;
75
+ /** Defaults to `row[key]`. */
76
+ value?(row: T): unknown;
77
+ /** Defaults to `text`. */
78
+ kind?: CellKind;
79
+ /** For `badge`: a tone per value. An unlisted value is `neutral`. */
80
+ tones?: Readonly<Record<string, Tone>>;
81
+ /** For `money`: an ISO 4217 code. Money is a decimal string, and is formatted as one. */
82
+ currency?: string;
83
+ /** Makes the cell a link. Given the query, so a view (the trash, say) can link nowhere. */
84
+ href?(row: T, query: TableQuery<S>): string | null;
85
+ /** The declared sortable column this column sorts by. Absent, the header is not a button. */
86
+ sort?: S;
87
+ /**
88
+ * 1 always shows; 2 hides on a narrow table; 3 hides first. Intent rather than a pixel
89
+ * width, so a renderer that is not a browser can honour it too.
90
+ */
91
+ priority?: 1 | 2 | 3;
92
+ align?: 'start' | 'end';
93
+ }
94
+ export interface RowAction<T> {
95
+ id: string;
96
+ label: string;
97
+ tone?: 'neutral' | 'danger';
98
+ /** The views it is offered in. Absent, every view. */
99
+ views?: readonly string[];
100
+ /** Also offered for a selection, run once per selected row. */
101
+ bulk?: boolean;
102
+ run(row: T): Promise<unknown>;
103
+ }
104
+ export type Phase = 'loading' | 'ready' | 'forbidden' | 'error';
105
+ /** Something to say above the rows that does not replace them. */
106
+ export interface Problem {
107
+ kind: 'refused' | 'stale' | 'failed';
108
+ message: string;
109
+ }
110
+ export interface TableState<T, S extends string = string> {
111
+ phase: Phase;
112
+ query: TableQuery<S>;
113
+ /** `search` when the rows are a search's results: ranked, unpaged, maybe capped. */
114
+ mode: 'page' | 'search';
115
+ rows: T[];
116
+ next: string | null;
117
+ total: number | null;
118
+ /** Which page is on screen, from 0, when the table pages rather than appends. */
119
+ page: number;
120
+ /** How many rows came before this page — so the footer can say "21–40". */
121
+ offset: number;
122
+ /** The search stopped at its limit; there are more matches than rows. */
123
+ capped: boolean;
124
+ loadingMore: boolean;
125
+ /** A re-read is in flight over rows still on screen (a re-sort, a new view). */
126
+ refreshing: boolean;
127
+ /** Key of the row whose action is in flight, or `BULK` while a selection's runs. */
128
+ busy: string | null;
129
+ selected: ReadonlySet<string>;
130
+ problem: Problem | null;
131
+ }
132
+ /** `busy` while an action runs over a selection rather than one row. */
133
+ export declare const BULK = "\0bulk";
134
+ export interface TableOptions<T, S extends string = string> {
135
+ keyOf?: (row: T) => string;
136
+ /** The query the first read is made with. */
137
+ query?: Partial<TableQuery<S>>;
138
+ /** The shortest term that searches. Two is the platform's prefix-index floor. */
139
+ minSearch?: number;
140
+ }
141
+ export declare class EntityTableModel<T, S extends string = string> {
142
+ #private;
143
+ private readonly source;
144
+ private readonly onChange;
145
+ state: TableState<T, S>;
146
+ readonly keyOf: (row: T) => string;
147
+ readonly minSearch: number;
148
+ constructor(source: TableSource<T, S>, onChange: (state: TableState<T, S>) => void, options?: TableOptions<T, S>);
149
+ /** The current view is one the source can search. */
150
+ get searchable(): boolean;
151
+ /** The term is long enough to search, and there is a search to ask in this view. */
152
+ get searching(): boolean;
153
+ /**
154
+ * Read the page on screen again, with the current query. Keeps a `problem` it is told to,
155
+ * so a reload can carry one.
156
+ */
157
+ load(keep?: Problem | null): Promise<void>;
158
+ /** Change the query and read again, from the first page. A new view starts with nothing selected. */
159
+ setQuery(patch: Partial<TableQuery<S>>): Promise<void>;
160
+ /** The page after this one, through the `next` link it handed out. */
161
+ nextPage(): Promise<void>;
162
+ /** The page before this one, re-read through the link that led to it. */
163
+ prevPage(): Promise<void>;
164
+ /** Rows per page. A new size starts again from the first page. */
165
+ setPageSize(limit: number): Promise<void>;
166
+ /** A header press: ascending, then descending, then back to the read's own order. */
167
+ sortBy(column: S): Promise<void>;
168
+ filter(key: string, value: string | null): Promise<void>;
169
+ /**
170
+ * A new search term. Typing the first letter, or deleting down to one, changes nothing
171
+ * the server is asked, so it reads nothing: only crossing the minimum, or a new term
172
+ * past it, does.
173
+ */
174
+ search(q: string): Promise<void>;
175
+ /** Drop the search term and every filter — what "No matches" offers. */
176
+ clear(): Promise<void>;
177
+ more(): Promise<void>;
178
+ toggle(key: string): void;
179
+ /** Select every row on screen, or none if they all are. Rows not yet loaded are not "all". */
180
+ toggleAll(): void;
181
+ clearSelection(): void;
182
+ get selectedRows(): T[];
183
+ run(action: RowAction<T>, row: T): Promise<void>;
184
+ /**
185
+ * Run an action once per selected row, then read once. One row's refusal does not stop
186
+ * the rest — each is its own operation on the server, so each answers for itself — and
187
+ * the summary counts them, because "3 of 5 done" is what a person needs to know.
188
+ * Returns the rows it succeeded on.
189
+ */
190
+ runBulk(action: RowAction<T>): Promise<T[]>;
191
+ }
192
+ /** The actions a view offers on a row, or for a selection. */
193
+ export declare const actionsIn: <T>(actions: readonly RowAction<T>[], view: string | null, bulk?: boolean) => RowAction<T>[];
194
+ /**
195
+ * Which columns a person has chosen to see, and in what order, by column key. Kept apart from
196
+ * the query: it changes nothing the server is asked, so it is not in the URL either. The
197
+ * first declared column names the row — the link, the selection's label — so it stays first
198
+ * and shown whatever a layout says.
199
+ */
200
+ export interface TableLayout {
201
+ order: readonly string[];
202
+ hidden: readonly string[];
203
+ }
204
+ /** The declared order with nothing hidden: what "Reset" goes back to. */
205
+ export declare const defaultLayout: (columns: readonly {
206
+ key: string;
207
+ }[]) => TableLayout;
208
+ /**
209
+ * The columns a layout shows, in its order. A key the layout does not know — a column added
210
+ * since it was saved — keeps its declared place among the rest, at the end; a key it names
211
+ * that no longer exists is ignored.
212
+ */
213
+ export declare function arrange<C extends {
214
+ key: string;
215
+ }>(columns: readonly C[], layout: TableLayout | null | undefined): C[];
216
+ /** Every column after the first, in the layout's order, with whether it is shown. */
217
+ export declare function layoutEntries<C extends {
218
+ key: string;
219
+ }>(columns: readonly C[], layout: TableLayout | null | undefined): {
220
+ column: C;
221
+ shown: boolean;
222
+ }[];
223
+ /** Show or hide one column. The first column cannot be hidden, and asking does nothing. */
224
+ export declare function toggleColumn(columns: readonly {
225
+ key: string;
226
+ }[], layout: TableLayout | null | undefined, key: string): TableLayout;
227
+ /** Move a column `by` places among the others (−1 is up), or to the place of `to`. */
228
+ export declare function moveColumn(columns: readonly {
229
+ key: string;
230
+ }[], layout: TableLayout | null | undefined, key: string, by: {
231
+ by: number;
232
+ } | {
233
+ to: string;
234
+ }): TableLayout;
235
+ /** Why a ready table has no rows: nothing exists, or nothing matches what was asked. */
236
+ export declare const emptyReason: (state: Pick<TableState<unknown>, 'mode' | 'query'>) => 'empty' | 'no-matches';
237
+ /**
238
+ * What a table's query may say in a URL. Read back, anything not listed here is dropped, so
239
+ * a stale or hand-edited link gives the table's defaults rather than a read the server
240
+ * refuses. Written, a value equal to `defaults` is left out, so the plain screen has a plain
241
+ * URL. `prefix` keeps two tables on one page apart (`items.sort`).
242
+ */
243
+ export interface QueryParams<S extends string = string> {
244
+ views?: readonly string[];
245
+ sorts?: readonly S[];
246
+ /** Each filter's key and the values it may take. Filters are written under their key. */
247
+ filters?: Readonly<Record<string, readonly string[]>>;
248
+ limits?: readonly number[];
249
+ defaults?: Partial<Pick<TableQuery<S>, 'view' | 'limit'>>;
250
+ prefix?: string;
251
+ }
252
+ /**
253
+ * The query as URL parameters — not the page: a page is a cursor that answers one query at one
254
+ * moment, so a link or a reload starts at the first page of the same view, sort and filters.
255
+ */
256
+ export declare function queryToParams<S extends string>(query: TableQuery<S>, spec?: QueryParams<S>): URLSearchParams;
257
+ /** The query a URL's parameters name, as the table's starting `query`. */
258
+ export declare function queryFromParams<S extends string>(params: URLSearchParams | string, spec?: QueryParams<S>): Partial<TableQuery<S>>;
259
+ /** One cell, as text: what it says, what it says on hover, and its tone when it is a badge. */
260
+ export interface CellText {
261
+ text: string;
262
+ title?: string;
263
+ tone?: Tone;
264
+ /** No value: drawn quietly, so an empty cell reads as empty rather than as missing. */
265
+ blank?: boolean;
266
+ }
267
+ /** `now` is passed in, not read, so the same row reads the same in a test and on a screen. */
268
+ export declare function cellText<T>(column: ColumnSpec<T, string>, row: T, now: Date, locale?: string): CellText;
269
+ //# sourceMappingURL=entity-table-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-table-model.d.ts","sourceRoot":"","sources":["../src/entity-table-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,kFAAkF;AAClF,MAAM,WAAW,IAAI,CAAC,CAAC;IACrB,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,sDAAsD;IACtD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,C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