@open-mercato/ui 0.4.11-develop.2631.481e9df5b0 → 0.5.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.
Files changed (41) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/AGENTS.md +28 -4
  3. package/agentic/standalone-guide.md +97 -0
  4. package/build.mjs +10 -6
  5. package/dist/backend/AppShell.js +15 -2
  6. package/dist/backend/AppShell.js.map +2 -2
  7. package/dist/backend/DataTable.js +22 -1
  8. package/dist/backend/DataTable.js.map +2 -2
  9. package/dist/backend/detail/CustomDataSection.js +1 -5
  10. package/dist/backend/detail/CustomDataSection.js.map +2 -2
  11. package/dist/backend/detail/InlineEditors.js +2 -5
  12. package/dist/backend/detail/InlineEditors.js.map +2 -2
  13. package/dist/backend/detail/NotesSection.js +2 -6
  14. package/dist/backend/detail/NotesSection.js.map +2 -2
  15. package/dist/backend/icons/lucideRegistry.generated.js +93 -3
  16. package/dist/backend/icons/lucideRegistry.generated.js.map +2 -2
  17. package/dist/backend/markdown/MarkdownContent.js +47 -4
  18. package/dist/backend/markdown/MarkdownContent.js.map +2 -2
  19. package/dist/portal/PortalShell.js +41 -11
  20. package/dist/portal/PortalShell.js.map +2 -2
  21. package/dist/portal/hooks/usePortalDashboardWidgets.js +40 -1
  22. package/dist/portal/hooks/usePortalDashboardWidgets.js.map +2 -2
  23. package/dist/portal/utils/nav.js +84 -0
  24. package/dist/portal/utils/nav.js.map +7 -0
  25. package/package.json +13 -9
  26. package/src/backend/AppShell.tsx +22 -2
  27. package/src/backend/DataTable.tsx +28 -5
  28. package/src/backend/__tests__/AppShell.test.tsx +67 -0
  29. package/src/backend/__tests__/FormHeader.test.tsx +0 -1
  30. package/src/backend/detail/CustomDataSection.tsx +1 -10
  31. package/src/backend/detail/InlineEditors.tsx +3 -15
  32. package/src/backend/detail/NotesSection.tsx +5 -14
  33. package/src/backend/icons/lucideRegistry.generated.tsx +93 -3
  34. package/src/backend/injection/__tests__/resolveInjectedIcon.test.tsx +7 -0
  35. package/src/backend/markdown/MarkdownContent.tsx +76 -6
  36. package/src/backend/section-page/types.ts +1 -0
  37. package/src/portal/PortalShell.tsx +43 -11
  38. package/src/portal/hooks/__tests__/usePortalDashboardWidgets.test.tsx +117 -0
  39. package/src/portal/hooks/usePortalDashboardWidgets.ts +55 -1
  40. package/src/portal/utils/__tests__/nav.test.ts +199 -0
  41. package/src/portal/utils/nav.ts +150 -0
@@ -433,7 +433,28 @@ function ExportMenu({ config, sections }) {
433
433
  ] });
434
434
  }
435
435
  function sanitizeDndContextId(value) {
436
- const normalized = value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
436
+ const trimmed = value.trim().toLowerCase();
437
+ let normalized = "";
438
+ let previousWasDash = false;
439
+ for (const character of trimmed) {
440
+ const isLowercaseLetter = character >= "a" && character <= "z";
441
+ const isDigit = character >= "0" && character <= "9";
442
+ if (isLowercaseLetter || isDigit || character === "_") {
443
+ normalized += character;
444
+ previousWasDash = false;
445
+ continue;
446
+ }
447
+ if (!previousWasDash) {
448
+ normalized += "-";
449
+ previousWasDash = true;
450
+ }
451
+ }
452
+ while (normalized.startsWith("-")) {
453
+ normalized = normalized.slice(1);
454
+ }
455
+ while (normalized.endsWith("-")) {
456
+ normalized = normalized.slice(0, -1);
457
+ }
437
458
  return normalized.length > 0 ? normalized : "data-table";
438
459
  }
439
460
  function HeaderDndWrapper({ enabled, contextId, sensors, columnIds, onDragEnd, children }) {