drizzle-cube 0.4.42 → 0.4.44

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 (199) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/compiler-CA6iopu7.cjs +198 -0
  3. package/dist/adapters/{mcp-transport-tB5a7Het.js → compiler-O3T1u7jl.js} +1172 -1779
  4. package/dist/adapters/express/index.cjs +2 -2
  5. package/dist/adapters/express/index.js +27 -26
  6. package/dist/adapters/fastify/index.cjs +2 -2
  7. package/dist/adapters/fastify/index.js +26 -25
  8. package/dist/adapters/{google-Dgo9-Kb5.cjs → google-BOAwi9Ib.cjs} +1 -1
  9. package/dist/adapters/{google-CT4kgmBf.js → google-CBfBGU4F.js} +1 -1
  10. package/dist/adapters/{handler-dHHEEbG9.cjs → handler-BO2nq6IS.cjs} +2 -2
  11. package/dist/adapters/{handler-fto6TSVn.js → handler-CjVc3ytc.js} +4 -4
  12. package/dist/adapters/hono/index.cjs +2 -2
  13. package/dist/adapters/hono/index.js +30 -29
  14. package/dist/adapters/mcp-tools.cjs +1 -0
  15. package/dist/adapters/mcp-tools.d.ts +128 -0
  16. package/dist/adapters/mcp-tools.js +69 -0
  17. package/dist/adapters/mcp-transport--zhJJHJc.js +370 -0
  18. package/dist/adapters/mcp-transport-MOoCDu2M.cjs +58 -0
  19. package/dist/adapters/mcp-transport.d.ts +44 -0
  20. package/dist/adapters/nextjs/index.cjs +1 -1
  21. package/dist/adapters/nextjs/index.js +23 -22
  22. package/dist/{server/openai-DKpZPCay.cjs → adapters/openai-4JP2B6pB.cjs} +1 -1
  23. package/dist/adapters/{openai-Ckpe7iU7.js → openai-BAnEZgKZ.js} +1 -1
  24. package/dist/adapters/{openai-Bc8qwEKW.cjs → openai-C4BD8xnN.cjs} +1 -1
  25. package/dist/adapters/{openai-DxeVtl8X.js → openai-CaSQEduB.js} +1 -1
  26. package/dist/adapters/{utils-_2o905Fi.js → utils-C7Nrw9Wb.js} +7 -3
  27. package/dist/adapters/{utils-2MwxiQ2o.cjs → utils-tNZ6Cvzw.cjs} +1 -1
  28. package/dist/adapters/utils.cjs +1 -1
  29. package/dist/adapters/utils.js +1 -1
  30. package/dist/client/charts.js +12 -12
  31. package/dist/client/chunks/{DashboardEditModal-4zzjtZRR.js → DashboardEditModal-BTdV528l.js} +1421 -1396
  32. package/dist/client/chunks/DashboardEditModal-BTdV528l.js.map +1 -0
  33. package/dist/client/chunks/{FieldSearchModal-trURu9Sa.js → FieldSearchModal-D75vy4Wb.js} +4 -4
  34. package/dist/client/chunks/{FieldSearchModal-trURu9Sa.js.map → FieldSearchModal-D75vy4Wb.js.map} +1 -1
  35. package/dist/client/chunks/KpiDelta-Bk8bzKYM.js +2 -0
  36. package/dist/client/chunks/KpiNumber-CKF-8e_T.js +2 -0
  37. package/dist/client/chunks/KpiText-Iz1vIvu_.js +2 -0
  38. package/dist/client/chunks/{RetentionCombinedChart-B1hUYaXt.js → RetentionCombinedChart-DIhK5pD8.js} +3 -3
  39. package/dist/client/chunks/{RetentionCombinedChart-B1hUYaXt.js.map → RetentionCombinedChart-DIhK5pD8.js.map} +1 -1
  40. package/dist/client/chunks/{RetentionHeatmap-Dn2ocjVf.js → RetentionHeatmap-CyREolyP.js} +1 -1
  41. package/dist/client/chunks/{RetentionHeatmap-Dn2ocjVf.js.map → RetentionHeatmap-CyREolyP.js.map} +1 -1
  42. package/dist/client/chunks/SchemaVisualization-B1GUT-FM.js +2 -0
  43. package/dist/client/chunks/SchemaVisualizationLazy-DymwT34e.js +2 -0
  44. package/dist/client/chunks/{analysis-builder-B7XSIMkr.js → analysis-builder-C1CJ0c7L.js} +52 -52
  45. package/dist/client/chunks/{analysis-builder-B7XSIMkr.js.map → analysis-builder-C1CJ0c7L.js.map} +1 -1
  46. package/dist/client/chunks/{analysis-builder-shared-DaqtrLxd.js → analysis-builder-shared-rkjJfWLT.js} +9 -9
  47. package/dist/client/chunks/{analysis-builder-shared-DaqtrLxd.js.map → analysis-builder-shared-rkjJfWLT.js.map} +1 -1
  48. package/dist/client/chunks/{chart-activity-grid-wR2Twpo7.js → chart-activity-grid-DLktOINm.js} +2 -2
  49. package/dist/client/chunks/{chart-activity-grid-wR2Twpo7.js.map → chart-activity-grid-DLktOINm.js.map} +1 -1
  50. package/dist/client/chunks/{chart-area-e9ysnatQ.js → chart-area-BwYaflNk.js} +3 -3
  51. package/dist/client/chunks/{chart-area-e9ysnatQ.js.map → chart-area-BwYaflNk.js.map} +1 -1
  52. package/dist/client/chunks/{chart-bar-CPt67rLR.js → chart-bar-BiENfFgE.js} +4 -4
  53. package/dist/client/chunks/{chart-bar-CPt67rLR.js.map → chart-bar-BiENfFgE.js.map} +1 -1
  54. package/dist/client/chunks/{chart-box-plot-Dp_nqQen.js → chart-box-plot-BJF1tBXC.js} +3 -3
  55. package/dist/client/chunks/{chart-box-plot-Dp_nqQen.js.map → chart-box-plot-BJF1tBXC.js.map} +1 -1
  56. package/dist/client/chunks/{chart-bubble-CYQ8loeS.js → chart-bubble-DQQhGVDJ.js} +3 -3
  57. package/dist/client/chunks/{chart-bubble-CYQ8loeS.js.map → chart-bubble-DQQhGVDJ.js.map} +1 -1
  58. package/dist/client/chunks/{chart-candlestick-DTeSf7C5.js → chart-candlestick-C2UuXbLe.js} +3 -3
  59. package/dist/client/chunks/{chart-candlestick-DTeSf7C5.js.map → chart-candlestick-C2UuXbLe.js.map} +1 -1
  60. package/dist/client/chunks/{chart-config-activity-grid-BSWS08cI.js → chart-config-activity-grid-DJOU3TEz.js} +2 -2
  61. package/dist/client/chunks/{chart-config-activity-grid-BSWS08cI.js.map → chart-config-activity-grid-DJOU3TEz.js.map} +1 -1
  62. package/dist/client/chunks/{chart-config-area-DKwgcHp4.js → chart-config-area-CWnWVT6a.js} +2 -2
  63. package/dist/client/chunks/{chart-config-area-DKwgcHp4.js.map → chart-config-area-CWnWVT6a.js.map} +1 -1
  64. package/dist/client/chunks/{chart-config-bar-deTjEhap.js → chart-config-bar-C-7Dr1Ho.js} +2 -2
  65. package/dist/client/chunks/{chart-config-bar-deTjEhap.js.map → chart-config-bar-C-7Dr1Ho.js.map} +1 -1
  66. package/dist/client/chunks/{chart-config-box-plot-DU4iWk3V.js → chart-config-box-plot-mVOwmLdu.js} +2 -2
  67. package/dist/client/chunks/{chart-config-box-plot-DU4iWk3V.js.map → chart-config-box-plot-mVOwmLdu.js.map} +1 -1
  68. package/dist/client/chunks/{chart-config-bubble-B8FSHSW-.js → chart-config-bubble-BPE2CeiD.js} +2 -2
  69. package/dist/client/chunks/{chart-config-bubble-B8FSHSW-.js.map → chart-config-bubble-BPE2CeiD.js.map} +1 -1
  70. package/dist/client/chunks/{chart-config-candlestick-BGfyWFft.js → chart-config-candlestick-BSB9DRy2.js} +2 -2
  71. package/dist/client/chunks/{chart-config-candlestick-BGfyWFft.js.map → chart-config-candlestick-BSB9DRy2.js.map} +1 -1
  72. package/dist/client/chunks/{chart-config-data-table-DKRcGa8t.js → chart-config-data-table-Bhdx5Hem.js} +2 -2
  73. package/dist/client/chunks/{chart-config-data-table-DKRcGa8t.js.map → chart-config-data-table-Bhdx5Hem.js.map} +1 -1
  74. package/dist/client/chunks/{chart-config-funnel-Bt4iGFo_.js → chart-config-funnel-Cl-v-bm1.js} +2 -2
  75. package/dist/client/chunks/{chart-config-funnel-Bt4iGFo_.js.map → chart-config-funnel-Cl-v-bm1.js.map} +1 -1
  76. package/dist/client/chunks/{chart-config-gauge-Bk4Jjp3W.js → chart-config-gauge-CdrUTJMJ.js} +2 -2
  77. package/dist/client/chunks/{chart-config-gauge-Bk4Jjp3W.js.map → chart-config-gauge-CdrUTJMJ.js.map} +1 -1
  78. package/dist/client/chunks/{chart-config-heat-map-CkHsqkrY.js → chart-config-heat-map-DGE3NzoF.js} +2 -2
  79. package/dist/client/chunks/{chart-config-heat-map-CkHsqkrY.js.map → chart-config-heat-map-DGE3NzoF.js.map} +1 -1
  80. package/dist/client/chunks/{chart-config-kpi-delta-CkUX98JV.js → chart-config-kpi-delta-DMrQerUW.js} +2 -2
  81. package/dist/client/chunks/{chart-config-kpi-delta-CkUX98JV.js.map → chart-config-kpi-delta-DMrQerUW.js.map} +1 -1
  82. package/dist/client/chunks/{chart-config-kpi-number-DcxyiUgs.js → chart-config-kpi-number-DCytCytn.js} +2 -2
  83. package/dist/client/chunks/{chart-config-kpi-number-DcxyiUgs.js.map → chart-config-kpi-number-DCytCytn.js.map} +1 -1
  84. package/dist/client/chunks/{chart-config-kpi-text-DI4mj8CN.js → chart-config-kpi-text-KdKQUvHo.js} +2 -2
  85. package/dist/client/chunks/{chart-config-kpi-text-DI4mj8CN.js.map → chart-config-kpi-text-KdKQUvHo.js.map} +1 -1
  86. package/dist/client/chunks/{chart-config-line--j7-dLue.js → chart-config-line-Bl9VDAdz.js} +2 -2
  87. package/dist/client/chunks/{chart-config-line--j7-dLue.js.map → chart-config-line-Bl9VDAdz.js.map} +1 -1
  88. package/dist/client/chunks/{chart-config-markdown-DUjvVjV4.js → chart-config-markdown-BX26b94i.js} +2 -2
  89. package/dist/client/chunks/{chart-config-markdown-DUjvVjV4.js.map → chart-config-markdown-BX26b94i.js.map} +1 -1
  90. package/dist/client/chunks/{chart-config-measure-profile-B9FKBNGc.js → chart-config-measure-profile-DwtRhEFh.js} +2 -2
  91. package/dist/client/chunks/{chart-config-measure-profile-B9FKBNGc.js.map → chart-config-measure-profile-DwtRhEFh.js.map} +1 -1
  92. package/dist/client/chunks/{chart-config-pie-yU4jipl9.js → chart-config-pie-BzBcqPMJ.js} +2 -2
  93. package/dist/client/chunks/{chart-config-pie-yU4jipl9.js.map → chart-config-pie-BzBcqPMJ.js.map} +1 -1
  94. package/dist/client/chunks/{chart-config-radar-R9Fkc8wL.js → chart-config-radar-6ZOgt__z.js} +2 -2
  95. package/dist/client/chunks/{chart-config-radar-R9Fkc8wL.js.map → chart-config-radar-6ZOgt__z.js.map} +1 -1
  96. package/dist/client/chunks/{chart-config-radial-bar-DeoXfpIp.js → chart-config-radial-bar-Df6Eta7N.js} +2 -2
  97. package/dist/client/chunks/{chart-config-radial-bar-DeoXfpIp.js.map → chart-config-radial-bar-Df6Eta7N.js.map} +1 -1
  98. package/dist/client/chunks/{chart-config-sankey-CXEsxo6s.js → chart-config-sankey-DgqKBFvN.js} +2 -2
  99. package/dist/client/chunks/{chart-config-sankey-CXEsxo6s.js.map → chart-config-sankey-DgqKBFvN.js.map} +1 -1
  100. package/dist/client/chunks/{chart-config-scatter-MVUFupub.js → chart-config-scatter-D5nVLDvi.js} +2 -2
  101. package/dist/client/chunks/{chart-config-scatter-MVUFupub.js.map → chart-config-scatter-D5nVLDvi.js.map} +1 -1
  102. package/dist/client/chunks/{chart-config-sunburst-Z_gqIY5u.js → chart-config-sunburst-Ca3FX9nW.js} +2 -2
  103. package/dist/client/chunks/{chart-config-sunburst-Z_gqIY5u.js.map → chart-config-sunburst-Ca3FX9nW.js.map} +1 -1
  104. package/dist/client/chunks/{chart-config-tree-map-BD-xAeIy.js → chart-config-tree-map-Bjy4QNa3.js} +2 -2
  105. package/dist/client/chunks/{chart-config-tree-map-BD-xAeIy.js.map → chart-config-tree-map-Bjy4QNa3.js.map} +1 -1
  106. package/dist/client/chunks/{chart-config-waterfall-CHwVkXZc.js → chart-config-waterfall-C5K2eqR7.js} +2 -2
  107. package/dist/client/chunks/{chart-config-waterfall-CHwVkXZc.js.map → chart-config-waterfall-C5K2eqR7.js.map} +1 -1
  108. package/dist/client/chunks/{chart-data-table-BZ7StNWv.js → chart-data-table-2iCsn0CF.js} +1099 -933
  109. package/dist/client/chunks/chart-data-table-2iCsn0CF.js.map +1 -0
  110. package/dist/client/chunks/{chart-funnel-C9JRW79j.js → chart-funnel-poyOf7-e.js} +3 -3
  111. package/dist/client/chunks/{chart-funnel-C9JRW79j.js.map → chart-funnel-poyOf7-e.js.map} +1 -1
  112. package/dist/client/chunks/{chart-gauge-_Xdgk_qI.js → chart-gauge-D5J4gRky.js} +3 -3
  113. package/dist/client/chunks/{chart-gauge-_Xdgk_qI.js.map → chart-gauge-D5J4gRky.js.map} +1 -1
  114. package/dist/client/chunks/{chart-heat-map-BOMQeUDL.js → chart-heat-map-BAMVhLGG.js} +3 -3
  115. package/dist/client/chunks/{chart-heat-map-BOMQeUDL.js.map → chart-heat-map-BAMVhLGG.js.map} +1 -1
  116. package/dist/client/chunks/{chart-kpi-delta-C2tdpWki.js → chart-kpi-delta-KQjUIeal.js} +71 -73
  117. package/dist/client/chunks/{chart-kpi-delta-C2tdpWki.js.map → chart-kpi-delta-KQjUIeal.js.map} +1 -1
  118. package/dist/client/chunks/{chart-kpi-number-BUNKM7yg.js → chart-kpi-number-CsQgV_x3.js} +62 -63
  119. package/dist/client/chunks/{chart-kpi-number-BUNKM7yg.js.map → chart-kpi-number-CsQgV_x3.js.map} +1 -1
  120. package/dist/client/chunks/{chart-kpi-text-COF8iN0K.js → chart-kpi-text-BR0IyeUU.js} +26 -27
  121. package/dist/client/chunks/{chart-kpi-text-COF8iN0K.js.map → chart-kpi-text-BR0IyeUU.js.map} +1 -1
  122. package/dist/client/chunks/{chart-line-D3SEwXDS.js → chart-line-B5_WntY5.js} +4 -4
  123. package/dist/client/chunks/{chart-line-D3SEwXDS.js.map → chart-line-B5_WntY5.js.map} +1 -1
  124. package/dist/client/chunks/{chart-markdown-DMekYkKz.js → chart-markdown-B6bENbel.js} +2 -2
  125. package/dist/client/chunks/{chart-markdown-DMekYkKz.js.map → chart-markdown-B6bENbel.js.map} +1 -1
  126. package/dist/client/chunks/{chart-measure-profile-BPhI1Z9s.js → chart-measure-profile-yWk-obNb.js} +4 -4
  127. package/dist/client/chunks/{chart-measure-profile-BPhI1Z9s.js.map → chart-measure-profile-yWk-obNb.js.map} +1 -1
  128. package/dist/client/chunks/{chart-pie-COl3Rmdk.js → chart-pie-BodrUoHv.js} +4 -4
  129. package/dist/client/chunks/{chart-pie-COl3Rmdk.js.map → chart-pie-BodrUoHv.js.map} +1 -1
  130. package/dist/client/chunks/{chart-radar-BKZXylBB.js → chart-radar-gG3zfLud.js} +4 -4
  131. package/dist/client/chunks/{chart-radar-BKZXylBB.js.map → chart-radar-gG3zfLud.js.map} +1 -1
  132. package/dist/client/chunks/{chart-radial-bar-CMfC7SPd.js → chart-radial-bar-C2IPCV8c.js} +4 -4
  133. package/dist/client/chunks/{chart-radial-bar-CMfC7SPd.js.map → chart-radial-bar-C2IPCV8c.js.map} +1 -1
  134. package/dist/client/chunks/{chart-sankey-8nRYnupt.js → chart-sankey-BOyxfG1Q.js} +3 -3
  135. package/dist/client/chunks/{chart-sankey-8nRYnupt.js.map → chart-sankey-BOyxfG1Q.js.map} +1 -1
  136. package/dist/client/chunks/{chart-scatter-xQMa3dUt.js → chart-scatter-B8OwlsAX.js} +4 -4
  137. package/dist/client/chunks/{chart-scatter-xQMa3dUt.js.map → chart-scatter-B8OwlsAX.js.map} +1 -1
  138. package/dist/client/chunks/{chart-sunburst-BGhJ4fui.js → chart-sunburst-D9lGEOCc.js} +4 -4
  139. package/dist/client/chunks/{chart-sunburst-BGhJ4fui.js.map → chart-sunburst-D9lGEOCc.js.map} +1 -1
  140. package/dist/client/chunks/{chart-tree-map-Cn1pmrAw.js → chart-tree-map-DZaKy9he.js} +4 -4
  141. package/dist/client/chunks/{chart-tree-map-Cn1pmrAw.js.map → chart-tree-map-DZaKy9he.js.map} +1 -1
  142. package/dist/client/chunks/{chart-waterfall-C2nVN4pn.js → chart-waterfall-BCdUx4DC.js} +4 -4
  143. package/dist/client/chunks/{chart-waterfall-C2nVN4pn.js.map → chart-waterfall-BCdUx4DC.js.map} +1 -1
  144. package/dist/client/chunks/{charts-core-Cy3rHADX.js → charts-core-C5Yokk-x.js} +2 -2
  145. package/dist/client/chunks/{charts-core-Cy3rHADX.js.map → charts-core-C5Yokk-x.js.map} +1 -1
  146. package/dist/client/chunks/{core-BdWfCZ3y.js → core-DcfMGTVa.js} +2 -2
  147. package/dist/client/chunks/{core-BdWfCZ3y.js.map → core-DcfMGTVa.js.map} +1 -1
  148. package/dist/client/chunks/{dist-BWPE2m_X.js → dist-eZurnOde.js} +1 -1
  149. package/dist/client/chunks/{dist-BWPE2m_X.js.map → dist-eZurnOde.js.map} +1 -1
  150. package/dist/client/chunks/exceljs.min-CcjgM-qg.js +31986 -0
  151. package/dist/client/chunks/exceljs.min-CcjgM-qg.js.map +1 -0
  152. package/dist/client/chunks/{javascript-O1RIRkZr.js → javascript-DFvvCuoP.js} +1 -1
  153. package/dist/client/chunks/{javascript-O1RIRkZr.js.map → javascript-DFvvCuoP.js.map} +1 -1
  154. package/dist/client/chunks/{json-C5bX2tt1.js → json-BBm9TlrA.js} +1 -1
  155. package/dist/client/chunks/{json-C5bX2tt1.js.map → json-BBm9TlrA.js.map} +1 -1
  156. package/dist/client/chunks/{rolldown-runtime-lc2dmIiU.js → rolldown-runtime-CCl2IeXn.js} +5 -2
  157. package/dist/client/chunks/{schema-visualization-DVdfx6N8.js → schema-visualization-t1KiOORo.js} +261 -265
  158. package/dist/client/chunks/{schema-visualization-DVdfx6N8.js.map → schema-visualization-t1KiOORo.js.map} +1 -1
  159. package/dist/client/chunks/{sql-D2qikO5q.js → sql-k0GA6oZ_.js} +1 -1
  160. package/dist/client/chunks/{sql-D2qikO5q.js.map → sql-k0GA6oZ_.js.map} +1 -1
  161. package/dist/client/chunks/{syntaxHighlighting-BYYWYmjr.js → syntaxHighlighting-CnDujqwg.js} +2 -2
  162. package/dist/client/chunks/{syntaxHighlighting-BYYWYmjr.js.map → syntaxHighlighting-CnDujqwg.js.map} +1 -1
  163. package/dist/client/chunks/{useDebounce-Bel8J05v.js → useDebounce-CKqkM42n.js} +11 -14
  164. package/dist/client/chunks/{useDebounce-Bel8J05v.js.map → useDebounce-CKqkM42n.js.map} +1 -1
  165. package/dist/client/chunks/{useExplainAI-CxdzY2N0.js → useExplainAI-DBIfYwz-.js} +12 -12
  166. package/dist/client/chunks/{useExplainAI-CxdzY2N0.js.map → useExplainAI-DBIfYwz-.js.map} +1 -1
  167. package/dist/client/chunks/{utils-CMkS7h9x.js → utils--qCr8Yn5.js} +2 -2
  168. package/dist/client/chunks/utils--qCr8Yn5.js.map +1 -0
  169. package/dist/client/chunks/{vendor-BoWEubRu.js → vendor-BRlsCGnK.js} +46 -46
  170. package/dist/client/chunks/{vendor-BoWEubRu.js.map → vendor-BRlsCGnK.js.map} +1 -1
  171. package/dist/client/components.js +3 -3
  172. package/dist/client/hooks.js +3 -3
  173. package/dist/client/icons/types.d.ts +1 -0
  174. package/dist/client/icons.js +1 -1
  175. package/dist/client/index.d.ts +2 -1
  176. package/dist/client/index.js +168 -168
  177. package/dist/client/index.js.map +1 -1
  178. package/dist/client/providers.js +1 -1
  179. package/dist/client/schema.js +1 -1
  180. package/dist/client/types.d.ts +6 -0
  181. package/dist/client/utils/exportXlsx.d.ts +20 -0
  182. package/dist/client/utils/index.d.ts +1 -0
  183. package/dist/client/utils.js +7 -7
  184. package/dist/client-bundle-stats.html +1 -1
  185. package/dist/server/index.cjs +2 -2
  186. package/dist/server/index.js +8 -4
  187. package/dist/server/{openai-DqCEogm0.js → openai-CqZg6zYL.js} +1 -1
  188. package/dist/server/{openai-0HbLlZq6.cjs → openai-D9Zjuby1.cjs} +1 -1
  189. package/dist/{adapters/openai-C96O8M75.cjs → server/openai-DmuEbFd6.cjs} +1 -1
  190. package/dist/server/{openai-DnGeU9PT.js → openai-rwauPzCT.js} +1 -1
  191. package/package.json +11 -1
  192. package/dist/adapters/mcp-transport-ro4OL4BW.cjs +0 -255
  193. package/dist/client/chunks/DashboardEditModal-4zzjtZRR.js.map +0 -1
  194. package/dist/client/chunks/chart-data-table-BZ7StNWv.js.map +0 -1
  195. package/dist/client/chunks/utils-CMkS7h9x.js.map +0 -1
  196. /package/dist/adapters/{anthropic-BIva8k1r.cjs → anthropic-Cto4Jxqt.cjs} +0 -0
  197. /package/dist/adapters/{anthropic-B_rg0BhK.js → anthropic-DpEbCVvF.js} +0 -0
  198. /package/dist/adapters/{dist-Boc63-1q.cjs → dist-BnyV9wfA.cjs} +0 -0
  199. /package/dist/adapters/{dist-De5fzUEM.js → dist-DjVh2RFz.js} +0 -0
