@ekanos/harness 0.28.0 → 0.29.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/dist/internal/components/ask-assistant-bridge.js +7 -1
- package/dist/internal/components/surface-nav.js +5 -6
- package/dist/internal/components/workflow-runner.js +1 -1
- package/dist/internal/lib/docs-links.d.ts +0 -1
- package/dist/internal/lib/docs-links.js +0 -2
- package/dist/internal/routes/experience-layout-page.d.ts +6 -6
- package/dist/internal/routes/experience-layout-page.js +3 -168
- package/dist/internal/routes/experience-page-host.js +6 -8
- package/dist/internal/routes/experience-pages-page.d.ts +5 -0
- package/dist/internal/routes/experience-pages-page.js +118 -0
- package/dist/internal/routes/experience-summary-page.js +14 -14
- package/dist/internal/routes/experience-workflow-page.js +1 -1
- package/dist/internal/routes/experience-workflows-page.js +4 -4
- package/dist/internal/routes/repo-home-page.js +1 -0
- package/dist/routes.d.ts +3 -1
- package/dist/routes.js +2 -0
- package/package.json +13 -13
|
@@ -13,7 +13,13 @@ function AskAssistantBridge() {
|
|
|
13
13
|
if (!asked) return null;
|
|
14
14
|
return /* @__PURE__ */ jsxs("div", { className: "fixed right-6 bottom-24 z-50 flex max-h-[60vh] w-[min(28rem,calc(100vw-3rem))] flex-col overflow-hidden rounded-lg border", children: [
|
|
15
15
|
/* @__PURE__ */ jsxs("div", { className: "bg-card flex items-center gap-3 border-b px-5 py-3", children: [
|
|
16
|
-
/* @__PURE__ */ jsx(
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
Icon,
|
|
18
|
+
{
|
|
19
|
+
name: "chat-circle-text",
|
|
20
|
+
className: "text-muted-foreground h-5 w-5"
|
|
21
|
+
}
|
|
22
|
+
),
|
|
17
23
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
18
24
|
/* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium", children: "Ask payload" }),
|
|
19
25
|
/* @__PURE__ */ jsxs("p", { className: "text-muted-foreground truncate text-xs", children: [
|
|
@@ -138,7 +138,7 @@ function previewTab(slug) {
|
|
|
138
138
|
}
|
|
139
139
|
function experienceTabs(base = "/experience", repo = false) {
|
|
140
140
|
return [
|
|
141
|
-
{ href: base, label: "
|
|
141
|
+
{ href: base, label: "Overview", icon: "columns" },
|
|
142
142
|
{
|
|
143
143
|
href: `${base}/widgets`,
|
|
144
144
|
label: "Widgets",
|
|
@@ -146,11 +146,10 @@ function experienceTabs(base = "/experience", repo = false) {
|
|
|
146
146
|
prefix: true
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
|
-
href: `${base}/
|
|
150
|
-
label: "
|
|
151
|
-
icon: "
|
|
152
|
-
prefix: true
|
|
153
|
-
owns: [`${base}/pages`]
|
|
149
|
+
href: `${base}/pages`,
|
|
150
|
+
label: "Pages",
|
|
151
|
+
icon: "browser",
|
|
152
|
+
prefix: true
|
|
154
153
|
},
|
|
155
154
|
{
|
|
156
155
|
href: `${base}/workflows`,
|
|
@@ -22,7 +22,6 @@ export declare const DOCS: {
|
|
|
22
22
|
readonly fixtures: "https://sdk.ekanos.dev/harness/fixtures";
|
|
23
23
|
readonly experiences: "https://sdk.ekanos.dev/guides/experiences";
|
|
24
24
|
readonly pageKinds: "https://sdk.ekanos.dev/guides/experiences#page-kinds";
|
|
25
|
-
readonly layout: "https://sdk.ekanos.dev/guides/experiences#suggest-a-layout";
|
|
26
25
|
readonly workflows: "https://sdk.ekanos.dev/guides/experiences#workflow-templates";
|
|
27
26
|
readonly widgets: "https://sdk.ekanos.dev/sdk/surfaces/widgets";
|
|
28
27
|
readonly experienceView: "https://sdk.ekanos.dev/harness/experience-view";
|
|
@@ -20,7 +20,6 @@ const DOCS = {
|
|
|
20
20
|
fixtures: `${SDK_DOCS_URL}/harness/fixtures`,
|
|
21
21
|
experiences: `${SDK_DOCS_URL}/guides/experiences`,
|
|
22
22
|
pageKinds: `${SDK_DOCS_URL}/guides/experiences#page-kinds`,
|
|
23
|
-
layout: `${SDK_DOCS_URL}/guides/experiences#suggest-a-layout`,
|
|
24
23
|
workflows: `${SDK_DOCS_URL}/guides/experiences#workflow-templates`,
|
|
25
24
|
widgets: `${SDK_DOCS_URL}/sdk/surfaces/widgets`,
|
|
26
25
|
experienceView: `${SDK_DOCS_URL}/harness/experience-view`,
|
|
@@ -36,7 +35,6 @@ const CONSOLE_TAB_DOCS = {
|
|
|
36
35
|
};
|
|
37
36
|
const EXPERIENCE_TAB_DOCS = {
|
|
38
37
|
widgets: DOCS.experienceWidgets,
|
|
39
|
-
layout: DOCS.layout,
|
|
40
38
|
workflows: DOCS.workflows,
|
|
41
39
|
"review-queue": DOCS.reviewQueue,
|
|
42
40
|
runs: DOCS.runLog,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* The retired Layout tab. Arranging an experience's pages and widgets into
|
|
3
|
+
* workspaces is the job of whoever manages the Source, so the harness no longer
|
|
4
|
+
* previews it; an old link to `/layout` lands on the experience's pages.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Mount `ExperiencePagesPage` at `/experience/pages`.
|
|
7
7
|
*/
|
|
8
|
-
export declare function ExperienceLayoutPage():
|
|
8
|
+
export declare function ExperienceLayoutPage(): never;
|
|
@@ -1,174 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import Link from "next/link";
|
|
5
|
-
import {
|
|
6
|
-
layoutAudienceNames,
|
|
7
|
-
resolveLayoutForAudience
|
|
8
|
-
} from "@ekanos/sdk/experience";
|
|
9
|
-
import { Button } from "@ekanos/ui/button";
|
|
10
|
-
import { Card } from "@ekanos/ui/card";
|
|
11
|
-
import {
|
|
12
|
-
EmptyMedia,
|
|
13
|
-
EmptyState,
|
|
14
|
-
EmptyStateHeading,
|
|
15
|
-
EmptyStateText
|
|
16
|
-
} from "@ekanos/ui/empty-state";
|
|
17
|
-
import { Icon } from "@ekanos/ui/icon";
|
|
18
|
-
import { StatusBadge } from "@ekanos/ui/status-badge";
|
|
19
|
-
import { DocsLink } from "../components/docs-link.js";
|
|
20
|
-
import { WidgetSurface } from "../components/widget-surface.js";
|
|
21
|
-
import { useConsoleLinks, useExperienceSurfaces } from "../lib/console-context.js";
|
|
22
|
-
import { useProject } from "../lib/console-hooks.js";
|
|
23
|
-
import { DOCS } from "../lib/docs-links.js";
|
|
24
|
-
const EVERYONE = "";
|
|
25
|
-
const LAYOUT_HINT = `suggestedLayout: {
|
|
26
|
-
workspaces: [
|
|
27
|
-
{
|
|
28
|
-
slug: 'triage',
|
|
29
|
-
name: 'Triage',
|
|
30
|
-
items: [{ ref: 'widget:<widget-id>' }, { ref: 'page:<page-id>' }],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},`;
|
|
2
|
+
import { redirect } from "next/navigation";
|
|
3
|
+
import { useConsoleLinks } from "../lib/console-context.js";
|
|
34
4
|
function ExperienceLayoutPage() {
|
|
35
|
-
const project = useProject();
|
|
36
5
|
const links = useConsoleLinks();
|
|
37
|
-
|
|
38
|
-
const [view, setView] = useState({ audience: EVERYONE, workspace: "" });
|
|
39
|
-
if (!suggestedLayout) {
|
|
40
|
-
return /* @__PURE__ */ jsxs(
|
|
41
|
-
EmptyState,
|
|
42
|
-
{
|
|
43
|
-
className: "min-w-0 py-12 *:max-w-full *:min-w-0",
|
|
44
|
-
"data-test": "layout-empty",
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ jsx(EmptyMedia, { variant: "icon", children: /* @__PURE__ */ jsx(Icon, { name: "layout" }) }),
|
|
47
|
-
/* @__PURE__ */ jsx(EmptyStateHeading, { children: "No suggested layout" }),
|
|
48
|
-
/* @__PURE__ */ jsxs(EmptyStateText, { className: "max-w-md", children: [
|
|
49
|
-
"A suggested layout shows how this experience's widgets and pages would arrange into workspaces; whoever manages the account applies it. Add ",
|
|
50
|
-
/* @__PURE__ */ jsx("code", { children: "suggestedLayout" }),
|
|
51
|
-
" to ",
|
|
52
|
-
/* @__PURE__ */ jsx("code", { children: "defineExperience" }),
|
|
53
|
-
" and it previews here, for each audience it names."
|
|
54
|
-
] }),
|
|
55
|
-
/* @__PURE__ */ jsx("pre", { className: "bg-muted mt-3 w-full max-w-md min-w-0 overflow-x-auto rounded-md px-3 py-2 text-left text-xs", children: LAYOUT_HINT }),
|
|
56
|
-
/* @__PURE__ */ jsx(DocsLink, { href: DOCS.layout, className: "mt-3", children: "Suggest a layout" })
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
const audiences = layoutAudienceNames(suggestedLayout);
|
|
62
|
-
const resolved = resolveLayoutForAudience(
|
|
63
|
-
suggestedLayout,
|
|
64
|
-
view.audience === EVERYONE ? null : view.audience
|
|
65
|
-
);
|
|
66
|
-
const active = resolved.workspaces.find(
|
|
67
|
-
(workspace) => workspace.slug === view.workspace
|
|
68
|
-
) ?? resolved.workspaces[0];
|
|
69
|
-
const productSlug = project.data?.name ?? "experience";
|
|
70
|
-
const shown = (refs) => refs.flatMap((ref) => {
|
|
71
|
-
const id = ref.slice(ref.indexOf(":") + 1);
|
|
72
|
-
const widget = widgets.find((w) => w.id === id);
|
|
73
|
-
return widget ? [widget] : [];
|
|
74
|
-
});
|
|
75
|
-
const itemRefs = active?.items.map((item) => item.ref) ?? [];
|
|
76
|
-
const widgetItems = shown(
|
|
77
|
-
itemRefs.filter((ref) => ref.startsWith("widget:"))
|
|
78
|
-
);
|
|
79
|
-
const pageItems = itemRefs.filter((ref) => ref.startsWith("page:")).map((ref) => ref.slice("page:".length)).flatMap((id) => {
|
|
80
|
-
const page = pages.find((p) => p.id === id);
|
|
81
|
-
return page ? [page] : [];
|
|
82
|
-
});
|
|
83
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", "data-test": "experience-layout", children: [
|
|
84
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
85
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
86
|
-
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-normal", children: "Suggested layout" }),
|
|
87
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "How the widgets and pages would arrange into workspaces for each audience. Whoever manages the account applies it." })
|
|
88
|
-
] }),
|
|
89
|
-
/* @__PURE__ */ jsxs("label", { className: "ml-auto flex items-center gap-2 text-sm", children: [
|
|
90
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Viewing as" }),
|
|
91
|
-
/* @__PURE__ */ jsxs(
|
|
92
|
-
"select",
|
|
93
|
-
{
|
|
94
|
-
value: view.audience,
|
|
95
|
-
onChange: (event) => setView({ audience: event.target.value, workspace: "" }),
|
|
96
|
-
className: "border-input bg-background rounded-md border px-3 py-2 text-sm",
|
|
97
|
-
"data-test": "layout-audience",
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ jsx("option", { value: EVERYONE, children: "Everyone" }),
|
|
100
|
-
audiences.map((name) => /* @__PURE__ */ jsx("option", { value: name, children: name }, name))
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
] })
|
|
105
|
-
] }),
|
|
106
|
-
resolved.workspaces.length === 0 ? /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground text-sm", "data-test": "layout-none", children: [
|
|
107
|
-
"Nothing in this layout is for",
|
|
108
|
-
" ",
|
|
109
|
-
view.audience === EVERYONE ? "everyone" : view.audience,
|
|
110
|
-
"."
|
|
111
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
112
|
-
/* @__PURE__ */ jsx(
|
|
113
|
-
"nav",
|
|
114
|
-
{
|
|
115
|
-
"aria-label": "Workspaces",
|
|
116
|
-
className: "flex flex-wrap gap-1",
|
|
117
|
-
"data-test": "layout-workspaces",
|
|
118
|
-
children: resolved.workspaces.map((workspace) => /* @__PURE__ */ jsx(
|
|
119
|
-
Button,
|
|
120
|
-
{
|
|
121
|
-
variant: workspace.slug === active?.slug ? "secondary" : "ghost",
|
|
122
|
-
size: "sm",
|
|
123
|
-
"aria-current": workspace.slug === active?.slug ? "page" : void 0,
|
|
124
|
-
onClick: () => setView((prev) => ({ ...prev, workspace: workspace.slug })),
|
|
125
|
-
"data-test": `layout-workspace-${workspace.slug}`,
|
|
126
|
-
children: workspace.name
|
|
127
|
-
},
|
|
128
|
-
workspace.slug
|
|
129
|
-
))
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
widgetItems.length > 0 ? /* @__PURE__ */ jsx(WidgetSurface, { widgets: widgetItems, productSlug }) : null,
|
|
133
|
-
pageItems.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-2", "data-test": "layout-pages", children: [
|
|
134
|
-
/* @__PURE__ */ jsxs("h3", { className: "text-sm font-medium", children: [
|
|
135
|
-
"Pages in ",
|
|
136
|
-
active?.name ?? "this workspace"
|
|
137
|
-
] }),
|
|
138
|
-
/* @__PURE__ */ jsx(
|
|
139
|
-
Card,
|
|
140
|
-
{
|
|
141
|
-
layout: "bleed",
|
|
142
|
-
render: /* @__PURE__ */ jsx("ul", {}),
|
|
143
|
-
className: "gap-0 divide-y overflow-hidden py-0",
|
|
144
|
-
children: pageItems.map((page) => /* @__PURE__ */ jsx("li", { "data-test": `layout-page-${page.id}`, children: /* @__PURE__ */ jsxs(
|
|
145
|
-
Link,
|
|
146
|
-
{
|
|
147
|
-
href: `${links.experience}/pages/${page.id}`,
|
|
148
|
-
className: "hover:bg-muted focus-visible:ring-ring flex items-center gap-3 px-4 py-3 text-sm focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset",
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium", children: page.title }),
|
|
151
|
-
/* @__PURE__ */ jsx("code", { className: "text-muted-foreground truncate font-mono text-xs", children: page.id }),
|
|
152
|
-
/* @__PURE__ */ jsxs(StatusBadge, { tone: "neutral", className: "ml-auto", children: [
|
|
153
|
-
page.kind ?? "custom",
|
|
154
|
-
" page"
|
|
155
|
-
] }),
|
|
156
|
-
/* @__PURE__ */ jsx(
|
|
157
|
-
Icon,
|
|
158
|
-
{
|
|
159
|
-
name: "caret-right",
|
|
160
|
-
className: "text-muted-foreground size-4 shrink-0",
|
|
161
|
-
"aria-hidden": true
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
) }, page.id))
|
|
167
|
-
}
|
|
168
|
-
)
|
|
169
|
-
] }) : null
|
|
170
|
-
] })
|
|
171
|
-
] });
|
|
6
|
+
return redirect(`${links.experience}/pages`);
|
|
172
7
|
}
|
|
173
8
|
export {
|
|
174
9
|
ExperienceLayoutPage
|
|
@@ -9,6 +9,7 @@ import { NotFoundState } from "../components/not-found-state.js";
|
|
|
9
9
|
import { WidgetSurface } from "../components/widget-surface.js";
|
|
10
10
|
import { useConsoleLinks, useExperienceSurfaces } from "../lib/console-context.js";
|
|
11
11
|
import { useProject } from "../lib/console-hooks.js";
|
|
12
|
+
import { pageKindLabel } from "./experience-pages-page.js";
|
|
12
13
|
function ExperiencePageHost() {
|
|
13
14
|
const { id, path: rawPath } = useParams();
|
|
14
15
|
const { pages, widgets } = useExperienceSurfaces();
|
|
@@ -30,8 +31,8 @@ function ExperiencePageHost() {
|
|
|
30
31
|
})),
|
|
31
32
|
...pages.length > 0 ? { optionsLabel: "The pages in this experience" } : {},
|
|
32
33
|
action: {
|
|
33
|
-
label: "Back to
|
|
34
|
-
href: `${links.experience}/
|
|
34
|
+
label: "Back to pages",
|
|
35
|
+
href: `${links.experience}/pages`
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
);
|
|
@@ -72,21 +73,18 @@ function ExperiencePageHost() {
|
|
|
72
73
|
/* @__PURE__ */ jsxs(
|
|
73
74
|
Link,
|
|
74
75
|
{
|
|
75
|
-
href: `${links.experience}/
|
|
76
|
+
href: `${links.experience}/pages`,
|
|
76
77
|
className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring flex w-fit items-center gap-1 rounded-sm text-sm focus-visible:ring-2 focus-visible:outline-none",
|
|
77
78
|
"data-test": "experience-page-back",
|
|
78
79
|
children: [
|
|
79
80
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-left", className: "size-3.5", "aria-hidden": true }),
|
|
80
|
-
"
|
|
81
|
+
"Pages"
|
|
81
82
|
]
|
|
82
83
|
}
|
|
83
84
|
),
|
|
84
85
|
/* @__PURE__ */ jsxs("h2", { className: "font-heading text-xl font-normal", children: [
|
|
85
86
|
page.title,
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
kind,
|
|
88
|
-
" page"
|
|
89
|
-
] })
|
|
87
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground ml-2 align-middle text-xs font-normal", children: pageKindLabel(page.kind) })
|
|
90
88
|
] })
|
|
91
89
|
] }),
|
|
92
90
|
page.routes && page.routes.length > 0 ? /* @__PURE__ */ jsx(
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ExperienceSurfacePage } from '../lib/console-context.js';
|
|
2
|
+
/** The words a developer sees for a page's kind; a page with none is custom. */
|
|
3
|
+
export declare function pageKindLabel(kind: ExperienceSurfacePage['kind']): string;
|
|
4
|
+
/** Every page the experience ships, each opening in the page host. */
|
|
5
|
+
export declare function ExperiencePagesPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { Card } from "@ekanos/ui/card";
|
|
5
|
+
import {
|
|
6
|
+
EmptyMedia,
|
|
7
|
+
EmptyState,
|
|
8
|
+
EmptyStateHeading,
|
|
9
|
+
EmptyStateText
|
|
10
|
+
} from "@ekanos/ui/empty-state";
|
|
11
|
+
import { Icon } from "@ekanos/ui/icon";
|
|
12
|
+
import { StatusBadge } from "@ekanos/ui/status-badge";
|
|
13
|
+
import { DocsLink } from "../components/docs-link.js";
|
|
14
|
+
import {
|
|
15
|
+
useConsoleLinks,
|
|
16
|
+
useExperienceSurfaces
|
|
17
|
+
} from "../lib/console-context.js";
|
|
18
|
+
import { DOCS } from "../lib/docs-links.js";
|
|
19
|
+
const PAGE_HINT = `pages: [
|
|
20
|
+
{
|
|
21
|
+
id: 'desk',
|
|
22
|
+
title: 'Desk',
|
|
23
|
+
path: 'desk',
|
|
24
|
+
component: DeskPage,
|
|
25
|
+
},
|
|
26
|
+
],`;
|
|
27
|
+
const KIND_LABELS = {
|
|
28
|
+
custom: "Page",
|
|
29
|
+
canvas: "Widget page",
|
|
30
|
+
overview: "Overview page"
|
|
31
|
+
};
|
|
32
|
+
function pageKindLabel(kind) {
|
|
33
|
+
return KIND_LABELS[kind ?? "custom"] ?? "Page";
|
|
34
|
+
}
|
|
35
|
+
function pageDetail(page) {
|
|
36
|
+
if (page.kind === "canvas") {
|
|
37
|
+
const count = page.widgets?.length ?? 0;
|
|
38
|
+
return `${count} widget${count === 1 ? "" : "s"}`;
|
|
39
|
+
}
|
|
40
|
+
const sections = page.routes?.length ?? 0;
|
|
41
|
+
if (sections > 0) {
|
|
42
|
+
return `${sections + 1} sections`;
|
|
43
|
+
}
|
|
44
|
+
return page.kind === "overview" && !page.component ? "Shows every widget in the experience" : null;
|
|
45
|
+
}
|
|
46
|
+
function ExperiencePagesPage() {
|
|
47
|
+
const links = useConsoleLinks();
|
|
48
|
+
const { pages } = useExperienceSurfaces();
|
|
49
|
+
if (pages.length === 0) {
|
|
50
|
+
return /* @__PURE__ */ jsxs(
|
|
51
|
+
EmptyState,
|
|
52
|
+
{
|
|
53
|
+
className: "min-w-0 py-12 *:max-w-full *:min-w-0",
|
|
54
|
+
"data-test": "pages-empty",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(EmptyMedia, { variant: "icon", children: /* @__PURE__ */ jsx(Icon, { name: "browser" }) }),
|
|
57
|
+
/* @__PURE__ */ jsx(EmptyStateHeading, { children: "No pages yet" }),
|
|
58
|
+
/* @__PURE__ */ jsxs(EmptyStateText, { className: "max-w-md", children: [
|
|
59
|
+
"A page is a full screen this experience ships, such as a desk or a detail view. Add ",
|
|
60
|
+
/* @__PURE__ */ jsx("code", { children: "pages" }),
|
|
61
|
+
" to ",
|
|
62
|
+
/* @__PURE__ */ jsx("code", { children: "defineExperience" }),
|
|
63
|
+
" ",
|
|
64
|
+
"and each one opens here."
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ jsx("pre", { className: "bg-muted mt-3 w-full max-w-md min-w-0 overflow-x-auto rounded-md px-3 py-2 text-left text-xs", children: PAGE_HINT }),
|
|
67
|
+
/* @__PURE__ */ jsx(DocsLink, { href: DOCS.pageKinds, className: "mt-3", children: "Pages" })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", "data-test": "experience-pages", children: [
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
74
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-normal", children: "Pages" }),
|
|
75
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "Every page this experience ships. Where each one appears is set by whoever arranges the workspaces." })
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
Card,
|
|
79
|
+
{
|
|
80
|
+
layout: "bleed",
|
|
81
|
+
render: /* @__PURE__ */ jsx("ul", {}),
|
|
82
|
+
className: "gap-0 divide-y overflow-hidden py-0",
|
|
83
|
+
children: pages.map((page) => {
|
|
84
|
+
const detail = pageDetail(page);
|
|
85
|
+
return /* @__PURE__ */ jsx("li", { "data-test": `page-row-${page.id}`, children: /* @__PURE__ */ jsxs(
|
|
86
|
+
Link,
|
|
87
|
+
{
|
|
88
|
+
href: `${links.experience}/pages/${page.id}`,
|
|
89
|
+
className: "hover:bg-muted focus-visible:ring-ring flex items-center gap-3 px-4 py-3 text-sm focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
92
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: page.title }),
|
|
93
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground flex min-w-0 gap-2 text-xs", children: [
|
|
94
|
+
/* @__PURE__ */ jsx("code", { className: "truncate font-mono", children: page.id }),
|
|
95
|
+
detail ? /* @__PURE__ */ jsx("span", { children: detail }) : null
|
|
96
|
+
] })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ jsx(StatusBadge, { tone: "neutral", className: "ml-auto shrink-0", children: pageKindLabel(page.kind) }),
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
Icon,
|
|
101
|
+
{
|
|
102
|
+
name: "caret-right",
|
|
103
|
+
className: "text-muted-foreground size-4 shrink-0",
|
|
104
|
+
"aria-hidden": true
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) }, page.id);
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
ExperiencePagesPage,
|
|
117
|
+
pageKindLabel
|
|
118
|
+
};
|
|
@@ -130,7 +130,7 @@ function ExperienceSummaryPage() {
|
|
|
130
130
|
const project = useProject();
|
|
131
131
|
const experience = useExperience();
|
|
132
132
|
const links = useConsoleLinks();
|
|
133
|
-
const { widgets, pages
|
|
133
|
+
const { widgets, pages } = useExperienceSurfaces();
|
|
134
134
|
if (!project.data) {
|
|
135
135
|
return /* @__PURE__ */ jsx(PageSkeleton, { label: "Loading the experience" });
|
|
136
136
|
}
|
|
@@ -151,7 +151,7 @@ function ExperienceSummaryPage() {
|
|
|
151
151
|
/* @__PURE__ */ jsx(RuntimeStrip, {})
|
|
152
152
|
] }),
|
|
153
153
|
/* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-3", children: [
|
|
154
|
-
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-normal", children: "What
|
|
154
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-normal", children: "What it ships" }),
|
|
155
155
|
/* @__PURE__ */ jsxs("ul", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [
|
|
156
156
|
/* @__PURE__ */ jsx(
|
|
157
157
|
SurfaceCard,
|
|
@@ -167,23 +167,23 @@ function ExperienceSummaryPage() {
|
|
|
167
167
|
/* @__PURE__ */ jsx(
|
|
168
168
|
SurfaceCard,
|
|
169
169
|
{
|
|
170
|
-
href: `${links.experience}/
|
|
171
|
-
icon: "
|
|
172
|
-
title: "
|
|
173
|
-
count: count(
|
|
174
|
-
text: "
|
|
175
|
-
testId: "summary-
|
|
170
|
+
href: `${links.experience}/pages`,
|
|
171
|
+
icon: "browser",
|
|
172
|
+
title: "Pages",
|
|
173
|
+
count: count(pages.length, "page"),
|
|
174
|
+
text: "Every full screen the experience ships, opened as the host shows it.",
|
|
175
|
+
testId: "summary-pages"
|
|
176
176
|
}
|
|
177
177
|
),
|
|
178
178
|
/* @__PURE__ */ jsx(
|
|
179
179
|
SurfaceCard,
|
|
180
180
|
{
|
|
181
|
-
href: `${links.experience}/
|
|
182
|
-
icon: "
|
|
183
|
-
title: "
|
|
184
|
-
count:
|
|
185
|
-
text:
|
|
186
|
-
testId: "summary-
|
|
181
|
+
href: `${links.experience}/workflows`,
|
|
182
|
+
icon: "flow-arrow",
|
|
183
|
+
title: "Workflows",
|
|
184
|
+
count: count(workflows.length, "workflow"),
|
|
185
|
+
text: "Step through each workflow and run it here.",
|
|
186
|
+
testId: "summary-workflows"
|
|
187
187
|
}
|
|
188
188
|
),
|
|
189
189
|
/* @__PURE__ */ jsx(
|
|
@@ -33,7 +33,7 @@ function ExperienceWorkflowPage() {
|
|
|
33
33
|
{
|
|
34
34
|
testId: "workflow-not-found",
|
|
35
35
|
title: `No workflow called \u201C${name}\u201D`,
|
|
36
|
-
description: workflows.length > 0 ? "This experience has no workflow
|
|
36
|
+
description: workflows.length > 0 ? "This experience has no workflow with that id. Pick one it does have." : "This experience has no workflows yet.",
|
|
37
37
|
options: workflows.map((entry) => ({
|
|
38
38
|
label: entry.id,
|
|
39
39
|
href: `${links.experience}/workflows/${entry.id}`,
|
|
@@ -30,15 +30,15 @@ function ExperienceWorkflowsPage() {
|
|
|
30
30
|
}
|
|
31
31
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", "data-test": "experience-workflows", children: [
|
|
32
32
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
33
|
-
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-normal", children: "
|
|
34
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "Each
|
|
33
|
+
/* @__PURE__ */ jsx("h2", { className: "font-heading text-xl font-normal", children: "Workflows" }),
|
|
34
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "Each workflow runs here against fixtures. Open one to see its steps and run it." })
|
|
35
35
|
] }),
|
|
36
36
|
workflows.length === 0 ? /* @__PURE__ */ jsxs(
|
|
37
37
|
EmptyNote,
|
|
38
38
|
{
|
|
39
39
|
icon: "flow-arrow",
|
|
40
|
-
title: "No
|
|
41
|
-
action: /* @__PURE__ */ jsx(DocsLink, { href: DOCS.workflows, children: "Write a workflow
|
|
40
|
+
title: "No workflows yet",
|
|
41
|
+
action: /* @__PURE__ */ jsx(DocsLink, { href: DOCS.workflows, children: "Write a workflow" }),
|
|
42
42
|
children: [
|
|
43
43
|
"Add ",
|
|
44
44
|
/* @__PURE__ */ jsx("code", { children: "workflows" }),
|
|
@@ -400,6 +400,7 @@ function ExperienceRow({ row }) {
|
|
|
400
400
|
) : /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Uses no integrations." }),
|
|
401
401
|
/* @__PURE__ */ jsxs("p", { className: "flex flex-wrap gap-x-3 gap-y-1", children: [
|
|
402
402
|
/* @__PURE__ */ jsx(Link, { href: `${row.viewHref}/widgets`, className: QUIET_LINK, children: "Widgets" }),
|
|
403
|
+
/* @__PURE__ */ jsx(Link, { href: `${row.viewHref}/pages`, className: QUIET_LINK, children: "Pages" }),
|
|
403
404
|
/* @__PURE__ */ jsx(Link, { href: `${row.viewHref}/workflows`, className: QUIET_LINK, children: "Workflows" }),
|
|
404
405
|
/* @__PURE__ */ jsx(Link, { href: `${row.viewHref}/review-queue`, className: QUIET_LINK, children: "Review queue" })
|
|
405
406
|
] })
|
package/dist/routes.d.ts
CHANGED
|
@@ -43,8 +43,9 @@ export { TriggersPage } from './internal/routes/triggers-page.js';
|
|
|
43
43
|
* /experience ExperienceSummaryPage
|
|
44
44
|
* /experience/widgets ExperienceWidgetsPage
|
|
45
45
|
* /experience/widgets/[id] ExperienceWidgetPage
|
|
46
|
+
* /experience/pages ExperiencePagesPage
|
|
46
47
|
* /experience/pages/[id]/[...path] ExperiencePageHost
|
|
47
|
-
* /experience/layout ExperienceLayoutPage
|
|
48
|
+
* /experience/layout ExperienceLayoutPage (redirects to pages)
|
|
48
49
|
* /experience/workflows ExperienceWorkflowsPage
|
|
49
50
|
* /experience/workflows/[id] ExperienceWorkflowPage
|
|
50
51
|
* /experience/review-queue ExperienceReviewQueuePage
|
|
@@ -64,6 +65,7 @@ export { IntegrationRunsPage } from './internal/routes/integrations-runs-page.js
|
|
|
64
65
|
export { ExperienceSummaryPage } from './internal/routes/experience-summary-page.js';
|
|
65
66
|
export { ExperienceWidgetsPage } from './internal/routes/experience-widgets-page.js';
|
|
66
67
|
export { ExperienceWidgetPage } from './internal/routes/experience-widget-page.js';
|
|
68
|
+
export { ExperiencePagesPage } from './internal/routes/experience-pages-page.js';
|
|
67
69
|
export { ExperiencePageHost } from './internal/routes/experience-page-host.js';
|
|
68
70
|
export { ExperienceLayoutPage } from './internal/routes/experience-layout-page.js';
|
|
69
71
|
export { ExperienceWorkflowsPage } from './internal/routes/experience-workflows-page.js';
|
package/dist/routes.js
CHANGED
|
@@ -23,6 +23,7 @@ import { IntegrationRunsPage } from "./internal/routes/integrations-runs-page.js
|
|
|
23
23
|
import { ExperienceSummaryPage } from "./internal/routes/experience-summary-page.js";
|
|
24
24
|
import { ExperienceWidgetsPage } from "./internal/routes/experience-widgets-page.js";
|
|
25
25
|
import { ExperienceWidgetPage } from "./internal/routes/experience-widget-page.js";
|
|
26
|
+
import { ExperiencePagesPage } from "./internal/routes/experience-pages-page.js";
|
|
26
27
|
import { ExperiencePageHost } from "./internal/routes/experience-page-host.js";
|
|
27
28
|
import { ExperienceLayoutPage } from "./internal/routes/experience-layout-page.js";
|
|
28
29
|
import { ExperienceWorkflowsPage } from "./internal/routes/experience-workflows-page.js";
|
|
@@ -45,6 +46,7 @@ export {
|
|
|
45
46
|
ExperienceConnectPage,
|
|
46
47
|
ExperienceLayoutPage,
|
|
47
48
|
ExperiencePageHost,
|
|
49
|
+
ExperiencePagesPage,
|
|
48
50
|
ExperienceReviewQueuePage,
|
|
49
51
|
ExperienceRunsPage,
|
|
50
52
|
ExperienceSummaryPage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekanos/harness",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Ekanos integration dev harness — every surface of an integration rendered in real Ekanos chrome, from fixtures, with no Supabase or auth; and, in live mode, a real localhost OAuth loop over your own dev-app credentials.",
|
|
6
6
|
"homepage": "https://sdk.ekanos.dev/harness/overview",
|
|
@@ -72,34 +72,34 @@
|
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@ekanos/integration-schema": "0.
|
|
75
|
+
"@ekanos/integration-schema": "0.29.0",
|
|
76
76
|
"next-themes": "0.4.6",
|
|
77
77
|
"tw-animate-css": "1.4.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@ekanos/sdk": "0.
|
|
81
|
-
"@ekanos/ui": "0.
|
|
80
|
+
"@ekanos/sdk": "0.29.0",
|
|
81
|
+
"@ekanos/ui": "0.29.0",
|
|
82
82
|
"@kit/tsconfig": "0.1.0",
|
|
83
|
-
"@tailwindcss/postcss": "4.3.
|
|
84
|
-
"@tanstack/react-query": "5.
|
|
83
|
+
"@tailwindcss/postcss": "4.3.5",
|
|
84
|
+
"@tanstack/react-query": "5.107.1",
|
|
85
85
|
"@types/node": "26.6.6",
|
|
86
86
|
"@types/react": "19.3.0",
|
|
87
87
|
"@types/react-dom": "19.3.0",
|
|
88
88
|
"jsdom": "23.0.1",
|
|
89
|
-
"next": "16.4.
|
|
90
|
-
"next-intl": "^4.
|
|
89
|
+
"next": "16.4.6",
|
|
90
|
+
"next-intl": "^4.15.1",
|
|
91
91
|
"react": "19.3.1",
|
|
92
92
|
"react-dom": "19.3.1",
|
|
93
|
-
"react-hook-form": "^7.
|
|
94
|
-
"tailwindcss": "4.3.
|
|
93
|
+
"react-hook-form": "^7.92.0",
|
|
94
|
+
"tailwindcss": "4.3.5",
|
|
95
95
|
"tsup": "9.0.0",
|
|
96
96
|
"typescript": "^7.0.2",
|
|
97
97
|
"vitest": "5.1.0",
|
|
98
98
|
"zod": "4.6.7"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@ekanos/sdk": "^0.
|
|
102
|
-
"@ekanos/ui": "^0.
|
|
101
|
+
"@ekanos/sdk": "^0.29.0",
|
|
102
|
+
"@ekanos/ui": "^0.29.0",
|
|
103
103
|
"@tanstack/react-query": "^5.101.4",
|
|
104
104
|
"next": "^16.0.0",
|
|
105
105
|
"next-intl": "^4.14.7",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"zod": "^3.25.76 || ^4.0.0"
|
|
111
111
|
},
|
|
112
112
|
"ekanos": {
|
|
113
|
-
"shellContract":
|
|
113
|
+
"shellContract": 7
|
|
114
114
|
},
|
|
115
115
|
"scripts": {
|
|
116
116
|
"build": "tsup && tsc -p tsconfig.build.json && node scripts/rewrite-esm-specifiers.mjs && node scripts/copy-fonts.mjs && node scripts/build-css.mjs",
|