@solidxai/core-ui 0.1.8-beta.4 → 0.1.8-beta.5

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.
Files changed (78) hide show
  1. package/dist/components/auth/AuthLayout.d.ts.map +1 -1
  2. package/dist/components/auth/AuthLayout.js +19 -16
  3. package/dist/components/auth/AuthLayout.js.map +1 -1
  4. package/dist/components/auth/AuthLayout.tsx +14 -12
  5. package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
  6. package/dist/components/auth/SolidForgotPassword.js +1 -1
  7. package/dist/components/auth/SolidForgotPassword.js.map +1 -1
  8. package/dist/components/auth/SolidForgotPassword.tsx +1 -0
  9. package/dist/components/common/SolidAdmin.js +1 -1
  10. package/dist/components/common/SolidAdmin.js.map +1 -1
  11. package/dist/components/common/SolidAdmin.tsx +1 -1
  12. package/dist/components/common/solidModuleHome.module.css +1 -2
  13. package/dist/components/core/card/SolidCardView.js +1 -1
  14. package/dist/components/core/card/SolidCardView.js.map +1 -1
  15. package/dist/components/core/card/SolidCardView.tsx +1 -1
  16. package/dist/components/core/chatter/chatter.module.css +3 -3
  17. package/dist/components/core/common/PDFViewer.js +1 -1
  18. package/dist/components/core/common/PDFViewer.js.map +1 -1
  19. package/dist/components/core/common/PDFViewer.tsx +2 -2
  20. package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.module.css +1 -1
  21. package/dist/components/core/common/SolidGenericImport/SolidImport.module.css +3 -4
  22. package/dist/components/core/dashboard/SolidDashboardFilterRequired.js +2 -2
  23. package/dist/components/core/dashboard/SolidDashboardFilterRequired.js.map +1 -1
  24. package/dist/components/core/dashboard/SolidDashboardFilterRequired.tsx +2 -2
  25. package/dist/components/core/dashboard/SolidDashboardNotAvailable.js +2 -2
  26. package/dist/components/core/dashboard/SolidDashboardNotAvailable.js.map +1 -1
  27. package/dist/components/core/dashboard/SolidDashboardNotAvailable.tsx +2 -2
  28. package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.js +1 -1
  29. package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.js.map +1 -1
  30. package/dist/components/core/extension/solid-core/chatterMessage/form/SolidChatterMessageCoModelEntityIdFormViewWidget.tsx +1 -1
  31. package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.js +1 -1
  32. package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.js.map +1 -1
  33. package/dist/components/core/extension/solid-core/chatterMessage/list/SolidChatterMessageCoModelEntityIdListViewWidget.tsx +1 -1
  34. package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.js +1 -1
  35. package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.js.map +1 -1
  36. package/dist/components/core/extension/solid-core/mqMessage/list/SolidMqMessagesSummarizeListHeaderAction.tsx +1 -1
  37. package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.js +1 -1
  38. package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.js.map +1 -1
  39. package/dist/components/core/extension/solid-core/mqMessage/ui/MqMessageStageBadge.tsx +1 -1
  40. package/dist/components/core/form/fields/SolidEmailField.d.ts.map +1 -1
  41. package/dist/components/core/form/fields/SolidEmailField.js +5 -4
  42. package/dist/components/core/form/fields/SolidEmailField.js.map +1 -1
  43. package/dist/components/core/form/fields/SolidEmailField.tsx +17 -15
  44. package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
  45. package/dist/components/core/form/fields/SolidIntegerField.js +5 -4
  46. package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
  47. package/dist/components/core/form/fields/SolidIntegerField.tsx +3 -1
  48. package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
  49. package/dist/components/core/form/fields/SolidShortTextField.js +8 -6
  50. package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
  51. package/dist/components/core/form/fields/SolidShortTextField.tsx +7 -1
  52. package/dist/components/core/form/fields/solidFields.module.css +0 -3
  53. package/dist/components/core/kanban/SolidKanbanView.js +1 -1
  54. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  55. package/dist/components/core/kanban/SolidKanbanView.tsx +1 -1
  56. package/dist/components/core/list/SolidListView.js +1 -1
  57. package/dist/components/core/list/SolidListView.js.map +1 -1
  58. package/dist/components/core/list/SolidListView.tsx +1 -1
  59. package/dist/components/core/solid-ai/SolidAiChat.module.css +3 -3
  60. package/dist/components/core/tree/SolidTreeView.js +1 -1
  61. package/dist/components/core/tree/SolidTreeView.js.map +1 -1
  62. package/dist/components/core/tree/SolidTreeView.tsx +1 -1
  63. package/dist/components/shad-cn-ui/SolidTabs.d.ts.map +1 -1
  64. package/dist/components/shad-cn-ui/SolidTabs.js +5 -2
  65. package/dist/components/shad-cn-ui/SolidTabs.js.map +1 -1
  66. package/dist/components/shad-cn-ui/SolidTabs.tsx +51 -25
  67. package/dist/resources/globals.css +7 -7
  68. package/dist/resources/images/Background.svg +3 -5
  69. package/dist/resources/images/Navigation/SolidSettinsIcon.svg +3 -5
  70. package/dist/resources/images/errors/error.svg +12 -14
  71. package/dist/resources/shadcn-base.css +43 -38
  72. package/dist/resources/themes/solid-dark-purple/theme.css +23 -33
  73. package/dist/resources/themes/solid-light-purple/theme.css +31 -31
  74. package/dist/routes/SolidLayoutRegistry.d.ts.map +1 -1
  75. package/dist/routes/SolidLayoutRegistry.js +3 -1
  76. package/dist/routes/SolidLayoutRegistry.js.map +1 -1
  77. package/dist/routes/SolidLayoutRegistry.tsx +3 -1
  78. package/package.json +1 -1
