@lace-cloud/canvas 0.25.0 → 0.27.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/README.md +7 -5
- package/dist/{chunk-YLJWYH7B.mjs → chunk-F3X6TTZ6.mjs} +790 -577
- package/dist/chunk-F3X6TTZ6.mjs.map +1 -0
- package/dist/engine/index.cjs +736 -534
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.mts +2 -2
- package/dist/engine/index.d.ts +2 -2
- package/dist/engine/index.mjs +3 -1
- package/dist/index.cjs +3747 -3448
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +331 -242
- package/dist/index.mjs.map +1 -1
- package/dist/{registry-CdHLt_qh.d.mts → registry-D7G7pqU4.d.mts} +71 -8
- package/dist/{registry-CdHLt_qh.d.ts → registry-D7G7pqU4.d.ts} +71 -8
- package/package.json +3 -3
- package/dist/chunk-YLJWYH7B.mjs.map +0 -1
|
@@ -1520,11 +1520,15 @@ declare enum ConflictChoice {
|
|
|
1520
1520
|
* failure Lace decided sets `reason`; one the API decided sets `api_code`
|
|
1521
1521
|
* to the API's own closed code, passed through unchanged, with the status
|
|
1522
1522
|
* code that HTTP status maps to, and `reason` where that code has one
|
|
1523
|
-
* (`REASON_UNAUTHENTICATED` for the API's `unauthenticated`)
|
|
1523
|
+
* (`REASON_UNAUTHENTICATED` for the API's `unauthenticated`), and
|
|
1524
|
+
* `request_id` to the id the API answered the refused request with, when
|
|
1525
|
+
* it named one: the id a person quotes to Lace's support. The status
|
|
1526
|
+
* message is the sentence the API wrote; neither field is spelled into it.
|
|
1524
1527
|
*/
|
|
1525
1528
|
interface ReasonDetail {
|
|
1526
1529
|
reason: Reason;
|
|
1527
1530
|
api_code: string;
|
|
1531
|
+
request_id: string;
|
|
1528
1532
|
}
|
|
1529
1533
|
declare const ReasonDetail: MessageFns<ReasonDetail>;
|
|
1530
1534
|
interface InitializeRequest {
|
|
@@ -2019,8 +2023,22 @@ declare const InvokeRequest: MessageFns<InvokeRequest>;
|
|
|
2019
2023
|
interface InvokeEvent {
|
|
2020
2024
|
json?: string | undefined;
|
|
2021
2025
|
exit?: InvokeExit | undefined;
|
|
2026
|
+
/**
|
|
2027
|
+
* The engine accepted the request and runs the command: sent exactly
|
|
2028
|
+
* once, before any `json` or `exit`. A stream that fails before it
|
|
2029
|
+
* never ran the command; one that fails after it and before `exit` ran
|
|
2030
|
+
* the command to an outcome its client never received.
|
|
2031
|
+
*/
|
|
2032
|
+
started?: InvokeStarted | undefined;
|
|
2022
2033
|
}
|
|
2023
2034
|
declare const InvokeEvent: MessageFns<InvokeEvent>;
|
|
2035
|
+
/**
|
|
2036
|
+
* An Invoke's command is running. It carries nothing: its arrival is the
|
|
2037
|
+
* fact.
|
|
2038
|
+
*/
|
|
2039
|
+
interface InvokeStarted {
|
|
2040
|
+
}
|
|
2041
|
+
declare const InvokeStarted: MessageFns<InvokeStarted>;
|
|
2024
2042
|
interface InvokeExit {
|
|
2025
2043
|
code: number;
|
|
2026
2044
|
/** tail ≤ 8 KiB */
|
|
@@ -2479,8 +2497,9 @@ declare const LaceEngineDefinition: {
|
|
|
2479
2497
|
readonly options: {};
|
|
2480
2498
|
};
|
|
2481
2499
|
/**
|
|
2482
|
-
* Runs one CLI command in-process against a fresh command tree.
|
|
2483
|
-
*
|
|
2500
|
+
* Runs one CLI command in-process against a fresh command tree. `started` is first, once the engine has accepted
|
|
2501
|
+
* the request and before the command runs; the command's `-o json` output follows: each top-level JSON value on
|
|
2502
|
+
* stdout is one `json` event; `exit` is always last.
|
|
2484
2503
|
*/
|
|
2485
2504
|
readonly invoke: {
|
|
2486
2505
|
readonly name: "Invoke";
|
|
@@ -2557,6 +2576,7 @@ declare const commandFailureSchema: z.ZodObject<{
|
|
|
2557
2576
|
}, z.core.$strip>>>;
|
|
2558
2577
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2559
2578
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
2579
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2560
2580
|
}, z.core.$strict>;
|
|
2561
2581
|
type CommandFailure = z.infer<typeof commandFailureSchema>;
|
|
2562
2582
|
declare const gateChangeRequestSchema: z.ZodObject<{
|
|
@@ -2650,6 +2670,7 @@ declare const SCHEMAS: {
|
|
|
2650
2670
|
}, z.core.$strip>>>;
|
|
2651
2671
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2652
2672
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
2673
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2653
2674
|
}, z.core.$strict>>;
|
|
2654
2675
|
diagnostics: z.ZodArray<z.ZodObject<{
|
|
2655
2676
|
severity: z.ZodEnum<{
|
|
@@ -2731,6 +2752,7 @@ declare const SCHEMAS: {
|
|
|
2731
2752
|
}, z.core.$strip>>>;
|
|
2732
2753
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2733
2754
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
2755
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2734
2756
|
}, z.core.$strict>>;
|
|
2735
2757
|
diagnostics: z.ZodArray<z.ZodObject<{
|
|
2736
2758
|
severity: z.ZodEnum<{
|
|
@@ -3344,6 +3366,7 @@ declare const SCHEMAS: {
|
|
|
3344
3366
|
driftCount: z.ZodNumber;
|
|
3345
3367
|
scannedAt: z.ZodString;
|
|
3346
3368
|
undeterminedReason: z.ZodNullable<z.ZodString>;
|
|
3369
|
+
undeterminedMessage: z.ZodNullable<z.ZodString>;
|
|
3347
3370
|
standingDriftFindings: z.ZodNumber;
|
|
3348
3371
|
footprintDestroyed: z.ZodBoolean;
|
|
3349
3372
|
drift: z.ZodNullable<z.ZodObject<{
|
|
@@ -3475,6 +3498,7 @@ declare const SCHEMAS: {
|
|
|
3475
3498
|
}, z.core.$strip>>>;
|
|
3476
3499
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3477
3500
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
3501
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
3478
3502
|
}, z.core.$strict>>;
|
|
3479
3503
|
diagnostics: z.ZodArray<z.ZodObject<{
|
|
3480
3504
|
severity: z.ZodEnum<{
|
|
@@ -3848,6 +3872,7 @@ declare class ConnectError extends Error {
|
|
|
3848
3872
|
readonly code: string;
|
|
3849
3873
|
readonly reason: Reason;
|
|
3850
3874
|
readonly apiCode: string | undefined;
|
|
3875
|
+
readonly requestId: string | undefined;
|
|
3851
3876
|
constructor(code: string, message: string, detail?: ReasonDetail);
|
|
3852
3877
|
}
|
|
3853
3878
|
declare class CommandDetachedError extends Error {
|
|
@@ -4175,9 +4200,15 @@ type RunSlot = {
|
|
|
4175
4200
|
submitted: boolean;
|
|
4176
4201
|
phases: readonly RunPhase[];
|
|
4177
4202
|
} | null;
|
|
4203
|
+
type PreviewOutcome = {
|
|
4204
|
+
kind: 'running';
|
|
4205
|
+
} | {
|
|
4206
|
+
kind: 'succeeded';
|
|
4207
|
+
data: JsonOf<'stack preview'>;
|
|
4208
|
+
};
|
|
4178
4209
|
type PreviewSlot = {
|
|
4179
4210
|
token: object;
|
|
4180
|
-
|
|
4211
|
+
outcome: PreviewOutcome;
|
|
4181
4212
|
} | null;
|
|
4182
4213
|
type ReportSlot = {
|
|
4183
4214
|
sessions: ReadonlyMap<object, ReportFold>;
|
|
@@ -4197,8 +4228,27 @@ type SlotValues = {
|
|
|
4197
4228
|
type ReadOver<S> = (NonNullable<S> & {
|
|
4198
4229
|
readOver: SlotContext;
|
|
4199
4230
|
}) | null;
|
|
4231
|
+
type RunningMark = {
|
|
4232
|
+
token: object;
|
|
4233
|
+
path: BoundPath;
|
|
4234
|
+
label: string;
|
|
4235
|
+
};
|
|
4200
4236
|
type ResultSlots = {
|
|
4201
4237
|
[K in SlotKind]: ReadOver<SlotValues[K]>;
|
|
4238
|
+
} & {
|
|
4239
|
+
running: ReadonlyMap<string, RunningMark>;
|
|
4240
|
+
};
|
|
4241
|
+
type Started = {
|
|
4242
|
+
target: ActionTarget;
|
|
4243
|
+
on: string;
|
|
4244
|
+
path: BoundPath;
|
|
4245
|
+
label: string;
|
|
4246
|
+
};
|
|
4247
|
+
type Busy = {
|
|
4248
|
+
kind: 'run';
|
|
4249
|
+
} | {
|
|
4250
|
+
kind: 'notify';
|
|
4251
|
+
running: RunningMark;
|
|
4202
4252
|
};
|
|
4203
4253
|
type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
4204
4254
|
report: ReportFold | null;
|
|
@@ -4206,6 +4256,16 @@ type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
|
4206
4256
|
|
|
4207
4257
|
declare function liveSlots(slots: ResultSlots, current: OnScreen): LiveSlots;
|
|
4208
4258
|
declare function reduceRun(prev: RunSlot, token: object, event: JsonOf<'stack apply'>): RunSlot;
|
|
4259
|
+
type FailedCommand = {
|
|
4260
|
+
kind: 'read';
|
|
4261
|
+
path: BoundPath;
|
|
4262
|
+
} | {
|
|
4263
|
+
kind: 'write';
|
|
4264
|
+
};
|
|
4265
|
+
declare function failureSays(error: unknown, command: FailedCommand): {
|
|
4266
|
+
message: string;
|
|
4267
|
+
failure?: CommandFailure;
|
|
4268
|
+
};
|
|
4209
4269
|
declare function settleRun(prev: RunSlot, token: object, error: unknown): RunSlot;
|
|
4210
4270
|
declare function reducePreview(_prev: PreviewSlot, token: object, event: JsonOf<'stack preview'>): PreviewSlot;
|
|
4211
4271
|
declare function reduceReport(prev: ReportSlot, session: object, result: CommandResult): ReportSlot;
|
|
@@ -4216,9 +4276,9 @@ type ResultStore = {
|
|
|
4216
4276
|
subscribe(listener: () => void): () => void;
|
|
4217
4277
|
write<K extends SlotKind>(kind: K, token: object, value: SinkInput[K], readOver: SlotContext): void;
|
|
4218
4278
|
fail(kind: ResultKind, token: object, error: unknown): boolean;
|
|
4219
|
-
begin(kind: ResultKind, token: object, readOver: SlotContext,
|
|
4279
|
+
begin(kind: ResultKind, token: object, readOver: SlotContext, started: Started): void;
|
|
4220
4280
|
detach<K extends ResultKind>(kind: K, token: object): void;
|
|
4221
|
-
|
|
4281
|
+
busy(kind: ResultKind, on: string): Busy | undefined;
|
|
4222
4282
|
bumpTick(): void;
|
|
4223
4283
|
};
|
|
4224
4284
|
declare function createResultStore(): ResultStore;
|
|
@@ -4241,6 +4301,9 @@ type ActionRunner = {
|
|
|
4241
4301
|
run(action: ActionContribution, ctx: CanvasCtx, target: ActionTarget, envExtras: EditorEnvExtras): Promise<ApplyResult | undefined>;
|
|
4242
4302
|
run(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Promise<ApplyResult | undefined>;
|
|
4243
4303
|
apply(actions: readonly Action[]): Promise<ApplyResult | undefined>;
|
|
4304
|
+
editing(): boolean;
|
|
4305
|
+
onEditingChange(listener: (editing: boolean) => void): () => void;
|
|
4306
|
+
busy(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Busy | undefined;
|
|
4244
4307
|
cancel(kind: ResultKind): Promise<void>;
|
|
4245
4308
|
detach(kind: ResultKind): void;
|
|
4246
4309
|
dispose(): void;
|
|
@@ -4350,10 +4413,10 @@ declare function openEngineSession(caller: DirectEngineCaller, target: EngineTar
|
|
|
4350
4413
|
declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4351
4414
|
|
|
4352
4415
|
type ResolveCtx = RunCtx & Partial<Pick<CanvasCtx, 'editable' | 'generating' | 'sourceRefused' | 'view' | 'selection' | 'diagnostics' | 'settingsOpen'>>;
|
|
4353
|
-
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx,
|
|
4416
|
+
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx, busy: Busy | undefined): string | undefined;
|
|
4354
4417
|
declare function answering(actions: readonly ActionContribution[], failure: CommandFailure): readonly ActionContribution[];
|
|
4355
4418
|
declare function resolveContributions<P extends PanelSpec>(all: ContributionSet<P>, ports: CanvasPorts, ctx: ResolveCtx, target?: ActionTarget): ContributionSet<P>;
|
|
4356
4419
|
/** Every resolved action placed in a given panel's row (a `row:<panel>` placement). */
|
|
4357
4420
|
declare function rowActions(resolved: ContributionSet, panelId: string): readonly ActionContribution[];
|
|
4358
4421
|
|
|
4359
|
-
export { type
|
|
4422
|
+
export { type EngineCaller as $, type ActionContribution as A, type Badge as B, type ContributionSet as C, type Decorations as D, type EdgeRef as E, type CommandRun as F, CommandUnobservedError as G, type CommandsPort as H, type ConfirmSpec as I, type JsonOf as J, type ConnectCallerOptions as K, type LayoutHandle as L, ConnectError as M, type NodeDecoration as N, type OverlayContribution as O, type PanelSpec as P, type ContextKey as Q, type ResultStore as R, type SourcePort as S, type ContextPort as T, type CreatedRef as U, type DirectEngineCaller as V, EMPTY_REPORT_FOLD as W, type EditorBinding as X, type EditorEnv as Y, type EditorEnvExtras as Z, type EditorPort as _, type CanvasCtx as a, InputMode as a$, type EngineMethodResponse as a0, type EngineSession as a1, type EngineSessionOptions as a2, type EngineTarget as a3, type ErasedCommand as a4, type FollowSlot as a5, type GateChangeRequest as a6, type GenerateEvent as a7, type GraphError as a8, type HostBinding as a9, type Started as aA, type ViewStatePort as aB, type WiringCandidate as aC, type WiringQuery as aD, answering as aE, bridgeCaller as aF, carriesFailure as aG, connectCaller as aH, createActionRunner as aI, createResultStore as aJ, currentReport as aK, defineCommand as aL, diagnosticsOf as aM, disabledReason as aN, foldReport as aO, isBoundPath as aP, openEngineCommands as aQ, openEngineSession as aR, parseBound as aS, parseCommandFailure as aT, reportDiagnostics as aU, resolveContributions as aV, rowActions as aW, toArgv as aX, uniqueDiagnostics as aY, Action as aZ, type FailedCommand as a_, type Invocation as aa, type KeySpec as ab, type Placement as ac, type PortName as ad, type PresenterPort as ae, type PreviewOutcome as af, type PreviewSlot as ag, Reason as ah, type ReportEntry as ai, type ReportFold as aj, type ReportPath as ak, type ReportSlot as al, type ResultKind as am, type ResultSlots as an, type RunCtx as ao, type RunOutcome as ap, type RunSlot as aq, type RunnerPorts as ar, type RunningMark as as, SCHEMAS as at, type Sink as au, type SinkInput as av, type SlotContext as aw, type SlotKind as ax, type SourceConflict as ay, type StackRef as az, type CanvasPorts as b, type LaceReason as b0, type LiveSlots as b1, type OnScreen as b2, type RunPhase as b3, type RunPhaseStatus as b4, diagnosticsOfDocument as b5, failureSays as b6, liveSlots as b7, reasonWire as b8, reduceFollow as b9, reducePreview as ba, reduceReport as bb, reduceRun as bc, settleRun as bd, type PendingForm as c, type BoundPath as d, type CommandRead as e, type ActionTarget as f, type CommandResult as g, type CanvasSource as h, type SourceEnd as i, Bundle as j, type ActionRunner as k, type ActionIcon as l, type ActionRunnerOptions as m, type ApplyResult as n, ApplyUnobservedError as o, type ArgsOf as p, type BindingRuntime as q, type BridgeEngineCaller as r, type Busy as s, COMMANDS as t, type ClipboardStore as u, type CommandBinding as v, CommandDetachedError as w, CommandExitError as x, type CommandFailure as y, type CommandPath as z };
|
|
@@ -1520,11 +1520,15 @@ declare enum ConflictChoice {
|
|
|
1520
1520
|
* failure Lace decided sets `reason`; one the API decided sets `api_code`
|
|
1521
1521
|
* to the API's own closed code, passed through unchanged, with the status
|
|
1522
1522
|
* code that HTTP status maps to, and `reason` where that code has one
|
|
1523
|
-
* (`REASON_UNAUTHENTICATED` for the API's `unauthenticated`)
|
|
1523
|
+
* (`REASON_UNAUTHENTICATED` for the API's `unauthenticated`), and
|
|
1524
|
+
* `request_id` to the id the API answered the refused request with, when
|
|
1525
|
+
* it named one: the id a person quotes to Lace's support. The status
|
|
1526
|
+
* message is the sentence the API wrote; neither field is spelled into it.
|
|
1524
1527
|
*/
|
|
1525
1528
|
interface ReasonDetail {
|
|
1526
1529
|
reason: Reason;
|
|
1527
1530
|
api_code: string;
|
|
1531
|
+
request_id: string;
|
|
1528
1532
|
}
|
|
1529
1533
|
declare const ReasonDetail: MessageFns<ReasonDetail>;
|
|
1530
1534
|
interface InitializeRequest {
|
|
@@ -2019,8 +2023,22 @@ declare const InvokeRequest: MessageFns<InvokeRequest>;
|
|
|
2019
2023
|
interface InvokeEvent {
|
|
2020
2024
|
json?: string | undefined;
|
|
2021
2025
|
exit?: InvokeExit | undefined;
|
|
2026
|
+
/**
|
|
2027
|
+
* The engine accepted the request and runs the command: sent exactly
|
|
2028
|
+
* once, before any `json` or `exit`. A stream that fails before it
|
|
2029
|
+
* never ran the command; one that fails after it and before `exit` ran
|
|
2030
|
+
* the command to an outcome its client never received.
|
|
2031
|
+
*/
|
|
2032
|
+
started?: InvokeStarted | undefined;
|
|
2022
2033
|
}
|
|
2023
2034
|
declare const InvokeEvent: MessageFns<InvokeEvent>;
|
|
2035
|
+
/**
|
|
2036
|
+
* An Invoke's command is running. It carries nothing: its arrival is the
|
|
2037
|
+
* fact.
|
|
2038
|
+
*/
|
|
2039
|
+
interface InvokeStarted {
|
|
2040
|
+
}
|
|
2041
|
+
declare const InvokeStarted: MessageFns<InvokeStarted>;
|
|
2024
2042
|
interface InvokeExit {
|
|
2025
2043
|
code: number;
|
|
2026
2044
|
/** tail ≤ 8 KiB */
|
|
@@ -2479,8 +2497,9 @@ declare const LaceEngineDefinition: {
|
|
|
2479
2497
|
readonly options: {};
|
|
2480
2498
|
};
|
|
2481
2499
|
/**
|
|
2482
|
-
* Runs one CLI command in-process against a fresh command tree.
|
|
2483
|
-
*
|
|
2500
|
+
* Runs one CLI command in-process against a fresh command tree. `started` is first, once the engine has accepted
|
|
2501
|
+
* the request and before the command runs; the command's `-o json` output follows: each top-level JSON value on
|
|
2502
|
+
* stdout is one `json` event; `exit` is always last.
|
|
2484
2503
|
*/
|
|
2485
2504
|
readonly invoke: {
|
|
2486
2505
|
readonly name: "Invoke";
|
|
@@ -2557,6 +2576,7 @@ declare const commandFailureSchema: z.ZodObject<{
|
|
|
2557
2576
|
}, z.core.$strip>>>;
|
|
2558
2577
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2559
2578
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
2579
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2560
2580
|
}, z.core.$strict>;
|
|
2561
2581
|
type CommandFailure = z.infer<typeof commandFailureSchema>;
|
|
2562
2582
|
declare const gateChangeRequestSchema: z.ZodObject<{
|
|
@@ -2650,6 +2670,7 @@ declare const SCHEMAS: {
|
|
|
2650
2670
|
}, z.core.$strip>>>;
|
|
2651
2671
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2652
2672
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
2673
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2653
2674
|
}, z.core.$strict>>;
|
|
2654
2675
|
diagnostics: z.ZodArray<z.ZodObject<{
|
|
2655
2676
|
severity: z.ZodEnum<{
|
|
@@ -2731,6 +2752,7 @@ declare const SCHEMAS: {
|
|
|
2731
2752
|
}, z.core.$strip>>>;
|
|
2732
2753
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2733
2754
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
2755
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2734
2756
|
}, z.core.$strict>>;
|
|
2735
2757
|
diagnostics: z.ZodArray<z.ZodObject<{
|
|
2736
2758
|
severity: z.ZodEnum<{
|
|
@@ -3344,6 +3366,7 @@ declare const SCHEMAS: {
|
|
|
3344
3366
|
driftCount: z.ZodNumber;
|
|
3345
3367
|
scannedAt: z.ZodString;
|
|
3346
3368
|
undeterminedReason: z.ZodNullable<z.ZodString>;
|
|
3369
|
+
undeterminedMessage: z.ZodNullable<z.ZodString>;
|
|
3347
3370
|
standingDriftFindings: z.ZodNumber;
|
|
3348
3371
|
footprintDestroyed: z.ZodBoolean;
|
|
3349
3372
|
drift: z.ZodNullable<z.ZodObject<{
|
|
@@ -3475,6 +3498,7 @@ declare const SCHEMAS: {
|
|
|
3475
3498
|
}, z.core.$strip>>>;
|
|
3476
3499
|
addresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3477
3500
|
apiCode: z.ZodOptional<z.ZodString>;
|
|
3501
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
3478
3502
|
}, z.core.$strict>>;
|
|
3479
3503
|
diagnostics: z.ZodArray<z.ZodObject<{
|
|
3480
3504
|
severity: z.ZodEnum<{
|
|
@@ -3848,6 +3872,7 @@ declare class ConnectError extends Error {
|
|
|
3848
3872
|
readonly code: string;
|
|
3849
3873
|
readonly reason: Reason;
|
|
3850
3874
|
readonly apiCode: string | undefined;
|
|
3875
|
+
readonly requestId: string | undefined;
|
|
3851
3876
|
constructor(code: string, message: string, detail?: ReasonDetail);
|
|
3852
3877
|
}
|
|
3853
3878
|
declare class CommandDetachedError extends Error {
|
|
@@ -4175,9 +4200,15 @@ type RunSlot = {
|
|
|
4175
4200
|
submitted: boolean;
|
|
4176
4201
|
phases: readonly RunPhase[];
|
|
4177
4202
|
} | null;
|
|
4203
|
+
type PreviewOutcome = {
|
|
4204
|
+
kind: 'running';
|
|
4205
|
+
} | {
|
|
4206
|
+
kind: 'succeeded';
|
|
4207
|
+
data: JsonOf<'stack preview'>;
|
|
4208
|
+
};
|
|
4178
4209
|
type PreviewSlot = {
|
|
4179
4210
|
token: object;
|
|
4180
|
-
|
|
4211
|
+
outcome: PreviewOutcome;
|
|
4181
4212
|
} | null;
|
|
4182
4213
|
type ReportSlot = {
|
|
4183
4214
|
sessions: ReadonlyMap<object, ReportFold>;
|
|
@@ -4197,8 +4228,27 @@ type SlotValues = {
|
|
|
4197
4228
|
type ReadOver<S> = (NonNullable<S> & {
|
|
4198
4229
|
readOver: SlotContext;
|
|
4199
4230
|
}) | null;
|
|
4231
|
+
type RunningMark = {
|
|
4232
|
+
token: object;
|
|
4233
|
+
path: BoundPath;
|
|
4234
|
+
label: string;
|
|
4235
|
+
};
|
|
4200
4236
|
type ResultSlots = {
|
|
4201
4237
|
[K in SlotKind]: ReadOver<SlotValues[K]>;
|
|
4238
|
+
} & {
|
|
4239
|
+
running: ReadonlyMap<string, RunningMark>;
|
|
4240
|
+
};
|
|
4241
|
+
type Started = {
|
|
4242
|
+
target: ActionTarget;
|
|
4243
|
+
on: string;
|
|
4244
|
+
path: BoundPath;
|
|
4245
|
+
label: string;
|
|
4246
|
+
};
|
|
4247
|
+
type Busy = {
|
|
4248
|
+
kind: 'run';
|
|
4249
|
+
} | {
|
|
4250
|
+
kind: 'notify';
|
|
4251
|
+
running: RunningMark;
|
|
4202
4252
|
};
|
|
4203
4253
|
type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
4204
4254
|
report: ReportFold | null;
|
|
@@ -4206,6 +4256,16 @@ type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
|
4206
4256
|
|
|
4207
4257
|
declare function liveSlots(slots: ResultSlots, current: OnScreen): LiveSlots;
|
|
4208
4258
|
declare function reduceRun(prev: RunSlot, token: object, event: JsonOf<'stack apply'>): RunSlot;
|
|
4259
|
+
type FailedCommand = {
|
|
4260
|
+
kind: 'read';
|
|
4261
|
+
path: BoundPath;
|
|
4262
|
+
} | {
|
|
4263
|
+
kind: 'write';
|
|
4264
|
+
};
|
|
4265
|
+
declare function failureSays(error: unknown, command: FailedCommand): {
|
|
4266
|
+
message: string;
|
|
4267
|
+
failure?: CommandFailure;
|
|
4268
|
+
};
|
|
4209
4269
|
declare function settleRun(prev: RunSlot, token: object, error: unknown): RunSlot;
|
|
4210
4270
|
declare function reducePreview(_prev: PreviewSlot, token: object, event: JsonOf<'stack preview'>): PreviewSlot;
|
|
4211
4271
|
declare function reduceReport(prev: ReportSlot, session: object, result: CommandResult): ReportSlot;
|
|
@@ -4216,9 +4276,9 @@ type ResultStore = {
|
|
|
4216
4276
|
subscribe(listener: () => void): () => void;
|
|
4217
4277
|
write<K extends SlotKind>(kind: K, token: object, value: SinkInput[K], readOver: SlotContext): void;
|
|
4218
4278
|
fail(kind: ResultKind, token: object, error: unknown): boolean;
|
|
4219
|
-
begin(kind: ResultKind, token: object, readOver: SlotContext,
|
|
4279
|
+
begin(kind: ResultKind, token: object, readOver: SlotContext, started: Started): void;
|
|
4220
4280
|
detach<K extends ResultKind>(kind: K, token: object): void;
|
|
4221
|
-
|
|
4281
|
+
busy(kind: ResultKind, on: string): Busy | undefined;
|
|
4222
4282
|
bumpTick(): void;
|
|
4223
4283
|
};
|
|
4224
4284
|
declare function createResultStore(): ResultStore;
|
|
@@ -4241,6 +4301,9 @@ type ActionRunner = {
|
|
|
4241
4301
|
run(action: ActionContribution, ctx: CanvasCtx, target: ActionTarget, envExtras: EditorEnvExtras): Promise<ApplyResult | undefined>;
|
|
4242
4302
|
run(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Promise<ApplyResult | undefined>;
|
|
4243
4303
|
apply(actions: readonly Action[]): Promise<ApplyResult | undefined>;
|
|
4304
|
+
editing(): boolean;
|
|
4305
|
+
onEditingChange(listener: (editing: boolean) => void): () => void;
|
|
4306
|
+
busy(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Busy | undefined;
|
|
4244
4307
|
cancel(kind: ResultKind): Promise<void>;
|
|
4245
4308
|
detach(kind: ResultKind): void;
|
|
4246
4309
|
dispose(): void;
|
|
@@ -4350,10 +4413,10 @@ declare function openEngineSession(caller: DirectEngineCaller, target: EngineTar
|
|
|
4350
4413
|
declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4351
4414
|
|
|
4352
4415
|
type ResolveCtx = RunCtx & Partial<Pick<CanvasCtx, 'editable' | 'generating' | 'sourceRefused' | 'view' | 'selection' | 'diagnostics' | 'settingsOpen'>>;
|
|
4353
|
-
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx,
|
|
4416
|
+
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx, busy: Busy | undefined): string | undefined;
|
|
4354
4417
|
declare function answering(actions: readonly ActionContribution[], failure: CommandFailure): readonly ActionContribution[];
|
|
4355
4418
|
declare function resolveContributions<P extends PanelSpec>(all: ContributionSet<P>, ports: CanvasPorts, ctx: ResolveCtx, target?: ActionTarget): ContributionSet<P>;
|
|
4356
4419
|
/** Every resolved action placed in a given panel's row (a `row:<panel>` placement). */
|
|
4357
4420
|
declare function rowActions(resolved: ContributionSet, panelId: string): readonly ActionContribution[];
|
|
4358
4421
|
|
|
4359
|
-
export { type
|
|
4422
|
+
export { type EngineCaller as $, type ActionContribution as A, type Badge as B, type ContributionSet as C, type Decorations as D, type EdgeRef as E, type CommandRun as F, CommandUnobservedError as G, type CommandsPort as H, type ConfirmSpec as I, type JsonOf as J, type ConnectCallerOptions as K, type LayoutHandle as L, ConnectError as M, type NodeDecoration as N, type OverlayContribution as O, type PanelSpec as P, type ContextKey as Q, type ResultStore as R, type SourcePort as S, type ContextPort as T, type CreatedRef as U, type DirectEngineCaller as V, EMPTY_REPORT_FOLD as W, type EditorBinding as X, type EditorEnv as Y, type EditorEnvExtras as Z, type EditorPort as _, type CanvasCtx as a, InputMode as a$, type EngineMethodResponse as a0, type EngineSession as a1, type EngineSessionOptions as a2, type EngineTarget as a3, type ErasedCommand as a4, type FollowSlot as a5, type GateChangeRequest as a6, type GenerateEvent as a7, type GraphError as a8, type HostBinding as a9, type Started as aA, type ViewStatePort as aB, type WiringCandidate as aC, type WiringQuery as aD, answering as aE, bridgeCaller as aF, carriesFailure as aG, connectCaller as aH, createActionRunner as aI, createResultStore as aJ, currentReport as aK, defineCommand as aL, diagnosticsOf as aM, disabledReason as aN, foldReport as aO, isBoundPath as aP, openEngineCommands as aQ, openEngineSession as aR, parseBound as aS, parseCommandFailure as aT, reportDiagnostics as aU, resolveContributions as aV, rowActions as aW, toArgv as aX, uniqueDiagnostics as aY, Action as aZ, type FailedCommand as a_, type Invocation as aa, type KeySpec as ab, type Placement as ac, type PortName as ad, type PresenterPort as ae, type PreviewOutcome as af, type PreviewSlot as ag, Reason as ah, type ReportEntry as ai, type ReportFold as aj, type ReportPath as ak, type ReportSlot as al, type ResultKind as am, type ResultSlots as an, type RunCtx as ao, type RunOutcome as ap, type RunSlot as aq, type RunnerPorts as ar, type RunningMark as as, SCHEMAS as at, type Sink as au, type SinkInput as av, type SlotContext as aw, type SlotKind as ax, type SourceConflict as ay, type StackRef as az, type CanvasPorts as b, type LaceReason as b0, type LiveSlots as b1, type OnScreen as b2, type RunPhase as b3, type RunPhaseStatus as b4, diagnosticsOfDocument as b5, failureSays as b6, liveSlots as b7, reasonWire as b8, reduceFollow as b9, reducePreview as ba, reduceReport as bb, reduceRun as bc, settleRun as bd, type PendingForm as c, type BoundPath as d, type CommandRead as e, type ActionTarget as f, type CommandResult as g, type CanvasSource as h, type SourceEnd as i, Bundle as j, type ActionRunner as k, type ActionIcon as l, type ActionRunnerOptions as m, type ApplyResult as n, ApplyUnobservedError as o, type ArgsOf as p, type BindingRuntime as q, type BridgeEngineCaller as r, type Busy as s, COMMANDS as t, type ClipboardStore as u, type CommandBinding as v, CommandDetachedError as w, CommandExitError as x, type CommandFailure as y, type CommandPath as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lace-cloud/canvas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"license": "BUSL-1.1",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"react": "^18.3.1",
|
|
24
24
|
"react-dom": "^18.3.1",
|
|
25
25
|
"zod": "^4.1.11",
|
|
26
|
-
"@lace-cloud/proto": "0.
|
|
27
|
-
"@lace-cloud/ui": "0.
|
|
26
|
+
"@lace-cloud/proto": "0.27.0",
|
|
27
|
+
"@lace-cloud/ui": "0.27.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/react": "^18.3.12",
|