@artemis-studio/plugin-sdk 2026.9.50 → 2026.9.52
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/package.json +1 -1
- package/types/kernel/api/polling.d.ts +11 -24
- package/types/kernel/api/schema.d.ts +0 -38
- package/types/kernel/shell/ColorSchemeToggle.d.ts +8 -0
- package/types/kernel/shell/CommandPalette.d.ts +2 -3
- package/types/kernel/shell/useColorSchemeToggle.d.ts +5 -0
- package/types/sdk/index.d.ts +1 -1
- package/types/ui/DiagramView.d.ts +19 -9
- package/types/ui/diagram.d.ts +18 -0
package/package.json
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Query, type QueryClient } from '@tanstack/react-query';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Make TanStack's focus state mean "may refresh on its own": the tab is visible and
|
|
4
|
+
* refreshing is not paused. Called once, beside the `QueryClient`.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* ponytail: the interval is re-resolved when the *current* timer fires, so one
|
|
9
|
-
* further poll can land up to `ms` after pausing. Closing that gap means
|
|
10
|
-
* cancelling in-flight fetches, which throws away work the operator did not ask
|
|
11
|
-
* to discard and can leave a screen mid-update. Accepted and recorded in
|
|
12
|
-
* ADR-0055; revisit only if an operator can actually observe it.
|
|
6
|
+
* A side effect: the retryer also waits for focus, so a request that fails while
|
|
7
|
+
* paused retries on resume rather than during the pause.
|
|
13
8
|
*/
|
|
14
|
-
export declare function
|
|
9
|
+
export declare function installPauseSeam(): void;
|
|
15
10
|
/**
|
|
16
11
|
* `refetchOnMount` for the QueryClient default, so pausing covers opening a view
|
|
17
12
|
* and not only the intervals.
|
|
@@ -32,19 +27,11 @@ export declare function markPendingChange(): void;
|
|
|
32
27
|
export declare function usePollingPaused(): boolean;
|
|
33
28
|
export declare function usePendingChange(): boolean;
|
|
34
29
|
/**
|
|
35
|
-
* Refetch everything the current screen is observing
|
|
36
|
-
*
|
|
37
|
-
* `refetchType: 'active'` is the point: it refetches what is on the display and
|
|
38
|
-
* leaves the rest of the cache alone — the same scope the freshness indicator
|
|
39
|
-
* reports on, so the button and the label can never disagree.
|
|
40
|
-
*
|
|
41
|
-
* `cancelRefetch: false` is the other point. TanStack's default aborts the
|
|
42
|
-
* in-flight fetch and starts another, which is right after a mutation (the
|
|
43
|
-
* in-flight response is known-stale) and wrong for a refresh control (the
|
|
44
|
-
* in-flight response is exactly what was asked for). With it, a second activation
|
|
45
|
-
* joins the first instead of restarting it.
|
|
30
|
+
* Refetch everything the current screen is observing: what resuming does, because the
|
|
31
|
+
* first thing an operator needs after unpausing is current data.
|
|
46
32
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
33
|
+
* `refetchType: 'active'` scopes it to what is on the display, the same scope the
|
|
34
|
+
* freshness indicator reports on. `cancelRefetch: false` lets a fetch already in
|
|
35
|
+
* flight finish rather than aborting it for an identical one.
|
|
49
36
|
*/
|
|
50
37
|
export declare function refreshActiveQueries(qc: QueryClient): Promise<void>;
|
|
@@ -596,22 +596,6 @@ export interface paths {
|
|
|
596
596
|
patch?: never;
|
|
597
597
|
trace?: never;
|
|
598
598
|
};
|
|
599
|
-
"/api/v1/clusters/{clusterId}/rediscover": {
|
|
600
|
-
parameters: {
|
|
601
|
-
query?: never;
|
|
602
|
-
header?: never;
|
|
603
|
-
path?: never;
|
|
604
|
-
cookie?: never;
|
|
605
|
-
};
|
|
606
|
-
get?: never;
|
|
607
|
-
put?: never;
|
|
608
|
-
post: operations["rediscover"];
|
|
609
|
-
delete?: never;
|
|
610
|
-
options?: never;
|
|
611
|
-
head?: never;
|
|
612
|
-
patch?: never;
|
|
613
|
-
trace?: never;
|
|
614
|
-
};
|
|
615
599
|
"/api/v1/clusters/{clusterId}/queues": {
|
|
616
600
|
parameters: {
|
|
617
601
|
query?: never;
|
|
@@ -6669,28 +6653,6 @@ export interface operations {
|
|
|
6669
6653
|
};
|
|
6670
6654
|
};
|
|
6671
6655
|
};
|
|
6672
|
-
rediscover: {
|
|
6673
|
-
parameters: {
|
|
6674
|
-
query?: never;
|
|
6675
|
-
header?: never;
|
|
6676
|
-
path: {
|
|
6677
|
-
clusterId: string;
|
|
6678
|
-
};
|
|
6679
|
-
cookie?: never;
|
|
6680
|
-
};
|
|
6681
|
-
requestBody?: never;
|
|
6682
|
-
responses: {
|
|
6683
|
-
/** @description OK */
|
|
6684
|
-
200: {
|
|
6685
|
-
headers: {
|
|
6686
|
-
[name: string]: unknown;
|
|
6687
|
-
};
|
|
6688
|
-
content: {
|
|
6689
|
-
"*/*": components["schemas"]["TopologyView"];
|
|
6690
|
-
};
|
|
6691
|
-
};
|
|
6692
|
-
};
|
|
6693
|
-
};
|
|
6694
6656
|
queues: {
|
|
6695
6657
|
parameters: {
|
|
6696
6658
|
query: {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Light or dark, from the header. Mantine's own manager remembers the choice in this
|
|
3
|
+
* browser; dark stays the first-visit default (`main.tsx`).
|
|
4
|
+
*
|
|
5
|
+
* The name says where the control goes, not where it is: an operator reading
|
|
6
|
+
* "Switch to light theme" knows what activating it will do.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ColorSchemeToggle(): import("react").JSX.Element;
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* A view the operator may not open is still listed, disabled, with the reason: the rail shows it the
|
|
9
9
|
* same way.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* worse than not having one (ADR-0052).
|
|
11
|
+
* Pause and the colour scheme are here too, so every header control is reachable from the keyboard
|
|
12
|
+
* without a hotkey of its own (ADR-0052, ADR-0118).
|
|
14
13
|
*/
|
|
15
14
|
export declare function CommandPalette(): import("react").JSX.Element;
|
package/types/sdk/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { gateFor, type GateVerdict } from '../ui/capabilityGate.ts';
|
|
|
20
20
|
export { useMe } from '../kernel/auth/api.ts';
|
|
21
21
|
export { CodeEditor, type CodeDiagnostic, type CodeEditorProps } from '../ui/CodeEditor.tsx';
|
|
22
22
|
export { ConfirmByTyping } from '../ui/ConfirmByTyping.tsx';
|
|
23
|
-
export { DiagramView, type DiagramEdge, type DiagramNode, type DiagramViewProps } from '../ui/DiagramView.tsx';
|
|
23
|
+
export { DiagramView, type DiagramAction, type DiagramChoice, type DiagramEdge, type DiagramNode, type DiagramViewProps } from '../ui/DiagramView.tsx';
|
|
24
24
|
export { NodeOutcomeSummary, OutcomeSummary, type OutcomeRow } from '../ui/NodeOutcomeSummary.tsx';
|
|
25
25
|
export { Pager } from '../ui/Pager.tsx';
|
|
26
26
|
export { VirtualTable, type GridColumn } from '../ui/VirtualTable.tsx';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type DiagramEdge, type DiagramNode } from './diagram.ts';
|
|
2
|
-
export type { DiagramEdge, DiagramNode };
|
|
1
|
+
import { type DiagramAction, type DiagramChoice, type DiagramEdge, type DiagramNode } from './diagram.ts';
|
|
2
|
+
export type { DiagramAction, DiagramChoice, DiagramEdge, DiagramNode };
|
|
3
3
|
export interface DiagramViewProps {
|
|
4
4
|
nodes: DiagramNode[];
|
|
5
5
|
edges: DiagramEdge[];
|
|
@@ -7,19 +7,29 @@ export interface DiagramViewProps {
|
|
|
7
7
|
onSelect?: (id: string) => void;
|
|
8
8
|
/** Which way the arrows run. Default: down. */
|
|
9
9
|
direction?: 'DOWN' | 'RIGHT';
|
|
10
|
-
/** The frame's height
|
|
11
|
-
height?: number;
|
|
10
|
+
/** The frame's height: pixels, or any CSS length such as '100%' to fill a sized parent. Default 480. */
|
|
11
|
+
height?: number | string;
|
|
12
12
|
/** Names the diagram for screen readers. */
|
|
13
13
|
'aria-label': string;
|
|
14
|
+
/** What can be inserted on an arrow marked `insertable`. With `onInsert`, each such arrow offers them. */
|
|
15
|
+
insertChoices?: DiagramChoice[];
|
|
16
|
+
/** A choice was made on an arrow. The diagram changes nothing itself. */
|
|
17
|
+
onInsert?: (edgeId: string, value: string) => void;
|
|
18
|
+
/** The actions a box offers in its menu. With `onNodeAction`, every box that has some offers them. */
|
|
19
|
+
nodeActions?: (node: DiagramNode) => DiagramAction[];
|
|
20
|
+
/** An action was chosen on a box. The diagram changes nothing itself. */
|
|
21
|
+
onNodeAction?: (nodeId: string, actionId: string) => void;
|
|
14
22
|
}
|
|
15
23
|
/**
|
|
16
|
-
* A
|
|
17
|
-
*
|
|
18
|
-
*
|
|
24
|
+
* A diagram of boxes and arrows, laid out automatically (ELK layered, in a worker) and drawn in
|
|
25
|
+
* Studio's theme (ADR-0117). Nothing is dragged, connected or deleted: it shows a structure and
|
|
26
|
+
* reports which box was chosen. A caller may offer things to insert on arrows and actions on boxes
|
|
27
|
+
* (ADR-0120); the diagram reports the choice and the caller changes the nodes.
|
|
19
28
|
*
|
|
20
29
|
* <p>The diagram is one tab stop. Arrow keys move between boxes in reading order, Enter or Space
|
|
21
30
|
* selects one, and the selection is announced. A box with a problem says so in words, on the box
|
|
22
31
|
* and in its accessible name, so colour is never the only signal. Positions change only when the
|
|
23
|
-
* boxes or arrows do, never when a label does.
|
|
32
|
+
* boxes or arrows do, never when a label does. A box's actions open from its "⋯", a right-click,
|
|
33
|
+
* or Shift+F10; Insert on a box offers what can go on the arrows into it.
|
|
24
34
|
*/
|
|
25
|
-
export declare function DiagramView({ nodes, edges, selectedId, onSelect, direction, height, 'aria-label': ariaLabel, }: DiagramViewProps): import("react").JSX.Element;
|
|
35
|
+
export declare function DiagramView({ nodes, edges, selectedId, onSelect, direction, height, 'aria-label': ariaLabel, insertChoices, onInsert, nodeActions, onNodeAction, }: DiagramViewProps): import("react").JSX.Element;
|
package/types/ui/diagram.d.ts
CHANGED
|
@@ -21,6 +21,24 @@ export interface DiagramEdge {
|
|
|
21
21
|
label?: string;
|
|
22
22
|
/** Drawn dashed: a secondary path. Its meaning belongs in its label. */
|
|
23
23
|
dashed?: boolean;
|
|
24
|
+
/** Something can be inserted on this arrow: it offers the diagram's `insertChoices`. */
|
|
25
|
+
insertable?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** One thing a `DiagramView` offers to insert on an arrow ("Call a service"). */
|
|
28
|
+
export interface DiagramChoice {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
/** A heading the choice is listed under. */
|
|
32
|
+
group?: string;
|
|
33
|
+
}
|
|
34
|
+
/** One action in a box's menu. The diagram only reports it: the caller changes the nodes. */
|
|
35
|
+
export interface DiagramAction {
|
|
36
|
+
id: string;
|
|
37
|
+
label: string;
|
|
38
|
+
/** Why it cannot be taken here. It stays listed, with the reason, rather than disappearing. */
|
|
39
|
+
disabledReason?: string;
|
|
40
|
+
/** Destroys something: shown in the danger colour. The label still says so in words. */
|
|
41
|
+
danger?: boolean;
|
|
24
42
|
}
|
|
25
43
|
/** What positions depend on: which nodes exist and how they connect. A new label moves nothing. */
|
|
26
44
|
export declare function layoutSignature(nodes: DiagramNode[], edges: DiagramEdge[], direction: string): string;
|