@@ -39,7 +39,7 @@
39
39
  --surface-overlay: #18191D;
40
40
  --surface-border: rgba(255, 255, 255, 0.1);
41
41
  --surface-hover: rgba(255, 255, 255, 0.03);
42
- --focus-ring: 0 0 0 0.2rem var(--ring, rgba(96, 165, 250, 0.35));
42
+ --focus-ring: 0 0 0 0.2rem var(--ring, rgba(179, 127, 235, 0.35));
43
43
  --maskbg: rgba(0, 0, 0, 0.4);
44
44
  --primary-light-color: rgba(216, 226, 234, 0.08);
45
45
  --highlight-bg: rgba(140, 100, 255, 0.18);
@@ -102,16 +102,6 @@
102
102
  --yellow-700: #a47d06;
103
103
  --yellow-800: #816204;
104
104
  --yellow-900: #5e4803;
105
- --purple-50: #f3fbfd;
106
- --purple-100: #dbc4f5;
107
- --purple-200: #c299ee;
108
- --purple-300: #a96ee7;
109
- --purple-400: color-mix(in srgb, var(--primary-color, var(--primary)) 84%, #0f172a);
110
- --purple-500: var(--primary-color, var(--primary));
111
- --purple-600: #5f24b3;
112
- --purple-700: #4c1b94;
113
- --purple-800: #391275;
114
- --purple-900: #260955;
115
105
  --pink-50: #fef6fa;
116
106
  --pink-100: #fad3e7;
117
107
  --pink-200: #f7b0d3;
@@ -182,16 +172,16 @@
182
172
  --red-700: #b32b23;
183
173
  --red-800: #8c221c;
184
174
  --red-900: #661814;
185
- --primary-50: #f4fdfe;
186
- --primary-100: #caf4fb;
187
- --primary-200: #a0ecf8;
188
- --primary-300: #76e4f4;
189
- --primary-400: #4cdbf1;
190
- --primary-500: #9B5AED;
191
- --primary-600: #1db3ca;
192
- --primary-700: #1894a7;
193
- --primary-800: #137483;
194
- --primary-900: #0e545f;
175
+ --primary-50: #f9f0ff;
176
+ --primary-100: #efdbff;
177
+ --primary-200: #d3adf7;
178
+ --primary-300: #b37feb;
179
+ --primary-400: #9254de;
180
+ --primary-500: #722ED1;
181
+ --primary-600: #531dab;
182
+ --primary-700: #391085;
183
+ --primary-800: #22075e;
184
+ --primary-900: #120338;
195
185
  }
196
186
 
