@ekanos/sdk 0.29.0 → 0.30.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/api-report.md +3 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/lazy-component.d.ts +27 -0
- package/dist/components/lazy-component.js +35 -0
- package/dist/components/lazy-component.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +3 -3
package/api-report.md
CHANGED
|
@@ -9,7 +9,7 @@ This is the complete surface of every entrypoint. The authoring guide
|
|
|
9
9
|
for these symbols is README.md. Entrypoints marked WORKSPACE-ONLY are
|
|
10
10
|
not reachable from a published install — see the note in each section.
|
|
11
11
|
|
|
12
|
-
Total exported names: **
|
|
12
|
+
Total exported names: **377** across 12 entrypoints.
|
|
13
13
|
|
|
14
14
|
## `@ekanos/sdk` (39 exports)
|
|
15
15
|
|
|
@@ -55,7 +55,7 @@ Total exported names: **376** across 12 entrypoints.
|
|
|
55
55
|
| `WidgetVerdictTone` | type alias |
|
|
56
56
|
| `WorkspaceTargetDefinition` | interface |
|
|
57
57
|
|
|
58
|
-
## `@ekanos/sdk/components` (
|
|
58
|
+
## `@ekanos/sdk/components` (46 exports)
|
|
59
59
|
|
|
60
60
|
| Export | Kind |
|
|
61
61
|
| --- | --- |
|
|
@@ -101,6 +101,7 @@ Total exported names: **376** across 12 entrypoints.
|
|
|
101
101
|
| `WidgetState` | interface |
|
|
102
102
|
| `WidgetStateAction` | interface |
|
|
103
103
|
| `currentReturnPath` | function |
|
|
104
|
+
| `lazyComponent` | function |
|
|
104
105
|
| `useWidgetVerdict` | function |
|
|
105
106
|
| `widgetQueryState` | function |
|
|
106
107
|
| `widgetQueryStatus` | function |
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
export { Widget, useWidgetVerdict, type WidgetDataStatus, type WidgetHeaderTrailing, } from './widgets/widget.js';
|
|
29
29
|
export { widgetQueryState, widgetQueryStatus, type WidgetConnectionGate, type WidgetQuery, type WidgetQueryState, } from './widgets/widget-query-state.js';
|
|
30
30
|
export { WidgetContext, type WidgetActions, type WidgetContextValue, type WidgetData, type WidgetHealth, type WidgetMeta, type WidgetRenderState, type WidgetSource, type WidgetState, } from './widgets/widget-context.js';
|
|
31
|
+
export { lazyComponent } from './lazy-component.js';
|
|
31
32
|
export { WidgetPreviewProvider } from './widgets/widget-preview-provider.js';
|
|
32
33
|
export type { WidgetPreviewProviderProps } from './widgets/widget-preview-provider.js';
|
|
33
34
|
export { AiPromptChip } from './widgets/ai-prompt-chip.js';
|
package/dist/components/index.js
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
export { Widget, useWidgetVerdict, } from './widgets/widget.js';
|
|
29
29
|
export { widgetQueryState, widgetQueryStatus, } from './widgets/widget-query-state.js';
|
|
30
30
|
export { WidgetContext, } from './widgets/widget-context.js';
|
|
31
|
+
export { lazyComponent } from './lazy-component.js';
|
|
31
32
|
export { WidgetPreviewProvider } from './widgets/widget-preview-provider.js';
|
|
32
33
|
export { AiPromptChip } from './widgets/ai-prompt-chip.js';
|
|
33
34
|
export { AskIcon } from './widgets/ask-icon.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EACL,MAAM,EACN,gBAAgB,GAGjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,GAIlB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,aAAa,GASd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,6BAA6B,GAE9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,GAKpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAK5E,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/components — client-side building blocks.\n *\n * Import from client components only. `Widget` is the compound API every\n * dashboard widget renders through; the activation forms are the two\n * sanctioned activation UX bases (credential-style and OAuth-style), and\n * `BaseMarketplaceTile` is the matching base for the marketplace tile.\n *\n * The SDK OWNS these implementations — the pre-inversion re-exports through\n * `@kit/integrations-core/components/*` are gone; core now re-exports FROM\n * here for first-party code (one source of truth, two consumption paths —\n * one source of truth with two consumption paths. UI primitives come from\n * `@ekanos/ui`\n * (the published slice of the host design system), never `@kit/ui`.\n *\n * Server seam: nothing here imports a server module. `OAuthActivationForm`\n * performs activation through the host-injected actions seam\n * (`IntegrationActivationProvider`, @ekanos/sdk/hooks) — a server-action\n * REFERENCE bound by the host, not server code shipped to the browser.\n *\n * `WidgetContext` is the single context identity both sides share: the\n * host's `DashboardWidgetProvider` (host chrome — persistence callbacks,\n * config hierarchy) provides it, the SDK's `Widget.*` reads it.\n *\n * Surface discipline: additions require an entry in\n * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.\n */\n\nexport {\n Widget,\n useWidgetVerdict,\n type WidgetDataStatus,\n type WidgetHeaderTrailing,\n} from './widgets/widget';\nexport {\n widgetQueryState,\n widgetQueryStatus,\n type WidgetConnectionGate,\n type WidgetQuery,\n type WidgetQueryState,\n} from './widgets/widget-query-state';\nexport {\n WidgetContext,\n type WidgetActions,\n type WidgetContextValue,\n type WidgetData,\n type WidgetHealth,\n type WidgetMeta,\n type WidgetRenderState,\n type WidgetSource,\n type WidgetState,\n} from './widgets/widget-context';\nexport { WidgetPreviewProvider } from './widgets/widget-preview-provider';\n\nexport type { WidgetPreviewProviderProps } from './widgets/widget-preview-provider';\nexport { AiPromptChip } from './widgets/ai-prompt-chip';\nexport { AskIcon } from './widgets/ask-icon';\nexport { WidgetAskBar } from './widgets/widget-ask-bar';\nexport {\n WidgetAskPresentationProvider,\n type WidgetAskPresentation,\n} from './widgets/widget-ask-presentation';\nexport {\n WidgetDataLoading,\n type WidgetEmptyStateProps,\n WidgetInactiveState,\n type WidgetInactiveReason,\n type WidgetInactiveStateProps,\n type WidgetSkeletonVariant,\n type WidgetStateAction,\n} from './widgets/widget-state-components';\n\nexport { ActivationForm, BaseActivationForm } from './base-activation-form';\nexport type {\n ActivationFormComponentProps,\n BaseActivationFormProps,\n} from './base-activation-form';\nexport {\n ActivationDialog,\n ActivationInline,\n BaseActivationDialog,\n} from './base-activation-dialog';\n\nexport { BaseMarketplaceTile } from './base-marketplace-tile';\nexport type { BaseMarketplaceTileProps } from './base-marketplace-tile';\n\nexport { OAuthActivationForm } from './oauth-activation-form';\nexport type { OAuthActivationFormConfig } from './oauth-activation-form';\n\nexport { FIRST_CONNECT_PARAM, currentReturnPath } from './current-return-path';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EACL,MAAM,EACN,gBAAgB,GAGjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,GAIlB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,aAAa,GASd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,6BAA6B,GAE9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,GAKpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAK5E,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/components — client-side building blocks.\n *\n * Import from client components only. `Widget` is the compound API every\n * dashboard widget renders through; the activation forms are the two\n * sanctioned activation UX bases (credential-style and OAuth-style), and\n * `BaseMarketplaceTile` is the matching base for the marketplace tile.\n *\n * The SDK OWNS these implementations — the pre-inversion re-exports through\n * `@kit/integrations-core/components/*` are gone; core now re-exports FROM\n * here for first-party code (one source of truth, two consumption paths —\n * one source of truth with two consumption paths. UI primitives come from\n * `@ekanos/ui`\n * (the published slice of the host design system), never `@kit/ui`.\n *\n * Server seam: nothing here imports a server module. `OAuthActivationForm`\n * performs activation through the host-injected actions seam\n * (`IntegrationActivationProvider`, @ekanos/sdk/hooks) — a server-action\n * REFERENCE bound by the host, not server code shipped to the browser.\n *\n * `WidgetContext` is the single context identity both sides share: the\n * host's `DashboardWidgetProvider` (host chrome — persistence callbacks,\n * config hierarchy) provides it, the SDK's `Widget.*` reads it.\n *\n * Surface discipline: additions require an entry in\n * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.\n */\n\nexport {\n Widget,\n useWidgetVerdict,\n type WidgetDataStatus,\n type WidgetHeaderTrailing,\n} from './widgets/widget';\nexport {\n widgetQueryState,\n widgetQueryStatus,\n type WidgetConnectionGate,\n type WidgetQuery,\n type WidgetQueryState,\n} from './widgets/widget-query-state';\nexport {\n WidgetContext,\n type WidgetActions,\n type WidgetContextValue,\n type WidgetData,\n type WidgetHealth,\n type WidgetMeta,\n type WidgetRenderState,\n type WidgetSource,\n type WidgetState,\n} from './widgets/widget-context';\nexport { lazyComponent } from './lazy-component';\nexport { WidgetPreviewProvider } from './widgets/widget-preview-provider';\n\nexport type { WidgetPreviewProviderProps } from './widgets/widget-preview-provider';\nexport { AiPromptChip } from './widgets/ai-prompt-chip';\nexport { AskIcon } from './widgets/ask-icon';\nexport { WidgetAskBar } from './widgets/widget-ask-bar';\nexport {\n WidgetAskPresentationProvider,\n type WidgetAskPresentation,\n} from './widgets/widget-ask-presentation';\nexport {\n WidgetDataLoading,\n type WidgetEmptyStateProps,\n WidgetInactiveState,\n type WidgetInactiveReason,\n type WidgetInactiveStateProps,\n type WidgetSkeletonVariant,\n type WidgetStateAction,\n} from './widgets/widget-state-components';\n\nexport { ActivationForm, BaseActivationForm } from './base-activation-form';\nexport type {\n ActivationFormComponentProps,\n BaseActivationFormProps,\n} from './base-activation-form';\nexport {\n ActivationDialog,\n ActivationInline,\n BaseActivationDialog,\n} from './base-activation-dialog';\n\nexport { BaseMarketplaceTile } from './base-marketplace-tile';\nexport type { BaseMarketplaceTileProps } from './base-marketplace-tile';\n\nexport { OAuthActivationForm } from './oauth-activation-form';\nexport type { OAuthActivationFormConfig } from './oauth-activation-form';\n\nexport { FIRST_CONNECT_PARAM, currentReturnPath } from './current-return-path';\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ComponentType, type FunctionComponent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A component whose code loads only when it renders.
|
|
4
|
+
*
|
|
5
|
+
* The host loads every integration's definition on the server for every page,
|
|
6
|
+
* and a component imported statically by `integration.ts` ships to the
|
|
7
|
+
* browser on every page with it. Declare each widget, page, activation form
|
|
8
|
+
* and marketplace tile through this instead, from a `'use client'` file of
|
|
9
|
+
* your own, so its code is fetched when it is on screen:
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* // src/components/lazy.tsx
|
|
13
|
+
* 'use client';
|
|
14
|
+
*
|
|
15
|
+
* import { lazyComponent } from '@ekanos/sdk/components';
|
|
16
|
+
*
|
|
17
|
+
* export const ForecastWidget = lazyComponent(() =>
|
|
18
|
+
* import(
|
|
19
|
+
* './widgets/forecast-widget'
|
|
20
|
+
* ).then((m) => m.ForecastWidget),
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* The `'use client'` line and the literal `import()` path are both required:
|
|
25
|
+
* without either, the bundler cannot split the component out.
|
|
26
|
+
*/
|
|
27
|
+
export declare function lazyComponent<Props extends object>(load: () => Promise<ComponentType<Props>>): FunctionComponent<Props>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Suspense, lazy, createElement, } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* A component whose code loads only when it renders.
|
|
5
|
+
*
|
|
6
|
+
* The host loads every integration's definition on the server for every page,
|
|
7
|
+
* and a component imported statically by `integration.ts` ships to the
|
|
8
|
+
* browser on every page with it. Declare each widget, page, activation form
|
|
9
|
+
* and marketplace tile through this instead, from a `'use client'` file of
|
|
10
|
+
* your own, so its code is fetched when it is on screen:
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // src/components/lazy.tsx
|
|
14
|
+
* 'use client';
|
|
15
|
+
*
|
|
16
|
+
* import { lazyComponent } from '@ekanos/sdk/components';
|
|
17
|
+
*
|
|
18
|
+
* export const ForecastWidget = lazyComponent(() =>
|
|
19
|
+
* import(
|
|
20
|
+
* './widgets/forecast-widget'
|
|
21
|
+
* ).then((m) => m.ForecastWidget),
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* The `'use client'` line and the literal `import()` path are both required:
|
|
26
|
+
* without either, the bundler cannot split the component out.
|
|
27
|
+
*/
|
|
28
|
+
export function lazyComponent(load) {
|
|
29
|
+
const Loaded = lazy(() => load().then((component) => ({ default: component })));
|
|
30
|
+
function LazyComponent(props) {
|
|
31
|
+
return createElement(Suspense, { fallback: null }, createElement(Loaded, props));
|
|
32
|
+
}
|
|
33
|
+
return LazyComponent;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=lazy-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-component.js","sourceRoot":"","sources":["../../src/components/lazy-component.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAIL,QAAQ,EACR,IAAI,EACJ,aAAa,GACd,MAAM,OAAO,CAAC;AAEf;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAyC;IAEzC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CACvB,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CACrD,CAAC;IAEF,SAAS,aAAa,CAAC,KAAY;QACjC,OAAO,aAAa,CAClB,QAAQ,EACR,EAAE,QAAQ,EAAE,IAAI,EAAE,EAClB,aAAa,CAAC,MAA8B,EAAE,KAAK,CAAC,CACrD,CAAC;IACJ,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["'use client';\n\nimport {\n type ComponentType,\n type FunctionComponent,\n type JSX,\n Suspense,\n lazy,\n createElement,\n} from 'react';\n\n/**\n * A component whose code loads only when it renders.\n *\n * The host loads every integration's definition on the server for every page,\n * and a component imported statically by `integration.ts` ships to the\n * browser on every page with it. Declare each widget, page, activation form\n * and marketplace tile through this instead, from a `'use client'` file of\n * your own, so its code is fetched when it is on screen:\n *\n * ```tsx\n * // src/components/lazy.tsx\n * 'use client';\n *\n * import { lazyComponent } from '@ekanos/sdk/components';\n *\n * export const ForecastWidget = lazyComponent(() =>\n * import(\n * './widgets/forecast-widget'\n * ).then((m) => m.ForecastWidget),\n * );\n * ```\n *\n * The `'use client'` line and the literal `import()` path are both required:\n * without either, the bundler cannot split the component out.\n */\nexport function lazyComponent<Props extends object>(\n load: () => Promise<ComponentType<Props>>,\n): FunctionComponent<Props> {\n const Loaded = lazy(() =>\n load().then((component) => ({ default: component })),\n );\n\n function LazyComponent(props: Props): JSX.Element {\n return createElement(\n Suspense,\n { fallback: null },\n createElement(Loaded as ComponentType<Props>, props),\n );\n }\n\n return LazyComponent;\n}\n"]}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["/**\n * This package's own version, for diagnostics that must name which copy of\n * `@ekanos/sdk` is loaded. `src/__tests__/version.test.ts` fails when it drifts\n * from `package.json#version`; after `changeset version`, copy the new version\n * here.\n */\nexport const SDK_VERSION = '0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["/**\n * This package's own version, for diagnostics that must name which copy of\n * `@ekanos/sdk` is loaded. `src/__tests__/version.test.ts` fails when it drifts\n * from `package.json#version`; after `changeset version`, copy the new version\n * here.\n */\nexport const SDK_VERSION = '0.30.0';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekanos/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The official SDK for building Ekanos integrations.",
|
|
6
6
|
"homepage": "https://sdk.ekanos.dev/sdk/overview",
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@ekanos/integration-schema": "0.
|
|
118
|
-
"@ekanos/ui": "0.
|
|
117
|
+
"@ekanos/integration-schema": "0.30.0",
|
|
118
|
+
"@ekanos/ui": "0.30.0",
|
|
119
119
|
"@supabase/supabase-js": "2.119.0",
|
|
120
120
|
"server-only": "^0.0.1",
|
|
121
121
|
"zod-to-json-schema": "3.25.2"
|