@middag-io/react 0.47.0 → 0.48.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 (37) hide show
  1. package/dist-lib/base/shell/BasicShell.d.ts +1 -1
  2. package/dist-lib/base/utils/icon-registry.d.ts +3 -2
  3. package/dist-lib/base/utils/icon-registry.d.ts.map +1 -1
  4. package/dist-lib/contracts/generated/index.d.ts +4 -4
  5. package/dist-lib/contracts/generated/index.d.ts.map +1 -1
  6. package/dist-lib/contracts/generated/schemas.d.ts +131 -163
  7. package/dist-lib/contracts/generated/schemas.d.ts.map +1 -1
  8. package/dist-lib/contracts/generated/types.d.ts +69 -43
  9. package/dist-lib/contracts/generated/types.d.ts.map +1 -1
  10. package/dist-lib/contracts/navigation.d.ts +5 -38
  11. package/dist-lib/contracts/navigation.d.ts.map +1 -1
  12. package/dist-lib/contracts/page-contract-schema.d.ts +3 -3
  13. package/dist-lib/contracts/shared-props.d.ts +10 -71
  14. package/dist-lib/contracts/shared-props.d.ts.map +1 -1
  15. package/dist-lib/engine/providers/auth.d.ts +2 -2
  16. package/dist-lib/engine/providers/auth.d.ts.map +1 -1
  17. package/dist-lib/engine/providers/flash.d.ts.map +1 -1
  18. package/dist-lib/index.d.ts +2 -2
  19. package/dist-lib/index.d.ts.map +1 -1
  20. package/dist-lib/middag-react.js +6166 -6144
  21. package/docs/public/schemas/ai-contract-manifest.json +9 -9
  22. package/docs/public/schemas/fragment.json +155 -87
  23. package/docs/public/schemas/manifest.json +4 -4
  24. package/docs/public/schemas/page-contract.json +155 -87
  25. package/docs/public/schemas/shared-props.json +2457 -114
  26. package/package.json +1 -1
  27. package/src/base/shell/BasicShell.tsx +7 -7
  28. package/src/base/utils/icon-registry.ts +3 -3
  29. package/src/contracts/generated/index.ts +4 -4
  30. package/src/contracts/generated/schemas.ts +66 -35
  31. package/src/contracts/generated/types.ts +71 -51
  32. package/src/contracts/navigation.ts +5 -52
  33. package/src/contracts/page-contract-schema.ts +2 -2
  34. package/src/contracts/shared-props.ts +10 -75
  35. package/src/engine/providers/auth.tsx +1 -1
  36. package/src/engine/providers/flash.tsx +0 -5
  37. package/docs/public/schemas/navigation.json +0 -72
@@ -1,72 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://ui-docs.middag.io/schemas/navigation.json",
4
- "title": "MIDDAG Navigation Contract",
5
- "description": "TypeScript contract for the sidebar navigation tree. Serialized from PHP navigation_registry during boot(). Consumed by ProductShell's SidebarNav component via usePage().props.navigation.",
6
-
7
- "types": {
8
- "NavigationEntityType": {
9
- "type": "string",
10
- "enum": [
11
- "connector", "workflow", "segment", "instancegroup", "condition",
12
- "compliance", "offering", "order", "course", "form", "certificate"
13
- ],
14
- "description": "Entity types for automatic icon resolution. When a NavigationNode has entityType set but no explicit icon, the Icon Registry resolves the icon from registerEntityIcon() mappings.",
15
- "x-ai-purpose": "Use entityType instead of icon when the node represents a known entity. The icon registry will automatically resolve the correct icon, ensuring visual consistency across the app."
16
- },
17
- "NavigationNode": {
18
- "type": "object",
19
- "description": "A single node in the navigation tree. Can be a leaf (link) or a branch (group with children).",
20
- "properties": {
21
- "key": { "type": "string", "description": "Unique identifier within the tree." },
22
- "label": { "type": "string", "description": "Display text." },
23
- "icon": { "type": "string", "description": "Lucide icon name (kebab-case, e.g. 'graduation-cap'). Optional if entityType is set." },
24
- "entityType": { "$ref": "#/types/NavigationEntityType", "description": "Entity type for automatic icon resolution via Icon Registry." },
25
- "href": { "type": "string", "description": "Navigation URL. Omit for non-navigable group headers." },
26
- "badge": { "type": ["string", "number"], "description": "Badge content (count or text)." },
27
- "badgeVariant": {
28
- "type": "string",
29
- "enum": ["count", "alert"],
30
- "description": "'count' shows muted text (default). 'alert' shows a red pill badge."
31
- },
32
- "active": { "type": "boolean", "description": "Whether this node is the current page." },
33
- "drilldown": { "type": "boolean", "description": "When true, clicking replaces sidebar with this node's children + back button." },
34
- "collapsible": { "type": "boolean", "description": "When true, group renders with expand/collapse toggle." },
35
- "defaultOpen": { "type": "boolean", "description": "Whether a collapsible group starts expanded (default: false)." },
36
- "statusColor": { "type": "string", "description": "CSS color for status dot next to drilldown title (e.g. 'var(--success)')." },
37
- "target": { "type": "string", "description": "Link target attribute. External URLs (http/https) auto-detect '_blank'." },
38
- "children": {
39
- "type": "array",
40
- "items": { "$ref": "#/types/NavigationNode" },
41
- "description": "Child nodes (subtree)."
42
- }
43
- },
44
- "required": ["key", "label"]
45
- },
46
- "NavigationTreePayload": {
47
- "type": "object",
48
- "description": "The complete navigation payload sent via Inertia shared props. Contains the tree, active node key, drilldown state, and persistent footer items.",
49
- "properties": {
50
- "tree": {
51
- "type": "array",
52
- "items": { "$ref": "#/types/NavigationNode" },
53
- "description": "Root-level navigation nodes (sidebar sections)."
54
- },
55
- "activeKey": { "type": "string", "description": "Key of the currently active navigation node." },
56
- "drilldownStack": {
57
- "type": "array",
58
- "items": { "type": "string" },
59
- "description": "Stack of drilled-down node keys for back navigation."
60
- },
61
- "footer": {
62
- "type": "array",
63
- "items": { "$ref": "#/types/NavigationNode" },
64
- "description": "Persistent footer items (Settings, Help) always visible at sidebar bottom."
65
- }
66
- },
67
- "required": ["tree", "activeKey", "footer"]
68
- }
69
- },
70
-
71
- "x-ai-purpose": "These types describe the sidebar navigation structure. The tree is built server-side (PHP navigation_registry) and sent to the frontend via Inertia shared props. AI agents should understand this tree structure when generating pages that include navigation context. The Icon Registry (registerEntityIcon) auto-resolves icons for known entity types."
72
- }