@middag-io/react 0.45.3 → 0.46.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 (128) hide show
  1. package/dist-lib/base/blocks/ActionGridBlock.d.ts +0 -2
  2. package/dist-lib/base/blocks/ActionGridBlock.d.ts.map +1 -1
  3. package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts +0 -2
  4. package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
  5. package/dist-lib/base/blocks/CardGridBlock.d.ts +0 -2
  6. package/dist-lib/base/blocks/CardGridBlock.d.ts.map +1 -1
  7. package/dist-lib/base/blocks/DenseTableBlock.d.ts +0 -2
  8. package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
  9. package/dist-lib/base/blocks/DetailPanelBlock.d.ts +0 -2
  10. package/dist-lib/base/blocks/DetailPanelBlock.d.ts.map +1 -1
  11. package/dist-lib/base/blocks/EmptyStateBlock.d.ts +0 -2
  12. package/dist-lib/base/blocks/EmptyStateBlock.d.ts.map +1 -1
  13. package/dist-lib/base/blocks/LinkListBlock.d.ts +0 -2
  14. package/dist-lib/base/blocks/LinkListBlock.d.ts.map +1 -1
  15. package/dist-lib/base/blocks/MarkdownPanelBlock.d.ts +0 -2
  16. package/dist-lib/base/blocks/MarkdownPanelBlock.d.ts.map +1 -1
  17. package/dist-lib/base/blocks/MetricCardBlock.d.ts +0 -2
  18. package/dist-lib/base/blocks/MetricCardBlock.d.ts.map +1 -1
  19. package/dist-lib/base/blocks/StatusStripBlock.d.ts +0 -2
  20. package/dist-lib/base/blocks/StatusStripBlock.d.ts.map +1 -1
  21. package/dist-lib/base/blocks/TabsBlock.d.ts +0 -1
  22. package/dist-lib/base/blocks/TabsBlock.d.ts.map +1 -1
  23. package/dist-lib/base/layout/DashboardLayout.d.ts +0 -2
  24. package/dist-lib/base/layout/DashboardLayout.d.ts.map +1 -1
  25. package/dist-lib/base/partials/ActionBar/index.d.ts +0 -2
  26. package/dist-lib/base/partials/ActionBar/index.d.ts.map +1 -1
  27. package/dist-lib/base/partials/DataTable/index.d.ts +0 -2
  28. package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
  29. package/dist-lib/base/partials/DataTable/types.d.ts +0 -2
  30. package/dist-lib/base/partials/DataTable/types.d.ts.map +1 -1
  31. package/dist-lib/base/partials/DetailSection/index.d.ts +0 -2
  32. package/dist-lib/base/partials/DetailSection/index.d.ts.map +1 -1
  33. package/dist-lib/base/partials/EmptyPlaceholder/index.d.ts +0 -2
  34. package/dist-lib/base/partials/EmptyPlaceholder/index.d.ts.map +1 -1
  35. package/dist-lib/base/partials/FilterBar/index.d.ts +0 -2
  36. package/dist-lib/base/partials/FilterBar/index.d.ts.map +1 -1
  37. package/dist-lib/base/partials/FormSection/index.d.ts +0 -2
  38. package/dist-lib/base/partials/FormSection/index.d.ts.map +1 -1
  39. package/dist-lib/base/partials/LogViewer/index.d.ts +0 -2
  40. package/dist-lib/base/partials/LogViewer/index.d.ts.map +1 -1
  41. package/dist-lib/base/partials/MarkdownContent/index.d.ts +0 -2
  42. package/dist-lib/base/partials/MarkdownContent/index.d.ts.map +1 -1
  43. package/dist-lib/base/partials/StatRow/index.d.ts +0 -2
  44. package/dist-lib/base/partials/StatRow/index.d.ts.map +1 -1
  45. package/dist-lib/base/partials/StatusBar/index.d.ts +0 -2
  46. package/dist-lib/base/partials/StatusBar/index.d.ts.map +1 -1
  47. package/dist-lib/base/partials/StatusIndicator/index.d.ts +0 -2
  48. package/dist-lib/base/partials/StatusIndicator/index.d.ts.map +1 -1
  49. package/dist-lib/base/partials/TimelineList/index.d.ts +0 -2
  50. package/dist-lib/base/partials/TimelineList/index.d.ts.map +1 -1
  51. package/dist-lib/base/shell/partials/EditablePanelContext.d.ts +1 -1
  52. package/dist-lib/base/shell/partials/EditablePanelContext.d.ts.map +1 -1
  53. package/dist-lib/base/shell/partials/NavErrorBoundary.d.ts +0 -2
  54. package/dist-lib/base/shell/partials/NavErrorBoundary.d.ts.map +1 -1
  55. package/dist-lib/base/shell/partials/OverlayScreen.d.ts +1 -1
  56. package/dist-lib/base/theme/host-theme-detector.d.ts +1 -1
  57. package/dist-lib/base/theme/tokens.css +0 -2
  58. package/dist-lib/base/utils/clipboard.d.ts +0 -2
  59. package/dist-lib/base/utils/clipboard.d.ts.map +1 -1
  60. package/dist-lib/base/utils/icons.d.ts +1 -1
  61. package/dist-lib/base/utils/time.d.ts +2 -4
  62. package/dist-lib/base/utils/time.d.ts.map +1 -1
  63. package/dist-lib/contracts/block-data/index.d.ts +1 -4
  64. package/dist-lib/contracts/block-data/index.d.ts.map +1 -1
  65. package/dist-lib/contracts/navigation.d.ts +1 -4
  66. package/dist-lib/contracts/navigation.d.ts.map +1 -1
  67. package/dist-lib/contracts/shared-props.d.ts +0 -2
  68. package/dist-lib/contracts/shared-props.d.ts.map +1 -1
  69. package/dist-lib/engine/ContractPage.d.ts +1 -1
  70. package/dist-lib/engine/HostSlot.d.ts +0 -2
  71. package/dist-lib/engine/HostSlot.d.ts.map +1 -1
  72. package/dist-lib/engine/providers/auth.d.ts +0 -2
  73. package/dist-lib/engine/providers/auth.d.ts.map +1 -1
  74. package/dist-lib/engine/providers/flash.d.ts +0 -2
  75. package/dist-lib/engine/providers/flash.d.ts.map +1 -1
  76. package/dist-lib/engine/providers/progress.d.ts +0 -2
  77. package/dist-lib/engine/providers/progress.d.ts.map +1 -1
  78. package/dist-lib/engine/providers/scope.d.ts +0 -1
  79. package/dist-lib/engine/providers/scope.d.ts.map +1 -1
  80. package/dist-lib/engine/registries.d.ts +1 -1
  81. package/dist-lib/lib/portal-container.d.ts +1 -1
  82. package/dist-lib/middag-react.js +5530 -5512
  83. package/package.json +1 -1
  84. package/src/base/blocks/ActionGridBlock.tsx +0 -2
  85. package/src/base/blocks/ActivityTimelineBlock.tsx +0 -2
  86. package/src/base/blocks/CardGridBlock.tsx +0 -2
  87. package/src/base/blocks/DenseTableBlock.tsx +12 -10
  88. package/src/base/blocks/DetailPanelBlock.tsx +0 -2
  89. package/src/base/blocks/EmptyStateBlock.tsx +0 -2
  90. package/src/base/blocks/LinkListBlock.tsx +0 -2
  91. package/src/base/blocks/MarkdownPanelBlock.tsx +0 -2
  92. package/src/base/blocks/MetricCardBlock.tsx +0 -2
  93. package/src/base/blocks/StatusStripBlock.tsx +0 -2
  94. package/src/base/blocks/TabsBlock.tsx +0 -1
  95. package/src/base/layout/DashboardLayout.tsx +0 -2
  96. package/src/base/partials/ActionBar/index.tsx +0 -2
  97. package/src/base/partials/DataTable/index.tsx +32 -17
  98. package/src/base/partials/DataTable/types.ts +0 -2
  99. package/src/base/partials/DetailSection/index.tsx +0 -2
  100. package/src/base/partials/EmptyPlaceholder/index.tsx +0 -2
  101. package/src/base/partials/FilterBar/index.tsx +0 -2
  102. package/src/base/partials/FormSection/index.tsx +0 -2
  103. package/src/base/partials/LogViewer/index.tsx +0 -2
  104. package/src/base/partials/MarkdownContent/index.tsx +0 -2
  105. package/src/base/partials/StatRow/index.tsx +0 -2
  106. package/src/base/partials/StatusBar/index.tsx +0 -2
  107. package/src/base/partials/StatusIndicator/index.tsx +0 -2
  108. package/src/base/partials/TimelineList/index.tsx +0 -2
  109. package/src/base/shell/partials/EditablePanelContext.tsx +1 -1
  110. package/src/base/shell/partials/NavErrorBoundary.tsx +0 -2
  111. package/src/base/shell/partials/OverlayScreen.tsx +1 -1
  112. package/src/base/theme/host-theme-detector.ts +1 -1
  113. package/src/base/theme/tokens.css +0 -2
  114. package/src/base/utils/clipboard.ts +0 -2
  115. package/src/base/utils/icons.ts +1 -1
  116. package/src/base/utils/time.ts +2 -4
  117. package/src/contracts/block-data/index.ts +1 -4
  118. package/src/contracts/navigation.ts +1 -4
  119. package/src/contracts/shared-props.ts +0 -2
  120. package/src/engine/ContractPage.tsx +6 -6
  121. package/src/engine/HostSlot.tsx +0 -2
  122. package/src/engine/providers/auth.tsx +0 -2
  123. package/src/engine/providers/flash.tsx +0 -2
  124. package/src/engine/providers/progress.tsx +0 -2
  125. package/src/engine/providers/scope.tsx +0 -1
  126. package/src/engine/registries.ts +1 -1
  127. package/src/i18n/instance.ts +3 -3
  128. package/src/lib/portal-container.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middag-io/react",
