@contractspec/example.learning-journey-studio-onboarding 0.0.0-canary-20260113162409

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.
Files changed (56) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +45 -0
  2. package/.turbo/turbo-build.log +46 -0
  3. package/CHANGELOG.md +330 -0
  4. package/LICENSE +21 -0
  5. package/README.md +41 -0
  6. package/dist/docs/index.d.ts +1 -0
  7. package/dist/docs/index.js +1 -0
  8. package/dist/docs/studio-onboarding.docblock.d.ts +1 -0
  9. package/dist/docs/studio-onboarding.docblock.js +40 -0
  10. package/dist/docs/studio-onboarding.docblock.js.map +1 -0
  11. package/dist/example.d.ts +7 -0
  12. package/dist/example.d.ts.map +1 -0
  13. package/dist/example.js +42 -0
  14. package/dist/example.js.map +1 -0
  15. package/dist/handlers/demo.handlers.d.ts +23 -0
  16. package/dist/handlers/demo.handlers.d.ts.map +1 -0
  17. package/dist/handlers/demo.handlers.js +24 -0
  18. package/dist/handlers/demo.handlers.js.map +1 -0
  19. package/dist/index.d.ts +7 -0
  20. package/dist/index.js +9 -0
  21. package/dist/learning-journey-studio-onboarding.feature.d.ts +12 -0
  22. package/dist/learning-journey-studio-onboarding.feature.d.ts.map +1 -0
  23. package/dist/learning-journey-studio-onboarding.feature.js +75 -0
  24. package/dist/learning-journey-studio-onboarding.feature.js.map +1 -0
  25. package/dist/operations/index.d.ts +271 -0
  26. package/dist/operations/index.d.ts.map +1 -0
  27. package/dist/operations/index.js +176 -0
  28. package/dist/operations/index.js.map +1 -0
  29. package/dist/presentations/index.d.ts +9 -0
  30. package/dist/presentations/index.d.ts.map +1 -0
  31. package/dist/presentations/index.js +57 -0
  32. package/dist/presentations/index.js.map +1 -0
  33. package/dist/tests/operations.test-spec.d.ts +7 -0
  34. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  35. package/dist/tests/operations.test-spec.js +36 -0
  36. package/dist/tests/operations.test-spec.js.map +1 -0
  37. package/dist/track.d.ts +8 -0
  38. package/dist/track.d.ts.map +1 -0
  39. package/dist/track.js +91 -0
  40. package/dist/track.js.map +1 -0
  41. package/example.ts +1 -0
  42. package/package.json +66 -0
  43. package/src/docs/index.ts +1 -0
  44. package/src/docs/studio-onboarding.docblock.ts +38 -0
  45. package/src/example.ts +31 -0
  46. package/src/handlers/demo.handlers.ts +48 -0
  47. package/src/index.ts +7 -0
  48. package/src/learning-journey-studio-onboarding.feature.ts +69 -0
  49. package/src/operations/index.test.ts +49 -0
  50. package/src/operations/index.ts +122 -0
  51. package/src/presentations/index.ts +57 -0
  52. package/src/tests/operations.test-spec.ts +31 -0
  53. package/src/track.ts +86 -0
  54. package/tsconfig.json +9 -0
  55. package/tsconfig.tsbuildinfo +1 -0
  56. package/tsdown.config.js +17 -0
