@ibgib/space-gib 0.0.35 → 0.0.36

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.
@@ -0,0 +1,260 @@
1
+ /**
2
+ * tutorial.css — Styles for the Space-Gib Interactive Tutorial & Spotlight Tour
3
+ */
4
+
5
+ .tutorial-overlay-container {
6
+ position: fixed;
7
+ inset: 0;
8
+ z-index: 10000;
9
+ pointer-events: none;
10
+ transition: opacity 0.3s ease;
11
+ }
12
+
13
+ /* Semi-transparent dimmer backdrop */
14
+ .tutorial-backdrop {
15
+ position: absolute;
16
+ inset: 0;
17
+ background: rgba(8, 10, 15, 0.75);
18
+ backdrop-filter: blur(3px);
19
+ -webkit-backdrop-filter: blur(3px);
20
+ pointer-events: auto;
21
+ transition: clip-path 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
22
+ }
23
+
24
+ /* Glowing spotlight ring around the active target */
25
+ .tutorial-spotlight-ring {
26
+ position: absolute;
27
+ border-radius: 8px;
28
+ box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.6),
29
+ 0 0 25px 6px rgba(255, 180, 0, 0.4),
30
+ inset 0 0 15px rgba(255, 204, 0, 0.2);
31
+ pointer-events: none;
32
+ transition: top 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
33
+ left 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
34
+ width 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
35
+ height 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
36
+ z-index: 10001;
37
+ }
38
+
39
+ /* Movable Golden Beacon Button */
40
+ .tutorial-beacon {
41
+ position: absolute;
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 8px;
45
+ padding: 8px 18px;
46
+ background: linear-gradient(135deg, #ffd700 0%, #ff9900 100%);
47
+ color: #121212;
48
+ font-family: inherit;
49
+ font-size: 0.95rem;
50
+ font-weight: 700;
51
+ border: 2px solid rgba(255, 255, 255, 0.8);
52
+ border-radius: 9999px;
53
+ box-shadow: 0 4px 20px rgba(255, 180, 0, 0.65), 0 0 30px rgba(255, 215, 0, 0.4);
54
+ cursor: pointer;
55
+ pointer-events: auto;
56
+ z-index: 10002;
57
+ transition: top 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
58
+ left 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
59
+ transform 0.2s ease,
60
+ box-shadow 0.2s ease;
61
+ animation: beacon-pulse 2s infinite ease-in-out;
62
+ }
63
+
64
+ .tutorial-beacon:hover {
65
+ transform: scale(1.06);
66
+ box-shadow: 0 6px 28px rgba(255, 190, 0, 0.85), 0 0 40px rgba(255, 230, 100, 0.6);
67
+ }
68
+
69
+ .tutorial-beacon:active {
70
+ transform: scale(0.96);
71
+ }
72
+
73
+ .tutorial-beacon-icon {
74
+ font-size: 1.15rem;
75
+ line-height: 1;
76
+ }
77
+
78
+ .tutorial-beacon-text {
79
+ letter-spacing: 0.02em;
80
+ }
81
+
82
+ @keyframes beacon-pulse {
83
+ 0%, 100% {
84
+ box-shadow: 0 4px 20px rgba(255, 180, 0, 0.65), 0 0 15px rgba(255, 215, 0, 0.4);
85
+ }
86
+ 50% {
87
+ box-shadow: 0 4px 30px rgba(255, 200, 0, 0.9), 0 0 35px rgba(255, 230, 50, 0.7);
88
+ }
89
+ }
90
+
91
+ /* Floating Glassmorphic Narration Card */
92
+ .tutorial-card {
93
+ position: absolute;
94
+ width: 440px;
95
+ max-width: calc(100vw - 32px);
96
+ background: rgba(18, 22, 34, 0.88);
97
+ backdrop-filter: blur(16px);
98
+ -webkit-backdrop-filter: blur(16px);
99
+ border: 1px solid rgba(255, 215, 0, 0.25);
100
+ border-radius: 14px;
101
+ box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 200, 0, 0.15);
102
+ padding: 22px 24px;
103
+ color: #e2e8f0;
104
+ pointer-events: auto;
105
+ z-index: 10002;
106
+ transition: top 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
107
+ left 0.35s cubic-bezier(0.2, 0.9, 0.3, 1),
108
+ opacity 0.25s ease;
109
+ }
110
+
111
+ .tutorial-card.placement-center {
112
+ top: 50% !important;
113
+ left: 50% !important;
114
+ transform: translate(-50%, -50%);
115
+ width: 580px;
116
+ border-color: rgba(255, 215, 0, 0.45);
117
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 200, 0, 0.25);
118
+ }
119
+
120
+ .tutorial-card-header {
121
+ display: flex;
122
+ align-items: center;
123
+ justify-content: space-between;
124
+ margin-bottom: 12px;
125
+ }
126
+
127
+ .tutorial-step-badge {
128
+ font-size: 0.75rem;
129
+ font-weight: 700;
130
+ text-transform: uppercase;
131
+ letter-spacing: 0.08em;
132
+ color: #ffd700;
133
+ background: rgba(255, 215, 0, 0.12);
134
+ padding: 4px 10px;
135
+ border-radius: 9999px;
136
+ border: 1px solid rgba(255, 215, 0, 0.3);
137
+ }
138
+
139
+ .tutorial-card-close {
140
+ background: none;
141
+ border: none;
142
+ color: #94a3b8;
143
+ font-size: 1.25rem;
144
+ cursor: pointer;
145
+ padding: 4px 8px;
146
+ border-radius: 6px;
147
+ transition: color 0.15s ease, background 0.15s ease;
148
+ }
149
+
150
+ .tutorial-card-close:hover {
151
+ color: #ffffff;
152
+ background: rgba(255, 255, 255, 0.1);
153
+ }
154
+
155
+ .tutorial-card-title {
156
+ margin: 0 0 12px 0;
157
+ font-size: 1.2rem;
158
+ font-weight: 700;
159
+ color: #ffffff;
160
+ line-height: 1.35;
161
+ }
162
+
163
+ .tutorial-card-body {
164
+ font-size: 0.92rem;
165
+ line-height: 1.6;
166
+ color: #cbd5e1;
167
+ margin-bottom: 20px;
168
+ max-height: 55vh;
169
+ overflow-y: auto;
170
+ }
171
+
172
+ .tutorial-card-body p {
173
+ margin: 0 0 10px 0;
174
+ }
175
+
176
+ .tutorial-card-body p:last-child {
177
+ margin-bottom: 0;
178
+ }
179
+
180
+ .tutorial-card-body strong {
181
+ color: #f8fafc;
182
+ }
183
+
184
+ .tutorial-card-body em {
185
+ color: #ffd700;
186
+ font-style: normal;
187
+ }
188
+
189
+ .tutorial-card-footer {
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: space-between;
193
+ padding-top: 14px;
194
+ border-top: 1px solid rgba(255, 255, 255, 0.08);
195
+ }
196
+
197
+ .tutorial-progress-dots {
198
+ display: flex;
199
+ gap: 6px;
200
+ }
201
+
202
+ .tutorial-dot {
203
+ width: 8px;
204
+ height: 8px;
205
+ border-radius: 9999px;
206
+ background: rgba(255, 255, 255, 0.2);
207
+ transition: background 0.25s ease, transform 0.25s ease;
208
+ }
209
+
210
+ .tutorial-dot.active {
211
+ background: #ffd700;
212
+ transform: scale(1.25);
213
+ box-shadow: 0 0 8px #ffd700;
214
+ }
215
+
216
+ .tutorial-card-actions {
217
+ display: flex;
218
+ align-items: center;
219
+ gap: 10px;
220
+ }
221
+
222
+ .tutorial-btn-skip {
223
+ background: none;
224
+ border: none;
225
+ color: #94a3b8;
226
+ font-size: 0.85rem;
227
+ cursor: pointer;
228
+ padding: 6px 12px;
229
+ border-radius: 6px;
230
+ transition: color 0.15s ease;
231
+ }
232
+
233
+ .tutorial-btn-skip:hover {
234
+ color: #ffffff;
235
+ }
236
+
237
+ .tutorial-btn-next {
238
+ display: inline-flex;
239
+ align-items: center;
240
+ gap: 6px;
241
+ background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
242
+ color: #0f172a;
243
+ font-weight: 700;
244
+ font-size: 0.9rem;
245
+ padding: 8px 18px;
246
+ border: none;
247
+ border-radius: 8px;
248
+ cursor: pointer;
249
+ box-shadow: 0 4px 14px rgba(255, 180, 0, 0.4);
250
+ transition: transform 0.15s ease, box-shadow 0.15s ease;
251
+ }
252
+
253
+ .tutorial-btn-next:hover {
254
+ transform: translateY(-1px);
255
+ box-shadow: 0 6px 20px rgba(255, 180, 0, 0.6);
256
+ }
257
+
258
+ .tutorial-btn-next:active {
259
+ transform: translateY(1px);
260
+ }
@@ -53,6 +53,10 @@ import {
53
53
  import {
54
54
  registerPitchComponent, PITCH_COMPONENT_NAME, PitchComponentInstance,
55
55
  } from "../component/pitch/index.mjs";
56
+ import {
57
+ getTutorialController,
58
+ PITCH_TOUR_SCRIPT,
59
+ } from "../component/tutorial/index.mjs";
56
60
  import {
57
61
  registerCodeEditorComponent, CODE_EDITOR_COMPONENT_NAME,
58
62
  CodeEditorComponentInstance,
@@ -213,6 +217,13 @@ export class SpaceGibShellService {
213
217
  private notesExplorerInstance?: NotesExplorerComponentInstance;
214
218
  private notesInspectorInstance?: NotesInspectorComponentInstance;
215
219
 
220
+ public getCosmosNavigator(): CosmosNavigatorComponentInstance | undefined {
221
+ return this.cosmosNavigatorInstance;
222
+ }
223
+ public getFileExplorer(): FileExplorerComponentInstance | undefined {
224
+ return this.fileExplorerInstance;
225
+ }
226
+
216
227
  // Panel States
217
228
  private leftPanelState: PanelState = 'collapsed';
218
229
  private rightPanelState: PanelState = 'collapsed';
@@ -1497,38 +1508,30 @@ export class SpaceGibShellService {
1497
1508
  }
1498
1509
 
1499
1510
  public async showPitch(): Promise<void> {
1500
- const lc = `${this.lc}[${this.showPitch.name}]`;
1501
- try {
1502
- const centerPanel = document.getElementById(ID_CENTER_PANEL_CONTENT);
1503
- if (!centerPanel) {
1504
- console.warn(`${lc} ${ID_CENTER_PANEL_CONTENT} element not found.`);
1505
- return;
1506
- }
1507
-
1508
- if (!this.pitchInstance) {
1509
- const componentSvc = await getComponentSvc();
1510
- this.pitchInstance = await componentSvc.getComponentInstance({
1511
- path: PITCH_COMPONENT_NAME,
1512
- ibGibAddr: ROOT_ADDR,
1513
- useRegExpPrefilter: true,
1514
- }) as PitchComponentInstance;
1515
- }
1511
+ await this.startPitchTour();
1512
+ }
1516
1513
 
1517
- if (this.pitchInstance) {
1518
- const componentSvc = await getComponentSvc();
1519
- await componentSvc.inject({
1520
- parentEl: centerPanel,
1521
- componentToInject: this.pitchInstance,
1522
- });
1514
+ public async startPitchTour(): Promise<void> {
1515
+ const lc = `${this.lc}[${this.startPitchTour.name}]`;
1516
+ console.log(`${lc} startPitchTour triggered.`);
1517
+ try {
1518
+ const tutorial = getTutorialController();
1519
+ console.log(`${lc} tutorialController isActive = ${tutorial.isActive}`);
1520
+ if (tutorial.isActive) {
1521
+ await tutorial.next();
1522
+ } else {
1523
+ await tutorial.start(PITCH_TOUR_SCRIPT, this);
1523
1524
  }
1524
-
1525
- this.collapsePanels();
1526
1525
  } catch (error) {
1527
1526
  console.error(`${lc} ${extractErrorMsg(error)}`);
1528
1527
  }
1529
1528
  }
1530
1529
 
1531
1530
  public closePitch(): void {
1531
+ const tutorial = getTutorialController();
1532
+ if (tutorial.isActive) {
1533
+ tutorial.stop();
1534
+ }
1532
1535
  this.showCosmos();
1533
1536
  }
1534
1537
 
@@ -1768,6 +1771,7 @@ export class SpaceGibShellService {
1768
1771
  const btnHeaderClone = document.getElementById('btn-header-clone');
1769
1772
 
1770
1773
  btnHeaderPitch?.addEventListener('click', () => {
1774
+ console.log(`[SpaceGibShellService] #btn-header-pitch clicked! Triggering showPitch()...`);
1771
1775
  this.showPitch();
1772
1776
  });
1773
1777