3
- "version": "0.45.3",
3
+ "version": "0.46.0",
4
4
  "type": "module",
5
5
  "description": "MIDDAG shared React UI library for Moodle, WordPress and other Inertia hosts",
6
6
  "license": "Apache-2.0",
@@ -4,8 +4,6 @@
4
4
  * Each card displays an icon, title, description, and an action button.
5
5
  * When confirmText is present, an AlertDialog gates the action.
6
6
  * Actions execute via Inertia router.post/delete.
7
- *
8
- * @see ADR-807
9
7
  */
10
8
 
11
9
  "use client";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Renders timeline entries grouped by date. Supports load more via Inertia partial reload.
5
5
  * Stub implementation until TimelineList partial is available.
6
- *
7
- * @see NV-05-ux-blocks.md §6
8
6
  */
9
7
 
10
8
  import { useState, type ReactElement } from "react";
@@ -8,8 +8,6 @@
8
8
  * - 'default': generic key-value card
9
9
  * - 'store': ecommerce store card with logo, stats, status badge
10
10
  * - 'connector': connector card with type icon and health indicator
11
- *
12
- * @see ADR-807
13
11
  */
14
12
 
15
13
  "use client";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Maps BlockDescriptor<DenseTableBlockData> to DataTable partial props.
5
5
  * Server interactions use Inertia partial reload.
