@datatechsolutions/ui 2.10.8 → 2.11.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 (107) hide show
  1. package/package.json +2 -1
  2. package/dist/astrlabe/contracts.d.mts +0 -293
  3. package/dist/astrlabe/contracts.d.ts +0 -293
  4. package/dist/astrlabe/contracts.js +0 -5
  5. package/dist/astrlabe/contracts.js.map +0 -1
  6. package/dist/astrlabe/contracts.mjs +0 -4
  7. package/dist/astrlabe/contracts.mjs.map +0 -1
  8. package/dist/astrlabe/graph-node.d.mts +0 -28
  9. package/dist/astrlabe/graph-node.d.ts +0 -28
  10. package/dist/astrlabe/graph-node.js +0 -27
  11. package/dist/astrlabe/graph-node.js.map +0 -1
  12. package/dist/astrlabe/graph-node.mjs +0 -6
  13. package/dist/astrlabe/graph-node.mjs.map +0 -1
  14. package/dist/astrlabe/index.d.mts +0 -707
  15. package/dist/astrlabe/index.d.ts +0 -707
  16. package/dist/astrlabe/index.js +0 -3248
  17. package/dist/astrlabe/index.js.map +0 -1
  18. package/dist/astrlabe/index.mjs +0 -2957
  19. package/dist/astrlabe/index.mjs.map +0 -1
  20. package/dist/astrlabe/utils.d.mts +0 -71
  21. package/dist/astrlabe/utils.d.ts +0 -71
  22. package/dist/astrlabe/utils.js +0 -31
  23. package/dist/astrlabe/utils.js.map +0 -1
  24. package/dist/astrlabe/utils.mjs +0 -6
  25. package/dist/astrlabe/utils.mjs.map +0 -1
  26. package/dist/astrlabe/workflow-canvas.d.mts +0 -5
  27. package/dist/astrlabe/workflow-canvas.d.ts +0 -5
  28. package/dist/astrlabe/workflow-canvas.js +0 -20
  29. package/dist/astrlabe/workflow-canvas.js.map +0 -1
  30. package/dist/astrlabe/workflow-canvas.mjs +0 -11
  31. package/dist/astrlabe/workflow-canvas.mjs.map +0 -1
  32. package/dist/astrlabe/workflow-preview-canvas.d.mts +0 -10
  33. package/dist/astrlabe/workflow-preview-canvas.d.ts +0 -10
  34. package/dist/astrlabe/workflow-preview-canvas.js +0 -28
  35. package/dist/astrlabe/workflow-preview-canvas.js.map +0 -1
  36. package/dist/astrlabe/workflow-preview-canvas.mjs +0 -26
  37. package/dist/astrlabe/workflow-preview-canvas.mjs.map +0 -1
  38. package/dist/chunk-2XQ2GYYV.mjs +0 -7167
  39. package/dist/chunk-2XQ2GYYV.mjs.map +0 -1
  40. package/dist/chunk-3GDQP6AS.mjs +0 -15
  41. package/dist/chunk-3GDQP6AS.mjs.map +0 -1
  42. package/dist/chunk-3GE3MBUZ.js +0 -279
  43. package/dist/chunk-3GE3MBUZ.js.map +0 -1
  44. package/dist/chunk-55H6WZQP.js +0 -5
  45. package/dist/chunk-55H6WZQP.js.map +0 -1
  46. package/dist/chunk-7VJ7CMMT.mjs +0 -96
  47. package/dist/chunk-7VJ7CMMT.mjs.map +0 -1
  48. package/dist/chunk-AM2TTPYM.mjs +0 -189
  49. package/dist/chunk-AM2TTPYM.mjs.map +0 -1
  50. package/dist/chunk-BLNXRUC4.mjs +0 -276
  51. package/dist/chunk-BLNXRUC4.mjs.map +0 -1
  52. package/dist/chunk-D2JF6C3E.mjs +0 -46
  53. package/dist/chunk-D2JF6C3E.mjs.map +0 -1
  54. package/dist/chunk-DFR6CMJH.js +0 -197
  55. package/dist/chunk-DFR6CMJH.js.map +0 -1
  56. package/dist/chunk-JB6RNAD2.mjs +0 -4
  57. package/dist/chunk-JB6RNAD2.mjs.map +0 -1
  58. package/dist/chunk-OZNTQROP.mjs +0 -39
  59. package/dist/chunk-OZNTQROP.mjs.map +0 -1
  60. package/dist/chunk-P4YYEM4B.js +0 -44
  61. package/dist/chunk-P4YYEM4B.js.map +0 -1
  62. package/dist/chunk-QWG2FMUN.mjs +0 -60
  63. package/dist/chunk-QWG2FMUN.mjs.map +0 -1
  64. package/dist/chunk-S7KHTUHA.js +0 -65
  65. package/dist/chunk-S7KHTUHA.js.map +0 -1
  66. package/dist/chunk-UPTU224P.js +0 -23923
  67. package/dist/chunk-UPTU224P.js.map +0 -1
  68. package/dist/chunk-UZ3CMNUJ.js +0 -49
  69. package/dist/chunk-UZ3CMNUJ.js.map +0 -1
  70. package/dist/chunk-VUNV25KB.js +0 -18
  71. package/dist/chunk-VUNV25KB.js.map +0 -1
  72. package/dist/chunk-WURR63IK.mjs +0 -23189
  73. package/dist/chunk-WURR63IK.mjs.map +0 -1
  74. package/dist/chunk-XJV5ERUJ.js +0 -7228
  75. package/dist/chunk-XJV5ERUJ.js.map +0 -1
  76. package/dist/chunk-YXN2K77G.js +0 -102
  77. package/dist/chunk-YXN2K77G.js.map +0 -1
  78. package/dist/entity-drawer-D2H7ugi9.d.mts +0 -31
  79. package/dist/entity-drawer-D2H7ugi9.d.ts +0 -31
  80. package/dist/index.d.mts +0 -4791
  81. package/dist/index.d.ts +0 -4791
  82. package/dist/index.js +0 -2893
  83. package/dist/index.js.map +0 -1
  84. package/dist/index.mjs +0 -8
  85. package/dist/index.mjs.map +0 -1
  86. package/dist/lib/i18n-context.d.mts +0 -36
  87. package/dist/lib/i18n-context.d.ts +0 -36
  88. package/dist/lib/i18n-context.js +0 -30
  89. package/dist/lib/i18n-context.js.map +0 -1
  90. package/dist/lib/i18n-context.mjs +0 -5
  91. package/dist/lib/i18n-context.mjs.map +0 -1
  92. package/dist/lib/router-context.d.mts +0 -35
  93. package/dist/lib/router-context.d.ts +0 -35
  94. package/dist/lib/router-context.js +0 -26
  95. package/dist/lib/router-context.js.map +0 -1
  96. package/dist/lib/router-context.mjs +0 -5
  97. package/dist/lib/router-context.mjs.map +0 -1
  98. package/dist/navigation-ANFMVDVW.mjs +0 -2445
  99. package/dist/navigation-ANFMVDVW.mjs.map +0 -1
  100. package/dist/navigation-JQ2TJKKI.js +0 -2447
  101. package/dist/navigation-JQ2TJKKI.js.map +0 -1
  102. package/dist/use-haptic-2SHBMEY5.js +0 -18
  103. package/dist/use-haptic-2SHBMEY5.js.map +0 -1
  104. package/dist/use-haptic-4UCNQATC.mjs +0 -5
  105. package/dist/use-haptic-4UCNQATC.mjs.map +0 -1
  106. package/dist/workflow-canvas-CGeuIgBQ.d.ts +0 -241
  107. package/dist/workflow-canvas-at3LMbkg.d.mts +0 -241
