@gravity-ui/querieskit 1.3.0 → 1.3.2

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 (546) hide show
  1. package/build/cjs/components/AttachmentList/AttachmentList.d.ts +2 -2
  2. package/build/cjs/components/AttachmentList/AttachmentList.js +9 -1
  3. package/build/cjs/components/AttachmentList/AttachmentList.js.map +1 -1
  4. package/build/cjs/components/AttachmentList/AttachmentList.stories.d.ts +36 -20
  5. package/build/cjs/components/AttachmentList/AttachmentList.stories.js +3 -0
  6. package/build/cjs/components/AttachmentList/AttachmentList.stories.js.map +1 -1
  7. package/build/cjs/components/AttachmentList/helpers/isInteractiveTarget.d.ts +2 -0
  8. package/build/cjs/components/AttachmentList/helpers/isInteractiveTarget.js +11 -0
  9. package/build/cjs/components/AttachmentList/helpers/isInteractiveTarget.js.map +1 -0
  10. package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js +4 -4
  11. package/build/cjs/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js.map +1 -1
  12. package/build/cjs/modules/Attachments/Attachments.css +4 -0
  13. package/build/cjs/modules/Attachments/Attachments.css.map +1 -1
  14. package/build/cjs/modules/Attachments/Attachments.d.ts +2 -1
  15. package/build/cjs/modules/Attachments/Attachments.js +8 -1
  16. package/build/cjs/modules/Attachments/Attachments.js.map +1 -1
  17. package/build/cjs/modules/Attachments/Attachments.stories.d.ts +2 -1
  18. package/build/cjs/modules/Attachments/Attachments.stories.js +7 -3
  19. package/build/cjs/modules/Attachments/Attachments.stories.js.map +1 -1
  20. package/build/cjs/modules/HistoryLayout/HistoryLayout.d.ts +1 -1
  21. package/build/cjs/modules/HistoryLayout/HistoryLayout.js +1 -1
  22. package/build/cjs/modules/HistoryLayout/HistoryLayout.js.map +1 -1
  23. package/build/cjs/modules/RowsList/RowsList.css +4 -0
  24. package/build/cjs/modules/RowsList/RowsList.css.map +1 -1
  25. package/build/cjs/types/queryList.d.ts +1 -1
  26. package/build/cjs/types/queryList.js.map +1 -1
  27. package/build/cjs/widgets/QueriesHistory/QueriesHistory.js +1 -2
  28. package/build/cjs/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
  29. package/build/cjs/widgets/QueriesHistory/QueriesHistory.stories.d.ts +1 -0
  30. package/build/cjs/widgets/QueriesHistory/QueriesHistory.stories.js +82 -1
  31. package/build/cjs/widgets/QueriesHistory/QueriesHistory.stories.js.map +1 -1
  32. package/build/cjs/widgets/SavedQueries/SavedQueries.stories.js.map +1 -1
  33. package/build/esm/components/AttachmentList/AttachmentList.d.ts +2 -2
  34. package/build/esm/components/AttachmentList/AttachmentList.js +9 -1
  35. package/build/esm/components/AttachmentList/AttachmentList.js.map +1 -1
  36. package/build/esm/components/AttachmentList/AttachmentList.stories.d.ts +36 -20
  37. package/build/esm/components/AttachmentList/AttachmentList.stories.js +3 -0
  38. package/build/esm/components/AttachmentList/AttachmentList.stories.js.map +1 -1
  39. package/build/esm/components/AttachmentList/helpers/isInteractiveTarget.d.ts +2 -0
  40. package/build/esm/components/AttachmentList/helpers/isInteractiveTarget.js +5 -0
  41. package/build/esm/components/AttachmentList/helpers/isInteractiveTarget.js.map +1 -0
  42. package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js +4 -4
  43. package/build/esm/components/AttachmentListPlaceholder/AttachmentListPlaceholder.js.map +1 -1
  44. package/build/esm/modules/Attachments/Attachments.css +4 -0
  45. package/build/esm/modules/Attachments/Attachments.css.map +1 -1
  46. package/build/esm/modules/Attachments/Attachments.d.ts +2 -1
  47. package/build/esm/modules/Attachments/Attachments.js +8 -1
  48. package/build/esm/modules/Attachments/Attachments.js.map +1 -1
  49. package/build/esm/modules/Attachments/Attachments.scss +5 -0
  50. package/build/esm/modules/Attachments/Attachments.stories.d.ts +2 -1
  51. package/build/esm/modules/Attachments/Attachments.stories.js +7 -3
  52. package/build/esm/modules/Attachments/Attachments.stories.js.map +1 -1
  53. package/build/esm/modules/HistoryLayout/HistoryLayout.d.ts +1 -1
  54. package/build/esm/modules/HistoryLayout/HistoryLayout.js +1 -1
  55. package/build/esm/modules/HistoryLayout/HistoryLayout.js.map +1 -1
  56. package/build/esm/modules/RowsList/RowsList.css +4 -0
  57. package/build/esm/modules/RowsList/RowsList.css.map +1 -1
  58. package/build/esm/modules/RowsList/RowsList.scss +3 -0
  59. package/build/esm/types/queryList.d.ts +1 -1
  60. package/build/esm/types/queryList.js.map +1 -1
  61. package/build/esm/widgets/QueriesHistory/QueriesHistory.js +1 -2
  62. package/build/esm/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
  63. package/build/esm/widgets/QueriesHistory/QueriesHistory.stories.d.ts +1 -0
  64. package/build/esm/widgets/QueriesHistory/QueriesHistory.stories.js +81 -0
  65. package/build/esm/widgets/QueriesHistory/QueriesHistory.stories.js.map +1 -1
  66. package/build/esm/widgets/SavedQueries/SavedQueries.stories.js.map +1 -1
  67. package/package.json +29 -2
  68. package/.agents/skills/code-review-checklist/SKILL.md +0 -94
  69. package/.agents/skills/github-pr-review/SKILL.md +0 -24
  70. package/.agents/skills/gravity-ui/SKILL.md +0 -175
  71. package/.agents/skills/gravity-ui/references/icons.md +0 -60
  72. package/.agents/skills/gravity-ui/references/layout.md +0 -366
  73. package/.agents/skills/gravity-ui/references/package-routing.md +0 -424
  74. package/.agents/skills/gravity-ui/references/theming.md +0 -309
  75. package/.agents/skills/gravity-ui/rules/hallucination-traps.md +0 -361
  76. package/.agents/skills/gravity-ui/scripts/icon-image-search.sh +0 -63
  77. package/.eslintignore +0 -3
  78. package/.github/workflows/ci.yml +0 -25
  79. package/.github/workflows/main-preview.yml +0 -31
  80. package/.github/workflows/pr-preview-build.yml +0 -13
  81. package/.github/workflows/pr-preview-deploy.yml +0 -22
  82. package/.github/workflows/pr-title.yml +0 -27
  83. package/.github/workflows/release.yml +0 -20
  84. package/.nvmrc +0 -1
  85. package/.prettierrc.js +0 -1
  86. package/.storybook/main.ts +0 -31
  87. package/.storybook/preview.tsx +0 -43
  88. package/.storybook/redefinition.css +0 -3
  89. package/.storybook/tsconfig.json +0 -9
  90. package/.stylelintrc +0 -9
  91. package/AGENTS.md +0 -129
  92. package/CHANGELOG.md +0 -103
  93. package/CODEOWNERS +0 -2
  94. package/CONTRIBUTING.md +0 -31
  95. package/NOTICES.md +0 -8
  96. package/app-builder.config.ts +0 -9
  97. package/commitlint.config.cjs +0 -6
  98. package/eslint.config.mjs +0 -53
  99. package/plans/i18n-rules.md +0 -116
  100. package/plans/navigation-architecture.md +0 -262
  101. package/plans/queries-history-structure.md +0 -143
  102. package/plans/queries-navigation-architecture-review.md +0 -217
  103. package/plans/styles-rules.md +0 -137
  104. package/skills-lock.json +0 -11
  105. package/src/components/AddChartButton/AddChartButton.scss +0 -12
  106. package/src/components/AddChartButton/AddChartButton.stories.tsx +0 -34
  107. package/src/components/AddChartButton/AddChartButton.tsx +0 -139
  108. package/src/components/AddChartButton/index.ts +0 -6
  109. package/src/components/AttachmentList/AttachmentList.scss +0 -25
  110. package/src/components/AttachmentList/AttachmentList.stories.tsx +0 -243
  111. package/src/components/AttachmentList/AttachmentList.tsx +0 -67
  112. package/src/components/AttachmentList/helpers/getIconByAttachmentName.ts +0 -36
  113. package/src/components/AttachmentList/helpers/objectLinkValidator.ts +0 -40
  114. package/src/components/AttachmentList/helpers/stringRequiredValidator.ts +0 -24
  115. package/src/components/AttachmentList/hooks/useKeyDownFormControl.ts +0 -22
  116. package/src/components/AttachmentList/hooks/useLabelRef.ts +0 -25
  117. package/src/components/AttachmentList/i18n/dicts.ts +0 -4
  118. package/src/components/AttachmentList/i18n/en.json +0 -10
  119. package/src/components/AttachmentList/i18n/index.ts +0 -5
  120. package/src/components/AttachmentList/i18n/ru.json +0 -10
  121. package/src/components/AttachmentList/index.ts +0 -4
  122. package/src/components/AttachmentList/internal/AttachmentItem/AttachmentItem.scss +0 -23
  123. package/src/components/AttachmentList/internal/AttachmentItem/AttachmentItem.tsx +0 -75
  124. package/src/components/AttachmentList/internal/AttachmentItem/index.ts +0 -2
  125. package/src/components/AttachmentList/internal/EditAttachmentItem/EditAttachmentItem.tsx +0 -21
  126. package/src/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.scss +0 -21
  127. package/src/components/AttachmentList/internal/EditAttachmentItem/EditLinkItem.tsx +0 -194
  128. package/src/components/AttachmentList/internal/EditAttachmentItem/FileEdit.tsx +0 -92
  129. package/src/components/AttachmentList/internal/EditAttachmentItem/index.ts +0 -4
  130. package/src/components/AttachmentListPlaceholder/AttachmentListPlaceholder.scss +0 -5
  131. package/src/components/AttachmentListPlaceholder/AttachmentListPlaceholder.stories.tsx +0 -30
  132. package/src/components/AttachmentListPlaceholder/AttachmentListPlaceholder.tsx +0 -72
  133. package/src/components/AttachmentListPlaceholder/assets/empty-attachments.svg +0 -14
  134. package/src/components/AttachmentListPlaceholder/i18n/dicts.ts +0 -4
  135. package/src/components/AttachmentListPlaceholder/i18n/en.json +0 -7
  136. package/src/components/AttachmentListPlaceholder/i18n/index.ts +0 -5
  137. package/src/components/AttachmentListPlaceholder/i18n/ru.json +0 -7
  138. package/src/components/AttachmentListPlaceholder/index.ts +0 -2
  139. package/src/components/Breadcrumbs/Breadcrumbs.scss +0 -25
  140. package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -114
  141. package/src/components/Breadcrumbs/helpers/parsePathSegments.ts +0 -16
  142. package/src/components/Breadcrumbs/i18n/dicts.ts +0 -4
  143. package/src/components/Breadcrumbs/i18n/en.json +0 -4
  144. package/src/components/Breadcrumbs/i18n/index.ts +0 -5
  145. package/src/components/Breadcrumbs/i18n/ru.json +0 -4
  146. package/src/components/Breadcrumbs/index.ts +0 -2
  147. package/src/components/Chart/Chart.scss +0 -40
  148. package/src/components/Chart/Chart.stories.tsx +0 -75
  149. package/src/components/Chart/Chart.tsx +0 -120
  150. package/src/components/Chart/i18n/dicts.ts +0 -4
  151. package/src/components/Chart/i18n/en.json +0 -6
  152. package/src/components/Chart/i18n/index.ts +0 -5
  153. package/src/components/Chart/i18n/ru.json +0 -6
  154. package/src/components/Chart/index.ts +0 -2
  155. package/src/components/ChartEditorForm/ChartEditorForm.scss +0 -20
  156. package/src/components/ChartEditorForm/ChartEditorForm.stories.tsx +0 -88
  157. package/src/components/ChartEditorForm/ChartEditorForm.tsx +0 -120
  158. package/src/components/ChartEditorForm/helpers/resolveLabels.ts +0 -17
  159. package/src/components/ChartEditorForm/i18n/dicts.ts +0 -4
  160. package/src/components/ChartEditorForm/i18n/en.json +0 -12
  161. package/src/components/ChartEditorForm/i18n/index.ts +0 -5
  162. package/src/components/ChartEditorForm/i18n/ru.json +0 -12
  163. package/src/components/ChartEditorForm/index.ts +0 -7
  164. package/src/components/ChartEditorForm/internal/Field.tsx +0 -11
  165. package/src/components/ChartEditorForm/types.ts +0 -44
  166. package/src/components/ClusterRow/ClusterRow.tsx +0 -34
  167. package/src/components/ClusterRow/index.ts +0 -2
  168. package/src/components/Dashboard/Dashboard.scss +0 -4
  169. package/src/components/Dashboard/Dashboard.stories.scss +0 -18
  170. package/src/components/Dashboard/Dashboard.stories.tsx +0 -248
  171. package/src/components/Dashboard/Dashboard.tsx +0 -51
  172. package/src/components/Dashboard/helpers/createDefaultLayout.ts +0 -43
  173. package/src/components/Dashboard/hooks/useDashboardConfig.ts +0 -63
  174. package/src/components/Dashboard/index.ts +0 -2
  175. package/src/components/Dashboard/internal/DashPlate.scss +0 -23
  176. package/src/components/Dashboard/internal/DashPlate.tsx +0 -35
  177. package/src/components/Dashboard/internal/DashboardProvider.tsx +0 -37
  178. package/src/components/Dashboard/types.ts +0 -21
  179. package/src/components/DataTable/DataTable.scss +0 -27
  180. package/src/components/DataTable/DataTable.stories.tsx +0 -65
  181. package/src/components/DataTable/DataTable.tsx +0 -100
  182. package/src/components/DataTable/index.ts +0 -1
  183. package/src/components/EditableRowTitle/EditableRowTitle.tsx +0 -67
  184. package/src/components/EditableRowTitle/index.ts +0 -2
  185. package/src/components/EmptyContent/EmptyContent.scss +0 -3
  186. package/src/components/EmptyContent/EmptyContent.tsx +0 -57
  187. package/src/components/EmptyContent/i18n/dicts.ts +0 -4
  188. package/src/components/EmptyContent/i18n/en.json +0 -7
  189. package/src/components/EmptyContent/i18n/index.ts +0 -5
  190. package/src/components/EmptyContent/i18n/ru.json +0 -7
  191. package/src/components/EmptyContent/index.ts +0 -1
  192. package/src/components/ErrorTree/ErrorTree.stories.tsx +0 -94
  193. package/src/components/ErrorTree/ErrorTree.tsx +0 -30
  194. package/src/components/ErrorTree/helpers/formatAttributes.ts +0 -9
  195. package/src/components/ErrorTree/helpers/getIntermediateChain.ts +0 -21
  196. package/src/components/ErrorTree/i18n/dicts.ts +0 -4
  197. package/src/components/ErrorTree/i18n/en.json +0 -11
  198. package/src/components/ErrorTree/i18n/index.ts +0 -5
  199. package/src/components/ErrorTree/i18n/ru.json +0 -13
  200. package/src/components/ErrorTree/index.ts +0 -1
  201. package/src/components/ErrorTree/internal/ErrorTreeChildren.scss +0 -5
  202. package/src/components/ErrorTree/internal/ErrorTreeChildren.tsx +0 -25
  203. package/src/components/ErrorTree/internal/ErrorTreeNode.scss +0 -95
  204. package/src/components/ErrorTree/internal/ErrorTreeNode.tsx +0 -178
  205. package/src/components/ErrorTree/internal/IntermediateMessages.scss +0 -13
  206. package/src/components/ErrorTree/internal/IntermediateMessages.tsx +0 -127
  207. package/src/components/FieldsSearchToolbar/FieldsSearchToolbar.tsx +0 -48
  208. package/src/components/FieldsSearchToolbar/index.ts +0 -2
  209. package/src/components/FieldsSelector/FieldsSelector.scss +0 -18
  210. package/src/components/FieldsSelector/FieldsSelector.stories.tsx +0 -48
  211. package/src/components/FieldsSelector/FieldsSelector.tsx +0 -92
  212. package/src/components/FieldsSelector/i18n/dicts.ts +0 -4
  213. package/src/components/FieldsSelector/i18n/en.json +0 -3
  214. package/src/components/FieldsSelector/i18n/index.ts +0 -5
  215. package/src/components/FieldsSelector/i18n/ru.json +0 -3
  216. package/src/components/FieldsSelector/index.ts +0 -2
  217. package/src/components/HistoryFilter/HistoryFilter.scss +0 -5
  218. package/src/components/HistoryFilter/HistoryFilter.stories.tsx +0 -69
  219. package/src/components/HistoryFilter/HistoryFilter.tsx +0 -64
  220. package/src/components/HistoryFilter/i18n/dicts.ts +0 -4
  221. package/src/components/HistoryFilter/i18n/en.json +0 -4
  222. package/src/components/HistoryFilter/i18n/index.ts +0 -5
  223. package/src/components/HistoryFilter/i18n/ru.json +0 -4
  224. package/src/components/HistoryFilter/index.ts +0 -1
  225. package/src/components/HistoryGroupHeader/HistoryGroupHeader.scss +0 -7
  226. package/src/components/HistoryGroupHeader/HistoryGroupHeader.tsx +0 -18
  227. package/src/components/HistoryGroupHeader/index.ts +0 -1
  228. package/src/components/HistoryPrivateIcon/HistoryPrivateIcon.scss +0 -7
  229. package/src/components/HistoryPrivateIcon/HistoryPrivateIcon.tsx +0 -22
  230. package/src/components/HistoryPrivateIcon/index.ts +0 -1
  231. package/src/components/Icons/LogoCPlusPlus.tsx +0 -34
  232. package/src/components/Icons/index.ts +0 -1
  233. package/src/components/LazyList/LazyList.scss +0 -13
  234. package/src/components/LazyList/LazyList.tsx +0 -97
  235. package/src/components/LazyList/index.ts +0 -2
  236. package/src/components/ListSpinner/ListSpinner.scss +0 -3
  237. package/src/components/ListSpinner/ListSpinner.tsx +0 -18
  238. package/src/components/ListSpinner/index.ts +0 -2
  239. package/src/components/MonacoEditor/MonacoEditor.tsx +0 -112
  240. package/src/components/MonacoEditor/MonacoEditorThemes.tsx +0 -73
  241. package/src/components/MonacoEditor/index.ts +0 -11
  242. package/src/components/MonacoEditor/monaco-yql-languages/_.contribution.ts +0 -193
  243. package/src/components/MonacoEditor/monaco-yql-languages/clickhouse/clickhouse.contribution.ts +0 -14
  244. package/src/components/MonacoEditor/monaco-yql-languages/clickhouse/clickhouse.keywords.ts +0 -146
  245. package/src/components/MonacoEditor/monaco-yql-languages/clickhouse/clickhouse.ts +0 -217
  246. package/src/components/MonacoEditor/monaco-yql-languages/constants.ts +0 -6
  247. package/src/components/MonacoEditor/monaco-yql-languages/fillers/monaco-editor-core.ts +0 -3
  248. package/src/components/MonacoEditor/monaco-yql-languages/index.ts +0 -1
  249. package/src/components/MonacoEditor/monaco-yql-languages/monaco.contribution.ts +0 -5
  250. package/src/components/MonacoEditor/monaco-yql-languages/s-expressions/s-expressions.contribution.ts +0 -14
  251. package/src/components/MonacoEditor/monaco-yql-languages/s-expressions/s-expressions.keywords.ts +0 -97
  252. package/src/components/MonacoEditor/monaco-yql-languages/s-expressions/s-expressions.ts +0 -170
  253. package/src/components/MonacoEditor/monaco-yql-languages/themes/themes.contribution.ts +0 -35
  254. package/src/components/MonacoEditor/monaco-yql-languages/yql/yql.contribution.ts +0 -14
  255. package/src/components/MonacoEditor/monaco-yql-languages/yql/yql.keywords.ts +0 -13
  256. package/src/components/MonacoEditor/monaco-yql-languages/yql/yql.ts +0 -178
  257. package/src/components/MonacoEditor/monaco-yql-languages/yql_ansi/yql_ansi.contribution.ts +0 -14
  258. package/src/components/MonacoEditor/monaco-yql-languages/yql_ansi/yql_ansi.keywords.ts +0 -45
  259. package/src/components/MonacoEditor/monaco-yql-languages/yql_ansi/yql_ansi.ts +0 -142
  260. package/src/components/NavigationActionButtons/NavigationActionButtons.tsx +0 -46
  261. package/src/components/NavigationActionButtons/index.ts +0 -2
  262. package/src/components/NavigationItemRow/NavigationItemRow.tsx +0 -28
  263. package/src/components/NavigationItemRow/index.ts +0 -2
  264. package/src/components/PathEditor/PathEditor.scss +0 -41
  265. package/src/components/PathEditor/PathEditor.stories.helpers.ts +0 -118
  266. package/src/components/PathEditor/PathEditor.stories.tsx +0 -57
  267. package/src/components/PathEditor/PathEditor.tsx +0 -380
  268. package/src/components/PathEditor/helpers/suggestions.ts +0 -40
  269. package/src/components/PathEditor/i18n/dicts.ts +0 -4
  270. package/src/components/PathEditor/i18n/en.json +0 -4
  271. package/src/components/PathEditor/i18n/index.ts +0 -5
  272. package/src/components/PathEditor/i18n/ru.json +0 -4
  273. package/src/components/PathEditor/index.ts +0 -2
  274. package/src/components/QueryDuration/QueryDuration.scss +0 -6
  275. package/src/components/QueryDuration/QueryDuration.stories.tsx +0 -40
  276. package/src/components/QueryDuration/QueryDuration.tsx +0 -21
  277. package/src/components/QueryDuration/index.ts +0 -1
  278. package/src/components/QueryDuration/useQueryDuration.ts +0 -34
  279. package/src/components/QueryResultsTable/QueryResultsTable.scss +0 -65
  280. package/src/components/QueryResultsTable/QueryResultsTable.tsx +0 -112
  281. package/src/components/QueryResultsTable/helpers/formatQueryResultType.ts +0 -76
  282. package/src/components/QueryResultsTable/helpers/formatQueryResultValue.ts +0 -38
  283. package/src/components/QueryResultsTable/i18n/dicts.ts +0 -4
  284. package/src/components/QueryResultsTable/i18n/en.json +0 -5
  285. package/src/components/QueryResultsTable/i18n/index.ts +0 -4
  286. package/src/components/QueryResultsTable/i18n/ru.json +0 -5
  287. package/src/components/QueryResultsTable/index.ts +0 -3
  288. package/src/components/QueryResultsTable/internal/QueryResultCell.tsx +0 -63
  289. package/src/components/QueryStatusIcon/QueryStatusIcon.scss +0 -17
  290. package/src/components/QueryStatusIcon/QueryStatusIcon.stories.tsx +0 -50
  291. package/src/components/QueryStatusIcon/QueryStatusIcon.tsx +0 -37
  292. package/src/components/QueryStatusIcon/index.ts +0 -1
  293. package/src/components/RowActionsMenu/RowActionsMenu.tsx +0 -47
  294. package/src/components/RowActionsMenu/index.ts +0 -2
  295. package/src/components/RowLink/RowLink.scss +0 -8
  296. package/src/components/RowLink/RowLink.tsx +0 -23
  297. package/src/components/RowLink/index.ts +0 -2
  298. package/src/components/SearchRowLayout/SearchRowLayout.scss +0 -18
  299. package/src/components/SearchRowLayout/SearchRowLayout.tsx +0 -45
  300. package/src/components/SearchRowLayout/helpers/fitQueryToVisibleLines.ts +0 -10
  301. package/src/components/SearchRowLayout/helpers/monacoConfig.ts +0 -25
  302. package/src/components/SearchRowLayout/index.ts +0 -2
  303. package/src/components/SearchWithButtons/SearchWithButtons.scss +0 -10
  304. package/src/components/SearchWithButtons/SearchWithButtons.stories.tsx +0 -107
  305. package/src/components/SearchWithButtons/SearchWithButtons.tsx +0 -56
  306. package/src/components/SearchWithButtons/index.ts +0 -2
  307. package/src/components/SimpleForm/CheckboxGroupField.tsx +0 -53
  308. package/src/components/SimpleForm/RangeDatePickerField.tsx +0 -50
  309. package/src/components/SimpleForm/SelectField.tsx +0 -24
  310. package/src/components/SimpleForm/SimpleForm.stories.tsx +0 -115
  311. package/src/components/SimpleForm/SimpleForm.tsx +0 -65
  312. package/src/components/SimpleForm/SwitchField.tsx +0 -23
  313. package/src/components/SimpleForm/helpers/controlsRegistry.ts +0 -24
  314. package/src/components/SimpleForm/helpers/getInitialValues.ts +0 -10
  315. package/src/components/SimpleForm/helpers/index.ts +0 -2
  316. package/src/components/SimpleForm/index.ts +0 -7
  317. package/src/components/SkeletonRows/SkeletonRows.tsx +0 -24
  318. package/src/components/SkeletonRows/index.ts +0 -2
  319. package/src/components/index.ts +0 -71
  320. package/src/constants/query.ts +0 -10
  321. package/src/constants/row.ts +0 -2
  322. package/src/helpers/buildColumnsFromKeys.ts +0 -17
  323. package/src/helpers/createUuid.ts +0 -3
  324. package/src/helpers/getDefaultNavigationIcon.ts +0 -33
  325. package/src/helpers/getListKey.ts +0 -12
  326. package/src/helpers/getParentPath.ts +0 -10
  327. package/src/helpers/isEmptyValue.ts +0 -2
  328. package/src/helpers/isFieldVisible.ts +0 -20
  329. package/src/helpers/isObjectEqual.ts +0 -15
  330. package/src/helpers/time.ts +0 -29
  331. package/src/helpers/useDebouncedValue.ts +0 -14
  332. package/src/helpers/useLoadMoreSentinel.ts +0 -31
  333. package/src/helpers/useToggle.ts +0 -11
  334. package/src/helpers/useVisibleColumns.ts +0 -26
  335. package/src/i18n/index.ts +0 -26
  336. package/src/index.ts +0 -12
  337. package/src/modules/Attachments/Attachments.scss +0 -10
  338. package/src/modules/Attachments/Attachments.stories.tsx +0 -112
  339. package/src/modules/Attachments/Attachments.tsx +0 -336
  340. package/src/modules/Attachments/i18n/dicts.ts +0 -4
  341. package/src/modules/Attachments/i18n/en.json +0 -5
  342. package/src/modules/Attachments/i18n/index.ts +0 -5
  343. package/src/modules/Attachments/i18n/ru.json +0 -5
  344. package/src/modules/Attachments/index.ts +0 -2
  345. package/src/modules/ChartEditor/ChartEditor.scss +0 -12
  346. package/src/modules/ChartEditor/ChartEditor.tsx +0 -116
  347. package/src/modules/ChartEditor/i18n/dicts.ts +0 -4
  348. package/src/modules/ChartEditor/i18n/en.json +0 -3
  349. package/src/modules/ChartEditor/i18n/index.ts +0 -5
  350. package/src/modules/ChartEditor/i18n/ru.json +0 -3
  351. package/src/modules/ChartEditor/index.ts +0 -2
  352. package/src/modules/ChartEditor/story/ChartEditor.stories.tsx +0 -186
  353. package/src/modules/ChartEditor/story/mockData.ts +0 -222
  354. package/src/modules/ChartEditor/types.ts +0 -18
  355. package/src/modules/ClustersList/ClustersList.scss +0 -11
  356. package/src/modules/ClustersList/ClustersList.tsx +0 -49
  357. package/src/modules/ClustersList/index.ts +0 -2
  358. package/src/modules/HistoryComparisonActions/HistoryComparisonActions.scss +0 -4
  359. package/src/modules/HistoryComparisonActions/HistoryComparisonActions.tsx +0 -42
  360. package/src/modules/HistoryComparisonActions/index.ts +0 -2
  361. package/src/modules/HistoryHeader/HistoryHeader.stories.tsx +0 -47
  362. package/src/modules/HistoryHeader/HistoryHeader.tsx +0 -58
  363. package/src/modules/HistoryHeader/index.ts +0 -1
  364. package/src/modules/HistoryHeader/internal/FullSearchToggleButton.tsx +0 -16
  365. package/src/modules/HistoryLayout/HistoryLayout.scss +0 -7
  366. package/src/modules/HistoryLayout/HistoryLayout.tsx +0 -43
  367. package/src/modules/HistoryLayout/index.ts +0 -2
  368. package/src/modules/HistoryRow/HistoryRow.scss +0 -32
  369. package/src/modules/HistoryRow/HistoryRow.stories.tsx +0 -91
  370. package/src/modules/HistoryRow/HistoryRow.tsx +0 -77
  371. package/src/modules/HistoryRow/index.ts +0 -1
  372. package/src/modules/HistorySearchRow/HistorySearchRow.scss +0 -13
  373. package/src/modules/HistorySearchRow/HistorySearchRow.stories.tsx +0 -52
  374. package/src/modules/HistorySearchRow/HistorySearchRow.tsx +0 -62
  375. package/src/modules/HistorySearchRow/helpers/resolveMonacoLanguage.ts +0 -19
  376. package/src/modules/HistorySearchRow/index.ts +0 -1
  377. package/src/modules/NavigationDetail/NavigationDetail.scss +0 -13
  378. package/src/modules/NavigationDetail/NavigationDetail.tsx +0 -121
  379. package/src/modules/NavigationDetail/helpers/getInitialTab.ts +0 -9
  380. package/src/modules/NavigationDetail/helpers/getVisibleTabs.ts +0 -5
  381. package/src/modules/NavigationDetail/index.ts +0 -2
  382. package/src/modules/NavigationDetail/internal/NavigationDetailTabs.tsx +0 -32
  383. package/src/modules/NavigationHeader/NavigationHeader.stories.tsx +0 -118
  384. package/src/modules/NavigationHeader/NavigationHeader.tsx +0 -33
  385. package/src/modules/NavigationHeader/index.ts +0 -2
  386. package/src/modules/NavigationItemsList/NavigationItemsList.scss +0 -65
  387. package/src/modules/NavigationItemsList/NavigationItemsList.tsx +0 -92
  388. package/src/modules/NavigationItemsList/index.ts +0 -2
  389. package/src/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.tsx +0 -45
  390. package/src/modules/NavigationItemsList/internal/NavigationItemsListHeader.scss +0 -6
  391. package/src/modules/NavigationItemsList/internal/NavigationItemsListHeader.tsx +0 -54
  392. package/src/modules/NavigationItemsList/internal/useParentRow.ts +0 -23
  393. package/src/modules/NavigationMeta/NavigationMeta.scss +0 -25
  394. package/src/modules/NavigationMeta/NavigationMeta.tsx +0 -81
  395. package/src/modules/NavigationMeta/helpers/buildMetaGroups.tsx +0 -27
  396. package/src/modules/NavigationMeta/i18n/dicts.ts +0 -4
  397. package/src/modules/NavigationMeta/i18n/en.json +0 -4
  398. package/src/modules/NavigationMeta/i18n/index.ts +0 -5
  399. package/src/modules/NavigationMeta/i18n/ru.json +0 -4
  400. package/src/modules/NavigationMeta/index.ts +0 -3
  401. package/src/modules/NavigationMeta/story/NavigationMeta.stories.tsx +0 -80
  402. package/src/modules/NavigationMeta/story/mockData.ts +0 -22
  403. package/src/modules/NavigationPreview/NavigationPreview.scss +0 -32
  404. package/src/modules/NavigationPreview/NavigationPreview.tsx +0 -155
  405. package/src/modules/NavigationPreview/helpers/buildPreviewColumns.tsx +0 -11
  406. package/src/modules/NavigationPreview/helpers/filterPreviewRows.ts +0 -29
  407. package/src/modules/NavigationPreview/i18n/dicts.ts +0 -4
  408. package/src/modules/NavigationPreview/i18n/en.json +0 -3
  409. package/src/modules/NavigationPreview/i18n/index.ts +0 -5
  410. package/src/modules/NavigationPreview/i18n/ru.json +0 -3
  411. package/src/modules/NavigationPreview/index.ts +0 -4
  412. package/src/modules/NavigationPreview/story/NavigationPreview.stories.tsx +0 -123
  413. package/src/modules/NavigationPreview/story/mockData.ts +0 -14
  414. package/src/modules/NavigationSchema/NavigationSchema.scss +0 -24
  415. package/src/modules/NavigationSchema/NavigationSchema.tsx +0 -118
  416. package/src/modules/NavigationSchema/helpers/buildSchemaColumns.tsx +0 -54
  417. package/src/modules/NavigationSchema/helpers/filterSchema.ts +0 -18
  418. package/src/modules/NavigationSchema/i18n/dicts.ts +0 -4
  419. package/src/modules/NavigationSchema/i18n/en.json +0 -9
  420. package/src/modules/NavigationSchema/i18n/index.ts +0 -5
  421. package/src/modules/NavigationSchema/i18n/ru.json +0 -9
  422. package/src/modules/NavigationSchema/index.ts +0 -4
  423. package/src/modules/NavigationSchema/story/NavigationSchema.stories.tsx +0 -112
  424. package/src/modules/NavigationSchema/story/mockData.ts +0 -9
  425. package/src/modules/NavigationView/NavigationView.scss +0 -44
  426. package/src/modules/NavigationView/NavigationView.tsx +0 -60
  427. package/src/modules/NavigationView/helpers/buildViewColumns.tsx +0 -11
  428. package/src/modules/NavigationView/i18n/dicts.ts +0 -4
  429. package/src/modules/NavigationView/i18n/en.json +0 -3
  430. package/src/modules/NavigationView/i18n/index.ts +0 -5
  431. package/src/modules/NavigationView/i18n/ru.json +0 -3
  432. package/src/modules/NavigationView/index.ts +0 -3
  433. package/src/modules/NavigationView/internal/NavigationViewSectionItem.tsx +0 -70
  434. package/src/modules/NavigationView/story/NavigationView.stories.tsx +0 -110
  435. package/src/modules/NavigationView/story/mockData.ts +0 -35
  436. package/src/modules/QueriesList/QueriesList.scss +0 -10
  437. package/src/modules/QueriesList/QueriesList.tsx +0 -98
  438. package/src/modules/QueriesList/index.ts +0 -2
  439. package/src/modules/QueryStatistics/QueryStatistics.scss +0 -3
  440. package/src/modules/QueryStatistics/QueryStatistics.tsx +0 -125
  441. package/src/modules/QueryStatistics/helpers.ts +0 -96
  442. package/src/modules/QueryStatistics/i18n/dicts.ts +0 -4
  443. package/src/modules/QueryStatistics/i18n/en.json +0 -16
  444. package/src/modules/QueryStatistics/i18n/index.ts +0 -4
  445. package/src/modules/QueryStatistics/i18n/ru.json +0 -16
  446. package/src/modules/QueryStatistics/index.ts +0 -13
  447. package/src/modules/QueryStatistics/internal/MetricCell.scss +0 -12
  448. package/src/modules/QueryStatistics/internal/MetricCell.tsx +0 -99
  449. package/src/modules/QueryStatistics/internal/QueryStatisticsTable.scss +0 -8
  450. package/src/modules/QueryStatistics/internal/QueryStatisticsTable.tsx +0 -135
  451. package/src/modules/QueryStatistics/internal/QueryStatisticsToolbar.scss +0 -1
  452. package/src/modules/QueryStatistics/internal/QueryStatisticsToolbar.tsx +0 -61
  453. package/src/modules/QueryStatistics/story/QueryStatistics.stories.tsx +0 -71
  454. package/src/modules/RowsList/RowsList.scss +0 -5
  455. package/src/modules/RowsList/RowsList.tsx +0 -96
  456. package/src/modules/RowsList/helpers/prepareRowData.ts +0 -61
  457. package/src/modules/RowsList/index.ts +0 -2
  458. package/src/modules/SavedQueryRow/SavedQueryRow.scss +0 -20
  459. package/src/modules/SavedQueryRow/SavedQueryRow.tsx +0 -60
  460. package/src/modules/SavedQueryRow/index.ts +0 -2
  461. package/src/modules/SavedQuerySearchRow/SavedQuerySearchRow.scss +0 -15
  462. package/src/modules/SavedQuerySearchRow/SavedQuerySearchRow.tsx +0 -58
  463. package/src/modules/SavedQuerySearchRow/index.ts +0 -2
  464. package/src/modules/TutorialRow/TutorialRow.scss +0 -9
  465. package/src/modules/TutorialRow/TutorialRow.stories.tsx +0 -43
  466. package/src/modules/TutorialRow/TutorialRow.tsx +0 -25
  467. package/src/modules/TutorialRow/index.ts +0 -2
  468. package/src/modules/TutorialSearchRow/TutorialSearchRow.scss +0 -5
  469. package/src/modules/TutorialSearchRow/TutorialSearchRow.stories.tsx +0 -44
  470. package/src/modules/TutorialSearchRow/TutorialSearchRow.tsx +0 -33
  471. package/src/modules/TutorialSearchRow/index.ts +0 -2
  472. package/src/modules/index.ts +0 -50
  473. package/src/types/declarations.d.ts +0 -25
  474. package/src/types/errorTree.ts +0 -30
  475. package/src/types/forms.ts +0 -33
  476. package/src/types/history.ts +0 -12
  477. package/src/types/navigation.ts +0 -209
  478. package/src/types/pathEditor.ts +0 -29
  479. package/src/types/queryList.ts +0 -92
  480. package/src/types/queryResults.ts +0 -48
  481. package/src/types/queryStatistics.ts +0 -67
  482. package/src/types/savedQueries.ts +0 -7
  483. package/src/types/tutorial.ts +0 -3
  484. package/src/widgets/DashboardCharts/DashboardCharts.scss +0 -25
  485. package/src/widgets/DashboardCharts/DashboardCharts.tsx +0 -214
  486. package/src/widgets/DashboardCharts/helpers/chartTypeIcons.ts +0 -33
  487. package/src/widgets/DashboardCharts/i18n/dicts.ts +0 -4
  488. package/src/widgets/DashboardCharts/i18n/en.json +0 -7
  489. package/src/widgets/DashboardCharts/i18n/index.ts +0 -5
  490. package/src/widgets/DashboardCharts/i18n/ru.json +0 -7
  491. package/src/widgets/DashboardCharts/index.ts +0 -2
  492. package/src/widgets/DashboardCharts/internal/EmptyDashboardPlaceholder.tsx +0 -26
  493. package/src/widgets/DashboardCharts/story/DashboardCharts.stories.scss +0 -6
  494. package/src/widgets/DashboardCharts/story/DashboardCharts.stories.tsx +0 -77
  495. package/src/widgets/DashboardCharts/story/mockData.ts +0 -419
  496. package/src/widgets/DashboardCharts/types.ts +0 -30
  497. package/src/widgets/QueriesHistory/QueriesHistory.scss +0 -3
  498. package/src/widgets/QueriesHistory/QueriesHistory.stories.tsx +0 -276
  499. package/src/widgets/QueriesHistory/QueriesHistory.tsx +0 -71
  500. package/src/widgets/QueriesHistory/i18n/dicts.ts +0 -4
  501. package/src/widgets/QueriesHistory/i18n/en.json +0 -3
  502. package/src/widgets/QueriesHistory/i18n/index.ts +0 -5
  503. package/src/widgets/QueriesHistory/i18n/ru.json +0 -3
  504. package/src/widgets/QueriesHistory/index.ts +0 -2
  505. package/src/widgets/QueriesHistory/internal/HistoryRowContent.tsx +0 -22
  506. package/src/widgets/QueriesNavigation/QueriesNavigation.scss +0 -9
  507. package/src/widgets/QueriesNavigation/QueriesNavigation.stories.tsx +0 -409
  508. package/src/widgets/QueriesNavigation/QueriesNavigation.tsx +0 -195
  509. package/src/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.tsx +0 -8
  510. package/src/widgets/QueriesNavigation/helpers/createNavigationDetailResolver.ts +0 -28
  511. package/src/widgets/QueriesNavigation/helpers/createTableDetailConfig.tsx +0 -127
  512. package/src/widgets/QueriesNavigation/i18n/dicts.ts +0 -4
  513. package/src/widgets/QueriesNavigation/i18n/en.json +0 -10
  514. package/src/widgets/QueriesNavigation/i18n/index.ts +0 -5
  515. package/src/widgets/QueriesNavigation/i18n/ru.json +0 -10
  516. package/src/widgets/QueriesNavigation/index.ts +0 -13
  517. package/src/widgets/QueryResults/QueryResults.scss +0 -25
  518. package/src/widgets/QueryResults/QueryResults.stories.tsx +0 -155
  519. package/src/widgets/QueryResults/QueryResults.tsx +0 -121
  520. package/src/widgets/QueryResults/i18n/dicts.ts +0 -4
  521. package/src/widgets/QueryResults/i18n/en.json +0 -10
  522. package/src/widgets/QueryResults/i18n/index.ts +0 -4
  523. package/src/widgets/QueryResults/i18n/ru.json +0 -12
  524. package/src/widgets/QueryResults/index.ts +0 -2
  525. package/src/widgets/QueryResults/internal/QueryResultsSchema.tsx +0 -41
  526. package/src/widgets/SavedQueries/SavedQueries.scss +0 -3
  527. package/src/widgets/SavedQueries/SavedQueries.stories.tsx +0 -192
  528. package/src/widgets/SavedQueries/SavedQueries.tsx +0 -77
  529. package/src/widgets/SavedQueries/SavedQueryRowContent.tsx +0 -26
  530. package/src/widgets/SavedQueries/i18n/dicts.ts +0 -4
  531. package/src/widgets/SavedQueries/i18n/en.json +0 -3
  532. package/src/widgets/SavedQueries/i18n/index.ts +0 -4
  533. package/src/widgets/SavedQueries/i18n/ru.json +0 -3
  534. package/src/widgets/SavedQueries/index.ts +0 -2
  535. package/src/widgets/TutorialsHistory/TutorialRowContent.tsx +0 -16
  536. package/src/widgets/TutorialsHistory/TutorialsHistory.scss +0 -3
  537. package/src/widgets/TutorialsHistory/TutorialsHistory.stories.tsx +0 -135
  538. package/src/widgets/TutorialsHistory/TutorialsHistory.tsx +0 -63
  539. package/src/widgets/TutorialsHistory/i18n/dicts.ts +0 -4
  540. package/src/widgets/TutorialsHistory/i18n/en.json +0 -3
  541. package/src/widgets/TutorialsHistory/i18n/index.ts +0 -5
  542. package/src/widgets/TutorialsHistory/i18n/ru.json +0 -3
  543. package/src/widgets/TutorialsHistory/index.ts +0 -2
  544. package/src/widgets/index.ts +0 -20
  545. package/tsconfig.json +0 -20
  546. package/tsconfig.publish.json +0 -11
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMemo","useState","Text","action","SavedQueries","jsx","_jsx","QUERY","BASE_ITEMS","id","title","savedAt","engine","author","query","height","filterFields","type","initialValue","items","fields","meta","component","tags","parameters","layout","SavedQueriesStory","_useState","_useState2","_slicedToArray","setItems","_useState3","value","fullSearch","_useState4","search","setSearch","_useState5","_useState6","visibleFields","setVisibleFields","_useState7","_useState8","comparedRowIds","setComparedRowIds","_useState9","_useState0","editingRowId","setEditingRowId","filteredItems","toLowerCase","filter","item","_item$query","includes","updateTitle","currentItems","map","currentItem","_objectSpread","undefined","style","width","children","hasClear","onUpdate","onApply","onReset","onChange","editing","rowId","onSubmit","onCancel","comparison","enabled","Boolean","length","selected","currentIds","concat","_toConsumableArray","slice","onCompare","getRowActions","text","onClick","theme","CustomAuthorStory","team","_useState1","_useState10","renderAuthor","color","EmptyStory","_useState11","_useState12","Default","render","CustomAuthor","Empty"],"sources":["SavedQueries.stories.tsx"],"sourcesContent":["import React, {useMemo, useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {Text} from '@gravity-ui/uikit';\nimport {action} from 'storybook/actions';\nimport {\n QueryListFieldKey,\n QueryListFilterConfig,\n QueryListItem,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport {SavedQuery} from '../../types/savedQueries';\nimport {SavedQueries} from './SavedQueries';\n\nconst QUERY = `SELECT\n session_id,\n COUNT(*) AS sessions_count\nFROM visits\nGROUP BY session_id;`;\n\nconst BASE_ITEMS: QueryListItem<SavedQuery>[] = [\n {\n id: 1,\n title: 'New Query',\n savedAt: '2026-04-29T12:00:00.000Z',\n engine: 'SQL',\n author: 'Anna Petrova',\n query: QUERY,\n height: 52,\n },\n {\n id: 2,\n title: 'Daily conversion report',\n savedAt: '2026-04-29T11:00:00.000Z',\n engine: 'YQL',\n author: 'Pavel Sidorov',\n query: QUERY,\n height: 52,\n },\n {\n id: 3,\n title: 'Product funnel',\n savedAt: '2026-04-28T09:00:00.000Z',\n engine: 'SQL',\n author: 'Maria Volkova',\n query: 'SELECT 1;',\n height: 52,\n },\n];\n\nconst filterFields: QueryListFilterConfig['fields'] = [\n {id: 'onlyMine', type: 'switch', title: 'My queries only', initialValue: true},\n {id: 'range', type: 'rangeDatePicker', title: 'Period'},\n {\n id: 'engine',\n type: 'checkboxGroup',\n title: 'Engine',\n initialValue: [],\n items: [\n {id: 'yql', title: 'YQL'},\n {id: 'sql', title: 'SQL'},\n ],\n },\n];\n\nconst fields: QueryListVisibleFieldsConfig<SavedQuery>['fields'] = [\n {id: 'savedAt', title: 'Saved date'},\n {id: 'engine', title: 'Engine'},\n {id: 'author', title: 'Author'},\n];\n\nconst meta: Meta<typeof SavedQueries> = {\n title: 'Widgets/SavedQueries',\n component: SavedQueries,\n tags: ['autodocs'],\n parameters: {layout: 'padded'},\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SavedQueries>;\n\nconst SavedQueriesStory = () => {\n const [items, setItems] = useState(BASE_ITEMS);\n const [search, setSearch] = useState({value: '', fullSearch: false});\n const [visibleFields, setVisibleFields] = useState<QueryListFieldKey<SavedQuery>[]>([\n 'savedAt',\n 'engine',\n 'author',\n ]);\n const [comparedRowIds, setComparedRowIds] = useState<number[]>([]);\n const [editingRowId, setEditingRowId] = useState<number>();\n\n const filteredItems = useMemo(() => {\n if (!search.value) return items;\n\n const value = search.value.toLowerCase();\n return items.filter((item) => {\n if ('header' in item) return false;\n\n return search.fullSearch\n ? item.title.toLowerCase().includes(value) ||\n item.query?.toLowerCase().includes(value)\n : item.title.toLowerCase().includes(value);\n });\n }, [items, search]);\n\n const updateTitle = (item: SavedQuery, title: string) => {\n setItems((currentItems) =>\n currentItems.map((currentItem) =>\n 'id' in currentItem && currentItem.id === item.id\n ? {...currentItem, title}\n : currentItem,\n ),\n );\n setEditingRowId(undefined);\n };\n\n return (\n <div style={{width: 360, height: 560}}>\n <SavedQueries\n items={filteredItems}\n search={{...search, hasClear: true, onUpdate: setSearch}}\n filter={{\n fields: filterFields,\n onApply: action('onFilterApply'),\n onReset: action('onFilterReset'),\n }}\n visibleFields={{value: visibleFields, fields, onChange: setVisibleFields}}\n editing={{\n rowId: editingRowId,\n onSubmit: updateTitle,\n onCancel: () => setEditingRowId(undefined),\n }}\n comparison={{\n enabled: Boolean(comparedRowIds.length),\n comparedRowIds,\n onChange: (item, selected) => {\n setComparedRowIds((currentIds) =>\n selected\n ? [...currentIds.filter((id) => id !== item.id).slice(-1), item.id]\n : currentIds.filter((id) => id !== item.id),\n );\n },\n onCancel: () => setComparedRowIds([]),\n onCompare: () => action('onCompare')(comparedRowIds),\n }}\n getRowActions={(item) => [\n {text: 'Copy to', onClick: () => action('onCopyTo')(item)},\n {text: 'Show operations', onClick: () => action('onShowOperations')(item)},\n {text: 'Edit', onClick: () => setEditingRowId(item.id)},\n {\n text: 'Compare with baseline',\n onClick: () => setComparedRowIds([item.id]),\n },\n {text: 'Delete', theme: 'danger', onClick: () => action('onDelete')(item)},\n ]}\n />\n </div>\n );\n};\n\ntype ExtendedSavedQuery = SavedQuery & {team: string};\n\nconst CustomAuthorStory = () => {\n const items: QueryListItem<ExtendedSavedQuery>[] = BASE_ITEMS.map((item) =>\n 'header' in item ? item : {...item, team: 'Analytics'},\n );\n const [search, setSearch] = useState({value: '', fullSearch: false});\n\n return (\n <div style={{width: 360, height: 280}}>\n <SavedQueries\n items={items}\n search={{...search, hasClear: true, onUpdate: setSearch}}\n renderAuthor={(item) => <Text color=\"complementary\">{item.team}</Text>}\n />\n </div>\n );\n};\n\nconst EmptyStory = () => {\n const [search, setSearch] = useState({value: '', fullSearch: false});\n\n return (\n <div style={{width: 360, height: 280}}>\n <SavedQueries items={[]} search={{...search, hasClear: true, onUpdate: setSearch}} />\n </div>\n );\n};\n\nexport const Default: Story = {render: () => <SavedQueriesStory />};\nexport const CustomAuthor: Story = {render: () => <CustomAuthorStory />};\nexport const Empty: Story = {render: () => <EmptyStory />};\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,QAAO,OAAO;AAE9C,SAAQC,IAAI,QAAO,mBAAmB;AACtC,SAAQC,MAAM,QAAO,mBAAmB;AAQxC,SAAQC,YAAY;AAAwB,SAAAC,GAAA,IAAAC,IAAA;AAE5C,IAAMC,KAAK,+FAIU;AAErB,IAAMC,UAAuC,GAAG,CAC5C;EACIC,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,WAAW;EAClBC,OAAO,EAAE,0BAA0B;EACnCC,MAAM,EAAE,KAAK;EACbC,MAAM,EAAE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ACoB,iBAAiB,IAAE,CAAC;EAAA;AAAA,CAAC;AACnE,OAAO,IAAMwE,YAAmB,GAAG;EAACD,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ3F,IAAA,CAACiF,iBAAiB,IAAE,CAAC;EAAA;AAAA,CAAC;AACxE,OAAO,IAAMY,KAAY,GAAG;EAACF,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ3F,IAAA,CAACuF,UAAU,IAAE,CAAC;EAAA;AAAA,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useMemo","useState","Text","action","SavedQueries","jsx","_jsx","QUERY","BASE_ITEMS","id","title","savedAt","engine","author","query","height","filterFields","type","initialValue","items","fields","meta","component","tags","parameters","layout","SavedQueriesStory","_useState","_useState2","_slicedToArray","setItems","_useState3","value","fullSearch","_useState4","search","setSearch","_useState5","_useState6","visibleFields","setVisibleFields","_useState7","_useState8","comparedRowIds","setComparedRowIds","_useState9","_useState0","editingRowId","setEditingRowId","filteredItems","toLowerCase","filter","item","_item$query","includes","updateTitle","currentItems","map","currentItem","_objectSpread","undefined","style","width","children","hasClear","onUpdate","onApply","onReset","onChange","editing","rowId","onSubmit","onCancel","comparison","enabled","Boolean","length","selected","currentIds","concat","_toConsumableArray","slice","onCompare","getRowActions","text","onClick","theme","CustomAuthorStory","team","_useState1","_useState10","renderAuthor","color","EmptyStory","_useState11","_useState12","Default","render","CustomAuthor","Empty"],"sources":["SavedQueries.stories.tsx"],"sourcesContent":["import React, {useMemo, useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {Text} from '@gravity-ui/uikit';\nimport {action} from 'storybook/actions';\nimport {\n QueryListFieldKey,\n QueryListFilterConfig,\n QueryListItem,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport {SavedQuery} from '../../types/savedQueries';\nimport {SavedQueries} from './SavedQueries';\n\nconst QUERY = `SELECT\n session_id,\n COUNT(*) AS sessions_count\nFROM visits\nGROUP BY session_id;`;\n\nconst BASE_ITEMS: QueryListItem<SavedQuery>[] = [\n {\n id: 1,\n title: 'New Query',\n savedAt: '2026-04-29T12:00:00.000Z',\n engine: 'SQL',\n author: 'Anna Petrova',\n query: QUERY,\n height: 52,\n },\n {\n id: 2,\n title: 'Daily conversion report',\n savedAt: '2026-04-29T11:00:00.000Z',\n engine: 'YQL',\n author: 'Pavel Sidorov',\n query: QUERY,\n height: 52,\n },\n {\n id: 3,\n title: 'Product funnel',\n savedAt: '2026-04-28T09:00:00.000Z',\n engine: 'SQL',\n author: 'Maria Volkova',\n query: 'SELECT 1;',\n height: 52,\n },\n];\n\nconst filterFields: QueryListFilterConfig['fields'] = [\n {id: 'onlyMine', type: 'switch', title: 'My queries only', initialValue: true},\n {id: 'range', type: 'rangeDatePicker', title: 'Period'},\n {\n id: 'engine',\n type: 'checkboxGroup',\n title: 'Engine',\n initialValue: [],\n items: [\n {id: 'yql', title: 'YQL'},\n {id: 'sql', title: 'SQL'},\n ],\n },\n];\n\nconst fields: QueryListVisibleFieldsConfig<SavedQuery>['fields'] = [\n {id: 'savedAt', title: 'Saved date'},\n {id: 'engine', title: 'Engine'},\n {id: 'author', title: 'Author'},\n];\n\nconst meta: Meta<typeof SavedQueries> = {\n title: 'Widgets/SavedQueries',\n component: SavedQueries,\n tags: ['autodocs'],\n parameters: {layout: 'padded'},\n};\n\nexport default meta;\ntype Story = StoryObj<typeof SavedQueries>;\n\nconst SavedQueriesStory = () => {\n const [items, setItems] = useState(BASE_ITEMS);\n const [search, setSearch] = useState({value: '', fullSearch: false});\n const [visibleFields, setVisibleFields] = useState<QueryListFieldKey<SavedQuery>[]>([\n 'savedAt',\n 'engine',\n 'author',\n ]);\n const [comparedRowIds, setComparedRowIds] = useState<(number | string)[]>([]);\n const [editingRowId, setEditingRowId] = useState<number | string>();\n\n const filteredItems = useMemo(() => {\n if (!search.value) return items;\n\n const value = search.value.toLowerCase();\n return items.filter((item) => {\n if ('header' in item) return false;\n\n return search.fullSearch\n ? item.title.toLowerCase().includes(value) ||\n item.query?.toLowerCase().includes(value)\n : item.title.toLowerCase().includes(value);\n });\n }, [items, search]);\n\n const updateTitle = (item: SavedQuery, title: string) => {\n setItems((currentItems) =>\n currentItems.map((currentItem) =>\n 'id' in currentItem && currentItem.id === item.id\n ? {...currentItem, title}\n : currentItem,\n ),\n );\n setEditingRowId(undefined);\n };\n\n return (\n <div style={{width: 360, height: 560}}>\n <SavedQueries\n items={filteredItems}\n search={{...search, hasClear: true, onUpdate: setSearch}}\n filter={{\n fields: filterFields,\n onApply: action('onFilterApply'),\n onReset: action('onFilterReset'),\n }}\n visibleFields={{value: visibleFields, fields, onChange: setVisibleFields}}\n editing={{\n rowId: editingRowId,\n onSubmit: updateTitle,\n onCancel: () => setEditingRowId(undefined),\n }}\n comparison={{\n enabled: Boolean(comparedRowIds.length),\n comparedRowIds,\n onChange: (item, selected) => {\n setComparedRowIds((currentIds) =>\n selected\n ? [...currentIds.filter((id) => id !== item.id).slice(-1), item.id]\n : currentIds.filter((id) => id !== item.id),\n );\n },\n onCancel: () => setComparedRowIds([]),\n onCompare: () => action('onCompare')(comparedRowIds),\n }}\n getRowActions={(item) => [\n {text: 'Copy to', onClick: () => action('onCopyTo')(item)},\n {text: 'Show operations', onClick: () => action('onShowOperations')(item)},\n {text: 'Edit', onClick: () => setEditingRowId(item.id)},\n {\n text: 'Compare with baseline',\n onClick: () => setComparedRowIds([item.id]),\n },\n {text: 'Delete', theme: 'danger', onClick: () => action('onDelete')(item)},\n ]}\n />\n </div>\n );\n};\n\ntype ExtendedSavedQuery = SavedQuery & {team: string};\n\nconst CustomAuthorStory = () => {\n const items: QueryListItem<ExtendedSavedQuery>[] = BASE_ITEMS.map((item) =>\n 'header' in item ? item : {...item, team: 'Analytics'},\n );\n const [search, setSearch] = useState({value: '', fullSearch: false});\n\n return (\n <div style={{width: 360, height: 280}}>\n <SavedQueries\n items={items}\n search={{...search, hasClear: true, onUpdate: setSearch}}\n renderAuthor={(item) => <Text color=\"complementary\">{item.team}</Text>}\n />\n </div>\n );\n};\n\nconst EmptyStory = () => {\n const [search, setSearch] = useState({value: '', fullSearch: false});\n\n return (\n <div style={{width: 360, height: 280}}>\n <SavedQueries items={[]} search={{...search, hasClear: true, onUpdate: setSearch}} />\n </div>\n );\n};\n\nexport const Default: Story = {render: () => <SavedQueriesStory />};\nexport const CustomAuthor: Story = {render: () => <CustomAuthorStory />};\nexport const Empty: Story = {render: () => <EmptyStory />};\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,QAAO,OAAO;AAE9C,SAAQC,IAAI,QAAO,mBAAmB;AACtC,SAAQC,MAAM,QAAO,mBAAmB;AAQxC,SAAQC,YAAY;AAAwB,SAAAC,GAAA,IAAAC,IAAA;AAE5C,IAAMC,KAAK,+FAIU;AAErB,IAAMC,UAAuC,GAAG,CAC5C;EACIC,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,WAAW;EAClBC,OAAO,EAAE,0BAA0B;EACnCC,MAAM,EAAE,KAAK;EACbC,MAAM,EAAE,cAAc;EACtBC,KAAK,EAAEP,KAAK;EACZQ,MAAM,EAAE;AACZ,CAAC,EACD;EACIN,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,yBAAyB;EAChCC,OAAO,EAAE,0BAA0B;EACnCC,MAAM,EAAE,KAAK;EACbC,MAAM,EAAE,eAAe;EACvBC,KAAK,EAAEP,KAAK;EACZQ,MAAM,EAAE;AACZ,CAAC,EACD;EACIN,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,gBAAgB;EACvBC,OAAO,EAAE,0BAA0B;EACnCC,MAAM,EAAE,KAAK;EACbC,MAAM,EAAE,eAAe;EACvBC,KAAK,EAAE,WAAW;EAClBC,MAAM,EAAE;AACZ,CAAC,CACJ;AAED,IAAMC,YAA6C,GAAG,CAClD;EAACP,EAAE,EAAE,UAAU;EAAEQ,IAAI,EAAE,QAAQ;EAAEP,KAAK,EAAE,iBAAi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,CAAC;AAED,IAAMK,UAAU,GAAG,SAAbA,UAAUA,CAAA,EAAS;EACrB,IAAAC,WAAA,GAA4B7F,QAAQ,CAAC;MAAC+B,KAAK,EAAE,EAAE;MAAEC,UAAU,EAAE;IAAK,CAAC,CAAC;IAAA8D,WAAA,GAAAlE,cAAA,CAAAiE,WAAA;IAA7D3D,MAAM,GAAA4D,WAAA;IAAE3D,SAAS,GAAA2D,WAAA;EAExB,oBACIzF,IAAA;IAAKuD,KAAK,EAAE;MAACC,KAAK,EAAE,GAAG;MAAE/C,MAAM,EAAE;IAAG,CAAE;IAAAgD,QAAA,eAClCzD,IAAA,CAACF,YAAY;MAACe,KAAK,EAAE,EAAG;MAACgB,MAAM,EAAAwB,aAAA,CAAAA,aAAA,KAAMxB,MAAM;QAAE6B,QAAQ,EAAE,IAAI;QAAEC,QAAQ,EAAE7B;MAAS;IAAE,CAAE;EAAC,CACpF,CAAC;AAEd,CAAC;AAED,OAAO,IAAM4D,OAAc,GAAG;EAACC,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ3F,IAAA,CAACoB,iBAAiB,IAAE,CAAC;EAAA;AAAA,CAAC;AACnE,OAAO,IAAMwE,YAAmB,GAAG;EAACD,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ3F,IAAA,CAACiF,iBAAiB,IAAE,CAAC;EAAA;AAAA,CAAC;AACxE,OAAO,IAAMY,KAAY,GAAG;EAACF,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ3F,IAAA,CAACuF,UAAU,IAAE,CAAC;EAAA;AAAA,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,8 +1,35 @@
1
1
  {
2
2
  "name": "@gravity-ui/querieskit",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Query page component library",
5
- "main": "build/index.js",
5
+ "main": "./build/cjs/index.js",
6
+ "module": "./build/esm/index.js",
7
+ "types": "./build/esm/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./build/esm/index.d.ts",
12
+ "default": "./build/esm/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./build/cjs/index.d.ts",
16
+ "default": "./build/cjs/index.js"
17
+ }
18
+ },
19
+ "./build/esm": {
20
+ "types": "./build/esm/index.d.ts",
21
+ "default": "./build/esm/index.js"
22
+ },
23
+ "./build/cjs": {
24
+ "types": "./build/cjs/index.d.ts",
25
+ "default": "./build/cjs/index.js"
26
+ },
27
+ "./build/*": "./build/*",
28
+ "./package.json": "./package.json"
29
+ },
30
+ "files": [
31
+ "build"
32
+ ],
6
33
  "scripts": {
7
34
  "build": "app-builder build",
8
35
  "lint": "eslint",
@@ -1,94 +0,0 @@
1
- ---
2
- name: code-review-checklist
3
- description: Review code changes from supplied diffs, local working-tree changes, or GitHub PRs, validating correctness, React state, edge cases, security, performance, and compatibility against full code context. Use for code review, diff review, logic checks, and bug hunting.
4
- ---
5
-
6
- # Code Review Checklist
7
-
8
- Review changes in two passes: find plausible risks, then validate each risk against the full code context. Report only confirmed, actionable findings.
9
-
10
- ## Boundaries
11
-
12
- - Code review is read-only unless the user separately asks for implementation.
13
- - Do not edit the reviewed code, create review-report files, or run commands that rewrite source files.
14
- - Do not publish PR comments, replies, or review decisions without an explicit request.
15
- - Return the review directly in the response, using the language of the user's request.
16
-
17
- ## Determine the Review Source
18
-
19
- Use the source named by the user. Do not ask them to reproduce a diff that is already available.
20
-
21
- - **Supplied diff or diff file:** treat it as the authoritative change set. When the repository is available, use it only to read the full files and related context.
22
- - **Local repository:** inspect status first. Unless the user narrows the scope, include staged changes, unstaged changes, and untracked files. If branch or committed changes are requested, compare the requested branch range as a separate layer.
23
- - **GitHub PR:** use the `github-pr-review` skill to obtain PR metadata, diff, and existing comments, then apply this skill as the analysis core. Preserve that skill's statuses when validating existing comments.
24
-
25
- An empty result from one diff layer does not prove there are no local changes; reconcile the review scope with repository status.
26
-
27
- ## Build Context Before Judging
28
-
29
- 1. Read the repository's `AGENTS.md` and any instructions that apply to the changed paths.
30
- 2. Build an internal change map in dependency order:
31
- types and helpers → components → modules → widgets → public exports and integration.
32
- 3. Read every changed source file in full when it is available, not only its diff hunks. If only the diff is available, state the resulting context limitation.
33
- 4. Follow relevant types, callers, callees, consumers, state owners, and public contracts when the finding depends on them.
34
- 5. Infer the intended behavior from code, tests, types, and the user's request. Call out a missing requirement as uncertainty, not as a confirmed bug.
35
-
36
- For this repository, apply conditional guidance without duplicating it here:
37
-
38
- - For SCSS or layout changes, read `plans/styles-rules.md`.
39
- - For localization changes, read `plans/i18n-rules.md`.
40
- - Check the `components → modules → widgets` dependency direction, mandatory unit and level barrel exports, and placement of consumer-facing public types described in `AGENTS.md`.
41
- - Treat documented legacy violations as anti-examples, not patterns to copy.
42
-
43
- ## Two-Pass Review
44
-
45
- ### Pass 1: Find Candidate Risks
46
-
47
- Look for code whose correctness depends on a non-obvious condition, including:
48
-
49
- - inverted, incomplete, unreachable, or off-by-one control flow;
50
- - invalid state transitions, direct mutation, stale closures, stale derived state, or incorrect React effect dependencies and cleanup;
51
- - nullish values, empty collections, Unicode, dates and time zones, size limits, and other realistic boundaries;
52
- - lost errors, incomplete failure paths, async races, interleaving, or cleanup leaks;
53
- - transformations that lose data or rely on an unvalidated shape or invariant;
54
- - broken request/response, component props, or public API contracts;
55
- - unsafe HTML or URLs, leaked secrets, or missing validation at trust boundaries;
56
- - unnecessary work in render or hot paths, retained listeners/resources, or avoidable large allocations;
57
- - breaking exports, incorrect abstraction-level imports, misplaced styles, or incomplete i18n changes.
58
-
59
- Do not turn formatting preferences, speculative possibilities, or generic best practices into findings without a concrete failure mode.
60
-
61
- ### Pass 2: Validate Every Candidate
62
-
63
- For each candidate:
64
-
65
- 1. Re-read the entire containing file and the relevant surrounding flow.
66
- 2. Verify the triggering input, state, or execution path is reachable.
67
- 3. Check whether types, callers, guards, framework behavior, or tests already preserve the invariant.
68
- 4. State the observable consequence and affected consumer.
69
- 5. Remove the candidate if the concern is disproved or remains purely speculative.
70
-
71
- Run relevant read-only checks when they materially increase confidence. Distinguish confirmed defects from test or verification gaps.
72
-
73
- ## Severity
74
-
75
- - **High:** security exposure, data loss, crash in a primary flow, or an unintended breaking public API change.
76
- - **Medium:** incorrect behavior in a realistic supported scenario, including significant state, error-handling, or integration failures.
77
- - **Low:** a limited edge-case defect or concrete maintainability problem likely to cause incorrect behavior later.
78
-
79
- Do not report style-only nits. Order findings from highest to lowest severity.
80
-
81
- ## Response Format
82
-
83
- Lead with confirmed findings. For each finding include:
84
-
85
- - **Location:** `path/to/file:line`
86
- - **Severity:** `High`, `Medium`, or `Low`
87
- - **Finding:** concise description of the defect
88
- - **Condition:** input or execution path that triggers it
89
- - **Impact:** observable consequence
90
- - **Recommendation:** specific fix or mitigation
91
-
92
- For existing PR comments, also include **Status** using the vocabulary required by `github-pr-review`.
93
-
94
- After findings, mention only material test or verification gaps. If there are no confirmed findings, say so explicitly and do not invent issues to fill the response.
@@ -1,24 +0,0 @@
1
- ---
2
- name: github-pr-review
3
- description: Reviews GitHub Pull Requests, analyzes diffs, and validates existing review comments for relevance. Use when the user provides a GitHub PR URL, asks to review a PR, поревьювить PR, проверить PR, or check whether existing review comments are still relevant.
4
- ---
5
-
6
- # GitHub PR Review & Validation Rule
7
-
8
- ## Работа со ссылкой на PR
9
- Когда предоставлена ссылка на GitHub PR:
10
- 1. **Анализ изменений**: Изучи diff и файлы, затронутые в PR.
11
- 2. **Применение чек-листа**: Используй критерии из skill `code-review-checklist` (Logical Bugs, Edge Cases, Security, Performance) для анализа входящего кода. Сначала прочитай `.agents/skills/code-review-checklist/SKILL.md`.
12
-
13
- ## Проверка существующих замечаний (Comments Validation)
14
- Если в PR уже есть комментарии/замечания от других ревьюеров:
15
- 1. **Релевантность**: Проверь, актуально ли ещё замечание. Если код уже исправлен в последних коммитах — отметь это.
16
- 2. **Объективность**: Сверь замечание с текущим чек-листом. Если замечание противоречит стандартам проекта или чек-листу, укажи на это.
17
-
18
- ## Формат ответа
19
- Для каждого замечания (нового или существующего из PR) используй формат:
20
- - **Локация**: [Файл : Строка]
21
- - **Статус**: (Новое / Подтверждено / Исправлено / Неактуально)
22
- - **Критичность**: (High / Medium / Low)
23
- - **Суть**: Краткое описание проблемы согласно чек-листу.
24
- - **Рекомендация**: Конкретный пример исправленного кода.
@@ -1,175 +0,0 @@
1
- ---
2
- name: gravity-ui
3
- description: Builds, fixes, styles, and composes UI with the Gravity UI design system — the React ecosystem of @gravity-ui/* packages (uikit, charts, table, navigation, date-components, icons, and more). Routes to the correct package when look-alikes exist, applies theming and required setup, and prevents invented component APIs. Applies when working with @gravity-ui imports, uikit, ThemeProvider, --g- CSS tokens, or any prompt (EN or RU) mentioning gravity-ui, гравити, дизайн-система, компоненты, дашборд, таблица, график, or форма.
4
- ---
5
-
6
- # Building UI with Gravity UI
7
-
8
- Build UI on **real** Gravity UI components, not from memory. Gravity UI is a
9
- multi-package React design system (`@gravity-ui/*`), so the two things that go
10
- wrong are picking the wrong package and using an API from the wrong version.
11
- This skill routes you to the right package, grounds you in the installed
12
- version, and stops you from inventing APIs — match the installed versions and
13
- follow the ecosystem catalog instead of guessing.
14
-
15
- ## Step 0 — pick the right package first (ecosystem routing)
16
-
17
- Before doing anything else, work out which `@gravity-ui/*` library the task
18
- needs. Do not guess from training data — the ecosystem has look-alike packages
19
- (`charts` vs `chartkit`, uikit `Table` vs `@gravity-ui/table`, `date-components`
20
- vs `date-utils`, …) and picking the wrong one is the #1 failure.
21
-
22
- Open [`references/package-routing.md`](references/package-routing.md) and read
23
- its top: it is the ecosystem catalog, with the live-vs-offline source order,
24
- the "painful pairs" disambiguation, and a one-line "what it's for / what to use
25
- instead" per package. Use it to choose the package, then come back here for
26
- Step 1.
27
-
28
- Only after the package is chosen, run Step 1 to ground in that package's
29
- installed version and API.
30
-
31
- ## Step 1 — ground in the installed version of the chosen package
32
-
33
- 1. **Read `package.json`.** Note each installed `@gravity-ui/*` package and its
34
- version. The installed version is the source of truth, not your memory.
35
- Resolve ranges from `node_modules` (`<pkg>/package.json` `version` field), not
36
- the range string in the root `package.json`.
37
-
38
- 2. **Fetch the docs for the package you are about to use, in this order,
39
- stopping at the first source that answers your question:**
40
-
41
- (a) **LOCAL** — start with `node_modules/@gravity-ui/<pkg>/dist/docs/INDEX.md` or `node_modules/@gravity-ui/<pkg>/build/docs/INDEX.md`.
42
- If `INDEX.md` is absent for this package, fall back to the package's root `node_modules/@gravity-ui/<pkg>/README.md`.
43
- This is the *exact* installed version — always preferred for version-sensitive questions.
44
- (b) **ONLINE** — per-package llms.txt at the **major line**:
45
- `https://gravity-ui.com/llms/<pkg>/<major>/llms.txt`
46
- (e.g. `/llms/uikit/7/llms.txt` for `^7.2.1`). The major-line URL serves the
47
- latest minor of that major — it tracks the major but not the exact patch.
48
- Use it when LOCAL has no docs for the package.
49
-
50
- 3. **Fallback rule — never silently proceed on a failed or empty source:**
51
-
52
- - If LOCAL has no README / `dist/docs` / `build/docs` for the package, or they are empty
53
- → fetch the ONLINE major-line llms.txt (b).
54
- - If the ONLINE request fails — network timeout, DNS, connection refused
55
- (air-gapped / corporate proxy), HTTP 404 (major not hosted), or an empty /
56
- non-markdown body → fall back to LOCAL README + dist/docs or build/docs (a).
57
- - **Do NOT use the `/llms/<pkg>/llms.txt` "latest" alias** as a fallback — it
58
- serves the newest major, which may differ from the installed one and have a
59
- different API. The major-line URL is the versioned fallback; below it, go
60
- LOCAL, not "latest".
61
- - If BOTH are unreachable for a package → STOP and tell the user the
62
- package's docs are unreachable. Do not guess its API from training data.
63
-
64
- ## Step 2 — implement on the chosen packages, then typecheck
65
-
66
- 1. **Implement using only the `@gravity-ui/*` packages chosen in Step 0 and
67
- confirmed installed in Step 1.** Import from those packages exactly — do
68
- not substitute look-alike libraries (MUI, Ant, plain `<input>`) and do not
69
- reach for a `@gravity-ui/*` package that Step 1 did not confirm installed.
70
- Follow the prop APIs from the docs you just read, not memory; if a prop
71
- you want is not documented, it does not exist — use the documented one, or
72
- ask the user.
73
-
74
- 2. **Apply the cross-cutting rules** in `rules/hallucination-traps.md` while
75
- writing: typography variants, the flex contract, theming/ladders,
76
- `Button view`, `Icon data`. Per-component traps live in the package's own
77
- `dist/docs`.
78
-
79
- 3. **Typecheck before declaring done.** Run the project's typecheck command
80
- (typically `tsc --noEmit`; for monorepos, the workspace's typecheck script).
81
- Fix every error before reporting completion — a type error almost always
82
- means a wrong/invented prop, a wrong import path, or a version mismatch,
83
- which is precisely what Steps 0–1 were meant to prevent.
84
-
85
- - If the typecheck surfaces a prop/path that contradicts the docs you read
86
- in Step 1, trust the **installed version** (the typechecker), not the
87
- docs snapshot — the docs may be from a different minor. Re-ground: read
88
- the package's `dist/docs/INDEX.md` in `node_modules` for the exact
89
- installed types.
90
- - If the typecheck is unavailable (no TS in the project), say so
91
- explicitly and ask the user how they want to verify; do not silently
92
- skip verification.
93
- - **Escape hatch.** If the user explicitly waived verification ("just
94
- sketch it", "quick prototype", "no need to check"), you may skip the
95
- typecheck — but state this plainly in your reply: *"typecheck skipped by
96
- user request — code is not verified"*. Do not skip silently.
97
-
98
- ## Hard rules
99
-
100
- - **`@gravity-ui/uikit` MUST be installed in every Gravity UI project.** It is
101
- the base component + design-token library every other `@gravity-ui/*` package
102
- builds on; without it components render unstyled. If `package.json` lacks it,
103
- stop and have the user install and configure it first (setup:
104
- `https://gravity-ui.com/llms/uikit/llms.txt`).
105
- - **Read `package.json` before importing any `@gravity-ui/*` package.** Never
106
- assume a package is installed; never assume its major version.
107
- - **Do not invent props or components.** Before using a component API you are
108
- not 100% sure of, check `rules/hallucination-traps.md` (ecosystem patterns)
109
- and the component's README in `dist/docs`. If still unsure, ask the user
110
- rather than guessing.
111
- - **Never guess icon names** — they are hallucinated more often than not. To
112
- match an icon from a screenshot/photo/mock, run `scripts/icon-image-search.sh`
113
- (reverse image search). With only a description, look the name up on
114
- `gravity-ui.com/icons` or ask the user — do not invent one. Then pass it as an
115
- object (`<Icon data={CheckIcon} />`), never a string key. See
116
- `references/icons.md`.
117
- - **Theming uses semantic `--g-*` tokens.** Never hardcode colors (`#fff`,
118
- `blue-500`); never hand-write `dark:` overrides. Full token tables live in
119
- `references/theming.md`; the cross-cutting traps (partial brand overrides,
120
- scoped vs nested `ThemeProvider`, controls on a brand background) live in
121
- `rules/hallucination-traps.md`.
122
- - **Required setup is package-specific** (style imports, `ThemeProvider`,
123
- peer-deps). It lives in each package's root README under "Required setup" —
124
- read it once per package, do not rely on memory.
125
-
126
- ## What NOT to do
127
-
128
- These are the five most common ways agents break Gravity UI code. They are
129
- already implied by the rules above; this section exists as an explicit
130
- stop-sign. If you are about to do any of these, stop and re-ground.
131
-
132
- - **Do not substitute non-Gravity libraries.** No MUI, Ant Design, plain
133
- `<input>`/`<button>`, or look-alike component libs. Use the `@gravity-ui/*`
134
- package the task needs.
135
- - **Do not invent component APIs or props.** If a prop is not in the docs you
136
- read in Step 1, it does not exist — do not write `variant=`, `color=`,
137
- `name=` (on `Icon`), or a `header-3` variant. Use the documented prop or
138
- ask the user. See `rules/hallucination-traps.md`.
139
- - **Do not use the `/llms/<pkg>/llms.txt` "latest" alias as a fallback.** It
140
- serves the newest major, which may differ from the installed one and have a
141
- different API. The versioned online fallback is the major-line URL
142
- (`/llms/<pkg>/<major>/llms.txt`); below that, go LOCAL.
143
- - **Do not partial-brand.** Setting only `--g-color-base-brand` leaves
144
- selection, focus, links and contrast on the default accent — a mismatched
145
- UI. Override the full brand token set, on each theme you support.
146
- - **Do not override internal markup with `[class*='…']` / ID selectors.**
147
- That's written against one DOM structure and breaks silently when the
148
- component changes. Climb the customization ladder
149
- (global token → component CSS API → narrow flagged hack) before ever
150
- touching structure.
151
-
152
- ## Deeper material — read on demand
153
-
154
- These files live alongside this SKILL.md and load only when relevant:
155
-
156
- - `references/package-routing.md` — offline snapshot of the ecosystem catalog
157
- (`gravity-ui.com/llms.txt`), refreshed each skill release. Used as the
158
- offline fallback in Step 0.
159
- - `references/theming.md` — verbatim copy of uikit's `docs/theming.md`:
160
- `--g-*` token layers, `ThemeProvider`, branding, custom themes, scoped
161
- themes, `uikit-themer`. The bundled copy may lag — read
162
- `node_modules/@gravity-ui/uikit/build/docs/guides/theming.md` for the
163
- version-matched file.
164
- - `references/layout.md` — verbatim copy of uikit's `docs/layout.md`:
165
- spacing scale (`--g-spacing-*`), `Flex`/`Box`, `Row`/`Col`/`Container`
166
- grid, breakpoints, `useLayoutContext`.
167
- - `references/icons.md` — finding an icon by image
168
- (`scripts/icon-image-search.sh`) or on gravity-ui.com/icons; the
169
- object-vs-string rendering rule.
170
- - `rules/hallucination-traps.md` — Incorrect/Correct pairs for the most
171
- commonly invented APIs: typography variants (`header-3..6` don't exist, no
172
- `Heading`), the flex contract (`min-width:0`, who shrinks), theming traps
173
- (partial brand overrides, scoped vs nested `ThemeProvider`, customization
174
- ladder), `Button view` not `variant`, `Icon data` not `name`. Per-component
175
- traps live in each package's `dist/docs`, not here.
@@ -1,60 +0,0 @@
1
- # Icons — finding the right `@gravity-ui/icons` name
2
-
3
- Icon names are hallucinated more often than not. **Never guess.** Find the real
4
- name, then render it correctly.
5
-
6
- ## By image (screenshot / photo / mock) — preferred
7
-
8
- When the user has a picture of the icon — a screenshot, a design mock, a photo —
9
- use **reverse image search**:
10
-
11
- ```
12
- scripts/icon-image-search.sh <path-to-image>
13
- ```
14
-
15
- It POSTs the image to `https://gravity-ui.com/api/icons-search` and prints the
16
- closest `@gravity-ui/icons` names. The script infers the content type from the
17
- extension; force it if ambiguous: `--png` / `--jpeg`.
18
-
19
- **Image requirements:** send a small image of the icon *alone* — ideally
20
- **square** and tightly cropped to the glyph (no surrounding UI, large
21
- whitespace, or several icons in one shot). A full-page screenshot gives worse
22
- matches, so crop to the icon first if needed.
23
-
24
- Workflow:
25
- 1. Have the user drop the image into the project, or point you at its path — a
26
- small, square crop of just the icon.
27
- 2. Run the script (it needs `curl`).
28
- 3. The response is JSON: `{"results":[{"name","componentName","style","score"}, …]}`
29
- sorted by descending `score` (0–1). Use **`componentName`** (PascalCase) for
30
- the import: `import { Sphere } from '@gravity-ui/icons'`.
31
- 4. If the top scores are close (within ~0.02) or the image is low-res, show the
32
- user the top few candidates and ask which one — don't pick the first blindly.
33
- 5. Render the chosen component (below).
34
-
35
- ## When you only have a description (no image)
36
-
37
- This skill ships **no text-search endpoint**. To avoid inventing a name:
38
-
39
- - Look the icon up on the catalog at `https://gravity-ui.com/icons`.
40
- - If still unclear, ask the user for a screenshot and run image search.
41
-
42
- Do not guess a name from memory.
43
-
44
- ## Rendering the chosen icon
45
-
46
- - The glyph set is `@gravity-ui/icons`; the renderer is uikit's `Icon`. Two
47
- packages, two roles — don't confuse them.
48
- - Import the icon component and pass it via uikit's `Icon` `data` prop:
49
-
50
- ```tsx
51
- import { Icon } from '@gravity-ui/uikit';
52
- import { ShieldCheck } from '@gravity-ui/icons';
53
- import '@gravity-ui/uikit/styles/styles.css';
54
-
55
- <Icon data={ShieldCheck} size={16} />
56
- ```
57
-
58
- - Pass the icon as an **object** (`data={ShieldCheck}`), never as a string key.
59
- - For a custom or brand icon not in the set, import your own SVG and pass it to
60
- `Icon` — do not expect it to live in `@gravity-ui/icons`.