6
- *
7
- * @see NV-05-ux-blocks.md §1
8
6
  */
9
7
 
10
8
  import { useCallback, useEffect, useRef, useState, type ReactElement } from "react";
@@ -30,13 +28,17 @@ export function DenseTableBlock({ block }: BlockProps<DenseTableBlockData>): Rea
30
28
  const isLoading = meta?.loading === true;
31
29
  const clientSide = (meta as Record<string, unknown> | undefined)?.clientSide === true;
32
30
  const rowKeyField = (meta?.rowKey as string) ?? "id";
33
- const reloadKey = (meta?.partialReloadKey as string) ?? key;
34
- // clientSide tables filter in-browser; seed the search box from the URL
35
- // ?search= param so tag-chip links (e.g. /tickets?search=<tag>) and shareable
36
- // search URLs actually filter on load. Server mode echoes search via the
37
- // contract, so this only applies to clientSide.
38
- const initialClientSearch =
39
- clientSide && typeof window !== "undefined"
31
+ // Server-mode reloads ask for this page prop only. Pages ship blocks inside
32
+ // the single `contract` prop, so that is the default; the block key is not a
33
+ // page prop and asking for it reloaded nothing.
34
+ const reloadKey = (meta?.partialReloadKey as string | undefined) ?? "contract";
35
+ // Seed the search box from the URL ?search= param. clientSide tables filter
36
+ // in-browser, so tag-chip links (e.g. /tickets?search=<tag>) and shareable
37
+ // search URLs filter on load. Server mode sends the full query on every
38
+ // change, and the contract does not echo the search, so the URL is the only
39
+ // place the current search survives a reload.
40
+ const initialSearch =
41
+ typeof window !== "undefined"
40
42
  ? (new URLSearchParams(window.location.search).get("search") ?? "")
41
43
  : "";
42
44
 
@@ -357,7 +359,7 @@ export function DenseTableBlock({ block }: BlockProps<DenseTableBlockData>): Rea
357
359
  onRowClick={inspectorEnabled || data.rowHref ? handleRowClick : undefined}
358
360
  selectedRowKey={inspectorEnabled && selectedId ? String(selectedId) : undefined}
359
361
  isLoading={isLoading}
360
- searchValue={initialClientSearch}
362
+ searchValue={initialSearch}
361
363
  searchPlaceholder={data.searchPlaceholder}
362
364
  emptyStateIcon={data.emptyState?.icon}
