@eclipse-lyra/extension-howto-system 0.0.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/dist/contributions/ai-setup-howto-contributions.d.ts +2 -0
- package/dist/contributions/ai-setup-howto-contributions.d.ts.map +1 -0
- package/dist/contributions/onboarding-howto-contributions.d.ts +2 -0
- package/dist/contributions/onboarding-howto-contributions.d.ts.map +1 -0
- package/dist/howto-contribution.d.ts +78 -0
- package/dist/howto-contribution.d.ts.map +1 -0
- package/dist/howto-extension-8r07TyoY.js +1375 -0
- package/dist/howto-extension-8r07TyoY.js.map +1 -0
- package/dist/howto-extension.d.ts +17 -0
- package/dist/howto-extension.d.ts.map +1 -0
- package/dist/howto-panel.d.ts +56 -0
- package/dist/howto-panel.d.ts.map +1 -0
- package/dist/howto-service.d.ts +45 -0
- package/dist/howto-service.d.ts.map +1 -0
- package/dist/i18n.json.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/package.json +29 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-setup-howto-contributions.d.ts","sourceRoot":"","sources":["../../src/contributions/ai-setup-howto-contributions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding-howto-contributions.d.ts","sourceRoot":"","sources":["../../src/contributions/onboarding-howto-contributions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Contribution } from '@eclipse-lyra/core';
|
|
2
|
+
/**
|
|
3
|
+
* HowTo Contribution System
|
|
4
|
+
*
|
|
5
|
+
* Allows extensions to register step-by-step workflows that guide users
|
|
6
|
+
* through specific processes with pre and post condition checks.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Condition function that checks if a requirement is met or outcome is achieved.
|
|
10
|
+
* Returns a promise that resolves to true if the condition is satisfied.
|
|
11
|
+
*/
|
|
12
|
+
export type ConditionFunction = () => Promise<boolean> | boolean;
|
|
13
|
+
/**
|
|
14
|
+
* A single step in a HowTo workflow
|
|
15
|
+
*/
|
|
16
|
+
export interface HowToStep {
|
|
17
|
+
/** Unique identifier for this step */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Human-readable title of the step */
|
|
20
|
+
title: string;
|
|
21
|
+
/** Detailed description of what the user should do in this step */
|
|
22
|
+
description: string;
|
|
23
|
+
/**
|
|
24
|
+
* Pre-condition check: verifies that requirements are met before this step can be executed.
|
|
25
|
+
* If this returns false, the step cannot be started.
|
|
26
|
+
*/
|
|
27
|
+
preCondition?: ConditionFunction;
|
|
28
|
+
/**
|
|
29
|
+
* Post-condition check: verifies that the step was completed successfully.
|
|
30
|
+
* If this returns false, the step is not considered complete.
|
|
31
|
+
*/
|
|
32
|
+
postCondition?: ConditionFunction;
|
|
33
|
+
/** Optional command to execute when the step is activated */
|
|
34
|
+
command?: string;
|
|
35
|
+
/** Optional command parameters (or function returning params for dynamic values) */
|
|
36
|
+
commandParams?: Record<string, any> | (() => Record<string, any> | Promise<Record<string, any>>);
|
|
37
|
+
/** Whether this step is optional */
|
|
38
|
+
optional?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Context provided to HowTo initialization function
|
|
42
|
+
*/
|
|
43
|
+
export interface HowToContext {
|
|
44
|
+
/** Callback to notify the panel that conditions should be re-checked */
|
|
45
|
+
requestUpdate: () => void;
|
|
46
|
+
/** The contribution ID of this HowTo */
|
|
47
|
+
contributionId: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Initialization function for a HowTo
|
|
51
|
+
* Allows the HowTo to set up its own subscriptions and manage its lifecycle
|
|
52
|
+
*/
|
|
53
|
+
export type HowToInitializeFunction = (context: HowToContext) => (() => void) | void;
|
|
54
|
+
/**
|
|
55
|
+
* A HowTo Contribution defines a complete workflow with multiple steps.
|
|
56
|
+
* Extends Contribution to work with the contribution registry.
|
|
57
|
+
*/
|
|
58
|
+
export interface HowToContribution extends Contribution {
|
|
59
|
+
/** Unique identifier for this HowTo */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Human-readable title of the workflow (can be a function for dynamic values) */
|
|
62
|
+
title: string | (() => string);
|
|
63
|
+
/** Description of what this workflow helps accomplish (can be a function for dynamic values) */
|
|
64
|
+
description?: string | (() => string);
|
|
65
|
+
/** Icon identifier (FontAwesome or custom icon) */
|
|
66
|
+
icon?: string;
|
|
67
|
+
/** List of steps in the workflow */
|
|
68
|
+
steps: HowToStep[];
|
|
69
|
+
/** Optional category for grouping related workflows */
|
|
70
|
+
category?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Optional initialization function that runs when the HowTo is started.
|
|
73
|
+
* Can set up subscriptions, listeners, etc.
|
|
74
|
+
* Should return a cleanup function (optional) that will be called when the HowTo is closed.
|
|
75
|
+
*/
|
|
76
|
+
initialize?: HowToInitializeFunction;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=howto-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"howto-contribution.d.ts","sourceRoot":"","sources":["../src/howto-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IAEX,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IAEd,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC;;;OAGG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC,6DAA6D;I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