@@ -1,36 +1,35 @@
1
- import { n as e } from "./rolldown-runtime-lc2dmIiU.js";
2
- import { A as t, c as n } from "./chart-data-table-BZ7StNWv.js";
3
- import { Suspense as r, createContext as i, lazy as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
4
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
1
+ import { A as e, c as t } from "./chart-data-table-2iCsn0CF.js";
2
+ import { Suspense as n, createContext as r, lazy as i, useCallback as a, useContext as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
3
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
4
  //#region src/client/components/SchemaVisualization/xyflowContext.tsx
6
- var h = i(null), g = h.Provider;
7
- function _() {
8
- let e = s(h);
5
+ var m = r(null), h = m.Provider;
6
+ function g() {
7
+ let e = o(m);
9
8
  if (!e) throw Error("useXyflow must be used within XyflowProvider");
10
9
  return e;
11
10
  }
12
11
  //#endregion
13
12
  //#region src/client/components/SchemaVisualization/SchemaVisualizationLazy.tsx
14
- var v = /* @__PURE__ */ e({ SchemaVisualizationLazy: () => C }), y = !1;
15
- function b(e) {
16
- return /* @__PURE__ */ p("div", {
13
+ var _ = !1;
14
+ function v(e) {
15
+ return /* @__PURE__ */ f("div", {
17
16
  className: "dc:flex dc:items-center dc:justify-center dc:h-full dc:p-8",
18
- children: /* @__PURE__ */ m("div", {
17
+ children: /* @__PURE__ */ p("div", {
19
18
  className: "dc:text-center dc:max-w-md",
20
19
  children: [
21
- /* @__PURE__ */ p("div", {
20
+ /* @__PURE__ */ f("div", {
22
21
  className: "dc:text-4xl dc:mb-4",
23
22
  children: "🔍"
24
23
  }),
25
- /* @__PURE__ */ p("h3", {
24
+ /* @__PURE__ */ f("h3", {
26
25
  className: "dc:text-lg dc:font-semibold text-dc-text dc:mb-2",
27
26
  children: "Schema Visualization requires additional packages"
28
27
  }),
29
- /* @__PURE__ */ p("p", {
28
+ /* @__PURE__ */ f("p", {
30
29
  className: "dc:text-sm text-dc-text-secondary dc:mb-4",
31
30
  children: "Install the required dependencies to enable the interactive schema diagram:"
32
31
  }),
33
- /* @__PURE__ */ p("code", {
32
+ /* @__PURE__ */ f("code", {
34
33
  className: "dc:block dc:px-4 dc:py-2 dc:rounded bg-dc-surface-secondary dc:text-sm dc:font-mono text-dc-text dc:border border-dc-border",
35
34
  children: "npm install @xyflow/react elkjs"
36
35
  })
@@ -38,61 +37,61 @@ function b(e) {
38
37
  })
39
38
  });
40
39
  }
41
- function x() {
42
- return /* @__PURE__ */ p("div", {
40
+ function y() {
41
+ return /* @__PURE__ */ f("div", {
43
42
  className: "dc:flex dc:items-center dc:justify-center dc:h-full",
44
- children: /* @__PURE__ */ m("div", {
43
+ children: /* @__PURE__ */ p("div", {
45
44
  className: "dc:text-center",
46
- children: [/* @__PURE__ */ p("div", { className: "dc:animate-spin dc:rounded-full dc:h-8 dc:w-8 dc:border-b-2 border-dc-accent dc:mx-auto dc:mb-2" }), /* @__PURE__ */ p("p", {
45
+ children: [/* @__PURE__ */ f("div", { className: "dc:animate-spin dc:rounded-full dc:h-8 dc:w-8 dc:border-b-2 border-dc-accent dc:mx-auto dc:mb-2" }), /* @__PURE__ */ f("p", {
47
46
  className: "dc:text-sm text-dc-text-muted",
48
47
  children: "Loading schema visualization..."
49
48
  })]
50
49
  })
51
50
  });
52
51
  }
53
- var S = a(async () => ({ default: (await Promise.resolve().then(() => R)).SchemaVisualization }));
54
- function C(e) {
55
- let [t, n] = d(null), [i, a] = d(y);
56
- return c(() => {
57
- if (y) return;
52
+ var b = i(async () => ({ default: (await import("./SchemaVisualization-B1GUT-FM.js")).SchemaVisualization }));
53
+ function x(e) {
54
+ let [t, r] = u(null), [i, a] = u(_);
55
+ return s(() => {
56
+ if (_) return;
58
57
  let e = !1;
59
58
  return import("@xyflow/react").then((t) => {
60
- e || n(t);
59
+ e || r(t);
61
60
  }).catch(() => {
62
- y = !0, e || a(!0);
61
+ _ = !0, e || a(!0);
63
62
  }), () => {
64
63
  e = !0;
65
64
  };
66
- }, []), i ? /* @__PURE__ */ p(b, { ...e }) : t ? /* @__PURE__ */ p(g, {
65
+ }, []), i ? /* @__PURE__ */ f(v, { ...e }) : t ? /* @__PURE__ */ f(h, {
67
66
  value: t,
68
- children: /* @__PURE__ */ p(r, {
69
- fallback: /* @__PURE__ */ p(x, {}),
70
- children: /* @__PURE__ */ p(S, { ...e })
67
+ children: /* @__PURE__ */ f(n, {
68
+ fallback: /* @__PURE__ */ f(y, {}),
69
+ children: /* @__PURE__ */ f(b, { ...e })
71
70
  })
72
- }) : /* @__PURE__ */ p(x, {});
71
+ }) : /* @__PURE__ */ f(y, {});
73
72
  }
74
73
  //#endregion
75
74
  //#region src/client/components/SchemaVisualization/CubeNode.tsx
76
- function w({ data: e }) {
77
- let { Handle: n, Position: r } = _(), { cube: i, onFieldClick: a, onCubeClick: o, isHighlighted: s, highlightedFields: c, searchTerm: l, selectedField: u } = e, d = (e, t, n) => {
75
+ function S({ data: t }) {
76
+ let { Handle: n, Position: r } = g(), { cube: i, onFieldClick: a, onCubeClick: o, isHighlighted: s, highlightedFields: c, searchTerm: l, selectedField: u } = t, d = (e, t, n) => {
78
77
  a && a(i.name, t, n, {
79
78
  x: e.clientX,
80
79
  y: e.clientY
81
80
  });
82
- }, f = t("info"), h = (e) => {
81
+ }, m = e("info"), h = (e) => {
83
82
  e.stopPropagation(), o && o(i.name, {
84
83
  x: e.clientX,
85
84
  y: e.clientY
86
85
  });
87
- }, g = (e) => u ? u.cubeName === i.name && u.fieldName === e : !1, v = u?.cubeName === i.name && u?.fieldName === null, y = (e) => c.includes(e), b = (e) => {
86
+ }, _ = (e) => u ? u.cubeName === i.name && u.fieldName === e : !1, v = u?.cubeName === i.name && u?.fieldName === null, y = (e) => c.includes(e), b = (e) => {
88
87
  if (!l?.trim()) return !0;
89
88
  let t = l.toLowerCase();
90
89
  return e.name.toLowerCase().includes(t) || e.title && e.title.toLowerCase().includes(t);
91
90
  }, x = l?.trim() ? i.measures.some((e) => b(e)) || i.dimensions.some((e) => b(e)) : !0, S = (e, t, n) => {
92
- let r = g(e.name.split(".")[1] || e.name), i = "dc:px-4 dc:py-2 dc:text-xs dc:cursor-pointer dc:transition-all dc:border-b border-dc-border last:dc:border-b-0 nodrag nopan";
91
+ let r = _(e.name.split(".")[1] || e.name), i = "dc:px-4 dc:py-2 dc:text-xs dc:cursor-pointer dc:transition-all dc:border-b border-dc-border last:dc:border-b-0 nodrag nopan";
93
92
  return r ? `${i} bg-dc-accent-bg text-dc-accent dc:font-semibold dc:ring-1 dc:ring-inset ring-dc-accent` : !x && l?.trim() ? t ? `${i} bg-dc-accent-bg text-dc-accent dc:font-semibold` : `${i} dc:hover:bg-dc-surface-hover text-dc-text-secondary` : l?.trim() && !b(e) ? `${i} dc:opacity-40 dc:hover:opacity-60 text-dc-text-muted` : l?.trim() && b(e) && !t ? `${i} dc:font-bold dc:hover:bg-dc-accent-bg` : t ? `${i} bg-dc-accent-bg text-dc-accent dc:font-semibold` : `${i} dc:hover:bg-dc-surface-hover text-dc-text-secondary`;
94
93
  }, C = i.dimensions.filter((e) => e.type === "time"), w = i.dimensions.filter((e) => e.type !== "time");
95
- return /* @__PURE__ */ m("div", {
94
+ return /* @__PURE__ */ p("div", {
96
95
  className: `
97
96
  dc:border-2 dc:rounded-lg dc:shadow-lg dc:min-w-[280px] dc:overflow-hidden dc:transition-all
98
97
  ${!x && l?.trim() ? "dc:opacity-30 dc:grayscale" : ""}
@@ -100,59 +99,59 @@ function w({ data: e }) {
100
99
  `,
101
100
  style: { backgroundColor: "var(--dc-surface)" },
102
101
  children: [
103
- /* @__PURE__ */ p("div", {
102
+ /* @__PURE__ */ f("div", {
104
103
  className: `dc:px-4 dc:py-3 dc:transition-colors ${s ? "bg-dc-accent-bg" : "bg-dc-surface-secondary"}`,
105
- children: /* @__PURE__ */ m("div", {
104
+ children: /* @__PURE__ */ p("div", {
106
105
  className: "dc:flex dc:items-center dc:justify-between",
107
106
  children: [
108
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
107
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
109
108
  className: "dc:font-semibold text-dc-text dc:text-sm",
110
109
  children: i.title || i.name
111
- }), i.description && /* @__PURE__ */ p("p", {
110
+ }), i.description && /* @__PURE__ */ f("p", {
112
111
  className: "dc:text-xs text-dc-text-muted dc:mt-1 dc:line-clamp-2",
113
112
  children: i.description
114
113
  })] }),
115
- o && /* @__PURE__ */ p("button", {
114
+ o && /* @__PURE__ */ f("button", {
116
115
  className: `dc:ml-2 dc:p-1 dc:rounded dc:transition-colors nodrag nopan ${v ? "bg-dc-accent-bg text-dc-accent" : "text-dc-text-muted dc:hover:text-dc-text dc:hover:bg-dc-surface-hover"}`,
117
116
  onClick: h,
118
117
  title: "Cube info",
119
- children: /* @__PURE__ */ p(f, { className: "dc:w-5 dc:h-5" })
118
+ children: /* @__PURE__ */ f(m, { className: "dc:w-5 dc:h-5" })
120
119
  }),
121
- !o && /* @__PURE__ */ m("div", {
120
+ !o && /* @__PURE__ */ p("div", {
122
121
  className: "dc:text-xs text-dc-text-muted dc:ml-2",
123
- children: [/* @__PURE__ */ m("div", { children: [i.measures.length, "M"] }), /* @__PURE__ */ m("div", { children: [i.dimensions.length, "D"] })]
122
+ children: [/* @__PURE__ */ p("div", { children: [i.measures.length, "M"] }), /* @__PURE__ */ p("div", { children: [i.dimensions.length, "D"] })]
124
123
  })
125
124
  ]
126
125
  })
127
126
  }),
128
- i.measures.length > 0 && /* @__PURE__ */ m("div", {
127
+ i.measures.length > 0 && /* @__PURE__ */ p("div", {
129
128
  className: "dc:border-t border-dc-border",
130
- children: [/* @__PURE__ */ p("div", {
129
+ children: [/* @__PURE__ */ f("div", {
131
130
  className: "dc:px-4 dc:py-1.5 dc:border-b border-dc-border",
132
131
  style: { backgroundColor: "color-mix(in srgb, var(--dc-warning) 10%, var(--dc-surface))" },
133
- children: /* @__PURE__ */ m("h4", {
132
+ children: /* @__PURE__ */ p("h4", {
134
133
  className: "dc:text-xs dc:font-medium text-dc-text-secondary dc:flex dc:items-center",
135
134
  children: [
136
- /* @__PURE__ */ p("span", { className: "dc:w-2 dc:h-2 bg-dc-warning dc:rounded-full dc:mr-2" }),
135
+ /* @__PURE__ */ f("span", { className: "dc:w-2 dc:h-2 bg-dc-warning dc:rounded-full dc:mr-2" }),
137
136
  "Measures (",
138
137
  i.measures.length,
139
138
  ")"
140
139
  ]
141
140
  })
142
- }), /* @__PURE__ */ p("div", {
141
+ }), /* @__PURE__ */ f("div", {
143
142
  className: "dc:max-h-64 dc:overflow-y-auto nowheel",
144
143
  children: i.measures.map((e) => {
145
144
  let t = e.name.split(".")[1] || e.name;
146
- return /* @__PURE__ */ p("div", {
145
+ return /* @__PURE__ */ f("div", {
147
146
  className: S(e, y(e.name), "measure"),
148
147
  onClick: (e) => d(e, t, "measure"),
149
148
  title: e.title,
150
- children: /* @__PURE__ */ m("div", {
149
+ children: /* @__PURE__ */ p("div", {
151
150
  className: "dc:flex dc:items-center dc:justify-between",
152
- children: [/* @__PURE__ */ p("span", {
151
+ children: [/* @__PURE__ */ f("span", {
153
152
  className: "dc:font-mono dc:truncate",
154
153
  children: e.shortTitle || e.title || t
155
- }), /* @__PURE__ */ p("span", {
154
+ }), /* @__PURE__ */ f("span", {
156
155
  className: "text-dc-text-muted dc:ml-2 dc:text-[10px] dc:uppercase",
157
156
  children: e.type
158
157
  })]
@@ -161,34 +160,34 @@ function w({ data: e }) {
161
160
  })
162
161
  })]
163
162
  }),
164
- C.length > 0 && /* @__PURE__ */ m("div", {
163
+ C.length > 0 && /* @__PURE__ */ p("div", {
165
164
  className: "dc:border-t border-dc-border",
166
- children: [/* @__PURE__ */ p("div", {
165
+ children: [/* @__PURE__ */ f("div", {
167
166
  className: "dc:px-4 dc:py-1.5 dc:border-b border-dc-border",
168
167
  style: { backgroundColor: "color-mix(in srgb, var(--dc-accent) 10%, var(--dc-surface))" },
169
- children: /* @__PURE__ */ m("h4", {
168
+ children: /* @__PURE__ */ p("h4", {
170
169
  className: "dc:text-xs dc:font-medium text-dc-text-secondary dc:flex dc:items-center",
171
170
  children: [
172
- /* @__PURE__ */ p("span", { className: "dc:w-2 dc:h-2 bg-dc-accent dc:rounded-full dc:mr-2" }),
171
+ /* @__PURE__ */ f("span", { className: "dc:w-2 dc:h-2 bg-dc-accent dc:rounded-full dc:mr-2" }),
173
172
  "Time Dimensions (",
174
173
  C.length,
175
174
  ")"
176
175
  ]
177
176
  })
178
- }), /* @__PURE__ */ p("div", {
177
+ }), /* @__PURE__ */ f("div", {
179
178
  className: "dc:max-h-64 dc:overflow-y-auto nowheel",
180
179
  children: C.map((e) => {
181
180
  let t = e.name.split(".")[1] || e.name;
182
- return /* @__PURE__ */ p("div", {
181
+ return /* @__PURE__ */ f("div", {
183
182
  className: S(e, y(e.name), "dimension"),
184
183
  onClick: (e) => d(e, t, "dimension"),
185
184
  title: e.title,
186
- children: /* @__PURE__ */ m("div", {
185
+ children: /* @__PURE__ */ p("div", {
187
186
  className: "dc:flex dc:items-center dc:justify-between",
188
- children: [/* @__PURE__ */ p("span", {
187
+ children: [/* @__PURE__ */ f("span", {
189
188
  className: "dc:font-mono dc:truncate",
190
189
  children: e.shortTitle || e.title || t
191
- }), /* @__PURE__ */ p("span", {
190
+ }), /* @__PURE__ */ f("span", {
192
191
  className: "text-dc-text-muted dc:ml-2 dc:text-[10px] dc:uppercase",
193
192
  children: e.type
194
193
  })]
@@ -197,34 +196,34 @@ function w({ data: e }) {
197
196
  })
198
197
  })]
199
198
  }),
200
- w.length > 0 && /* @__PURE__ */ m("div", {
199
+ w.length > 0 && /* @__PURE__ */ p("div", {
201
200
  className: "dc:border-t border-dc-border",
202
- children: [/* @__PURE__ */ p("div", {
201
+ children: [/* @__PURE__ */ f("div", {
203
202
  className: "dc:px-4 dc:py-1.5 dc:border-b border-dc-border",
204
203
  style: { backgroundColor: "color-mix(in srgb, var(--dc-success) 10%, var(--dc-surface))" },
205
- children: /* @__PURE__ */ m("h4", {
204
+ children: /* @__PURE__ */ p("h4", {
206
205
  className: "dc:text-xs dc:font-medium text-dc-text-secondary dc:flex dc:items-center",
207
206
  children: [
208
- /* @__PURE__ */ p("span", { className: "dc:w-2 dc:h-2 bg-dc-success dc:rounded-full dc:mr-2" }),
207
+ /* @__PURE__ */ f("span", { className: "dc:w-2 dc:h-2 bg-dc-success dc:rounded-full dc:mr-2" }),
209
208
  "Dimensions (",
210
209
  w.length,
211
210
  ")"
212
211
  ]
213
212
  })
214
- }), /* @__PURE__ */ p("div", {
213
+ }), /* @__PURE__ */ f("div", {
215
214
  className: "dc:max-h-64 dc:overflow-y-auto nowheel",
216
215
  children: w.map((e) => {
217
216
  let t = e.name.split(".")[1] || e.name;
218
- return /* @__PURE__ */ p("div", {
217
+ return /* @__PURE__ */ f("div", {
219
218
  className: S(e, y(e.name), "dimension"),
220
219
  onClick: (e) => d(e, t, "dimension"),
221
220
  title: e.title,
222
- children: /* @__PURE__ */ m("div", {
221
+ children: /* @__PURE__ */ p("div", {
223
222
  className: "dc:flex dc:items-center dc:justify-between",
224
- children: [/* @__PURE__ */ p("span", {
223
+ children: [/* @__PURE__ */ f("span", {
225
224
  className: "dc:font-mono dc:truncate",
226
225
  children: e.shortTitle || e.title || t
227
- }), /* @__PURE__ */ p("span", {
226
+ }), /* @__PURE__ */ f("span", {
228
227
  className: "text-dc-text-muted dc:ml-2 dc:text-[10px] dc:uppercase",
229
228
  children: e.type
230
229
  })]
@@ -233,28 +232,28 @@ function w({ data: e }) {
233
232
  })
234
233
  })]
235
234
  }),
236
- /* @__PURE__ */ p(n, {
235
+ /* @__PURE__ */ f(n, {
237
236
  type: "source",
238
237
  position: r.Right,
239
238
  id: "right",
240
239
  className: "dc:opacity-0",
241
240
  isConnectable: !1
242
241
  }),
243
- /* @__PURE__ */ p(n, {
242
+ /* @__PURE__ */ f(n, {
244
243
  type: "target",
245
244
  position: r.Left,
246
245
  id: "left",
247
246
  className: "dc:opacity-0",
248
247
  isConnectable: !1
249
248
  }),
250
- /* @__PURE__ */ p(n, {
249
+ /* @__PURE__ */ f(n, {
251
250
  type: "source",
252
251
  position: r.Bottom,
253
252
  id: "bottom",
254
253
  className: "dc:opacity-0",
255
254
  isConnectable: !1
256
255
  }),
257
- /* @__PURE__ */ p(n, {
256
+ /* @__PURE__ */ f(n, {
258
257
  type: "target",
259
258
  position: r.Top,
260
259
  id: "top",
@@ -266,8 +265,8 @@ function w({ data: e }) {
266
265
  }
267
266
  //#endregion
268
267
  //#region src/client/components/SchemaVisualization/RelationshipEdge.tsx
269
- function T({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: i, targetPosition: a, style: o = {}, data: s, markerEnd: c }) {
270
- let { getBezierPath: l, BaseEdge: u, EdgeLabelRenderer: d } = _(), [h, g, v] = l({
268
+ function C({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: i, targetPosition: a, style: o = {}, data: s, markerEnd: c }) {
269
+ let { getBezierPath: l, BaseEdge: u, EdgeLabelRenderer: m } = g(), [h, _, v] = l({
271
270
  sourceX: e,
272
271
  sourceY: t,
273
272
  sourcePosition: i,
@@ -293,36 +292,36 @@ function T({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: i,
293
292
  default: return "#6b7280";
294
293
  }
295
294
  })(y.relationship), C = x(y.relationship);
296
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, {
295
+ return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(u, {
297
296
  path: h,
298
297
  markerEnd: c,
299
298
  style: {
300
299
  ...o,
301
300
  stroke: S
302
301
  }
303
- }), /* @__PURE__ */ p(d, { children: /* @__PURE__ */ p("div", {
302
+ }), /* @__PURE__ */ f(m, { children: /* @__PURE__ */ f("div", {
304
303
  style: {
305
304
  position: "absolute",
306
- transform: `translate(-50%, -50%) translate(${g}px,${v}px)`,
305
+ transform: `translate(-50%, -50%) translate(${_}px,${v}px)`,
307
306
  fontSize: 10,
308
307
  pointerEvents: "all"
309
308
  },
310
309
  className: "nodrag nopan",
311
- children: /* @__PURE__ */ p("div", {
310
+ children: /* @__PURE__ */ f("div", {
312
311
  className: "dc:border-2 dc:rounded-md dc:px-2 dc:py-1 dc:shadow-xs",
313
312
  style: {
314
313
  backgroundColor: "var(--dc-surface)",
315
314
  borderColor: S
316
315
  },
317
- children: /* @__PURE__ */ m("div", {
316
+ children: /* @__PURE__ */ p("div", {
318
317
  className: "dc:text-center",
319
- children: [/* @__PURE__ */ p("div", {
318
+ children: [/* @__PURE__ */ f("div", {
320
319
  className: "dc:font-bold dc:text-xs dc:mb-1",
321
320
  style: { color: S },
322
321
  children: C
323
- }), /* @__PURE__ */ p("div", {
322
+ }), /* @__PURE__ */ f("div", {
324
323
  className: "dc:text-[9px] text-dc-text-muted dc:leading-tight",
325
- children: b.map((e, t) => /* @__PURE__ */ m("div", {
324
+ children: b.map((e, t) => /* @__PURE__ */ p("div", {
326
325
  className: "dc:font-mono",
327
326
  children: [
328
327
  e.sourceField,
@@ -337,20 +336,20 @@ function T({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: i,
337
336
  }
338
337
  //#endregion
339
338
  //#region src/client/components/SchemaVisualization/FieldDetailPanel.tsx
340
- function E({ label: e, children: t }) {
341
- return /* @__PURE__ */ m("div", {
339
+ function w({ label: e, children: t }) {
340
+ return /* @__PURE__ */ p("div", {
342
341
  className: "dc:flex dc:items-start dc:gap-2 dc:text-xs",
343
- children: [/* @__PURE__ */ p("span", {
342
+ children: [/* @__PURE__ */ f("span", {
344
343
  className: "text-dc-text-muted dc:w-20 dc:flex-shrink-0 dc:font-medium",
345
344
  children: e
346
- }), /* @__PURE__ */ p("span", {
345
+ }), /* @__PURE__ */ f("span", {
347
346
  className: "text-dc-text dc:flex-1 dc:min-w-0",
348
347
  children: t
349
348
  })]
350
349
  });
351
350
  }
352
- function D({ type: e, color: t }) {
353
- return /* @__PURE__ */ p("span", {
351
+ function T({ type: e, color: t }) {
352
+ return /* @__PURE__ */ f("span", {
354
353
  className: "dc:inline-flex dc:items-center dc:px-1.5 dc:py-0.5 dc:rounded dc:text-[10px] dc:font-medium dc:uppercase",
355
354
  style: {
356
355
  backgroundColor: `color-mix(in srgb, ${t} 15%, var(--dc-surface))`,
@@ -359,17 +358,17 @@ function D({ type: e, color: t }) {
359
358
  children: e
360
359
  });
361
360
  }
362
- function O({ measure: e, cube: t }) {
363
- return /* @__PURE__ */ m("div", {
361
+ function E({ measure: e, cube: t }) {
362
+ return /* @__PURE__ */ p("div", {
364
363
  className: "dc:flex dc:flex-col dc:gap-2",
365
364
  children: [
366
- /* @__PURE__ */ p(E, {
365
+ /* @__PURE__ */ f(w, {
367
366
  label: "Cube",
368
367
  children: t.title || t.name
369
368
  }),
370
- /* @__PURE__ */ p(E, {
369
+ /* @__PURE__ */ f(w, {
371
370
  label: "Type",
372
- children: /* @__PURE__ */ p(D, {
371
+ children: /* @__PURE__ */ f(T, {
373
372
  type: e.type,
374
373
  color: {
375
374
  count: "#f59e0b",
@@ -384,15 +383,15 @@ function O({ measure: e, cube: t }) {
384
383
  }[e.type] || "#6b7280"
385
384
  })
386
385
  }),
387
- e.title && e.title !== e.shortTitle && /* @__PURE__ */ p(E, {
386
+ e.title && e.title !== e.shortTitle && /* @__PURE__ */ f(w, {
388
387
  label: "Title",
389
388
  children: e.title
390
389
  }),
391
- e.drillMembers && e.drillMembers.length > 0 && /* @__PURE__ */ p(E, {
390
+ e.drillMembers && e.drillMembers.length > 0 && /* @__PURE__ */ f(w, {
392
391
  label: "Drill into",
393
- children: /* @__PURE__ */ p("div", {
392
+ children: /* @__PURE__ */ f("div", {
394
393
  className: "dc:flex dc:flex-wrap dc:gap-1",
395
- children: e.drillMembers.map((e) => /* @__PURE__ */ p("span", {
394
+ children: e.drillMembers.map((e) => /* @__PURE__ */ f("span", {
396
395
  className: "dc:font-mono dc:text-[10px] dc:px-1 dc:py-0.5 dc:rounded bg-dc-surface-secondary border-dc-border dc:border",
397
396
  children: e.split(".")[1] || e
398
397
  }, e))
@@ -401,44 +400,44 @@ function O({ measure: e, cube: t }) {
401
400
  ]
402
401
  });
403
402
  }
404
- function k({ dimension: e, cube: t }) {
403
+ function D({ dimension: e, cube: t }) {
405
404
  let n = e.type === "time" ? "#3b82f6" : "#10b981", r = t.hierarchies?.filter((n) => n.levels.some((n) => n === e.name || n === `${t.name}.${e.name.split(".")[1]}`)) || [];
406
- return /* @__PURE__ */ m("div", {
405
+ return /* @__PURE__ */ p("div", {
407
406
  className: "dc:flex dc:flex-col dc:gap-2",
408
407
  children: [
409
- /* @__PURE__ */ p(E, {
408
+ /* @__PURE__ */ f(w, {
410
409
  label: "Cube",
411
410
  children: t.title || t.name
412
411
  }),
413
- /* @__PURE__ */ p(E, {
412
+ /* @__PURE__ */ f(w, {
414
413
  label: "Type",
415
- children: /* @__PURE__ */ p(D, {
414
+ children: /* @__PURE__ */ f(T, {
416
415
  type: e.type,
417
416
  color: n
418
417
  })
419
418
  }),
420
- e.title && e.title !== e.shortTitle && /* @__PURE__ */ p(E, {
419
+ e.title && e.title !== e.shortTitle && /* @__PURE__ */ f(w, {
421
420
  label: "Title",
422
421
  children: e.title
423
422
  }),
424
- e.type === "time" && e.granularities && e.granularities.length > 0 && /* @__PURE__ */ p(E, {
423
+ e.type === "time" && e.granularities && e.granularities.length > 0 && /* @__PURE__ */ f(w, {
425
424
  label: "Granularity",
426
- children: /* @__PURE__ */ p("div", {
425
+ children: /* @__PURE__ */ f("div", {
427
426
  className: "dc:flex dc:flex-wrap dc:gap-1",
428
- children: e.granularities.map((e) => /* @__PURE__ */ p("span", {
427
+ children: e.granularities.map((e) => /* @__PURE__ */ f("span", {
429
428
  className: "dc:font-mono dc:text-[10px] dc:px-1 dc:py-0.5 dc:rounded bg-dc-surface-secondary border-dc-border dc:border",
430
429
  children: e
431
430
  }, e))
432
431
  })
433
432
  }),
434
- r.length > 0 && /* @__PURE__ */ p(E, {
433
+ r.length > 0 && /* @__PURE__ */ f(w, {
435
434
  label: "Hierarchy",
436
- children: r.map((e) => /* @__PURE__ */ m("div", {
435
+ children: r.map((e) => /* @__PURE__ */ p("div", {
437
436
  className: "dc:text-[10px]",
438
- children: [/* @__PURE__ */ p("span", {
437
+ children: [/* @__PURE__ */ f("span", {
439
438
  className: "dc:font-medium",
440
439
  children: e.title
441
- }), /* @__PURE__ */ m("span", {
440
+ }), /* @__PURE__ */ p("span", {
442
441
  className: "text-dc-text-muted dc:ml-1",
443
442
  children: [
444
443
  "(",
@@ -451,26 +450,26 @@ function k({ dimension: e, cube: t }) {
451
450
  ]
452
451
  });
453
452
  }
454
- function ee({ cube: e }) {
453
+ function O({ cube: e }) {
455
454
  let t = {
456
455
  belongsTo: "#10b981",
457
456
  hasOne: "#3b82f6",
458
457
  hasMany: "#f59e0b",
459
458
  belongsToMany: "#8b5cf6"
460
459
  };
461
- return /* @__PURE__ */ m("div", {
460
+ return /* @__PURE__ */ p("div", {
462
461
  className: "dc:flex dc:flex-col dc:gap-2",
463
462
  children: [
464
- e.description && /* @__PURE__ */ p(E, {
463
+ e.description && /* @__PURE__ */ f(w, {
465
464
  label: "Description",
466
465
  children: e.description
467
466
  }),
468
- /* @__PURE__ */ m(E, {
467
+ /* @__PURE__ */ p(w, {
469
468
  label: "Measures",
470
- children: [/* @__PURE__ */ p("span", {
469
+ children: [/* @__PURE__ */ f("span", {
471
470
  className: "dc:font-mono",
472
471
  children: e.measures.length
473
- }), e.measures.length > 0 && /* @__PURE__ */ m("span", {
472
+ }), e.measures.length > 0 && /* @__PURE__ */ p("span", {
474
473
  className: "text-dc-text-muted dc:ml-1",
475
474
  children: [
476
475
  "(",
@@ -479,12 +478,12 @@ function ee({ cube: e }) {
479
478
  ]
480
479
  })]
481
480
  }),
482
- /* @__PURE__ */ m(E, {
481
+ /* @__PURE__ */ p(w, {
483
482
  label: "Dimensions",
484
- children: [/* @__PURE__ */ p("span", {
483
+ children: [/* @__PURE__ */ f("span", {
485
484
  className: "dc:font-mono",
486
485
  children: e.dimensions.length
487
- }), e.dimensions.some((e) => e.type === "time") && /* @__PURE__ */ m("span", {
486
+ }), e.dimensions.some((e) => e.type === "time") && /* @__PURE__ */ p("span", {
488
487
  className: "text-dc-text-muted dc:ml-1",
489
488
  children: [
490
489
  "(",
@@ -493,32 +492,32 @@ function ee({ cube: e }) {
493
492
  ]
494
493
  })]
495
494
  }),
496
- e.relationships && e.relationships.length > 0 && /* @__PURE__ */ p(E, {
495
+ e.relationships && e.relationships.length > 0 && /* @__PURE__ */ f(w, {
497
496
  label: "Joins",
498
- children: /* @__PURE__ */ p("div", {
497
+ children: /* @__PURE__ */ f("div", {
499
498
  className: "dc:flex dc:flex-col dc:gap-1",
500
- children: e.relationships.map((e, n) => /* @__PURE__ */ m("div", {
499
+ children: e.relationships.map((e, n) => /* @__PURE__ */ p("div", {
501
500
  className: "dc:flex dc:items-center dc:gap-1.5 dc:text-[10px]",
502
- children: [/* @__PURE__ */ p(D, {
501
+ children: [/* @__PURE__ */ f(T, {
503
502
  type: e.relationship,
504
503
  color: t[e.relationship] || "#6b7280"
505
- }), /* @__PURE__ */ p("span", {
504
+ }), /* @__PURE__ */ f("span", {
506
505
  className: "dc:font-mono",
507
506
  children: e.targetCube
508
507
  })]
509
508
  }, n))
510
509
  })
511
510
  }),
512
- e.hierarchies && e.hierarchies.length > 0 && /* @__PURE__ */ p(E, {
511
+ e.hierarchies && e.hierarchies.length > 0 && /* @__PURE__ */ f(w, {
513
512
  label: "Hierarchies",
514
- children: /* @__PURE__ */ p("div", {
513
+ children: /* @__PURE__ */ f("div", {
515
514
  className: "dc:flex dc:flex-col dc:gap-1",
516
- children: e.hierarchies.map((e) => /* @__PURE__ */ m("div", {
515
+ children: e.hierarchies.map((e) => /* @__PURE__ */ p("div", {
517
516
  className: "dc:text-[10px]",
518
- children: [/* @__PURE__ */ p("span", {
517
+ children: [/* @__PURE__ */ f("span", {
519
518
  className: "dc:font-medium",
520
519
  children: e.title
521
- }), /* @__PURE__ */ m("span", {
520
+ }), /* @__PURE__ */ p("span", {
522
521
  className: "text-dc-text-muted dc:ml-1",
523
522
  children: [
524
523
  "(",
@@ -529,24 +528,24 @@ function ee({ cube: e }) {
529
528
  }, e.name))
530
529
  })
531
530
  }),
532
- e.meta?.eventStream && /* @__PURE__ */ p(E, {
531
+ e.meta?.eventStream && /* @__PURE__ */ f(w, {
533
532
  label: "Event Stream",
534
- children: /* @__PURE__ */ m("div", {
533
+ children: /* @__PURE__ */ p("div", {
535
534
  className: "dc:text-[10px]",
536
535
  children: [
537
- /* @__PURE__ */ p("span", {
536
+ /* @__PURE__ */ f("span", {
538
537
  className: "text-dc-text-muted",
539
538
  children: "binding: "
540
539
  }),
541
- /* @__PURE__ */ p("span", {
540
+ /* @__PURE__ */ f("span", {
542
541
  className: "dc:font-mono",
543
542
  children: e.meta.eventStream.bindingKey.split(".")[1] || e.meta.eventStream.bindingKey
544
543
  }),
545
- /* @__PURE__ */ p("span", {
544
+ /* @__PURE__ */ f("span", {
546
545
  className: "text-dc-text-muted dc:ml-2",
547
546
  children: "time: "
548
547
  }),
549
- /* @__PURE__ */ p("span", {
548
+ /* @__PURE__ */ f("span", {
550
549
  className: "dc:font-mono",
551
550
  children: e.meta.eventStream.timeDimension.split(".")[1] || e.meta.eventStream.timeDimension
552
551
  })
@@ -556,47 +555,47 @@ function ee({ cube: e }) {
556
555
  ]
557
556
  });
558
557
  }
559
- function te({ selection: e, meta: n, onClose: r }) {
560
- let i = t("close"), a = n.cubes.find((t) => t.name === e.cubeName);
558
+ function ee({ selection: t, meta: n, onClose: r }) {
559
+ let i = e("close"), a = n.cubes.find((e) => e.name === t.cubeName);
561
560
  if (!a) return null;
562
561
  let o, s, c, l;
563
- if (e.fieldType === "cube" || !e.fieldName) o = a.title || a.name, s = "var(--dc-accent)", c = "color-mix(in srgb, var(--dc-accent) 10%, var(--dc-surface))", l = /* @__PURE__ */ p(ee, { cube: a });
564
- else if (e.fieldType === "measure") {
565
- let t = a.measures.find((t) => (t.name.split(".")[1] || t.name) === e.fieldName || t.name === e.fieldName);
566
- if (!t) return null;
567
- o = t.shortTitle || t.title || e.fieldName, s = "var(--dc-warning)", c = "color-mix(in srgb, var(--dc-warning) 10%, var(--dc-surface))", l = /* @__PURE__ */ p(O, {
568
- measure: t,
562
+ if (t.fieldType === "cube" || !t.fieldName) o = a.title || a.name, s = "var(--dc-accent)", c = "color-mix(in srgb, var(--dc-accent) 10%, var(--dc-surface))", l = /* @__PURE__ */ f(O, { cube: a });
563
+ else if (t.fieldType === "measure") {
564
+ let e = a.measures.find((e) => (e.name.split(".")[1] || e.name) === t.fieldName || e.name === t.fieldName);
565
+ if (!e) return null;
566
+ o = e.shortTitle || e.title || t.fieldName, s = "var(--dc-warning)", c = "color-mix(in srgb, var(--dc-warning) 10%, var(--dc-surface))", l = /* @__PURE__ */ f(E, {
567
+ measure: e,
569
568
  cube: a
570
569
  });
571
570
  } else {
572
- let t = a.dimensions.find((t) => (t.name.split(".")[1] || t.name) === e.fieldName || t.name === e.fieldName);
573
- if (!t) return null;
574
- o = t.shortTitle || t.title || e.fieldName, s = t.type === "time" ? "var(--dc-accent)" : "var(--dc-success)", c = t.type === "time" ? "color-mix(in srgb, var(--dc-accent) 10%, var(--dc-surface))" : "color-mix(in srgb, var(--dc-success) 10%, var(--dc-surface))", l = /* @__PURE__ */ p(k, {
575
- dimension: t,
571
+ let e = a.dimensions.find((e) => (e.name.split(".")[1] || e.name) === t.fieldName || e.name === t.fieldName);
572
+ if (!e) return null;
573
+ o = e.shortTitle || e.title || t.fieldName, s = e.type === "time" ? "var(--dc-accent)" : "var(--dc-success)", c = e.type === "time" ? "color-mix(in srgb, var(--dc-accent) 10%, var(--dc-surface))" : "color-mix(in srgb, var(--dc-success) 10%, var(--dc-surface))", l = /* @__PURE__ */ f(D, {
574
+ dimension: e,
576
575
  cube: a
577
576
  });
578
577
  }
579
- return /* @__PURE__ */ m("div", {
578
+ return /* @__PURE__ */ p("div", {
580
579
  className: "dc:border-2 dc:rounded-lg dc:shadow-lg dc:min-w-[260px] dc:max-w-[320px] dc:overflow-hidden dc:transition-all border-dc-border",
581
580
  style: { backgroundColor: "var(--dc-surface)" },
582
- children: [/* @__PURE__ */ m("div", {
581
+ children: [/* @__PURE__ */ p("div", {
583
582
  className: "dc:px-4 dc:py-2.5 dc:border-b border-dc-border dc:flex dc:items-center dc:justify-between",
584
583
  style: { backgroundColor: c },
585
- children: [/* @__PURE__ */ m("div", {
584
+ children: [/* @__PURE__ */ p("div", {
586
585
  className: "dc:flex dc:items-center dc:gap-2 dc:min-w-0",
587
- children: [/* @__PURE__ */ p("span", {
586
+ children: [/* @__PURE__ */ f("span", {
588
587
  className: "dc:w-2 dc:h-2 dc:rounded-full dc:flex-shrink-0",
589
588
  style: { backgroundColor: s }
590
- }), /* @__PURE__ */ p("h4", {
589
+ }), /* @__PURE__ */ f("h4", {
591
590
  className: "dc:text-sm dc:font-semibold text-dc-text dc:truncate",
592
591
  children: o
593
592
  })]
594
- }), /* @__PURE__ */ p("button", {
593
+ }), /* @__PURE__ */ f("button", {
595
594
  onClick: r,
596
595
  className: "dc:ml-2 dc:flex-shrink-0 text-dc-text-muted dc:hover:text-dc-text dc:transition-colors",
597
- children: /* @__PURE__ */ p(i, { className: "dc:w-3.5 dc:h-3.5" })
596
+ children: /* @__PURE__ */ f(i, { className: "dc:w-3.5 dc:h-3.5" })
598
597
  })]
599
- }), /* @__PURE__ */ p("div", {
598
+ }), /* @__PURE__ */ f("div", {
600
599
  className: "dc:px-4 dc:py-3",
601
600
  children: l
602
601
  })]
@@ -604,7 +603,7 @@ function te({ selection: e, meta: n, onClose: r }) {
604
603
  }
605
604
  //#endregion
606
605
  //#region src/client/components/SchemaVisualization/useERDLayout.ts
607
- var ne = {
606
+ var k = {
608
607
  direction: "LR",
609
608
  nodeWidth: 340,
610
609
  nodeSep: 150,
@@ -662,7 +661,7 @@ async function I(e, t, n) {
662
661
  id: e.id,
663
662
  sources: [`${e.source}__src__${e.id}`],
664
663
  targets: [`${e.target}__tgt__${e.id}`]
665
- })), l = n.direction === "LR" ? "RIGHT" : "DOWN", u = {
664
+ })), l = n.direction === "LR" ? "RIGHT" : "DOWN", u = await N.layout({
666
665
  id: "root",
667
666
  layoutOptions: {
668
667
  "elk.algorithm": "layered",
@@ -679,15 +678,15 @@ async function I(e, t, n) {
679
678
  },
680
679
  children: s,
681
680
  edges: c
682
- }, d = await N.layout(u), f = /* @__PURE__ */ new Map();
683
- if (d.children) for (let e of d.children) f.set(e.id, {
681
+ }), d = /* @__PURE__ */ new Map();
682
+ if (u.children) for (let e of u.children) d.set(e.id, {
684
683
  x: e.x,
685
684
  y: e.y
686
685
  });
687
686
  return {
688
687
  nodes: e.map((e) => ({
689
688
  ...e,
690
- position: f.get(e.id) || e.position,
689
+ position: d.get(e.id) || e.position,
691
690
  targetPosition: A(n.direction),
692
691
  sourcePosition: j(n.direction)
693
692
  })),
@@ -711,29 +710,29 @@ function L(e, t) {
711
710
  };
712
711
  });
713
712
  }
714
- function re(e, t, n = {}) {
715
- let r = l(() => ({
716
- ...ne,
713
+ function te(e, t, n = {}) {
714
+ let r = c(() => ({
715
+ ...k,
717
716
  ...n
718
717
  }), [
719
718
  n.direction,
720
719
  n.nodeWidth,
721
720
  n.nodeSep,
722
721
  n.rankSep
723
- ]), i = l(() => e.length === 0 ? "" : e.map((e) => e.id).sort().join(",") + "|" + t.map((e) => e.id).sort().join(","), [e, t]), a = u(e), o = u(t), s = u(r);
724
- a.current = e, o.current = t, s.current = r;
725
- let [f, p] = d("waiting"), [m, h] = d(null), [g, _] = d(""), v = u(0);
726
- return c(() => {
722
+ ]), i = c(() => e.length === 0 ? "" : e.map((e) => e.id).sort().join(",") + "|" + t.map((e) => e.id).sort().join(","), [e, t]), a = l(e), o = l(t), d = l(r);
723
+ a.current = e, o.current = t, d.current = r;
724
+ let [f, p] = u("waiting"), [m, h] = u(null), [g, _] = u(""), v = l(0);
725
+ return s(() => {
727
726
  if (!i) {
728
727
  p("ready"), h(null), _("");
729
728
  return;
730
729
  }
731
730
  let e = ++v.current;
732
- p("computing"), I(a.current, o.current, s.current).then((t) => {
731
+ p("computing"), I(a.current, o.current, d.current).then((t) => {
733
732
  e === v.current && (h(t), _(i), p("ready"));
734
733
  }).catch(() => {
735
734
  e === v.current && (h({
736
- nodes: L(a.current, s.current),
735
+ nodes: L(a.current, d.current),
737
736
  edges: o.current
738
737
  }), _(i), p("ready"));
739
738
  });
@@ -749,13 +748,10 @@ function re(e, t, n = {}) {
749
748
  }
750
749
  //#endregion
751
750
  //#region src/client/components/SchemaVisualization/index.tsx
752
- var R = /* @__PURE__ */ e({
753
- SchemaVisualization: () => B,
754
- default: () => B
755
- }), ie = { cubeNode: w }, ae = { relationshipEdge: T };
756
- function oe({ token: e }) {
757
- let { useNodesInitialized: t, useReactFlow: n } = _(), r = t(), { fitView: i } = n(), a = u(0);
758
- return c(() => {
751
+ var ne = { cubeNode: S }, re = { relationshipEdge: C };
752
+ function ie({ token: e }) {
753
+ let { useNodesInitialized: t, useReactFlow: n } = g(), r = t(), { fitView: i } = n(), a = l(0);
754
+ return s(() => {
759
755
  e === 0 || e === a.current || r && (a.current = e, i({ padding: .1 }));
760
756
  }, [
761
757
  e,
@@ -763,8 +759,8 @@ function oe({ token: e }) {
763
759
  i
764
760
  ]), null;
765
761
  }
766
- var z = [];
767
- function se(e) {
762
+ var ae = [];
763
+ function oe(e) {
768
764
  switch (e) {
769
765
  case "belongsTo": return "#10b981";
770
766
  case "hasOne": return "#3b82f6";
@@ -773,16 +769,16 @@ function se(e) {
773
769
  default: return "#6b7280";
774
770
  }
775
771
  }
776
- function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlightedFields: a, searchTerm: s, height: f = "100%" }) {
777
- let { ReactFlow: h, Controls: g, MiniMap: v, Background: y, applyNodeChanges: b } = _(), { meta: x, metaLoading: S, metaError: C } = n(), w = i || z, T = a || z, [E, D] = d(null), [O, k] = d(s || ""), [ee, ne] = d(0), [A, j] = d(null), [M, N] = d(null), P = u(null), F = !r, [I, L] = d({}), [R, B] = d(!1), ce = t("search"), le = t("close"), V = s === void 0 ? O : s;
778
- c(() => {
772
+ function R({ className: n = "", onFieldClick: r, highlightedCubes: i, highlightedFields: o, searchTerm: d, height: m = "100%" }) {
773
+ let { ReactFlow: h, Controls: _, MiniMap: v, Background: y, applyNodeChanges: b } = g(), { meta: x, metaLoading: S, metaError: C } = t(), w = i || ae, T = o || ae, [E, D] = u(null), [O, k] = u(d || ""), [A, j] = u(0), [M, N] = u(null), [P, F] = u(null), I = l(null), L = !r, [R, z] = u({}), [B, se] = u(!1), ce = e("search"), le = e("close"), V = d === void 0 ? O : d;
774
+ s(() => {
779
775
  try {
780
776
  let e = localStorage.getItem("drizzle-cube-erd-node-positions");
781
- e && L(JSON.parse(e));
777
+ e && z(JSON.parse(e));
782
778
  } catch {}
783
- B(!0);
779
+ se(!0);
784
780
  }, []);
785
- let { structuralNodes: H, structuralEdges: U } = l(() => {
781
+ let { structuralNodes: H, structuralEdges: U } = c(() => {
786
782
  if (!x) return {
787
783
  structuralNodes: [],
788
784
  structuralEdges: []
@@ -809,7 +805,7 @@ function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlighte
809
805
  },
810
806
  animated: !1,
811
807
  style: {
812
- stroke: se(n.relationship),
808
+ stroke: oe(n.relationship),
813
809
  strokeWidth: 2
814
810
  }
815
811
  });
@@ -818,13 +814,13 @@ function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlighte
818
814
  structuralNodes: e,
819
815
  structuralEdges: t
820
816
  };
821
- }, [x]), W = ee > 0 || R && Object.keys(I).length === 0, { nodes: G, edges: K, phase: ue } = re(W ? H : [], W ? U : [], {
817
+ }, [x]), W = A > 0 || B && Object.keys(R).length === 0, { nodes: G, edges: K, phase: ue } = te(W ? H : [], W ? U : [], {
822
818
  direction: "LR",
823
819
  nodeWidth: 340,
824
820
  nodeSep: 150,
825
821
  rankSep: 350
826
- }), q = o((e, t) => {
827
- let n = P.current?.getBoundingClientRect();
822
+ }), q = a((e, t) => {
823
+ let n = I.current?.getBoundingClientRect();
828
824
  if (!n) return {
829
825
  x: e,
830
826
  y: t
@@ -834,67 +830,67 @@ function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlighte
834
830
  x: r,
835
831
  y: i
836
832
  };
837
- }, []), de = o((e, t, n, r) => {
838
- j((i) => i && i.cubeName === e && i.fieldName === t ? (N(null), null) : (r && N(q(r.x, r.y)), {
833
+ }, []), de = a((e, t, n, r) => {
834
+ N((i) => i && i.cubeName === e && i.fieldName === t ? (F(null), null) : (r && F(q(r.x, r.y)), {
839
835
  cubeName: e,
840
836
  fieldName: t,
841
837
  fieldType: n
842
838
  }));
843
- }, [q]), fe = o((e, t) => {
844
- j((n) => n && n.cubeName === e && n.fieldName === null ? (N(null), null) : (t && N(q(t.x, t.y)), {
839
+ }, [q]), fe = a((e, t) => {
840
+ N((n) => n && n.cubeName === e && n.fieldName === null ? (F(null), null) : (t && F(q(t.x, t.y)), {
845
841
  cubeName: e,
846
842
  fieldName: null,
847
843
  fieldType: "cube"
848
844
  }));
849
- }, [q]), pe = F ? de : r, me = F ? fe : void 0, J = o((e) => ({
845
+ }, [q]), pe = L ? de : r, me = L ? fe : void 0, J = a((e) => ({
850
846
  cube: e,
851
847
  onFieldClick: pe,
852
848
  onCubeClick: me,
853
849
  isHighlighted: w.includes(e.name),
854
850
  highlightedFields: T,
855
851
  searchTerm: V,
856
- selectedField: F ? A : null
852
+ selectedField: L ? M : null
857
853
  }), [
858
854
  pe,
859
855
  me,
860
856
  w,
861
857
  T,
862
858
  V,
863
- F,
864
- A
865
- ]), Y = !W || ue === "ready", X = l(() => !x || !Y || !R ? [] : W && G.length > 0 ? G.map((e) => ({
859
+ L,
860
+ M
861
+ ]), Y = !W || ue === "ready", X = c(() => !x || !Y || !B ? [] : W && G.length > 0 ? G.map((e) => ({
866
862
  ...e,
867
863
  data: J(e.data?.cube || x.cubes.find((t) => t.name === e.id))
868
864
  })) : H.map((e) => ({
869
865
  ...e,
870
- position: I[e.id] || e.position,
866
+ position: R[e.id] || e.position,
871
867
  data: J(e.data?.cube)
872
868
  })), [
873
869
  x,
874
870
  Y,
875
- R,
871
+ B,
876
872
  W,
877
873
  G,
878
874
  H,
879
- I,
875
+ R,
880
876
  J
881
- ]), he = l(() => !x || !Y ? [] : W && K.length > 0 ? K : U, [
877
+ ]), he = c(() => !x || !Y ? [] : W && K.length > 0 ? K : U, [
882
878
  x,
883
879
  Y,
884
880
  W,
885
881
  K,
886
882
  U
887
- ]), [Z, Q] = d([]), [ge, _e] = d([]), $ = u(""), [ve, ye] = d(0);
888
- c(() => {
883
+ ]), [Z, Q] = u([]), [ge, _e] = u([]), $ = l(""), [ve, ye] = u(0);
884
+ s(() => {
889
885
  if (X.length === 0) return;
890
886
  let e = X.map((e) => `${e.id}:${Math.round(e.position.x)},${Math.round(e.position.y)}`).join("|");
891
887
  if (e === $.current) return;
892
888
  let t = $.current === "";
893
889
  $.current = e, Q(X), _e(he), t && ye((e) => e + 1);
894
890
  }, [X, he]);
895
- let be = u("");
896
- c(() => {
897
- let e = A ? `${A.cubeName}.${A.fieldName}` : "", t = `${w.join(",")}|${T.join(",")}|${V}|${String(r)}|${e}`;
891
+ let be = l("");
892
+ s(() => {
893
+ let e = M ? `${M.cubeName}.${M.fieldName}` : "", t = `${w.join(",")}|${T.join(",")}|${V}|${String(r)}|${e}`;
898
894
  t !== be.current && (be.current = t, !(Z.length === 0 || !x) && Q((e) => e.map((e) => {
899
895
  let t = x.cubes.find((t) => t.name === e.id);
900
896
  return t ? {
@@ -907,12 +903,12 @@ function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlighte
907
903
  T,
908
904
  V,
909
905
  r,
910
- A,
906
+ M,
911
907
  Z.length,
912
908
  x,
913
909
  J
914
910
  ]);
915
- let xe = o((e) => {
911
+ let xe = a((e) => {
916
912
  Q((t) => b(e, t)), e.filter((e) => e.type === "position" && "dragging" in e && e.dragging === !1).length > 0 && Q((e) => {
917
913
  let t = {};
918
914
  e.forEach((e) => {
@@ -921,95 +917,95 @@ function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlighte
921
917
  try {
922
918
  localStorage.setItem("drizzle-cube-erd-node-positions", JSON.stringify(t));
923
919
  } catch {}
924
- return L(t), e;
920
+ return z(t), e;
925
921
  });
926
- }, []), Se = o((e) => {}, []), Ce = o((e) => {
922
+ }, []), Se = a((e) => {}, []), Ce = a((e) => {
927
923
  e.preventDefault(), e.stopPropagation(), D({
928
924
  x: e.clientX,
929
925
  y: e.clientY
930
926
  });
931
- }, []), we = o(() => {
932
- E && D(null), A && (j(null), N(null));
933
- }, [E, A]), Te = o(() => {
934
- L({}), $.current = "";
927
+ }, []), we = a(() => {
928
+ E && D(null), M && (N(null), F(null));
929
+ }, [E, M]), Te = a(() => {
930
+ z({}), $.current = "";
935
931
  try {
936
932
  localStorage.removeItem("drizzle-cube-erd-node-positions");
937
933
  } catch {}
938
- ne((e) => e + 1), D(null);
934
+ j((e) => e + 1), D(null);
939
935
  }, []);
940
- return S ? /* @__PURE__ */ p("div", {
941
- className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${e}`,
942
- children: /* @__PURE__ */ m("div", {
936
+ return S ? /* @__PURE__ */ f("div", {
937
+ className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${n}`,
938
+ children: /* @__PURE__ */ p("div", {
943
939
  className: "dc:text-center",
944
- children: [/* @__PURE__ */ p("div", { className: "dc:animate-spin dc:rounded-full dc:h-8 dc:w-8 dc:border-b-2 border-dc-accent dc:mx-auto dc:mb-2" }), /* @__PURE__ */ p("p", {
940
+ children: [/* @__PURE__ */ f("div", { className: "dc:animate-spin dc:rounded-full dc:h-8 dc:w-8 dc:border-b-2 border-dc-accent dc:mx-auto dc:mb-2" }), /* @__PURE__ */ f("p", {
945
941
  className: "text-dc-text-muted",
946
942
  children: "Loading cube schema..."
947
943
  })]
948
944
  })
949
- }) : C ? /* @__PURE__ */ p("div", {
950
- className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${e}`,
951
- children: /* @__PURE__ */ m("div", {
945
+ }) : C ? /* @__PURE__ */ f("div", {
946
+ className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${n}`,
947
+ children: /* @__PURE__ */ p("div", {
952
948
  className: "dc:text-center text-dc-error",
953
- children: [/* @__PURE__ */ p("p", {
949
+ children: [/* @__PURE__ */ f("p", {
954
950
  className: "dc:font-medium",
955
951
  children: "Failed to load cube schema"
956
- }), /* @__PURE__ */ p("p", {
952
+ }), /* @__PURE__ */ f("p", {
957
953
  className: "dc:text-sm dc:mt-1",
958
954
  children: C
959
955
  })]
960
956
  })
961
- }) : !x || x.cubes.length === 0 ? /* @__PURE__ */ p("div", {
962
- className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${e}`,
963
- children: /* @__PURE__ */ m("div", {
957
+ }) : !x || x.cubes.length === 0 ? /* @__PURE__ */ f("div", {
958
+ className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${n}`,
959
+ children: /* @__PURE__ */ p("div", {
964
960
  className: "dc:text-center text-dc-text-muted",
965
- children: [/* @__PURE__ */ p("p", {
961
+ children: [/* @__PURE__ */ f("p", {
966
962
  className: "dc:font-medium",
967
963
  children: "No cubes found"
968
- }), /* @__PURE__ */ p("p", {
964
+ }), /* @__PURE__ */ f("p", {
969
965
  className: "dc:text-sm dc:mt-1",
970
966
  children: "Register some cubes to see the relationship diagram"
971
967
  })]
972
968
  })
973
- }) : Y ? /* @__PURE__ */ m("div", {
974
- className: `dc:flex dc:flex-col ${e}`,
969
+ }) : Y ? /* @__PURE__ */ p("div", {
970
+ className: `dc:flex dc:flex-col ${n}`,
975
971
  style: {
976
- height: f,
972
+ height: m,
977
973
  minHeight: 400
978
974
  },
979
975
  children: [
980
- s === void 0 && /* @__PURE__ */ m("div", {
976
+ d === void 0 && /* @__PURE__ */ p("div", {
981
977
  className: "dc:px-3 dc:py-2 dc:border-b border-dc-border bg-dc-surface dc:flex dc:items-center dc:gap-2 dc:flex-shrink-0",
982
978
  children: [
983
- /* @__PURE__ */ p(ce, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
984
- /* @__PURE__ */ p("input", {
979
+ /* @__PURE__ */ f(ce, { className: "dc:w-4 dc:h-4 text-dc-text-muted" }),
980
+ /* @__PURE__ */ f("input", {
985
981
  type: "text",
986
982
  value: O,
987
983
  onChange: (e) => k(e.target.value),
988
984
  placeholder: "Search cubes and fields...",
989
985
  className: "dc:flex-1 dc:text-sm dc:bg-transparent dc:outline-none text-dc-text dc:placeholder:text-dc-text-muted"
990
986
  }),
991
- O && /* @__PURE__ */ p("button", {
987
+ O && /* @__PURE__ */ f("button", {
992
988
  onClick: () => k(""),
993
989
  className: "text-dc-text-muted dc:hover:text-dc-text",
994
- children: /* @__PURE__ */ p(le, { className: "dc:w-3 dc:h-3" })
990
+ children: /* @__PURE__ */ f(le, { className: "dc:w-3 dc:h-3" })
995
991
  })
996
992
  ]
997
993
  }),
998
- /* @__PURE__ */ m("div", {
999
- ref: P,
994
+ /* @__PURE__ */ p("div", {
995
+ ref: I,
1000
996
  className: "dc:relative dc:flex-1 dc:min-h-0",
1001
- children: [/* @__PURE__ */ p("div", {
997
+ children: [/* @__PURE__ */ f("div", {
1002
998
  style: {
1003
999
  position: "absolute",
1004
1000
  inset: 0
1005
1001
  },
1006
- children: /* @__PURE__ */ m(h, {
1002
+ children: /* @__PURE__ */ p(h, {
1007
1003
  nodes: Z,
1008
1004
  edges: ge,
1009
1005
  onNodesChange: xe,
1010
1006
  onEdgesChange: Se,
1011
- nodeTypes: ie,
1012
- edgeTypes: ae,
1007
+ nodeTypes: ne,
1008
+ edgeTypes: re,
1013
1009
  connectionMode: "loose",
1014
1010
  minZoom: .1,
1015
1011
  maxZoom: 2,
@@ -1017,52 +1013,52 @@ function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlighte
1017
1013
  onPaneContextMenu: Ce,
1018
1014
  onPaneClick: we,
1019
1015
  children: [
1020
- /* @__PURE__ */ p(g, {}),
1021
- /* @__PURE__ */ p(v, {
1016
+ /* @__PURE__ */ f(_, {}),
1017
+ /* @__PURE__ */ f(v, {
1022
1018
  nodeColor: (e) => w.includes(e.id) ? "#8b5cf6" : "#e5e7eb",
1023
1019
  maskColor: "rgb(240, 242, 246, 0.7)"
1024
1020
  }),
1025
- /* @__PURE__ */ p(y, {
1021
+ /* @__PURE__ */ f(y, {
1026
1022
  variant: "dots",
1027
1023
  gap: 12,
1028
1024
  size: 1
1029
1025
  }),
1030
- /* @__PURE__ */ p(oe, { token: ve })
1026
+ /* @__PURE__ */ f(ie, { token: ve })
1031
1027
  ]
1032
1028
  })
1033
- }), F && A && M && x && /* @__PURE__ */ p("div", {
1029
+ }), L && M && P && x && /* @__PURE__ */ f("div", {
1034
1030
  className: "dc:absolute dc:z-20",
1035
1031
  style: {
1036
- left: M.x,
1037
- top: M.y
1032
+ left: P.x,
1033
+ top: P.y
1038
1034
  },
1039
- children: /* @__PURE__ */ p(te, {
1040
- selection: A,
1035
+ children: /* @__PURE__ */ f(ee, {
1036
+ selection: M,
1041
1037
  meta: x,
1042
1038
  onClose: () => {
1043
- j(null), N(null);
1039
+ N(null), F(null);
1044
1040
  }
1045
1041
  })
1046
1042
  })]
1047
1043
  }),
1048
- E && /* @__PURE__ */ p("div", {
1044
+ E && /* @__PURE__ */ f("div", {
1049
1045
  className: "dc:fixed dc:z-50 bg-dc-surface dc:rounded-md dc:shadow-lg dc:border border-dc-border dc:py-1 dc:min-w-[120px]",
1050
1046
  style: {
1051
1047
  left: E.x,
1052
1048
  top: E.y
1053
1049
  },
1054
- children: /* @__PURE__ */ p("button", {
1050
+ children: /* @__PURE__ */ f("button", {
1055
1051
  onClick: Te,
1056
1052
  className: "dc:w-full dc:px-3 dc:py-2 dc:text-sm text-dc-text-secondary dc:hover:bg-dc-surface-hover dc:text-left",
1057
1053
  children: "Auto Layout"
1058
1054
  })
1059
1055
  })
1060
1056
  ]
1061
- }) : /* @__PURE__ */ p("div", {
1062
- className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${e}`,
1063
- children: /* @__PURE__ */ m("div", {
1057
+ }) : /* @__PURE__ */ f("div", {
1058
+ className: `dc:flex dc:items-center dc:justify-center dc:h-96 ${n}`,
1059
+ children: /* @__PURE__ */ p("div", {
1064
1060
  className: "dc:text-center",
1065
- children: [/* @__PURE__ */ p("div", { className: "dc:animate-spin dc:rounded-full dc:h-8 dc:w-8 dc:border-b-2 border-dc-accent dc:mx-auto dc:mb-2" }), /* @__PURE__ */ p("p", {
1061
+ children: [/* @__PURE__ */ f("div", { className: "dc:animate-spin dc:rounded-full dc:h-8 dc:w-8 dc:border-b-2 border-dc-accent dc:mx-auto dc:mb-2" }), /* @__PURE__ */ f("p", {
1066
1062
  className: "text-dc-text-muted",
1067
1063
  children: "Computing layout..."
1068
1064
  })]
@@ -1070,6 +1066,6 @@ function B({ className: e = "", onFieldClick: r, highlightedCubes: i, highlighte
1070
1066
  });
1071
1067
  }
1072
1068
  //#endregion
1073
- export { C as n, v as r, R as t };
1069
+ export { x as n, R as t };
1074
1070
 
1075
- //# sourceMappingURL=schema-visualization-DVdfx6N8.js.map
1071
+ //# sourceMappingURL=schema-visualization-t1KiOORo.js.map