@decido/ui 0.0.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/.eslintrc.cjs +10 -0
- package/.turbo/turbo-build.log +13 -0
- package/.turbo/turbo-lint.log +54 -0
- package/dist/components/DebugPanel.d.ts +3 -0
- package/dist/components/DebugPanel.js +195 -0
- package/dist/components/DebugPanelManager.d.ts +3 -0
- package/dist/components/DebugPanelManager.js +20 -0
- package/dist/components/DecidoButton.d.ts +11 -0
- package/dist/components/DecidoButton.js +15 -0
- package/dist/components/LoginView.d.ts +6 -0
- package/dist/components/LoginView.js +36 -0
- package/dist/components/WelcomeView.d.ts +6 -0
- package/dist/components/WelcomeView.js +16 -0
- package/dist/components/base/BaseComponent.d.ts +12 -0
- package/dist/components/base/BaseComponent.js +43 -0
- package/dist/components/base/BaseComponentBacjup.d.ts +12 -0
- package/dist/components/base/BaseComponentBacjup.js +43 -0
- package/dist/components/base/BaseComponentLit.d.ts +9 -0
- package/dist/components/base/BaseComponentLit.js +30 -0
- package/dist/components/base/shared-styles.d.ts +4 -0
- package/dist/components/base/shared-styles.js +18 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +7 -0
- package/dist/components/landing/index.d.ts +11 -0
- package/dist/components/landing/index.js +11 -0
- package/dist/components/landing/landing-button.d.ts +9 -0
- package/dist/components/landing/landing-button.js +5 -0
- package/dist/components/landing/landing-card.d.ts +6 -0
- package/dist/components/landing/landing-card.js +5 -0
- package/dist/components/landing/landing-cta.d.ts +10 -0
- package/dist/components/landing/landing-cta.js +5 -0
- package/dist/components/landing/landing-feature-card.d.ts +35 -0
- package/dist/components/landing/landing-feature-card.js +35 -0
- package/dist/components/landing/landing-footer.d.ts +18 -0
- package/dist/components/landing/landing-footer.js +7 -0
- package/dist/components/landing/landing-header.d.ts +21 -0
- package/dist/components/landing/landing-header.js +7 -0
- package/dist/components/landing/landing-hero.d.ts +22 -0
- package/dist/components/landing/landing-hero.js +10 -0
- package/dist/components/landing/landing-page.d.ts +3 -0
- package/dist/components/landing/landing-page.js +34 -0
- package/dist/components/landing/landing-section.d.ts +14 -0
- package/dist/components/landing/landing-section.js +8 -0
- package/dist/components/landing/landing-testimonial-card.d.ts +11 -0
- package/dist/components/landing/landing-testimonial-card.js +9 -0
- package/dist/components/landing/landing-waitlist.d.ts +27 -0
- package/dist/components/landing/landing-waitlist.js +18 -0
- package/dist/components/theming/ColorPicker.d.ts +8 -0
- package/dist/components/theming/ColorPicker.js +19 -0
- package/dist/components/theming/ThemePanel.d.ts +5 -0
- package/dist/components/theming/ThemePanel.js +12 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +19 -0
- package/dist/utils/counter.d.ts +1 -0
- package/dist/utils/counter.js +9 -0
- package/eslint.config.js +11 -0
- package/package.json +47 -0
- package/src/components/DebugPanel.tsx +347 -0
- package/src/components/DebugPanelManager.tsx +40 -0
- package/src/components/DecidoButton.tsx +43 -0
- package/src/components/LoginView.tsx +85 -0
- package/src/components/WelcomeView.tsx +47 -0
- package/src/components/base/landing.css +477 -0
- package/src/components/base/shared-styles.ts +21 -0
- package/src/components/index.ts +7 -0
- package/src/components/landing/index.tsx +11 -0
- package/src/components/landing/landing-button.tsx +26 -0
- package/src/components/landing/landing-card.tsx +15 -0
- package/src/components/landing/landing-cta.tsx +42 -0
- package/src/components/landing/landing-feature-card.tsx +149 -0
- package/src/components/landing/landing-footer.tsx +66 -0
- package/src/components/landing/landing-header.tsx +55 -0
- package/src/components/landing/landing-hero.tsx +94 -0
- package/src/components/landing/landing-page.tsx +143 -0
- package/src/components/landing/landing-section.tsx +42 -0
- package/src/components/landing/landing-testimonial-card.tsx +50 -0
- package/src/components/landing/landing-waitlist.tsx +115 -0
- package/src/components/theming/ColorPicker.tsx +40 -0
- package/src/components/theming/ThemePanel.tsx +43 -0
- package/src/css/base.css +483 -0
- package/src/css/components.css +309 -0
- package/src/css/debug-panel.css +1368 -0
- package/src/css/layout.css +289 -0
- package/src/css/login-view.css +45 -0
- package/src/css/style.css +20 -0
- package/src/css/welcome-view.css +56 -0
- package/src/css/workbench.css +383 -0
- package/src/globals.d.ts +8 -0
- package/src/index.ts +24 -0
- package/src/utils/counter.d.ts.map +1 -0
- package/src/utils/counter.js +9 -0
- package/src/utils/counter.ts +9 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +7 -0
- package/tsconfig.json +35 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
/* Workbench layout CSS variables */
|
|
2
|
+
:root {
|
|
3
|
+
--panel-height: 250px;
|
|
4
|
+
--sidebar-width: 280px;
|
|
5
|
+
--sidebar-right-width: 350px;
|
|
6
|
+
--activity-bar-width: 48px;
|
|
7
|
+
--status-bar-height: 24px;
|
|
8
|
+
--top-bar-height: 35px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Base workbench styles */
|
|
12
|
+
.workbench-container {
|
|
13
|
+
font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
|
|
14
|
+
color: var(--color-text-primary);
|
|
15
|
+
background-color: var(--color-surface-primary);
|
|
16
|
+
height: 100vh;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.workbench-grid {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: var(--activity-bar-width) var(--sidebar-width) 1fr var(--sidebar-right-width);
|
|
23
|
+
grid-template-rows: var(--top-bar-height) 1fr var(--panel-height) var(--status-bar-height);
|
|
24
|
+
grid-template-areas:
|
|
25
|
+
"top-bar top-bar top-bar top-bar"
|
|
26
|
+
"activity-bar sidebar main sidebar-right"
|
|
27
|
+
"activity-bar sidebar panel sidebar-right"
|
|
28
|
+
"status-bar status-bar status-bar status-bar";
|
|
29
|
+
height: 100vh;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.workbench-grid.sidebar-hidden {
|
|
33
|
+
grid-template-columns: var(--activity-bar-width) 0 1fr var(--sidebar-right-width);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.workbench-grid.sidebar-right-hidden {
|
|
37
|
+
grid-template-columns: var(--activity-bar-width) var(--sidebar-width) 1fr 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.workbench-grid.panel-hidden {
|
|
41
|
+
grid-template-rows: var(--top-bar-height) 1fr var(--status-bar-height);
|
|
42
|
+
grid-template-areas:
|
|
43
|
+
"top-bar top-bar top-bar top-bar"
|
|
44
|
+
"activity-bar sidebar main sidebar-right"
|
|
45
|
+
"status-bar status-bar status-bar status-bar";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Activity Bar */
|
|
49
|
+
.activity-bar {
|
|
50
|
+
grid-area: activity-bar;
|
|
51
|
+
background-color: var(--color-surface-elevated);
|
|
52
|
+
border-right: 1px solid var(--color-border-subtle);
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
align-items: center;
|
|
56
|
+
padding: var(--spacing-sm, 0.5rem);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.activity-bar-item {
|
|
60
|
+
width: 32px;
|
|
61
|
+
height: 32px;
|
|
62
|
+
margin-bottom: var(--spacing-sm, 0.5rem);
|
|
63
|
+
background: transparent;
|
|
64
|
+
border: none;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
color: var(--color-text-secondary);
|
|
71
|
+
transition: all 0.2s ease;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.activity-bar-item:hover {
|
|
75
|
+
background-color: var(--color-accent-blue);
|
|
76
|
+
color: var(--color-text-inverse);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.activity-bar-item.active {
|
|
80
|
+
background-color: var(--color-accent-blue);
|
|
81
|
+
color: var(--color-text-inverse);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Sidebar */
|
|
85
|
+
.sidebar {
|
|
86
|
+
grid-area: sidebar;
|
|
87
|
+
background-color: var(--color-surface-elevated);
|
|
88
|
+
border-right: 1px solid var(--color-border-subtle);
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.sidebar.hidden {
|
|
93
|
+
display: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sidebar-header {
|
|
97
|
+
padding: var(--spacing-md, 1rem);
|
|
98
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
align-items: center;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.sidebar-title {
|
|
105
|
+
font-size: var(--text-md, 1rem);
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
margin: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.sidebar-content {
|
|
111
|
+
padding: var(--spacing-md, 1rem);
|
|
112
|
+
height: calc(100% - 60px);
|
|
113
|
+
overflow-y: auto;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Main content area */
|
|
117
|
+
.main-content {
|
|
118
|
+
grid-area: main;
|
|
119
|
+
background-color: var(--color-surface-primary);
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Editor panes */
|
|
126
|
+
.pane-container {
|
|
127
|
+
display: flex;
|
|
128
|
+
flex: 1;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.editor-pane {
|
|
133
|
+
flex: 1;
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
min-width: 200px;
|
|
137
|
+
border-right: 1px solid var(--color-border-subtle);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.editor-pane:last-child {
|
|
141
|
+
border-right: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.editor-pane.active {
|
|
145
|
+
border-top: 2px solid var(--color-accent-blue);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.tab-bar {
|
|
149
|
+
display: flex;
|
|
150
|
+
background-color: var(--color-surface-elevated);
|
|
151
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
152
|
+
min-height: 35px;
|
|
153
|
+
align-items: center;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.tab-item {
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
border-right: 1px solid var(--color-border-subtle);
|
|
162
|
+
background-color: var(--color-surface-elevated);
|
|
163
|
+
color: var(--color-text-secondary);
|
|
164
|
+
transition: all 0.2s ease;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.tab-item:hover {
|
|
168
|
+
background-color: var(--color-surface-primary);
|
|
169
|
+
color: var(--color-text-primary);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.tab-item.active {
|
|
173
|
+
background-color: var(--color-surface-primary);
|
|
174
|
+
color: var(--color-text-primary);
|
|
175
|
+
border-bottom: 2px solid var(--color-accent-blue);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.tab-title {
|
|
179
|
+
margin-left: var(--spacing-sm, 0.5rem);
|
|
180
|
+
margin-right: var(--spacing-sm, 0.5rem);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.close-tab-btn {
|
|
184
|
+
background: none;
|
|
185
|
+
border: none;
|
|
186
|
+
color: var(--color-text-secondary);
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
padding: 2px;
|
|
189
|
+
border-radius: 2px;
|
|
190
|
+
transition: all 0.2s ease;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.close-tab-btn:hover {
|
|
194
|
+
background-color: var(--color-status-error);
|
|
195
|
+
color: var(--color-text-inverse);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.tab-content {
|
|
199
|
+
flex: 1;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Panel */
|
|
204
|
+
.panel {
|
|
205
|
+
grid-area: panel;
|
|
206
|
+
background-color: var(--color-surface-elevated);
|
|
207
|
+
border-top: 1px solid var(--color-border-subtle);
|
|
208
|
+
border-right: 1px solid var(--color-border-subtle);
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.panel.hidden {
|
|
213
|
+
display: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.panel-header {
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
height: 35px;
|
|
220
|
+
background-color: var(--color-surface-elevated);
|
|
221
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.panel-tabs {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex: 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.panel-tab {
|
|
230
|
+
padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
|
|
231
|
+
background: none;
|
|
232
|
+
border: none;
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
color: var(--color-text-secondary);
|
|
235
|
+
transition: all 0.2s ease;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.panel-tab:hover {
|
|
239
|
+
color: var(--color-text-primary);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.panel-tab.active {
|
|
243
|
+
color: var(--color-text-primary);
|
|
244
|
+
border-bottom: 2px solid var(--color-accent-blue);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.panel-content {
|
|
248
|
+
height: calc(100% - 35px);
|
|
249
|
+
overflow-y: auto;
|
|
250
|
+
padding: var(--spacing-md, 1rem);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Status Bar */
|
|
254
|
+
.status-bar {
|
|
255
|
+
grid-area: status-bar;
|
|
256
|
+
background-color: var(--color-accent-blue);
|
|
257
|
+
color: var(--color-text-inverse);
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
justify-content: space-between;
|
|
261
|
+
padding: 0 var(--spacing-md, 1rem);
|
|
262
|
+
font-size: var(--text-sm, 0.875rem);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.status-bar-left,
|
|
266
|
+
.status-bar-right {
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.status-bar-item {
|
|
272
|
+
margin-right: var(--spacing-md, 1rem);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* Top Bar */
|
|
276
|
+
.top-bar {
|
|
277
|
+
grid-area: top-bar;
|
|
278
|
+
background-color: var(--color-surface-elevated);
|
|
279
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
justify-content: space-between;
|
|
283
|
+
padding: 0 var(--spacing-md, 1rem);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.top-bar-section {
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.top-bar-button {
|
|
292
|
+
background: none;
|
|
293
|
+
border: none;
|
|
294
|
+
padding: var(--spacing-sm, 0.5rem);
|
|
295
|
+
cursor: pointer;
|
|
296
|
+
color: var(--color-text-secondary);
|
|
297
|
+
border-radius: 4px;
|
|
298
|
+
transition: all 0.2s ease;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.top-bar-button:hover {
|
|
302
|
+
background-color: var(--color-surface-primary);
|
|
303
|
+
color: var(--color-text-primary);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Resizers */
|
|
307
|
+
.sidebar-resizer,
|
|
308
|
+
.h-resizer {
|
|
309
|
+
background-color: var(--color-border-subtle);
|
|
310
|
+
cursor: col-resize;
|
|
311
|
+
width: 1px;
|
|
312
|
+
transition: background-color 0.2s ease;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.sidebar-resizer:hover,
|
|
316
|
+
.h-resizer:hover {
|
|
317
|
+
background-color: var(--color-accent-blue);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.h-resizer {
|
|
321
|
+
cursor: row-resize;
|
|
322
|
+
height: 1px;
|
|
323
|
+
width: 100%;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Drag and Drop */
|
|
327
|
+
.dragging {
|
|
328
|
+
opacity: 0.5;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.drop-overlay {
|
|
332
|
+
position: absolute;
|
|
333
|
+
top: 0;
|
|
334
|
+
left: 0;
|
|
335
|
+
right: 0;
|
|
336
|
+
bottom: 0;
|
|
337
|
+
background-color: rgba(59, 130, 246, 0.1);
|
|
338
|
+
border: 2px dashed var(--color-accent-blue);
|
|
339
|
+
display: flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
justify-content: center;
|
|
342
|
+
font-weight: 600;
|
|
343
|
+
color: var(--color-accent-blue);
|
|
344
|
+
z-index: 1000;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.drop-indicator {
|
|
348
|
+
position: absolute;
|
|
349
|
+
top: 0;
|
|
350
|
+
bottom: 0;
|
|
351
|
+
width: 2px;
|
|
352
|
+
background-color: var(--color-accent-blue);
|
|
353
|
+
z-index: 1000;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* Responsive design */
|
|
357
|
+
@media (max-width: 768px) {
|
|
358
|
+
.workbench-grid {
|
|
359
|
+
grid-template-columns: var(--activity-bar-width) 1fr;
|
|
360
|
+
grid-template-areas:
|
|
361
|
+
"top-bar top-bar"
|
|
362
|
+
"activity-bar main"
|
|
363
|
+
"activity-bar panel"
|
|
364
|
+
"status-bar status-bar";
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.sidebar,
|
|
368
|
+
.sidebar-right {
|
|
369
|
+
position: fixed;
|
|
370
|
+
top: var(--top-bar-height);
|
|
371
|
+
bottom: var(--status-bar-height);
|
|
372
|
+
left: var(--activity-bar-width);
|
|
373
|
+
width: 300px;
|
|
374
|
+
z-index: 1000;
|
|
375
|
+
box-shadow: var(--shadow-lg);
|
|
376
|
+
transform: translateX(-100%);
|
|
377
|
+
transition: transform 0.3s ease;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.sidebar.visible {
|
|
381
|
+
transform: translateX(0);
|
|
382
|
+
}
|
|
383
|
+
}
|
package/src/globals.d.ts
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// utils
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Este es el punto de entrada público para la librería @decido/ui-kit.
|
|
5
|
+
* Exporta las clases de los componentes para que puedan ser usadas para tipado
|
|
6
|
+
* o extensión en otros paquetes, e importa los archivos para asegurar
|
|
7
|
+
* que se ejecute `customElements.define` (efecto secundario).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// --- Componentes Reutilizables ---
|
|
11
|
+
// Se exportan tanto la clase (para tipado) como el módulo (para registro).
|
|
12
|
+
|
|
13
|
+
// export * from './components/card/DecidoCard.js';
|
|
14
|
+
import WelcomeView from './components/WelcomeView';
|
|
15
|
+
import LoginView from './components/LoginView';
|
|
16
|
+
import DebugPanel from './components/DebugPanel';
|
|
17
|
+
import DebugPanelManager from './components/DebugPanelManager';
|
|
18
|
+
import ColorPicker from './components/theming/ColorPicker';
|
|
19
|
+
import ThemePanel from './components/theming/ThemePanel';
|
|
20
|
+
|
|
21
|
+
export { WelcomeView, LoginView, DebugPanel, DebugPanelManager, ColorPicker, ThemePanel };
|
|
22
|
+
|
|
23
|
+
// --- Componentes Complejos o de Secciones ---
|
|
24
|
+
// (Puede que solo necesites importarlos para registro si no se usan directamente)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"counter.d.ts","sourceRoot":"","sources":["counter.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,OAAO,EAAE,iBAAiB,QAQtD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function setupCounter(element) {
|
|
2
|
+
var counter = 0;
|
|
3
|
+
var setCounter = function (count) {
|
|
4
|
+
counter = count;
|
|
5
|
+
element.innerText = "count is ".concat(counter);
|
|
6
|
+
};
|
|
7
|
+
element.addEventListener("click", function () { return setCounter(++counter); });
|
|
8
|
+
setCounter(0);
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function setupCounter(element: HTMLButtonElement) {
|
|
2
|
+
let counter = 0;
|
|
3
|
+
const setCounter = (count: number) => {
|
|
4
|
+
counter = count;
|
|
5
|
+
element.innerText = `count is ${counter}`;
|
|
6
|
+
};
|
|
7
|
+
element.addEventListener("click", () => setCounter(++counter));
|
|
8
|
+
setCounter(0);
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"outDir": "dist",
|
|
6
|
+
"rootDir": "src",
|
|
7
|
+
"strict": false,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": false,
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"allowSyntheticDefaultImports": true,
|
|
16
|
+
"lib": [
|
|
17
|
+
"DOM",
|
|
18
|
+
"ES2020"
|
|
19
|
+
],
|
|
20
|
+
"types": [
|
|
21
|
+
"react"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"include": [
|
|
25
|
+
"src/globals.d.ts",
|
|
26
|
+
"src/**/*.ts",
|
|
27
|
+
"src/**/*.tsx",
|
|
28
|
+
"src/index.ts",
|
|
29
|
+
"../typescript-config/global.d.ts"
|
|
30
|
+
],
|
|
31
|
+
"exclude": [
|
|
32
|
+
"node_modules",
|
|
33
|
+
"dist"
|
|
34
|
+
]
|
|
35
|
+
}
|