@w6w/embed 0.2.29 → 0.2.30
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/{DocumentFormModal-CCIgA7pR.js → DocumentFormModal-B3VudaLb.js} +2 -2
- package/dist/{DocumentFormModal-CCIgA7pR.js.map → DocumentFormModal-B3VudaLb.js.map} +1 -1
- package/dist/{ImportSpecModal-DoxsVxru.js → ImportSpecModal-C-B8Jwxk.js} +2 -2
- package/dist/{ImportSpecModal-DoxsVxru.js.map → ImportSpecModal-C-B8Jwxk.js.map} +1 -1
- package/dist/WorkflowEditor-8NAcpjO_.js +1140 -0
- package/dist/WorkflowEditor-8NAcpjO_.js.map +1 -0
- package/dist/{editor-tools--Y3wlBZE.js → editor-tools-BIAW-wzt.js} +53 -53
- package/dist/{editor-tools--Y3wlBZE.js.map → editor-tools-BIAW-wzt.js.map} +1 -1
- package/dist/editor.mjs +1 -1
- package/dist/editors.mjs +50 -51
- package/dist/editors.mjs.map +1 -1
- package/dist/lib/recent-activity.d.ts +2 -2
- package/dist/lib/workflow-version.d.ts +19 -2
- package/dist/lists/AiKeyCreate.d.ts +20 -0
- package/dist/lists/CallableKindList.d.ts +17 -1
- package/dist/lists/CallableRowParts.d.ts +33 -0
- package/dist/lists/CredentialCreate.d.ts +17 -17
- package/dist/lists/CredentialFields.d.ts +18 -0
- package/dist/lists/CredentialList.d.ts +35 -3
- package/dist/lists.d.ts +2 -0
- package/dist/lists.mjs +1989 -1507
- package/dist/lists.mjs.map +1 -1
- package/dist/rail.mjs +1 -1
- package/dist/repos.mjs +59 -59
- package/dist/spec-export-BtnoV0ex.js +33 -0
- package/dist/spec-export-BtnoV0ex.js.map +1 -0
- package/dist/spec-import-FygyV8sy.js +272 -0
- package/dist/spec-import-FygyV8sy.js.map +1 -0
- package/package.json +5 -5
- package/src/styles.css +56 -0
- package/dist/WorkflowEditor-CBUwh85L.js +0 -1117
- package/dist/WorkflowEditor-CBUwh85L.js.map +0 -1
- package/dist/spec-export-DMMET5VM.js +0 -189
- package/dist/spec-export-DMMET5VM.js.map +0 -1
- package/dist/spec-import-0B6oUewa.js +0 -116
- package/dist/spec-import-0B6oUewa.js.map +0 -1
|
@@ -5,12 +5,12 @@ export type RecentActivityEntry = DashboardStats["recent"][number];
|
|
|
5
5
|
/** Human labels for the ledger `kind` domain (mirrors the server's `run_log.kind`). */
|
|
6
6
|
export declare const KIND_LABELS: Record<string, string>;
|
|
7
7
|
/**
|
|
8
|
-
* The
|
|
8
|
+
* The eight ledger kinds this module KNOWS — the arms the two `Record`s below
|
|
9
9
|
* name explicitly, so a kind added to `run_log.kind` is a compile error here
|
|
10
10
|
* rather than a row silently rendering as another kind (the same reasoning
|
|
11
11
|
* `RESOURCE_DESCRIPTORS` gives for its total `Record`).
|
|
12
12
|
*/
|
|
13
|
-
export type ActivityKind = "workflow" | "workflow_step" | "connection_test" | "node_debug" | "function" | "endpoint" | "action";
|
|
13
|
+
export type ActivityKind = "workflow" | "workflow_step" | "connection_test" | "node_debug" | "function" | "endpoint" | "action" | "workflow_adhoc";
|
|
14
14
|
/**
|
|
15
15
|
* The label for a ledger kind. An unrecognised kind falls back to the raw value:
|
|
16
16
|
* `kind` is a wire field and a client can be older than the server that answered
|
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Whether two workflow definitions are the SAME for publishing: equal JSON, independent of object
|
|
3
|
+
* property order (array order is meaningful), once the authoring presentation is set aside. Moving
|
|
4
|
+
* nodes on the canvas changes nothing a run does, so it must not make a published workflow read as
|
|
5
|
+
* Draft or offer Republish.
|
|
6
|
+
*
|
|
7
|
+
* Presentation is what `rfcs/workflow.md` declares the engine ignores, removed STRUCTURALLY (never
|
|
8
|
+
* a `position` key at any depth: an action's params may have a field of that name):
|
|
9
|
+
* - each node's `position` in the top-level `nodes` (or legacy `steps`) array. Loop bodies and
|
|
10
|
+
* branches only list node ids, so every node is in that one array;
|
|
11
|
+
* - `settings.viewport`, `settings.autoSave` and `settings.savePosition` (2026-07-29 amendment);
|
|
12
|
+
* - the `position` and `size` of each `canvas.notes[]` and `canvas.sections[]` entry (2026-10-22).
|
|
13
|
+
* A note's text, a section's title, colour and members still count.
|
|
14
|
+
*
|
|
15
|
+
* Pass `{ presentation: true }` to compare everything, layout included.
|
|
16
|
+
*/
|
|
17
|
+
export declare function sameWorkflowDefinition(a: unknown, b: unknown, opts?: {
|
|
18
|
+
presentation?: boolean;
|
|
19
|
+
}): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CredentialTypeDescriptor, CredentialTypeField } from '../repos/credentials.ts';
|
|
2
|
+
import { ModelProviderRow } from '../repos/models.ts';
|
|
3
|
+
export interface AiKeyCreateProps {
|
|
4
|
+
/** The AI providers to offer (rows with a designation). */
|
|
5
|
+
providers: readonly ModelProviderRow[];
|
|
6
|
+
/** Preselects a provider by app id. */
|
|
7
|
+
initial?: string;
|
|
8
|
+
types: readonly CredentialTypeDescriptor[];
|
|
9
|
+
/** Called once the key is saved. */
|
|
10
|
+
onCreated?: () => void;
|
|
11
|
+
/** Leaves out the form's own "Add a key" heading (the host already has one). */
|
|
12
|
+
hideHeading?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A key auth the server marked `userScope` (this caller may connect it "Only me") with no stored
|
|
16
|
+
* credential contract: the key is typed into the auth's own fields and held by the connection.
|
|
17
|
+
*/
|
|
18
|
+
export declare function inlineFieldsOf(auth: unknown): CredentialTypeField[] | null;
|
|
19
|
+
export declare const providerLabel: (p: ModelProviderRow) => string;
|
|
20
|
+
export declare function AiKeyCreate({ providers, initial, types, onCreated, hideHeading, }: AiKeyCreateProps): import("react").JSX.Element;
|
|
@@ -2,6 +2,20 @@ import { CallableListProps, CallableListRow } from '@w6w/ui';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { CallableKind } from '../lib/callable-descriptors.ts';
|
|
4
4
|
import { ArchivableRow } from '../lib/rail-settings.ts';
|
|
5
|
+
import { CopyItem } from './CallableRowParts.tsx';
|
|
6
|
+
/** What the frame needs to draw a row's status, meta line and menu. */
|
|
7
|
+
export interface CallableRowFacts {
|
|
8
|
+
/** Plain-text name, for the menu's accessible name and the confirm copy. */
|
|
9
|
+
name: string;
|
|
10
|
+
keyText?: string | null;
|
|
11
|
+
updatedAt?: string | null;
|
|
12
|
+
/** The kind's own state beside the title (e.g. a workflow's draft/active); "disabled" wins. */
|
|
13
|
+
status?: ReactNode;
|
|
14
|
+
/** Extra meta (e.g. "224 runs"), between the publish state and the update time. */
|
|
15
|
+
metaExtra?: ReactNode;
|
|
16
|
+
/** "Copy …" menu items. */
|
|
17
|
+
copy?: readonly CopyItem[];
|
|
18
|
+
}
|
|
5
19
|
/**
|
|
6
20
|
* The internal frame the three kind lists (`FunctionList`, `EndpointList`, `WorkflowList`) share:
|
|
7
21
|
* ui's presentational `CallableList` filled with one kind's copy and test ids, the archived
|
|
@@ -20,7 +34,9 @@ export declare function CallableKindList<Row extends {
|
|
|
20
34
|
rows: readonly Row[] | undefined;
|
|
21
35
|
loading: boolean;
|
|
22
36
|
/** Everything about a row except the id and the archived flag, which the frame owns. */
|
|
23
|
-
toRow: (row: Row) => Omit<CallableListRow, "id" | "archived">;
|
|
37
|
+
toRow: (row: Row) => Omit<CallableListRow, "id" | "archived" | "status" | "meta" | "menu">;
|
|
38
|
+
/** The row's name, key, update time, state and copy items: status, meta line and menu. */
|
|
39
|
+
facts: (row: Row) => CallableRowFacts;
|
|
24
40
|
/** Only the Import flow reads it (the workflow list key); `null` means no project. */
|
|
25
41
|
project: string | null;
|
|
26
42
|
onOpen?: (id: string, event?: React.MouseEvent<Element>) => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CallableKind } from '../lib/callable-descriptors.ts';
|
|
3
|
+
/** "3m ago", "5h ago", "2d ago", else the date. */
|
|
4
|
+
export declare function updatedAgo(iso: string | null | undefined, now?: number): string | null;
|
|
5
|
+
/** The state beside a row's title: "disabled" wins over the kind's own state (`base`). */
|
|
6
|
+
export declare function CallableRowStatus(props: {
|
|
7
|
+
kind: CallableKind;
|
|
8
|
+
id: string;
|
|
9
|
+
archived: boolean;
|
|
10
|
+
base?: ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/** The muted line under a row: its key, publish state, extras, last update. */
|
|
13
|
+
export declare function CallableRowMeta(props: {
|
|
14
|
+
kind: CallableKind;
|
|
15
|
+
id: string;
|
|
16
|
+
archived: boolean;
|
|
17
|
+
keyText?: string | null;
|
|
18
|
+
updatedAt?: string | null;
|
|
19
|
+
extra?: ReactNode;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
/** One "Copy …" menu item. */
|
|
22
|
+
export interface CopyItem {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
/** The row's three-dots menu, with its own confirm dialogs for Archive and Delete. */
|
|
27
|
+
export declare function CallableRowMenu(props: {
|
|
28
|
+
kind: CallableKind;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
archived: boolean;
|
|
32
|
+
copy?: readonly CopyItem[];
|
|
33
|
+
}): import("react").JSX.Element;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
export { CredentialFieldInputs, type CredentialFieldValues, allFieldsFilled, sourceFromValues, } from './CredentialFields.tsx';
|
|
2
2
|
export interface CredentialCreateProps {
|
|
3
3
|
/** Called with the new credential's id after the server accepted it. */
|
|
4
4
|
onCreated?: (id: string) => void;
|
|
5
5
|
/** The Cancel button renders only when given. */
|
|
6
6
|
onCancel?: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Opens on the "AI provider key" type with this provider preselected (an AI provider's app id),
|
|
9
|
+
* the deep link a "set up your key" prompt points at.
|
|
10
|
+
*/
|
|
11
|
+
aiProvider?: string;
|
|
12
|
+
/** Called after an AI provider key is saved (it has no single credential id to open). */
|
|
13
|
+
onAiKeyCreated?: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Called after a "One app" credential is saved, with the connection that holds it
|
|
16
|
+
* (`zerocred:<appId>` for an app that needs no credential).
|
|
17
|
+
*/
|
|
18
|
+
onAppCredentialCreated?: (connectionId: string) => void;
|
|
7
19
|
}
|
|
8
|
-
/** `field.key -> typed text`. */
|
|
9
|
-
export type CredentialFieldValues = Record<string, string>;
|
|
10
20
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* textareas. Shared with `CredentialDetail`'s rotate box so both render a type the same way.
|
|
21
|
+
* The type picker's value for a personal AI-provider key. It is not a credential contract: the
|
|
22
|
+
* provider's own auth decides the contract, and some providers hold the key in the connection.
|
|
14
23
|
*/
|
|
15
|
-
export declare
|
|
16
|
-
|
|
17
|
-
values: CredentialFieldValues;
|
|
18
|
-
onChange: (key: string, value: string) => void;
|
|
19
|
-
idPrefix: string;
|
|
20
|
-
}): import("react").JSX.Element;
|
|
21
|
-
/** True when every descriptor field has some text. */
|
|
22
|
-
export declare const allFieldsFilled: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => boolean;
|
|
23
|
-
/** `{ [field.key]: typed text }` — the `source` body, values exactly as typed. */
|
|
24
|
-
export declare const sourceFromValues: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => Record<string, string>;
|
|
25
|
-
export declare function CredentialCreate({ onCreated, onCancel }: CredentialCreateProps): import("react").JSX.Element;
|
|
24
|
+
export declare const AI_KEY_TYPE = "ai-provider-key";
|
|
25
|
+
export declare function CredentialCreate({ onCreated, onCancel, aiProvider, onAiKeyCreated, onAppCredentialCreated, }: CredentialCreateProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CredentialTypeField } from '../repos/credentials.ts';
|
|
2
|
+
/** `field.key -> typed text`. */
|
|
3
|
+
export type CredentialFieldValues = Record<string, string>;
|
|
4
|
+
/**
|
|
5
|
+
* One input per descriptor field, controlled by `values`. Secret fields are masked (CSS, never
|
|
6
|
+
* `type="password"`, which would trigger the browser's save-password prompt), `multiline` ones are
|
|
7
|
+
* textareas. Shared with `CredentialDetail`'s rotate box so both render a type the same way.
|
|
8
|
+
*/
|
|
9
|
+
export declare function CredentialFieldInputs({ fields, values, onChange, idPrefix, }: {
|
|
10
|
+
fields: readonly CredentialTypeField[];
|
|
11
|
+
values: CredentialFieldValues;
|
|
12
|
+
onChange: (key: string, value: string) => void;
|
|
13
|
+
idPrefix: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
/** True when every descriptor field has some text. */
|
|
16
|
+
export declare const allFieldsFilled: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => boolean;
|
|
17
|
+
/** `{ [field.key]: typed text }` — the `source` body, values exactly as typed. */
|
|
18
|
+
export declare const sourceFromValues: (fields: readonly CredentialTypeField[], values: CredentialFieldValues) => Record<string, string>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ConnectionSummary } from '../repos/connections.ts';
|
|
3
|
+
import { CredentialSummary } from '../repos/credentials.ts';
|
|
2
4
|
export interface CredentialListProps {
|
|
3
|
-
/** Narrow the list to one credential contract. */
|
|
5
|
+
/** Narrow the list to one credential contract (stored credentials only). */
|
|
4
6
|
contract?: string;
|
|
5
|
-
/**
|
|
7
|
+
/** A shared credential's row click. */
|
|
6
8
|
onOpen?: (id: string) => void;
|
|
9
|
+
/** An app's own credential's row click, with the connection that owns it. */
|
|
10
|
+
onOpenConnection?: (connectionId: string) => void;
|
|
7
11
|
/** Renders an `Add credential` action in the header and the empty state; the host opens its create form. */
|
|
8
12
|
onCreate?: () => void;
|
|
9
13
|
slots?: {
|
|
@@ -13,4 +17,32 @@ export interface CredentialListProps {
|
|
|
13
17
|
empty?: ReactNode;
|
|
14
18
|
};
|
|
15
19
|
}
|
|
16
|
-
|
|
20
|
+
/** One connection that uses a credential. */
|
|
21
|
+
export interface CredentialUse {
|
|
22
|
+
connectionId: string;
|
|
23
|
+
appId: string;
|
|
24
|
+
connectionName: string;
|
|
25
|
+
/** The connection's auth method key, e.g. `apiKey`. */
|
|
26
|
+
authKey?: string;
|
|
27
|
+
accessScope?: "account" | "user";
|
|
28
|
+
}
|
|
29
|
+
/** A readable name for an app auth method key: `apiKey` → "API key". */
|
|
30
|
+
export declare function authMethodLabel(authKey: string | undefined): string;
|
|
31
|
+
/** One row of the list: a credential, once, with every connection that uses it. */
|
|
32
|
+
export interface CredentialRow {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
/** `shared` came from `GET /credentials`; `app` is a connection's own credential. */
|
|
36
|
+
source: "shared" | "app";
|
|
37
|
+
/** The summary, for a shared row. */
|
|
38
|
+
summary?: CredentialSummary;
|
|
39
|
+
uses: CredentialUse[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The list's rows: shared credentials first-class, plus one row per credential a connection uses
|
|
43
|
+
* that is not among them. A credential several connections point at is still one row.
|
|
44
|
+
*/
|
|
45
|
+
export declare function credentialRows(shared: readonly CredentialSummary[], connections: readonly Pick<ConnectionSummary, "id" | "appId" | "displayName" | "credentialId" | "authKey" | "accessScope">[], opts: {
|
|
46
|
+
includeAppCredentials: boolean;
|
|
47
|
+
}): CredentialRow[];
|
|
48
|
+
export declare function CredentialList({ contract, onOpen, onOpenConnection, onCreate, slots, }: CredentialListProps): import("react").JSX.Element;
|
package/dist/lists.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export { CredentialDetail } from './lists/CredentialDetail.tsx';
|
|
|
32
32
|
export type { CredentialDetailProps } from './lists/CredentialDetail.tsx';
|
|
33
33
|
export { MyAiKeys } from './lists/MyAiKeys.tsx';
|
|
34
34
|
export type { MyAiKeysProps } from './lists/MyAiKeys.tsx';
|
|
35
|
+
export { AiKeyCreate } from './lists/AiKeyCreate.tsx';
|
|
36
|
+
export type { AiKeyCreateProps } from './lists/AiKeyCreate.tsx';
|
|
35
37
|
export { DataStoreList } from './lists/DataStoreList.tsx';
|
|
36
38
|
export type { DataStoreListProps, DataStoreListSlots } from './lists/DataStoreList.tsx';
|
|
37
39
|
export { DataStoreView } from './lists/DataStoreView.tsx';
|