363
365
  emptyStateTitle={data.emptyState?.title}
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Delegates to DetailSection partial (created by partials-builder agent).
5
5
  * Stub implementation until DetailSection is available — renders fields directly.
6
- *
7
- * @see NV-05-ux-blocks.md §4
8
6
  */
9
7
 
10
8
  import { useCallback, useState, type ReactElement } from "react";
@@ -2,8 +2,6 @@
2
2
  * EmptyStateBlock — variant-aware empty state with icon, description, and CTA.
3
3
  *
4
4
  * Delegates to EmptyPlaceholder partial.
5
- *
6
- * @see NV-05-ux-blocks.md §7
7
5
  */
8
6
 
9
7
  import type { ReactElement } from "react";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Items with href: null are hidden. Internal destinations navigate through
5
5
  * Inertia; external links stay plain anchors and open in a new tab.
6
- *
7
- * @see ADR-807 block catalog
8
6
  */
9
7
 
10
8
  import type { ReactElement } from "react";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Delegates to MarkdownContent partial when available.
5
5
  * Stub renders raw content in a prose-style container.
6
- *
7
- * @see NV-05-ux-blocks.md §8
8
6
  */
9
7
 
10
8
  import { lazy, Suspense, type ReactElement } from "react";
@@ -1,7 +1,5 @@
1
1
  /**
2
2
  * MetricCardBlock — KPI card with value, delta, icon, and optional link.
3
- *
4
- * @see NV-05-ux-blocks.md §3.1–3.7
5
3
  */
6
4
 
7
5
  import type { ReactElement } from "react";
@@ -2,8 +2,6 @@
2
2
  * StatusStripBlock — horizontal status indicators strip.
3
3
  *
4
4
  * Delegates to StatusBar partial. Derives score item if score is present.
5
- *
6
- * @see NV-05-ux-blocks.md §5
7
5
  */
8
6
 
9
7
  import type { ReactElement } from "react";
@@ -6,7 +6,6 @@
6
6
  * active font-weight 500).
7
7
  *
8
8
  * @see DESIGN.md §P1 — Tabs
9
- * @see ADR-807 ref/page-contract-v1 §5
10
9
  */
11
10
 
12
11
  import type { ReactElement } from "react";
@@ -5,8 +5,6 @@
5
5
  *
6
6
  * Metrics renders blocks in a grid (no per-block padding).
7
7
  * Content and aside render blocks directly — blocks are self-describing.
8
- *
9
- * @see NV-05-ux-screens-core.md T-01
10
8
  */
11
9
 
12
10
  import type { ReactElement } from "react";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Shows selected count + bulk action buttons. Dangerous actions require confirmation
5
5
  * via the unified ConfirmationDialog.
6
- *
7
- * @see NV-05-ux-blocks.md §1.2 toolbar anatomy
8
6
  */
9
7
 
10
8
  import { useState, type ReactElement } from "react";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Features: search, filters, column visibility, sorting, row selection,
5
5
  * bulk actions, row actions, skeleton loading, empty state, mobile card layout.
6
- *
7
- * @see NV-05-ux-blocks.md
8
6
  */
9
7
 
10
8
  import {
@@ -563,13 +561,30 @@ export function DataTable<TData extends object>({
563
561
  return () => mql.removeEventListener("change", handler as (e: MediaQueryListEvent) => void);
564
562
  }, []);
565
563
 
564
+ // Server mode: every request carries the full query. The server reads only
565
+ // what it receives, so a change that sends just its own key (the pager
566
+ // sending `page`) silently drops the search, sort, page size and filters.
567
+ const emitParamChange = useCallback(
568
+ (changes: DataTableParamChange) => {
569
+ onParamChange?.({
570
+ page: pagination?.page ?? 0,
571
+ perPage: pagination?.perPage,
572
+ sort: sort ?? null,
573
+ search: debouncedSearch,
574
+ filters: appliedFilters,
575
+ ...changes,
576
+ });
577
+ },
578
+ [onParamChange, pagination?.page, pagination?.perPage, sort, debouncedSearch, appliedFilters],
579
+ );
580
+
566
581
  // Emit search changes
567
582
  useEffect(() => {
568
583
  if (debouncedSearch !== prevDebouncedRef.current) {
569
584
  prevDebouncedRef.current = debouncedSearch;
570
- onParamChange?.({ search: debouncedSearch, page: 0 });
585
+ emitParamChange({ search: debouncedSearch, page: 0 });
571
586
  }
572
- }, [debouncedSearch, onParamChange]);
587
+ }, [debouncedSearch, emitParamChange]);
573
588
 
