@ai-matrx/records-ui 0.93.142 → 0.93.153
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 +126 -0
- package/dist/index.cjs +16946 -15022
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +212 -43
- package/dist/index.d.ts +212 -43
- package/dist/index.js +10363 -8438
- package/dist/index.js.map +1 -1
- package/dist/object-actions.cjs +127 -28
- package/dist/object-actions.cjs.map +1 -1
- package/dist/object-actions.d.cts +1 -1
- package/dist/object-actions.d.ts +1 -1
- package/dist/object-actions.js +125 -26
- package/dist/object-actions.js.map +1 -1
- package/dist/{objectActions-BSbblgf-.d.cts → objectActions-Dgdr0E4b.d.cts} +52 -11
- package/dist/{objectActions-BSbblgf-.d.ts → objectActions-Dgdr0E4b.d.ts} +52 -11
- package/dist/pickers.cjs +745 -493
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.d.cts +12 -1
- package/dist/pickers.d.ts +12 -1
- package/dist/pickers.js +633 -379
- package/dist/pickers.js.map +1 -1
- package/package.json +2 -2
|
@@ -42,12 +42,18 @@ declare function whatYouMayDoWithTable(table: Table | null | undefined, level: P
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* A Lucide icon NAME, kebab-case — the same currency `Table.icon` already uses.
|
|
45
|
-
* Closed on purpose: each renderer maps every member to its own
|
|
45
|
+
* Closed on purpose: each renderer maps every member to its own glyph, and a
|
|
46
46
|
* new member fails that renderer's typecheck until it is mapped.
|
|
47
47
|
*/
|
|
48
48
|
type ObjectActionIcon = "folder-open" | "external-link" | "link" | "pencil" | "copy" | "folder-input" | "star" | "star-off" | "share-2" | "download" | "upload" | "columns-3" | "settings" | "history" | "blocks" | "file-text" | "calendar-clock" | "list-checks" | "bell" | "door-open" | "inbox" | "layout-dashboard" | "archive-restore" | "archive" | "link-2" | "layout-grid";
|
|
49
49
|
/** The groups, in their one order. Separators fall out of group boundaries. */
|
|
50
50
|
type ObjectActionGroup = "open" | "organize" | "share" | "manage" | "built-on" | "danger";
|
|
51
|
+
/**
|
|
52
|
+
* THE STANDARD VERBS every object's menu shares — what the icon strip draws. One
|
|
53
|
+
* per meaning; an object maps its action onto the verb, never a second "share".
|
|
54
|
+
*/
|
|
55
|
+
type StandardVerbId = "open" | "open-new-tab" | "copy-link" | "rename" | "duplicate" | "move" | "favorite" | "share" | "export" | "import" | "settings" | "history" | "archive";
|
|
56
|
+
declare const STANDARD_VERBS: readonly StandardVerbId[];
|
|
51
57
|
interface ObjectActionGroupDef {
|
|
52
58
|
id: ObjectActionGroup;
|
|
53
59
|
/** Present only on a group that renders as a submenu. */
|
|
@@ -64,6 +70,10 @@ interface ObjectAction {
|
|
|
64
70
|
label: string;
|
|
65
71
|
icon: ObjectActionIcon;
|
|
66
72
|
group: ObjectActionGroup;
|
|
73
|
+
/** The standard verb this action IS (a strip icon). Absent = a feature row. */
|
|
74
|
+
verb?: StandardVerbId;
|
|
75
|
+
/** A feature row's place among the rows, 1 first. Ignored when `verb` is set. */
|
|
76
|
+
rank?: number;
|
|
67
77
|
/** Display-only hint ("⌘D"). */
|
|
68
78
|
shortcut?: string;
|
|
69
79
|
destructive?: boolean;
|
|
@@ -101,14 +111,26 @@ interface TableActionHost {
|
|
|
101
111
|
addColumn?: Handler;
|
|
102
112
|
settings?: Handler;
|
|
103
113
|
history?: Handler;
|
|
114
|
+
/** Make the layout on screen the table's default. Leave out when it already is. */
|
|
115
|
+
makeDefault?: Handler;
|
|
116
|
+
/** The layout on screen, for "Make Kanban the default". */
|
|
117
|
+
layoutLabel?: string;
|
|
104
118
|
/** The "Built on it" destinations, one handler for all eight. */
|
|
105
119
|
openBuiltOn?: (destination: BuiltOnDestination, table: TableActionSubject) => void;
|
|
106
120
|
archive?: Handler;
|
|
107
121
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
|
|
122
|
+
* Why an action whose handler is left out is unavailable here, by action id
|
|
123
|
+
* (≤ 60 chars) — e.g. `make-default: "Already the default"`. Unnamed ids say
|
|
124
|
+
* "Not available here". Never used when rights already refuse.
|
|
125
|
+
*/
|
|
126
|
+
unavailableReasons?: Readonly<Record<string, string>>;
|
|
127
|
+
/**
|
|
128
|
+
* ANOTHER LANE'S ENTRIES ("Link a record…", a hub tile's verbs, a feature's own
|
|
129
|
+
* row such as "When a row changes, run an agent…"). Return the same ids whatever
|
|
130
|
+
* `rights` say — express rights as `disabledReason`. Each entry lands at the END
|
|
131
|
+
* of its named group, in the order returned. Refused, loudly: the `danger` group
|
|
132
|
+
* (Archive is always last), a group that does not exist, and an id already in
|
|
133
|
+
* the list.
|
|
112
134
|
*/
|
|
113
135
|
extend?: (table: TableActionSubject, rights: WhatYouMayDo) => readonly ObjectAction[];
|
|
114
136
|
}
|
|
@@ -127,14 +149,15 @@ declare const ACTION_PLATFORM_TABLE_REASON = "Platform tables can't be changed h
|
|
|
127
149
|
/** Why `rights` refuse `what`, in one short line — or null when they allow it. */
|
|
128
150
|
declare function rightsReason(rights: WhatYouMayDo, what: Capability, table?: TableActionSubject): string | null;
|
|
129
151
|
/**
|
|
130
|
-
* THE TABLE'S ACTIONS, in the one order. Same ids, same order,
|
|
131
|
-
* and every host — only `disabledReason` varies.
|
|
152
|
+
* THE TABLE'S ACTIONS, in the one order. Same ids, same order, same verbs and
|
|
153
|
+
* ranks, for every seat and every host — only `disabledReason` varies.
|
|
132
154
|
*/
|
|
133
155
|
declare function tableActions(input: TableActionsInput): ObjectAction[];
|
|
134
156
|
/**
|
|
135
157
|
* Another lane's entries, placed deterministically: each at the end of its
|
|
136
|
-
* group, in the order given. Loud on
|
|
137
|
-
* invariants — a `danger` entry (Archive must stay last)
|
|
158
|
+
* group, in the order given. Loud on every mistake that would break the
|
|
159
|
+
* invariants — a `danger` entry (Archive must stay last), a group that does not
|
|
160
|
+
* exist (it would be dropped by every renderer) and a duplicate id.
|
|
138
161
|
*/
|
|
139
162
|
declare function withExtensions(base: readonly ObjectAction[], extra: readonly ObjectAction[]): ObjectAction[];
|
|
140
163
|
/** A run of actions that renders together: a plain section, or one submenu. */
|
|
@@ -162,7 +185,25 @@ type ObjectActionDropdownEntry = {
|
|
|
162
185
|
actions: ObjectAction[];
|
|
163
186
|
};
|
|
164
187
|
declare function toDropdownEntries(actions: readonly ObjectAction[]): ObjectActionDropdownEntry[];
|
|
165
|
-
/** The
|
|
188
|
+
/** The actions a dropdown draws, in order — what G1 compares. */
|
|
189
|
+
declare function dropdownActions(entries: readonly ObjectActionDropdownEntry[]): ObjectAction[];
|
|
190
|
+
/** The action ids a dropdown draws, in order. */
|
|
166
191
|
declare function dropdownActionIds(entries: readonly ObjectActionDropdownEntry[]): string[];
|
|
192
|
+
/** The icon-strip menu: standard verbs as icons, then the first feature rows, then the rest. */
|
|
193
|
+
interface StripAndRows {
|
|
194
|
+
/** Every action with a `verb`, in the list's order. */
|
|
195
|
+
strip: ObjectAction[];
|
|
196
|
+
/** The first `rowCount` feature actions by rank (ties keep list order). */
|
|
197
|
+
rows: ObjectAction[];
|
|
198
|
+
/** The remaining feature actions, behind "More … options", same ordering. */
|
|
199
|
+
more: ObjectAction[];
|
|
200
|
+
}
|
|
201
|
+
declare const STRIP_FEATURE_ROWS = 4;
|
|
202
|
+
/**
|
|
203
|
+
* THE STRIP RENDERER'S SPLIT of the same list. Nothing is added or dropped: every
|
|
204
|
+
* id lands in exactly one of strip / rows / more (G1). Unranked feature actions
|
|
205
|
+
* (an extension that gave none) follow every ranked one.
|
|
206
|
+
*/
|
|
207
|
+
declare function toStripAndRows(actions: readonly ObjectAction[], rowCount?: number): StripAndRows;
|
|
167
208
|
|
|
168
|
-
export { ACTION_CHECKING_ACCESS_REASON as A, type BuiltOnDestination as B, type Capability as C, DEFAULT_ACTION_ORIGIN as D, KERNEL_REASON as K, LEVEL_WORD as L, NOT_ANSWERED_YET as N, type ObjectAction as O, type TableActionHost as T, type WhatYouMayDo as W,
|
|
209
|
+
export { ACTION_CHECKING_ACCESS_REASON as A, type BuiltOnDestination as B, type Capability as C, DEFAULT_ACTION_ORIGIN as D, KERNEL_REASON as K, LEVEL_WORD as L, NOT_ANSWERED_YET as N, type ObjectAction as O, STANDARD_VERBS as S, type TableActionHost as T, type WhatYouMayDo as W, type ObjectActionIcon as a, ACTION_NOT_HERE_REASON as b, ACTION_NO_ACCESS_REASON as c, ACTION_PLATFORM_TABLE_REASON as d, OBJECT_ACTION_GROUPS as e, type ObjectActionDropdownEntry as f, type ObjectActionGroup as g, type ObjectActionGroupDef as h, type ObjectActionSection as i, STRIP_FEATURE_ROWS as j, type StandardVerbId as k, type StripAndRows as l, type TableActionSubject as m, type TableActionsInput as n, dropdownActionIds as o, dropdownActions as p, groupObjectActions as q, levelNeededFor as r, rightsReason as s, tableActions as t, tableLink as u, toDropdownEntries as v, toStripAndRows as w, whatYouMayDo as x, whatYouMayDoWithTable as y, withExtensions as z };
|