@motiadev/workbench 0.5.11-beta.120-110250 → 0.5.11-beta.120-598191

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.
@@ -116,6 +116,7 @@ export const useTutorialEngine = () => {
116
116
  if (ref.current?.parentElement) {
117
117
  ref.current.parentElement.style.transition = 'opacity 0.3s ease-out';
118
118
  ref.current.parentElement.style.opacity = '0';
119
+ localStorage.setItem('motia-tutorial-closed', 'true');
119
120
  setTimeout(() => {
120
121
  if (ref.current?.parentElement) {
121
122
  ref.current.parentElement.style.display = 'none';
@@ -144,7 +145,11 @@ export const useTutorialEngine = () => {
144
145
  }
145
146
  };
146
147
  MotiaTutorial.onOpen(onOpen);
147
- MotiaTutorial.onStepsRegistered(onOpen);
148
+ MotiaTutorial.onStepsRegistered(() => {
149
+ if (localStorage.getItem('motia-tutorial-closed') !== 'true') {
150
+ onOpen();
151
+ }
152
+ });
148
153
  }, []);
149
154
  return {
150
155
  ref,
@@ -0,0 +1,210 @@
1
+ @import '@motiadev/ui/styles.css';
2
+ @import '@motiadev/ui/globals.css';
3
+ @import 'tw-animate-css';
4
+
5
+ :root {
6
+ --tutorial-text-color: var(--dark-800);
7
+ --tutorial-border: var(--light-1000);
8
+ --tutorial-code-bg: rgb(24, 24, 24, 0.1);
9
+ --tutorial-code-text: var(--text-body);
10
+ }
11
+
12
+ .dark {
13
+ --tutorial-border: rgb(65, 65, 65);
14
+ --tutorial-text-color: var(--light-800);
15
+ --tutorial-code-bg: rgb(24, 24, 24, 0.4);
16
+ --tutorial-code-text: var(--light-1000);
17
+ }
18
+
19
+ .driver-popover {
20
+ z-index: 10000;
21
+ width: 400px;
22
+ max-width: 100%;
23
+ background-color: var(--background);
24
+ padding: 0;
25
+ --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a), 0 4px 6px -4px var(--tw-shadow-color, #0000001a);
26
+ box-shadow:
27
+ var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
28
+ var(--tw-shadow);
29
+ display: flex;
30
+ flex-flow: column;
31
+ border: 1px solid var(--tutorial-border);
32
+ border-radius: 16px;
33
+
34
+ transition: all 0.3s ease-in-out;
35
+ }
36
+
37
+ .driver-popover-image {
38
+ border-radius: 16px 16px 0 0;
39
+ }
40
+
41
+ .driver-popover-intro-step {
42
+ max-width: 400px;
43
+ }
44
+
45
+ .popover-title {
46
+ font-size: 18px;
47
+ font-weight: 700;
48
+ font-weight: var(--font-weight-600);
49
+ line-height: 1.2;
50
+ color: var(--text-header);
51
+ font-family: var(--default-font-family);
52
+ }
53
+
54
+ .driver-popover-description * {
55
+ line-height: 1.25;
56
+ font-size: 14px;
57
+ font-weight: 500;
58
+ font-family: var(--default-font-family);
59
+ }
60
+
61
+ .driver-popover-title {
62
+ padding: 16px 16px 0 16px;
63
+
64
+ }
65
+
66
+ .driver-popover-description {
67
+ padding: 16px;
68
+
69
+ :not(b) {
70
+ color: var(--tutorial-text-color);
71
+ }
72
+
73
+ b {
74
+ font-weight: 800;
75
+ }
76
+
77
+ ul {
78
+ list-style-type: disc;
79
+ margin-left: 24px;
80
+
81
+ &.no-decoration {
82
+ list-style-type: none;
83
+ }
84
+ &.square-decoration {
85
+ list-style-type: square;
86
+ padding-left: 4px;
87
+ }
88
+ &.double-indented {
89
+ margin-left: calc(var(--spacing) * 4);
90
+ }
91
+ }
92
+
93
+ a {
94
+ text-decoration: underline;
95
+ }
96
+ }
97
+
98
+ .driver-popover-progress-text {
99
+ color: var(--text-placeholder);
100
+ }
101
+
102
+ .tutorial-opt-out-container {
103
+ display: flex;
104
+ flex-flow: column;
105
+ align-items: center;
106
+ border-top: 1px solid var(--border);
107
+ padding: 16px;
108
+ }
109
+
110
+ .tutorial-opt-out-button {
111
+ font-size: 14px;
112
+ font-weight: 600;
113
+ font-family: var(--default-font-family);
114
+ background: transparent;
115
+ border: none;
116
+ color: var(--text-body);
117
+ text-shadow: none;
118
+ cursor: pointer;
119
+ }
120
+
121
+ .driver-popover-navigation-btns {
122
+ position: relative;
123
+ flex-grow: 0;
124
+ }
125
+
126
+ .driver-popover-navigation-btns:hover:before {
127
+ content: 'Use arrow keys to navigate';
128
+ position: absolute;
129
+ color: white;
130
+ top: -20px;
131
+ right: 0;
132
+ text-align: right;
133
+ width: 180%;
134
+ height: 100%;
135
+
136
+ font-size: 12px;
137
+ font-weight: 500;
138
+ font-family: var(--default-font-family);
139
+ color: var(--text-body);
140
+ }
141
+
142
+ .driver-popover-navigation-btns button {
143
+ cursor: pointer;
144
+ border-radius: 999px;
145
+ color: white;
146
+ font-family: var(--default-font-family);
147
+ border: 0;
148
+ font-size: 16px;
149
+ font-weight: 500;
150
+ line-height: 125%;
151
+ letter-spacing: -0.25px;
152
+ text-shadow: none;
153
+ position: relative;
154
+ }
155
+
156
+ .driver-popover-btn-disabled {
157
+ display: none;
158
+ }
159
+
160
+ .driver-popover-next-btn, .driver-popover-next-btn:hover {
161
+ background-color: var(--accent-1000);
162
+ color: white;
163
+ padding: 16px 32px;
164
+ }
165
+
166
+ .driver-popover-footer {
167
+ padding: 16px;
168
+ }
169
+
170
+ .driver-popover-arrow {
171
+ border-width: 8px;
172
+ }
173
+
174
+ .driver-popover-arrow-side-top {
175
+ margin-top: 1px;
176
+ border-top-color: var(--tutorial-border);
177
+ }
178
+
179
+ .driver-popover-arrow-side-bottom {
180
+ margin-bottom: 1px;
181
+ border-bottom-color: var(--tutorial-border);
182
+ }
183
+
184
+ .driver-popover-arrow-side-left {
185
+ margin-left: 1px;
186
+ border-left-color: var(--tutorial-border);
187
+ }
188
+
189
+ .driver-popover-arrow-side-right {
190
+ margin-right: 1px;
191
+ border-right-color: var(--tutorial-border);
192
+ }
193
+
194
+ .code-preview {
195
+ overflow-x: auto;
196
+ background: var(--tutorial-code-bg);
197
+ padding: 16px;
198
+ border-radius: 8px;
199
+
200
+ code {
201
+ font-size: 14px;
202
+ font-weight: 400;
203
+ color: var(--tutorial-code-text);
204
+ font-family: var(--font-dm-mono);
205
+ }
206
+ }
207
+
208
+ .driver-popover-close-btn {
209
+ display: none;
210
+ }