@flexkit/desk 0.0.19 → 0.0.20

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/dist/index.css CHANGED
@@ -1,641 +1,252 @@
1
- /*
2
- ! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com
3
- */
4
-
5
- /*
6
- 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
7
- 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
8
- */
9
-
10
- *,
11
- ::before,
12
- ::after {
13
- box-sizing: border-box;
14
- /* 1 */
15
- border-width: 0;
16
- /* 2 */
17
- border-style: solid;
18
- /* 2 */
19
- border-color: #e5e7eb;
20
- /* 2 */
21
- }
22
-
23
- ::before,
24
- ::after {
25
- --tw-content: '';
26
- }
27
-
28
- /*
29
- 1. Use a consistent sensible line-height in all browsers.
30
- 2. Prevent adjustments of font size after orientation changes in iOS.
31
- 3. Use a more readable tab size.
32
- 4. Use the user's configured `sans` font-family by default.
33
- 5. Use the user's configured `sans` font-feature-settings by default.
34
- 6. Use the user's configured `sans` font-variation-settings by default.
35
- 7. Disable tap highlights on iOS
36
- */
37
-
38
- html,
39
- :host {
40
- line-height: 1.5;
41
- /* 1 */
42
- -webkit-text-size-adjust: 100%;
43
- /* 2 */
44
- -moz-tab-size: 4;
45
- /* 3 */
46
- -o-tab-size: 4;
47
- tab-size: 4;
48
- /* 3 */
49
- font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
50
- /* 4 */
51
- font-feature-settings: normal;
52
- /* 5 */
53
- font-variation-settings: normal;
54
- /* 6 */
55
- -webkit-tap-highlight-color: transparent;
56
- /* 7 */
57
- }
58
-
59
- /*
60
- 1. Remove the margin in all browsers.
61
- 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
62
- */
63
-
64
- body {
65
- margin: 0;
66
- /* 1 */
67
- line-height: inherit;
68
- /* 2 */
69
- }
70
-
71
- /*
72
- 1. Add the correct height in Firefox.
73
- 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
74
- 3. Ensure horizontal rules are visible by default.
75
- */
76
-
77
- hr {
78
- height: 0;
79
- /* 1 */
80
- color: inherit;
81
- /* 2 */
82
- border-top-width: 1px;
83
- /* 3 */
84
- }
85
-
86
- /*
87
- Add the correct text decoration in Chrome, Edge, and Safari.
88
- */
89
-
90
- abbr:where([title]) {
91
- -webkit-text-decoration: underline dotted;
92
- text-decoration: underline dotted;
93
- }
94
-
95
- /*
96
- Remove the default font size and weight for headings.
97
- */
98
-
99
- h1,
100
- h2,
101
- h3,
102
- h4,
103
- h5,
104
- h6 {
105
- font-size: inherit;
106
- font-weight: inherit;
107
- }
108
-
109
- /*
110
- Reset links to optimize for opt-in styling instead of opt-out.
111
- */
112
-
113
- a {
114
- color: inherit;
115
- text-decoration: inherit;
116
- }
117
-
118
- /*
119
- Add the correct font weight in Edge and Safari.
120
- */
121
-
122
- b,
123
- strong {
124
- font-weight: bolder;
125
- }
126
-
127
- /*
128
- 1. Use the user's configured `mono` font-family by default.
129
- 2. Use the user's configured `mono` font-feature-settings by default.
130
- 3. Use the user's configured `mono` font-variation-settings by default.
131
- 4. Correct the odd `em` font sizing in all browsers.
132
- */
133
-
134
- code,
135
- kbd,
136
- samp,
137
- pre {
138
- font-family: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
139
- /* 1 */
140
- font-feature-settings: normal;
141
- /* 2 */
142
- font-variation-settings: normal;
143
- /* 3 */
144
- font-size: 1em;
145
- /* 4 */
146
- }
147
-
148
- /*
149
- Add the correct font size in all browsers.
150
- */
151
-
152
- small {
153
- font-size: 80%;
154
- }
155
-
156
- /*
157
- Prevent `sub` and `sup` elements from affecting the line height in all browsers.
158
- */
159
-
160
- sub,
161
- sup {
162
- font-size: 75%;
163
- line-height: 0;
164
- position: relative;
165
- vertical-align: baseline;
166
- }
167
-
168
- sub {
169
- bottom: -0.25em;
170
- }
171
-
172
- sup {
173
- top: -0.5em;
174
- }
175
-
176
- /*
177
- 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
178
- 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
179
- 3. Remove gaps between table borders by default.
180
- */
181
-
182
- table {
183
- text-indent: 0;
184
- /* 1 */
185
- border-color: inherit;
186
- /* 2 */
187
- border-collapse: collapse;
188
- /* 3 */
189
- }
190
-
191
- /*
192
- 1. Change the font styles in all browsers.
193
- 2. Remove the margin in Firefox and Safari.
194
- 3. Remove default padding in all browsers.
195
- */
196
-
197
- button,
198
- input,
199
- optgroup,
200
- select,
201
- textarea {
202
- font-family: inherit;
203
- /* 1 */
204
- font-feature-settings: inherit;
205
- /* 1 */
206
- font-variation-settings: inherit;
207
- /* 1 */
208
- font-size: 100%;
209
- /* 1 */
210
- font-weight: inherit;
211
- /* 1 */
212
- line-height: inherit;
213
- /* 1 */
214
- letter-spacing: inherit;
215
- /* 1 */
216
- color: inherit;
217
- /* 1 */
218
- margin: 0;
219
- /* 2 */
220
- padding: 0;
221
- /* 3 */
222
- }
223
-
224
- /*
225
- Remove the inheritance of text transform in Edge and Firefox.
226
- */
227
-
228
- button,
229
- select {
230
- text-transform: none;
231
- }
232
-
233
- /*
234
- 1. Correct the inability to style clickable types in iOS and Safari.
235
- 2. Remove default button styles.
236
- */
237
-
238
- button,
239
- input:where([type='button']),
240
- input:where([type='reset']),
241
- input:where([type='submit']) {
242
- -webkit-appearance: button;
243
- /* 1 */
244
- background-color: transparent;
245
- /* 2 */
246
- background-image: none;
247
- /* 2 */
248
- }
249
-
250
- /*
251
- Use the modern Firefox focus style for all focusable elements.
252
- */
253
-
254
- :-moz-focusring {
255
- outline: auto;
256
- }
257
-
258
- /*
259
- Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
260
- */
261
-
262
- :-moz-ui-invalid {
263
- box-shadow: none;
264
- }
265
-
266
- /*
267
- Add the correct vertical alignment in Chrome and Firefox.
268
- */
269
-
270
- progress {
271
- vertical-align: baseline;
272
- }
273
-
274
- /*
275
- Correct the cursor style of increment and decrement buttons in Safari.
276
- */
277
-
278
- ::-webkit-inner-spin-button,
279
- ::-webkit-outer-spin-button {
280
- height: auto;
281
- }
282
-
283
- /*
284
- 1. Correct the odd appearance in Chrome and Safari.
285
- 2. Correct the outline style in Safari.
286
- */
287
-
288
- [type='search'] {
289
- -webkit-appearance: textfield;
290
- /* 1 */
291
- outline-offset: -2px;
292
- /* 2 */
293
- }
294
-
295
- /*
296
- Remove the inner padding in Chrome and Safari on macOS.
297
- */
298
-
299
- ::-webkit-search-decoration {
300
- -webkit-appearance: none;
301
- }
302
-
303
- /*
304
- 1. Correct the inability to style clickable types in iOS and Safari.
305
- 2. Change font properties to `inherit` in Safari.
306
- */
307
-
308
- ::-webkit-file-upload-button {
309
- -webkit-appearance: button;
310
- /* 1 */
311
- font: inherit;
312
- /* 2 */
313
- }
314
-
315
- /*
316
- Add the correct display in Chrome and Safari.
317
- */
318
-
319
- summary {
320
- display: list-item;
321
- }
322
-
323
- /*
324
- Removes the default spacing and border for appropriate elements.
325
- */
326
-
327
- blockquote,
328
- dl,
329
- dd,
330
- h1,
331
- h2,
332
- h3,
333
- h4,
334
- h5,
335
- h6,
336
- hr,
337
- figure,
338
- p,
339
- pre {
340
- margin: 0;
341
- }
342
-
343
- fieldset {
344
- margin: 0;
345
- padding: 0;
346
- }
347
-
348
- legend {
349
- padding: 0;
350
- }
351
-
352
- ol,
353
- ul,
354
- menu {
355
- list-style: none;
356
- margin: 0;
357
- padding: 0;
358
- }
359
-
360
- /*
361
- Reset default styling for dialogs.
362
- */
363
-
364
- dialog {
365
- padding: 0;
366
- }
367
-
368
- /*
369
- Prevent resizing textareas horizontally by default.
370
- */
371
-
372
- textarea {
373
- resize: vertical;
374
- }
375
-
376
- /*
377
- 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
378
- 2. Set the default placeholder color to the user's configured gray 400 color.
379
- */
380
-
381
- input::-moz-placeholder, textarea::-moz-placeholder {
382
- opacity: 1;
383
- /* 1 */
384
- color: #9ca3af;
385
- /* 2 */
386
- }
387
-
388
- input::placeholder,
389
- textarea::placeholder {
390
- opacity: 1;
391
- /* 1 */
392
- color: #9ca3af;
393
- /* 2 */
394
- }
395
-
396
- /*
397
- Set the default cursor for buttons.
398
- */
399
-
400
- button,
401
- [role="button"] {
402
- cursor: pointer;
403
- }
404
-
405
- /*
406
- Make sure disabled buttons don't get the pointer cursor.
407
- */
408
-
409
- :disabled {
410
- cursor: default;
411
- }
412
-
413
- /*
414
- 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
415
- 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
416
- This can trigger a poorly considered lint error in some tools but is included by design.
417
- */
418
-
419
- img,
420
- svg,
421
- video,
422
- canvas,
423
- audio,
424
- iframe,
425
- embed,
426
- object {
427
- display: block;
428
- /* 1 */
429
- vertical-align: middle;
430
- /* 2 */
431
- }
432
-
433
- /*
434
- Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
435
- */
436
-
437
- img,
438
- video {
439
- max-width: 100%;
440
- height: auto;
441
- }
442
-
443
- /* Make elements with the HTML hidden attribute stay hidden by default */
444
-
445
- [hidden] {
446
- display: none;
447
- }
448
-
449
- *, ::before, ::after {
450
- --tw-border-spacing-x: 0;
451
- --tw-border-spacing-y: 0;
452
- --tw-translate-x: 0;
453
- --tw-translate-y: 0;
454
- --tw-rotate: 0;
455
- --tw-skew-x: 0;
456
- --tw-skew-y: 0;
457
- --tw-scale-x: 1;
458
- --tw-scale-y: 1;
459
- --tw-pan-x: ;
460
- --tw-pan-y: ;
461
- --tw-pinch-zoom: ;
462
- --tw-scroll-snap-strictness: proximity;
463
- --tw-gradient-from-position: ;
464
- --tw-gradient-via-position: ;
465
- --tw-gradient-to-position: ;
466
- --tw-ordinal: ;
467
- --tw-slashed-zero: ;
468
- --tw-numeric-figure: ;
469
- --tw-numeric-spacing: ;
470
- --tw-numeric-fraction: ;
471
- --tw-ring-inset: ;
472
- --tw-ring-offset-width: 0px;
473
- --tw-ring-offset-color: #fff;
474
- --tw-ring-color: rgb(59 130 246 / 0.5);
475
- --tw-ring-offset-shadow: 0 0 #0000;
476
- --tw-ring-shadow: 0 0 #0000;
477
- --tw-shadow: 0 0 #0000;
478
- --tw-shadow-colored: 0 0 #0000;
479
- --tw-blur: ;
480
- --tw-brightness: ;
481
- --tw-contrast: ;
482
- --tw-grayscale: ;
483
- --tw-hue-rotate: ;
484
- --tw-invert: ;
485
- --tw-saturate: ;
486
- --tw-sepia: ;
487
- --tw-drop-shadow: ;
488
- --tw-backdrop-blur: ;
489
- --tw-backdrop-brightness: ;
490
- --tw-backdrop-contrast: ;
491
- --tw-backdrop-grayscale: ;
492
- --tw-backdrop-hue-rotate: ;
493
- --tw-backdrop-invert: ;
494
- --tw-backdrop-opacity: ;
495
- --tw-backdrop-saturate: ;
496
- --tw-backdrop-sepia: ;
497
- --tw-contain-size: ;
498
- --tw-contain-layout: ;
499
- --tw-contain-paint: ;
500
- --tw-contain-style: ;
501
- }
502
-
503
- ::backdrop {
504
- --tw-border-spacing-x: 0;
505
- --tw-border-spacing-y: 0;
506
- --tw-translate-x: 0;
507
- --tw-translate-y: 0;
508
- --tw-rotate: 0;
509
- --tw-skew-x: 0;
510
- --tw-skew-y: 0;
511
- --tw-scale-x: 1;
512
- --tw-scale-y: 1;
513
- --tw-pan-x: ;
514
- --tw-pan-y: ;
515
- --tw-pinch-zoom: ;
516
- --tw-scroll-snap-strictness: proximity;
517
- --tw-gradient-from-position: ;
518
- --tw-gradient-via-position: ;
519
- --tw-gradient-to-position: ;
520
- --tw-ordinal: ;
521
- --tw-slashed-zero: ;
522
- --tw-numeric-figure: ;
523
- --tw-numeric-spacing: ;
524
- --tw-numeric-fraction: ;
525
- --tw-ring-inset: ;
526
- --tw-ring-offset-width: 0px;
527
- --tw-ring-offset-color: #fff;
528
- --tw-ring-color: rgb(59 130 246 / 0.5);
529
- --tw-ring-offset-shadow: 0 0 #0000;
530
- --tw-ring-shadow: 0 0 #0000;
531
- --tw-shadow: 0 0 #0000;
532
- --tw-shadow-colored: 0 0 #0000;
533
- --tw-blur: ;
534
- --tw-brightness: ;
535
- --tw-contrast: ;
536
- --tw-grayscale: ;
537
- --tw-hue-rotate: ;
538
- --tw-invert: ;
539
- --tw-saturate: ;
540
- --tw-sepia: ;
541
- --tw-drop-shadow: ;
542
- --tw-backdrop-blur: ;
543
- --tw-backdrop-brightness: ;
544
- --tw-backdrop-contrast: ;
545
- --tw-backdrop-grayscale: ;
546
- --tw-backdrop-hue-rotate: ;
547
- --tw-backdrop-invert: ;
548
- --tw-backdrop-opacity: ;
549
- --tw-backdrop-saturate: ;
550
- --tw-backdrop-sepia: ;
551
- --tw-contain-size: ;
552
- --tw-contain-layout: ;
553
- --tw-contain-paint: ;
554
- --tw-contain-style: ;
555
- }
556
-
557
- .-fk-ml-1 {
558
- margin-left: -0.25rem;
559
- }
560
-
561
- .fk-mb-4 {
562
- margin-bottom: 1rem;
1
+ /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --fk-spacing: 0.25rem;
7
+ --fk-text-lg: 1.125rem;
8
+ --fk-text-lg--line-height: calc(1.75 / 1.125);
9
+ --fk-font-weight-semibold: 600;
10
+ --fk-tracking-tight: -0.025em;
11
+ --fk-default-font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
12
+ --fk-default-mono-font-family: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
13
+ }
563
14
  }
