@mistriwork/kit 1.0.0-rc.22 → 1.0.0-rc.23

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.
@@ -44,6 +44,8 @@ interface MultiStepFormProps<Field extends string = string> {
44
44
  an h2 and the actions stay in the flow, at the dialog's foot, beside the host's `leading` (a host with one keeps
45
45
  them in the flow too). A page also draws the steps beside the form where it is wide enough; a dialog never. */
46
46
  presentation?: 'page' | 'dialog';
47
+ /** A page's intake heading: 1, the room's own; 2 under a page that already has its h1 (a page's `<Steps>`). */
48
+ headingLevel?: 1 | 2;
47
49
  /** A page's steps beside the form: what a step already answered said in a line under its name (the host's words,
48
50
  from its draft), or nothing. Asked with the step being answered, so a host says nothing on its review. */
49
51
  summarize?: (step: FormStep<Field>, active: FormStep<Field>) => string | undefined;
@@ -55,5 +57,5 @@ interface MultiStepFormProps<Field extends string = string> {
55
57
  * surrounding New/command/business form supplies those through children and
56
58
  * validateStep, so moving between steps cannot create a second write path.
57
59
  */
58
- export declare function MultiStepForm<Field extends string = string>({ steps, children, step, initialStep, onStepChange, validateStep, onComplete, nextLabel, previousLabel, completeLabel, className, leading, said: hostSaid, style, note, isStepEmpty, presentation, summarize, }: MultiStepFormProps<Field>): import("react").JSX.Element;
60
+ export declare function MultiStepForm<Field extends string = string>({ steps, children, step, initialStep, onStepChange, validateStep, onComplete, nextLabel, previousLabel, completeLabel, className, leading, said: hostSaid, style, note, isStepEmpty, presentation, headingLevel, summarize, }: MultiStepFormProps<Field>): import("react").JSX.Element;
59
61
  export {};
@@ -40,7 +40,7 @@ function safeIndex(index, length) {
40
40
  * surrounding New/command/business form supplies those through children and
41
41
  * validateStep, so moving between steps cannot create a second write path.
42
42
  */
43
- export function MultiStepForm({ steps, children, step, initialStep = 0, onStepChange, validateStep, onComplete, nextLabel, previousLabel = say('common.back'), completeLabel = say('common.save'), className = '', leading, said: hostSaid, style = 'stepper', note, isStepEmpty, presentation = 'page', summarize, }) {
43
+ export function MultiStepForm({ steps, children, step, initialStep = 0, onStepChange, validateStep, onComplete, nextLabel, previousLabel = say('common.back'), completeLabel = say('common.save'), className = '', leading, said: hostSaid, style = 'stepper', note, isStepEmpty, presentation = 'page', headingLevel = 1, summarize, }) {
44
44
  const id = useId();
45
45
  const boundedSteps = steps.slice(0, MAX_RENDERED_STEPS);
46
46
  const controlled = step !== undefined;
@@ -205,7 +205,7 @@ export function MultiStepForm({ steps, children, step, initialStep = 0, onStepCh
205
205
  }) }) }) })) : null;
206
206
  // A host with its own way out (Cancel) or a dialog keeps the actions in the flow, at its foot; a page's bar sticks.
