@contractspec/example.learning-journey-studio-onboarding 1.57.0 → 1.59.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/.turbo/turbo-build.log +46 -50
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +27 -0
- package/dist/browser/docs/index.js +35 -0
- package/dist/browser/docs/studio-onboarding.docblock.js +35 -0
- package/dist/browser/example.js +32 -0
- package/dist/browser/handlers/demo.handlers.js +107 -0
- package/dist/browser/index.js +393 -0
- package/dist/browser/learning-journey-studio-onboarding.feature.js +50 -0
- package/dist/browser/operations/index.js +201 -0
- package/dist/browser/presentations/index.js +250 -0
- package/dist/browser/tests/operations.test-spec.js +34 -0
- package/dist/browser/track.js +87 -0
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +36 -1
- package/dist/docs/studio-onboarding.docblock.d.ts +2 -1
- package/dist/docs/studio-onboarding.docblock.d.ts.map +1 -0
- package/dist/docs/studio-onboarding.docblock.js +21 -25
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +31 -39
- package/dist/handlers/demo.handlers.d.ts +12 -17
- package/dist/handlers/demo.handlers.d.ts.map +1 -1
- package/dist/handlers/demo.handlers.js +105 -21
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +394 -9
- package/dist/learning-journey-studio-onboarding.feature.d.ts +1 -6
- package/dist/learning-journey-studio-onboarding.feature.d.ts.map +1 -1
- package/dist/learning-journey-studio-onboarding.feature.js +49 -73
- package/dist/node/docs/index.js +35 -0
- package/dist/node/docs/studio-onboarding.docblock.js +35 -0
- package/dist/node/example.js +32 -0
- package/dist/node/handlers/demo.handlers.js +107 -0
- package/dist/node/index.js +393 -0
- package/dist/node/learning-journey-studio-onboarding.feature.js +50 -0
- package/dist/node/operations/index.js +201 -0
- package/dist/node/presentations/index.js +250 -0
- package/dist/node/tests/operations.test-spec.js +34 -0
- package/dist/node/track.js +87 -0
- package/dist/operations/index.d.ts +229 -236
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +193 -167
- package/dist/operations/index.test.d.ts +2 -0
- package/dist/operations/index.test.d.ts.map +1 -0
- package/dist/presentations/index.d.ts +3 -8
- package/dist/presentations/index.d.ts.map +1 -1
- package/dist/presentations/index.js +248 -54
- package/dist/tests/operations.test-spec.d.ts +1 -6
- package/dist/tests/operations.test-spec.d.ts.map +1 -1
- package/dist/tests/operations.test-spec.js +33 -34
- package/dist/track.d.ts +3 -7
- package/dist/track.d.ts.map +1 -1
- package/dist/track.js +87 -90
- package/package.json +118 -34
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -50
- package/dist/docs/studio-onboarding.docblock.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/demo.handlers.js.map +0 -1
- package/dist/learning-journey-studio-onboarding.feature.js.map +0 -1
- package/dist/operations/index.js.map +0 -1
- package/dist/presentations/index.js.map +0 -1
- package/dist/tests/operations.test-spec.js.map +0 -1
- package/dist/track.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,24 +1,108 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/track.ts
|
|
3
|
+
var studioGettingStartedTrack = {
|
|
4
|
+
id: "studio_getting_started",
|
|
5
|
+
productId: "contractspec-studio",
|
|
6
|
+
name: "Studio Getting Started",
|
|
7
|
+
description: "First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.",
|
|
8
|
+
targetUserSegment: "new_studio_user",
|
|
9
|
+
targetRole: "developer",
|
|
10
|
+
totalXp: 110,
|
|
11
|
+
streakRule: { hoursWindow: 48, bonusXp: 25 },
|
|
12
|
+
completionRewards: { xpBonus: 25, badgeKey: "studio_first_30m" },
|
|
13
|
+
steps: [
|
|
14
|
+
{
|
|
15
|
+
id: "choose_template",
|
|
16
|
+
title: "Choose a template",
|
|
17
|
+
description: "Create your first Studio project (starter template).",
|
|
18
|
+
order: 1,
|
|
19
|
+
completion: {
|
|
20
|
+
eventName: "studio.template.instantiated",
|
|
21
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
22
|
+
},
|
|
23
|
+
xpReward: 20,
|
|
24
|
+
metadata: { surface: "projects" }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "edit_spec",
|
|
28
|
+
title: "Edit the spec",
|
|
29
|
+
description: "Change the spec (not generated code) and save.",
|
|
30
|
+
instructions: "Open spec editor, tweak a contract or presentation, save.",
|
|
31
|
+
order: 2,
|
|
32
|
+
completion: {
|
|
33
|
+
eventName: "spec.changed",
|
|
34
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
35
|
+
},
|
|
36
|
+
xpReward: 20,
|
|
37
|
+
metadata: { surface: "spec-editor" }
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "regenerate_app",
|
|
41
|
+
title: "Regenerate the app",
|
|
42
|
+
description: "Regenerate artifacts from the updated spec.",
|
|
43
|
+
order: 3,
|
|
44
|
+
completion: {
|
|
45
|
+
eventName: "regeneration.completed",
|
|
46
|
+
sourceModule: "@contractspec/lib.contracts/regenerator"
|
|
47
|
+
},
|
|
48
|
+
xpReward: 20,
|
|
49
|
+
metadata: { surface: "regenerator" }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "open_canvas",
|
|
53
|
+
title: "Open the canvas",
|
|
54
|
+
description: "Visit the canvas module for your project.",
|
|
55
|
+
order: 4,
|
|
56
|
+
completion: {
|
|
57
|
+
eventName: "module.navigated",
|
|
58
|
+
sourceModule: "@contractspec/bundle.studio",
|
|
59
|
+
payloadFilter: { moduleId: "canvas" }
|
|
60
|
+
},
|
|
61
|
+
xpReward: 20,
|
|
62
|
+
metadata: { surface: "canvas" }
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "try_evolution_mode",
|
|
66
|
+
title: "Try evolution mode",
|
|
67
|
+
description: "Request a change via Evolution, then regenerate.",
|
|
68
|
+
order: 5,
|
|
69
|
+
completion: {
|
|
70
|
+
eventName: "studio.evolution.applied",
|
|
71
|
+
sourceModule: "@contractspec/lib.evolution"
|
|
72
|
+
},
|
|
73
|
+
xpReward: 30,
|
|
74
|
+
metadata: { surface: "evolution" }
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
metadata: {
|
|
78
|
+
persona: "first_run",
|
|
79
|
+
surfacedIn: ["studio/home", "studio/sidebar/learning"]
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
var studioLearningTracks = [
|
|
83
|
+
studioGettingStartedTrack
|
|
84
|
+
];
|
|
2
85
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
86
|
+
// src/handlers/demo.handlers.ts
|
|
87
|
+
var studioOnboardingEvents = [
|
|
88
|
+
"studio.template.instantiated",
|
|
89
|
+
"spec.changed",
|
|
90
|
+
"regeneration.completed",
|
|
91
|
+
"playground.session.started",
|
|
92
|
+
"studio.evolution.applied"
|
|
10
93
|
];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
94
|
+
var emitStudioOnboardingEvent = (eventName, { learnerId, occurredAt = new Date }, record) => {
|
|
95
|
+
const event = {
|
|
96
|
+
learnerId,
|
|
97
|
+
name: eventName,
|
|
98
|
+
occurredAt,
|
|
99
|
+
trackId: studioGettingStartedTrack.id
|
|
100
|
+
};
|
|
101
|
+
return record ? record(event) : event;
|
|
102
|
+
};
|
|
103
|
+
var emitAllStudioOnboardingEvents = (params, record) => studioOnboardingEvents.map((name) => emitStudioOnboardingEvent(name, params, record));
|
|
104
|
+
export {
|
|
105
|
+
studioOnboardingEvents,
|
|
106
|
+
emitStudioOnboardingEvent,
|
|
107
|
+
emitAllStudioOnboardingEvents
|
|
19
108
|
};
|
|
20
|
-
const emitAllStudioOnboardingEvents = (params, record) => studioOnboardingEvents.map((name) => emitStudioOnboardingEvent(name, params, record));
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
export { emitAllStudioOnboardingEvents, emitStudioOnboardingEvent, studioOnboardingEvents };
|
|
24
|
-
//# sourceMappingURL=demo.handlers.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
1
|
+
export * from './track';
|
|
2
|
+
export * from './docs';
|
|
3
|
+
export * from './operations';
|
|
4
|
+
export * from './handlers/demo.handlers';
|
|
5
|
+
export * from './presentations';
|
|
6
|
+
export * from './learning-journey-studio-onboarding.feature';
|
|
7
|
+
export { default as example } from './example';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,394 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/docs/studio-onboarding.docblock.ts
|
|
3
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts";
|
|
4
|
+
var studioOnboardingDocBlocks = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs.learning-journey.studio-onboarding",
|
|
7
|
+
title: "Learning Journey \u2014 Studio Getting Started",
|
|
8
|
+
summary: "Track that guides a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/learning-journey/studio-onboarding",
|
|
12
|
+
tags: ["learning", "onboarding", "studio"],
|
|
13
|
+
body: `## Track
|
|
14
|
+
- **Key**: \`studio_getting_started\`
|
|
15
|
+
- **Persona**: new Studio developer, first 30 minutes
|
|
16
|
+
- **Goal**: instantiate template \u2192 edit spec \u2192 regenerate \u2192 play \u2192 run evolution
|
|
17
|
+
|
|
18
|
+
## Steps & Events
|
|
19
|
+
1) \`choose_template\` \u2192 event \`studio.template.instantiated\`
|
|
20
|
+
2) \`edit_spec\` \u2192 event \`spec.changed\` (scope: sandbox)
|
|
21
|
+
3) \`regenerate_app\` \u2192 event \`regeneration.completed\`
|
|
22
|
+
4) \`play_in_playground\` \u2192 event \`playground.session.started\`
|
|
23
|
+
5) \`try_evolution_mode\` \u2192 event \`studio.evolution.applied\`
|
|
24
|
+
|
|
25
|
+
XP: 20/20/20/20/30 with bonus 25 XP if completed within 48h (streak rule). Badge: \`studio_first_30m\`.
|
|
26
|
+
|
|
27
|
+
## Wiring
|
|
28
|
+
- Tracks export from \`@contractspec/example.learning-journey-studio-onboarding/track\`.
|
|
29
|
+
- Use onboarding API:
|
|
30
|
+
- \`learning.onboarding.listTracks\` to surface catalog
|
|
31
|
+
- \`learning.onboarding.getProgress\` to render progress
|
|
32
|
+
- \`learning.onboarding.recordEvent\` to advance from bus events
|
|
33
|
+
- Events should be emitted by Studio surfaces (template creation, spec save, regeneration, playground session start, evolution apply).`
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
registerDocBlocks(studioOnboardingDocBlocks);
|
|
37
|
+
// src/example.ts
|
|
38
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
39
|
+
var example = defineExample({
|
|
40
|
+
meta: {
|
|
41
|
+
key: "learning-journey-studio-onboarding",
|
|
42
|
+
version: "1.0.0",
|
|
43
|
+
title: "Learning Journey \u2014 Studio Getting Started",
|
|
44
|
+
description: "Onboarding track guiding a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.",
|
|
45
|
+
kind: "template",
|
|
46
|
+
visibility: "public",
|
|
47
|
+
stability: "experimental",
|
|
48
|
+
owners: ["@platform.core"],
|
|
49
|
+
tags: ["learning", "onboarding", "studio"]
|
|
50
|
+
},
|
|
51
|
+
docs: {
|
|
52
|
+
rootDocId: "docs.learning-journey.studio-onboarding"
|
|
53
|
+
},
|
|
54
|
+
entrypoints: {
|
|
55
|
+
packageName: "@contractspec/example.learning-journey-studio-onboarding",
|
|
56
|
+
docs: "./docs"
|
|
57
|
+
},
|
|
58
|
+
surfaces: {
|
|
59
|
+
templates: true,
|
|
60
|
+
sandbox: { enabled: true, modes: ["playground", "markdown"] },
|
|
61
|
+
studio: { enabled: true, installable: true },
|
|
62
|
+
mcp: { enabled: true }
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
var example_default = example;
|
|
66
|
+
|
|
67
|
+
// src/track.ts
|
|
68
|
+
var studioGettingStartedTrack = {
|
|
69
|
+
id: "studio_getting_started",
|
|
70
|
+
productId: "contractspec-studio",
|
|
71
|
+
name: "Studio Getting Started",
|
|
72
|
+
description: "First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.",
|
|
73
|
+
targetUserSegment: "new_studio_user",
|
|
74
|
+
targetRole: "developer",
|
|
75
|
+
totalXp: 110,
|
|
76
|
+
streakRule: { hoursWindow: 48, bonusXp: 25 },
|
|
77
|
+
completionRewards: { xpBonus: 25, badgeKey: "studio_first_30m" },
|
|
78
|
+
steps: [
|
|
79
|
+
{
|
|
80
|
+
id: "choose_template",
|
|
81
|
+
title: "Choose a template",
|
|
82
|
+
description: "Create your first Studio project (starter template).",
|
|
83
|
+
order: 1,
|
|
84
|
+
completion: {
|
|
85
|
+
eventName: "studio.template.instantiated",
|
|
86
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
87
|
+
},
|
|
88
|
+
xpReward: 20,
|
|
89
|
+
metadata: { surface: "projects" }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: "edit_spec",
|
|
93
|
+
title: "Edit the spec",
|
|
94
|
+
description: "Change the spec (not generated code) and save.",
|
|
95
|
+
instructions: "Open spec editor, tweak a contract or presentation, save.",
|
|
96
|
+
order: 2,
|
|
97
|
+
completion: {
|
|
98
|
+
eventName: "spec.changed",
|
|
99
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
100
|
+
},
|
|
101
|
+
xpReward: 20,
|
|
102
|
+
metadata: { surface: "spec-editor" }
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "regenerate_app",
|
|
106
|
+
title: "Regenerate the app",
|
|
107
|
+
description: "Regenerate artifacts from the updated spec.",
|
|
108
|
+
order: 3,
|
|
109
|
+
completion: {
|
|
110
|
+
eventName: "regeneration.completed",
|
|
111
|
+
sourceModule: "@contractspec/lib.contracts/regenerator"
|
|
112
|
+
},
|
|
113
|
+
xpReward: 20,
|
|
114
|
+
metadata: { surface: "regenerator" }
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "open_canvas",
|
|
118
|
+
title: "Open the canvas",
|
|
119
|
+
description: "Visit the canvas module for your project.",
|
|
120
|
+
order: 4,
|
|
121
|
+
completion: {
|
|
122
|
+
eventName: "module.navigated",
|
|
123
|
+
sourceModule: "@contractspec/bundle.studio",
|
|
124
|
+
payloadFilter: { moduleId: "canvas" }
|
|
125
|
+
},
|
|
126
|
+
xpReward: 20,
|
|
127
|
+
metadata: { surface: "canvas" }
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "try_evolution_mode",
|
|
131
|
+
title: "Try evolution mode",
|
|
132
|
+
description: "Request a change via Evolution, then regenerate.",
|
|
133
|
+
order: 5,
|
|
134
|
+
completion: {
|
|
135
|
+
eventName: "studio.evolution.applied",
|
|
136
|
+
sourceModule: "@contractspec/lib.evolution"
|
|
137
|
+
},
|
|
138
|
+
xpReward: 30,
|
|
139
|
+
metadata: { surface: "evolution" }
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
metadata: {
|
|
143
|
+
persona: "first_run",
|
|
144
|
+
surfacedIn: ["studio/home", "studio/sidebar/learning"]
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
var studioLearningTracks = [
|
|
148
|
+
studioGettingStartedTrack
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
// src/handlers/demo.handlers.ts
|
|
152
|
+
var studioOnboardingEvents = [
|
|
153
|
+
"studio.template.instantiated",
|
|
154
|
+
"spec.changed",
|
|
155
|
+
"regeneration.completed",
|
|
156
|
+
"playground.session.started",
|
|
157
|
+
"studio.evolution.applied"
|
|
158
|
+
];
|
|
159
|
+
var emitStudioOnboardingEvent = (eventName, { learnerId, occurredAt = new Date }, record) => {
|
|
160
|
+
const event = {
|
|
161
|
+
learnerId,
|
|
162
|
+
name: eventName,
|
|
163
|
+
occurredAt,
|
|
164
|
+
trackId: studioGettingStartedTrack.id
|
|
165
|
+
};
|
|
166
|
+
return record ? record(event) : event;
|
|
167
|
+
};
|
|
168
|
+
var emitAllStudioOnboardingEvents = (params, record) => studioOnboardingEvents.map((name) => emitStudioOnboardingEvent(name, params, record));
|
|
169
|
+
|
|
170
|
+
// src/operations/index.ts
|
|
171
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
172
|
+
import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
|
|
173
|
+
var OWNERS = ["examples.learning-journey.studio-onboarding"];
|
|
174
|
+
var StepModel = defineSchemaModel({
|
|
175
|
+
name: "StudioOnboardingStep",
|
|
176
|
+
description: "Step metadata for Studio onboarding journey",
|
|
177
|
+
fields: {
|
|
178
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
179
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
180
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
181
|
+
completionEvent: {
|
|
182
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
183
|
+
isOptional: false
|
|
184
|
+
},
|
|
185
|
+
sourceModule: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
186
|
+
xpReward: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
187
|
+
order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true }
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
var StudioOnboardingTrackModel = defineSchemaModel({
|
|
191
|
+
name: "StudioOnboardingTrack",
|
|
192
|
+
description: "Studio onboarding track definition",
|
|
193
|
+
fields: {
|
|
194
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
195
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
196
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
197
|
+
totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
198
|
+
completionXpBonus: {
|
|
199
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
200
|
+
isOptional: true
|
|
201
|
+
},
|
|
202
|
+
completionBadgeKey: {
|
|
203
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
204
|
+
isOptional: true
|
|
205
|
+
},
|
|
206
|
+
streakHoursWindow: {
|
|
207
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
208
|
+
isOptional: true
|
|
209
|
+
},
|
|
210
|
+
streakBonusXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
211
|
+
steps: { type: StepModel, isArray: true, isOptional: false }
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
var TrackResponseModel = defineSchemaModel({
|
|
215
|
+
name: "StudioOnboardingTrackResponse",
|
|
216
|
+
description: "Response wrapper for studio onboarding track",
|
|
217
|
+
fields: {
|
|
218
|
+
track: { type: StudioOnboardingTrackModel, isOptional: false }
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
var RecordDemoEventInput = defineSchemaModel({
|
|
222
|
+
name: "StudioOnboardingRecordEventInput",
|
|
223
|
+
description: "Emit a demo event to advance Studio onboarding steps",
|
|
224
|
+
fields: {
|
|
225
|
+
learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
226
|
+
eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
227
|
+
payload: { type: ScalarTypeEnum.JSON(), isOptional: true },
|
|
228
|
+
occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
var SuccessModel = defineSchemaModel({
|
|
232
|
+
name: "StudioOnboardingSuccess",
|
|
233
|
+
description: "Generic success response",
|
|
234
|
+
fields: {
|
|
235
|
+
success: { type: ScalarTypeEnum.Boolean(), isOptional: false }
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
var GetStudioOnboardingTrack = defineQuery({
|
|
239
|
+
meta: {
|
|
240
|
+
key: "learningJourney.studioOnboarding.getTrack",
|
|
241
|
+
version: "1.0.0",
|
|
242
|
+
stability: "experimental",
|
|
243
|
+
owners: [...OWNERS],
|
|
244
|
+
tags: ["learning", "onboarding", "studio"],
|
|
245
|
+
description: "Fetch the Studio onboarding track definition.",
|
|
246
|
+
goal: "Expose track metadata to UIs and templates.",
|
|
247
|
+
context: "Called by Studio/Playground to render journey steps."
|
|
248
|
+
},
|
|
249
|
+
io: {
|
|
250
|
+
input: defineSchemaModel({
|
|
251
|
+
name: "StudioOnboardingTrackInput",
|
|
252
|
+
description: "Track input",
|
|
253
|
+
fields: {}
|
|
254
|
+
}),
|
|
255
|
+
output: TrackResponseModel
|
|
256
|
+
},
|
|
257
|
+
policy: { auth: "user" }
|
|
258
|
+
});
|
|
259
|
+
var RecordStudioOnboardingEvent = defineCommand({
|
|
260
|
+
meta: {
|
|
261
|
+
key: "learningJourney.studioOnboarding.recordEvent",
|
|
262
|
+
version: "1.0.0",
|
|
263
|
+
stability: "experimental",
|
|
264
|
+
owners: [...OWNERS],
|
|
265
|
+
tags: ["learning", "onboarding", "studio"],
|
|
266
|
+
description: "Record an event to advance Studio onboarding progress.",
|
|
267
|
+
goal: "Advance steps via domain events in demo/sandbox contexts.",
|
|
268
|
+
context: "Called by handlers or demo scripts to emit step completion events."
|
|
269
|
+
},
|
|
270
|
+
io: {
|
|
271
|
+
input: RecordDemoEventInput,
|
|
272
|
+
output: SuccessModel
|
|
273
|
+
},
|
|
274
|
+
policy: { auth: "user" }
|
|
275
|
+
});
|
|
276
|
+
var studioOnboardingContracts = {
|
|
277
|
+
GetStudioOnboardingTrack,
|
|
278
|
+
RecordStudioOnboardingEvent,
|
|
279
|
+
track: studioGettingStartedTrack
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
// src/presentations/index.ts
|
|
283
|
+
import {
|
|
284
|
+
definePresentation,
|
|
285
|
+
StabilityEnum
|
|
286
|
+
} from "@contractspec/lib.contracts";
|
|
287
|
+
var baseMeta = {
|
|
288
|
+
domain: "learning-journey",
|
|
289
|
+
title: "Studio Onboarding",
|
|
290
|
+
owners: ["@examples.learning-journey.studio-onboarding"],
|
|
291
|
+
tags: ["learning", "onboarding", "studio"],
|
|
292
|
+
stability: StabilityEnum.Experimental
|
|
293
|
+
};
|
|
294
|
+
var StudioOnboardingTrackPresentation = definePresentation({
|
|
295
|
+
meta: {
|
|
296
|
+
key: "learning.journey.studio.track",
|
|
297
|
+
version: "1.0.0",
|
|
298
|
+
description: "Studio onboarding track detail",
|
|
299
|
+
goal: "Visualize the onboarding track for the user.",
|
|
300
|
+
context: "Displayed in the Studio dashboard.",
|
|
301
|
+
...baseMeta
|
|
302
|
+
},
|
|
303
|
+
source: {
|
|
304
|
+
type: "component",
|
|
305
|
+
framework: "react",
|
|
306
|
+
componentKey: "LearningTrackDetail",
|
|
307
|
+
props: StudioOnboardingTrackModel
|
|
308
|
+
},
|
|
309
|
+
targets: ["react", "markdown", "application/json"]
|
|
310
|
+
});
|
|
311
|
+
var StudioOnboardingWidgetPresentation = definePresentation({
|
|
312
|
+
meta: {
|
|
313
|
+
key: "learning.journey.studio.widget",
|
|
314
|
+
version: "1.0.0",
|
|
315
|
+
description: "Compact widget for Studio onboarding progress",
|
|
316
|
+
goal: "Show quick progress summary.",
|
|
317
|
+
context: "Displayed in the Studio sidebar or header.",
|
|
318
|
+
...baseMeta
|
|
319
|
+
},
|
|
320
|
+
source: {
|
|
321
|
+
type: "component",
|
|
322
|
+
framework: "react",
|
|
323
|
+
componentKey: "LearningTrackProgressWidget"
|
|
324
|
+
},
|
|
325
|
+
targets: ["react"]
|
|
326
|
+
});
|
|
327
|
+
var studioOnboardingPresentations = [
|
|
328
|
+
StudioOnboardingTrackPresentation,
|
|
329
|
+
StudioOnboardingWidgetPresentation
|
|
330
|
+
];
|
|
331
|
+
|
|
332
|
+
// src/learning-journey-studio-onboarding.feature.ts
|
|
333
|
+
import { defineFeature } from "@contractspec/lib.contracts";
|
|
334
|
+
var LearningJourneyStudioOnboardingFeature = defineFeature({
|
|
335
|
+
meta: {
|
|
336
|
+
key: "learning-journey-studio-onboarding",
|
|
337
|
+
title: "Learning Journey: Studio Onboarding",
|
|
338
|
+
description: "Studio onboarding journey for getting started with ContractSpec Studio",
|
|
339
|
+
domain: "learning-journey",
|
|
340
|
+
owners: ["@examples.learning-journey.studio-onboarding"],
|
|
341
|
+
tags: ["learning", "onboarding", "studio", "journey"],
|
|
342
|
+
stability: "experimental",
|
|
343
|
+
version: "1.0.0"
|
|
344
|
+
},
|
|
345
|
+
operations: [
|
|
346
|
+
{ key: "learningJourney.studioOnboarding.recordEvent", version: "1.0.0" },
|
|
347
|
+
{ key: "learningJourney.studioOnboarding.getTrack", version: "1.0.0" }
|
|
348
|
+
],
|
|
349
|
+
events: [],
|
|
350
|
+
presentations: [
|
|
351
|
+
{ key: "learning.journey.studio.track", version: "1.0.0" },
|
|
352
|
+
{ key: "learning.journey.studio.widget", version: "1.0.0" }
|
|
353
|
+
],
|
|
354
|
+
opToPresentation: [
|
|
355
|
+
{
|
|
356
|
+
op: {
|
|
357
|
+
key: "learningJourney.studioOnboarding.getTrack",
|
|
358
|
+
version: "1.0.0"
|
|
359
|
+
},
|
|
360
|
+
pres: { key: "learning.journey.studio.track", version: "1.0.0" }
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
presentationsTargets: [
|
|
364
|
+
{
|
|
365
|
+
key: "learning.journey.studio.track",
|
|
366
|
+
version: "1.0.0",
|
|
367
|
+
targets: ["react", "markdown", "application/json"]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
key: "learning.journey.studio.widget",
|
|
371
|
+
version: "1.0.0",
|
|
372
|
+
targets: ["react"]
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
capabilities: {
|
|
376
|
+
requires: [{ key: "identity", version: "1.0.0" }]
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
export {
|
|
380
|
+
studioOnboardingPresentations,
|
|
381
|
+
studioOnboardingEvents,
|
|
382
|
+
studioOnboardingContracts,
|
|
383
|
+
studioLearningTracks,
|
|
384
|
+
studioGettingStartedTrack,
|
|
385
|
+
example_default as example,
|
|
386
|
+
emitStudioOnboardingEvent,
|
|
387
|
+
emitAllStudioOnboardingEvents,
|
|
388
|
+
StudioOnboardingWidgetPresentation,
|
|
389
|
+
StudioOnboardingTrackPresentation,
|
|
390
|
+
StudioOnboardingTrackModel,
|
|
391
|
+
RecordStudioOnboardingEvent,
|
|
392
|
+
LearningJourneyStudioOnboardingFeature,
|
|
393
|
+
GetStudioOnboardingTrack
|
|
394
|
+
};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
2
|
-
|
|
3
|
-
//#region src/learning-journey-studio-onboarding.feature.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Learning Journey Studio Onboarding feature module that bundles
|
|
6
3
|
* Studio-specific onboarding track operations and presentations.
|
|
7
4
|
*/
|
|
8
|
-
declare const LearningJourneyStudioOnboardingFeature:
|
|
9
|
-
//#endregion
|
|
10
|
-
export { LearningJourneyStudioOnboardingFeature };
|
|
5
|
+
export declare const LearningJourneyStudioOnboardingFeature: import("@contractspec/lib.contracts").FeatureModuleSpec;
|
|
11
6
|
//# sourceMappingURL=learning-journey-studio-onboarding.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learning-journey-studio-onboarding.feature.d.ts","
|
|
1
|
+
{"version":3,"file":"learning-journey-studio-onboarding.feature.d.ts","sourceRoot":"","sources":["../src/learning-journey-studio-onboarding.feature.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,eAAO,MAAM,sCAAsC,yDAyDjD,CAAC"}
|