564
-
565
- .fk-flex {
566
- display: flex;
15
+ @layer base {
16
+ *, ::after, ::before, ::backdrop, ::file-selector-button {
17
+ box-sizing: border-box;
18
+ margin: 0;
19
+ padding: 0;
20
+ border: 0 solid;
21
+ }
22
+ html, :host {
23
+ line-height: 1.5;
24
+ -webkit-text-size-adjust: 100%;
25
+ tab-size: 4;
26
+ font-family: var(--fk-default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
27
+ font-feature-settings: var(--fk-default-font-feature-settings, normal);
28
+ font-variation-settings: var(--fk-default-font-variation-settings, normal);
29
+ -webkit-tap-highlight-color: transparent;
30
+ }
31
+ hr {
32
+ height: 0;
33
+ color: inherit;
34
+ border-top-width: 1px;
35
+ }
36
+ abbr:where([title]) {
37
+ -webkit-text-decoration: underline dotted;
38
+ text-decoration: underline dotted;
39
+ }
40
+ h1, h2, h3, h4, h5, h6 {
41
+ font-size: inherit;
42
+ font-weight: inherit;
43
+ }
44
+ a {
45
+ color: inherit;
46
+ -webkit-text-decoration: inherit;
47
+ text-decoration: inherit;
48
+ }
49
+ b, strong {
50
+ font-weight: bolder;
51
+ }
52
+ code, kbd, samp, pre {
53
+ font-family: var(--fk-default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
54
+ font-feature-settings: var(--fk-default-mono-font-feature-settings, normal);
55
+ font-variation-settings: var(--fk-default-mono-font-variation-settings, normal);
56
+ font-size: 1em;
57
+ }
58
+ small {
59
+ font-size: 80%;
60
+ }
61
+ sub, sup {
62
+ font-size: 75%;
63
+ line-height: 0;
64
+ position: relative;
65
+ vertical-align: baseline;
66
+ }
67
+ sub {
68
+ bottom: -0.25em;
69
+ }
70
+ sup {
71
+ top: -0.5em;
72
+ }
73
+ table {
74
+ text-indent: 0;
75
+ border-color: inherit;
76
+ border-collapse: collapse;
77
+ }
78
+ :-moz-focusring {
79
+ outline: auto;
80
+ }
81
+ progress {
82
+ vertical-align: baseline;
83
+ }
84
+ summary {
85
+ display: list-item;
86
+ }
87
+ ol, ul, menu {
88
+ list-style: none;
89
+ }
90
+ img, svg, video, canvas, audio, iframe, embed, object {
91
+ display: block;
92
+ vertical-align: middle;
93
+ }
94
+ img, video {
95
+ max-width: 100%;
96
+ height: auto;
97
+ }
98
+ button, input, select, optgroup, textarea, ::file-selector-button {
99
+ font: inherit;
100
+ font-feature-settings: inherit;
101
+ font-variation-settings: inherit;
102
+ letter-spacing: inherit;
103
+ color: inherit;
104
+ border-radius: 0;
105
+ background-color: transparent;
106
+ opacity: 1;
107
+ }
108
+ :where(select:is([multiple], [size])) optgroup {
109
+ font-weight: bolder;
110
+ }
111
+ :where(select:is([multiple], [size])) optgroup option {
112
+ padding-inline-start: 20px;
113
+ }
114
+ ::file-selector-button {
115
+ margin-inline-end: 4px;
116
+ }
117
+ ::placeholder {
118
+ opacity: 1;
119
+ }
120
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
121
+ ::placeholder {
122
+ color: currentcolor;
123
+ @supports (color: color-mix(in lab, red, red)) {
124
+ color: color-mix(in oklab, currentcolor 50%, transparent);
125
+ }
126
+ }
127
+ }
128
+ textarea {
129
+ resize: vertical;
130
+ }
131
+ ::-webkit-search-decoration {
132
+ -webkit-appearance: none;
133
+ }
134
+ ::-webkit-date-and-time-value {
135
+ min-height: 1lh;
136
+ text-align: inherit;
137
+ }
138
+ ::-webkit-datetime-edit {
139
+ display: inline-flex;
140
+ }
141
+ ::-webkit-datetime-edit-fields-wrapper {
142
+ padding: 0;
143
+ }
144
+ ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
145
+ padding-block: 0;
146
+ }
147
+ ::-webkit-calendar-picker-indicator {
148
+ line-height: 1;
149
+ }
150
+ :-moz-ui-invalid {
151
+ box-shadow: none;
152
+ }
153
+ button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
154
+ appearance: button;
155
+ }
156
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
157
+ height: auto;
158
+ }
159
+ [hidden]:where(:not([hidden="until-found"])) {
160
+ display: none !important;
161
+ }
567
162
  }