197
187
  .solid-primary-black-text {
@@ -333,7 +323,7 @@
333
323
  .p-link:focus-visible {
334
324
  outline: 0 none;
335
325
  outline-offset: 0;
336
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
326
+ box-shadow: none !important;
337
327
  }
338
328
 
339
329
  .p-autocomplete .p-autocomplete-multiple-container:not(.p-disabled):hover {
@@ -721,7 +711,7 @@
721
711
  .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
722
712
  outline: 0 none;
723
713
  outline-offset: 0;
724
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
714
+ box-shadow: none !important;
725
715
  border-color: #9B5AED;
726
716
  }
727
717
 
@@ -784,7 +774,7 @@
784
774
  .p-chips:not(.p-disabled).p-focus .p-chips-multiple-container {
785
775
  outline: 0 none;
786
776
  outline-offset: 0;
787
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
777
+ box-shadow: none !important;
788
778
  border-color: #9B5AED;
789
779
  }
790
780
 
@@ -843,7 +833,7 @@
843
833
  .p-dropdown:not(.p-disabled).p-focus {
844
834
  outline: 0 none;
845
835
  outline-offset: 0;
846
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
836
+ box-shadow: none !important;
847
837
  border-color: #9B5AED;
848
838
  }
849
839
 
@@ -996,7 +986,7 @@
996
986
  .p-inputswitch:not(.p-disabled):has(.p-inputswitch-input:focus-visible) .p-inputswitch-slider {
997
987
  outline: 0 none;
998
988
  outline-offset: 0;
999
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
989
+ box-shadow: none !important;
1000
990
  }
1001
991
 
1002
992
  .p-inputswitch.p-invalid>.p-inputswitch-slider {
@@ -1028,7 +1018,7 @@
1028
1018
  .p-inputtext:enabled:focus {
1029
1019
  outline: 0 none;
1030
1020
  outline-offset: 0;
1031
- /* box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4); */
1021
+ box-shadow: none !important;
1032
1022
  border-color: #9B5AED;
1033
1023
  }
1034
1024
 
@@ -1221,7 +1211,7 @@
1221
1211
  .p-multiselect:not(.p-disabled).p-focus {
1222
1212
  outline: 0 none;
1223
1213
  outline-offset: 0;
1224
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
1214
+ box-shadow: none !important;
1225
1215
  border-color: #9B5AED;
1226
1216
  }
1227
1217
 
@@ -1304,7 +1294,7 @@
1304
1294
  .p-multiselect-panel .p-multiselect-header .p-multiselect-close:focus-visible {
1305
1295
  outline: 0 none;
1306
1296
  outline-offset: 0;
1307
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
1297
+ box-shadow: none !important;
1308
1298
  }
1309
1299
 
1310
1300
  .p-multiselect-panel .p-multiselect-items .p-multiselect-item {
@@ -1430,7 +1420,7 @@
1430
1420
  .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1431
1421
  outline: 0 none;
1432
1422
  outline-offset: 0;
1433
- box-shadow: 0 0 0 0.2rem rgba(176, 126, 255, 0.4);
1423
+ box-shadow: none !important;
1434
1424
  border-color: #9B5AED;
1435
1425
  }
1436
1426
 
@@ -5470,7 +5460,7 @@
5470
5460
 
5471
5461
  .p-inline-message.p-inline-message-info {
5472
5462
  background: rgba(59, 130, 246, 0.2);
5473
- border: solid #3b82f6;
5463
+ border: solid #722ED1;
5474
5464
  border-width: 1px;
5475
5465
  color: #93c5fd;
5476
5466
  }
@@ -5524,7 +5514,7 @@
5524
5514
 
5525
5515
  .p-message.p-message-info {
5526
5516
  background: rgba(59, 130, 246, 0.2);
5527
- border: solid #3b82f6;
5517
+ border: solid #722ED1;
5528
5518
  border-width: 0 0 0 6px;
5529
5519
  color: #93c5fd;
5530
5520
  }
@@ -5594,7 +5584,7 @@
5594
5584
 
5595
5585
  .p-toast .p-toast-message.p-toast-message-info {
5596
5586
  background: rgba(59, 130, 246, 0.2);
5597
- border: solid #3b82f6;
5587
+ border: solid #722ED1;
5598
5588
  border-width: 0 0 0 6px;
5599
5589
  color: #93c5fd;
5600
5590
  }
@@ -39,7 +39,7 @@
39
39
  --surface-overlay: #ffffff;
40
40
  --surface-border: #dfe7ef;
41
41
  --surface-hover: #f6f9fc;
42
- --focus-ring: 0 0 0 0.2rem var(--ring, rgba(37, 99, 235, 0.35));
42
+ --focus-ring: 0 0 0 0.2rem var(--ring, rgba(114, 46, 209, 0.35));
43
43
  --maskbg: rgba(0, 0, 0, 0.4);
44
44
  --primary-light-color: #D8E2EA;
45
45
  --highlight-bg: #F5F5F5;
@@ -193,16 +193,16 @@
193
193
  --red-700: #b32b23;
194
194
  --red-800: #8c221c;
195
195
  --red-900: #661814;
196
- --primary-50: #f5f0fc;
197
- --primary-100: #dbc4f5;
198
- --primary-200: #c299ee;
199
- --primary-300: #a96ee7;
200
- --primary-400: color-mix(in srgb, var(--primary-color, var(--primary)) 84%, #0f172a);
201
- --primary-500: var(--primary-color, var(--primary));
202
- --primary-600: #5f24b3;
203
- --primary-700: #4c1b94;
204
- --primary-800: #391275;
205
- --primary-900: #260955;
196
+ --primary-50: #f9f0ff;
197
+ --primary-100: #efdbff;
198
+ --primary-200: #d3adf7;
199
+ --primary-300: #b37feb;
200
+ --primary-400: #9254de;
201
+ --primary-500: #722ED1;
202
+ --primary-600: #531dab;
203
+ --primary-700: #391085;
204
+ --primary-800: #22075e;
205
+ --primary-900: #120338;
206
206
  }
207
207
 
208
208
  .solid-primary-black-text {
@@ -348,7 +348,7 @@
348
348
  .p-link:focus-visible {
349
349
  outline: 0 none;
350
350
  outline-offset: 0;
351
- box-shadow: 0 0 0 0.2rem #d3b5f5;
351
+ box-shadow: none !important;
352
352
  }
353
353
 
354
354
  .p-autocomplete .p-autocomplete-multiple-container:not(.p-disabled):hover {
@@ -506,7 +506,7 @@
506
506
  .p-datepicker table td>span:focus {
507
507
  outline: 0 none;
508
508
  outline-offset: 0;
509
- box-shadow: 0 0 0 0.2rem #d3b5f5;
509
+ box-shadow: none !important;
510
510
  }
511
511
 
512
512
  .p-datepicker table td.p-datepicker-today>span {
@@ -735,7 +735,7 @@
735
735
  .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
736
736
  outline: 0 none;
737
737
  outline-offset: 0;
738
- box-shadow: 0 0 0 0.2rem #d3b5f5;
738
+ box-shadow: none !important;
739
739
  border-color: var(--primary-color, var(--primary));
740
740
  }
741
741
 
@@ -799,7 +799,7 @@
799
799
  .p-chips:not(.p-disabled).p-focus .p-chips-multiple-container {
800
800
  outline: 0 none;
801
801
  outline-offset: 0;
802
- box-shadow: 0 0 0 0.2rem #d3b5f5;
802
+ box-shadow: none !important;
803
803
  border-color: var(--primary-color, var(--primary));
804
804
  }
805
805
 
@@ -858,7 +858,7 @@
858
858
  .p-dropdown:not(.p-disabled).p-focus {
859
859
  outline: 0 none;
860
860
  outline-offset: 0;
861
- /* box-shadow: 0 0 0 0.2rem #d3b5f5; */
861
+ box-shadow: none !important;
862
862
  border-color: var(--primary-color, var(--primary));
863
863
  }
864
864
 
@@ -1011,7 +1011,7 @@
1011
1011
  .p-inputswitch:not(.p-disabled):has(.p-inputswitch-input:focus-visible) .p-inputswitch-slider {
1012
1012
  outline: 0 none;
1013
1013
  outline-offset: 0;
1014
- box-shadow: 0 0 0 0.2rem #d3b5f5;
1014
+ box-shadow: none !important;
1015
1015
  }
1016
1016
 
1017
1017
  .p-inputswitch.p-invalid>.p-inputswitch-slider {
@@ -1039,7 +1039,7 @@
1039
1039
  .p-inputtext:enabled:focus {
1040
1040
  outline: 0 none;
1041
1041
  outline-offset: 0;
1042
- /* box-shadow: 0 0 0 0.2rem #d3b5f5; */
1042
+ box-shadow: none !important;
1043
1043
  border-color: var(--primary-color, var(--primary));
1044
1044
  }
1045
1045
 
@@ -1232,7 +1232,7 @@
1232
1232
  .p-multiselect:not(.p-disabled).p-focus {
1233
1233
  outline: 0 none;
1234
1234
  outline-offset: 0;
1235
- box-shadow: 0 0 0 0.2rem #d3b5f5;
1235
+ box-shadow: none !important;
1236
1236
  border-color: var(--primary-color, var(--primary));
1237
1237
  }
1238
1238
 
@@ -1324,7 +1324,7 @@
1324
1324
  .p-multiselect-panel .p-multiselect-header .p-multiselect-close:focus-visible {
1325
1325
  outline: 0 none;
1326
1326
  outline-offset: 0;
1327
- box-shadow: 0 0 0 0.2rem #d3b5f5;
1327
+ box-shadow: none !important;
1328
1328
  }
1329
1329
 
1330
1330
  .p-multiselect-panel .p-multiselect-items .p-multiselect-item {
@@ -1450,7 +1450,7 @@
1450
1450
  .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1451
1451
  outline: 0 none;
1452
1452
  outline-offset: 0;
1453
- box-shadow: 0 0 0 0.2rem #d3b5f5;
1453
+ box-shadow: none !important;
1454
1454
  border-color: var(--primary-color, var(--primary));
1455
1455
  }
1456
1456
 
@@ -5527,13 +5527,13 @@
5527
5527
 
5528
5528
  .p-inline-message.p-inline-message-info {
5529
5529
  background: rgba(219, 234, 254, 0.7);
5530
- border: solid #3b82f6;
5530
+ border: solid #722ED1;
5531
5531
  border-width: 0px;
5532
- color: #3b82f6;
5532
+ color: #722ED1;
5533
5533
  }
5534
5534
 
5535
5535
  .p-inline-message.p-inline-message-info .p-inline-message-icon {
5536
- color: #3b82f6;
5536
+ color: #722ED1;
5537
5537
  }
5538
5538
 
5539
5539
  .p-inline-message.p-inline-message-success {
@@ -5581,17 +5581,17 @@
5581
5581
 
5582
5582
  .p-message.p-message-info {
5583
5583
  background: rgba(219, 234, 254, 0.7);
5584
- border: solid #3b82f6;
5584
+ border: solid #722ED1;
5585
5585
  border-width: 0 0 0 6px;
5586
- color: #3b82f6;
5586
+ color: #722ED1;
5587
5587
  }
5588
5588
 
5589
5589
  .p-message.p-message-info .p-message-icon {
5590
- color: #3b82f6;
5590
+ color: #722ED1;
5591
5591
  }
5592
5592
 
5593
5593
  .p-message.p-message-info .p-message-close {
5594
- color: #3b82f6;
5594
+ color: #722ED1;
5595
5595
  }
5596
5596
 
5597
5597
  .p-message.p-message-success {
@@ -5657,14 +5657,14 @@
5657
5657
 
5658
5658
  .p-toast .p-toast-message.p-toast-message-info {
5659
5659
  background: rgba(219, 234, 254, 0.7);
5660
- border: solid #3b82f6;
5660
+ border: solid #722ED1;
5661
5661
  border-width: 0 0 0 6px;
5662
- color: #3b82f6;
5662
+ color: #722ED1;
5663
5663
  }
5664
5664
 
5665
5665
  .p-toast .p-toast-message.p-toast-message-info .p-toast-message-icon,
5666
5666
  .p-toast .p-toast-message.p-toast-message-info .p-toast-icon-close {
5667
- color: #3b82f6;
5667
+ color: #722ED1;
5668
5668
  }
5669
5669
 
5670
5670
  .p-toast .p-toast-message.p-toast-message-success {
@@ -1 +1 @@
1
- {"version":3,"file":"SolidLayoutRegistry.d.ts","sourceRoot":"","sources":["../../src/routes/SolidLayoutRegistry.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAOD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAErE;AAoHD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAOA;AAMD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,EAAE,CAI3D"}
1
+ {"version":3,"file":"SolidLayoutRegistry.d.ts","sourceRoot":"","sources":["../../src/routes/SolidLayoutRegistry.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAOD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAErE;AAsHD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAOA;AAMD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,EAAE,CAI3D"}
@@ -71,7 +71,9 @@ function inferPathFromChildren(children) {
71
71
  // Absolute path → use root
72
72
  if ((_a = child.path) === null || _a === void 0 ? void 0 : _a.startsWith("/")) {
73
73
  var root = child.path.split("/").filter(Boolean)[0];
74
- return root ? "/".concat(root) : undefined;
74
+ // return root ? `/${root}` : undefined;
75
+ // treat absolute path with no segments as home..
76
+ return root ? "/".concat(root) : 'home';
75
77
  }
76
78
  // Relative path → use first segment
77
79
  if (child.path) {
@@ -1 +1 @@
1
- {"version":3,"file":"SolidLayoutRegistry.js","sourceRoot":"","sources":["../../src/routes/SolidLayoutRegistry.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UA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M,CAAE,KAAK,mCAAI,WAAW,CAAC,QAAQ,CAAC;YAC7C,WAAW,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW;YAChC,EAAE,IAAA;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KACpB;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AACD,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,EAM3C;QALC,MAAM,YAAA,EACN,QAAQ,cAAA;IAKR,IAAM,OAAO,GAAG,OAAO,CAAC,cAAM,OAAA,cAAc,CAAC,MAAM,CAAC,EAAtB,CAAsB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,OAAO,CACL,KAAC,0BAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YAChD,QAAQ,GAC2B,CACvC,CAAC;AACJ,CAAC;AAID,iFAAiF;AAEjF;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB;IACpC,IAAM,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC9D,IAAI,cAAc,KAAK,IAAI;QAAE,OAAO,cAAc,CAAC;IACnD,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import { createContext, useContext, useMemo, type ReactNode } from \"react\";\nimport type { RouteObject } from \"react-router-dom\";\n\n// ── Types ─────────────────────────────────────────────────────────────────────\n\nexport interface SolidLayoutEntry {\n /** The root path of this layout, e.g. \"/jenendar\" */\n path: string;\n /** Display title. Falls back to title-casing the path segment. */\n title: string;\n /** Optional subtitle shown on the card. */\n description?: string;\n /** Resolved URL to navigate to when the card is clicked (first child). */\n to: string;\n}\n\n/**\n * Optionally attach this to a route's `handle` to customise the card.\n *\n * @example\n * ```tsx\n * {\n * path: \"/my-layout\",\n * handle: { title: \"My Layout\", description: \"Custom layout\" } satisfies SolidLayoutHandle,\n * element: <MyLayout />,\n * children: [...],\n * }\n * ```\n */\nexport interface SolidLayoutHandle {\n title?: string;\n description?: string;\n}\n\n// ── Module-level store ────────────────────────────────────────────────────────\n// Populated automatically inside getSolidRoutes() — no consumer changes needed.\n\nlet _autoRoutes: RouteObject[] = [];\n\n/**\n * Called by getSolidRoutes() whenever extraRoutes are provided.\n * @internal — not part of the public API.\n */\nexport function _solidRegisterExtraRoutes(routes: RouteObject[]): void {\n _autoRoutes = routes;\n}\n\n// ── Context (optional override) ───────────────────────────────────────────────\n// Mount SolidLayoutRegistryProvider anywhere above StudioLandingPage to\n// override the auto-registered list (e.g. async / runtime route lists).\n\nconst SolidLayoutRegistryContext = createContext<SolidLayoutEntry[] | null>(null);\n\n// ── Helpers ───────────────────────────────────────────────────────────────────\n\nfunction pathToTitle(path: string): string {\n return (\n path\n .replace(/^\\//, \"\")\n .split(/[-_/]/)\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \") || path\n );\n}\n\n/**\n * Walk a route tree and return the first concrete relative or absolute path found.\n * Skips index routes (they render at the parent path) and pathless wrappers\n * (guards, layout wrappers) by looking inside their children recursively.\n */\nfunction findFirstConcretePath(children: RouteObject[]): string | undefined {\n // 1. FIRST PASS → prioritize index (including inside pathless wrappers)\n for (const child of children) {\n if ((child as any).index || child.path === \"\") {\n return \"\";\n }\n // Deep check for pathless wrappers in the first pass too\n if (!child.path && child.children?.length) {\n const nested = findFirstConcretePath(child.children);\n if (nested === \"\") return \"\";\n }\n }\n\n // 2. SECOND PASS → find first path\n for (const child of children) {\n if (child.path) return child.path;\n\n if (child.children?.length) {\n const nested = findFirstConcretePath(child.children);\n if (nested !== undefined) return nested;\n }\n }\n\n return undefined;\n}\nfunction resolveFirstChildTo(basePath: string, children: RouteObject[]): string {\n const concretePath = findFirstConcretePath(children);\n if (concretePath === undefined || concretePath === \"\") return basePath;\n if (concretePath.startsWith(\"/\")) return concretePath;\n return `${basePath.replace(/\\/$/, \"\")}/${concretePath}`;\n}\n\nfunction inferPathFromChildren(children: RouteObject[]): string | undefined {\n for (const child of children) {\n // Absolute path → use root\n if (child.path?.startsWith(\"/\")) {\n const root = child.path.split(\"/\").filter(Boolean)[0];\n return root ? `/${root}` : undefined;\n }\n\n // Relative path → use first segment\n if (child.path) {\n const root = child.path.split(\"/\")[0];\n return root ? `/${root}` : undefined;\n }\n\n // Nested\n if (child.children?.length) {\n const nested = inferPathFromChildren(child.children);\n if (nested) return nested;\n }\n }\n\n return undefined;\n}\n\nfunction extractLayouts(routes: RouteObject[]): SolidLayoutEntry[] {\n const layouts: SolidLayoutEntry[] = [];\n const seen = new Set<string>();\n\n for (const route of routes) {\n // ✅ Use explicit path OR infer from children\n const basePath =\n route.path ??\n (route.children?.length\n ? inferPathFromChildren(route.children)\n : undefined);\n\n if (!basePath || seen.has(basePath)) continue;\n\n const handle = route.handle as SolidLayoutHandle | undefined;\n\n const to = route.children?.length\n ? resolveFirstChildTo(basePath, route.children)\n : basePath;\n\n layouts.push({\n path: basePath,\n title: handle?.title ?? pathToTitle(basePath),\n description: handle?.description,\n to,\n });\n\n seen.add(basePath);\n }\n\n return layouts;\n}\n// ── Provider (optional override) ──────────────────────────────────────────────\n\n/**\n * Optional — most apps do NOT need this.\n * Use only when you need to override the auto-registered list at runtime.\n */\nexport function SolidLayoutRegistryProvider({\n routes,\n children,\n}: {\n routes: RouteObject[];\n children: ReactNode;\n}) {\n const layouts = useMemo(() => extractLayouts(routes), [routes]);\n return (\n <SolidLayoutRegistryContext.Provider value={layouts}>\n {children}\n </SolidLayoutRegistryContext.Provider>\n );\n}\n\n\n\n// ── Hook ──────────────────────────────────────────────────────────────────────\n\n/**\n * Returns the registered layout entries.\n *\n * Priority order:\n * 1. SolidLayoutRegistryProvider context (if mounted)\n * 2. Routes auto-registered when getSolidRoutes({ extraRoutes }) was called\n */\nexport function useSolidLayoutRegistry(): SolidLayoutEntry[] {\n const contextLayouts = useContext(SolidLayoutRegistryContext);\n if (contextLayouts !== null) return contextLayouts;\n return extractLay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QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;YAC/C,CAAC,CAAC,QAAQ,CAAC;QAEb,OAAO,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,mCAAI,WAAW,CAAC,QAAQ,CAAC;YAC7C,WAAW,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW;YAChC,EAAE,IAAA;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KACpB;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AACD,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,EAM3C;QALC,MAAM,YAAA,EACN,QAAQ,cAAA;IAKR,IAAM,OAAO,GAAG,OAAO,CAAC,cAAM,OAAA,cAAc,CAAC,MAAM,CAAC,EAAtB,CAAsB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,OAAO,CACL,KAAC,0BAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YAChD,QAAQ,GAC2B,CACvC,CAAC;AACJ,CAAC;AAID,iFAAiF;AAEjF;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB;IACpC,IAAM,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC9D,IAAI,cAAc,KAAK,IAAI;QAAE,OAAO,cAAc,CAAC;IACnD,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import { createContext, useContext, useMemo, type ReactNode } from \"react\";\nimport type { RouteObject } from \"react-router-dom\";\n\n// ── Types ─────────────────────────────────────────────────────────────────────\n\nexport interface SolidLayoutEntry {\n /** The root path of this layout, e.g. \"/jenendar\" */\n path: string;\n /** Display title. Falls back to title-casing the path segment. */\n title: string;\n /** Optional subtitle shown on the card. */\n description?: string;\n /** Resolved URL to navigate to when the card is clicked (first child). */\n to: string;\n}\n\n/**\n * Optionally attach this to a route's `handle` to customise the card.\n *\n * @example\n * ```tsx\n * {\n * path: \"/my-layout\",\n * handle: { title: \"My Layout\", description: \"Custom layout\" } satisfies SolidLayoutHandle,\n * element: <MyLayout />,\n * children: [...],\n * }\n * ```\n */\nexport interface SolidLayoutHandle {\n title?: string;\n description?: string;\n}\n\n// ── Module-level store ────────────────────────────────────────────────────────\n// Populated automatically inside getSolidRoutes() — no consumer changes needed.\n\nlet _autoRoutes: RouteObject[] = [];\n\n/**\n * Called by getSolidRoutes() whenever extraRoutes are provided.\n * @internal — not part of the public API.\n */\nexport function _solidRegisterExtraRoutes(routes: RouteObject[]): void {\n _autoRoutes = routes;\n}\n\n// ── Context (optional override) ───────────────────────────────────────────────\n// Mount SolidLayoutRegistryProvider anywhere above StudioLandingPage to\n// override the auto-registered list (e.g. async / runtime route lists).\n\nconst SolidLayoutRegistryContext = createContext<SolidLayoutEntry[] | null>(null);\n\n// ── Helpers ───────────────────────────────────────────────────────────────────\n\nfunction pathToTitle(path: string): string {\n return (\n path\n .replace(/^\\//, \"\")\n .split(/[-_/]/)\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \") || path\n );\n}\n\n/**\n * Walk a route tree and return the first concrete relative or absolute path found.\n * Skips index routes (they render at the parent path) and pathless wrappers\n * (guards, layout wrappers) by looking inside their children recursively.\n */\nfunction findFirstConcretePath(children: RouteObject[]): string | undefined {\n // 1. FIRST PASS → prioritize index (including inside pathless wrappers)\n for (const child of children) {\n if ((child as any).index || child.path === \"\") {\n return \"\";\n }\n // Deep check for pathless wrappers in the first pass too\n if (!child.path && child.children?.length) {\n const nested = findFirstConcretePath(child.children);\n if (nested === \"\") return \"\";\n }\n }\n\n // 2. SECOND PASS → find first path\n for (const child of children) {\n if (child.path) return child.path;\n\n if (child.children?.length) {\n const nested = findFirstConcretePath(child.children);\n if (nested !== undefined) return nested;\n }\n }\n\n return undefined;\n}\nfunction resolveFirstChildTo(basePath: string, children: RouteObject[]): string {\n const concretePath = findFirstConcretePath(children);\n if (concretePath === undefined || concretePath === \"\") return basePath;\n if (concretePath.startsWith(\"/\")) return concretePath;\n return `${basePath.replace(/\\/$/, \"\")}/${concretePath}`;\n}\n\nfunction inferPathFromChildren(children: RouteObject[]): string | undefined {\n for (const child of children) {\n // Absolute path → use root\n if (child.path?.startsWith(\"/\")) {\n const root = child.path.split(\"/\").filter(Boolean)[0];\n // return root ? `/${root}` : undefined;\n // treat absolute path with no segments as home..\n return root ? `/${root}` : 'home'; \n }\n\n // Relative path → use first segment\n if (child.path) {\n const root = child.path.split(\"/\")[0];\n return root ? `/${root}` : undefined;\n }\n\n // Nested\n if (child.children?.length) {\n const nested = inferPathFromChildren(child.children);\n if (nested) return nested;\n }\n }\n\n return undefined;\n}\n\nfunction extractLayouts(routes: RouteObject[]): SolidLayoutEntry[] {\n const layouts: SolidLayoutEntry[] = [];\n const seen = new Set<string>();\n\n for (const route of routes) {\n // ✅ Use explicit path OR infer from children\n const basePath =\n route.path ??\n (route.children?.length\n ? inferPathFromChildren(route.children)\n : undefined);\n\n if (!basePath || seen.has(basePath)) continue;\n\n const handle = route.handle as SolidLayoutHandle | undefined;\n\n const to = route.children?.length\n ? resolveFirstChildTo(basePath, route.children)\n : basePath;\n\n layouts.push({\n path: basePath,\n title: handle?.title ?? pathToTitle(basePath),\n description: handle?.description,\n to,\n });\n\n seen.add(basePath);\n }\n\n return layouts;\n}\n// ── Provider (optional override) ──────────────────────────────────────────────\n\n/**\n * Optional — most apps do NOT need this.\n * Use only when you need to override the auto-registered list at runtime.\n */\nexport function SolidLayoutRegistryProvider({\n routes,\n children,\n}: {\n routes: RouteObject[];\n children: ReactNode;\n}) {\n const layouts = useMemo(() => extractLayouts(routes), [routes]);\n return (\n <SolidLayoutRegistryContext.Provider value={layouts}>\n {children}\n </SolidLayoutRegistryContext.Provider>\n );\n}\n\n\n\n// ── Hook ──────────────────────────────────────────────────────────────────────\n\n/**\n * Returns the registered layout entries.\n *\n * Priority order:\n * 1. SolidLayoutRegistryProvider context (if mounted)\n * 2. Routes auto-registered when getSolidRoutes({ extraRoutes }) was called\n */\nexport function useSolidLayoutRegistry(): SolidLayoutEntry[] {\n const contextLayouts = useContext(SolidLayoutRegistryContext);\n if (contextLayouts !== null) return contextLayouts;\n return extractLayouts(_autoRoutes);\n}\n"]}
@@ -106,7 +106,9 @@ function inferPathFromChildren(children: RouteObject[]): string | undefined {
106
106
  // Absolute path → use root
107
107
  if (child.path?.startsWith("/")) {
108
108
  const root = child.path.split("/").filter(Boolean)[0];
109
- return root ? `/${root}` : undefined;
109
+ // return root ? `/${root}` : undefined;
110
+ // treat absolute path with no segments as home..
111
+ return root ? `/${root}` : 'home';
110
112
  }
111
113
 
112
114
  // Relative path → use first segment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidxai/core-ui",
3
- "version": "0.1.8-beta.4",
3
+ "version": "0.1.8-beta.5",
4
4
  "scripts": {
5
5
  "prebuild": "npm run copy-resources && npm run copy-styles",
6
6
  "build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json",