@eworkbase/sdk 0.3.1 → 0.3.2
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/index.d.ts +2 -2
- package/dist/{types-CoZB_r31.d.ts → types-BIVvX6Nh.d.ts} +13 -1
- package/dist/ui/index.css +138 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/model.d.ts +10 -0
- package/dist/ui/model.js +12 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as PluginCapabilityService, A as PluginProcessApi, At as roleToolsAppliedSchema, B as PluginStatusDefinition, C as PluginInvocationContext, Ct as PluginToastOptions, D as PluginLifecyclePolicy, Dt as RoleToolsApplied, E as PluginLifecycleOutcome, Et as RoleToolEnvironment, F as PluginRepositoryStatus, G as PluginViewRequest, H as PluginViewContribution, I as PluginSetupHooks, J as PluginAgentContextCatalogEntry, K as PluginWorkspace, L as PluginSharedChangeKind, M as PluginProcessRunOptions, N as PluginProject, O as PluginLifecycleStatus, Ot as RoleToolsProposal, P as PluginRepository, Q as PluginCapabilityResolveRequest, R as PluginSharedChanges, S as PluginHookResult, St as PluginToastLevel, T as PluginLifecycleHook, Tt as PluginToolsService, U as PluginViewDefinition, V as PluginToolContribution, W as PluginViewLayout, X as PluginCapabilityCatalog, Y as PluginAgentPolicy, Z as PluginCapabilityCommandRequest, _ as PluginDisposable, _t as PluginSystemContextService, a as PluginCommandContext, at as PluginInteractiveLogger, b as PluginFileChange, bt as PluginTaskService, c as PluginCommandDetails, ct as PluginLogQueryResult, d as PluginCommandExecutionResult, dt as PluginPromptChoice, et as PluginColoredMessage, f as PluginCommandOption, ft as PluginPromptQuestion, g as PluginContributionSnapshot, gt as PluginStoreApi, h as PluginContextExposure, ht as PluginStatusCatalogEntry, i as PluginCommandCategory, it as PluginHostServices, j as PluginProcessResult, jt as roleToolsProposalSchema, k as PluginLogger, kt as roleToolEnvironmentSchema, l as PluginCommandEffect, lt as PluginLogService, m as PluginContext, mt as PluginPromptViewRequest, n as PluginAgentContextDefinition, nt as PluginConfigApi, o as PluginCommandContribution, ot as PluginLogEntry, p as PluginCommandTransaction, pt as PluginPromptType, q as WorkbasePluginDefinition, r as PluginCommandArgument, rt as PluginExecutionService, s as PluginCommandDefinition, st as PluginLogQueryRequest, t as PluginAgentContextContribution, tt as PluginCommandCatalogEntry, u as PluginCommandExecutionMode, ut as PluginPromptApi, v as PluginExecutionSnapshot, vt as PluginTaskDescriptor, w as PluginLifecycleDispatchResult, wt as PluginViewCatalogEntry, x as PluginHookId, xt as PluginToastApi, y as PluginExecutionStatus, yt as PluginTaskResult, z as PluginStatusContribution } from "./types-BIVvX6Nh.js";
|
|
2
2
|
export * from "zod";
|
|
3
3
|
//#region src/definition.d.ts
|
|
4
4
|
export declare const PLUGIN_API_VERSION = 2;
|
|
@@ -6,4 +6,4 @@ type DefinedWorkbasePlugin = Readonly<WorkbasePluginDefinition>;
|
|
|
6
6
|
export declare function definePlugin(definition: WorkbasePluginDefinition): DefinedWorkbasePlugin;
|
|
7
7
|
export declare function isDefinedPlugin(value: unknown): value is DefinedWorkbasePlugin;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { type DefinedWorkbasePlugin, type PluginAgentContextCatalogEntry, type PluginAgentContextContribution, type PluginAgentContextDefinition, type PluginAgentPolicy, type PluginCapabilityCatalog, type PluginCapabilityCommandRequest, type PluginCapabilityResolveRequest, type PluginCapabilityService, type PluginColoredMessage, type PluginCommandArgument, type PluginCommandCatalogEntry, PluginCommandCategory, type PluginCommandContext, type PluginCommandContribution, type PluginCommandDefinition, type PluginCommandDetails, PluginCommandEffect, PluginCommandExecutionMode, type PluginCommandExecutionResult, type PluginCommandOption, PluginCommandTransaction, type PluginConfigApi, type PluginContext, PluginContextExposure, type PluginContributionSnapshot, type PluginDisposable, type PluginExecutionService, type PluginExecutionSnapshot, PluginExecutionStatus, PluginHookId, type PluginHookResult, type PluginHostServices, type PluginInteractiveLogger, type PluginInvocationContext, type PluginLifecycleDispatchResult, type PluginLifecycleHook, type PluginLifecycleOutcome, PluginLifecyclePolicy, PluginLifecycleStatus, type PluginLogEntry, type PluginLogQueryRequest, type PluginLogQueryResult, type PluginLogService, type PluginLogger, type PluginProcessApi, type PluginProcessResult, type PluginProcessRunOptions, type PluginProject, type PluginPromptApi, type PluginPromptChoice, type PluginPromptQuestion, type PluginPromptType, type PluginPromptViewRequest, type PluginRepository, PluginRepositoryStatus, type PluginSetupHooks, PluginSharedChangeKind, type PluginSharedChanges, type PluginStatusCatalogEntry, type PluginStatusContribution, type PluginStatusDefinition, type PluginStoreApi, type PluginSystemContextService, type PluginTaskDescriptor, type PluginTaskResult, type PluginTaskService, type PluginToastApi, type PluginToastLevel, type PluginToastOptions, type PluginToolContribution, PluginToolsService, type PluginViewCatalogEntry, type PluginViewContribution, type PluginViewDefinition, PluginViewLayout, type PluginViewRequest, type PluginWorkspace, RoleToolEnvironment, RoleToolsApplied, RoleToolsProposal, type WorkbasePluginDefinition, roleToolEnvironmentSchema, roleToolsAppliedSchema, roleToolsProposalSchema };
|
|
9
|
+
export { type DefinedWorkbasePlugin, type PluginAgentContextCatalogEntry, type PluginAgentContextContribution, type PluginAgentContextDefinition, type PluginAgentPolicy, type PluginCapabilityCatalog, type PluginCapabilityCommandRequest, type PluginCapabilityResolveRequest, type PluginCapabilityService, type PluginColoredMessage, type PluginCommandArgument, type PluginCommandCatalogEntry, PluginCommandCategory, type PluginCommandContext, type PluginCommandContribution, type PluginCommandDefinition, type PluginCommandDetails, PluginCommandEffect, PluginCommandExecutionMode, type PluginCommandExecutionResult, type PluginCommandOption, PluginCommandTransaction, type PluginConfigApi, type PluginContext, PluginContextExposure, type PluginContributionSnapshot, type PluginDisposable, type PluginExecutionService, type PluginExecutionSnapshot, PluginExecutionStatus, type PluginFileChange, PluginHookId, type PluginHookResult, type PluginHostServices, type PluginInteractiveLogger, type PluginInvocationContext, type PluginLifecycleDispatchResult, type PluginLifecycleHook, type PluginLifecycleOutcome, PluginLifecyclePolicy, PluginLifecycleStatus, type PluginLogEntry, type PluginLogQueryRequest, type PluginLogQueryResult, type PluginLogService, type PluginLogger, type PluginProcessApi, type PluginProcessResult, type PluginProcessRunOptions, type PluginProject, type PluginPromptApi, type PluginPromptChoice, type PluginPromptQuestion, type PluginPromptType, type PluginPromptViewRequest, type PluginRepository, PluginRepositoryStatus, type PluginSetupHooks, PluginSharedChangeKind, type PluginSharedChanges, type PluginStatusCatalogEntry, type PluginStatusContribution, type PluginStatusDefinition, type PluginStoreApi, type PluginSystemContextService, type PluginTaskDescriptor, type PluginTaskResult, type PluginTaskService, type PluginToastApi, type PluginToastLevel, type PluginToastOptions, type PluginToolContribution, PluginToolsService, type PluginViewCatalogEntry, type PluginViewContribution, type PluginViewDefinition, PluginViewLayout, type PluginViewRequest, type PluginWorkspace, RoleToolEnvironment, RoleToolsApplied, RoleToolsProposal, type WorkbasePluginDefinition, roleToolEnvironmentSchema, roleToolsAppliedSchema, roleToolsProposalSchema };
|
|
@@ -168,6 +168,8 @@ interface PluginStoreApi {
|
|
|
168
168
|
readonly subscribe: (listener: () => void) => () => void;
|
|
169
169
|
}
|
|
170
170
|
interface PluginConfigApi {
|
|
171
|
+
/** Reads the current project config without changing the initialization snapshot. */
|
|
172
|
+
readonly read: () => Promise<Readonly<Record<string, unknown>>>;
|
|
171
173
|
readonly patch: (patch: Readonly<Record<string, unknown>>) => Promise<Readonly<Record<string, unknown>>>;
|
|
172
174
|
readonly replace: (config: Readonly<Record<string, unknown>>) => Promise<Readonly<Record<string, unknown>>>;
|
|
173
175
|
}
|
|
@@ -403,6 +405,7 @@ interface PluginRepository {
|
|
|
403
405
|
readonly branch: string;
|
|
404
406
|
readonly id: string;
|
|
405
407
|
readonly label: string;
|
|
408
|
+
readonly description?: string | null;
|
|
406
409
|
readonly root: string;
|
|
407
410
|
readonly status: PluginRepositoryStatus;
|
|
408
411
|
}
|
|
@@ -557,6 +560,7 @@ interface PluginToolContribution {
|
|
|
557
560
|
readonly version?: string;
|
|
558
561
|
}
|
|
559
562
|
interface PluginLifecycleOutcome {
|
|
563
|
+
readonly fileChanges?: readonly PluginFileChange[];
|
|
560
564
|
readonly code: string | null;
|
|
561
565
|
readonly details: unknown | null;
|
|
562
566
|
readonly durationMilliseconds: number;
|
|
@@ -570,6 +574,8 @@ interface PluginLifecycleOutcome {
|
|
|
570
574
|
readonly warnings: readonly string[];
|
|
571
575
|
}
|
|
572
576
|
interface PluginHookResult {
|
|
577
|
+
/** WorkspaceProvision only: proposed project files, applied by the host after preparation. */
|
|
578
|
+
readonly fileChanges?: readonly PluginFileChange[];
|
|
573
579
|
readonly standardError?: string;
|
|
574
580
|
readonly standardOutput?: string;
|
|
575
581
|
readonly warnings?: readonly string[];
|
|
@@ -579,6 +585,12 @@ interface PluginLifecycleDispatchResult {
|
|
|
579
585
|
readonly outcomes: readonly PluginLifecycleOutcome[];
|
|
580
586
|
readonly policy: PluginLifecyclePolicy;
|
|
581
587
|
}
|
|
588
|
+
/** Compare-and-set text changes relative to project.workbaseRoot, bounded by the project root. */
|
|
589
|
+
interface PluginFileChange {
|
|
590
|
+
readonly path: string;
|
|
591
|
+
readonly before: string | null;
|
|
592
|
+
readonly after: string | null;
|
|
593
|
+
}
|
|
582
594
|
interface PluginLifecycleHook {
|
|
583
595
|
readonly tap: (name: string, handler: (payload: unknown, context: PluginInvocationContext) => void | PluginHookResult | Promise<void | PluginHookResult>) => void;
|
|
584
596
|
}
|
|
@@ -637,4 +649,4 @@ interface PluginContributionSnapshot {
|
|
|
637
649
|
readonly views: readonly PluginViewContribution[];
|
|
638
650
|
}
|
|
639
651
|
//#endregion
|
|
640
|
-
export {
|
|
652
|
+
export { PluginCapabilityService as $, PluginProcessApi as A, roleToolsAppliedSchema as At, PluginStatusDefinition as B, PluginInvocationContext as C, PluginToastOptions as Ct, PluginLifecyclePolicy as D, RoleToolsApplied as Dt, PluginLifecycleOutcome as E, RoleToolEnvironment as Et, PluginRepositoryStatus as F, PluginViewRequest as G, PluginViewContribution as H, PluginSetupHooks as I, PluginAgentContextCatalogEntry as J, PluginWorkspace as K, PluginSharedChangeKind as L, PluginProcessRunOptions as M, PluginProject as N, PluginLifecycleStatus as O, RoleToolsProposal as Ot, PluginRepository as P, PluginCapabilityResolveRequest as Q, PluginSharedChanges as R, PluginHookResult as S, PluginToastLevel as St, PluginLifecycleHook as T, PluginToolsService as Tt, PluginViewDefinition as U, PluginToolContribution as V, PluginViewLayout as W, PluginCapabilityCatalog as X, PluginAgentPolicy as Y, PluginCapabilityCommandRequest as Z, PluginDisposable as _, PluginSystemContextService as _t, PluginCommandContext as a, PluginInteractiveLogger as at, PluginFileChange as b, PluginTaskService as bt, PluginCommandDetails as c, PluginLogQueryResult as ct, PluginCommandExecutionResult as d, PluginPromptChoice as dt, PluginColoredMessage as et, PluginCommandOption as f, PluginPromptQuestion as ft, PluginContributionSnapshot as g, PluginStoreApi as gt, PluginContextExposure as h, PluginStatusCatalogEntry as ht, PluginCommandCategory as i, PluginHostServices as it, PluginProcessResult as j, roleToolsProposalSchema as jt, PluginLogger as k, roleToolEnvironmentSchema as kt, PluginCommandEffect as l, PluginLogService as lt, PluginContext as m, PluginPromptViewRequest as mt, PluginAgentContextDefinition as n, PluginConfigApi as nt, PluginCommandContribution as o, PluginLogEntry as ot, PluginCommandTransaction as p, PluginPromptType as pt, WorkbasePluginDefinition as q, PluginCommandArgument as r, PluginExecutionService as rt, PluginCommandDefinition as s, PluginLogQueryRequest as st, PluginAgentContextContribution as t, PluginCommandCatalogEntry as tt, PluginCommandExecutionMode as u, PluginPromptApi as ut, PluginExecutionSnapshot as v, PluginTaskDescriptor as vt, PluginLifecycleDispatchResult as w, PluginViewCatalogEntry as wt, PluginHookId as x, PluginToastApi as xt, PluginExecutionStatus as y, PluginTaskResult as yt, PluginStatusContribution as z };
|
package/dist/ui/index.css
CHANGED
|
@@ -247,3 +247,141 @@ h2 {
|
|
|
247
247
|
.maintenance-panel .mantine-Accordion-control { padding: 11px 14px; font-size: 13px; }
|
|
248
248
|
.error-message, .notice-card { margin: 12px 0 0; }
|
|
249
249
|
}
|
|
250
|
+
|
|
251
|
+
/** Shared configuration workbench: navigation, reading and explicit editing. */
|
|
252
|
+
[hidden] { display: none !important; }
|
|
253
|
+
.configuration-toolbar, .configuration-toolbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
254
|
+
.configuration-page-tabs { display: flex; gap: 4px; width: fit-content; padding: 4px; border-radius: 8px; background: var(--color-surface-muted); }
|
|
255
|
+
.configuration-page-tabs button { border: 0; border-radius: 5px; background: transparent; padding: 8px 14px; color: var(--color-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
|
|
256
|
+
.configuration-page-tabs button[aria-pressed="true"] { color: var(--color-foreground); background: var(--color-surface); box-shadow: 0 1px 3px #342f2812; }
|
|
257
|
+
.configuration-page-tabs button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
|
|
258
|
+
.configuration-manager { min-width: 0; font-size: 13px; line-height: 1.6; }
|
|
259
|
+
.configuration-view { min-width: 0; }
|
|
260
|
+
.configuration-manager ::selection { color: var(--color-primary-foreground); background: var(--color-primary); }
|
|
261
|
+
.configuration-manager :is(input, textarea) { caret-color: var(--color-brand); }
|
|
262
|
+
.configuration-manager :is(pre, .configuration-items) { scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
|
|
263
|
+
.configuration-navigation { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--color-border); }
|
|
264
|
+
.configuration-tabs { display: flex; align-self: stretch; min-width: 0; gap: 24px; overflow-x: auto; }
|
|
265
|
+
.configuration-tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; padding: 11px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--color-muted); font: inherit; font-weight: 500; cursor: pointer; }
|
|
266
|
+
.configuration-tabs button[aria-pressed="true"] { color: var(--color-foreground); border-bottom-color: var(--color-brand-gold); }
|
|
267
|
+
.configuration-tabs button:hover { color: var(--color-foreground); }
|
|
268
|
+
.configuration-tabs button span { color: var(--color-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
|
|
269
|
+
.configuration-tabs button:disabled { cursor: default; }
|
|
270
|
+
.configuration-manager :is(button, input, select, textarea, summary, pre):focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
|
|
271
|
+
.configuration-manager .configuration-resource-grid { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: stretch; min-height: 540px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
|
|
272
|
+
.configuration-list { min-width: 0; padding: 20px 12px 12px; border-right: 1px solid var(--color-border); border-radius: 10px 0 0 10px; background: var(--color-surface-raised); }
|
|
273
|
+
.configuration-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 16px; }
|
|
274
|
+
.configuration-manager .configuration-list-heading h2 { margin: 0; font-size: 13px; font-weight: 600; }
|
|
275
|
+
.configuration-search { width: 100%; min-height: 36px; min-width: 0; padding: 7px 10px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); color: var(--color-foreground); font: inherit; font-size: 12px; }
|
|
276
|
+
.configuration-search::placeholder, .configuration-field :is(input, textarea)::placeholder { color: var(--color-tertiary); opacity: 1; }
|
|
277
|
+
.configuration-items { display: grid; align-content: start; gap: 4px; padding-top: 12px; max-height: 600px; overflow: auto; }
|
|
278
|
+
.configuration-row { display: grid; gap: 5px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 6px; text-align: left; color: inherit; background: transparent; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
|
|
279
|
+
.configuration-row strong { font-size: 13px; font-weight: 600; line-height: 1.5; }
|
|
280
|
+
.configuration-row span { color: var(--color-muted); font-size: 11px; line-height: 1.5; }
|
|
281
|
+
.configuration-row:hover { background: var(--color-surface-muted); }
|
|
282
|
+
.configuration-row[aria-current="true"] { border-color: var(--color-border); background: var(--color-surface); }
|
|
283
|
+
.configuration-row[aria-current="true"] strong { color: var(--color-brand-deep); }
|
|
284
|
+
.configuration-row:disabled { cursor: default; }
|
|
285
|
+
.configuration-row:disabled:not([aria-current="true"]) { opacity: .6; }
|
|
286
|
+
.configuration-manager .configuration-list-footer { display: flex; justify-content: flex-start; margin: 16px 4px 0; padding-top: 16px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: 12px; line-height: 1.7; }
|
|
287
|
+
.configuration-detail { display: flex; flex-direction: column; min-width: 0; }
|
|
288
|
+
.configuration-detail-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 26px 32px 22px; border-bottom: 1px solid var(--color-border); }
|
|
289
|
+
.configuration-detail-header.is-editing { position: sticky; top: 0; z-index: 2; background: var(--color-surface); }
|
|
290
|
+
.configuration-header-feedback { flex-basis: 100%; display: grid; gap: 12px; }
|
|
291
|
+
.configuration-manager .configuration-header-feedback p { margin: 0; font-size: 12px; }
|
|
292
|
+
.configuration-header-feedback .mantine-Alert-root { margin: 0; }
|
|
293
|
+
.configuration-detail-header > div { min-width: 0; }
|
|
294
|
+
.configuration-manager .configuration-detail-header h2 { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
|
|
295
|
+
.configuration-manager .configuration-detail-header p { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; color: var(--color-muted); font-size: 12px; }
|
|
296
|
+
.configuration-detail-header code { font-size: 11px; overflow-wrap: anywhere; }
|
|
297
|
+
.configuration-mode { padding-left: 10px; border-left: 1px solid var(--color-border-strong); }
|
|
298
|
+
.configuration-detail-body { flex: 1; min-width: 0; padding: 28px 32px 32px; }
|
|
299
|
+
.configuration-section + .configuration-section, .configuration-section + .configuration-disclosure { margin-top: 28px; }
|
|
300
|
+
.configuration-manager .configuration-section h3, .configuration-tasks legend { margin: 0 0 14px; color: var(--color-foreground); font-size: 14px; font-weight: 600; line-height: 1.5; }
|
|
301
|
+
.configuration-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
|
|
302
|
+
.configuration-manager .configuration-section-heading h3 { margin: 0; }
|
|
303
|
+
.configuration-manager .configuration-notice { margin: 0; color: var(--color-muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
|
|
304
|
+
.configuration-items > .configuration-notice { padding: 12px 4px; }
|
|
305
|
+
.configuration-manager .configuration-feedback { margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 6px; color: var(--color-foreground); background: var(--color-surface-raised); font-size: 13px; }
|
|
306
|
+
.configuration-manager .mantine-Alert-root { margin-bottom: 16px; }
|
|
307
|
+
.configuration-reading { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 32px; color: var(--color-muted); font-size: 12px; border-bottom: 1px solid var(--color-border); }
|
|
308
|
+
.configuration-empty { margin: auto; max-width: 480px; padding: 48px 32px; }
|
|
309
|
+
.configuration-manager .configuration-empty h2 { margin: 0 0 12px; font-size: 20px; font-weight: 600; }
|
|
310
|
+
.configuration-manager .configuration-empty p { margin: 8px 0 0; color: var(--color-muted); font-size: 13px; line-height: 1.8; }
|
|
311
|
+
.configuration-loading { padding: 32px; color: var(--color-muted); }
|
|
312
|
+
.configuration-field { display: grid; align-content: start; gap: 8px; min-width: 0; font-size: 13px; font-weight: 500; }
|
|
313
|
+
.configuration-field + .configuration-field, .configuration-fields + .configuration-field { margin-top: 16px; }
|
|
314
|
+
.configuration-notice + .configuration-field { margin-top: 16px; }
|
|
315
|
+
.configuration-field :is(input, select, textarea), .configuration-file-picker select { width: 100%; min-width: 0; padding: 10px 12px; color: var(--color-foreground); background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: 6px; font: inherit; font-weight: 400; line-height: 1.6; }
|
|
316
|
+
.configuration-field :is(input, select) { min-height: 40px; }
|
|
317
|
+
.configuration-field input[readonly] { color: var(--color-muted); background: var(--color-surface-raised); }
|
|
318
|
+
.configuration-field textarea { line-height: 1.8; resize: vertical; }
|
|
319
|
+
.configuration-field .configuration-code-editor { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.75; tab-size: 2; }
|
|
320
|
+
.configuration-hint { color: var(--color-muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
|
|
321
|
+
.configuration-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
|
|
322
|
+
.configuration-fields > .configuration-field { margin: 0; }
|
|
323
|
+
.configuration-form { display: flex; flex: 1; flex-direction: column; min-width: 0; }
|
|
324
|
+
.configuration-form > fieldset { min-width: 0; border: 0; margin: 0; }
|
|
325
|
+
.configuration-document-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--color-border); color: var(--color-muted); font-size: 12px; overflow-wrap: anywhere; }
|
|
326
|
+
.configuration-document-bar > span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
|
|
327
|
+
.configuration-file-picker { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
|
|
328
|
+
.configuration-file-picker select { width: auto; font-size: 12px; padding: 6px 8px; }
|
|
329
|
+
.configuration-manager .configuration-content { max-height: 520px; margin: 0; padding: 20px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface-raised); white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.8; }
|
|
330
|
+
.configuration-manager .configuration-prose { max-width: 72ch; color: var(--color-foreground); font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
|
|
331
|
+
.configuration-manager .configuration-prose :is(h1, h2, h3, h4) { margin: 28px 0 12px; line-height: 1.5; font-weight: 600; }
|
|
332
|
+
.configuration-manager .configuration-prose h1 { font-size: 22px; }
|
|
333
|
+
.configuration-manager .configuration-prose h2 { font-size: 18px; }
|
|
334
|
+
.configuration-manager .configuration-prose :is(h3, h4) { font-size: 15px; }
|
|
335
|
+
.configuration-manager .configuration-prose > :first-child { margin-top: 0; }
|
|
336
|
+
.configuration-manager .configuration-prose > :last-child { margin-bottom: 0; }
|
|
337
|
+
.configuration-manager .configuration-prose p { margin: 12px 0; }
|
|
338
|
+
.configuration-prose :is(ul, ol) { margin: 12px 0; padding-left: 22px; }
|
|
339
|
+
.configuration-prose li + li { margin-top: 5px; }
|
|
340
|
+
.configuration-prose a { color: var(--color-brand); text-underline-offset: 3px; }
|
|
341
|
+
.configuration-prose code { padding: 2px 4px; border-radius: 3px; background: var(--color-surface-muted); font-size: .9em; }
|
|
342
|
+
.configuration-prose pre { max-width: 100%; padding: 16px; overflow-x: auto; background: var(--color-surface-raised); border: 1px solid var(--color-border); border-radius: 6px; }
|
|
343
|
+
.configuration-prose pre code { padding: 0; background: transparent; }
|
|
344
|
+
.configuration-prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 1px solid var(--color-border-strong); color: var(--color-muted); }
|
|
345
|
+
.configuration-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
|
|
346
|
+
.configuration-prose :is(td, th) { padding: 8px 12px; border: 1px solid var(--color-border); text-align: left; }
|
|
347
|
+
.configuration-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: 0; }
|
|
348
|
+
.configuration-facts dt { margin-bottom: 5px; color: var(--color-muted); font-size: 12px; }
|
|
349
|
+
.configuration-facts dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
|
|
350
|
+
.configuration-tasks { min-width: 0; padding: 0; border: 0; }
|
|
351
|
+
.configuration-tasks legend { padding: 0; }
|
|
352
|
+
.configuration-tasks > label { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--color-border); cursor: pointer; overflow-wrap: anywhere; }
|
|
353
|
+
.configuration-tasks input { flex-shrink: 0; width: 16px; height: 16px; margin: 3px 0; accent-color: var(--color-brand); }
|
|
354
|
+
.configuration-tasks label span { display: grid; gap: 3px; }
|
|
355
|
+
.configuration-tasks strong, .configuration-task-list strong { font-size: 13px; font-weight: 500; }
|
|
356
|
+
.configuration-tasks small, .configuration-task-list span { color: var(--color-muted); font-size: 12px; }
|
|
357
|
+
.configuration-task-list { list-style: none; padding: 0; margin: 0; }
|
|
358
|
+
.configuration-task-list li { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
|
|
359
|
+
.configuration-disclosure { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--color-border); }
|
|
360
|
+
.configuration-disclosure summary { width: fit-content; padding: 4px 0; font-size: 13px; font-weight: 500; cursor: pointer; }
|
|
361
|
+
.configuration-disclosure summary span { margin-left: 10px; color: var(--color-muted); font-size: 12px; font-weight: 400; }
|
|
362
|
+
.configuration-disclosure[open] > summary { margin-bottom: 16px; }
|
|
363
|
+
.configuration-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; padding: 16px 24px; border-top: 1px solid var(--color-border); border-radius: 0 0 10px 0; background: var(--color-surface-raised); }
|
|
364
|
+
.configuration-manager .configuration-footer p { flex: 1 1 220px; margin: 0; color: var(--color-muted); font-size: 12px; line-height: 1.6; }
|
|
365
|
+
.configuration-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
|
|
366
|
+
@media (max-width: 900px) {
|
|
367
|
+
.configuration-manager .configuration-resource-grid { grid-template-columns: 200px minmax(0, 1fr); }
|
|
368
|
+
.configuration-detail-header { padding: 22px 24px; }
|
|
369
|
+
.configuration-detail-body { padding: 24px; }
|
|
370
|
+
.configuration-tabs { gap: 18px; }
|
|
371
|
+
}
|
|
372
|
+
@media (max-width: 720px) {
|
|
373
|
+
.configuration-navigation { flex-wrap: wrap; gap: 12px; padding-bottom: 12px; }
|
|
374
|
+
.configuration-tabs { width: 100%; gap: 20px; }
|
|
375
|
+
.configuration-manager .configuration-resource-grid { grid-template-columns: minmax(0, 1fr); }
|
|
376
|
+
.configuration-list { border-right: 0; border-bottom: 1px solid var(--color-border); border-radius: 10px 10px 0 0; }
|
|
377
|
+
.configuration-manager[data-editing="true"] .configuration-list { display: none; }
|
|
378
|
+
.configuration-items { max-height: 176px; }
|
|
379
|
+
.configuration-list-footer { margin-top: 12px; }
|
|
380
|
+
.configuration-detail-header { padding: 20px; gap: 12px; }
|
|
381
|
+
.configuration-detail-body { padding: 24px 20px; }
|
|
382
|
+
.configuration-fields, .configuration-facts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
|
|
383
|
+
.configuration-empty { padding: 36px 20px; }
|
|
384
|
+
.configuration-footer { padding: 16px 20px; border-radius: 0 0 10px 10px; }
|
|
385
|
+
.configuration-actions { margin-left: auto; }
|
|
386
|
+
.configuration-disclosure summary span { display: block; margin: 4px 0 0 16px; }
|
|
387
|
+
}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as PluginCommandExecutionResult, v as PluginExecutionSnapshot } from "../types-
|
|
1
|
+
import { d as PluginCommandExecutionResult, v as PluginExecutionSnapshot } from "../types-BIVvX6Nh.js";
|
|
2
2
|
//#region src/ui/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Browser authoring API and transport contracts for Workbase plugin views.
|
package/dist/ui/model.d.ts
CHANGED
|
@@ -7,6 +7,16 @@ export interface PluginActionOutput {
|
|
|
7
7
|
readonly status: "completed" | "failed";
|
|
8
8
|
readonly title: string;
|
|
9
9
|
}
|
|
10
|
+
export declare enum ConfigurationMode {
|
|
11
|
+
View = "view",
|
|
12
|
+
Edit = "edit",
|
|
13
|
+
Create = "create"
|
|
14
|
+
}
|
|
15
|
+
export declare const TEAM_CONFIGURATION_NOTICE = "保存后将同步到团队工作区,团队成员共享此配置。";
|
|
16
|
+
export declare function configurationSavedMessage(publication: {
|
|
17
|
+
readonly status: "local" | "synced" | "pending";
|
|
18
|
+
readonly warning: string | null;
|
|
19
|
+
}): string;
|
|
10
20
|
export declare function formatActionOutput(title: string, result: unknown, logs: unknown): PluginActionOutput;
|
|
11
21
|
export declare function formatActionError(title: string, error: unknown): PluginActionOutput;
|
|
12
22
|
export declare function readableError(error: unknown, fallback: string): string;
|
package/dist/ui/model.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
//#region src/ui/model.ts
|
|
2
|
+
let ConfigurationMode = /* @__PURE__ */ function(ConfigurationMode) {
|
|
3
|
+
ConfigurationMode["View"] = "view";
|
|
4
|
+
ConfigurationMode["Edit"] = "edit";
|
|
5
|
+
ConfigurationMode["Create"] = "create";
|
|
6
|
+
return ConfigurationMode;
|
|
7
|
+
}({});
|
|
8
|
+
const TEAM_CONFIGURATION_NOTICE = "保存后将同步到团队工作区,团队成员共享此配置。";
|
|
9
|
+
function configurationSavedMessage(publication) {
|
|
10
|
+
if (publication.status === "pending") return `已保存,等待团队同步。${publication.warning ?? "请重试同步。"}`;
|
|
11
|
+
return publication.status === "synced" ? "已保存并同步到团队工作区。" : "已保存到本地项目;连接团队同步后共享。";
|
|
12
|
+
}
|
|
2
13
|
function formatActionOutput(title, result, logs) {
|
|
3
14
|
const logText = formatLogEntries(logs);
|
|
4
15
|
const resultText = formatResult(result);
|
|
@@ -35,4 +46,4 @@ function isRecord(value) {
|
|
|
35
46
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
36
47
|
}
|
|
37
48
|
//#endregion
|
|
38
|
-
export { formatActionError, formatActionOutput, readableError };
|
|
49
|
+
export { ConfigurationMode, TEAM_CONFIGURATION_NOTICE, configurationSavedMessage, formatActionError, formatActionOutput, readableError };
|