568
-
569
- .fk-h-4 {
570
- height: 1rem;
163
+ @layer utilities {
164
+ .fk\:mb-4 {
165
+ margin-bottom: calc(var(--fk-spacing) * 4);
166
+ }
167
+ .fk\:-ml-1 {
168
+ margin-left: calc(var(--fk-spacing) * -1);
169
+ }
170
+ .fk\:flex {
171
+ display: flex;
172
+ }
173
+ .fk\:h-4 {
174
+ height: calc(var(--fk-spacing) * 4);
175
+ }
176
+ .fk\:h-full {
177
+ height: 100%;
178
+ }
179
+ .fk\:w-4 {
180
+ width: calc(var(--fk-spacing) * 4);
181
+ }
182
+ .fk\:w-full {
183
+ width: 100%;
184
+ }
185
+ .fk\:flex-col {
186
+ flex-direction: column;
187
+ }
188
+ .fk\:items-center {
189
+ align-items: center;
190
+ }
191
+ .fk\:gap-2 {
192
+ gap: calc(var(--fk-spacing) * 2);
193
+ }
194
+ .fk\:px-4 {
195
+ padding-inline: calc(var(--fk-spacing) * 4);
196
+ }
197
+ .fk\:pt-3 {
198
+ padding-top: calc(var(--fk-spacing) * 3);
199
+ }
200
+ .fk\:text-lg {
201
+ font-size: var(--fk-text-lg);
202
+ line-height: var(--tw-leading, var(--fk-text-lg--line-height));
203
+ }
204
+ .fk\:leading-none {
205
+ --tw-leading: 1;
206
+ line-height: 1;
207
+ }
208
+ .fk\:font-semibold {
209
+ --tw-font-weight: var(--fk-font-weight-semibold);
210
+ font-weight: var(--fk-font-weight-semibold);
211
+ }
212
+ .fk\:tracking-tight {
213
+ --tw-tracking: var(--fk-tracking-tight);
214
+ letter-spacing: var(--fk-tracking-tight);
215
+ }
571
216
  }
572
-
573
- .fk-h-full {
217
+ html, body {
574
218
  height: 100%;
575
219
  }
576
-
577
- .fk-w-4 {
578
- width: 1rem;
579
- }
580
-
581
- .fk-w-full {
582
- width: 100%;
583
- }
584
-
585
- .fk-flex-col {
586
- flex-direction: column;
587
- }
588
-
589
- .fk-items-center {
590
- align-items: center;
591
- }
592
-
593
- .fk-gap-2 {
594
- gap: 0.5rem;
595
- }
596
-
597
- .fk-px-4 {
598
- padding-left: 1rem;
599
- padding-right: 1rem;
600
- }
601
-
602
- .fk-py-3 {
603
- padding-top: 0.75rem;
604
- padding-bottom: 0.75rem;
605
- }
606
-
607
- .fk-text-lg {
608
- font-size: 1.125rem;
609
- line-height: 1.75rem;
610
- }
611
-
612
- .fk-font-semibold {
613
- font-weight: 600;
614
- }
615
-
616
- .fk-leading-none {
617
- line-height: 1;
618
- }
619
-
620
- .fk-tracking-tight {
621
- letter-spacing: -0.025em;
622
- }
623
-
624
220
  @keyframes enter {
625
221
  from {
626
222
  opacity: var(--tw-enter-opacity, 1);
627
223
  transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));
628
224
  }
629
225
  }
