@contractspec/example.learning-journey-studio-onboarding 1.56.1 → 1.58.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 +47 -46
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +32 -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 +30 -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 -7
- 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 -45
- 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
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
$ bun
|
|
2
|
-
$
|
|
3
|
-
$
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
$ contractspec-bun-build prebuild
|
|
2
|
+
$ bun run prebuild && bun run build:bundle && bun run build:types
|
|
3
|
+
$ contractspec-bun-build prebuild
|
|
4
|
+
$ contractspec-bun-build transpile
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=10
|
|
6
|
+
Bundled 10 modules in 29ms
|
|
7
|
+
|
|
8
|
+
docs/index.js 1.71 KB (entry point)
|
|
9
|
+
tests/operations.test-spec.js 0.92 KB (entry point)
|
|
10
|
+
./index.js 13.26 KB (entry point)
|
|
11
|
+
docs/studio-onboarding.docblock.js 1.71 KB (entry point)
|
|
12
|
+
./example.js 1.0 KB (entry point)
|
|
13
|
+
handlers/demo.handlers.js 3.23 KB (entry point)
|
|
14
|
+
./learning-journey-studio-onboarding.feature.js 1.55 KB (entry point)
|
|
15
|
+
presentations/index.js 8.17 KB (entry point)
|
|
16
|
+
operations/index.js 6.74 KB (entry point)
|
|
17
|
+
./track.js 2.58 KB (entry point)
|
|
18
|
+
|
|
19
|
+
[contractspec-bun-build] transpile target=node root=src entries=10
|
|
20
|
+
Bundled 10 modules in 46ms
|
|
21
|
+
|
|
22
|
+
docs/index.js 1.67 KB (entry point)
|
|
23
|
+
tests/operations.test-spec.js 0.91 KB (entry point)
|
|
24
|
+
./index.js 13.22 KB (entry point)
|
|
25
|
+
docs/studio-onboarding.docblock.js 1.67 KB (entry point)
|
|
26
|
+
./example.js 1.00 KB (entry point)
|
|
27
|
+
handlers/demo.handlers.js 3.22 KB (entry point)
|
|
28
|
+
./learning-journey-studio-onboarding.feature.js 1.55 KB (entry point)
|
|
29
|
+
presentations/index.js 8.16 KB (entry point)
|
|
30
|
+
operations/index.js 6.73 KB (entry point)
|
|
31
|
+
./track.js 2.58 KB (entry point)
|
|
32
|
+
|
|
33
|
+
[contractspec-bun-build] transpile target=browser root=src entries=10
|
|
34
|
+
Bundled 10 modules in 36ms
|
|
35
|
+
|
|
36
|
+
docs/index.js 1.67 KB (entry point)
|
|
37
|
+
tests/operations.test-spec.js 0.91 KB (entry point)
|
|
38
|
+
./index.js 13.22 KB (entry point)
|
|
39
|
+
docs/studio-onboarding.docblock.js 1.67 KB (entry point)
|
|
40
|
+
./example.js 1.00 KB (entry point)
|
|
41
|
+
handlers/demo.handlers.js 3.22 KB (entry point)
|
|
42
|
+
./learning-journey-studio-onboarding.feature.js 1.55 KB (entry point)
|
|
43
|
+
presentations/index.js 8.16 KB (entry point)
|
|
44
|
+
operations/index.js 6.73 KB (entry point)
|
|
45
|
+
./track.js 2.58 KB (entry point)
|
|
46
|
+
|
|
47
|
+
$ contractspec-bun-build types
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ contractspec-bun-build prebuild
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @contractspec/example.learning-journey-studio-onboarding
|
|
2
2
|
|
|
3
|
+
## 1.58.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [d1f0fd0]
|
|
12
|
+
- Updated dependencies [4355a9e]
|
|
13
|
+
- @contractspec/module.learning-journey@1.58.0
|
|
14
|
+
- @contractspec/lib.contracts@1.58.0
|
|
15
|
+
- @contractspec/lib.schema@1.58.0
|
|
16
|
+
|
|
17
|
+
## 1.57.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 11a5a05: feat: improve product intent
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [8ecf3c1]
|
|
26
|
+
- Updated dependencies [47c48c2]
|
|
27
|
+
- Updated dependencies [a119963]
|
|
28
|
+
- Updated dependencies [4651e06]
|
|
29
|
+
- Updated dependencies [ad9d10a]
|
|
30
|
+
- Updated dependencies [11a5a05]
|
|
31
|
+
- @contractspec/lib.contracts@1.57.0
|
|
32
|
+
- @contractspec/module.learning-journey@1.57.0
|
|
33
|
+
- @contractspec/lib.schema@1.57.0
|
|
34
|
+
|
|
3
35
|
## 1.56.1
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/docs/studio-onboarding.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts";
|
|
3
|
+
var studioOnboardingDocBlocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.learning-journey.studio-onboarding",
|
|
6
|
+
title: "Learning Journey — Studio Getting Started",
|
|
7
|
+
summary: "Track that guides a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.",
|
|
8
|
+
kind: "reference",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/learning-journey/studio-onboarding",
|
|
11
|
+
tags: ["learning", "onboarding", "studio"],
|
|
12
|
+
body: `## Track
|
|
13
|
+
- **Key**: \`studio_getting_started\`
|
|
14
|
+
- **Persona**: new Studio developer, first 30 minutes
|
|
15
|
+
- **Goal**: instantiate template → edit spec → regenerate → play → run evolution
|
|
16
|
+
|
|
17
|
+
## Steps & Events
|
|
18
|
+
1) \`choose_template\` → event \`studio.template.instantiated\`
|
|
19
|
+
2) \`edit_spec\` → event \`spec.changed\` (scope: sandbox)
|
|
20
|
+
3) \`regenerate_app\` → event \`regeneration.completed\`
|
|
21
|
+
4) \`play_in_playground\` → event \`playground.session.started\`
|
|
22
|
+
5) \`try_evolution_mode\` → event \`studio.evolution.applied\`
|
|
23
|
+
|
|
24
|
+
XP: 20/20/20/20/30 with bonus 25 XP if completed within 48h (streak rule). Badge: \`studio_first_30m\`.
|
|
25
|
+
|
|
26
|
+
## Wiring
|
|
27
|
+
- Tracks export from \`@contractspec/example.learning-journey-studio-onboarding/track\`.
|
|
28
|
+
- Use onboarding API:
|
|
29
|
+
- \`learning.onboarding.listTracks\` to surface catalog
|
|
30
|
+
- \`learning.onboarding.getProgress\` to render progress
|
|
31
|
+
- \`learning.onboarding.recordEvent\` to advance from bus events
|
|
32
|
+
- Events should be emitted by Studio surfaces (template creation, spec save, regeneration, playground session start, evolution apply).`
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
registerDocBlocks(studioOnboardingDocBlocks);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/docs/studio-onboarding.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts";
|
|
3
|
+
var studioOnboardingDocBlocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.learning-journey.studio-onboarding",
|
|
6
|
+
title: "Learning Journey — Studio Getting Started",
|
|
7
|
+
summary: "Track that guides a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.",
|
|
8
|
+
kind: "reference",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/learning-journey/studio-onboarding",
|
|
11
|
+
tags: ["learning", "onboarding", "studio"],
|
|
12
|
+
body: `## Track
|
|
13
|
+
- **Key**: \`studio_getting_started\`
|
|
14
|
+
- **Persona**: new Studio developer, first 30 minutes
|
|
15
|
+
- **Goal**: instantiate template → edit spec → regenerate → play → run evolution
|
|
16
|
+
|
|
17
|
+
## Steps & Events
|
|
18
|
+
1) \`choose_template\` → event \`studio.template.instantiated\`
|
|
19
|
+
2) \`edit_spec\` → event \`spec.changed\` (scope: sandbox)
|
|
20
|
+
3) \`regenerate_app\` → event \`regeneration.completed\`
|
|
21
|
+
4) \`play_in_playground\` → event \`playground.session.started\`
|
|
22
|
+
5) \`try_evolution_mode\` → event \`studio.evolution.applied\`
|
|
23
|
+
|
|
24
|
+
XP: 20/20/20/20/30 with bonus 25 XP if completed within 48h (streak rule). Badge: \`studio_first_30m\`.
|
|
25
|
+
|
|
26
|
+
## Wiring
|
|
27
|
+
- Tracks export from \`@contractspec/example.learning-journey-studio-onboarding/track\`.
|
|
28
|
+
- Use onboarding API:
|
|
29
|
+
- \`learning.onboarding.listTracks\` to surface catalog
|
|
30
|
+
- \`learning.onboarding.getProgress\` to render progress
|
|
31
|
+
- \`learning.onboarding.recordEvent\` to advance from bus events
|
|
32
|
+
- Events should be emitted by Studio surfaces (template creation, spec save, regeneration, playground session start, evolution apply).`
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
registerDocBlocks(studioOnboardingDocBlocks);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/example.ts
|
|
2
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
3
|
+
var example = defineExample({
|
|
4
|
+
meta: {
|
|
5
|
+
key: "learning-journey-studio-onboarding",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
title: "Learning Journey — Studio Getting Started",
|
|
8
|
+
description: "Onboarding track guiding a new Studio user through template spawn, spec edit, regeneration, playground, and evolution.",
|
|
9
|
+
kind: "template",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
stability: "experimental",
|
|
12
|
+
owners: ["@platform.core"],
|
|
13
|
+
tags: ["learning", "onboarding", "studio"]
|
|
14
|
+
},
|
|
15
|
+
docs: {
|
|
16
|
+
rootDocId: "docs.learning-journey.studio-onboarding"
|
|
17
|
+
},
|
|
18
|
+
entrypoints: {
|
|
19
|
+
packageName: "@contractspec/example.learning-journey-studio-onboarding",
|
|
20
|
+
docs: "./docs"
|
|
21
|
+
},
|
|
22
|
+
surfaces: {
|
|
23
|
+
templates: true,
|
|
24
|
+
sandbox: { enabled: true, modes: ["playground", "markdown"] },
|
|
25
|
+
studio: { enabled: true, installable: true },
|
|
26
|
+
mcp: { enabled: true }
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
var example_default = example;
|
|
30
|
+
export {
|
|
31
|
+
example_default as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// src/track.ts
|
|
2
|
+
var studioGettingStartedTrack = {
|
|
3
|
+
id: "studio_getting_started",
|
|
4
|
+
productId: "contractspec-studio",
|
|
5
|
+
name: "Studio Getting Started",
|
|
6
|
+
description: "First 30 minutes in Studio: create a project, edit the spec, deploy/regenerate, and try key modules.",
|
|
7
|
+
targetUserSegment: "new_studio_user",
|
|
8
|
+
targetRole: "developer",
|
|
9
|
+
totalXp: 110,
|
|
10
|
+
streakRule: { hoursWindow: 48, bonusXp: 25 },
|
|
11
|
+
completionRewards: { xpBonus: 25, badgeKey: "studio_first_30m" },
|
|
12
|
+
steps: [
|
|
13
|
+
{
|
|
14
|
+
id: "choose_template",
|
|
15
|
+
title: "Choose a template",
|
|
16
|
+
description: "Create your first Studio project (starter template).",
|
|
17
|
+
order: 1,
|
|
18
|
+
completion: {
|
|
19
|
+
eventName: "studio.template.instantiated",
|
|
20
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
21
|
+
},
|
|
22
|
+
xpReward: 20,
|
|
23
|
+
metadata: { surface: "projects" }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "edit_spec",
|
|
27
|
+
title: "Edit the spec",
|
|
28
|
+
description: "Change the spec (not generated code) and save.",
|
|
29
|
+
instructions: "Open spec editor, tweak a contract or presentation, save.",
|
|
30
|
+
order: 2,
|
|
31
|
+
completion: {
|
|
32
|
+
eventName: "spec.changed",
|
|
33
|
+
sourceModule: "@contractspec/bundle.studio"
|
|
34
|
+
},
|
|
35
|
+
xpReward: 20,
|
|
36
|
+
metadata: { surface: "spec-editor" }
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "regenerate_app",
|
|
40
|
+
title: "Regenerate the app",
|
|
41
|
+
description: "Regenerate artifacts from the updated spec.",
|
|
42
|
+
order: 3,
|
|
43
|
+
completion: {
|
|
44
|
+
eventName: "regeneration.completed",
|
|
45
|
+
sourceModule: "@contractspec/lib.contracts/regenerator"
|
|
46
|
+
},
|
|
47
|
+
xpReward: 20,
|
|
48
|
+
metadata: { surface: "regenerator" }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "open_canvas",
|
|
52
|
+
title: "Open the canvas",
|
|
53
|
+
description: "Visit the canvas module for your project.",
|
|
54
|
+
order: 4,
|
|
55
|
+
completion: {
|
|
56
|
+
eventName: "module.navigated",
|
|
57
|
+
sourceModule: "@contractspec/bundle.studio",
|
|
58
|
+
payloadFilter: { moduleId: "canvas" }
|
|
59
|
+
},
|
|
60
|
+
xpReward: 20,
|
|
61
|
+
metadata: { surface: "canvas" }
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "try_evolution_mode",
|
|
65
|
+
title: "Try evolution mode",
|
|
66
|
+
description: "Request a change via Evolution, then regenerate.",
|
|
67
|
+
order: 5,
|
|
68
|
+
completion: {
|
|
69
|
+
eventName: "studio.evolution.applied",
|
|
70
|
+
sourceModule: "@contractspec/lib.evolution"
|
|
71
|
+
},
|
|
72
|
+
xpReward: 30,
|
|
73
|
+
metadata: { surface: "evolution" }
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
metadata: {
|
|
77
|
+
persona: "first_run",
|
|
78
|
+
surfacedIn: ["studio/home", "studio/sidebar/learning"]
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var studioLearningTracks = [
|
|
82
|
+
studioGettingStartedTrack
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
// src/handlers/demo.handlers.ts
|
|
86
|
+
var studioOnboardingEvents = [
|
|
87
|
+
"studio.template.instantiated",
|
|
88
|
+
"spec.changed",
|
|
89
|
+
"regeneration.completed",
|
|
90
|
+
"playground.session.started",
|
|
91
|
+
"studio.evolution.applied"
|
|
92
|
+
];
|
|
93
|
+
var emitStudioOnboardingEvent = (eventName, { learnerId, occurredAt = new Date }, record) => {
|
|
94
|
+
const event = {
|
|
95
|
+
learnerId,
|
|
96
|
+
name: eventName,
|
|
97
|
+
occurredAt,
|
|
98
|
+
trackId: studioGettingStartedTrack.id
|
|
99
|
+
};
|
|
100
|
+
return record ? record(event) : event;
|
|
101
|
+
};
|
|
102
|
+
var emitAllStudioOnboardingEvents = (params, record) => studioOnboardingEvents.map((name) => emitStudioOnboardingEvent(name, params, record));
|
|
103
|
+
export {
|
|
104
|
+
studioOnboardingEvents,
|
|
105
|
+
emitStudioOnboardingEvent,
|
|
106
|
+
emitAllStudioOnboardingEvents
|
|
107
|
+
};
|