@@ -0,0 +1,7 @@
1
+ import example from "./example.js";
2
+ import { StudioEvent, emitAllStudioOnboardingEvents, emitStudioOnboardingEvent, studioOnboardingEvents } from "./handlers/demo.handlers.js";
3
+ import { studioGettingStartedTrack, studioLearningTracks } from "./track.js";
4
+ import { GetStudioOnboardingTrack, RecordStudioOnboardingEvent, StudioOnboardingTrackModel, studioOnboardingContracts } from "./operations/index.js";
5
+ import { StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, studioOnboardingPresentations } from "./presentations/index.js";
6
+ import { LearningJourneyStudioOnboardingFeature } from "./learning-journey-studio-onboarding.feature.js";
7
+ export { GetStudioOnboardingTrack, LearningJourneyStudioOnboardingFeature, RecordStudioOnboardingEvent, StudioEvent, StudioOnboardingTrackModel, StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, emitAllStudioOnboardingEvents, emitStudioOnboardingEvent, example, studioGettingStartedTrack, studioLearningTracks, studioOnboardingContracts, studioOnboardingEvents, studioOnboardingPresentations };
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import example_default from "./example.js";
2
+ import { studioGettingStartedTrack, studioLearningTracks } from "./track.js";
3
+ import "./docs/index.js";
4
+ import { GetStudioOnboardingTrack, RecordStudioOnboardingEvent, StudioOnboardingTrackModel, studioOnboardingContracts } from "./operations/index.js";
5
+ import { emitAllStudioOnboardingEvents, emitStudioOnboardingEvent, studioOnboardingEvents } from "./handlers/demo.handlers.js";
6
+ import { StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, studioOnboardingPresentations } from "./presentations/index.js";
7
+ import { LearningJourneyStudioOnboardingFeature } from "./learning-journey-studio-onboarding.feature.js";
8
+
9
+ export { GetStudioOnboardingTrack, LearningJourneyStudioOnboardingFeature, RecordStudioOnboardingEvent, StudioOnboardingTrackModel, StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, emitAllStudioOnboardingEvents, emitStudioOnboardingEvent, example_default as example, studioGettingStartedTrack, studioLearningTracks, studioOnboardingContracts, studioOnboardingEvents, studioOnboardingPresentations };
@@ -0,0 +1,12 @@
1
+ import * as _contractspec_lib_contracts1 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/learning-journey-studio-onboarding.feature.d.ts
4
+
5
+ /**
6
+ * Learning Journey Studio Onboarding feature module that bundles
7
+ * Studio-specific onboarding track operations and presentations.
8
+ */
9
+ declare const LearningJourneyStudioOnboardingFeature: _contractspec_lib_contracts1.FeatureModuleSpec;
10
+ //#endregion
11
+ export { LearningJourneyStudioOnboardingFeature };
12
+ //# sourceMappingURL=learning-journey-studio-onboarding.feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-journey-studio-onboarding.feature.d.ts","names":[],"sources":["../src/learning-journey-studio-onboarding.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;AAWA;cAAa,wCAyDX,4BAAA,CAzDiD"}
@@ -0,0 +1,75 @@
1
+ import { defineFeature } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/learning-journey-studio-onboarding.feature.ts
4
+ /**
5
+ * Learning Journey Studio Onboarding Feature Module Specification
6
+ *
7
+ * Defines the feature module for Studio onboarding journey.
8
+ */
9
+ /**
10
+ * Learning Journey Studio Onboarding feature module that bundles
11
+ * Studio-specific onboarding track operations and presentations.
12
+ */
13
+ const LearningJourneyStudioOnboardingFeature = defineFeature({
14
+ meta: {
15
+ key: "learning-journey-studio-onboarding",
16
+ title: "Learning Journey: Studio Onboarding",
17
+ description: "Studio onboarding journey for getting started with ContractSpec Studio",
18
+ domain: "learning-journey",
19
+ owners: ["@examples.learning-journey.studio-onboarding"],
20
+ tags: [
21
+ "learning",
22
+ "onboarding",
23
+ "studio",
24
+ "journey"
25
+ ],
26
+ stability: "experimental",
27
+ version: "1.0.0"
28
+ },
29
+ operations: [{
30
+ key: "learningJourney.studioOnboarding.recordEvent",
31
+ version: "1.0.0"
32
+ }, {
33
+ key: "learningJourney.studioOnboarding.getTrack",
34
+ version: "1.0.0"
35
+ }],
36
+ events: [],
37
+ presentations: [{
38
+ key: "learning.journey.studio.track",
39
+ version: "1.0.0"
40
+ }, {
41
+ key: "learning.journey.studio.widget",
42
+ version: "1.0.0"
43
+ }],
44
+ opToPresentation: [{
45
+ op: {
46
+ key: "learningJourney.studioOnboarding.getTrack",
47
+ version: "1.0.0"
48
+ },
49
+ pres: {
50
+ key: "learning.journey.studio.track",
51
+ version: "1.0.0"
52
+ }
53
+ }],
54
+ presentationsTargets: [{
55
+ key: "learning.journey.studio.track",
56
+ version: "1.0.0",
57
+ targets: [
58
+ "react",
59
+ "markdown",
60
+ "application/json"
61
+ ]
62
+ }, {
63
+ key: "learning.journey.studio.widget",
64
+ version: "1.0.0",
65
+ targets: ["react"]
66
+ }],
67
+ capabilities: { requires: [{
68
+ key: "identity",
69
+ version: "1.0.0"
70
+ }] }
71
+ });
72
+
73
+ //#endregion
74
+ export { LearningJourneyStudioOnboardingFeature };
75
+ //# sourceMappingURL=learning-journey-studio-onboarding.feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-journey-studio-onboarding.feature.js","names":[],"sources":["../src/learning-journey-studio-onboarding.feature.ts"],"sourcesContent":["/**\n * Learning Journey Studio Onboarding Feature Module Specification\n *\n * Defines the feature module for Studio onboarding journey.\n */\nimport { defineFeature } from '@contractspec/lib.contracts';\n\n/**\n * Learning Journey Studio Onboarding feature module that bundles\n * Studio-specific onboarding track operations and presentations.\n */\nexport const LearningJourneyStudioOnboardingFeature = defineFeature({\n meta: {\n key: 'learning-journey-studio-onboarding',\n title: 'Learning Journey: Studio Onboarding',\n description:\n 'Studio onboarding journey for getting started with ContractSpec Studio',\n domain: 'learning-journey',\n owners: ['@examples.learning-journey.studio-onboarding'],\n tags: ['learning', 'onboarding', 'studio', 'journey'],\n stability: 'experimental',\n version: '1.0.0',\n },\n\n // All contract operations included in this feature\n operations: [\n { key: 'learningJourney.studioOnboarding.recordEvent', version: '1.0.0' },\n { key: 'learningJourney.studioOnboarding.getTrack', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'learning.journey.studio.track', version: '1.0.0' },\n { key: 'learning.journey.studio.widget', version: '1.0.0' },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: {\n key: 'learningJourney.studioOnboarding.getTrack',\n version: '1.0.0',\n },\n pres: { key: 'learning.journey.studio.track', version: '1.0.0' },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n {\n key: 'learning.journey.studio.track',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'learning.journey.studio.widget',\n version: '1.0.0',\n targets: ['react'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [{ key: 'identity', version: '1.0.0' }],\n },\n});\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,yCAAyC,cAAc;CAClE,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,+CAA+C;EACxD,MAAM;GAAC;GAAY;GAAc;GAAU;GAAU;EACrD,WAAW;EACX,SAAS;EACV;CAGD,YAAY,CACV;EAAE,KAAK;EAAgD,SAAS;EAAS,EACzE;EAAE,KAAK;EAA6C,SAAS;EAAS,CACvE;CAGD,QAAQ,EAAE;CAGV,eAAe,CACb;EAAE,KAAK;EAAiC,SAAS;EAAS,EAC1D;EAAE,KAAK;EAAkC,SAAS;EAAS,CAC5D;CAGD,kBAAkB,CAChB;EACE,IAAI;GACF,KAAK;GACL,SAAS;GACV;EACD,MAAM;GAAE,KAAK;GAAiC,SAAS;GAAS;EACjE,CACF;CAGD,sBAAsB,CACpB;EACE,KAAK;EACL,SAAS;EACT,SAAS;GAAC;GAAS;GAAY;GAAmB;EACnD,EACD;EACE,KAAK;EACL,SAAS;EACT,SAAS,CAAC,QAAQ;EACnB,CACF;CAGD,cAAc,EACZ,UAAU,CAAC;EAAE,KAAK;EAAY,SAAS;EAAS,CAAC,EAClD;CACF,CAAC"}
@@ -0,0 +1,271 @@
1
+ import * as _contractspec_lib_contracts2 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
3
+ import * as _contractspec_module_learning_journey_track_spec0 from "@contractspec/module.learning-journey/track-spec";
4
+
5
+ //#region src/operations/index.d.ts
6
+ declare const StudioOnboardingTrackModel: _contractspec_lib_schema0.SchemaModel<{
7
+ id: {
8
+ type: _contractspec_lib_schema0.FieldType<string, string>;
9
+ isOptional: false;
10
+ };
11
+ name: {
12
+ type: _contractspec_lib_schema0.FieldType<string, string>;
13
+ isOptional: false;
14
+ };
15
+ description: {
16
+ type: _contractspec_lib_schema0.FieldType<string, string>;
17
+ isOptional: true;
18
+ };
19
+ totalXp: {
20
+ type: _contractspec_lib_schema0.FieldType<number, number>;
21
+ isOptional: true;
22
+ };
23
+ completionXpBonus: {
24
+ type: _contractspec_lib_schema0.FieldType<number, number>;
25
+ isOptional: true;
26
+ };
27
+ completionBadgeKey: {
28
+ type: _contractspec_lib_schema0.FieldType<string, string>;
29
+ isOptional: true;
30
+ };
31
+ streakHoursWindow: {
32
+ type: _contractspec_lib_schema0.FieldType<number, number>;
33
+ isOptional: true;
34
+ };
35
+ streakBonusXp: {
36
+ type: _contractspec_lib_schema0.FieldType<number, number>;
37
+ isOptional: true;
38
+ };
39
+ steps: {
40
+ type: _contractspec_lib_schema0.SchemaModel<{
41
+ id: {
42
+ type: _contractspec_lib_schema0.FieldType<string, string>;
43
+ isOptional: false;
44
+ };
45
+ title: {
46
+ type: _contractspec_lib_schema0.FieldType<string, string>;
47
+ isOptional: false;
48
+ };
49
+ description: {
50
+ type: _contractspec_lib_schema0.FieldType<string, string>;
51
+ isOptional: true;
52
+ };
53
+ completionEvent: {
54
+ type: _contractspec_lib_schema0.FieldType<string, string>;
55
+ isOptional: false;
56
+ };
57
+ sourceModule: {
58
+ type: _contractspec_lib_schema0.FieldType<string, string>;
59
+ isOptional: true;
60
+ };
61
+ xpReward: {
62
+ type: _contractspec_lib_schema0.FieldType<number, number>;
63
+ isOptional: true;
64
+ };
65
+ order: {
66
+ type: _contractspec_lib_schema0.FieldType<number, number>;
67
+ isOptional: true;
68
+ };
69
+ }>;
70
+ isArray: true;
71
+ isOptional: false;
72
+ };
73
+ }>;
74
+ declare const GetStudioOnboardingTrack: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
75
+ track: {
76
+ type: _contractspec_lib_schema0.SchemaModel<{
77
+ id: {
78
+ type: _contractspec_lib_schema0.FieldType<string, string>;
79
+ isOptional: false;
80
+ };
81
+ name: {
82
+ type: _contractspec_lib_schema0.FieldType<string, string>;
83
+ isOptional: false;
84
+ };
85
+ description: {
86
+ type: _contractspec_lib_schema0.FieldType<string, string>;
87
+ isOptional: true;
88
+ };
89
+ totalXp: {
90
+ type: _contractspec_lib_schema0.FieldType<number, number>;
91
+ isOptional: true;
92
+ };
93
+ completionXpBonus: {
94
+ type: _contractspec_lib_schema0.FieldType<number, number>;
95
+ isOptional: true;
96
+ };
97
+ completionBadgeKey: {
98
+ type: _contractspec_lib_schema0.FieldType<string, string>;
99
+ isOptional: true;
100
+ };
101
+ streakHoursWindow: {
102
+ type: _contractspec_lib_schema0.FieldType<number, number>;
103
+ isOptional: true;
104
+ };
105
+ streakBonusXp: {
106
+ type: _contractspec_lib_schema0.FieldType<number, number>;
107
+ isOptional: true;
108
+ };
109
+ steps: {
110
+ type: _contractspec_lib_schema0.SchemaModel<{
111
+ id: {
112
+ type: _contractspec_lib_schema0.FieldType<string, string>;
113
+ isOptional: false;
114
+ };
115
+ title: {
116
+ type: _contractspec_lib_schema0.FieldType<string, string>;
117
+ isOptional: false;
118
+ };
119
+ description: {
120
+ type: _contractspec_lib_schema0.FieldType<string, string>;
121
+ isOptional: true;
122
+ };
123
+ completionEvent: {
124
+ type: _contractspec_lib_schema0.FieldType<string, string>;
125
+ isOptional: false;
126
+ };
127
+ sourceModule: {
128
+ type: _contractspec_lib_schema0.FieldType<string, string>;
129
+ isOptional: true;
130
+ };
131
+ xpReward: {
132
+ type: _contractspec_lib_schema0.FieldType<number, number>;
133
+ isOptional: true;
134
+ };
135
+ order: {
136
+ type: _contractspec_lib_schema0.FieldType<number, number>;
137
+ isOptional: true;
138
+ };
139
+ }>;
140
+ isArray: true;
141
+ isOptional: false;
142
+ };
143
+ }>;
144
+ isOptional: false;
145
+ };
146
+ }>, undefined>;
147
+ declare const RecordStudioOnboardingEvent: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
148
+ learnerId: {
149
+ type: _contractspec_lib_schema0.FieldType<string, string>;
150
+ isOptional: false;
151
+ };
152
+ eventName: {
153
+ type: _contractspec_lib_schema0.FieldType<string, string>;
154
+ isOptional: false;
155
+ };
156
+ payload: {
157
+ type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
158
+ isOptional: true;
159
+ };
160
+ occurredAt: {
161
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
162
+ isOptional: true;
163
+ };
164
+ }>, _contractspec_lib_schema0.SchemaModel<{
165
+ success: {
166
+ type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
167
+ isOptional: false;
168
+ };
169
+ }>, undefined>;
170
+ declare const studioOnboardingContracts: {
171
+ GetStudioOnboardingTrack: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{}>, _contractspec_lib_schema0.SchemaModel<{
172
+ track: {
173
+ type: _contractspec_lib_schema0.SchemaModel<{
174
+ id: {
175
+ type: _contractspec_lib_schema0.FieldType<string, string>;
176
+ isOptional: false;
177
+ };
178
+ name: {
179
+ type: _contractspec_lib_schema0.FieldType<string, string>;
180
+ isOptional: false;
181
+ };
182
+ description: {
183
+ type: _contractspec_lib_schema0.FieldType<string, string>;
184
+ isOptional: true;
185
+ };
186
+ totalXp: {
187
+ type: _contractspec_lib_schema0.FieldType<number, number>;
188
+ isOptional: true;
189
+ };
190
+ completionXpBonus: {
191
+ type: _contractspec_lib_schema0.FieldType<number, number>;
192
+ isOptional: true;
193
+ };
194
+ completionBadgeKey: {
195
+ type: _contractspec_lib_schema0.FieldType<string, string>;
196
+ isOptional: true;
197
+ };
198
+ streakHoursWindow: {
199
+ type: _contractspec_lib_schema0.FieldType<number, number>;
200
+ isOptional: true;
201
+ };
202
+ streakBonusXp: {
203
+ type: _contractspec_lib_schema0.FieldType<number, number>;
204
+ isOptional: true;
205
+ };
206
+ steps: {
207
+ type: _contractspec_lib_schema0.SchemaModel<{
208
+ id: {
209
+ type: _contractspec_lib_schema0.FieldType<string, string>;
210
+ isOptional: false;
211
+ };
212
+ title: {
213
+ type: _contractspec_lib_schema0.FieldType<string, string>;
214
+ isOptional: false;
215
+ };
216
+ description: {
217
+ type: _contractspec_lib_schema0.FieldType<string, string>;
218
+ isOptional: true;
219
+ };
220
+ completionEvent: {
221
+ type: _contractspec_lib_schema0.FieldType<string, string>;
222
+ isOptional: false;
223
+ };
224
+ sourceModule: {
225
+ type: _contractspec_lib_schema0.FieldType<string, string>;
226
+ isOptional: true;
227
+ };
228
+ xpReward: {
229
+ type: _contractspec_lib_schema0.FieldType<number, number>;
230
+ isOptional: true;
231
+ };
232
+ order: {
233
+ type: _contractspec_lib_schema0.FieldType<number, number>;
234
+ isOptional: true;
235
+ };
236
+ }>;
237
+ isArray: true;
238
+ isOptional: false;
239
+ };
240
+ }>;
241
+ isOptional: false;
242
+ };
243
+ }>, undefined>;
244
+ RecordStudioOnboardingEvent: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema0.SchemaModel<{
245
+ learnerId: {
246
+ type: _contractspec_lib_schema0.FieldType<string, string>;
247
+ isOptional: false;
248
+ };
249
+ eventName: {
250
+ type: _contractspec_lib_schema0.FieldType<string, string>;
251
+ isOptional: false;
252
+ };
253
+ payload: {
254
+ type: _contractspec_lib_schema0.FieldType<unknown, unknown>;
255
+ isOptional: true;
256
+ };
257
+ occurredAt: {
258
+ type: _contractspec_lib_schema0.FieldType<Date, string>;
259
+ isOptional: true;
260
+ };
261
+ }>, _contractspec_lib_schema0.SchemaModel<{
262
+ success: {
263
+ type: _contractspec_lib_schema0.FieldType<boolean, boolean>;
264
+ isOptional: false;
265
+ };
266
+ }>, undefined>;
267
+ track: _contractspec_module_learning_journey_track_spec0.LearningJourneyTrackSpec;
268
+ };
269
+ //#endregion
270
+ export { GetStudioOnboardingTrack, RecordStudioOnboardingEvent, StudioOnboardingTrackModel, studioOnboardingContracts };
271
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":[],"mappings":";;;;;cAwBa,sDAA0B;;UAuBrC,yBAAA,CAAA;;;EAvBW,IAAA,EAAA;IAuBX,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;6CAvBqC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAoD1B,CAAA;EAoBX,iBAAA,EAAA;IApBmC,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;QAAA,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,IAAA;MAsBxB,CAAA;MAiBX,eAAA,EAAA;;;;;iDAjBsC,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,IAAA;;;QAAA,IAAA,qCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAmB3B,UAAA,EAAA,IAIZ;MAAA,CAAA;;;;;;;;;;cA7CY,0BAAwB,4BAAA,CAAA,cAoBnC,yBAAA,CApBmC,2CAAA;;;;cAAA,yBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsBxB,0DAA2B,wCAAA;;UAiBtC,yBAAA,CAAA;;;;;;;;;;;;;;;;;UAjBsC,yBAAA,CAAA;;;;cAmB3B;uEAIZ,yBAAA,CAAA"}
@@ -0,0 +1,176 @@
1
+ import { studioGettingStartedTrack } from "../track.js";
2
+ import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
3
+ import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
4
+
5
+ //#region src/operations/index.ts
6
+ const OWNERS = ["examples.learning-journey.studio-onboarding"];
7
+ const StepModel = defineSchemaModel({
8
+ name: "StudioOnboardingStep",
9
+ description: "Step metadata for Studio onboarding journey",
10
+ fields: {
11
+ id: {
12
+ type: ScalarTypeEnum.String_unsecure(),
13
+ isOptional: false
14
+ },
15
+ title: {
16
+ type: ScalarTypeEnum.String_unsecure(),
17
+ isOptional: false
18
+ },
19
+ description: {
20
+ type: ScalarTypeEnum.String_unsecure(),
21
+ isOptional: true
22
+ },
23
+ completionEvent: {
24
+ type: ScalarTypeEnum.String_unsecure(),
25
+ isOptional: false
26
+ },
27
+ sourceModule: {
28
+ type: ScalarTypeEnum.String_unsecure(),
29
+ isOptional: true
30
+ },
31
+ xpReward: {
32
+ type: ScalarTypeEnum.Int_unsecure(),
33
+ isOptional: true
34
+ },
35
+ order: {
36
+ type: ScalarTypeEnum.Int_unsecure(),
37
+ isOptional: true
38
+ }
39
+ }
40
+ });
41
+ const StudioOnboardingTrackModel = defineSchemaModel({
42
+ name: "StudioOnboardingTrack",
43
+ description: "Studio onboarding track definition",
44
+ fields: {
45
+ id: {
46
+ type: ScalarTypeEnum.String_unsecure(),
47
+ isOptional: false
48
+ },
49
+ name: {
50
+ type: ScalarTypeEnum.String_unsecure(),
51
+ isOptional: false
52
+ },
53
+ description: {
54
+ type: ScalarTypeEnum.String_unsecure(),
55
+ isOptional: true
56
+ },
57
+ totalXp: {
58
+ type: ScalarTypeEnum.Int_unsecure(),
59
+ isOptional: true
60
+ },
61
+ completionXpBonus: {
62
+ type: ScalarTypeEnum.Int_unsecure(),
63
+ isOptional: true
64
+ },
65
+ completionBadgeKey: {
66
+ type: ScalarTypeEnum.String_unsecure(),
67
+ isOptional: true
68
+ },
69
+ streakHoursWindow: {
70
+ type: ScalarTypeEnum.Int_unsecure(),
71
+ isOptional: true
72
+ },
73
+ streakBonusXp: {
74
+ type: ScalarTypeEnum.Int_unsecure(),
75
+ isOptional: true
76
+ },
77
+ steps: {
78
+ type: StepModel,
79
+ isArray: true,
80
+ isOptional: false
81
+ }
82
+ }
83
+ });
84
+ const TrackResponseModel = defineSchemaModel({
85
+ name: "StudioOnboardingTrackResponse",
86
+ description: "Response wrapper for studio onboarding track",
87
+ fields: { track: {
88
+ type: StudioOnboardingTrackModel,
89
+ isOptional: false
90
+ } }
91
+ });
92
+ const RecordDemoEventInput = defineSchemaModel({
93
+ name: "StudioOnboardingRecordEventInput",
94
+ description: "Emit a demo event to advance Studio onboarding steps",
95
+ fields: {
96
+ learnerId: {
97
+ type: ScalarTypeEnum.String_unsecure(),
98
+ isOptional: false
99
+ },
100
+ eventName: {
101
+ type: ScalarTypeEnum.String_unsecure(),
102
+ isOptional: false
103
+ },
104
+ payload: {
105
+ type: ScalarTypeEnum.JSON(),
106
+ isOptional: true
107
+ },
108
+ occurredAt: {
109
+ type: ScalarTypeEnum.DateTime(),
110
+ isOptional: true
111
+ }
112
+ }
113
+ });
114
+ const SuccessModel = defineSchemaModel({
115
+ name: "StudioOnboardingSuccess",
116
+ description: "Generic success response",
117
+ fields: { success: {
118
+ type: ScalarTypeEnum.Boolean(),
119
+ isOptional: false
120
+ } }
121
+ });
122
+ const GetStudioOnboardingTrack = defineQuery({
123
+ meta: {
124
+ key: "learningJourney.studioOnboarding.getTrack",
125
+ version: "1.0.0",
126
+ stability: "experimental",
127
+ owners: [...OWNERS],
128
+ tags: [
129
+ "learning",
130
+ "onboarding",
131
+ "studio"
132
+ ],
133
+ description: "Fetch the Studio onboarding track definition.",
134
+ goal: "Expose track metadata to UIs and templates.",
135
+ context: "Called by Studio/Playground to render journey steps."
136
+ },
137
+ io: {
138
+ input: defineSchemaModel({
139
+ name: "StudioOnboardingTrackInput",
140
+ description: "Track input",
141
+ fields: {}
142
+ }),
143
+ output: TrackResponseModel
144
+ },
145
+ policy: { auth: "user" }
146
+ });
147
+ const RecordStudioOnboardingEvent = defineCommand({
148
+ meta: {
149
+ key: "learningJourney.studioOnboarding.recordEvent",
150
+ version: "1.0.0",
151
+ stability: "experimental",
152
+ owners: [...OWNERS],
153
+ tags: [
154
+ "learning",
155
+ "onboarding",
156
+ "studio"
157
+ ],
158
+ description: "Record an event to advance Studio onboarding progress.",
159
+ goal: "Advance steps via domain events in demo/sandbox contexts.",
160
+ context: "Called by handlers or demo scripts to emit step completion events."
161
+ },
162
+ io: {
163
+ input: RecordDemoEventInput,
164
+ output: SuccessModel
165
+ },
166
+ policy: { auth: "user" }
167
+ });
168
+ const studioOnboardingContracts = {
169
+ GetStudioOnboardingTrack,
170
+ RecordStudioOnboardingEvent,
171
+ track: studioGettingStartedTrack
172
+ };
173
+
174
+ //#endregion
175
+ export { GetStudioOnboardingTrack, RecordStudioOnboardingEvent, StudioOnboardingTrackModel, studioOnboardingContracts };
176
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\n\nimport { studioGettingStartedTrack } from '../track';\n\nconst OWNERS = ['examples.learning-journey.studio-onboarding'] as const;\n\nconst StepModel = defineSchemaModel({\n name: 'StudioOnboardingStep',\n description: 'Step metadata for Studio onboarding journey',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n completionEvent: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n sourceModule: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n xpReward: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nexport const StudioOnboardingTrackModel = defineSchemaModel({\n name: 'StudioOnboardingTrack',\n description: 'Studio onboarding track definition',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n completionXpBonus: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n completionBadgeKey: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n streakHoursWindow: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n },\n streakBonusXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n steps: { type: StepModel, isArray: true, isOptional: false },\n },\n});\n\nconst TrackResponseModel = defineSchemaModel({\n name: 'StudioOnboardingTrackResponse',\n description: 'Response wrapper for studio onboarding track',\n fields: {\n track: { type: StudioOnboardingTrackModel, isOptional: false },\n },\n});\n\nconst RecordDemoEventInput = defineSchemaModel({\n name: 'StudioOnboardingRecordEventInput',\n description: 'Emit a demo event to advance Studio onboarding steps',\n fields: {\n learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n payload: { type: ScalarTypeEnum.JSON(), isOptional: true },\n occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\nconst SuccessModel = defineSchemaModel({\n name: 'StudioOnboardingSuccess',\n description: 'Generic success response',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\nexport const GetStudioOnboardingTrack = defineQuery({\n meta: {\n key: 'learningJourney.studioOnboarding.getTrack',\n version: '1.0.0',\n stability: 'experimental',\n owners: [...OWNERS],\n tags: ['learning', 'onboarding', 'studio'],\n description: 'Fetch the Studio onboarding track definition.',\n goal: 'Expose track metadata to UIs and templates.',\n context: 'Called by Studio/Playground to render journey steps.',\n },\n io: {\n input: defineSchemaModel({\n name: 'StudioOnboardingTrackInput',\n description: 'Track input',\n fields: {},\n }),\n output: TrackResponseModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const RecordStudioOnboardingEvent = defineCommand({\n meta: {\n key: 'learningJourney.studioOnboarding.recordEvent',\n version: '1.0.0',\n stability: 'experimental',\n owners: [...OWNERS],\n tags: ['learning', 'onboarding', 'studio'],\n description: 'Record an event to advance Studio onboarding progress.',\n goal: 'Advance steps via domain events in demo/sandbox contexts.',\n context:\n 'Called by handlers or demo scripts to emit step completion events.',\n },\n io: {\n input: RecordDemoEventInput,\n output: SuccessModel,\n },\n policy: { auth: 'user' },\n});\n\nexport const studioOnboardingContracts = {\n GetStudioOnboardingTrack,\n RecordStudioOnboardingEvent,\n track: studioGettingStartedTrack,\n};\n"],"mappings":";;;;;AAKA,MAAM,SAAS,CAAC,8CAA8C;AAE9D,MAAM,YAAY,kBAAkB;CAClC,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,iBAAiB;GACf,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAC1E,UAAU;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACnE,OAAO;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACjE;CACF,CAAC;AAEF,MAAa,6BAA6B,kBAAkB;CAC1D,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,SAAS;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EAClE,mBAAmB;GACjB,MAAM,eAAe,cAAc;GACnC,YAAY;GACb;EACD,oBAAoB;GAClB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,mBAAmB;GACjB,MAAM,eAAe,cAAc;GACnC,YAAY;GACb;EACD,eAAe;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAM;EACxE,OAAO;GAAE,MAAM;GAAW,SAAS;GAAM,YAAY;GAAO;EAC7D;CACF,CAAC;AAEF,MAAM,qBAAqB,kBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ,EACN,OAAO;EAAE,MAAM;EAA4B,YAAY;EAAO,EAC/D;CACF,CAAC;AAEF,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,SAAS;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAC1D,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAClE;CACF,CAAC;AAEF,MAAM,eAAe,kBAAkB;CACrC,MAAM;CACN,aAAa;CACb,QAAQ,EACN,SAAS;EAAE,MAAM,eAAe,SAAS;EAAE,YAAY;EAAO,EAC/D;CACF,CAAC;AAEF,MAAa,2BAA2B,YAAY;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAc;GAAS;EAC1C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,aAAa;GACb,QAAQ,EAAE;GACX,CAAC;EACF,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,8BAA8B,cAAc;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAc;GAAS;EAC1C,aAAa;EACb,MAAM;EACN,SACE;EACH;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,4BAA4B;CACvC;CACA;CACA,OAAO;CACR"}
@@ -0,0 +1,9 @@
1
+ import * as _contractspec_lib_contracts6 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/presentations/index.d.ts
4
+ declare const StudioOnboardingTrackPresentation: _contractspec_lib_contracts6.PresentationSpec;
5
+ declare const StudioOnboardingWidgetPresentation: _contractspec_lib_contracts6.PresentationSpec;
6
+ declare const studioOnboardingPresentations: _contractspec_lib_contracts6.PresentationSpec[];
7
+ //#endregion
8
+ export { StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, studioOnboardingPresentations };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":[],"mappings":";;;cAkBa,mCAgBX,4BAAA,CAhB4C;cAkBjC,oCAeX,4BAAA,CAf6C;cAiBlC,+BAGZ,4BAAA,CAHyC,gBAAA"}
@@ -0,0 +1,57 @@
1
+ import { StudioOnboardingTrackModel } from "../operations/index.js";
2
+ import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
3
+
4
+ //#region src/presentations/index.ts
5
+ const baseMeta = {
6
+ domain: "learning-journey",
7
+ title: "Studio Onboarding",
8
+ owners: ["@examples.learning-journey.studio-onboarding"],
9
+ tags: [
10
+ "learning",
11
+ "onboarding",
12
+ "studio"
13
+ ],
14
+ stability: StabilityEnum.Experimental
15
+ };
16
+ const StudioOnboardingTrackPresentation = definePresentation({
17
+ meta: {
18
+ key: "learning.journey.studio.track",
19
+ version: "1.0.0",
20
+ description: "Studio onboarding track detail",
21
+ goal: "Visualize the onboarding track for the user.",
22
+ context: "Displayed in the Studio dashboard.",
23
+ ...baseMeta
24
+ },
25
+ source: {
26
+ type: "component",
27
+ framework: "react",
28
+ componentKey: "LearningTrackDetail",
29
+ props: StudioOnboardingTrackModel
30
+ },
31
+ targets: [
32
+ "react",
33
+ "markdown",
34
+ "application/json"
35
+ ]
36
+ });
37
+ const StudioOnboardingWidgetPresentation = definePresentation({
38
+ meta: {
39
+ key: "learning.journey.studio.widget",
40
+ version: "1.0.0",
41
+ description: "Compact widget for Studio onboarding progress",
42
+ goal: "Show quick progress summary.",
43
+ context: "Displayed in the Studio sidebar or header.",
44
+ ...baseMeta
45
+ },
46
+ source: {
47
+ type: "component",
48
+ framework: "react",
49
+ componentKey: "LearningTrackProgressWidget"
50
+ },
51
+ targets: ["react"]
52
+ });
53
+ const studioOnboardingPresentations = [StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation];
54
+
55
+ //#endregion
56
+ export { StudioOnboardingTrackPresentation, StudioOnboardingWidgetPresentation, studioOnboardingPresentations };
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":["import {\n definePresentation,\n StabilityEnum,\n type PresentationSpecMeta,\n} from '@contractspec/lib.contracts';\nimport { StudioOnboardingTrackModel } from '../operations';\n\nconst baseMeta: Pick<\n PresentationSpecMeta,\n 'domain' | 'owners' | 'tags' | 'title' | 'stability'\n> = {\n domain: 'learning-journey',\n title: 'Studio Onboarding',\n owners: ['@examples.learning-journey.studio-onboarding'] as string[],\n tags: ['learning', 'onboarding', 'studio'] as string[],\n stability: StabilityEnum.Experimental,\n};\n\nexport const StudioOnboardingTrackPresentation = definePresentation({\n meta: {\n key: 'learning.journey.studio.track',\n version: '1.0.0',\n description: 'Studio onboarding track detail',\n goal: 'Visualize the onboarding track for the user.',\n context: 'Displayed in the Studio dashboard.',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackDetail',\n props: StudioOnboardingTrackModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n});\n\nexport const StudioOnboardingWidgetPresentation = definePresentation({\n meta: {\n key: 'learning.journey.studio.widget',\n version: '1.0.0',\n description: 'Compact widget for Studio onboarding progress',\n goal: 'Show quick progress summary.',\n context: 'Displayed in the Studio sidebar or header.',\n ...baseMeta,\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LearningTrackProgressWidget',\n },\n targets: ['react'],\n});\n\nexport const studioOnboardingPresentations = [\n StudioOnboardingTrackPresentation,\n StudioOnboardingWidgetPresentation,\n];\n"],"mappings":";;;;AAOA,MAAM,WAGF;CACF,QAAQ;CACR,OAAO;CACP,QAAQ,CAAC,+CAA+C;CACxD,MAAM;EAAC;EAAY;EAAc;EAAS;CAC1C,WAAW,cAAc;CAC1B;AAED,MAAa,oCAAoC,mBAAmB;CAClE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CACnD,CAAC;AAEF,MAAa,qCAAqC,mBAAmB;CACnE,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,GAAG;EACJ;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CACnB,CAAC;AAEF,MAAa,gCAAgC,CAC3C,mCACA,mCACD"}
@@ -0,0 +1,7 @@
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/tests/operations.test-spec.d.ts
4
+ declare const GetTrackTest: _contractspec_lib_contracts0.TestSpec;
5
+ //#endregion
6
+ export { GetTrackTest };
7
+ //# sourceMappingURL=operations.test-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.test-spec.d.ts","names":[],"sources":["../../src/tests/operations.test-spec.ts"],"sourcesContent":[],"mappings":";;;cAEa,cA4BX,4BAAA,CA5BuB"}