@nice-code/action 0.7.0 → 0.8.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.
- package/build/devtools/browser/index.js +590 -1246
- package/build/devtools/server/index.js +7 -1
- package/build/index.js +1173 -972
- package/build/types/ActionRuntime/ActionRuntime.d.ts +23 -1
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Transport.types.d.ts +6 -0
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/WebSocketConnection.d.ts +2 -1
- package/build/types/ActionRuntime/Handler/Server/ActionServerHandler.d.ts +57 -0
- package/build/types/ActionRuntime/Handler/Server/WsConnectionStateStore.d.ts +61 -0
- package/build/types/ActionRuntime/Handler/Server/createActionFetchHandler.d.ts +40 -0
- package/build/types/devtools/browser/NiceActionDevtools.d.ts +1 -1
- package/build/types/devtools/browser/components/ActionErrorDisplay.d.ts +1 -1
- package/build/types/devtools/browser/components/CallStackSection.d.ts +1 -1
- package/build/types/devtools/browser/components/ChildDispatchChips.d.ts +1 -1
- package/build/types/devtools/browser/components/Chip.d.ts +1 -1
- package/build/types/devtools/browser/components/DetailSection.d.ts +1 -1
- package/build/types/devtools/browser/components/DomainChip.d.ts +1 -1
- package/build/types/devtools/browser/components/HandlerChips.d.ts +1 -1
- package/build/types/devtools/browser/components/Icon.d.ts +1 -1
- package/build/types/devtools/browser/components/MetaSection.d.ts +1 -1
- package/build/types/devtools/browser/components/NiceErrorDisplay.d.ts +2 -2
- package/build/types/devtools/browser/components/OriginChip.d.ts +1 -1
- package/build/types/devtools/browser/components/RoutingSection.d.ts +1 -1
- package/build/types/devtools/browser/components/RunningTimer.d.ts +2 -2
- package/build/types/devtools/browser/components/SectionLabel.d.ts +1 -4
- package/build/types/devtools/browser/components/StackTraceSection.d.ts +1 -1
- package/build/types/devtools/browser/components/Tooltip.d.ts +1 -24
- package/build/types/devtools/browser/components/action_detail/ActionDetailPanel.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/ActionEntryRow.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/ActionInputAndOutputChip.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/ActionList.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/IoTooltipContent.d.ts +1 -4
- package/build/types/devtools/browser/components/utils.d.ts +1 -3
- package/build/types/devtools/core/ActionDevtools.types.d.ts +1 -1
- package/build/types/devtools/core/ActionDevtoolsCore.d.ts +4 -1
- package/build/types/devtools/core/devtools_colors.d.ts +1 -26
- package/build/types/index.d.ts +3 -1
- package/package.json +33 -29
- package/build/types/devtools/browser/components/PanelChrome.d.ts +0 -41
- package/build/types/devtools/browser/devtools_dock.d.ts +0 -54
package/package.json
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-code/action",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"type": "module",
|
|
3
|
+
"version": "0.8.0",
|
|
6
4
|
"exports": {
|
|
7
5
|
".": {
|
|
8
6
|
"source": "./src/index.ts",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
},
|
|
12
|
-
"./react-query": {
|
|
13
|
-
"source": "./src/react-query/index.ts",
|
|
14
|
-
"types": "./build/types/react-query/index.d.ts",
|
|
15
|
-
"import": "./build/react-query/index.js"
|
|
7
|
+
"import": "./build/index.js",
|
|
8
|
+
"types": "./build/types/index.d.ts"
|
|
16
9
|
},
|
|
17
10
|
"./devtools/browser": {
|
|
18
11
|
"source": "./src/devtools/browser/index.ts",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
12
|
+
"import": "./build/devtools/browser/index.js",
|
|
13
|
+
"types": "./build/types/devtools/browser/index.d.ts"
|
|
21
14
|
},
|
|
22
15
|
"./devtools/server": {
|
|
23
16
|
"source": "./src/devtools/server/index.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
17
|
+
"import": "./build/devtools/server/index.js",
|
|
18
|
+
"types": "./build/types/devtools/server/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"./react-query": {
|
|
21
|
+
"source": "./src/react-query/index.ts",
|
|
22
|
+
"import": "./build/react-query/index.js",
|
|
23
|
+
"types": "./build/types/react-query/index.d.ts"
|
|
26
24
|
}
|
|
27
25
|
},
|
|
28
26
|
"files": [
|
|
@@ -30,40 +28,46 @@
|
|
|
30
28
|
"package.json",
|
|
31
29
|
"README.md"
|
|
32
30
|
],
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@tanstack/react-query": "^5.100.3",
|
|
33
|
+
"react": ">=19",
|
|
34
|
+
"react-dom": ">=19",
|
|
35
|
+
"valibot": "^1.3.1"
|
|
36
|
+
},
|
|
37
|
+
"private": false,
|
|
33
38
|
"publishConfig": {
|
|
34
39
|
"access": "public"
|
|
35
40
|
},
|
|
36
41
|
"scripts": {
|
|
42
|
+
"build": "bun run clean-build && bun run build.ts && bun run build-types",
|
|
43
|
+
"build-types": "tsc --project tsconfig.build.json",
|
|
44
|
+
"build-watch": "bun run clean-build && bun run build.ts --watch && bun run build-types --watch",
|
|
45
|
+
"clean-build": "bunx rimraf build",
|
|
37
46
|
"type-check": "bunx tsc --noEmit",
|
|
38
47
|
"type-check-watch": "bunx tsc --noEmit --watch",
|
|
39
|
-
"clean-build": "bunx rimraf build",
|
|
40
48
|
"vitest": "vitest --typecheck",
|
|
41
|
-
"vitest-agent": "vitest --typecheck --reporter=agent"
|
|
42
|
-
"build": "bun run clean-build && bun run build.ts && bun run build-types",
|
|
43
|
-
"build-watch": "bun run clean-build && bun run build.ts --watch && bun run build-types --watch",
|
|
44
|
-
"build-types": "tsc --project tsconfig.build.json"
|
|
49
|
+
"vitest-agent": "vitest --typecheck --reporter=agent"
|
|
45
50
|
},
|
|
51
|
+
"type": "module",
|
|
46
52
|
"dependencies": {
|
|
47
|
-
"@nice-code/common-errors": "0.
|
|
48
|
-
"@nice-code/error": "0.
|
|
49
|
-
"@nice-code/util": "0.
|
|
53
|
+
"@nice-code/common-errors": "0.8.0",
|
|
54
|
+
"@nice-code/error": "0.8.0",
|
|
55
|
+
"@nice-code/util": "0.8.0",
|
|
50
56
|
"@standard-schema/spec": "^1.1.0",
|
|
51
57
|
"@tanstack/react-virtual": "^3.13.26",
|
|
52
58
|
"http-status-codes": "^2.3.0",
|
|
53
59
|
"lucide-react": "1.17.0",
|
|
60
|
+
"msgpackr": "2.0.4",
|
|
54
61
|
"nanoid": "^5.1.9",
|
|
62
|
+
"nice-devtools-shared": "0.8.0",
|
|
55
63
|
"source-map-js": "^1.2.1",
|
|
56
|
-
"std-env": "^4.1.0"
|
|
57
|
-
"msgpackr": "2.0.4"
|
|
64
|
+
"std-env": "^4.1.0"
|
|
58
65
|
},
|
|
59
66
|
"devDependencies": {
|
|
60
67
|
"@tanstack/react-query": "^5.100.3",
|
|
61
68
|
"@types/react": "^19.0.0",
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"peerDependencies": {
|
|
65
|
-
"@tanstack/react-query": "^5.100.3",
|
|
66
|
-
"react": ">=19",
|
|
69
|
+
"@types/react-dom": "^19.0.0",
|
|
70
|
+
"msw": "^2.13.6",
|
|
67
71
|
"valibot": "^1.3.1"
|
|
68
72
|
}
|
|
69
73
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { TDevtoolsPosition } from "../../core/ActionDevtools.types";
|
|
2
|
-
export interface IDevtoolsLauncherItem {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
badge?: string;
|
|
7
|
-
onOpen: () => void;
|
|
8
|
-
}
|
|
9
|
-
export type TDockSide = "top" | "bottom" | "left" | "right";
|
|
10
|
-
export declare function getDockSide(pos: TDevtoolsPosition): TDockSide;
|
|
11
|
-
export declare function PanelHeader({ position, onPositionChange, onClose, onClear, openOthers, }: {
|
|
12
|
-
position: TDevtoolsPosition;
|
|
13
|
-
onPositionChange: (p: TDevtoolsPosition) => void;
|
|
14
|
-
onClose: () => void;
|
|
15
|
-
onClear?: () => void;
|
|
16
|
-
openOthers?: IDevtoolsLauncherItem[];
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare function ResizeHandle({ dockSide, dockedSize, onChange, }: {
|
|
19
|
-
dockSide: TDockSide;
|
|
20
|
-
dockedSize: number;
|
|
21
|
-
onChange: (size: number) => void;
|
|
22
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
/**
|
|
24
|
-
* Draggable divider between the list and the detail pane. `horizontal` refers to
|
|
25
|
-
* the split axis: a row layout (dock top/bottom) splits horizontally and drags
|
|
26
|
-
* left/right; a column layout (dock left/right) splits vertically. The reported
|
|
27
|
-
* ratio is the fraction of the container the *detail* pane should occupy.
|
|
28
|
-
*/
|
|
29
|
-
export declare function SplitHandle({ horizontal, onRatioChange, }: {
|
|
30
|
-
horizontal: boolean;
|
|
31
|
-
onRatioChange: (ratio: number) => void;
|
|
32
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
/**
|
|
34
|
-
* The combined, page-wide launcher shown while every devtool is collapsed — one
|
|
35
|
-
* grouped pill with a segment per registered devtool, so the buttons never
|
|
36
|
-
* overlap or hide behind each other. Rendered by the coordinator's "primary"
|
|
37
|
-
* devtool only.
|
|
38
|
-
*/
|
|
39
|
-
export declare function DevtoolsLauncher({ items }: {
|
|
40
|
-
items: IDevtoolsLauncherItem[];
|
|
41
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export type TDockSide = "top" | "bottom" | "left" | "right";
|
|
2
|
-
/** A handle to one registered devtool, used to render launch controls. */
|
|
3
|
-
export interface IDockDevtoolRef {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
icon: string;
|
|
7
|
-
badge?: string;
|
|
8
|
-
onOpen: () => void;
|
|
9
|
-
}
|
|
10
|
-
/** The live, syncable part of a devtool's registration. */
|
|
11
|
-
export interface IDockDevtoolSync {
|
|
12
|
-
side: TDockSide;
|
|
13
|
-
size: number;
|
|
14
|
-
open: boolean;
|
|
15
|
-
badge?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface IDockDevtoolInput extends IDockDevtoolSync {
|
|
18
|
-
id: string;
|
|
19
|
-
label: string;
|
|
20
|
-
icon: string;
|
|
21
|
-
onOpen: () => void;
|
|
22
|
-
}
|
|
23
|
-
export interface IDockView {
|
|
24
|
-
/** Offset (px) from the docked edge — stacks open panels on the same side. */
|
|
25
|
-
dockOffset: number;
|
|
26
|
-
/**
|
|
27
|
-
* True when this panel shares its dock side with another open panel (stacked
|
|
28
|
-
* either nearer or further from the edge). Stacked panels square off all their
|
|
29
|
-
* corners so they sit flush as one continuous block — only a panel alone on
|
|
30
|
-
* its side keeps its rounded, page-facing corners.
|
|
31
|
-
*/
|
|
32
|
-
stacked: boolean;
|
|
33
|
-
/** Is any devtool on the page currently open? */
|
|
34
|
-
anyOpen: boolean;
|
|
35
|
-
/** First-registered devtool — the one that renders the combined launcher. */
|
|
36
|
-
isPrimary: boolean;
|
|
37
|
-
/** Every registered devtool, for the combined launcher. */
|
|
38
|
-
devtools: IDockDevtoolRef[];
|
|
39
|
-
/** Closed devtools other than this one, for an open panel's header. */
|
|
40
|
-
otherClosed: IDockDevtoolRef[];
|
|
41
|
-
}
|
|
42
|
-
export interface IDevtoolsDockCoordinator {
|
|
43
|
-
version: number;
|
|
44
|
-
register(panel: IDockDevtoolInput): () => void;
|
|
45
|
-
update(id: string, next: IDockDevtoolSync): void;
|
|
46
|
-
getView(id: string): IDockView;
|
|
47
|
-
subscribe(listener: () => void): () => void;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Returns the page-wide dock coordinator, installing it on `window` the first
|
|
51
|
-
* time it is requested. On the server (no `window`) a throwaway instance is
|
|
52
|
-
* returned so callers can use it unconditionally.
|
|
53
|
-
*/
|
|
54
|
-
export declare function getDevtoolsDockCoordinator(): IDevtoolsDockCoordinator;
|