574
589
  // -----------------------------------------------------------------------
575
590
  // Sorting bridge: DataTable sort <-> TanStack SortingState
@@ -589,15 +604,15 @@ export function DataTable<TData extends object>({
589
604
  return;
590
605
  }
591
606
  if (next.length === 0) {
592
- onParamChange?.({ sort: null });
607
+ emitParamChange({ sort: null });
593
608
  } else {
594
609
  const s = next[0];
595
- onParamChange?.({
610
+ emitParamChange({
596
611
  sort: { key: s.id, direction: s.desc ? "desc" : "asc" },
597
612
  });
598
613
  }
599
614
  },
600
- [sortingState, onParamChange, clientSide],
615
+ [sortingState, emitParamChange, clientSide],
601
616
  );
602
617
 
603
618
  // -----------------------------------------------------------------------
@@ -795,7 +810,7 @@ export function DataTable<TData extends object>({
795
810
  changes.perPage = next.pageSize;
796
811
  changes.page = 0;
797
812
  }
798
- onParamChange?.(changes);
813
+ emitParamChange(changes);
799
814
  },
800
815
  getCoreRowModel: getCoreRowModel(),
801
816
  ...(clientSide
@@ -845,12 +860,12 @@ export function DataTable<TData extends object>({
845
860
  table.setPageIndex(0);
846
861
  return;
847
862
  }
848
- onParamChange?.({
863
+ emitParamChange({
849
864
  filters: { ...appliedFilters, [key]: value },
850
865
  page: 0,
851
866
  });
852
867
  },
853
- [appliedFilters, onParamChange, clientSide, table],
868
+ [appliedFilters, emitParamChange, clientSide, table],
854
869
  );
855
870
 
856
871
  const handleFilterRemove = useCallback(
@@ -867,9 +882,9 @@ export function DataTable<TData extends object>({
867
882
  }
868
883
  const next = { ...appliedFilters };
869
884
  delete next[key];
870
- onParamChange?.({ filters: next, page: 0 });
885
+ emitParamChange({ filters: next, page: 0 });
871
886
  },
872
- [appliedFilters, onParamChange, clientSide, table],
887
+ [appliedFilters, emitParamChange, clientSide, table],
873
888
  );
874
889
 
875
890
  const handleFilterClearAll = useCallback(() => {
@@ -879,8 +894,8 @@ export function DataTable<TData extends object>({
879
894
  table.setPageIndex(0);
880
895
  return;
881
896
  }
882
- onParamChange?.({ filters: {}, page: 0 });
883
- }, [onParamChange, clientSide, table]);
897
+ emitParamChange({ filters: {}, page: 0 });
898
+ }, [emitParamChange, clientSide, table]);
884
899
 
885
900
  // -----------------------------------------------------------------------
886
901
  // Column count for visibility toggle threshold
@@ -1236,7 +1251,7 @@ export function DataTable<TData extends object>({
1236
1251
  if (clientSide) {
1237
1252
  table.setPageSize(Number(e.target.value));
1238
1253
  } else {
1239
- onParamChange?.({ perPage: Number(e.target.value), page: 0 });
1254
+ emitParamChange({ perPage: Number(e.target.value), page: 0 });
1240
1255
  }
1241
1256
  }}
1242
1257
  className="border-border text-muted-foreground h-7 rounded border bg-transparent px-1.5 text-xs"
@@ -1253,7 +1268,7 @@ export function DataTable<TData extends object>({
1253
1268
  size="icon-xs"
1254
1269
  disabled={pageIndex === 0}
1255
1270
  onClick={() =>
1256
- clientSide ? table.previousPage() : onParamChange?.({ page: pageIndex - 1 })
1271
+ clientSide ? table.previousPage() : emitParamChange({ page: pageIndex - 1 })
1257
1272
  }
1258
1273
  aria-label={t("middag.ui.table.previous_page")}
1259
1274
  >
@@ -1267,7 +1282,7 @@ export function DataTable<TData extends object>({
1267
1282
  size="icon-xs"
1268
1283
  disabled={pageIndex >= pageCount - 1}
1269
1284
  onClick={() =>
1270
- clientSide ? table.nextPage() : onParamChange?.({ page: pageIndex + 1 })
1285
+ clientSide ? table.nextPage() : emitParamChange({ page: pageIndex + 1 })
1271
1286
  }
1272
1287
  aria-label={t("middag.ui.table.next_page")}
1273
1288
  >
@@ -1,7 +1,5 @@
1
1
  /**
2
2
  * DataTable types — column definitions, pagination, sorting, filtering, and actions.
3
- *
4
- * @see NV-05-ux-blocks.md
5
3
  */
6
4
 
7
5
  import type { ReactNode } from "react";
@@ -4,8 +4,6 @@
4
4
  * Renders structured data as label/value pairs in a responsive grid.
5
5
  * Desktop uses CSS grid (1fr/2fr), mobile stacks with overline labels.
6
6
  * Supports multiple field kinds: text, status, timestamp, boolean, link, code, email.
7
- *
8
- * @see NV-05-ux-blocks.md §4 (detail section anatomy)
9
7
  */
10
8
 
11
9
  import { useCallback, useState, type ReactElement } from "react";
@@ -2,8 +2,6 @@
2
2
  * EmptyPlaceholder — contextual empty state with icon, title, description, and CTA.
3
3
  *
4
4
  * Variants: first-use, no-results, error, permission, compact, inline.
5
- *
6
- * @see NV-05-ux-blocks.md §7.1–7.8, §9.3
7
5
  */
8
6
 
9
7
  import { lazy, Suspense, type ReactElement } from "react";
@@ -2,8 +2,6 @@
2
2
  * FilterBar — filter trigger button + popover/sheet with available filters.
3
3
  *
4
4
  * Desktop (>=1024px): Popover. Tablet/Mobile: Sheet from bottom.
5
- *
6
- * @see NV-05-ux-blocks.md §1.2 toolbar anatomy
7
5
  */
8
6
 
9
7
  import { Fragment, useState, type ReactElement } from "react";
@@ -2,8 +2,6 @@
2
2
  * FormSection — collapsible fieldset container for form groups.
3
3
  *
4
4
  * Does not render fields — receives them as children.
5
- *
6
- * @see NV-05-ux-blocks.md §2.6
7
5
  */
8
6
 
9
7
  import { useState, type ReactElement, type ReactNode } from "react";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Receives parsed lines from server (log_reader_service::read_file).
5
5
  * Available for dependent plugins at system/partials/LogViewer.
6
- *
7
- * @see ADR-924, logs-redesign-design.md
8
6
  */
9
7
 
10
8
  import { useEffect, useRef, useState, type ReactElement } from "react";
@@ -4,8 +4,6 @@
4
4
  * Uses react-markdown with rehype-highlight for code blocks and rehype-sanitize
5
5
  * for XSS prevention. External links open in a new tab; internal links use
6
6
  * Inertia router for SPA navigation.
7
- *
8
- * @see NV-05-ux-blocks.md §5 (markdown content rendering)
9
7
  */
10
8
 
11
9
  import { useCallback, useState, type ComponentPropsWithoutRef, type ReactElement } from "react";
@@ -1,7 +1,5 @@
1
1
  /**
2
2
  * StatRow — responsive grid container for MetricCardBlock instances.
3
- *
4
- * @see NV-05-ux-screens-core.md T-01 metrics region
5
3
  */
6
4
 
7
5
  import type { ReactElement, ReactNode } from "react";
@@ -1,7 +1,5 @@
1
1
  /**
2
2
  * StatusBar — horizontal strip of status indicators with colored dots.
3
- *
4
- * @see NV-05-ux-blocks.md §5.1–5.8
5
3
  */
6
4
 
7
5
  import type { ReactElement } from "react";
@@ -2,8 +2,6 @@
2
2
  * StatusIndicator — colored dot/icon with optional label.
3
3
  *
4
4
  * Used by DataTable status cells, detail panels, and anywhere status display is needed.
5
- *
6
- * @see NV-05-ux-blocks.md §1.2
7
5
  */
8
6
 
9
7
  import type { ReactElement } from "react";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Renders entries grouped by date, connected by a vertical timeline line.
5
5
  * Each entry has a colored icon node, actor, timestamp, action, and optional detail.
6
- *
7
- * @see NV-05-ux-blocks.md §6 (timeline anatomy)
8
6
  */
9
7
 
10
8
  import { useState, type ReactElement } from "react";
@@ -13,7 +13,7 @@ import type { FormSchemaNode } from "@/contracts/block-data";
13
13
  */
14
14
  export interface EditablePanelDescriptor {
15
15
  title: string;
16
- /** Small label above the title (e.g. "Formulário · matricula-2026"). */
16
+ /** Small label above the title (e.g. "Form · enrolment-2026"). */
17
17
  subtitle?: string;
18
18
  /** Form schema tree — fields, sections, groups, headers (FormPanel shape). */
19
19
  schema: FormSchemaNode[];
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * NavErrorBoundary — error boundary for sidebar and page header.
3
3
  * Shows a minimal fallback if navigation rendering fails.
4
- *
5
- * @see NV-05-ux-shell-sidebar.md §8.3
6
4
  */
7
5
 
8
6
  import { Component, type ErrorInfo, type ReactElement, type ReactNode } from "react";
@@ -11,7 +11,7 @@ interface OverlayScreenProps {
11
11
  }
12
12
 
13
13
  /**
14
- * Full-screen overlay panel with X close button (NV-05 — ADR-807).
14
+ * Full-screen overlay panel with X close button.
15
15
  *
16
16
  * Not a modal (no backdrop, no centering). Renders a stacked screen
17
17
  * on top of the current page. The underlying page stays mounted in the DOM.
@@ -9,7 +9,7 @@
9
9
  * 2. Known localStorage keys (scan, not assume)
10
10
  * 3. prefers-color-scheme media query (OS fallback)
11
11
  *
12
- * @see ADR-807 — CSS isolation via .middag-root
12
+ * CSS isolation via .middag-root
13
13
  */
14
14
 
15
15
  export type DetectedTheme = "dark" | "light" | "auto";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Source of truth for all visual tokens.
5
5
  * Consumed by Tailwind CSS v4 via @theme in tailwind.css.
6
- *
7
- * @see NV-05-ux-design-system.md
8
6
  */
9
7
 
10
8
  :root {
@@ -1,7 +1,5 @@
1
1
  /**
2
2
  * Clipboard utility — safe clipboard write with fallback.
3
- *
4
- * @see NV-05-ux-blocks.md §4.4 (copy-to-clipboard in DetailSection)
5
3
  */
6
4
 
7
5
  /**
@@ -4,7 +4,7 @@
4
4
  * Blocks receive icon names as strings from the server; this util resolves them.
5
5
  * Delegates to the icon registry populated by registerDefaultIcons().
6
6
  *
7
- * @see NV-05-ux-blocks.md — blocks reference icons by kebab-case name
7
+ * Blocks reference icons by kebab-case name.
8
8
  */
9
9
 
10
10
  import { InboxIcon } from "@hugeicons/core-free-icons";
@@ -7,14 +7,12 @@
7
7
  *
8
8
  * formatRelativeTime() keeps the hybrid scale used by timeline/timestamp
9
9
  * displays:
10
- * - < 1 min: "now" / "agora"
11
- * - < 1h: "N minutes ago" / "há N minutos"
10
+ * - < 1 min: "now"
11
+ * - < 1h: "N minutes ago"
12
12
  * - < 24h: time of day (locale short time)
13
13
  * - yesterday: "yesterday, <time>"
14
14
  * - < 30 days: "<day month>, <time>"
15
15
  * - >= 30 days: "<day month year>"
16
- *
17
- * @see NV-05-ux-blocks.md §6 (timeline timestamps)
18
16
  */
19
17
 
20
18
  import type { TimestampFormat } from "@/contracts/block-data";
@@ -1,11 +1,8 @@
1
1
  /**
2
- * Block data contracts — typed data shapes for the ADR-807 block types.
2
+ * Block data contracts — typed data shapes for the block types.
3
3
  *
4
4
  * Imported by block components for BlockProps<TData> type parameter.
5
5
  * These mirror the JSON shapes sent from PHP controllers via Inertia.
6
- *
7
- * @see ADR-807 ref/page-contract-v1 §5
8
- * @see NV-05-ux-blocks.md
9
6
  */
10
7
 
11
8
  export * from "./actions";
@@ -1,12 +1,9 @@
1
1
  /**
2
2
  * Navigation contract — typed shape for the `navigation` Inertia shared prop.
3
3
  *
4
- * Unified tree model (NV-05 — ADR-807 expanded).
4
+ * Unified tree model.
5
5
  * PHP serializes this from navigation_registry during boot().
6
6
  * Frontend reads it from usePage().props.navigation.
7
- *
8
- * @see ADR-807 ref/shell-and-navigation §4
9
- * @see NV-05-ux-shell-sidebar.md §1.3
10
7
  */
11
8
 
12
9
  /** Entity types for automatic icon resolution when no explicit icon is set. */
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * PHP side: inertia_manager::share() in http_kernel boot.
5
5
  * Frontend: usePage<SharedProps>().props
6
- *
7
- * @see NV-05-ux-shell-sidebar.md §1.3
8
6
  */
9
7
 
10
8
  import type { NavigationTreePayload } from "@/contracts/navigation";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * ContractPage — entry point for any page driven by PageContract.
3
3
  *
4
- * Resolves shell → layout → blocks through registries (ADR-807).
4
+ * Resolves shell → layout → blocks through registries.
5
5
  * Feature pages compose their contract in the backend; the runtime
6
6
  * handles rendering deterministically.
7
7
  *
@@ -22,7 +22,7 @@ import { isLazyBlock, LazyBlock } from "@/engine/LazyBlock";
22
22
  import { resolveBlock, resolveLayout, resolveShell } from "@/engine/registries";
23
23
  import { useTranslation } from "@/i18n/useTranslation";
24
24
 
25
- // Registry-based dynamic component resolution (ADR-807 §6). Shell and Layout are
25
+ // Registry-based dynamic component resolution. Shell and Layout are
26
26
  // stable singleton references retrieved from the registry — not new components.
27
27
  /* eslint-disable react-hooks/static-components */
28
28
  export function ContractPage({
@@ -39,7 +39,7 @@ export function ContractPage({
39
39
  [contract?.shell],
40
40
  );
41
41
 
42
- // D5: unknown layout falls back to "stack" instead of rendering error
42
+ // unknown layout falls back to "stack" instead of rendering error
43
43
  const Layout = useMemo(() => {
44
44
  const resolved = resolveLayout(contract?.layout?.template);
45
45
  if (!resolved) {
@@ -48,14 +48,14 @@ export function ContractPage({
48
48
  return resolved;
49
49
  }, [contract?.layout?.template]);
50
50
 
51
- // D15: stable reference — prevents Layout re-renders if it's memoized
51
+ // stable reference — prevents Layout re-renders if it's memoized
52
52
  const renderBlock = useCallback(
53
53
  (block: BlockDescriptor): ReactElement | null => {
54
54
  const Block = resolveBlock(block.type);
55
55
 
56
56
  if (!Block) {
57
57
  // role="alert" surfaces the diagnostic to assistive tech; the specific
58
- // block type is a dev-only detail (verbose só DEV) — prod shows only the
58
+ // block type is a dev-only detail — prod shows only the
59
59
  // translated category so internal keys never leak to end users.
60
60
  return (
61
61
  <div
@@ -97,7 +97,7 @@ export function ContractPage({
97
97
  // ── Early returns after all hooks ───────────────────────────────────────
98
98
 
99
99
  if (validationErrors) {
100
- // The per-field validation list is a dev diagnostic (verbose só DEV); prod
100
+ // The per-field validation list is a dev diagnostic; prod
101
101
  // renders only the translated headline inside the alert.
102
102
  return (
103
103
  <div
@@ -47,8 +47,6 @@
47
47
  * | `middag-global-search` | Central search bar (⌘K) | local_middag |
48
48
  * | `middag-org-selector` | Organization/scope switcher | local_middag |
49
49
  * | `middag-quick-menu` | MIDDAG quick-access grid | local_middag |
50
- *
51
- * @see ADR-807 ref/host-integration
52
50
  */
53
51
 
54
52
  "use client";
@@ -2,8 +2,6 @@
2
2
  * AuthProvider — React context for authenticated user data and capability checks.
3
3
  *
4
4
  * Reads auth from Inertia shared props populated by inertia_shared_props.php.
5
- *
6
- * @see NV-05-ux-shell-sidebar.md §1.3
7
5
  */
8
6
 
9
7
  import { createContext, useContext, useMemo, type ReactNode } from "react";
@@ -4,8 +4,6 @@
4
4
  * Flash messages are server-sent one-shot notifications (success/error/info/warning).
5
5
  * This provider listens to flash prop changes on each Inertia navigation and
6
6
  * fires the appropriate toast. Does not re-fire if flash is unchanged.
7
- *
8
- * @see NV-05-ux-shell-sidebar.md §1.3
9
7
  */
10
8
 
11
9
  import { useEffect, useRef, type ReactNode } from "react";
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * Hooks into Inertia router events to show a thin progress bar at the
5
5
  * top of the viewport during page transitions.
6
- *
7
- * @see NV-05-ux-shell-sidebar.md §6.3
8
6
  */
9
7
 
10
8
  import { useEffect, type ReactNode } from "react";
@@ -5,7 +5,6 @@
5
5
  * global_scope_manager. Extensions add their scope data during boot().
6
6
  *
7
7
  * @see classes/framework/kernel/manager/global_scope_manager.php
8
- * @see NV-05-ux-shell-sidebar.md §1.3
9
8
  */
10
9
 
11
10
  import { createContext, useContext, useMemo, type ReactNode } from "react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Registries (ADR-807) — closed, versioned maps from page-contract types
2
+ * Registries — closed, versioned maps from page-contract types
3
3
  * to React components.
4
4
  *
5
5
  * shellRegistry: shell key → React component