@lace-cloud/canvas 0.25.0 → 0.26.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-ID563WHD.mjs} +772 -568
- package/dist/chunk-ID563WHD.mjs.map +1 -0
- package/dist/engine/index.cjs +761 -568
- 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 +3729 -3439
- 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-BhFAgvlq.d.mts} +64 -7
- package/dist/{registry-CdHLt_qh.d.ts → registry-BhFAgvlq.d.ts} +64 -7
- 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 {
|
|
@@ -4197,8 +4222,27 @@ type SlotValues = {
|
|
|
4197
4222
|
type ReadOver<S> = (NonNullable<S> & {
|
|
4198
4223
|
readOver: SlotContext;
|
|
4199
4224
|
}) | null;
|
|
4225
|
+
type RunningMark = {
|
|
4226
|
+
token: object;
|
|
4227
|
+
path: BoundPath;
|
|
4228
|
+
label: string;
|
|
4229
|
+
};
|
|
4200
4230
|
type ResultSlots = {
|
|
4201
4231
|
[K in SlotKind]: ReadOver<SlotValues[K]>;
|
|
4232
|
+
} & {
|
|
4233
|
+
running: ReadonlyMap<string, RunningMark>;
|
|
4234
|
+
};
|
|
4235
|
+
type Started = {
|
|
4236
|
+
target: ActionTarget;
|
|
4237
|
+
on: string;
|
|
4238
|
+
path: BoundPath;
|
|
4239
|
+
label: string;
|
|
4240
|
+
};
|
|
4241
|
+
type Busy = {
|
|
4242
|
+
kind: 'run';
|
|
4243
|
+
} | {
|
|
4244
|
+
kind: 'notify';
|
|
4245
|
+
running: RunningMark;
|
|
4202
4246
|
};
|
|
4203
4247
|
type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
4204
4248
|
report: ReportFold | null;
|
|
@@ -4206,6 +4250,16 @@ type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
|
4206
4250
|
|
|
4207
4251
|
declare function liveSlots(slots: ResultSlots, current: OnScreen): LiveSlots;
|
|
4208
4252
|
declare function reduceRun(prev: RunSlot, token: object, event: JsonOf<'stack apply'>): RunSlot;
|
|
4253
|
+
type FailedCommand = {
|
|
4254
|
+
kind: 'read';
|
|
4255
|
+
path: BoundPath;
|
|
4256
|
+
} | {
|
|
4257
|
+
kind: 'write';
|
|
4258
|
+
};
|
|
4259
|
+
declare function failureSays(error: unknown, command: FailedCommand): {
|
|
4260
|
+
message: string;
|
|
4261
|
+
failure?: CommandFailure;
|
|
4262
|
+
};
|
|
4209
4263
|
declare function settleRun(prev: RunSlot, token: object, error: unknown): RunSlot;
|
|
4210
4264
|
declare function reducePreview(_prev: PreviewSlot, token: object, event: JsonOf<'stack preview'>): PreviewSlot;
|
|
4211
4265
|
declare function reduceReport(prev: ReportSlot, session: object, result: CommandResult): ReportSlot;
|
|
@@ -4216,9 +4270,9 @@ type ResultStore = {
|
|
|
4216
4270
|
subscribe(listener: () => void): () => void;
|
|
4217
4271
|
write<K extends SlotKind>(kind: K, token: object, value: SinkInput[K], readOver: SlotContext): void;
|
|
4218
4272
|
fail(kind: ResultKind, token: object, error: unknown): boolean;
|
|
4219
|
-
begin(kind: ResultKind, token: object, readOver: SlotContext,
|
|
4273
|
+
begin(kind: ResultKind, token: object, readOver: SlotContext, started: Started): void;
|
|
4220
4274
|
detach<K extends ResultKind>(kind: K, token: object): void;
|
|
4221
|
-
|
|
4275
|
+
busy(kind: ResultKind, on: string): Busy | undefined;
|
|
4222
4276
|
bumpTick(): void;
|
|
4223
4277
|
};
|
|
4224
4278
|
declare function createResultStore(): ResultStore;
|
|
@@ -4241,6 +4295,9 @@ type ActionRunner = {
|
|
|
4241
4295
|
run(action: ActionContribution, ctx: CanvasCtx, target: ActionTarget, envExtras: EditorEnvExtras): Promise<ApplyResult | undefined>;
|
|
4242
4296
|
run(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Promise<ApplyResult | undefined>;
|
|
4243
4297
|
apply(actions: readonly Action[]): Promise<ApplyResult | undefined>;
|
|
4298
|
+
editing(): boolean;
|
|
4299
|
+
onEditingChange(listener: (editing: boolean) => void): () => void;
|
|
4300
|
+
busy(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Busy | undefined;
|
|
4244
4301
|
cancel(kind: ResultKind): Promise<void>;
|
|
4245
4302
|
detach(kind: ResultKind): void;
|
|
4246
4303
|
dispose(): void;
|
|
@@ -4350,10 +4407,10 @@ declare function openEngineSession(caller: DirectEngineCaller, target: EngineTar
|
|
|
4350
4407
|
declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4351
4408
|
|
|
4352
4409
|
type ResolveCtx = RunCtx & Partial<Pick<CanvasCtx, 'editable' | 'generating' | 'sourceRefused' | 'view' | 'selection' | 'diagnostics' | 'settingsOpen'>>;
|
|
4353
|
-
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx,
|
|
4410
|
+
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx, busy: Busy | undefined): string | undefined;
|
|
4354
4411
|
declare function answering(actions: readonly ActionContribution[], failure: CommandFailure): readonly ActionContribution[];
|
|
4355
4412
|
declare function resolveContributions<P extends PanelSpec>(all: ContributionSet<P>, ports: CanvasPorts, ctx: ResolveCtx, target?: ActionTarget): ContributionSet<P>;
|
|
4356
4413
|
/** Every resolved action placed in a given panel's row (a `row:<panel>` placement). */
|
|
4357
4414
|
declare function rowActions(resolved: ContributionSet, panelId: string): readonly ActionContribution[];
|
|
4358
4415
|
|
|
4359
|
-
export { type
|
|
4416
|
+
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, type LaceReason 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 ViewStatePort as aA, type WiringCandidate as aB, type WiringQuery as aC, answering as aD, bridgeCaller as aE, carriesFailure as aF, connectCaller as aG, createActionRunner as aH, createResultStore as aI, currentReport as aJ, defineCommand as aK, diagnosticsOf as aL, disabledReason as aM, foldReport as aN, isBoundPath as aO, openEngineCommands as aP, openEngineSession as aQ, parseBound as aR, parseCommandFailure as aS, reportDiagnostics as aT, resolveContributions as aU, rowActions as aV, toArgv as aW, uniqueDiagnostics as aX, Action as aY, type FailedCommand as aZ, InputMode as a_, type Invocation as aa, type KeySpec as ab, type Placement as ac, type PortName as ad, type PresenterPort as ae, type PreviewSlot as af, Reason as ag, type ReportEntry as ah, type ReportFold as ai, type ReportPath as aj, type ReportSlot as ak, type ResultKind as al, type ResultSlots as am, type RunCtx as an, type RunOutcome as ao, type RunSlot as ap, type RunnerPorts as aq, type RunningMark as ar, SCHEMAS as as, type Sink as at, type SinkInput as au, type SlotContext as av, type SlotKind as aw, type SourceConflict as ax, type StackRef as ay, type Started as az, type CanvasPorts as b, type LiveSlots as b0, type OnScreen as b1, type RunPhase as b2, type RunPhaseStatus as b3, diagnosticsOfDocument as b4, failureSays as b5, liveSlots as b6, reasonWire as b7, reduceFollow as b8, reducePreview as b9, reduceReport as ba, reduceRun as bb, settleRun as bc, 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 {
|
|
@@ -4197,8 +4222,27 @@ type SlotValues = {
|
|
|
4197
4222
|
type ReadOver<S> = (NonNullable<S> & {
|
|
4198
4223
|
readOver: SlotContext;
|
|
4199
4224
|
}) | null;
|
|
4225
|
+
type RunningMark = {
|
|
4226
|
+
token: object;
|
|
4227
|
+
path: BoundPath;
|
|
4228
|
+
label: string;
|
|
4229
|
+
};
|
|
4200
4230
|
type ResultSlots = {
|
|
4201
4231
|
[K in SlotKind]: ReadOver<SlotValues[K]>;
|
|
4232
|
+
} & {
|
|
4233
|
+
running: ReadonlyMap<string, RunningMark>;
|
|
4234
|
+
};
|
|
4235
|
+
type Started = {
|
|
4236
|
+
target: ActionTarget;
|
|
4237
|
+
on: string;
|
|
4238
|
+
path: BoundPath;
|
|
4239
|
+
label: string;
|
|
4240
|
+
};
|
|
4241
|
+
type Busy = {
|
|
4242
|
+
kind: 'run';
|
|
4243
|
+
} | {
|
|
4244
|
+
kind: 'notify';
|
|
4245
|
+
running: RunningMark;
|
|
4202
4246
|
};
|
|
4203
4247
|
type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
4204
4248
|
report: ReportFold | null;
|
|
@@ -4206,6 +4250,16 @@ type LiveSlots = Omit<ResultSlots, 'report'> & {
|
|
|
4206
4250
|
|
|
4207
4251
|
declare function liveSlots(slots: ResultSlots, current: OnScreen): LiveSlots;
|
|
4208
4252
|
declare function reduceRun(prev: RunSlot, token: object, event: JsonOf<'stack apply'>): RunSlot;
|
|
4253
|
+
type FailedCommand = {
|
|
4254
|
+
kind: 'read';
|
|
4255
|
+
path: BoundPath;
|
|
4256
|
+
} | {
|
|
4257
|
+
kind: 'write';
|
|
4258
|
+
};
|
|
4259
|
+
declare function failureSays(error: unknown, command: FailedCommand): {
|
|
4260
|
+
message: string;
|
|
4261
|
+
failure?: CommandFailure;
|
|
4262
|
+
};
|
|
4209
4263
|
declare function settleRun(prev: RunSlot, token: object, error: unknown): RunSlot;
|
|
4210
4264
|
declare function reducePreview(_prev: PreviewSlot, token: object, event: JsonOf<'stack preview'>): PreviewSlot;
|
|
4211
4265
|
declare function reduceReport(prev: ReportSlot, session: object, result: CommandResult): ReportSlot;
|
|
@@ -4216,9 +4270,9 @@ type ResultStore = {
|
|
|
4216
4270
|
subscribe(listener: () => void): () => void;
|
|
4217
4271
|
write<K extends SlotKind>(kind: K, token: object, value: SinkInput[K], readOver: SlotContext): void;
|
|
4218
4272
|
fail(kind: ResultKind, token: object, error: unknown): boolean;
|
|
4219
|
-
begin(kind: ResultKind, token: object, readOver: SlotContext,
|
|
4273
|
+
begin(kind: ResultKind, token: object, readOver: SlotContext, started: Started): void;
|
|
4220
4274
|
detach<K extends ResultKind>(kind: K, token: object): void;
|
|
4221
|
-
|
|
4275
|
+
busy(kind: ResultKind, on: string): Busy | undefined;
|
|
4222
4276
|
bumpTick(): void;
|
|
4223
4277
|
};
|
|
4224
4278
|
declare function createResultStore(): ResultStore;
|
|
@@ -4241,6 +4295,9 @@ type ActionRunner = {
|
|
|
4241
4295
|
run(action: ActionContribution, ctx: CanvasCtx, target: ActionTarget, envExtras: EditorEnvExtras): Promise<ApplyResult | undefined>;
|
|
4242
4296
|
run(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Promise<ApplyResult | undefined>;
|
|
4243
4297
|
apply(actions: readonly Action[]): Promise<ApplyResult | undefined>;
|
|
4298
|
+
editing(): boolean;
|
|
4299
|
+
onEditingChange(listener: (editing: boolean) => void): () => void;
|
|
4300
|
+
busy(action: ActionContribution, ctx: RunCtx, target: ActionTarget): Busy | undefined;
|
|
4244
4301
|
cancel(kind: ResultKind): Promise<void>;
|
|
4245
4302
|
detach(kind: ResultKind): void;
|
|
4246
4303
|
dispose(): void;
|
|
@@ -4350,10 +4407,10 @@ declare function openEngineSession(caller: DirectEngineCaller, target: EngineTar
|
|
|
4350
4407
|
declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4351
4408
|
|
|
4352
4409
|
type ResolveCtx = RunCtx & Partial<Pick<CanvasCtx, 'editable' | 'generating' | 'sourceRefused' | 'view' | 'selection' | 'diagnostics' | 'settingsOpen'>>;
|
|
4353
|
-
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx,
|
|
4410
|
+
declare function disabledReason(action: ActionContribution, ctx: ResolveCtx, busy: Busy | undefined): string | undefined;
|
|
4354
4411
|
declare function answering(actions: readonly ActionContribution[], failure: CommandFailure): readonly ActionContribution[];
|
|
4355
4412
|
declare function resolveContributions<P extends PanelSpec>(all: ContributionSet<P>, ports: CanvasPorts, ctx: ResolveCtx, target?: ActionTarget): ContributionSet<P>;
|
|
4356
4413
|
/** Every resolved action placed in a given panel's row (a `row:<panel>` placement). */
|
|
4357
4414
|
declare function rowActions(resolved: ContributionSet, panelId: string): readonly ActionContribution[];
|
|
4358
4415
|
|
|
4359
|
-
export { type
|
|
4416
|
+
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, type LaceReason 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 ViewStatePort as aA, type WiringCandidate as aB, type WiringQuery as aC, answering as aD, bridgeCaller as aE, carriesFailure as aF, connectCaller as aG, createActionRunner as aH, createResultStore as aI, currentReport as aJ, defineCommand as aK, diagnosticsOf as aL, disabledReason as aM, foldReport as aN, isBoundPath as aO, openEngineCommands as aP, openEngineSession as aQ, parseBound as aR, parseCommandFailure as aS, reportDiagnostics as aT, resolveContributions as aU, rowActions as aV, toArgv as aW, uniqueDiagnostics as aX, Action as aY, type FailedCommand as aZ, InputMode as a_, type Invocation as aa, type KeySpec as ab, type Placement as ac, type PortName as ad, type PresenterPort as ae, type PreviewSlot as af, Reason as ag, type ReportEntry as ah, type ReportFold as ai, type ReportPath as aj, type ReportSlot as ak, type ResultKind as al, type ResultSlots as am, type RunCtx as an, type RunOutcome as ao, type RunSlot as ap, type RunnerPorts as aq, type RunningMark as ar, SCHEMAS as as, type Sink as at, type SinkInput as au, type SlotContext as av, type SlotKind as aw, type SourceConflict as ax, type StackRef as ay, type Started as az, type CanvasPorts as b, type LiveSlots as b0, type OnScreen as b1, type RunPhase as b2, type RunPhaseStatus as b3, diagnosticsOfDocument as b4, failureSays as b5, liveSlots as b6, reasonWire as b7, reduceFollow as b8, reducePreview as b9, reduceReport as ba, reduceRun as bb, settleRun as bc, 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.26.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.26.0",
|
|
27
|
+
"@lace-cloud/ui": "0.26.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/react": "^18.3.12",
|