@@ -1,197 +0,0 @@
1
- "use client";
2
- 'use strict';
3
-
4
- var Dagre = require('@dagrejs/dagre');
5
-
6
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
-
8
- var Dagre__default = /*#__PURE__*/_interopDefault(Dagre);
9
-
10
- // src/astrlabe/utils/logic-node-defaults.ts
11
- function createDefaultLogicNodeConfig(nodeType) {
12
- switch (nodeType) {
13
- case "start":
14
- return { type: "start", inputVariables: [] };
15
- case "end":
16
- return { type: "end", outputVariables: [] };
17
- case "if_else":
18
- return {
19
- type: "if_else",
20
- conditions: [{ variable: "", operator: "equals", value: "" }],
21
- logicalOperator: "and"
22
- };
23
- case "code":
24
- return { type: "code", language: "javascript", code: "" };
25
- case "http_request":
26
- return {
27
- type: "http_request",
28
- method: "GET",
29
- url: "",
30
- headers: {},
31
- body: "",
32
- timeoutMs: 1e4
33
- };
34
- case "template_transform":
35
- return { type: "template_transform", template: "", outputVariable: "" };
36
- case "iteration":
37
- return { type: "iteration", iteratorVariable: "", maxIterations: 100 };
38
- case "knowledge_base":
39
- return { type: "knowledge_base", sourceId: "", topK: 5, similarityThreshold: 0.7 };
40
- case "answer":
41
- return { type: "answer", outputTemplate: "", outputVariables: [] };
42
- case "question_classifier":
43
- return {
44
- type: "question_classifier",
45
- modelId: "",
46
- instructions: "",
47
- categories: [
48
- { id: crypto.randomUUID(), name: "", description: "" },
49
- { id: crypto.randomUUID(), name: "", description: "" }
50
- ]
51
- };
52
- case "parameter_extractor":
53
- return {
54
- type: "parameter_extractor",
55
- modelId: "",
56
- parameters: [{ name: "", type: "string", description: "", required: true }]
57
- };
58
- case "variable_assigner":
59
- return {
60
- type: "variable_assigner",
61
- assignments: [{ target: "", source: "" }]
62
- };
63
- case "variable_aggregator":
64
- return {
65
- type: "variable_aggregator",
66
- inputVariables: [],
67
- outputVariable: "",
68
- aggregationMode: "array"
69
- };
70
- case "document_extractor":
71
- return {
72
- type: "document_extractor",
73
- extractionMode: "text",
74
- outputVariable: ""
75
- };
76
- case "list_operator":
77
- return {
78
- type: "list_operator",
79
- operation: "filter",
80
- inputVariable: "",
81
- outputVariable: "",
82
- condition: ""
83
- };
84
- case "iteration_start":
85
- return {
86
- type: "iteration_start",
87
- iteratorVariable: "",
88
- itemVariable: "item",
89
- indexVariable: "index"
90
- };
91
- case "note":
92
- return {
93
- type: "note",
94
- text: "",
95
- color: "yellow",
96
- width: 200,
97
- height: 150
98
- };
99
- case "group":
100
- return {
101
- type: "group",
102
- label: "Group",
103
- color: "slate",
104
- isExpanded: true,
105
- width: 400,
106
- height: 300,
107
- collapsedWidth: 260,
108
- collapsedHeight: 60
109
- };
110
- case "datasource":
111
- return {
112
- type: "datasource",
113
- datasourceId: "",
114
- dialect: "",
115
- table: "",
116
- selectedColumns: [],
117
- filterVariables: {},
118
- outputVariable: "datasourceResult",
119
- limit: 100
120
- };
121
- default:
122
- return null;
123
- }
124
- }
125
- var DEFAULT_NODE_WIDTH = 260;
126
- var DEFAULT_NODE_HEIGHT = 70;
127
- function getNodeSize(node) {
128
- const measured = node.measured;
129
- return {
130
- width: measured?.width ?? DEFAULT_NODE_WIDTH,
131
- height: measured?.height ?? DEFAULT_NODE_HEIGHT
132
- };
133
- }
134
- function applyDagreLayout(nodes, edges, direction) {
135
- const nodeSpacingHorizontal = 80;
136
- const nodeSpacingVertical = 50;
137
- const layoutNodes = nodes.filter(
138
- (node) => !node.parentId && node.type !== "note"
139
- );
140
- const dagreGraph = new Dagre__default.default.graphlib.Graph({ directed: true });
141
- dagreGraph.setDefaultEdgeLabel(() => ({}));
142
- const isHorizontal = direction === "LR";
143
- dagreGraph.setGraph({
144
- rankdir: direction,
145
- nodesep: isHorizontal ? nodeSpacingVertical : nodeSpacingHorizontal,
146
- ranksep: isHorizontal ? nodeSpacingHorizontal : nodeSpacingVertical,
147
- marginx: 40,
148
- marginy: 40
149
- });
150
- const layoutNodeIds = new Set(layoutNodes.map((node) => node.id));
151
- for (const node of layoutNodes) {
152
- const { width, height } = getNodeSize(node);
153
- dagreGraph.setNode(node.id, { width, height });
154
- }
155
- for (const edge of edges) {
156
- if (layoutNodeIds.has(edge.source) && layoutNodeIds.has(edge.target)) {
157
- dagreGraph.setEdge(edge.source, edge.target);
158
- }
159
- }
160
- Dagre__default.default.layout(dagreGraph);
161
- const positionMap = /* @__PURE__ */ new Map();
162
- for (const node of layoutNodes) {
163
- const dagreNode = dagreGraph.node(node.id);
164
- if (!dagreNode) continue;
165
- const { width, height } = getNodeSize(node);
166
- positionMap.set(node.id, {
167
- x: dagreNode.x - width / 2,
168
- y: dagreNode.y - height / 2
169
- });
170
- }
171
- return nodes.map((node) => {
172
- const newPosition = positionMap.get(node.id);
173
- if (!newPosition) return node;
174
- return { ...node, position: newPosition };
175
- });
176
- }
177
-
178
- // src/astrlabe/utils/agent-tier.ts
179
- var TIERS = [
180
- { maxElo: 1200, tier: { key: "beginner", pillColor: "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400" } },
181
- { maxElo: 1600, tier: { key: "intermediate", pillColor: "bg-pink-100 text-pink-700 dark:bg-pink-900/30 dark:text-pink-400" } },
182
- { maxElo: 2e3, tier: { key: "advanced", pillColor: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400" } },
183
- { maxElo: Infinity, tier: { key: "expert", pillColor: "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400" } }
184
- ];
185
- function getAgentTier(elo) {
186
- const eloValue = elo ?? 0;
187
- for (const { maxElo, tier } of TIERS) {
188
- if (eloValue < maxElo) return tier;
189
- }
190
- return TIERS[TIERS.length - 1].tier;
191
- }
192
-
193
- exports.applyDagreLayout = applyDagreLayout;
194
- exports.createDefaultLogicNodeConfig = createDefaultLogicNodeConfig;
195
- exports.getAgentTier = getAgentTier;
196
- //# sourceMappingURL=chunk-DFR6CMJH.js.map
197
- //# sourceMappingURL=chunk-DFR6CMJH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/astrlabe/utils/logic-node-defaults.ts","../src/astrlabe/utils/layout-engine.ts","../src/astrlabe/utils/agent-tier.ts"],"names":["Dagre"],"mappings":";;;;;;;;;AAQO,SAAS,6BAA6B,QAAA,EAAoD;AAC/F,EAAA,QAAQ,QAAA;AAAU,IAChB,KAAK,OAAA;AACH,MAAA,OAAO,EAAE,IAAA,EAAM,OAAA,EAAS,cAAA,EAAgB,EAAC,EAAE;AAAA,IAC7C,KAAK,KAAA;AACH,MAAA,OAAO,EAAE,IAAA,EAAM,KAAA,EAAO,eAAA,EAAiB,EAAC,EAAE;AAAA,IAC5C,KAAK,SAAA;AACH,MAAA,OAAO;AAAA,QACL,IAAA,EAAM,SAAA;AAAA,QACN,UAAA,EAAY,CAAC,EAAE,QAAA,EAAU,IAAI,QAAA,EAAU,QAAA,EAAU,KAAA,EAAO,EAAA,EAAI,CAAA;AAAA,QAC5D,eAAA,EAAiB;AAAA,OACnB;AAAA,IACF,KAAK,MAAA;AACH,MAAA,OAAO,EAAE,IAAA,EAAM,MAAA,EAAQ,QAAA,EAAU,YAAA,EAAc,MAAM,EAAA,EAAG;AAAA,IAC1D,KAAK,cAAA;AACH,MAAA,OAAO;AAAA,QACL,IAAA,EAAM,cAAA;AAAA,QACN,MAAA,EAAQ,KAAA;AAAA,QACR,GAAA,EAAK,EAAA;AAAA,QACL,SAAS,EAAC;AAAA,QACV,IAAA,EAAM,EAAA;AAAA,QACN,SAAA,EAAW;AAAA,OACb;AAAA,IACF,KAAK,oBAAA;AACH,MAAA,OAAO,EAAE,IAAA,EAAM,oBAAA,EAAsB,QAAA,EAAU,EAAA,EAAI,gBAAgB,EAAA,EAAG;AAAA,IACxE,KAAK,WAAA;AACH,MAAA,OAAO,EAAE,IAAA,EAAM,WAAA,EAAa,gBAAA,EAAkB,EAAA,EAA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,IAAA,EAAM,EAAE,GAAA,EAAK,UAAA,EAAY,SAAA,EAAW,kEAAA,EAAmE,EAAE;AAAA,EACzH,EAAE,QAAQ,IAAA,EAAM,IAAA,EAAM,EAAE,GAAA,EAAK,cAAA,EAAgB,SAAA,EAAW,kEAAA,EAAmE,EAAE;AAAA,EAC7H,EAAE,QAAQ,GAAA,EAAM,IAAA,EAAM,EAAE,GAAA,EAAK,UAAA,EAAY,SAAA,EAAW,sEAAA,EAAuE,EAAE;AAAA,EAC7H,EAAE,QAAQ,QAAA,EAAU,IAAA,EAAM,EAAE,GAAA,EAAK,QAAA,EAAU,SAAA,EAAW,8EAAA,EAA+E;AACvI,CAAA;AAEO,SAAS,aAAa,GAAA,EAAoC;AAC/D,EAAA,MAAM,WAAW,GAAA,IAAO,CAAA;AACxB,EAAA,KAAA,MAAW,EAAE,MAAA,EAAQ,IAAA,EAAK,IAAK,KAAA,EAAO;AACpC,IAAA,IAAI,QAAA,GAAW,QAAQ,OAAO,IAAA;AAAA,EAChC;AACA,EAAA,OAAO,KAAA,CAAM,KAAA,CAAM,MAAA,GAAS,CAAC,CAAA,CAAE,IAAA;AACjC","file":"chunk-DFR6CMJH.js","sourcesContent":["/**\n * Logic Node Default Configs\n * ==========================\n * Factory function to create default configs for each logic node type.\n */\n\nimport type { WorkflowNodeType, LogicNodeConfig } from '../contracts'\n\nexport function createDefaultLogicNodeConfig(nodeType: WorkflowNodeType): LogicNodeConfig | null {\n switch (nodeType) {\n case 'start':\n return { type: 'start', inputVariables: [] }\n case 'end':\n return { type: 'end', outputVariables: [] }\n case 'if_else':\n return {\n type: 'if_else',\n conditions: [{ variable: '', operator: 'equals', value: '' }],\n logicalOperator: 'and',\n }\n case 'code':\n return { type: 'code', language: 'javascript', code: '' }\n case 'http_request':\n return {\n type: 'http_request',\n method: 'GET',\n url: '',\n headers: {},\n body: '',\n timeoutMs: 10000,\n }\n case 'template_transform':\n return { type: 'template_transform', template: '', outputVariable: '' }\n case 'iteration':\n return { type: 'iteration', iteratorVariable: '', maxIterations: 100 }\n case 'knowledge_base':\n return { type: 'knowledge_base', sourceId: '', topK: 5, similarityThreshold: 0.7 }\n case 'answer':\n return { type: 'answer', outputTemplate: '', outputVariables: [] }\n case 'question_classifier':\n return {\n type: 'question_classifier',\n modelId: '',\n instructions: '',\n categories: [\n { id: crypto.randomUUID(), name: '', description: '' },\n { id: crypto.randomUUID(), name: '', description: '' },\n ],\n }\n case 'parameter_extractor':\n return {\n type: 'parameter_extractor',\n modelId: '',\n parameters: [{ name: '', type: 'string', description: '', required: true }],\n }\n case 'variable_assigner':\n return {\n type: 'variable_assigner',\n assignments: [{ target: '', source: '' }],\n }\n case 'variable_aggregator':\n return {\n type: 'variable_aggregator',\n inputVariables: [],\n outputVariable: '',\n aggregationMode: 'array',\n }\n case 'document_extractor':\n return {\n type: 'document_extractor',\n extractionMode: 'text',\n outputVariable: '',\n }\n case 'list_operator':\n return {\n type: 'list_operator',\n operation: 'filter',\n inputVariable: '',\n outputVariable: '',\n condition: '',\n }\n case 'iteration_start':\n return {\n type: 'iteration_start',\n iteratorVariable: '',\n itemVariable: 'item',\n indexVariable: 'index',\n }\n case 'note':\n return {\n type: 'note',\n text: '',\n color: 'yellow',\n width: 200,\n height: 150,\n }\n case 'group':\n return {\n type: 'group',\n label: 'Group',\n color: 'slate',\n isExpanded: true,\n width: 400,\n height: 300,\n collapsedWidth: 260,\n collapsedHeight: 60,\n }\n case 'datasource':\n return {\n type: 'datasource',\n datasourceId: '',\n dialect: '',\n table: '',\n selectedColumns: [],\n filterVariables: {},\n outputVariable: 'datasourceResult',\n limit: 100,\n }\n default:\n return null\n }\n}\n","/**\n * Layout Engine\n * =============\n * Auto-layout for workflow graphs using @dagrejs/dagre.\n * Pure utility — no React dependencies.\n */\n\nimport Dagre from '@dagrejs/dagre'\nimport type { Node, Edge } from '@xyflow/react'\n\n/** Layout direction: free means no auto-layout is applied. */\nexport type LayoutDirection = 'free' | 'LR' | 'TB'\n\nconst DEFAULT_NODE_WIDTH = 260\nconst DEFAULT_NODE_HEIGHT = 70\n\nfunction getNodeSize(node: Node): { width: number; height: number } {\n const measured = node.measured as { width?: number; height?: number } | undefined\n return {\n width: measured?.width ?? DEFAULT_NODE_WIDTH,\n height: measured?.height ?? DEFAULT_NODE_HEIGHT,\n }\n}\n\n/**\n * Apply dagre layout to the given nodes and edges.\n * Returns a new array of nodes with updated positions.\n * Group child nodes (parentId set) and note nodes are excluded from layout.\n */\nexport function applyDagreLayout(\n nodes: Node[],\n edges: Edge[],\n direction: Exclude<LayoutDirection, 'free'>,\n): Node[] {\n const nodeSpacingHorizontal = 80\n const nodeSpacingVertical = 50\n\n // Separate layoutable nodes from excluded ones\n const layoutNodes = nodes.filter(\n (node) => !node.parentId && node.type !== 'note',\n )\n\n // Build dagre graph\n const dagreGraph = new Dagre.graphlib.Graph({ directed: true })\n dagreGraph.setDefaultEdgeLabel(() => ({}))\n\n const isHorizontal = direction === 'LR'\n dagreGraph.setGraph({\n rankdir: direction,\n nodesep: isHorizontal ? nodeSpacingVertical : nodeSpacingHorizontal,\n ranksep: isHorizontal ? nodeSpacingHorizontal : nodeSpacingVertical,\n marginx: 40,\n marginy: 40,\n })\n\n const layoutNodeIds = new Set(layoutNodes.map((node) => node.id))\n\n for (const node of layoutNodes) {\n const { width, height } = getNodeSize(node)\n dagreGraph.setNode(node.id, { width, height })\n }\n\n for (const edge of edges) {\n if (layoutNodeIds.has(edge.source) && layoutNodeIds.has(edge.target)) {\n dagreGraph.setEdge(edge.source, edge.target)\n }\n }\n\n Dagre.layout(dagreGraph)\n\n // Build position map — dagre returns center coords, React Flow uses top-left\n const positionMap = new Map<string, { x: number; y: number }>()\n for (const node of layoutNodes) {\n const dagreNode = dagreGraph.node(node.id)\n if (!dagreNode) continue\n const { width, height } = getNodeSize(node)\n positionMap.set(node.id, {\n x: dagreNode.x - width / 2,\n y: dagreNode.y - height / 2,\n })\n }\n\n // Return all nodes with updated positions for layout-participating nodes\n return nodes.map((node) => {\n const newPosition = positionMap.get(node.id)\n if (!newPosition) return node\n return { ...node, position: newPosition }\n })\n}\n","/**\n * Agent ELO Tier\n * ==============\n * Derives difficulty tier from agent ELO rating.\n * Used in node palette, agent flow node, and agent drawer.\n */\n\nexport type AgentTier = {\n key: 'beginner' | 'intermediate' | 'advanced' | 'expert'\n pillColor: string\n}\n\nconst TIERS: Array<{ maxElo: number; tier: AgentTier }> = [\n { maxElo: 1200, tier: { key: 'beginner', pillColor: 'bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400' } },\n { maxElo: 1600, tier: { key: 'intermediate', pillColor: 'bg-pink-100 text-pink-700 dark:bg-pink-900/30 dark:text-pink-400' } },\n { maxElo: 2000, tier: { key: 'advanced', pillColor: 'bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400' } },\n { maxElo: Infinity, tier: { key: 'expert', pillColor: 'bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400' } },\n]\n\nexport function getAgentTier(elo: number | undefined): AgentTier {\n const eloValue = elo ?? 0\n for (const { maxElo, tier } of TIERS) {\n if (eloValue < maxElo) return tier\n }\n return TIERS[TIERS.length - 1].tier\n}\n"]}
@@ -1,4 +0,0 @@
1
- "use client";
2
-
3
- //# sourceMappingURL=chunk-JB6RNAD2.mjs.map
4
- //# sourceMappingURL=chunk-JB6RNAD2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-JB6RNAD2.mjs"}
@@ -1,39 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from 'react/jsx-runtime';
3
-
4
- // src/astrlabe/components/nodes/graph-node-primitives.tsx
5
- function GraphNodeIconBubble({ children, className = "" }) {
6
- return /* @__PURE__ */ jsx("div", { className: `flex h-10 w-10 items-center justify-center rounded-xl shadow-lg ${className}`, children });
7
- }
8
- function GraphNodeHeader({
9
- icon,
10
- title,
11
- description,
12
- compact = false,
13
- iconClassName
14
- }) {
15
- return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
16
- /* @__PURE__ */ jsx("div", { className: iconClassName, children: icon }),
17
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
18
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: title }),
19
- !compact && description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400", children: description })
20
- ] })
21
- ] });
22
- }
23
- function GraphNodeMeta({ compact = false, children }) {
24
- if (compact) return null;
25
- return /* @__PURE__ */ jsx("div", { className: "mt-2 flex items-center justify-between", children });
26
- }
27
- function GraphNodeBadge({ children, className }) {
28
- return /* @__PURE__ */ jsx(
29
- "span",
30
- {
31
- className: className ?? "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300",
32
- children
33
- }
34
- );
35
- }
36
-
37
- export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta };
38
- //# sourceMappingURL=chunk-OZNTQROP.mjs.map
39
- //# sourceMappingURL=chunk-OZNTQROP.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/astrlabe/components/nodes/graph-node-primitives.tsx"],"names":[],"mappings":";;;AAOO,SAAS,mBAAA,CAAoB,EAAE,QAAA,EAAU,SAAA,GAAY,IAAG,EAA6B;AAC1F,EAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAW,CAAA,gEAAA,EAAmE,SAAS,IACzF,QAAA,EACH,CAAA;AAEJ;AAUO,SAAS,eAAA,CAAgB;AAAA,EAC9B,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA,GAAU,KAAA;AAAA,EACV;AACF,CAAA,EAAyB;AACvB,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wBAAA,EACb,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,aAAA,EAAgB,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,oBACrC,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,gBAAA,EACb,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,qDAAA,EAAuD,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MAC1E,CAAC,OAAA,IAAW,WAAA,wBAAgB,GAAA,EAAA,EAAE,SAAA,EAAU,mDAAmD,QAAA,EAAA,WAAA,EAAY;AAAA,KAAA,EAC1G;AAAA,GAAA,EACF,CAAA;AAEJ;AAOO,SAAS,aAAA,CAAc,EAAE,OAAA,GAAU,KAAA,EAAO,UAAS,EAAuB;AAC/E,EAAA,IAAI,SAAS,OAAO,IAAA;AACpB,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wCAAA,EAA0C,QAAA,EAAS,CAAA;AAC3E;AAOO,SAAS,cAAA,CAAe,EAAE,QAAA,EAAU,SAAA,EAAU,EAAwB;AAC3E,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,WACE,SAAA,IACG,kJAAA;AAAA,MAGJ;AAAA;AAAA,GACH;AAEJ","file":"chunk-OZNTQROP.mjs","sourcesContent":["import type { ReactNode } from 'react'\n\ninterface GraphNodeIconBubbleProps {\n children: ReactNode\n className?: string\n}\n\nexport function GraphNodeIconBubble({ children, className = '' }: GraphNodeIconBubbleProps) {\n return (\n <div className={`flex h-10 w-10 items-center justify-center rounded-xl shadow-lg ${className}`}>\n {children}\n </div>\n )\n}\n\ninterface GraphNodeHeaderProps {\n icon: ReactNode\n title: string\n description?: string\n compact?: boolean\n iconClassName?: string\n}\n\nexport function GraphNodeHeader({\n icon,\n title,\n description,\n compact = false,\n iconClassName,\n}: GraphNodeHeaderProps) {\n return (\n <div className=\"flex items-start gap-3\">\n <div className={iconClassName}>{icon}</div>\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"text-sm font-semibold text-gray-900 dark:text-white\">{title}</h3>\n {!compact && description && <p className=\"mt-0.5 text-xs text-gray-500 dark:text-gray-400\">{description}</p>}\n </div>\n </div>\n )\n}\n\ninterface GraphNodeMetaProps {\n compact?: boolean\n children: ReactNode\n}\n\nexport function GraphNodeMeta({ compact = false, children }: GraphNodeMetaProps) {\n if (compact) return null\n return <div className=\"mt-2 flex items-center justify-between\">{children}</div>\n}\n\ninterface GraphNodeBadgeProps {\n children: ReactNode\n className?: string\n}\n\nexport function GraphNodeBadge({ children, className }: GraphNodeBadgeProps) {\n return (\n <span\n className={\n className\n ?? 'inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300'\n }\n >\n {children}\n </span>\n )\n}\n"]}
@@ -1,44 +0,0 @@
1
- "use client";
2
- 'use strict';
3
-
4
- var jsxRuntime = require('react/jsx-runtime');
5
-
6
- // src/astrlabe/components/nodes/graph-node-primitives.tsx
7
- function GraphNodeIconBubble({ children, className = "" }) {
8
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-10 w-10 items-center justify-center rounded-xl shadow-lg ${className}`, children });
9
- }
10
- function GraphNodeHeader({
11
- icon,
12
- title,
13
- description,
14
- compact = false,
15
- iconClassName
16
- }) {
17
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
18
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: iconClassName, children: icon }),
19
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
20
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: title }),
21
- !compact && description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400", children: description })
22
- ] })
23
- ] });
24
- }
25
- function GraphNodeMeta({ compact = false, children }) {
26
- if (compact) return null;
27
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex items-center justify-between", children });
28
- }
29
- function GraphNodeBadge({ children, className }) {
30
- return /* @__PURE__ */ jsxRuntime.jsx(
31
- "span",
32
- {
33
- className: className ?? "inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300",
34
- children
35
- }
36
- );
37
- }
38
-
39
- exports.GraphNodeBadge = GraphNodeBadge;
40
- exports.GraphNodeHeader = GraphNodeHeader;
41
- exports.GraphNodeIconBubble = GraphNodeIconBubble;
42
- exports.GraphNodeMeta = GraphNodeMeta;
43
- //# sourceMappingURL=chunk-P4YYEM4B.js.map
44
- //# sourceMappingURL=chunk-P4YYEM4B.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/astrlabe/components/nodes/graph-node-primitives.tsx"],"names":["jsxs","jsx"],"mappings":";;;;;AAOO,SAAS,mBAAA,CAAoB,EAAE,QAAA,EAAU,SAAA,GAAY,IAAG,EAA6B;AAC1F,EAAA,sCACG,KAAA,EAAA,EAAI,SAAA,EAAW,CAAA,gEAAA,EAAmE,SAAS,IACzF,QAAA,EACH,CAAA;AAEJ;AAUO,SAAS,eAAA,CAAgB;AAAA,EAC9B,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA,GAAU,KAAA;AAAA,EACV;AACF,CAAA,EAAyB;AACvB,EAAA,uBACEA,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wBAAA,EACb,QAAA,EAAA;AAAA,oBAAAC,cAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,aAAA,EAAgB,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,oBACrCD,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,gBAAA,EACb,QAAA,EAAA;AAAA,sBAAAC,cAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,qDAAA,EAAuD,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MAC1E,CAAC,OAAA,IAAW,WAAA,mCAAgB,GAAA,EAAA,EAAE,SAAA,EAAU,mDAAmD,QAAA,EAAA,WAAA,EAAY;AAAA,KAAA,EAC1G;AAAA,GAAA,EACF,CAAA;AAEJ;AAOO,SAAS,aAAA,CAAc,EAAE,OAAA,GAAU,KAAA,EAAO,UAAS,EAAuB;AAC/E,EAAA,IAAI,SAAS,OAAO,IAAA;AACpB,EAAA,uBAAOA,cAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wCAAA,EAA0C,QAAA,EAAS,CAAA;AAC3E;AAOO,SAAS,cAAA,CAAe,EAAE,QAAA,EAAU,SAAA,EAAU,EAAwB;AAC3E,EAAA,uBACEA,cAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,WACE,SAAA,IACG,kJAAA;AAAA,MAGJ;AAAA;AAAA,GACH;AAEJ","file":"chunk-P4YYEM4B.js","sourcesContent":["import type { ReactNode } from 'react'\n\ninterface GraphNodeIconBubbleProps {\n children: ReactNode\n className?: string\n}\n\nexport function GraphNodeIconBubble({ children, className = '' }: GraphNodeIconBubbleProps) {\n return (\n <div className={`flex h-10 w-10 items-center justify-center rounded-xl shadow-lg ${className}`}>\n {children}\n </div>\n )\n}\n\ninterface GraphNodeHeaderProps {\n icon: ReactNode\n title: string\n description?: string\n compact?: boolean\n iconClassName?: string\n}\n\nexport function GraphNodeHeader({\n icon,\n title,\n description,\n compact = false,\n iconClassName,\n}: GraphNodeHeaderProps) {\n return (\n <div className=\"flex items-start gap-3\">\n <div className={iconClassName}>{icon}</div>\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"text-sm font-semibold text-gray-900 dark:text-white\">{title}</h3>\n {!compact && description && <p className=\"mt-0.5 text-xs text-gray-500 dark:text-gray-400\">{description}</p>}\n </div>\n </div>\n )\n}\n\ninterface GraphNodeMetaProps {\n compact?: boolean\n children: ReactNode\n}\n\nexport function GraphNodeMeta({ compact = false, children }: GraphNodeMetaProps) {\n if (compact) return null\n return <div className=\"mt-2 flex items-center justify-between\">{children}</div>\n}\n\ninterface GraphNodeBadgeProps {\n children: ReactNode\n className?: string\n}\n\nexport function GraphNodeBadge({ children, className }: GraphNodeBadgeProps) {\n return (\n <span\n className={\n className\n ?? 'inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold bg-slate-100 text-slate-700 dark:bg-slate-500/20 dark:text-slate-300'\n }\n >\n {children}\n </span>\n )\n}\n"]}
@@ -1,60 +0,0 @@
1
- "use client";
2
- import { createContext, useContext, forwardRef } from 'react';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- // src/lib/router-context.tsx
6
- var RouterContext = createContext(null);
7
- function RouterProvider({ children, value }) {
8
- return /* @__PURE__ */ jsx(RouterContext.Provider, { value, children });
9
- }
10
- function useRouter() {
11
- const context = useContext(RouterContext);
12
- if (!context) {
13
- return {
14
- push: (href) => {
15
- window.location.href = href;
16
- },
17
- replace: (href) => {
18
- window.location.replace(href);
19
- },
20
- back: () => {
21
- window.history.back();
22
- },
23
- forward: () => {
24
- window.history.forward();
25
- },
26
- refresh: () => {
27
- window.location.reload();
28
- },
29
- prefetch: () => {
30
- }
31
- };
32
- }
33
- return {
34
- push: context.navigate,
35
- replace: context.replace,
36
- back: context.back,
37
- forward: context.forward,
38
- refresh: () => {
39
- window.location.reload();
40
- },
41
- prefetch: context.prefetch
42
- };
43
- }
44
- function usePathname() {
45
- const context = useContext(RouterContext);
46
- return context?.pathname ?? (typeof window !== "undefined" ? window.location.pathname : "/");
47
- }
48
- function useLink() {
49
- const context = useContext(RouterContext);
50
- if (!context) {
51
- return forwardRef(function FallbackLink({ href, children, ...props }, ref) {
52
- return /* @__PURE__ */ jsx("a", { href, ref, ...props, children });
53
- });
54
- }
55
- return context.Link;
56
- }
57
-
58
- export { RouterProvider, useLink, usePathname, useRouter };
59
- //# sourceMappingURL=chunk-QWG2FMUN.mjs.map
60
- //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1C,UAAU,OAAA,CAAQ;AAAA,GACpB;AACF;AAEO,SAAS,WAAA,GAAsB;AACpC,EAAA,MAAM,OAAA,GAAU,WAAW,aAAa,CAAA;AACxC,EAAA,OAAO,SAAS,QAAA,KAAa,OAAO,WAAW,WAAA,GAAc,MAAA,CAAO,SAAS,QAAA,GAAW,GAAA,CAAA;AAC1F;AAEO,SAAS,OAAA,GAAyB;AACvC,EAAA,MAAM,OAAA,GAAU,WAAW,aAAa,CAAA;AACxC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO,UAAA,CAAyC,SAAS,YAAA,CAAa,EAAE,MAAM,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,GAAA,EAAK;AACvG,MAAA,2BAAQ,GAAA,EAAA,EAAE,IAAA,EAAY,GAAA,EAAW,GAAG,OAAQ,QAAA,EAAS,CAAA;AAAA,IACvD,CAAC,CAAA;AAAA,EACH;AACA,EAAA,OAAO,OAAA,CAAQ,IAAA;AACjB","file":"chunk-QWG2FMUN.mjs","sourcesContent":["import { createContext, useContext, forwardRef, type ReactNode, type AnchorHTMLAttributes, type Ref } from 'react'\n\nexport type LinkProps = { href: string; children?: ReactNode; ref?: Ref<HTMLAnchorElement> } & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>\n\nexport type LinkComponent = React.FC<LinkProps>\n\nexport interface RouterContextValue {\n pathname: string\n navigate: (href: string) => void\n replace: (href: string) => void\n back: () => void\n forward: () => void\n prefetch: (href: string) => void\n Link: LinkComponent\n}\n\nconst RouterContext = createContext<RouterContextValue | null>(null)\n\nexport type RouterProviderProps = {\n children: ReactNode\n value: RouterContextValue\n}\n\nexport function RouterProvider({ children, value }: RouterProviderProps) {\n return <RouterContext.Provider value={value}>{children}</RouterContext.Provider>\n}\n\nexport function useRouter() {\n const context = useContext(RouterContext)\n if (!context) {\n return {\n push: (href: string) => { window.location.href = href },\n replace: (href: string) => { window.location.replace(href) },\n back: () => { window.history.back() },\n forward: () => { window.history.forward() },\n refresh: () => { window.location.reload() },\n prefetch: () => {},\n }\n }\n return {\n push: context.navigate,\n replace: context.replace,\n back: context.back,\n forward: context.forward,\n refresh: () => { window.location.reload() },\n prefetch: context.prefetch,\n }\n}\n\nexport function usePathname(): string {\n const context = useContext(RouterContext)\n return context?.pathname ?? (typeof window !== 'undefined' ? window.location.pathname : '/')\n}\n\nexport function useLink(): LinkComponent {\n const context = useContext(RouterContext)\n if (!context) {\n return forwardRef<HTMLAnchorElement, LinkProps>(function FallbackLink({ href, children, ...props }, ref) {\n return <a href={href} ref={ref} {...props}>{children}</a>\n }) as unknown as LinkComponent\n }\n return context.Link\n}\n"]}
@@ -1,65 +0,0 @@
1
- "use client";
2
- 'use strict';
3
-
4
- var react = require('react');
5
- var jsxRuntime = require('react/jsx-runtime');
6
-
7
- // src/lib/router-context.tsx
8
- var RouterContext = react.createContext(null);
9
- function RouterProvider({ children, value }) {
10
- return /* @__PURE__ */ jsxRuntime.jsx(RouterContext.Provider, { value, children });
11
- }
12
- function useRouter() {
13
- const context = react.useContext(RouterContext);
14
- if (!context) {
15
- return {
16
- push: (href) => {
17
- window.location.href = href;
18
- },
19
- replace: (href) => {
20
- window.location.replace(href);
21
- },
22
- back: () => {
23
- window.history.back();
24
- },
25
- forward: () => {
26
- window.history.forward();
27
- },
28
- refresh: () => {
29
- window.location.reload();
30
- },
31
- prefetch: () => {
32
- }
33
- };
34
- }
35
- return {
36
- push: context.navigate,
37
- replace: context.replace,
38
- back: context.back,
39
- forward: context.forward,
40
- refresh: () => {
41
- window.location.reload();
42
- },
43
- prefetch: context.prefetch
44
- };
45
- }
46
- function usePathname() {
47
- const context = react.useContext(RouterContext);
48
- return context?.pathname ?? (typeof window !== "undefined" ? window.location.pathname : "/");
49
- }
50
- function useLink() {
51
- const context = react.useContext(RouterContext);
52
- if (!context) {
53
- return react.forwardRef(function FallbackLink({ href, children, ...props }, ref) {
54
- return /* @__PURE__ */ jsxRuntime.jsx("a", { href, ref, ...props, children });
55
- });
56
- }
57
- return context.Link;
58
- }
59
-
60
- exports.RouterProvider = RouterProvider;
61
- exports.useLink = useLink;
62
- exports.usePathname = usePathname;
63
- exports.useRouter = useRouter;
64
- //# sourceMappingURL=chunk-S7KHTUHA.js.map
65
- //# sourceMappingURL=chunk-S7KHTUHA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/lib/router-context.tsx"],"names":["createContext","jsx","useContext","forwardRef"],"mappings":";;;;;;AAgBA,IAAM,aAAA,GAAgBA,oBAAyC,IAAI,CAAA;AAO5D,SAAS,cAAA,CAAe,EAAE,QAAA,EAAU,KAAA,EAAM,EAAwB;AACvE,EAAA,uBAAOC,cAAA,CAAC,aAAA,CAAc,QAAA,EAAd,EAAuB,OAAe,QAAA,EAAS,CAAA;AACzD;AAEO,SAAS,SAAA,GAAY;AAC1B,EAAA,MAAM,OAAA,GAAUC,iBAAW,aAAa,CAAA;AACxC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO;AAAA,MACL,IAAA,EAAM,CAAC,IAAA,KAAiB;AAAE,QAAA,MAAA,CAAO,SAAS,IAAA,GAAO,IAAA;AAAA,MAAK,CAAA;AAAA,MACtD,OAAA,EAAS,CAAC,IAAA,KAAiB;AAAE,QAAA,MAAA,CAAO,QAAA,CAAS,QAAQ,IAAI,CAAA;AAAA,MAAE,CAAA;AAAA,MAC3D,MAAM,MAAM;AAAE,QAAA,MAAA,CAAO,QAAQ,IAAA,EAAK;AAAA,MAAE,CAAA;AAAA,MACpC,SAAS,MAAM;AAAE,QAAA,MAAA,CAAO,QAAQ,OAAA,EAAQ;AAAA,MAAE,CAAA;AAAA,MAC1C,SAAS,MAAM;AAAE,QAAA,MAAA,CAAO,SAAS,MAAA,EAAO;AAAA,MAAE,CAAA;AAAA,MAC1C,UAAU,MAAM;AAAA,MAAC;AAAA,KACnB;AAAA,EACF;AACA,EAAA,OAAO;AAAA,IACL,MAAM,OAAA,CAAQ,QAAA;AAAA,IACd,SAAS,OAAA,CAAQ,OAAA;AAAA,IACjB,MAAM,OAAA,CAAQ,IAAA;AAAA,IACd,SAAS,OAAA,CAAQ,OAAA;AAAA,IACjB,SAAS,MAAM;AAAE,MAAA,MAAA,CAAO,SAAS,MAAA,EAAO;AAAA,IAAE,CAAA;AAAA,IAC1C,UAAU,OAAA,CAAQ;AAAA,GACpB;AACF;AAEO,SAAS,WAAA,GAAsB;AACpC,EAAA,MAAM,OAAA,GAAUA,iBAAW,aAAa,CAAA;AACxC,EAAA,OAAO,SAAS,QAAA,KAAa,OAAO,WAAW,WAAA,GAAc,MAAA,CAAO,SAAS,QAAA,GAAW,GAAA,CAAA;AAC1F;AAEO,SAAS,OAAA,GAAyB;AACvC,EAAA,MAAM,OAAA,GAAUA,iBAAW,aAAa,CAAA;AACxC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAOC,gBAAA,CAAyC,SAAS,YAAA,CAAa,EAAE,MAAM,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,GAAA,EAAK;AACvG,MAAA,sCAAQ,GAAA,EAAA,EAAE,IAAA,EAAY,GAAA,EAAW,GAAG,OAAQ,QAAA,EAAS,CAAA;AAAA,IACvD,CAAC,CAAA;AAAA,EACH;AACA,EAAA,OAAO,OAAA,CAAQ,IAAA;AACjB","file":"chunk-S7KHTUHA.js","sourcesContent":["import { createContext, useContext, forwardRef, type ReactNode, type AnchorHTMLAttributes, type Ref } from 'react'\n\nexport type LinkProps = { href: string; children?: ReactNode; ref?: Ref<HTMLAnchorElement> } & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>\n\nexport type LinkComponent = React.FC<LinkProps>\n\nexport interface RouterContextValue {\n pathname: string\n navigate: (href: string) => void\n replace: (href: string) => void\n back: () => void\n forward: () => void\n prefetch: (href: string) => void\n Link: LinkComponent\n}\n\nconst RouterContext = createContext<RouterContextValue | null>(null)\n\nexport type RouterProviderProps = {\n children: ReactNode\n value: RouterContextValue\n}\n\nexport function RouterProvider({ children, value }: RouterProviderProps) {\n return <RouterContext.Provider value={value}>{children}</RouterContext.Provider>\n}\n\nexport function useRouter() {\n const context = useContext(RouterContext)\n if (!context) {\n return {\n push: (href: string) => { window.location.href = href },\n replace: (href: string) => { window.location.replace(href) },\n back: () => { window.history.back() },\n forward: () => { window.history.forward() },\n refresh: () => { window.location.reload() },\n prefetch: () => {},\n }\n }\n return {\n push: context.navigate,\n replace: context.replace,\n back: context.back,\n forward: context.forward,\n refresh: () => { window.location.reload() },\n prefetch: context.prefetch,\n }\n}\n\nexport function usePathname(): string {\n const context = useContext(RouterContext)\n return context?.pathname ?? (typeof window !== 'undefined' ? window.location.pathname : '/')\n}\n\nexport function useLink(): LinkComponent {\n const context = useContext(RouterContext)\n if (!context) {\n return forwardRef<HTMLAnchorElement, LinkProps>(function FallbackLink({ href, children, ...props }, ref) {\n return <a href={href} ref={ref} {...props}>{children}</a>\n }) as unknown as LinkComponent\n }\n return context.Link\n}\n"]}