@ekanos/harness 0.5.0 → 0.5.1

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 CHANGED
@@ -5,6 +5,8 @@ real Ekanos chrome — the actual dashboard grid, the actual `Widget.*` compound
5
5
  components, the actual design tokens — from fixtures, with no Supabase, no auth
6
6
  and no network.
7
7
 
8
+ **Docs:** [sdk.ekanos.dev/harness/overview](https://sdk.ekanos.dev/harness/overview).
9
+
8
10
  **New here? Start with the `@ekanos/sdk` README** — it is the authoring
9
11
  reference for everything you declare (widgets, tools, webhooks, schedules,
10
12
  OAuth, storage, egress). This document covers only the local dev harness that
@@ -22,6 +22,7 @@ import {
22
22
  resolveEgress,
23
23
  supportsLiveMode
24
24
  } from "../../registry.js";
25
+ import { HARNESS_DOCS_URL } from "../lib/docs-links.js";
25
26
  import { getThemeToggleAccessibleLabel } from "../lib/theme-toggle.js";
26
27
  import {
27
28
  RENDER_STATES,
@@ -29,6 +30,7 @@ import {
29
30
  useToolbar
30
31
  } from "../lib/toolbar-context.js";
31
32
  import { useHarnessRegistry } from "../registry-context.js";
33
+ import { DocsLink } from "./docs-link.js";
32
34
  function Field({
33
35
  label,
34
36
  children
@@ -118,6 +120,7 @@ function DevToolbar() {
118
120
  }
119
121
  ) }),
120
122
  /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
123
+ /* @__PURE__ */ jsx(DocsLink, { href: HARNESS_DOCS_URL, "data-test": "toolbar-docs-link", children: "Docs" }),
121
124
  live ? /* @__PURE__ */ jsxs(
122
125
  "span",
123
126
  {
@@ -0,0 +1,11 @@
1
+ /**
2
+ * An external link into the public SDK docs. Opens in a new tab: the harness
3
+ * holds unsaved local state (toolbar choices, an in-progress activation form)
4
+ * that navigating away in place would throw out.
5
+ */
6
+ export declare function DocsLink({ href, children, className, ...rest }: {
7
+ href: string;
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ 'data-test'?: string;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Icon } from "@ekanos/ui/icon";
3
+ import { cn } from "@ekanos/ui/utils";
4
+ function DocsLink({
5
+ href,
6
+ children,
7
+ className,
8
+ ...rest
9
+ }) {
10
+ return /* @__PURE__ */ jsxs(
11
+ "a",
12
+ {
13
+ href,
14
+ target: "_blank",
15
+ rel: "noopener noreferrer",
16
+ className: cn(
17
+ "text-muted-foreground hover:text-foreground flex items-center gap-2 text-sm underline-offset-2 hover:underline",
18
+ className
19
+ ),
20
+ ...rest,
21
+ children: [
22
+ /* @__PURE__ */ jsx(Icon, { name: "fa-solid fa-book", className: "h-4 w-4" }),
23
+ children
24
+ ]
25
+ }
26
+ );
27
+ }
28
+ export {
29
+ DocsLink
30
+ };
@@ -4,11 +4,17 @@ import Link from "next/link";
4
4
  import { usePathname } from "next/navigation";
5
5
  import { Icon } from "@ekanos/ui/icon";
6
6
  import { cn } from "@ekanos/ui/utils";
7
+ import { SURFACE_DOCS } from "../lib/docs-links.js";
7
8
  import { HARNESS_SURFACES } from "../surfaces.js";
9
+ import { DocsLink } from "./docs-link.js";
8
10
  function SurfaceNav({
9
11
  integration
10
12
  }) {
11
13
  const pathname = usePathname();
14
+ const activeSurface = HARNESS_SURFACES.find(
15
+ (surface) => pathname.startsWith(`/${integration.slug}/${surface.segment}`)
16
+ );
17
+ const surfaceDocs = activeSurface ? SURFACE_DOCS[activeSurface.segment] : void 0;
12
18
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5 border-b px-6 py-5", children: [
13
19
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-3", children: [
14
20
  /* @__PURE__ */ jsxs(
@@ -25,25 +31,39 @@ function SurfaceNav({
25
31
  /* @__PURE__ */ jsx("h1", { className: "font-heading text-2xl tracking-tight", children: integration.name }),
26
32
  /* @__PURE__ */ jsx("code", { className: "text-muted-foreground text-xs", children: integration.slug })
27
33
  ] }),
28
- /* @__PURE__ */ jsx("nav", { className: "flex flex-wrap gap-1", children: HARNESS_SURFACES.map((surface) => {
29
- const href = `/${integration.slug}/${surface.segment}`;
30
- const active = pathname.startsWith(href);
31
- return /* @__PURE__ */ jsxs(
32
- Link,
34
+ /* @__PURE__ */ jsxs("nav", { className: "flex flex-wrap items-center gap-1", children: [
35
+ HARNESS_SURFACES.map((surface) => {
36
+ const href = `/${integration.slug}/${surface.segment}`;
37
+ const active = pathname.startsWith(href);
38
+ return /* @__PURE__ */ jsxs(
39
+ Link,
40
+ {
41
+ href,
42
+ className: cn(
43
+ "flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",
44
+ active ? "bg-accent text-accent-foreground font-medium" : "text-muted-foreground hover:bg-accent/50"
45
+ ),
46
+ children: [
47
+ /* @__PURE__ */ jsx(Icon, { name: surface.icon, className: "h-5 w-5" }),
48
+ surface.label
49
+ ]
50
+ },
51
+ surface.segment
52
+ );
53
+ }),
54
+ activeSurface && surfaceDocs ? /* @__PURE__ */ jsxs(
55
+ DocsLink,
33
56
  {
34
- href,
35
- className: cn(
36
- "flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",
37
- active ? "bg-accent text-accent-foreground font-medium" : "text-muted-foreground hover:bg-accent/50"
38
- ),
57
+ href: surfaceDocs,
58
+ className: "ml-auto px-3",
59
+ "data-test": "surface-docs-link",
39
60
  children: [
40
- /* @__PURE__ */ jsx(Icon, { name: surface.icon, className: "h-5 w-5" }),
41
- surface.label
61
+ activeSurface.label,
62
+ " docs"
42
63
  ]
43
- },
44
- surface.segment
45
- );
46
- }) }),
64
+ }
65
+ ) : null
66
+ ] }),
47
67
  integration.widgets.length > 0 ? /* @__PURE__ */ jsxs("nav", { className: "flex flex-wrap gap-1", children: [
48
68
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground px-3 py-2 text-xs", children: "Focus one widget:" }),
49
69
  integration.widgets.map((widget) => {
@@ -0,0 +1,5 @@
1
+ /** The public Ekanos SDK docs. Every docs link the harness renders reads this. */
2
+ export declare const SDK_DOCS_URL = "https://sdk.ekanos.dev";
3
+ export declare const HARNESS_DOCS_URL = "https://sdk.ekanos.dev/harness/overview";
4
+ /** The docs page for each harness surface, keyed by `HarnessSurface.segment`. */
5
+ export declare const SURFACE_DOCS: Readonly<Record<string, string>>;
@@ -0,0 +1,13 @@
1
+ const SDK_DOCS_URL = "https://sdk.ekanos.dev";
2
+ const HARNESS_DOCS_URL = `${SDK_DOCS_URL}/harness/overview`;
3
+ const SURFACE_DOCS = {
4
+ widgets: `${SDK_DOCS_URL}/sdk/surfaces/widgets`,
5
+ tile: `${SDK_DOCS_URL}/sdk/surfaces/marketplace-tile`,
6
+ activation: `${SDK_DOCS_URL}/sdk/surfaces/activation-form`,
7
+ triggers: `${SDK_DOCS_URL}/harness/triggers`
8
+ };
9
+ export {
10
+ HARNESS_DOCS_URL,
11
+ SDK_DOCS_URL,
12
+ SURFACE_DOCS
13
+ };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@ekanos/harness",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "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.",
5
+ "homepage": "https://sdk.ekanos.dev/harness/overview",
5
6
  "bugs": {
6
7
  "email": "npm@govastly.com"
7
8
  },
@@ -63,8 +64,8 @@
63
64
  "tw-animate-css": "1.4.0"
64
65
  },
65
66
  "devDependencies": {
66
- "@ekanos/sdk": "0.7.0",
67
- "@ekanos/ui": "0.7.0",
67
+ "@ekanos/sdk": "0.7.1",
68
+ "@ekanos/ui": "0.7.1",
68
69
  "@kit/tsconfig": "0.1.0",
69
70
  "@tailwindcss/postcss": "4.3.3",
70
71
  "@tanstack/react-query": "5.103.2",