@w6w/embed 0.2.34 → 0.2.35
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/{CreateFunctionModal-glk2zg1r.js → CreateFunctionModal-CYNHJUGJ.js} +3 -3
- package/dist/{CreateFunctionModal-glk2zg1r.js.map → CreateFunctionModal-CYNHJUGJ.js.map} +1 -1
- package/dist/{DocumentFormModal-B3OkvI5v.js → DocumentFormModal-CLmdGx34.js} +2 -2
- package/dist/{DocumentFormModal-B3OkvI5v.js.map → DocumentFormModal-CLmdGx34.js.map} +1 -1
- package/dist/ImportSpecModal-BzEyiNWD.js +378 -0
- package/dist/ImportSpecModal-BzEyiNWD.js.map +1 -0
- package/dist/WorkflowEditor-CxTuK8_d.js +1272 -0
- package/dist/WorkflowEditor-CxTuK8_d.js.map +1 -0
- package/dist/{apps-CFWdgGst.js → apps-CyEszfIu.js} +33 -33
- package/dist/{apps-CFWdgGst.js.map → apps-CyEszfIu.js.map} +1 -1
- package/dist/callable-row-actions-BPBPflMn.js +56 -0
- package/dist/callable-row-actions-BPBPflMn.js.map +1 -0
- package/dist/callables-dLF2IcwA.js +317 -0
- package/dist/callables-dLF2IcwA.js.map +1 -0
- package/dist/chrome/TagEditor.d.ts +6 -1
- package/dist/chrome/workspace.d.ts +16 -0
- package/dist/documents-hgltn0xe.js +1017 -0
- package/dist/documents-hgltn0xe.js.map +1 -0
- package/dist/draft.mjs +1 -1
- package/dist/editor/WaitingForm.d.ts +19 -0
- package/dist/{editor-apps-ShwCmvLY.js → editor-apps-DsGrGKfe.js} +3 -3
- package/dist/{editor-apps-ShwCmvLY.js.map → editor-apps-DsGrGKfe.js.map} +1 -1
- package/dist/{editor-tools-rY9nddqr.js → editor-tools-Ct7YPPj8.js} +682 -784
- package/dist/editor-tools-Ct7YPPj8.js.map +1 -0
- package/dist/editor.mjs +1 -1
- package/dist/editors.mjs +18 -18
- package/dist/{endpoints-zOuwci2U.js → endpoints-DJxXRh-I.js} +12 -12
- package/dist/{endpoints-zOuwci2U.js.map → endpoints-DJxXRh-I.js.map} +1 -1
- package/dist/forms.mjs +1 -1
- package/dist/index.mjs +140 -115
- package/dist/index.mjs.map +1 -1
- package/dist/lib/callable-row-actions.d.ts +17 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/run-event-stream.d.ts +122 -0
- package/dist/lib/tag-editor.d.ts +6 -0
- package/dist/lib/workflow-live-run.d.ts +7 -0
- package/dist/lib/workflow-validity.d.ts +7 -1
- package/dist/lib.mjs +52 -47
- package/dist/lists/CallableKindList.d.ts +12 -0
- package/dist/lists/CallableRowParts.d.ts +8 -1
- package/dist/lists/EndpointList.d.ts +3 -0
- package/dist/lists/FunctionList.d.ts +3 -0
- package/dist/lists/WorkflowList.d.ts +3 -0
- package/dist/lists.d.ts +1 -0
- package/dist/lists.mjs +1589 -1513
- package/dist/lists.mjs.map +1 -1
- package/dist/rail.mjs +1 -1
- package/dist/repos/callables.d.ts +25 -0
- package/dist/repos/documents.d.ts +9 -1
- package/dist/repos/saved-file-names.d.ts +10 -0
- package/dist/repos/workflows.d.ts +19 -13
- package/dist/repos.mjs +333 -328
- package/dist/{setup-incomplete-BHs3Lpfy.js → setup-incomplete-6PAbN0EW.js} +50 -49
- package/dist/setup-incomplete-6PAbN0EW.js.map +1 -0
- package/dist/spec-import-BKyfhTYG.js +200 -0
- package/dist/spec-import-BKyfhTYG.js.map +1 -0
- package/dist/{use-callable-draft-w4tDTYcb.js → use-callable-draft-7HwfTuYQ.js} +3 -3
- package/dist/{use-callable-draft-w4tDTYcb.js.map → use-callable-draft-7HwfTuYQ.js.map} +1 -1
- package/package.json +3 -3
- package/src/styles.css +43 -0
- package/dist/ImportSpecModal-SQvTwtcX.js +0 -252
- package/dist/ImportSpecModal-SQvTwtcX.js.map +0 -1
- package/dist/WorkflowEditor-D2EfEP-U.js +0 -1201
- package/dist/WorkflowEditor-D2EfEP-U.js.map +0 -1
- package/dist/callable-record-Bhxim8C1.js +0 -14
- package/dist/callable-record-Bhxim8C1.js.map +0 -1
- package/dist/callables-B49tS2vv.js +0 -297
- package/dist/callables-B49tS2vv.js.map +0 -1
- package/dist/editor-tools-rY9nddqr.js.map +0 -1
- package/dist/setup-incomplete-BHs3Lpfy.js.map +0 -1
- package/dist/spec-import-CPbDnnuv.js +0 -272
- package/dist/spec-import-CPbDnnuv.js.map +0 -1
- package/dist/workflows-RhR8kwt7.js +0 -667
- package/dist/workflows-RhR8kwt7.js.map +0 -1
package/dist/rail.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as u } from "react";
|
|
4
|
-
import { W as d, R as p, P as m, u as f, a as v, e as b, b as h } from "./editor-tools-
|
|
4
|
+
import { W as d, R as p, P as m, u as f, a as v, e as b, b as h } from "./editor-tools-Ct7YPPj8.js";
|
|
5
5
|
import { r as P, a as j } from "./project-context-Tvp-La7A.js";
|
|
6
6
|
const R = () => {
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { W6WClient } from '@w6w/sdk';
|
|
2
2
|
import { DuplicateSiblings } from '../lib/callable-duplicate.ts';
|
|
3
3
|
import { CallableKind } from '../lib/callable-kind.ts';
|
|
4
|
+
import { CallableSettingsEdit } from '../lib/callable-row-actions.ts';
|
|
4
5
|
/**
|
|
5
6
|
* The structural minimum every list row of every kind satisfies — what the shared list chrome
|
|
6
7
|
* (`pages/CallablePage.tsx`) renders and the Settings rail reads by id. Kind-specific widening
|
|
@@ -77,6 +78,20 @@ export declare function duplicateCallable(client: W6WClient, kind: CallableKind,
|
|
|
77
78
|
id: string;
|
|
78
79
|
key: string;
|
|
79
80
|
}>;
|
|
81
|
+
/**
|
|
82
|
+
* A row menu's Rename…: read the record now, lay the modal's edit on it ({@link applySettingsEdit}:
|
|
83
|
+
* only the fields the edit changes), and save it guarded by that read's `updatedAt`, so a save
|
|
84
|
+
* racing another writer answers 409 instead of overwriting it. `openedTags` are the tags the modal
|
|
85
|
+
* opened with. A Workflow saves into `project`, the list's own, and refuses without one.
|
|
86
|
+
*/
|
|
87
|
+
export declare function updateCallableSettings(client: W6WClient, kind: CallableKind, id: string, edit: CallableSettingsEdit, openedTags: readonly string[], options?: {
|
|
88
|
+
project?: string;
|
|
89
|
+
}): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* `GET /<coll>/:id/spec`: the portable document Import accepts (the rail's Export shows the same
|
|
92
|
+
* one). Secrets never ride in it — the server strips sealed envelopes (spec-documents.md).
|
|
93
|
+
*/
|
|
94
|
+
export declare function exportCallableSpec(client: W6WClient, kind: CallableKind, id: string): Promise<unknown>;
|
|
80
95
|
/**
|
|
81
96
|
* `useQuery` over {@link listCallables}, keyed by {@link callableListKey}. Generic over the row
|
|
82
97
|
* type so a kind's own facade can narrow it to that kind's widened summary (Function's
|
|
@@ -112,3 +127,13 @@ export declare function useDuplicateCallableMutation(kind: CallableKind, options
|
|
|
112
127
|
id: string;
|
|
113
128
|
siblings: DuplicateSiblings;
|
|
114
129
|
}, unknown>;
|
|
130
|
+
/** `useMutation` over {@link updateCallableSettings}; refreshes the list and the record. */
|
|
131
|
+
export declare function useCallableSettingsMutation(kind: CallableKind, options?: {
|
|
132
|
+
project?: string;
|
|
133
|
+
}): import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
134
|
+
id: string;
|
|
135
|
+
edit: CallableSettingsEdit;
|
|
136
|
+
openedTags: readonly string[];
|
|
137
|
+
}, unknown>;
|
|
138
|
+
/** `useMutation` over {@link exportCallableSpec}: read-only, nothing to invalidate. */
|
|
139
|
+
export declare function useExportCallableSpecMutation(kind: CallableKind): import('@tanstack/react-query').UseMutationResult<unknown, Error, string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Doc, DocumentCreateInput, DocumentPatch } from '@w6w/sdk';
|
|
1
|
+
import { Doc, DocumentCreateInput, DocumentPatch, W6WClient } from '@w6w/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* T1.1.1's wire shape for one document, pinned here ahead of that node
|
|
4
4
|
* merging (this node is dispatched speculatively against it — see this
|
|
@@ -100,3 +100,11 @@ export declare function useSyncDocumentMutation(): import('@tanstack/react-query
|
|
|
100
100
|
id: string;
|
|
101
101
|
project?: string;
|
|
102
102
|
}, unknown>;
|
|
103
|
+
/**
|
|
104
|
+
* The project's document keys and formats, for the ui's `document` step-param picker
|
|
105
|
+
* (`W6WApi.listDocuments`, `@w6w/document · get`). Hook-less so that seam can call it.
|
|
106
|
+
*/
|
|
107
|
+
export declare function listDocumentKeys(client: W6WClient, project: string): Promise<{
|
|
108
|
+
key: string;
|
|
109
|
+
format: string;
|
|
110
|
+
}[]>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { W6WClient } from '@w6w/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The project's saved files as `{ path, size }`, for the ui's `saved-file` step-param picker
|
|
4
|
+
* (`W6WApi.listSavedFiles`, `@w6w/files` save/read): `GET /assets?kind=saved_file`, walked page
|
|
5
|
+
* by page. A saved file's `name` IS its canonical path; `size` is the latest version's bytes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function listSavedFiles(client: Pick<W6WClient, "request">, project: string): Promise<{
|
|
8
|
+
path: string;
|
|
9
|
+
size?: number;
|
|
10
|
+
}[]>;
|
|
@@ -207,15 +207,19 @@ export declare function getRunState(client: W6WClient, runId: string): Promise<R
|
|
|
207
207
|
* is the workflow's run LIST. */
|
|
208
208
|
export declare const runStateKey: (runId: string) => readonly ["run", string];
|
|
209
209
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
210
|
+
* One run's live state, PUSHED by the server while it is in flight: the hook opens
|
|
211
|
+
* `GET /runs/:id/events` (one stream per run, shared — {@link runStreamRegistry}) and every
|
|
212
|
+
* snapshot lands in this query's cache, so `data` updates the moment a step starts or finishes and
|
|
213
|
+
* nothing is fetched while the run is idle. The stream ends at a terminal status.
|
|
214
|
+
*
|
|
215
|
+
* POLLING IS THE FALLBACK, NEVER GONE. Whenever the stream is refused (an older server, an auth
|
|
216
|
+
* refusal, a buffering proxy that holds the first snapshot past 3 s) or down (reconnecting with
|
|
217
|
+
* backoff), the query polls exactly as it used to — every 500 ms until a terminal status
|
|
218
|
+
* ({@link shouldContinuePolling}, `../lib/workflow-live-run.ts`) — so a run never looks frozen;
|
|
219
|
+
* it stops polling again as soon as the stream is back. A client with nothing to stream with (a
|
|
220
|
+
* test double) only polls. `runId === null` disables the query entirely (no run started yet, or
|
|
221
|
+
* the page navigated to a different workflow). A run already cached as terminal is neither
|
|
222
|
+
* streamed nor refetched: nothing about it changes again.
|
|
219
223
|
*/
|
|
220
224
|
export declare function useLiveRunQuery(runId: string | null): import('@tanstack/react-query').UseQueryResult<NoInfer<RunState>, Error>;
|
|
221
225
|
/** `GET /runs/:id/state-writes` — the run's state-write log (plan §2.4). */
|
|
@@ -233,9 +237,11 @@ export declare function getRunStateWrites(client: W6WClient, runId: string): Pro
|
|
|
233
237
|
* `"final"` when the run turns terminal, so the final log is fetched exactly once more. */
|
|
234
238
|
export declare function runStateWritesKey(runId: string, status: RunStatus | undefined): readonly ["run", string, "state-writes", "live" | "final"];
|
|
235
239
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
+
* One run's state-write log beside {@link useLiveRunQuery}. While the run streams, it is re-read
|
|
241
|
+
* when a step's status changes ({@link runStreamRegistry} invalidates it) rather than on a timer;
|
|
242
|
+
* while the run polls instead (stream refused or down, or no stream at all), it polls on the same
|
|
243
|
+
* 500 ms cadence. Read once more, under the `"final"` key, when the run turns terminal. `retry:
|
|
244
|
+
* false` — a failed read only leaves the run log without its State block; it never touches the
|
|
245
|
+
* run read.
|
|
240
246
|
*/
|
|
241
247
|
export declare function useRunStateWritesQuery(runId: string | null, status: RunStatus | undefined): import('@tanstack/react-query').UseQueryResult<NoInfer<RunStateWrites>, Error>;
|