@bilig/workbook 0.62.0 → 0.66.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 +37 -6
- package/dist/check.d.ts +1 -1
- package/dist/describe.d.ts +2 -0
- package/dist/describe.js +2 -0
- package/dist/describe.js.map +1 -1
- package/dist/feature-plugin.d.ts +91 -0
- package/dist/feature-plugin.js +315 -0
- package/dist/feature-plugin.js.map +1 -0
- package/dist/features.d.ts +44 -75
- package/dist/features.js +333 -140
- package/dist/features.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +3 -2
- package/dist/input.js +32 -23
- package/dist/input.js.map +1 -1
- package/dist/model.js +25 -6
- package/dist/model.js.map +1 -1
- package/dist/plan-data.d.ts +16 -1
- package/dist/plan-data.js +76 -10
- package/dist/plan-data.js.map +1 -1
- package/dist/requirements.d.ts +19 -0
- package/dist/requirements.js +188 -2
- package/dist/requirements.js.map +1 -1
- package/dist/result.d.ts +3 -1
- package/dist/run.js +5 -1
- package/dist/run.js.map +1 -1
- package/dist/verify.js +2 -2
- package/dist/verify.js.map +1 -1
- package/package.json +3 -3
package/dist/features.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CellRangeRef
|
|
2
|
-
import { type WorkbookActionInput
|
|
1
|
+
import type { CellRangeRef } from '@bilig/protocol';
|
|
2
|
+
import { type WorkbookActionInput } from './input.js';
|
|
3
3
|
import type { EngineOp } from './ops.js';
|
|
4
4
|
import type { WorkbookUndoRef } from './result.js';
|
|
5
5
|
export type WorkbookFeatureId = string;
|
|
@@ -8,18 +8,11 @@ export type WorkbookCommandExecutionMode = 'preview' | 'apply' | 'applyAndVerify
|
|
|
8
8
|
export type WorkbookCommandReceiptStatus = 'previewed' | 'applied' | 'rejected' | 'noop';
|
|
9
9
|
export type WorkbookProjectionInterceptorPoint = 'cellDisplay' | 'cellStyle' | 'rangeChrome' | 'rowVisibility' | 'beforeCommand' | 'commandMetadata';
|
|
10
10
|
export type WorkbookUiContributionSlot = 'toolbar' | 'sidePanel' | 'floatingOverlay' | 'status';
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly featureId: WorkbookFeatureId;
|
|
18
|
-
readonly category: WorkbookCommandCategory;
|
|
19
|
-
readonly label: string;
|
|
20
|
-
readonly description?: string;
|
|
21
|
-
readonly input?: WorkbookActionInputDescription;
|
|
22
|
-
}
|
|
11
|
+
export declare const workbookCommandCategories: readonly ["command", "operation", "mutation"];
|
|
12
|
+
export declare const workbookCommandExecutionModes: readonly ["preview", "apply", "applyAndVerify"];
|
|
13
|
+
export declare const workbookCommandReceiptStatuses: readonly ["previewed", "applied", "rejected", "noop"];
|
|
14
|
+
export declare const workbookProjectionInterceptorPoints: readonly ["cellDisplay", "cellStyle", "rangeChrome", "rowVisibility", "beforeCommand", "commandMetadata"];
|
|
15
|
+
export declare const workbookUiContributionSlots: readonly ["toolbar", "sidePanel", "floatingOverlay", "status"];
|
|
23
16
|
export interface WorkbookCommandRequest {
|
|
24
17
|
readonly featureId: WorkbookFeatureId;
|
|
25
18
|
readonly commandId: string;
|
|
@@ -27,6 +20,20 @@ export interface WorkbookCommandRequest {
|
|
|
27
20
|
readonly mode?: WorkbookCommandExecutionMode;
|
|
28
21
|
readonly input?: WorkbookActionInput;
|
|
29
22
|
}
|
|
23
|
+
export type WorkbookCommandRequestIssueCode = 'invalid_command_request';
|
|
24
|
+
export interface WorkbookCommandRequestIssue {
|
|
25
|
+
readonly code: WorkbookCommandRequestIssueCode;
|
|
26
|
+
readonly path: string;
|
|
27
|
+
readonly message: string;
|
|
28
|
+
}
|
|
29
|
+
export type WorkbookCommandRequestCheckResult = {
|
|
30
|
+
readonly status: 'valid';
|
|
31
|
+
readonly request: WorkbookCommandRequest;
|
|
32
|
+
readonly issues: readonly [];
|
|
33
|
+
} | {
|
|
34
|
+
readonly status: 'invalid';
|
|
35
|
+
readonly issues: readonly WorkbookCommandRequestIssue[];
|
|
36
|
+
};
|
|
30
37
|
export interface WorkbookCommandReceipt {
|
|
31
38
|
readonly status: WorkbookCommandReceiptStatus;
|
|
32
39
|
readonly featureId: WorkbookFeatureId;
|
|
@@ -41,68 +48,30 @@ export interface WorkbookCommandReceipt {
|
|
|
41
48
|
readonly metadata?: WorkbookActionInput;
|
|
42
49
|
readonly errors?: readonly string[];
|
|
43
50
|
}
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
|
|
49
|
-
export interface WorkbookCellStyleProjection {
|
|
50
|
-
readonly style?: CellStylePatch | CellStyleRecord;
|
|
51
|
-
readonly metadata?: WorkbookActionInput;
|
|
52
|
-
}
|
|
53
|
-
export interface WorkbookRangeChromeProjection {
|
|
54
|
-
readonly id: string;
|
|
55
|
-
readonly featureId: WorkbookFeatureId;
|
|
56
|
-
readonly source: 'workbook-metadata' | 'command-preview' | 'runtime';
|
|
57
|
-
readonly range: CellRangeRef;
|
|
58
|
-
readonly role: string;
|
|
59
|
-
readonly label?: string;
|
|
60
|
-
readonly metadata?: WorkbookActionInput;
|
|
61
|
-
}
|
|
62
|
-
export interface WorkbookRowVisibilityProjection {
|
|
63
|
-
readonly hidden?: boolean;
|
|
64
|
-
readonly metadata?: WorkbookActionInput;
|
|
65
|
-
}
|
|
66
|
-
export interface WorkbookCommandMetadataProjection {
|
|
67
|
-
readonly label?: string;
|
|
68
|
-
readonly changedRanges?: readonly CellRangeRef[];
|
|
69
|
-
readonly semanticTargets?: readonly WorkbookActionInput[];
|
|
70
|
-
readonly metadata?: WorkbookActionInput;
|
|
71
|
-
}
|
|
72
|
-
export interface WorkbookProjectionContext {
|
|
73
|
-
readonly featureId: WorkbookFeatureId;
|
|
74
|
-
}
|
|
75
|
-
export interface WorkbookProjectionInterceptorRegistration {
|
|
76
|
-
readonly id: string;
|
|
77
|
-
readonly featureId: WorkbookFeatureId;
|
|
78
|
-
readonly point: WorkbookProjectionInterceptorPoint;
|
|
79
|
-
readonly priority?: number;
|
|
80
|
-
readonly label?: string;
|
|
81
|
-
}
|
|
82
|
-
export interface WorkbookUiContribution {
|
|
83
|
-
readonly id: string;
|
|
84
|
-
readonly featureId: WorkbookFeatureId;
|
|
85
|
-
readonly slot: WorkbookUiContributionSlot;
|
|
86
|
-
readonly label: string;
|
|
87
|
-
readonly order?: number;
|
|
88
|
-
readonly metadata?: WorkbookActionInput;
|
|
89
|
-
}
|
|
90
|
-
export interface WorkbookFeatureRegistration {
|
|
91
|
-
readonly commands: readonly WorkbookCommandDescriptor[];
|
|
92
|
-
readonly projectionInterceptors: readonly WorkbookProjectionInterceptorRegistration[];
|
|
93
|
-
readonly uiContributions: readonly WorkbookUiContribution[];
|
|
94
|
-
}
|
|
95
|
-
export interface WorkbookFeaturePlugin extends WorkbookFeatureRegistration {
|
|
96
|
-
readonly id: WorkbookFeatureId;
|
|
97
|
-
readonly version: string;
|
|
98
|
-
readonly dependsOn?: readonly WorkbookFeatureId[];
|
|
99
|
-
readonly register?: (context: WorkbookFeatureLifecycleContext) => void;
|
|
100
|
-
readonly activate?: (context: WorkbookFeatureLifecycleContext) => void;
|
|
101
|
-
readonly dispose?: (context: WorkbookFeatureLifecycleContext) => void;
|
|
51
|
+
export type WorkbookCommandReceiptIssueCode = 'invalid_command_receipt';
|
|
52
|
+
export interface WorkbookCommandReceiptIssue {
|
|
53
|
+
readonly code: WorkbookCommandReceiptIssueCode;
|
|
54
|
+
readonly path: string;
|
|
55
|
+
readonly message: string;
|
|
102
56
|
}
|
|
57
|
+
export type WorkbookCommandReceiptCheckResult = {
|
|
58
|
+
readonly status: 'valid';
|
|
59
|
+
readonly receipt: WorkbookCommandReceipt;
|
|
60
|
+
readonly issues: readonly [];
|
|
61
|
+
} | {
|
|
62
|
+
readonly status: 'invalid';
|
|
63
|
+
readonly issues: readonly WorkbookCommandReceiptIssue[];
|
|
64
|
+
};
|
|
103
65
|
export declare function normalizeWorkbookFeatureId(value: string, label?: string): WorkbookFeatureId;
|
|
104
|
-
export declare function
|
|
105
|
-
export declare function
|
|
106
|
-
export declare function
|
|
66
|
+
export declare function isWorkbookCommandCategory(value: unknown): value is WorkbookCommandCategory;
|
|
67
|
+
export declare function isWorkbookCommandExecutionMode(value: unknown): value is WorkbookCommandExecutionMode;
|
|
68
|
+
export declare function isWorkbookCommandReceiptStatus(value: unknown): value is WorkbookCommandReceiptStatus;
|
|
69
|
+
export declare function isWorkbookProjectionInterceptorPoint(value: unknown): value is WorkbookProjectionInterceptorPoint;
|
|
70
|
+
export declare function isWorkbookUiContributionSlot(value: unknown): value is WorkbookUiContributionSlot;
|
|
71
|
+
export declare function checkWorkbookCommandRequest(value: unknown): WorkbookCommandRequestCheckResult;
|
|
72
|
+
export declare function normalizeWorkbookCommandRequest(value: unknown): WorkbookCommandRequest;
|
|
73
|
+
export declare function isWorkbookCommandRequest(value: unknown): value is WorkbookCommandRequest;
|
|
74
|
+
export declare function checkWorkbookCommandReceipt(value: unknown): WorkbookCommandReceiptCheckResult;
|
|
75
|
+
export declare function normalizeWorkbookCommandReceipt(receipt: unknown): WorkbookCommandReceipt;
|
|
107
76
|
export declare function isWorkbookCommandReceipt(value: unknown): value is WorkbookCommandReceipt;
|
|
108
77
|
export declare function workbookCommandReceiptOpsMatch(receipt: Pick<WorkbookCommandReceipt, 'previewOps' | 'appliedOps'>): boolean | null;
|