@notis_ai/cli 0.2.25 → 0.2.26
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/README.md +186 -5
- package/config/notis_app_design_rules.json +36 -14
- package/config/portal-route-roots.json +1 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +2784 -541
- package/dist/base-skills/notis-cli/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-cli/references/intelligence.md +1 -1
- package/dist/base-skills/notis-query/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-query/SKILL.md +0 -1
- package/dist/base-skills/notis-query/references/documents.md +7 -0
- package/dist/base-skills/notis-query/references/query.md +1 -0
- package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-spaces/SKILL.md +96 -24
- package/dist/base-skills/notis-spaces/references/architecture.md +4 -3
- package/dist/base-skills/notis-spaces/references/design.md +37 -18
- package/dist/base-skills/notis-spaces/references/reading.md +8 -1
- package/dist/base-skills/notis-spaces/references/reports.md +6 -6
- package/dist/base-skills/notis-spaces/references/sdk.md +71 -7
- package/dist/base-skills/notis-spaces/references/store.md +22 -13
- package/dist/base-skills/notis-spaces/references/views.md +99 -6
- package/dist/sdk/package.json +3 -0
- package/dist/sdk/src/cloudComputerWords.ts +53 -0
- package/dist/sdk/src/components/Audience.tsx +76 -0
- package/dist/sdk/src/components/DocumentPage.tsx +15 -4
- package/dist/sdk/src/components/MarkdownEditor.tsx +44 -14
- package/dist/sdk/src/components/MultiSelectActionBar.tsx +16 -5
- package/dist/sdk/src/components/Skeleton.tsx +162 -6
- package/dist/sdk/src/hooks/useAction.ts +12 -2
- package/dist/sdk/src/hooks/useAgentQueue.ts +125 -0
- package/dist/sdk/src/hooks/useCloudComputerJob.ts +142 -0
- package/dist/sdk/src/hooks/useCloudComputerService.ts +388 -0
- package/dist/sdk/src/hooks/useCloudComputerShell.ts +95 -7
- package/dist/sdk/src/hooks/useCollectionInteractions.ts +40 -2
- package/dist/sdk/src/hooks/useItemThread.ts +58 -0
- package/dist/sdk/src/hooks/useMarqueeSelection.ts +6 -1
- package/dist/sdk/src/hooks/useNativeDocuments.ts +61 -8
- package/dist/sdk/src/hooks/useNotisNavigation.ts +31 -8
- package/dist/sdk/src/hooks/useQuery.ts +67 -10
- package/dist/sdk/src/hooks/useViewParams.ts +47 -11
- package/dist/sdk/src/index.ts +31 -4
- package/dist/sdk/src/interactions.ts +2 -0
- package/dist/sdk/src/nativeData.ts +2 -0
- package/dist/sdk/src/optimisticRows.ts +329 -0
- package/dist/sdk/src/perf.ts +188 -0
- package/dist/sdk/src/provider.tsx +2 -1
- package/dist/sdk/src/queryCache.ts +366 -17
- package/dist/sdk/src/runtime.ts +55 -4
- package/dist/sdk/src/skeleton.ts +103 -0
- package/dist/sdk/src/space.ts +662 -28
- package/dist/sdk/src/spacePublicUI.ts +36 -0
- package/dist/sdk/src/ui/engine/step.ts +54 -0
- package/dist/sdk/src/ui/icons.tsx +3 -1
- package/dist/sdk/src/words/shell.ts +1 -0
- package/dist/skill-sync/index.js +7 -2
- package/dist/skill-sync-worker.mjs +40 -26
- package/dist/space-harness/host.js +272 -105
- package/dist/space-sdk/dist/chunk-BWHAORT4.js +5 -0
- package/dist/space-sdk/dist/index.js +9 -4
- package/dist/space-sdk/dist/ui.js +12 -12
- package/dist/space-sdk/package.json +3 -0
- package/dist/space-sdk/src/cloudComputerWords.d.ts +34 -0
- package/dist/space-sdk/src/components/Audience.d.ts +46 -0
- package/dist/space-sdk/src/components/DocumentPage.d.ts +3 -1
- package/dist/space-sdk/src/components/MarkdownEditor.d.ts +21 -0
- package/dist/space-sdk/src/components/MultiSelectActionBar.d.ts +5 -1
- package/dist/space-sdk/src/components/Skeleton.d.ts +7 -2
- package/dist/space-sdk/src/hooks/useAction.d.ts +8 -1
- package/dist/space-sdk/src/hooks/useAgentQueue.d.ts +61 -0
- package/dist/space-sdk/src/hooks/useCloudComputerJob.d.ts +35 -0
- package/dist/space-sdk/src/hooks/useCloudComputerService.d.ts +75 -0
- package/dist/space-sdk/src/hooks/useCloudComputerShell.d.ts +36 -3
- package/dist/space-sdk/src/hooks/useCollectionInteractions.d.ts +6 -0
- package/dist/space-sdk/src/hooks/useItemThread.d.ts +32 -0
- package/dist/space-sdk/src/hooks/useMarqueeSelection.d.ts +2 -1
- package/dist/space-sdk/src/hooks/useNativeDocumentBody.d.ts +1 -0
- package/dist/space-sdk/src/hooks/useNativeDocuments.d.ts +20 -5
- package/dist/space-sdk/src/hooks/useNotisNavigation.d.ts +11 -2
- package/dist/space-sdk/src/hooks/useQuery.d.ts +24 -2
- package/dist/space-sdk/src/hooks/useViewParams.d.ts +2 -0
- package/dist/space-sdk/src/index.d.ts +24 -4
- package/dist/space-sdk/src/nativeData.d.ts +6 -0
- package/dist/space-sdk/src/queryCache.d.ts +97 -2
- package/dist/space-sdk/src/runtime.d.ts +53 -4
- package/dist/space-sdk/src/skeleton.d.ts +42 -0
- package/dist/space-sdk/src/space.ts +662 -28
- package/dist/space-sdk/src/tailwind-candidates.d.ts +754 -5
- package/dist/space-sdk/src/ui/cloud/CloudComputerFrame.d.ts +29 -0
- package/dist/space-sdk/src/ui/cloud/CloudComputerWaking.d.ts +20 -0
- package/dist/space-sdk/src/ui/comments/CommentPane.d.ts +15 -2
- package/dist/space-sdk/src/ui/comments/PassageComments.d.ts +50 -0
- package/dist/space-sdk/src/ui/comments/commentFiles.d.ts +64 -0
- package/dist/space-sdk/src/ui/comments/commentModel.d.ts +49 -1
- package/dist/space-sdk/src/ui/comments/commentWords.d.ts +26 -0
- package/dist/space-sdk/src/ui/comments/index.d.ts +4 -0
- package/dist/space-sdk/src/ui/comments/passageModel.d.ts +82 -0
- package/dist/space-sdk/src/ui/comments/useComments.d.ts +34 -4
- package/dist/space-sdk/src/ui/comments/usePassageComments.d.ts +67 -0
- package/dist/space-sdk/src/ui/engine/index.d.ts +2 -2
- package/dist/space-sdk/src/ui/engine/step.d.ts +9 -0
- package/dist/space-sdk/src/ui/fields/fields.d.ts +2 -1
- package/dist/space-sdk/src/ui/index.d.ts +4 -0
- package/dist/space-sdk/src/ui/layout/Panels.d.ts +9 -2
- package/dist/space-sdk/src/ui/layout/SidePane.d.ts +42 -0
- package/dist/space-sdk/src/ui/layout/index.d.ts +2 -1
- package/dist/space-sdk/src/ui/layout/panelMath.d.ts +11 -2
- package/dist/space-sdk/src/ui/list/ListReader.d.ts +38 -7
- package/dist/space-sdk/src/ui/list/Row.d.ts +4 -0
- package/dist/space-sdk/src/ui/list/SelectionBar.d.ts +9 -4
- package/dist/space-sdk/src/ui/list/useListKeys.d.ts +4 -0
- package/dist/space-sdk/src/words/shell.ts +1 -0
- package/dist/view-renderer/dist/host.js +355 -188
- package/dist/view-renderer/dist/theme.css +1 -1
- package/dist/view-renderer/src/host.tsx +4 -1
- package/dist/view-renderer/src/index.js +3 -0
- package/dist/view-renderer/src/pool.js +8 -4
- package/dist/view-renderer/src/renderer.js +92 -23
- package/dist/view-renderer/src/skeleton.js +450 -0
- package/package.json +4 -4
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +8 -4
- package/skills/notis-onboarding/BRIEF.md +15 -9
- package/skills/notis-spaces/cli.md +43 -4
- package/src/command-specs/auth.js +5 -3
- package/src/command-specs/cc.js +410 -0
- package/src/command-specs/computer.js +320 -0
- package/src/command-specs/diagnostics.js +2 -13
- package/src/command-specs/documents.js +22 -4
- package/src/command-specs/index.js +7 -0
- package/src/command-specs/onboarding.js +127 -7
- package/src/command-specs/skills.js +2 -2
- package/src/command-specs/spaces.js +162 -30
- package/src/command-specs/tools.js +26 -8
- package/src/command-specs/views.js +4 -1
- package/src/runtime/agent-setup.js +20 -2
- package/src/runtime/app-boundary-validator.js +2 -1
- package/src/runtime/app-platform.js +13 -0
- package/src/runtime/auth-recovery.js +5 -0
- package/src/runtime/channel.js +16 -2
- package/src/runtime/cloud-transfer.js +587 -0
- package/src/runtime/computer-ssh.js +127 -0
- package/src/runtime/oauth.js +50 -4
- package/src/runtime/skill-sync/index.ts +20 -1
- package/src/runtime/skill-sync/local-scanner.ts +1 -0
- package/src/runtime/skill-sync/types.ts +2 -0
- package/src/runtime/space-audience.js +94 -0
- package/src/runtime/space-collection-scaffold.js +2 -1
- package/src/runtime/space-fixture-broker.js +2 -1
- package/src/runtime/space-lock.js +1 -4
- package/src/runtime/space-platform.js +18 -2
- package/src/runtime/space-source.js +105 -7
- package/src/runtime/space-test-server.js +13 -2
- package/src/runtime/space-verification.js +99 -6
- package/src/runtime/space-view-manifest.js +22 -4
- package/src/runtime/sync-skills.js +24 -20
- package/src/runtime/transport.js +19 -0
- package/src/runtime/view-render.js +2 -2
- package/template/.harness/index.html.tmpl +1 -1
- package/dist/skill-sync/index.js.map +0 -7
- package/dist/space-sdk/dist/chunk-SVZATGZB.js +0 -5
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `SidePane`: a page with a pane that always stays open beside it (comments, details), the
|
|
3
|
+
* pane as wide as the person drags it.
|
|
4
|
+
*
|
|
5
|
+
* While the page minimum plus the pane minimum fit the SidePane element, the pane sits on the
|
|
6
|
+
* right with a drag edge on its left, and the page and the pane each scroll on their own (give
|
|
7
|
+
* SidePane a parent with a height, such as a reader body). Narrower, the pane follows the page
|
|
8
|
+
* in one column and both scroll with the parent. The switch is a container query on the
|
|
9
|
+
* SidePane element (`nui-side-pane`, 840px for the defaults), never a viewport query, for the
|
|
10
|
+
* same reason as `Panels`: a Space sits in a shadow root beside a chat of any width.
|
|
11
|
+
*/
|
|
12
|
+
import { type ReactNode } from 'react';
|
|
13
|
+
import { type Words } from '../../words';
|
|
14
|
+
export declare const SIDE_PANE_MAIN_MIN_PX = 520;
|
|
15
|
+
export declare const SIDE_PANE_MIN_PX = 280;
|
|
16
|
+
export declare const SIDE_PANE_MAX_PX = 720;
|
|
17
|
+
export declare const SIDE_PANE_DEFAULT_PX = 340;
|
|
18
|
+
/**
|
|
19
|
+
* The pane width in a row `container` px wide (null when unknown): between `min` and `max`, and
|
|
20
|
+
* never squeezing the page under `mainMin`. A row too narrow for both still gives the pane `min`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function clampSidePaneWidth(want: number, container: number | null, mainMin?: number, min?: number, max?: number): number;
|
|
23
|
+
export interface SidePaneProps {
|
|
24
|
+
/** The page. */
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
/** The pane, always shown: beside the page while both fit, after it otherwise. */
|
|
27
|
+
pane: ReactNode;
|
|
28
|
+
/** The page never gets narrower than this beside the pane. */
|
|
29
|
+
mainMin?: number;
|
|
30
|
+
paneMin?: number;
|
|
31
|
+
paneMax?: number;
|
|
32
|
+
/** The pane width without a stored choice. */
|
|
33
|
+
defaultPaneWidth?: number;
|
|
34
|
+
/** Keeps the chosen pane width across visits (localStorage `notis:side-pane:<key>`). */
|
|
35
|
+
storageKey?: string;
|
|
36
|
+
/** Names the pane for screen readers (the drag edge reads "Resize <label>"). */
|
|
37
|
+
label?: Words | string;
|
|
38
|
+
className?: string;
|
|
39
|
+
mainClassName?: string;
|
|
40
|
+
paneClassName?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function SidePane({ children, pane, mainMin, paneMin, paneMax, defaultPaneWidth, storageKey, label, className, mainClassName, paneClassName, }: SidePaneProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/** Layout: Panels (list plus open item)
|
|
1
|
+
/** Layout: Panels (list plus open item), SidePane (a page with a resizable pane) and the chat width rule. */
|
|
2
2
|
export { Panels, usePanels, type PanelsMode, type PanelsProps, type PanelsState } from './Panels';
|
|
3
|
+
export { SIDE_PANE_DEFAULT_PX, SIDE_PANE_MAIN_MIN_PX, SIDE_PANE_MAX_PX, SIDE_PANE_MIN_PX, SidePane, clampSidePaneWidth, type SidePaneProps, } from './SidePane';
|
|
3
4
|
export * as panelMath from './panelMath';
|
|
4
5
|
export * from './panelMath';
|
|
5
6
|
export { PAGE_VIEWPORT_ATTRIBUTE, createChatPanelEdge, pageViewport, type ChatPanelEdge, type ChatPanelEdgeAdapters, type ChatPanelEdgeAnalytics, type ChatPanelEdgeAria, type ChatPanelEdgeMethod, type ChatPanelEdgeOutcome, type ChatPanelEdgeTrigger, type EdgeKeyboardEvent, type EdgePointerEvent, } from './chatPanelEdge';
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* chat slides over the page, as it does on mobile, but stops short of covering it: mobile
|
|
7
7
|
* brings the page back with a swipe, the desktop has no swipe. Resting the pointer on the
|
|
8
8
|
* uncovered strip extends the page back to its minimum width and shrinks the chat, until the
|
|
9
|
-
* pointer returns to the chat. A Space's `Panels`
|
|
10
|
-
*
|
|
9
|
+
* pointer returns to the chat (`coverReveal`). A Space's `Panels` follows the same rule for a
|
|
10
|
+
* reader width the user chose (dragged, stepped or stored); its default width only pushes. When
|
|
11
|
+
* its two minimums no longer fit, it shows one pane instead.
|
|
11
12
|
*
|
|
12
13
|
* One chat width serves every page: the protected shell mounts a single panel, so the
|
|
13
14
|
* Manager, Spaces and the floating chat open at the same width. Without a stored preference
|
|
@@ -74,6 +75,14 @@ export declare function splitBreakpoint(listMin?: number, readerMin?: number): n
|
|
|
74
75
|
* row too narrow for both gives the reader its own minimum, but always leaves the peek.
|
|
75
76
|
*/
|
|
76
77
|
export declare function clampReaderWidth(want: number, container: number | null, listMin?: number, readerMin?: number, peek?: number): number;
|
|
78
|
+
/**
|
|
79
|
+
* A width the user chose for a side pane, in a row `container` px wide (null when unknown): at
|
|
80
|
+
* least `min`, at most the row minus the `peek` of the main pane it slides over. The chat panel
|
|
81
|
+
* and a `Panels` reader both clamp a chosen width with it.
|
|
82
|
+
*/
|
|
83
|
+
export declare function clampChosenWidth(width: number, container: number | null, min?: number, peek?: number): number;
|
|
84
|
+
/** What a side pane this wide shows while the main pane is revealed: no wider than the push limit. */
|
|
85
|
+
export declare function revealedWidth(width: number, container: number | null, listMin?: number, readerMin?: number): number;
|
|
77
86
|
/** A stored width is a preference only when it is a positive finite number. */
|
|
78
87
|
export declare function parseStoredWidth(raw: string | null): number | null;
|
|
79
88
|
/**
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
* - J/K move the cursor (wrapping on a fresh press), Enter or a click opens the item in the current open mode.
|
|
6
6
|
* - X, Shift+J/K, Mod+A, Mod/Shift-click and press and hold select; the selection bar shows the bulk actions.
|
|
7
7
|
* - Esc closes the open item first, then clears the selection.
|
|
8
|
-
* - After an action takes the cursor row off the list, the cursor (and an open item) moves
|
|
9
|
-
*
|
|
8
|
+
* - After an action takes the cursor row off the list, the cursor (and an open item) moves on the way the cursor last
|
|
9
|
+
* went (iOS Photos): the next row after J, Down, Next or a click further down (the default), the previous row after
|
|
10
|
+
* K, Up, Prev or a click further up; at the edge it goes the other way. An E action (Complete, Archive) whose items
|
|
11
|
+
* stay in the list moves on past them the same way.
|
|
10
12
|
* - Side: the reader sits beside the list (Panels; below the Panels minimum it slides over the list with Back).
|
|
11
13
|
* Center: a dialog over the list (max 880px), J/K still step through items. Full: the reader replaces the list.
|
|
12
14
|
* - The open id lives in the URL (`openParam`, default `open`): the Space URL inside a Space, the page URL (history)
|
|
@@ -14,7 +16,9 @@
|
|
|
14
16
|
* - `onOpenChange` may keep the open item (unsaved edits): the list then says why in its toast. An open item that
|
|
15
17
|
* leaves the list (a search, a refresh, a delete) stays in the reader while the page keeps it, so a page that
|
|
16
18
|
* deletes the open item drops its unsaved edits first and the list moves on.
|
|
17
|
-
* - Toolbar: one 44px line (a status title, the tabs, "+" and the view menu), then an optional 44px info line.
|
|
19
|
+
* - Toolbar: one 44px line (a status title, the tabs, "+" and the view menu), then an optional 44px info line. A list
|
|
20
|
+
* that can select puts the Manager's select-all checkbox first (with a toolbar of its own when it has no other); it
|
|
21
|
+
* selects the loaded rows Mod+A selects, and the selection bar says so when more rows are not loaded yet. The
|
|
18
22
|
* search lives in the top bar (`search`), and the open item's label joins the top bar title (`crumbLabel`).
|
|
19
23
|
* - Reader bar (48px): close or back, open as, previous, next, the item's label, its actions, More, then Open as full
|
|
20
24
|
* page (center) or a second close (one pane). Actions past the bar's room fold into More.
|
|
@@ -25,6 +29,7 @@
|
|
|
25
29
|
*/
|
|
26
30
|
import { type DragEvent as ReactDragEvent, type ReactNode, type Ref } from 'react';
|
|
27
31
|
import { type ActionOption, type ActionRef, type KeySpec, type Words } from '../../words';
|
|
32
|
+
import { type TravelDirection } from '../engine/step';
|
|
28
33
|
import { type ActionHandlers, type ActionOutcome, type ResolvedAction } from '../actions/useActions';
|
|
29
34
|
import type { ToastOptions } from '../actions/useToast';
|
|
30
35
|
import { type TabRowProps } from '../blocks/Tabs';
|
|
@@ -239,6 +244,18 @@ export interface ListReaderProps<T> {
|
|
|
239
244
|
* item's `title`, else its `name`, when it is a string.
|
|
240
245
|
*/
|
|
241
246
|
crumbLabel?: (item: T) => string | null;
|
|
247
|
+
/**
|
|
248
|
+
* The open item's record key when it is a record of the Space's own collection (`row => row.record_key`). On that
|
|
249
|
+
* record's own page the top bar then keeps one title instead of repeating it, and the Space's Editors can rename
|
|
250
|
+
* the record from the leaf. Leave out for items that are not collection records.
|
|
251
|
+
*/
|
|
252
|
+
crumbRecordKey?: (item: T) => string | null | undefined;
|
|
253
|
+
/**
|
|
254
|
+
* How the reader lays out its content. 'read' (default): a centred reading column with page padding, for
|
|
255
|
+
* documents and records. 'fill': the content fills the reader edge to edge at its full height and scrolls on its
|
|
256
|
+
* own, for a tool (an editor, a framed Cloud Computer service, a canvas, a player).
|
|
257
|
+
*/
|
|
258
|
+
readerLayout?: 'read' | 'fill';
|
|
242
259
|
/**
|
|
243
260
|
* Side mode beside the list: open the first item once the list loads (no history step), and with nothing open
|
|
244
261
|
* show "Pick something from the list to read it." in the reader. Default false.
|
|
@@ -287,6 +304,12 @@ export interface ListReaderProps<T> {
|
|
|
287
304
|
isPending?: (item: T) => boolean;
|
|
288
305
|
/** This item cannot be opened, selected, dragged or acted on. */
|
|
289
306
|
isDisabled?: (item: T) => boolean;
|
|
307
|
+
/**
|
|
308
|
+
* The record a row opens, read ahead so the open paints at once: the cursor row's at once, its neighbours' soon
|
|
309
|
+
* after, a hovered row's after a short pause. Default the item's `recordKey` or `record_key`; false turns it off.
|
|
310
|
+
* The host reads ahead only where the Space opens its records as document pages.
|
|
311
|
+
*/
|
|
312
|
+
prefetchKey?: false | ((item: T) => string | null | undefined);
|
|
290
313
|
/** Group headings fold their rows away. Default false. */
|
|
291
314
|
collapsible?: boolean;
|
|
292
315
|
/** Controlled folded group ids; pair with `onCollapsedChange`. */
|
|
@@ -354,6 +377,11 @@ export declare const LIST_READER_WORDS: Readonly<{
|
|
|
354
377
|
}>;
|
|
355
378
|
/** The drag data type of list rows: a JSON array of ids. */
|
|
356
379
|
export declare const LIST_DRAG_TYPE = "application/x-notis-items";
|
|
380
|
+
/**
|
|
381
|
+
* How many rows a long list draws in the commit that shows it; the rest follow in a transition after that paint.
|
|
382
|
+
* Opening the Skills page (about 190 rows, 90 percent below the fold) waited 230 ms on drawing every row.
|
|
383
|
+
*/
|
|
384
|
+
export declare const FIRST_ROWS = 40;
|
|
357
385
|
/**
|
|
358
386
|
* An item's menu order (deck menu rank): the first E action, then the status actions, the others in list order,
|
|
359
387
|
* and the danger ones last.
|
|
@@ -363,18 +391,21 @@ export declare function rankActions<A extends {
|
|
|
363
391
|
key?: KeySpec;
|
|
364
392
|
tone?: string;
|
|
365
393
|
}>(actions: readonly A[]): A[];
|
|
366
|
-
/** The
|
|
367
|
-
export declare
|
|
394
|
+
/** The least distance before the end of the list at which the next page is asked for. */
|
|
395
|
+
export declare const LOAD_AHEAD_MIN_PX = 240;
|
|
396
|
+
/** The id that takes `gone`'s place: the nearest one still in `now` the way the cursor last went, else the other way. */
|
|
397
|
+
export declare function successorOf(previous: readonly string[], now: readonly string[], gone: string, direction?: TravelDirection): string | null;
|
|
368
398
|
/** A list beside a reader, with the Manager's keys, selection, actions and open modes (see the file header). */
|
|
369
399
|
export interface ListSkeletonProps {
|
|
370
400
|
/** Draw a group head first, for a list that groups its rows. */
|
|
371
401
|
grouped?: boolean;
|
|
402
|
+
/** A fixed number of rows. Default: as many as fill the visible pane. */
|
|
372
403
|
rows?: number;
|
|
373
404
|
}
|
|
374
405
|
/**
|
|
375
406
|
* The list while its first page loads, drawn like the rows it stands for: a group head when the list
|
|
376
|
-
* groups, then a lead mark and a title over a meta line. Pages use it for
|
|
377
|
-
* the page does not shift when the real list arrives.
|
|
407
|
+
* groups, then a lead mark and a title over a meta line, as many rows as fill the pane. Pages use it for
|
|
408
|
+
* their own route fallbacks so the page does not shift when the real list arrives.
|
|
378
409
|
*/
|
|
379
410
|
export declare function ListSkeleton({ grouped, rows }: ListSkeletonProps): import("react").JSX.Element;
|
|
380
411
|
export declare function ListReader<T>(props: ListReaderProps<T>): import("react").JSX.Element;
|
|
@@ -141,5 +141,9 @@ export declare function formatReaderAgo(value: Date | string | number, locale: L
|
|
|
141
141
|
export declare function formatRowTime(value: Date | string | number, locale: Locale, now?: Date, timeOptions?: {
|
|
142
142
|
dateOnly?: boolean;
|
|
143
143
|
}): string;
|
|
144
|
+
/** The tick of a selection checkbox (rows and the list's select-all). */
|
|
145
|
+
export declare function Check(): import("react").JSX.Element;
|
|
146
|
+
/** The dash of a partly checked select-all. */
|
|
147
|
+
export declare function Dash(): import("react").JSX.Element;
|
|
144
148
|
/** One list row: lead icon, a title over a meta line, then the trail (trailing, time, avatar, More). */
|
|
145
149
|
export declare function Row({ icon, title, meta, snippet, labels, tags, owner, time, dateOnly, now, trailing, more, state, wrap, className, }: RowProps): import("react").JSX.Element;
|
|
@@ -14,7 +14,7 @@ import type { Selection } from './useSelection';
|
|
|
14
14
|
export declare const SELECTION_BAR_MAX_INLINE = 5;
|
|
15
15
|
/** The boost of the bar's keys over row keys (toolkit spec 2.1). */
|
|
16
16
|
export declare const SELECTION_BAR_BOOST = 25;
|
|
17
|
-
export type SelectionBarFit = '' | 'nokeys' | 'icons';
|
|
17
|
+
export type SelectionBarFit = '' | 'nokeys' | 'icons' | 'nonote';
|
|
18
18
|
export interface SelectionBarProps {
|
|
19
19
|
/** The actions that apply to the selected items, in order. */
|
|
20
20
|
actions: readonly ResolvedAction<any>[];
|
|
@@ -26,11 +26,16 @@ export interface SelectionBarProps {
|
|
|
26
26
|
busy?: ReadonlySet<string>;
|
|
27
27
|
/** 'list' (default): the pill centres on its list. 'page': on the whole page. */
|
|
28
28
|
anchor?: 'list' | 'page';
|
|
29
|
+
/** Every loaded item is selected but the list has more: the count says the rest is not loaded. */
|
|
30
|
+
moreNotLoaded?: boolean;
|
|
29
31
|
className?: string;
|
|
30
32
|
}
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The first fit that leaves `room` px, trying keys and words, then words only, then icons; with a note after the
|
|
35
|
+
* count ("more not loaded"), then icons without the note.
|
|
36
|
+
*/
|
|
37
|
+
export declare function chooseFit(measure: (fit: SelectionBarFit) => number, room: number, note?: boolean): SelectionBarFit;
|
|
38
|
+
export declare function SelectionBar({ actions, count, onClear, onRun, busy, anchor, moreNotLoaded, className }: SelectionBarProps): import("react").JSX.Element;
|
|
34
39
|
export interface UseSelectionBarOptions<T> {
|
|
35
40
|
controller: ActionsController<T>;
|
|
36
41
|
selection: Selection;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Behaviour follows the Portal Manager list (`useCollectionInteractions`):
|
|
6
6
|
* - J/K wrap on a fresh press and stop at the edge while held (`stepCursor`, `repeat: true`).
|
|
7
|
+
* - Each key move reports its way (`onTravel`), so a wrap from the last row to the first still counts as "next".
|
|
7
8
|
* - With an item open, J/K open the item under the new cursor.
|
|
8
9
|
* - Only visible rows count (hidden, inert or display none rows are skipped).
|
|
9
10
|
* - The row under the cursor is focused without scrolling, then scrolled to the nearest edge (scroll padding keeps
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
import { type RefObject } from 'react';
|
|
20
21
|
import type { FocusEvent as ReactFocusEvent, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent, PointerEvent as ReactPointerEvent } from 'react';
|
|
21
22
|
import { type Scope } from '../../words';
|
|
23
|
+
import { type TravelDirection } from '../engine/step';
|
|
22
24
|
import type { Selection } from './useSelection';
|
|
23
25
|
/** Clicks on these inside a row belong to them (Manager `INTERACTIVE_SELECTOR`). */
|
|
24
26
|
export declare const ROW_INTERACTIVE_SELECTOR = "button, a, input, textarea, select, [role=\"button\"], [contenteditable]:not([contenteditable=\"false\"])";
|
|
@@ -54,6 +56,8 @@ export interface UseListKeysOptions {
|
|
|
54
56
|
* Right go to the nearest column that has tiles, at the same height or its last tile.
|
|
55
57
|
*/
|
|
56
58
|
board?: readonly (readonly string[])[];
|
|
59
|
+
/** A key moved the cursor: J, Down and Right go 'next'; K, Up and Left go 'previous'. Called before `setCursor`. */
|
|
60
|
+
onTravel?: (direction: TravelDirection, to: string) => void;
|
|
57
61
|
}
|
|
58
62
|
export interface RowDomProps {
|
|
59
63
|
role: 'option';
|
|
@@ -23,6 +23,7 @@ export const SHELL_WORDS = Object.freeze({
|
|
|
23
23
|
tryAgain: { en: 'Try again', fr: 'Réessayer' },
|
|
24
24
|
selectedOne: { en: '1 selected', fr: '1 sélectionné' },
|
|
25
25
|
selectedMany: { en: '{n} selected', fr: '{n} sélectionnés' },
|
|
26
|
+
moreNotLoaded: { en: 'more not loaded', fr: 'suite non chargée' },
|
|
26
27
|
sidePeek: { en: 'Side peek', fr: 'Aperçu latéral' },
|
|
27
28
|
centerPeek: { en: 'Center peek', fr: 'Aperçu centré' },
|
|
28
29
|
fullPage: { en: 'Full page', fr: 'Pleine page' },
|