630
-
631
226
  @keyframes exit {
632
227
  to {
633
228
  opacity: var(--tw-exit-opacity, 1);
634
229
  transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
635
230
  }
636
231
  }
637
-
638
- html,
639
- body {
640
- height: 100%;
232
+ @property --tw-leading {
233
+ syntax: "*";
234
+ inherits: false;
235
+ }
236
+ @property --tw-font-weight {
237
+ syntax: "*";
238
+ inherits: false;
239
+ }
240
+ @property --tw-tracking {
241
+ syntax: "*";
242
+ inherits: false;
243
+ }
244
+ @layer properties {
245
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
246
+ *, ::before, ::after, ::backdrop {
247
+ --tw-leading: initial;
248
+ --tw-font-weight: initial;
249
+ --tw-tracking: initial;
250
+ }
251
+ }
641
252
  }
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import'./index.css';import {Layout}from'lucide-react';import {find,propEq}from'ramda';import {useParams,useLocation,useAppContext,useGraphQLError,useConfig,getEntitySchema,useGridColumnsDefinition,useEntityQuery,ProjectDisabled,SchemaError,DataTable,DataTableToolbar,Outlet,useAuth,DataTableRowActions}from'@flexkit/studio';import {Tooltip,TooltipTrigger,SidebarTrigger,TooltipContent,Separator,SidebarProvider,Sidebar,SidebarInset,Skeleton}from'@flexkit/studio/ui';import {jsx,jsxs}from'react/jsx-runtime';import {useCallback}from'react';var H="flexkit:sidebar:state";function E(){let[,t]=useAuth(),{projects:o,currentProjectId:r}=useConfig(),{schema:a,menuGroups:f}=find(propEq(r??"","projectId"))(o),u=document.cookie.split("; ").find(p=>p.startsWith(`${H}=`))?.split("=")[1]!=="false";return jsxs(SidebarProvider,{defaultOpen:u,children:[jsx(Sidebar,{schema:a,menuGroups:f}),jsx(SidebarInset,{children:jsx(Outlet,{})})]})}var c=25;function x(){let{entity:t}=useParams(),{search:o}=useLocation(),a=new URLSearchParams(o).get("id"),{scope:f}=useAppContext(),{schemaErrorMessage:u}=useGraphQLError(),{projects:p,currentProjectId:P}=useConfig(),{schema:h}=find(propEq(P??"","projectId"))(p),n=getEntitySchema(h,t??""),y=useGridColumnsDefinition({attributesSchema:n?.attributes??[],actionsComponent:i=>pt({entityName:n?.name??"",entityNamePlural:t??"",row:i}),checkboxSelect:"multiple"}),C=a?{where:{_id:a}}:{options:{offset:0,limit:c}},{isLoading:l,fetchMore:b,count:d,data:s,isProjectDisabled:D}=useEntityQuery({entityNamePlural:t??"",schema:h,scope:f,variables:C}),T=useCallback(i=>{let S=s?.length??0;if(i&&d>0&&S>0){let{scrollHeight:A,scrollTop:L,clientHeight:I}=i;A-L-I<500&&!l&&S<d&&b({variables:{options:{offset:s?.length??0,limit:c}}});}},[d,s?.length,b,l]),v=Array(c).fill({}),w=dt(y);return D?jsx("div",{className:"fk-flex fk-flex-col fk-h-full fk-px-4 fk-py-3",children:jsx(ProjectDisabled,{})}):jsxs("div",{className:"fk-flex fk-flex-col fk-h-full fk-px-4 fk-py-3",children:[jsx(SchemaError,{}),jsxs("div",{className:"fk-flex fk-items-center fk-mb-4 fk-gap-2",children:[jsxs(Tooltip,{children:[jsx(TooltipTrigger,{asChild:true,children:jsx(SidebarTrigger,{className:"-fk-ml-1 fk-w-4 fk-h-4"})}),jsx(TooltipContent,{children:"Toggle Sidebar"})]}),jsx(Separator,{orientation:"vertical",className:"fk-h-4"}),jsx("h2",{className:"fk-text-lg fk-font-semibold fk-leading-none fk-tracking-tight",children:ut(n?.menu?.label??n?.plural??"")})]}),u?null:jsx(DataTable,{columns:l?w:y,data:l?v:s??[],entityName:n?.name??"",pageSize:c,onScroll:i=>{T(i.target);},toolbarComponent:i=>jsx(DataTableToolbar,{entityName:n?.name??"",table:i})}),jsx(Outlet,{})]})}function ut(t){return t.charAt(0).toUpperCase()+t.slice(1)}function pt({entityName:t,entityNamePlural:o,row:r}){return jsx(DataTableRowActions,{entityName:t,entityNamePlural:o,row:r})}function dt(t){return t.map(o=>({...o,cell:()=>jsx(Skeleton,{className:"fk-h-4 fk-w-full",style:{marginTop:"7px",marginBottom:"6px"}})}))}function N(){let{entity:t,id:o}=useParams();return jsxs("div",{className:"flex flex-col",children:["Edit ",t," with id: ",o]})}function Mt(){return {name:"flexkit.desk",contributes:{apps:[{name:"desk",icon:jsx(Layout,{strokeWidth:1.5}),title:"Desk",component:jsx(E,{}),routes:[{path:"list/:entity",component:jsx(x,{}),children:[{path:"edit/:id",component:jsx(N,{})}]}]}]}}}export{Mt as Desk};//# sourceMappingURL=index.js.map
1
+ import'./index.css';import {Layout}from'lucide-react';import {find,propEq}from'ramda';import {useParams,useLocation,useAppContext,useGraphQLError,useConfig,getEntitySchema,useGridColumnsDefinition,useEntityQuery,ProjectDisabled,SchemaError,DataTable,DataTableToolbar,Outlet,useAuth,DataTableRowActions}from'@flexkit/studio';import {Tooltip,TooltipTrigger,SidebarTrigger,TooltipContent,Separator,SidebarProvider,Sidebar,SidebarInset,Skeleton}from'@flexkit/studio/ui';import {jsx,jsxs}from'react/jsx-runtime';import {useCallback}from'react';var G="flexkit:sidebar:state";function E(){let[,t]=useAuth(),{projects:o,currentProjectId:a}=useConfig(),{schema:l,menuGroups:m}=find(propEq(a??"","projectId"))(o),f=document.cookie.split("; ").find(u=>u.startsWith(`${G}=`))?.split("=")[1]!=="false";return jsxs(SidebarProvider,{defaultOpen:f,children:[jsx(Sidebar,{schema:l,menuGroups:m}),jsx(SidebarInset,{children:jsx(Outlet,{})})]})}var s=25;function N(){let{entity:t}=useParams(),{search:o}=useLocation(),l=new URLSearchParams(o).get("id"),{scope:m}=useAppContext(),{schemaErrorMessage:f}=useGraphQLError(),{projects:u,currentProjectId:C}=useConfig(),{schema:h}=find(propEq(C??"","projectId"))(u),n=getEntitySchema(h,t??""),y=useGridColumnsDefinition({attributesSchema:n?.attributes??[],actionsComponent:i=>dt({entityName:n?.name??"",entityNamePlural:t??"",row:i}),checkboxSelect:"multiple"}),T=l?{where:{_id:l}}:{options:{offset:0,limit:s}},{isLoading:p,fetchMore:b,count:d,data:r,isProjectDisabled:D}=useEntityQuery({entityNamePlural:t??"",schema:h,scope:m,variables:T}),w=useCallback(i=>{let x=r?.length??0;if(i&&d>0&&x>0){let{scrollHeight:I,scrollTop:L,clientHeight:R}=i;I-L-R<500&&!p&&x<d&&b({variables:{options:{offset:r?.length??0,limit:s}}});}},[d,r?.length,b,p]),A=Array(s).fill({}),v=gt(y),S=p&&(r==null||r.length===0);return D?jsx("div",{className:"fk:flex fk:flex-col fk:h-full fk:px-4 fk:pt-3",children:jsx(ProjectDisabled,{})}):jsxs("div",{className:"fk:flex fk:flex-col fk:h-full fk:px-4 fk:pt-3",children:[jsx(SchemaError,{}),jsxs("div",{className:"fk:flex fk:items-center fk:mb-4 fk:gap-2",children:[jsxs(Tooltip,{children:[jsx(TooltipTrigger,{asChild:true,children:jsx(SidebarTrigger,{className:"fk:-ml-1 fk:w-4 fk:h-4"})}),jsx(TooltipContent,{children:"Toggle Sidebar"})]}),jsx(Separator,{orientation:"vertical",className:"fk:h-4"}),jsx("h2",{className:"fk:text-lg fk:font-semibold fk:leading-none fk:tracking-tight",children:pt(n?.menu?.label??n?.plural??"")})]}),f?null:jsx(DataTable,{columns:S?v:y,data:S?A:r??[],entityName:n?.name??"",pageSize:s,onScroll:i=>{w(i.currentTarget);},toolbarComponent:i=>jsx(DataTableToolbar,{entityName:n?.name??"",table:i})}),jsx(Outlet,{})]})}function pt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function dt({entityName:t,entityNamePlural:o,row:a}){return jsx(DataTableRowActions,{entityName:t,entityNamePlural:o,row:a})}function gt(t){return t.map(o=>({...o,cell:()=>jsx(Skeleton,{className:"fk:h-4 fk:w-full",style:{marginTop:"7px",marginBottom:"6px"}})}))}function P(){let{entity:t,id:o}=useParams();return jsxs("div",{className:"flex flex-col",children:["Edit ",t," with id: ",o]})}function _t(){return {name:"flexkit.desk",contributes:{apps:[{name:"desk",icon:jsx(Layout,{strokeWidth:1.5}),title:"Desk",component:jsx(E,{}),routes:[{path:"list/:entity",component:jsx(N,{}),children:[{path:"edit/:id",component:jsx(P,{})}]}]}]}}}export{_t as Desk};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.tsx","../src/list.tsx","../src/edit-entity.tsx","../src/index.tsx"],"names":["SIDEBAR_COOKIE_NAME","Root","auth","useAuth","projects","currentProjectId","useConfig","schema","menuGroups","find","propEq","defaultOpen","row","jsxs","SidebarProvider","jsx","Sidebar","SidebarInset","Outlet","pageSize","List","entityName","useParams","search","useLocation","entityId","scope","useAppContext","schemaErrorMessage","useGraphQLError","entitySchema","getEntitySchema","columnsDefinition","useGridColumnsDefinition","dataRowActions","variables","isLoading","fetchMore","count","data","isProjectDisabled","useEntityQuery","fetchMoreOnBottomReached","useCallback","containerRefElement","rowsCount","scrollHeight","scrollTop","clientHeight","loadingData","loadingColumns","getLoadingColumns","ProjectDisabled","SchemaError","Tooltip","TooltipTrigger","SidebarTrigger","TooltipContent","Separator","capitalize","DataTable","e","table","DataTableToolbar","str","entityNamePlural","DataTableRowActions","columns","column","Skeleton","EditEntity","entity","id","Desk","LayoutIcon"],"mappings":"2hBAKA,IAAMA,CAAAA,CAAsB,wBAErB,SAASC,CAAAA,EAAoB,CAClC,GAAM,EAAGC,CAAI,EAAIC,OAAAA,EAAQ,CACnB,CAAE,QAAA,CAAAC,EAAU,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,SAAAA,GACjC,CAAE,MAAA,CAAAC,CAAAA,CAAQ,UAAA,CAAAC,CAAW,CAAA,CAAIC,IAAAA,CAAKC,MAAAA,CAAOL,CAAAA,EAAoB,GAAI,WAAW,CAAC,CAAA,CAAED,CAAQ,EACnFO,CAAAA,CACJ,QAAA,CAAS,MAAA,CACN,KAAA,CAAM,IAAI,CAAA,CACV,IAAA,CAAMC,GAAQA,CAAAA,CAAI,UAAA,CAAW,GAAGZ,CAAmB,CAAA,CAAA,CAAG,CAAC,CAAA,EACtD,MAAM,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ACjB,MAAA,CAAQ,CACN,CACE,IAAA,CAAM,cAAA,CACN,UAAWc,GAAAA,CAACK,CAAAA,CAAA,EAAK,CAAA,CACjB,SAAU,CACR,CACE,IAAA,CAAM,UAAA,CACN,UAAWL,GAAAA,CAACuD,CAAAA,CAAA,EAAW,CACzB,CACF,CACF,CACF,CACF,CACF,CACF,CACF,CACF","file":"index.js","sourcesContent":["import { find, propEq } from 'ramda';\nimport { Outlet, useAuth, useConfig } from '@flexkit/studio';\nimport { Sidebar, SidebarInset, SidebarProvider } from '@flexkit/studio/ui';\nimport type { SingleProject } from '@flexkit/studio';\n\nconst SIDEBAR_COOKIE_NAME = 'flexkit:sidebar:state';\n\nexport function Root(): JSX.Element {\n const [, auth] = useAuth();\n const { projects, currentProjectId } = useConfig();\n const { schema, menuGroups } = find(propEq(currentProjectId ?? '', 'projectId'))(projects) as SingleProject;\n const defaultOpen =\n document.cookie\n .split('; ')\n .find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`))\n ?.split('=')[1] !== 'false';\n\n return (\n <SidebarProvider defaultOpen={defaultOpen}>\n <Sidebar schema={schema} menuGroups={menuGroups} />\n <SidebarInset>\n <Outlet />\n </SidebarInset>\n </SidebarProvider>\n );\n}\n","import { useCallback } from 'react';\nimport { find, propEq } from 'ramda';\nimport {\n getEntitySchema,\n useAppContext,\n useConfig,\n useLocation,\n useParams,\n Outlet,\n useEntityQuery,\n useGraphQLError,\n ProjectDisabled,\n SchemaError,\n DataTable,\n DataTableRowActions,\n DataTableToolbar,\n useGridColumnsDefinition,\n} from '@flexkit/studio';\nimport { Skeleton, SidebarTrigger, Separator, Tooltip, TooltipContent, TooltipTrigger } from '@flexkit/studio/ui';\nimport type { ColumnDef, SingleProject, Row } from '@flexkit/studio';\n\nconst pageSize = 25;\n\nexport function List(): JSX.Element {\n const { entity: entityName } = useParams();\n const { search } = useLocation();\n const query = new URLSearchParams(search);\n const entityId = query.get('id');\n const { scope } = useAppContext();\n const { schemaErrorMessage } = useGraphQLError();\n const { projects, currentProjectId } = useConfig();\n const { schema } = find(propEq(currentProjectId ?? '', 'projectId'))(projects) as SingleProject;\n const entitySchema = getEntitySchema(schema, entityName ?? '');\n const columnsDefinition = useGridColumnsDefinition({\n attributesSchema: entitySchema?.attributes ?? [],\n actionsComponent: (row) =>\n dataRowActions({ entityName: entitySchema?.name ?? '', entityNamePlural: entityName ?? '', row }),\n checkboxSelect: 'multiple',\n });\n\n const variables = entityId ? { where: { _id: entityId } } : { options: { offset: 0, limit: pageSize } };\n\n const { isLoading, fetchMore, count, data, isProjectDisabled } = useEntityQuery({\n entityNamePlural: entityName ?? '',\n schema,\n scope,\n variables,\n });\n\n // called on scroll and possibly on mount to fetch more data as the user scrolls and reaches bottom of table\n const fetchMoreOnBottomReached = useCallback(\n (containerRefElement?: HTMLDivElement | null) => {\n const rowsCount = data?.length ?? 0;\n\n if (containerRefElement && count > 0 && rowsCount > 0) {\n const { scrollHeight, scrollTop, clientHeight } = containerRefElement;\n //once the user has scrolled within 500px of the bottom of the table, fetch more data if we can\n if (scrollHeight - scrollTop - clientHeight < 500 && !isLoading && rowsCount < count) {\n fetchMore({\n variables: {\n options: {\n offset: data?.length ?? 0,\n limit: pageSize,\n },\n },\n });\n }\n }\n },\n [count, data?.length, fetchMore, isLoading]\n );\n\n const loadingData = Array(pageSize).fill({});\n const loadingColumns = getLoadingColumns(columnsDefinition);\n\n if (isProjectDisabled) {\n return (\n <div className=\"fk-flex fk-flex-col fk-h-full fk-px-4 fk-py-3\">\n <ProjectDisabled />\n </div>\n );\n }\n\n return (\n <div className=\"fk-flex fk-flex-col fk-h-full fk-px-4 fk-py-3\">\n <SchemaError />\n <div className=\"fk-flex fk-items-center fk-mb-4 fk-gap-2\">\n <Tooltip>\n <TooltipTrigger asChild>\n <SidebarTrigger className=\"-fk-ml-1 fk-w-4 fk-h-4\" />\n </TooltipTrigger>\n <TooltipContent>Toggle Sidebar</TooltipContent>\n </Tooltip>\n <Separator orientation=\"vertical\" className=\"fk-h-4\" />\n <h2 className=\"fk-text-lg fk-font-semibold fk-leading-none fk-tracking-tight\">\n {capitalize(entitySchema?.menu?.label ?? entitySchema?.plural ?? '')}\n </h2>\n </div>\n {!schemaErrorMessage ? (\n <DataTable\n columns={isLoading ? loadingColumns : columnsDefinition}\n data={isLoading ? loadingData : (data ?? [])}\n entityName={entitySchema?.name ?? ''}\n pageSize={pageSize}\n onScroll={(e) => {\n fetchMoreOnBottomReached(e.target as HTMLDivElement);\n }}\n toolbarComponent={(table) => <DataTableToolbar entityName={entitySchema?.name ?? ''} table={table} />}\n />\n ) : null}\n <Outlet />\n </div>\n );\n}\n\nfunction capitalize(str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\ntype AttributeValue = {\n _id: string;\n [key: string]: string | AttributeValue | null;\n __typename: string;\n};\n\ntype DataRowActions = {\n entityName: string;\n entityNamePlural: string;\n row: Row<AttributeValue>;\n};\n\nfunction dataRowActions({ entityName, entityNamePlural, row }: DataRowActions): JSX.Element {\n return <DataTableRowActions entityName={entityName} entityNamePlural={entityNamePlural} row={row} />;\n}\n\nfunction getLoadingColumns(columns: object[]): ColumnDef<AttributeValue>[] {\n return columns.map((column) => ({\n ...column,\n cell: () => <Skeleton className=\"fk-h-4 fk-w-full\" style={{ marginTop: '7px', marginBottom: '6px' }} />,\n })) as unknown as ColumnDef<AttributeValue>[];\n}\n","import { useParams } from '@flexkit/studio';\n\nexport function EditEntity(): JSX.Element {\n const { entity, id } = useParams();\n\n // Not used, left here as an example of how to nest routes in plugins (see ./index.tsx file)\n return (\n <div className=\"flex flex-col\">\n Edit {entity} with id: {id}\n </div>\n );\n}\n","import { Layout as LayoutIcon } from 'lucide-react';\nimport type { PluginOptions } from '@flexkit/studio';\nimport { Root } from './root';\nimport { List } from './list';\nimport { EditEntity } from './edit-entity';\n\nexport function Desk(): PluginOptions {\n return {\n name: 'flexkit.desk',\n contributes: {\n apps: [\n {\n name: 'desk',\n icon: <LayoutIcon strokeWidth={1.5} />,\n title: 'Desk',\n component: <Root />,\n routes: [\n {\n path: 'list/:entity',\n component: <List />,\n children: [\n {\n path: 'edit/:id',\n component: <EditEntity />, // Not used, left here as an example of how to nest routes in plugins\n },\n ],\n },\n ],\n },\n ],\n },\n };\n}\n"]}
1
+ {"version":3,"sources":["../src/root.tsx","../src/list.tsx","../src/edit-entity.tsx","../src/index.tsx"],"names":["SIDEBAR_COOKIE_NAME","Root","auth","useAuth","projects","currentProjectId","useConfig","schema","menuGroups","find","propEq","defaultOpen","row","jsxs","SidebarProvider","jsx","Sidebar","SidebarInset","Outlet","pageSize","List","entityName","useParams","search","useLocation","entityId","scope","useAppContext","schemaErrorMessage","useGraphQLError","entitySchema","getEntitySchema","columnsDefinition","useGridColumnsDefinition","dataRowActions","variables","isLoading","fetchMore","count","data","isProjectDisabled","useEntityQuery","fetchMoreOnBottomReached","useCallback","containerRefElement","rowsCount","scrollHeight","scrollTop","clientHeight","loadingData","loadingColumns","getLoadingColumns","isInitialLoading","ProjectDisabled","SchemaError","Tooltip","TooltipTrigger","SidebarTrigger","TooltipContent","Separator","capitalize","DataTable","e","table","DataTableToolbar","str","entityNamePlural","DataTableRowActions","columns","column","Skeleton","EditEntity","entity","id","Desk","LayoutIcon"],"mappings":"2hBAMA,IAAMA,CAAAA,CAAsB,wBAErB,SAASC,CAAAA,EAAoB,CAClC,GAAM,EAAGC,CAAI,EAAIC,OAAAA,EAAQ,CACnB,CAAE,QAAA,CAAAC,EAAU,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,SAAAA,GACjC,CAAE,MAAA,CAAAC,EAAQ,UAAA,CAAAC,CAAW,EAAIC,IAAAA,CAAKC,MAAAA,CAAOL,CAAAA,EAAoB,EAAA,CAAI,WAAW,CAAC,CAAA,CAAED,CAAQ,CAAA,CACnFO,EACJ,QAAA,CAAS,MAAA,CACN,KAAA,CAAM,IAAI,EACV,IAAA,CAAMC,CAAAA,EAAQA,EAAI,UAAA,CAAW,CAAA,EAAGZ,CA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CAAM3D,GAAAA,CAAC4D,MAAAA,CAAA,CAAW,WAAA,CAAa,GAAA,CAAK,CAAA,CACpC,KAAA,CAAO,OACP,SAAA,CAAW5D,GAAAA,CAACd,CAAAA,CAAA,EAAK,EACjB,MAAA,CAAQ,CACN,CACE,IAAA,CAAM,cAAA,CACN,UAAWc,GAAAA,CAACK,CAAAA,CAAA,EAAK,CAAA,CACjB,SAAU,CACR,CACE,IAAA,CAAM,UAAA,CACN,UAAWL,GAAAA,CAACwD,CAAAA,CAAA,EAAW,CACzB,CACF,CACF,CACF,CACF,CACF,CACF,CACF,CACF","file":"index.js","sourcesContent":["import { JSX } from 'react';\nimport { find, propEq } from 'ramda';\nimport { Outlet, useAuth, useConfig } from '@flexkit/studio';\nimport { Sidebar, SidebarInset, SidebarProvider } from '@flexkit/studio/ui';\nimport type { SingleProject } from '@flexkit/studio';\n\nconst SIDEBAR_COOKIE_NAME = 'flexkit:sidebar:state';\n\nexport function Root(): JSX.Element {\n const [, auth] = useAuth();\n const { projects, currentProjectId } = useConfig();\n const { schema, menuGroups } = find(propEq(currentProjectId ?? '', 'projectId'))(projects) as SingleProject;\n const defaultOpen =\n document.cookie\n .split('; ')\n .find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`))\n ?.split('=')[1] !== 'false';\n\n return (\n <SidebarProvider defaultOpen={defaultOpen}>\n <Sidebar schema={schema} menuGroups={menuGroups} />\n <SidebarInset>\n <Outlet />\n </SidebarInset>\n </SidebarProvider>\n );\n}\n","import { JSX, useCallback } from 'react';\nimport { find, propEq } from 'ramda';\nimport {\n getEntitySchema,\n useAppContext,\n useConfig,\n useLocation,\n useParams,\n Outlet,\n useEntityQuery,\n useGraphQLError,\n ProjectDisabled,\n SchemaError,\n DataTable,\n DataTableRowActions,\n DataTableToolbar,\n useGridColumnsDefinition,\n} from '@flexkit/studio';\nimport { Skeleton, SidebarTrigger, Separator, Tooltip, TooltipContent, TooltipTrigger } from '@flexkit/studio/ui';\nimport type { ColumnDef, SingleProject, Row } from '@flexkit/studio';\n\nconst pageSize = 25;\n\nexport function List(): JSX.Element {\n const { entity: entityName } = useParams();\n const { search } = useLocation();\n const query = new URLSearchParams(search);\n const entityId = query.get('id');\n const { scope } = useAppContext();\n const { schemaErrorMessage } = useGraphQLError();\n const { projects, currentProjectId } = useConfig();\n const { schema } = find(propEq(currentProjectId ?? '', 'projectId'))(projects) as SingleProject;\n const entitySchema = getEntitySchema(schema, entityName ?? '');\n const columnsDefinition = useGridColumnsDefinition({\n attributesSchema: entitySchema?.attributes ?? [],\n actionsComponent: (row) =>\n dataRowActions({ entityName: entitySchema?.name ?? '', entityNamePlural: entityName ?? '', row }),\n checkboxSelect: 'multiple',\n });\n\n const variables = entityId ? { where: { _id: entityId } } : { options: { offset: 0, limit: pageSize } };\n\n const { isLoading, fetchMore, count, data, isProjectDisabled } = useEntityQuery({\n entityNamePlural: entityName ?? '',\n schema,\n scope,\n variables,\n });\n\n // called on scroll and possibly on mount to fetch more data as the user scrolls and reaches bottom of table\n const fetchMoreOnBottomReached = useCallback(\n (containerRefElement?: HTMLDivElement | null) => {\n const rowsCount = data?.length ?? 0;\n\n if (containerRefElement && count > 0 && rowsCount > 0) {\n const { scrollHeight, scrollTop, clientHeight } = containerRefElement;\n //once the user has scrolled within 500px of the bottom of the table, fetch more data if we can\n if (scrollHeight - scrollTop - clientHeight < 500 && !isLoading && rowsCount < count) {\n fetchMore({\n variables: {\n options: {\n offset: data?.length ?? 0,\n limit: pageSize,\n },\n },\n });\n }\n }\n },\n [count, data?.length, fetchMore, isLoading]\n );\n\n const loadingData = Array(pageSize).fill({});\n const loadingColumns = getLoadingColumns(columnsDefinition);\n const isInitialLoading = isLoading && (data == null || data.length === 0);\n\n if (isProjectDisabled) {\n return (\n <div className=\"fk:flex fk:flex-col fk:h-full fk:px-4 fk:pt-3\">\n <ProjectDisabled />\n </div>\n );\n }\n\n return (\n <div className=\"fk:flex fk:flex-col fk:h-full fk:px-4 fk:pt-3\">\n <SchemaError />\n <div className=\"fk:flex fk:items-center fk:mb-4 fk:gap-2\">\n <Tooltip>\n <TooltipTrigger asChild>\n <SidebarTrigger className=\"fk:-ml-1 fk:w-4 fk:h-4\" />\n </TooltipTrigger>\n <TooltipContent>Toggle Sidebar</TooltipContent>\n </Tooltip>\n <Separator orientation=\"vertical\" className=\"fk:h-4\" />\n <h2 className=\"fk:text-lg fk:font-semibold fk:leading-none fk:tracking-tight\">\n {capitalize(entitySchema?.menu?.label ?? entitySchema?.plural ?? '')}\n </h2>\n </div>\n {!schemaErrorMessage ? (\n <DataTable\n columns={isInitialLoading ? loadingColumns : columnsDefinition}\n data={isInitialLoading ? loadingData : (data ?? [])}\n entityName={entitySchema?.name ?? ''}\n pageSize={pageSize}\n onScroll={(e) => {\n fetchMoreOnBottomReached(e.currentTarget);\n }}\n toolbarComponent={(table) => <DataTableToolbar entityName={entitySchema?.name ?? ''} table={table} />}\n />\n ) : null}\n <Outlet />\n </div>\n );\n}\n\nfunction capitalize(str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\ntype AttributeValue = {\n _id: string;\n [key: string]: string | AttributeValue | null;\n __typename: string;\n};\n\ntype DataRowActions = {\n entityName: string;\n entityNamePlural: string;\n row: Row<AttributeValue>;\n};\n\nfunction dataRowActions({ entityName, entityNamePlural, row }: DataRowActions): JSX.Element {\n return <DataTableRowActions entityName={entityName} entityNamePlural={entityNamePlural} row={row} />;\n}\n\nfunction getLoadingColumns(columns: object[]): ColumnDef<AttributeValue>[] {\n return columns.map((column) => ({\n ...column,\n cell: () => <Skeleton className=\"fk:h-4 fk:w-full\" style={{ marginTop: '7px', marginBottom: '6px' }} />,\n })) as unknown as ColumnDef<AttributeValue>[];\n}\n","import { JSX } from 'react';\nimport { useParams } from '@flexkit/studio';\n\nexport function EditEntity(): JSX.Element {\n const { entity, id } = useParams();\n\n // Not used, left here as an example of how to nest routes in plugins (see ./index.tsx file)\n return (\n <div className=\"flex flex-col\">\n Edit {entity} with id: {id}\n </div>\n );\n}\n","import { Layout as LayoutIcon } from 'lucide-react';\nimport type { PluginOptions } from '@flexkit/studio';\nimport { Root } from './root';\nimport { List } from './list';\nimport { EditEntity } from './edit-entity';\n\nexport function Desk(): PluginOptions {\n return {\n name: 'flexkit.desk',\n contributes: {\n apps: [\n {\n name: 'desk',\n icon: <LayoutIcon strokeWidth={1.5} />,\n title: 'Desk',\n component: <Root />,\n routes: [\n {\n path: 'list/:entity',\n component: <List />,\n children: [\n {\n path: 'edit/:id',\n component: <EditEntity />, // Not used, left here as an example of how to nest routes in plugins\n },\n ],\n },\n ],\n },\n ],\n },\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexkit/desk",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Core Flexkit Studio plugin that powers the main interface for browsing entities, managing attributes, and performing CRUD operations on structured business data.",
5
5
  "keywords": [
6
6
  "flexkit",
@@ -41,20 +41,19 @@
41
41
  "dist/**"
42
42
  ],
43
43
  "devDependencies": {
44
+ "@tailwindcss/cli": "4.2.4",
44
45
  "@types/debug": "^4.1.12",
45
46
  "@types/node": "^20.5.2",
46
47
  "@types/ramda": "^0.29.7",
47
- "@types/react": "^18.2.0",
48
- "@types/react-dom": "^18.2.0",
49
- "autoprefixer": "^10.4.16",
50
- "postcss": "^8.4.31",
51
- "react": "^18.2.0",
52
- "react-dom": "^18.2.0",
53
- "tailwindcss": "3.4.10",
48
+ "@types/react": "19.2.14",
49
+ "@types/react-dom": "19.2.3",
50
+ "react": "19.2.5",
51
+ "react-dom": "19.2.5",
52
+ "tailwindcss": "4.2.4",
54
53
  "tsup": "8.5.1",
55
54
  "typescript": "^5.3.3",
55
+ "@flexkit/studio": "0.0.20",
56
56
  "eslint-config-custom": "0.0.0",
57
- "@flexkit/studio": "0.0.19",
58
57
  "tailwind-config": "0.0.1",
59
58
  "tsconfig": "0.0.0"
60
59
  },
@@ -62,12 +61,12 @@
62
61
  "debug": "^4.3.4",
63
62
  "lucide-react": "0.577.0",
64
63
  "ramda": "^0.29.1",
65
- "swr": "2.2.5"
64
+ "swr": "2.4.1"
66
65
  },
67
66
  "peerDependencies": {
68
- "react": "^18.0.0 || ^19.0.0",
69
- "react-dom": "^18.0.0 || ^19.0.0",
70
- "@flexkit/studio": "0.0.19"
67
+ "react": "^19.0.0",
68
+ "react-dom": "^19.0.0",
69
+ "@flexkit/studio": "0.0.20"
71
70
  },
72
71
  "publishConfig": {
73
72
  "access": "public"