207
207
  if (intake && !inDialog && !leading) {
208
- return (_jsxs("section", { ref: root, className: `multi-step-form ${className}`.trim(), "data-style": "intake", "aria-labelledby": titleId, children: [aside, note, _jsxs("div", { className: "intake-head", children: [progressRow, _jsx(StepHeader, { id: titleId, title: heading, ...(active.lead ? { lead: active.lead } : {}) })] }), panelNode, problemNode, hostSaid, _jsx(ActionBar, { className: "intake-actions", ...(current > 0 ? { back: { label: previousLabel, onClick: () => void move('previous') } } : {}), primary: {
208
+ return (_jsxs("section", { ref: root, className: `multi-step-form ${className}`.trim(), "data-style": "intake", "aria-labelledby": titleId, children: [aside, note, _jsxs("div", { className: "intake-head", children: [progressRow, _jsx(StepHeader, { level: headingLevel, id: titleId, title: heading, ...(active.lead ? { lead: active.lead } : {}) })] }), panelNode, problemNode, hostSaid, _jsx(ActionBar, { className: "intake-actions", ...(current > 0 ? { back: { label: previousLabel, onClick: () => void move('previous') } } : {}), primary: {
209
209
  label: primaryWords,
210
210
  onClick: () => void (last ? complete() : move('next')),
211
211
  busy: pending,
@@ -32,7 +32,7 @@ import { assertNever } from '@mistriwork/engine/shared/model.js';
32
32
  import { appTargetFields } from '@mistriwork/engine/shared/appLinks.js';
33
33
  import { readPageFields } from './pageFieldsRead.js';
34
34
  import { pathEqualityFilter } from '../resourceRequests.js';
35
- import { resourceOf } from './appRooms.js';
35
+ import { recordTabs, resourceOf } from './appRooms.js';
36
36
  /* A record's history, fetched the first time a page holds one. */
37
37
  const RecordHistory = onDemand(() => import('./PageHistory.js'), 'RecordHistory');
38
38
  /* A record's flow runs, fetched the first time a page holds one. */
@@ -162,6 +162,11 @@ function NoteSection({ section, page, base, recordKey }) {
162
162
  const row = readable && (!isCurrent || isCurrent()) && data.data && 'view' in data.data ? data.data.rows[0] : undefined;
163
163
  return (_jsx("section", { className: sectionClass(section), children: _jsx(DashboardNote, { title: section.title, text: section.text ?? '', icon: section.icon, variant: section.variant, action: preview && section.action && 'to' in section.action ? undefined : section.action, row: row }) }));
164
164
  }
165
+ /** A strip's own tabs, then the record's page tabs after them: one strip, each panel drawn by whichever owns it. */
166
+ const withPageTabs = (tabs, draw, pages = []) => ({
167
+ tabs: [...tabs, ...pages.map(({ key, token, label }) => ({ key, token, label }))],
168
+ draw: (i) => (i < tabs.length ? draw(i) : pages[i - tabs.length].draw()),
169
+ });
165
170
  /** Names across the top, one panel under them, each panel drawn the first time it is opened (or at once, where `eager`). */
166
171
  export function TabStrip({ tabs, name, entry, onTab, draw, scoped, eager = [], className = '', }) {
167
172
  const id = useId();
@@ -203,7 +208,7 @@ export function TabStrip({ tabs, name, entry, onTab, draw, scoped, eager = [], c
203
208
  }, children: tab.label }, tab.key))) }), _jsx("div", { className: "page-tab-more", "data-fold-more": "", "data-folded": folded.size ? undefined : '', "aria-hidden": !folded.size || undefined, children: _jsx(DropMenu, { className: "page-tab-more-menu", triggerClassName: "page-tab", label: message('common.more'), popupClassName: "page-actions-popup", align: "end", children: tabs.map((tab, i) => folded.has(i) ? (_jsx(DropItem, { className: "page-actions-item", onClick: () => show(i), children: tab.label }, tab.key)) : null) }) })] }), _jsx("div", { className: "page-tabpanels", children: tabs.map((tab, i) => (_jsx("div", { className: "page-tabpanel", role: "tabpanel", id: `${id}-tabpanel-${i}`, "aria-labelledby": `${id}-tab-${i}`, tabIndex: i === active ? 0 : -1, hidden: i !== active, inert: i !== active, "aria-hidden": i !== active, children: drawn.has(i) ? draw(i) : null }, tab.key))) })] }));
204
209
  }
205
210
  /** A run of lists as tabs: the names across the top, one table under them, fetched when opened. */
206
- function ListTabs({ items, entry, onTab, draw, scoped, counting, }) {
211
+ function ListTabs({ items, entry, onTab, draw, scoped, counting, pages, }) {
207
212
  useMessageLanguage();
208
213
  /* The token is the source's words (apps.ts keepAddresses), so an address names one tab in every language. */
209
214
  const named = (item) => item.section.kind === 'history'
@@ -224,10 +229,11 @@ function ListTabs({ items, entry, onTab, draw, scoped, counting, }) {
224
229
  token: scoped ? `section:${item.index}` : named(item),
225
230
  label: (_jsxs(_Fragment, { children: [word(item), counted(item)] })),
226
231
  }));
227
- return _jsx(TabStrip, { tabs: tabs, name: "Related lists", entry: entry, onTab: onTab, draw: (i) => draw(items[i]), scoped: scoped });
232
+ const strip = withPageTabs(tabs, (i) => draw(items[i]), pages);
233
+ return _jsx(TabStrip, { tabs: strip.tabs, name: "Related lists", entry: entry, onTab: onTab, draw: strip.draw, scoped: scoped });
228
234
  }
229
235
  /** The record's sections as tabs: a panel is sections again, laid out as the page lays them out. */
230
- function SectionTabs({ groups, entry, onTab, lay, scoped, }) {
236
+ function SectionTabs({ groups, entry, onTab, lay, scoped, pages, }) {
231
237
  useMessageLanguage();
232
238
  /* Tokened by the tab's source words (apps.ts keepAddresses): an address names one tab in every language. */
233
239
  const tabs = groups.map((group) => ({
@@ -239,7 +245,8 @@ function SectionTabs({ groups, entry, onTab, lay, scoped, }) {
239
245
  fields are what name the record in its head, and one row costs nothing.
240
246
  A panel of lists still costs nothing until it is opened. */
241
247
  const eager = groups.flatMap((group, i) => (group.items.some(({ section }) => section.kind === 'fields') ? [i] : []));
242
- return (_jsx(TabStrip, { tabs: tabs, name: "Record sections", entry: entry, onTab: onTab, scoped: scoped, eager: eager, className: " page-tabs-sections", draw: (i) => _jsx("div", { className: "page-tab-sections", children: lay(groups[i].items) }) }));
248
+ const strip = withPageTabs(tabs, (i) => _jsx("div", { className: "page-tab-sections", children: lay(groups[i].items) }), pages);
249
+ return (_jsx(TabStrip, { tabs: strip.tabs, name: "Record sections", entry: entry, onTab: onTab, scoped: scoped, eager: eager, className: " page-tabs-sections", draw: strip.draw }));
243
250
  }
244
251
  export function Sections({ page, base, recordKey: key, plans, entry, onLabel, onEdit, onTab, region, onSectionLabel, titleOwner, onTitleEditor, only, }) {
245
252
  /* Hidden sections are dropped here: hiding is a layout decision, and the
@@ -253,6 +260,28 @@ export function Sections({ page, base, recordKey: key, plans, entry, onLabel, on
253
260
  !(section.kind === 'fields' && section.presentation === 'header') &&
254
261
  (!region || (section.region ?? 'main') === region));
255
262
  const firstFields = shown.find(({ section }) => section.kind === 'fields')?.index;
263
+ /* The App's free-form pages placed as this record's tabs (pages/<list view>/[id]/<tab>.page.tsx), in the main
264
+ column only. They join the record's first strip of tabs, its named sections' or else its lists'; a record with
265
+ no strip gets one of its own after its sections. Each is said by its word in the address
266
+ (/compass/accounts/13/pipeline), and is drawn the first time it is opened, as any tab is. */
267
+ const RecordTab = shell().rooms.RecordTab;
268
+ const app = shell().inApp() ? shell().app() : null;
269
+ let pageTabs = RecordTab && app && region !== 'aside' && !only
270
+ ? recordTabs(app, base.id).map((dashboard) => ({
271
+ key: `page:${dashboard.id}`,
272
+ token: dashboard.page.record.tab,
273
+ label: dashboard.label,
274
+ draw: () => _jsx(RecordTab, { dashboard: dashboard, recordKey: key }),
275
+ }))
276
+ : [];
277
+ /** The page tabs, handed once to the first strip that asks: no record says one of them twice. */
278
+ const takePageTabs = () => {
279
+ if (!pageTabs.length)
280
+ return undefined;
281
+ const taken = pageTabs;
282
+ pageTabs = [];
283
+ return taken;
284
+ };
256
285
  /* Only the aside's strips are scoped: the main column is the page, with or
257
286
  without an aside beside it, so its tabs keep their words in the address
258
287
  (/accounts/26/opportunities), never an index. */
@@ -317,7 +346,7 @@ export function Sections({ page, base, recordKey: key, plans, entry, onLabel, on
317
346
  if (listTabs && autoTabs && listRuns.has(i) && (listRuns.get(i) ?? 0) > 1) {
318
347
  if (!strip) {
319
348
  strip = [];
320
- laid.push(_jsx(ListTabs, { items: strip, entry: entry, onTab: onTab, draw: draw, scoped: scoped, counting: inferred ? { base, recordKey: key } : undefined }, `tabs-${i}`));
349
+ laid.push(_jsx(ListTabs, { items: strip, entry: entry, onTab: onTab, draw: draw, scoped: scoped, counting: inferred ? { base, recordKey: key } : undefined, pages: grouped ? undefined : takePageTabs() }, `tabs-${i}`));
321
350
  }
322
351
  strip.push(item);
323
352
  leave = null;
@@ -354,10 +383,16 @@ export function Sections({ page, base, recordKey: key, plans, entry, onLabel, on
354
383
  else
355
384
  groups.push({ name, items: [item] });
356
385
  }
357
- if (groups.length < 2)
358
- return _jsx(_Fragment, { children: lay(shown, true) });
386
+ if (groups.length < 2) {
387
+ const laid = lay(shown, true);
388
+ const own = takePageTabs();
389
+ if (own)
390
+ laid.push(_jsx(TabStrip, { tabs: own, name: "Record pages", entry: entry, onTab: onTab, scoped: scoped, draw: (i) => own[i].draw() }, "page-tabs"));
391
+ return _jsx(_Fragment, { children: laid });
392
+ }
359
393
  const first = shown.findIndex((item) => item.section.tab);
360
- return (_jsxs(_Fragment, { children: [lay(shown.slice(0, first), true), _jsx(SectionTabs, { groups: groups, entry: entry, onTab: onTab, scoped: scoped, lay: (items) => lay(items, false, true) }), lay(shown.slice(first).filter((item) => !item.section.tab), true)] }));
394
+ const pages = takePageTabs();
395
+ return (_jsxs(_Fragment, { children: [lay(shown.slice(0, first), true), _jsx(SectionTabs, { groups: groups, entry: entry, onTab: onTab, scoped: scoped, lay: (items) => lay(items, false, true), pages: pages }), lay(shown.slice(first).filter((item) => !item.section.tab), true)] }));
361
396
  }
362
397
  /** A run of metrics is one item, not several: a strip with a line of its own. */
363
398
  function MetricRun({ items, draw }) {
@@ -109,14 +109,9 @@
109
109
  .queue-pick-list .queue-pick[aria-current='true'] { background: var(--selected, color-mix(in srgb, var(--accent) 10%, transparent)); }
110
110
  .queue-pick-list .queue-pick > .avatar-value { flex: none; }
111
111
  .queue-pick-list .queue-pick > .avatar-value .avatar-text { display: none; }
112
-
113
- /* A split's list: each row is the button that picks its record, the one beside the list marked by a ground, not a stripe
114
- (docs/design.md refuses the side tab). */
115
- .queue-pick { all: unset; box-sizing: border-box; display: flex; align-items: flex-start; gap: var(--space-3h); width: 100%; cursor: pointer; }
116
- .queue-pick:focus-visible { outline: var(--focus-width) solid var(--focus, var(--accent)); outline-offset: -2px; }
117
- .queue-pick-list .queue-list > .queue-row { padding: 0; }
118
- .queue-pick-list .queue-pick { padding: var(--space-3h) var(--space-4); }
119
- .queue-pick-list .queue-pick:hover { background: var(--hover, color-mix(in srgb, var(--ink) 4%, transparent)); }
120
- .queue-pick-list .queue-pick[aria-current='true'] { background: var(--selected, color-mix(in srgb, var(--accent) 10%, transparent)); }
121
- .queue-pick-list .queue-pick > .avatar-value { flex: none; }
122
- .queue-pick-list .queue-pick > .avatar-value .avatar-text { display: none; }
112
+ /* The primary takes the row and each line sits under it on one line of its own: side by side, a short value such as a
113
+ date was squeezed beside the title until it broke word by word. A long line is cut at the edge; the record beside the
114
+ list holds all of it. */
115
+ .queue-pick-list .queue-pick { flex-wrap: wrap; row-gap: var(--space-1); }
116
+ .queue-pick-list .queue-pick > strong { flex: 1 1 100%; min-width: 0; }
117
+ .queue-pick-list .queue-pick > span { flex: 1 1 100%; max-width: 100%; overflow: hidden; color: var(--ink-muted); font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; }
@@ -6,7 +6,7 @@
6
6
  * resolved to those rooms. Pure over the payload, and computed once per
7
7
  * served App, so every reader compares the same objects.
8
8
  */
9
- import { ASSISTANT_ROOM, type ServedApp as ServedAppShape, type ServedDashboardView, type ServedFormView, type ServedResource } from '@mistriwork/engine/shared/servedApp.js';
9
+ import { ASSISTANT_ROOM, type ServedApp as ServedAppShape, type ServedDashboardView, type ServedFormView, type ServedRecordTab, type ServedResource } from '@mistriwork/engine/shared/servedApp.js';
10
10
  import { type NavigationNode, type AvailableNavigationNode } from './navigationTree.js';
11
11
  import type { ListSpec } from './appListModel.js';
12
12
  import type { BoundAppTarget } from '@mistriwork/engine/shared/appLinks.js';
@@ -85,6 +85,17 @@ export declare function viewRoom<A extends ServedApp>(app: A, key: string): Room
85
85
  export declare function dashboardAt<A extends ServedApp>(app: A, pageId: string | undefined): DashboardOf<A> | undefined;
86
86
  /** The signed-in form a `form-<view key>` page id names, or undefined. */
87
87
  export declare function formAt<A extends ServedApp>(app: A, pageId: string | undefined): ServedForm<A> | undefined;
88
+ /**
89
+ * The free-form pages that are tabs of a record of this table
90
+ * (`pages/<list view>/[id]/<tab>.page.tsx`), in the App's order. The served
91
+ * App holds only the pages this reader may open, so a tab they may not
92
+ * read is not among them, as a view they may not read is not in the menu.
93
+ */
94
+ export declare function recordTabs<A extends ServedApp>(app: A, tableId: string): Array<DashboardOf<A> & {
95
+ page: {
96
+ record: ServedRecordTab;
97
+ };
98
+ }>;
88
99
  /**
89
100
  * Every room the App lists, in the menu's order, then the views nav does not
90
101
  * reference — the home of an App without nav among them. A list view only a
@@ -86,6 +86,16 @@ export function formAt(app, pageId) {
86
86
  const room = key === undefined ? undefined : viewRoom(app, key);
87
87
  return room && isFormView(room) ? room : undefined;
88
88
  }
89
+ const isRecordTab = (room) => 'sections' in room && Boolean(room.page?.record);
90
+ /**
91
+ * The free-form pages that are tabs of a record of this table
92
+ * (`pages/<list view>/[id]/<tab>.page.tsx`), in the App's order. The served
93
+ * App holds only the pages this reader may open, so a tab they may not
94
+ * read is not among them, as a view they may not read is not in the menu.
95
+ */
96
+ export function recordTabs(app, tableId) {
97
+ return [...roomsByKey(app).values()].filter((room) => isRecordTab(room) && room.page.record.table === tableId);
98
+ }
89
99
  const listedRooms = new WeakMap();
90
100
  /**
91
101
  * Every room the App lists, in the menu's order, then the views nav does not
@@ -99,7 +109,8 @@ export function appRooms(served) {
99
109
  let held = listedRooms.get(app);
100
110
  if (!held) {
101
111
  const embeddedOnly = embeddedOnlyViews(app, app.home === undefined ? [] : [app.home]);
102
- held = [...roomsByKey(app).values()].filter((room) => !embeddedOnly.has(room.id));
112
+ // A record's tab is drawn on its record's page: it needs a record, so no menu or palette lists it.
113
+ held = [...roomsByKey(app).values()].filter((room) => !embeddedOnly.has(room.id) && !isRecordTab(room));
103
114
  listedRooms.set(app, held);
104
115
  }
105
116
  return held;
@@ -1,4 +1,5 @@
1
1
  import type { FigureFormat } from '@mistriwork/engine/shared/model.js';
2
+ import type { ServedRecordTab } from '@mistriwork/engine/shared/servedApp.js';
2
3
  import { breakdownText, sectionPeriod, windowed } from '@mistriwork/engine/shared/dashboardAsks.js';
3
4
  interface DisplayRule {
4
5
  format?: string;
@@ -129,6 +130,8 @@ export interface DashboardDef {
129
130
  /** The head's form (`head`): `compact`, the title alone on one line with its verbs and no intro; `own`, a page that
130
131
  draws its own head (`head: false`), its title kept for a screen reader and its intro left to it (DashHead.tsx). */
131
132
  head?: 'compact' | 'own';
133
+ /** A free-form page that owns the whole window (`layout: 'bare'`): the shell draws no sidebar and no top bar around it. */
134
+ layout?: 'bare';
132
135
  /** Plain text, authored with the dashboard and served only with it. */
133
136
  description?: string;
134
137
  sections: Section[];
@@ -151,6 +154,8 @@ export interface DashboardDef {
151
154
  params: string[];
152
155
  loader?: string;
153
156
  public?: true;
157
+ /** A record's tab (pages/<list view>/[id]/<tab>.page.tsx): drawn in that record's tab strip, never as a room. */
158
+ record?: ServedRecordTab;
154
159
  };
155
160
  error?: string;
156
161
  }
@@ -799,6 +799,10 @@ body.first-run #db-label {
799
799
  .dash-body { padding: 0 var(--space-4h) var(--space-4h); }
800
800
  /* A free-form page (definePage) is its component on the page body, in a dashboard's gutters. */
801
801
  .free-page-body { padding: 0 var(--space-4h) 56px; }
802
+ /* A bare page (definePage layout: 'bare'): the room owns the window. The sidebar, its reveal, the bars and the menu leave the
803
+ flow; the skip link, the pane and its focus are the shell's still. */
804
+ body.page-bare :is(.topbar, .sidebar, .sidebar-reveal, #topnav, #explain-pane) { display: none; }
805
+ .free-page-body.is-bare { padding: 0; }
802
806
  /* The title shares the body's centered 76rem column — a head pinned to
803
807
  the pane edge over a centered grid read as two different screens. */
804
808
  .dash-head { margin-top: var(--space-2h); margin-bottom: var(--space-6); width: 100%; }
@@ -230,6 +230,11 @@ interface AppRoomSlots {
230
230
  entry: PageEntry | RowEntry;
231
231
  document: NonNullable<ReturnType<typeof documentAt>>;
232
232
  }> | null;
233
+ /** A free-form page that is a tab of a record (RecordTabPage.tsx), drawn in the record page's tab strip. */
234
+ RecordTab: ComponentType<{
235
+ dashboard: DashboardDef;
236
+ recordKey: Record<string, unknown>;
237
+ }> | null;
233
238
  }
234
239
  /** An App's components, fetched for the kit's slots; the Workbench draws none. */
235
240
  export interface AppComponents {
@@ -48,6 +48,7 @@ const WORKBENCH = Object.freeze({
48
48
  Page: null,
49
49
  SplitRecord: null,
50
50
  Document: null,
51
+ RecordTab: null,
51
52
  }),
52
53
  });
53
54
  let mode = WORKBENCH;
@@ -33,12 +33,49 @@ interface CommandHandle {
33
33
  label: string;
34
34
  }> | undefined;
35
35
  }
36
+ interface FormHandle {
37
+ state(): Promise<{
38
+ label: string;
39
+ granted: boolean;
40
+ steps: ReadonlyArray<{
41
+ id: string;
42
+ label: string;
43
+ }>;
44
+ draft: {
45
+ saved: readonly string[];
46
+ step: string | null;
47
+ expiresAt: string | null;
48
+ } | null;
49
+ pending: boolean;
50
+ }>;
51
+ open(input?: Readonly<Record<string, unknown>>, options?: {
52
+ at?: string;
53
+ }): Promise<{
54
+ status: 'done';
55
+ message?: string;
56
+ } | {
57
+ status: 'received';
58
+ reference: string;
59
+ message?: string;
60
+ } | {
61
+ status: 'processing';
62
+ message: string;
63
+ } | {
64
+ status: 'saved';
65
+ saved: readonly string[];
66
+ } | {
67
+ status: 'closed';
68
+ }>;
69
+ startOver(): Promise<boolean>;
70
+ }
36
71
  /** What sdk/commands.tsx hands the SDK's host: a command, or a fixed action, as a component holds it, and a form over the page. */
37
72
  interface CommandHost {
38
73
  command: (ref: string, page?: string) => CommandHandle;
39
74
  /** A fixed action found on one of the resources `reads` names (any, without them). */
40
75
  action: (ref: string, reads?: readonly string[]) => CommandHandle;
41
76
  openForm: (view: string, prefill: Readonly<Record<string, string | number>>) => void;
77
+ /** A form view a page declares, with its draft. */
78
+ form: (view: string) => FormHandle;
42
79
  }
43
80
  interface Bridge {
44
81
  activeApp: () => unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mistriwork/kit",
3
- "version": "1.0.0-rc.22",
3
+ "version": "1.0.0-rc.23",
4
4
  "description": "The shared React client both shells are drawn with: the walk and the address, Grid, Value, the record page, lists, filters and charts.",
5
5
  "homepage": "https://mistriwork.dev",
6
6
  "bugs": {
@@ -83,8 +83,8 @@
83
83
  "./package.json": "./package.json"
84
84
  },
85
85
  "dependencies": {
86
- "@mistriwork/engine": "1.0.0-rc.22",
87
- "@mistriwork/ui": "1.0.0-rc.22",
86
+ "@mistriwork/engine": "1.0.0-rc.23",
87
+ "@mistriwork/ui": "1.0.0-rc.23",
88
88
  "intl-messageformat": "12.1.2",
89
89
  "qrcode-generator": "^2.0.4"
90
90
  },