@qoretechnologies/reqraft 0.10.62 → 0.10.63-pr.142.g0b675cd

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 (736) hide show
  1. package/README.md +21 -1
  2. package/dist/components/Description/describedControl.d.ts +48 -0
  3. package/dist/components/Description/describedControl.d.ts.map +1 -0
  4. package/dist/components/Description/describedControl.js +81 -0
  5. package/dist/components/Description/describedControl.js.map +1 -0
  6. package/dist/components/Description/index.d.ts.map +1 -1
  7. package/dist/components/Description/index.js +3 -2
  8. package/dist/components/Description/index.js.map +1 -1
  9. package/dist/components/colorValue/colorValue.d.ts +59 -0
  10. package/dist/components/colorValue/colorValue.d.ts.map +1 -0
  11. package/dist/components/colorValue/colorValue.js +245 -0
  12. package/dist/components/colorValue/colorValue.js.map +1 -0
  13. package/dist/components/colorValue/index.d.ts +34 -0
  14. package/dist/components/colorValue/index.d.ts.map +1 -0
  15. package/dist/components/colorValue/index.js +136 -0
  16. package/dist/components/colorValue/index.js.map +1 -0
  17. package/dist/components/colorValue/labels.d.ts +12 -0
  18. package/dist/components/colorValue/labels.d.ts.map +1 -0
  19. package/dist/components/colorValue/labels.js +11 -0
  20. package/dist/components/colorValue/labels.js.map +1 -0
  21. package/dist/components/composer/Composer.d.ts +1 -1
  22. package/dist/components/composer/Composer.d.ts.map +1 -1
  23. package/dist/components/composer/Composer.js +2 -2
  24. package/dist/components/composer/Composer.js.map +1 -1
  25. package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
  26. package/dist/components/dpqlEditor/DpqlEditor.js +25 -5
  27. package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
  28. package/dist/components/dpqlEditor/dpqlHelpers.d.ts +10 -1
  29. package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
  30. package/dist/components/dpqlEditor/dpqlHelpers.js +30 -13
  31. package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
  32. package/dist/components/dpqlEditor/dpqlTags.d.ts +11 -7
  33. package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
  34. package/dist/components/dpqlEditor/dpqlTags.js +11 -6
  35. package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
  36. package/dist/components/dpqlEditor/types.d.ts +47 -8
  37. package/dist/components/dpqlEditor/types.d.ts.map +1 -1
  38. package/dist/components/dpqlEditor/useDpqlSession.d.ts +2 -2
  39. package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
  40. package/dist/components/dpqlEditor/useDpqlSession.js +16 -7
  41. package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
  42. package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
  43. package/dist/components/form/engine/CompactRow.js +151 -83
  44. package/dist/components/form/engine/CompactRow.js.map +1 -1
  45. package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
  46. package/dist/components/form/engine/CompactToolbar.js +29 -3
  47. package/dist/components/form/engine/CompactToolbar.js.map +1 -1
  48. package/dist/components/form/engine/FormEngine.d.ts +34 -1
  49. package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
  50. package/dist/components/form/engine/FormEngine.js +487 -87
  51. package/dist/components/form/engine/FormEngine.js.map +1 -1
  52. package/dist/components/form/engine/HiddenFieldsNote.d.ts +28 -0
  53. package/dist/components/form/engine/HiddenFieldsNote.d.ts.map +1 -0
  54. package/dist/components/form/engine/HiddenFieldsNote.js +32 -0
  55. package/dist/components/form/engine/HiddenFieldsNote.js.map +1 -0
  56. package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
  57. package/dist/components/form/engine/OptionFieldMessages.js +24 -3
  58. package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
  59. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
  60. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
  61. package/dist/components/form/engine/_structuredData/SchemaDataView.js +12 -6
  62. package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
  63. package/dist/components/form/engine/compactRowContext.d.ts +19 -0
  64. package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
  65. package/dist/components/form/engine/compactRowContext.js.map +1 -1
  66. package/dist/components/form/engine/compactRowStyles.d.ts +0 -1
  67. package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
  68. package/dist/components/form/engine/compactRowStyles.js +12 -20
  69. package/dist/components/form/engine/compactRowStyles.js.map +1 -1
  70. package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
  71. package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
  72. package/dist/components/form/engine/compactToolbarColors.js +21 -0
  73. package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
  74. package/dist/components/form/engine/readFirst.d.ts +24 -8
  75. package/dist/components/form/engine/readFirst.d.ts.map +1 -1
  76. package/dist/components/form/engine/readFirst.js +77 -109
  77. package/dist/components/form/engine/readFirst.js.map +1 -1
  78. package/dist/components/form/engine/readFirstColors.d.ts +30 -0
  79. package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
  80. package/dist/components/form/engine/readFirstColors.js +51 -0
  81. package/dist/components/form/engine/readFirstColors.js.map +1 -0
  82. package/dist/components/form/engine/rowFocus.d.ts +2 -0
  83. package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
  84. package/dist/components/form/engine/rowFocus.js +26 -3
  85. package/dist/components/form/engine/rowFocus.js.map +1 -1
  86. package/dist/components/form/engine/typeChoices.d.ts +1 -1
  87. package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
  88. package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
  89. package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
  90. package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
  91. package/dist/components/form/engine/variants/VariantCards.js +2 -1
  92. package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
  93. package/dist/components/form/engine/variants/VariantFocus.js +1 -1
  94. package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
  95. package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
  96. package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
  97. package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
  98. package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
  99. package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
  100. package/dist/components/form/engine/variants/variantParts.js +25 -17
  101. package/dist/components/form/engine/variants/variantParts.js.map +1 -1
  102. package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
  103. package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
  104. package/dist/components/form/expressions/DpqlRendering.js +3 -3
  105. package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
  106. package/dist/components/form/expressions/ExpressionField.d.ts +41 -3
  107. package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
  108. package/dist/components/form/expressions/ExpressionField.js +396 -99
  109. package/dist/components/form/expressions/ExpressionField.js.map +1 -1
  110. package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
  111. package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
  112. package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
  113. package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
  114. package/dist/components/form/expressions/builder/argumentLabel.js +27 -9
  115. package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
  116. package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
  117. package/dist/components/form/expressions/builder/argumentWrapper.js +4 -2
  118. package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
  119. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
  120. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +5 -4
  121. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
  122. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
  123. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
  124. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +6 -3
  125. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
  126. package/dist/components/form/expressions/builder/index.d.ts +24 -2
  127. package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
  128. package/dist/components/form/expressions/builder/index.js +121 -77
  129. package/dist/components/form/expressions/builder/index.js.map +1 -1
  130. package/dist/components/form/expressions/builder/item.d.ts +6 -2
  131. package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
  132. package/dist/components/form/expressions/builder/item.js +19 -5
  133. package/dist/components/form/expressions/builder/item.js.map +1 -1
  134. package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
  135. package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
  136. package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
  137. package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
  138. package/dist/components/form/expressions/expressionOperands.js +97 -0
  139. package/dist/components/form/expressions/expressionOperands.js.map +1 -0
  140. package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
  141. package/dist/components/form/expressions/mockExpressions.js +22 -5
  142. package/dist/components/form/expressions/mockExpressions.js.map +1 -1
  143. package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
  144. package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
  145. package/dist/components/form/expressions/renderExpressionToText.js +35 -9
  146. package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
  147. package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
  148. package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
  149. package/dist/components/form/expressions/textOfExpression.js +37 -0
  150. package/dist/components/form/expressions/textOfExpression.js.map +1 -0
  151. package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
  152. package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
  153. package/dist/components/form/expressions/useExpressionType.js +181 -0
  154. package/dist/components/form/expressions/useExpressionType.js.map +1 -0
  155. package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
  156. package/dist/components/form/expressions/useRenderExpression.js +7 -7
  157. package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
  158. package/dist/components/form/fields/Field.d.ts.map +1 -1
  159. package/dist/components/form/fields/Field.js +20 -7
  160. package/dist/components/form/fields/Field.js.map +1 -1
  161. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
  162. package/dist/components/form/fields/allowed-values/AllowedValues.js +17 -4
  163. package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
  164. package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
  165. package/dist/components/form/fields/array/ArrayAuto.js +24 -0
  166. package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
  167. package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
  168. package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
  169. package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
  170. package/dist/components/form/fields/auto/AutoFormField.d.ts +20 -1
  171. package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
  172. package/dist/components/form/fields/auto/AutoFormField.js +81 -36
  173. package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
  174. package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
  175. package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
  176. package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
  177. package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
  178. package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
  179. package/dist/components/form/fields/binary/Binary.js +23 -3
  180. package/dist/components/form/fields/binary/Binary.js.map +1 -1
  181. package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
  182. package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
  183. package/dist/components/form/fields/boolean/Boolean.js +9 -1
  184. package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
  185. package/dist/components/form/fields/color/Color.d.ts +103 -16
  186. package/dist/components/form/fields/color/Color.d.ts.map +1 -1
  187. package/dist/components/form/fields/color/Color.js +611 -16
  188. package/dist/components/form/fields/color/Color.js.map +1 -1
  189. package/dist/components/form/fields/emittedValues.d.ts +34 -3
  190. package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
  191. package/dist/components/form/fields/emittedValues.js +24 -1
  192. package/dist/components/form/fields/emittedValues.js.map +1 -1
  193. package/dist/components/form/fields/file/File.d.ts +1 -1
  194. package/dist/components/form/fields/file/File.d.ts.map +1 -1
  195. package/dist/components/form/fields/file/File.js +4 -2
  196. package/dist/components/form/fields/file/File.js.map +1 -1
  197. package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
  198. package/dist/components/form/fields/long-string/LongString.js +17 -3
  199. package/dist/components/form/fields/long-string/LongString.js.map +1 -1
  200. package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
  201. package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
  202. package/dist/components/form/fields/multi-select/MultiSelectFormField.js +4 -1
  203. package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
  204. package/dist/components/form/fields/number/Number.d.ts +6 -0
  205. package/dist/components/form/fields/number/Number.d.ts.map +1 -1
  206. package/dist/components/form/fields/number/Number.js +41 -6
  207. package/dist/components/form/fields/number/Number.js.map +1 -1
  208. package/dist/components/form/fields/object/Object.d.ts +1 -1
  209. package/dist/components/form/fields/object/Object.d.ts.map +1 -1
  210. package/dist/components/form/fields/object/Object.js +4 -2
  211. package/dist/components/form/fields/object/Object.js.map +1 -1
  212. package/dist/components/form/fields/pendingEdit.d.ts +52 -0
  213. package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
  214. package/dist/components/form/fields/pendingEdit.js +79 -0
  215. package/dist/components/form/fields/pendingEdit.js.map +1 -0
  216. package/dist/components/form/fields/rich-text/RichText.d.ts +8 -1
  217. package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
  218. package/dist/components/form/fields/rich-text/RichText.js +190 -81
  219. package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
  220. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +18 -0
  221. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -0
  222. package/dist/components/form/fields/rich-text/useTemplateTags.js +49 -0
  223. package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
  224. package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
  225. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
  226. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
  227. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
  228. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
  229. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
  230. package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
  231. package/dist/components/form/fields/schema-definition/TableEditor.js +10 -2
  232. package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
  233. package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
  234. package/dist/components/form/fields/schema-definition/index.js +8 -4
  235. package/dist/components/form/fields/schema-definition/index.js.map +1 -1
  236. package/dist/components/form/fields/select/Select.d.ts +2 -0
  237. package/dist/components/form/fields/select/Select.d.ts.map +1 -1
  238. package/dist/components/form/fields/select/Select.js +19 -10
  239. package/dist/components/form/fields/select/Select.js.map +1 -1
  240. package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
  241. package/dist/components/form/fields/select/SelectCollection.js +8 -2
  242. package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
  243. package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
  244. package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
  245. package/dist/components/form/fields/select/unavailableRow.js +55 -0
  246. package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
  247. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +5 -5
  248. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
  249. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +11 -4
  250. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
  251. package/dist/components/form/fields/template/TemplateBrowser.d.ts +22 -0
  252. package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
  253. package/dist/components/form/fields/template/TemplateBrowser.js +54 -0
  254. package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
  255. package/dist/components/form/fields/template/TemplateField.d.ts +83 -1
  256. package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
  257. package/dist/components/form/fields/template/TemplateField.js +535 -85
  258. package/dist/components/form/fields/template/TemplateField.js.map +1 -1
  259. package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
  260. package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
  261. package/dist/components/form/fields/template/TemplateText.js +8 -4
  262. package/dist/components/form/fields/template/TemplateText.js.map +1 -1
  263. package/dist/components/form/fields/template/writtenAsText.d.ts +55 -0
  264. package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
  265. package/dist/components/form/fields/template/writtenAsText.js +188 -0
  266. package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
  267. package/dist/components/form/index.d.ts +10 -0
  268. package/dist/components/form/index.d.ts.map +1 -1
  269. package/dist/components/form/index.js +23 -1
  270. package/dist/components/form/index.js.map +1 -1
  271. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
  272. package/dist/components/imageLightbox/ImageLightbox.js +19 -7
  273. package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
  274. package/dist/components/log/Log.d.ts.map +1 -1
  275. package/dist/components/log/Log.js +15 -7
  276. package/dist/components/log/Log.js.map +1 -1
  277. package/dist/components/menu/Menu.d.ts.map +1 -1
  278. package/dist/components/menu/Menu.js +19 -10
  279. package/dist/components/menu/Menu.js.map +1 -1
  280. package/dist/components/smartEditor/CompletionMenu.d.ts +43 -0
  281. package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
  282. package/dist/components/smartEditor/CompletionMenu.js +196 -0
  283. package/dist/components/smartEditor/CompletionMenu.js.map +1 -0
  284. package/dist/components/smartEditor/MarkdownDoc.d.ts +1 -1
  285. package/dist/components/smartEditor/MarkdownDoc.js +1 -1
  286. package/dist/components/smartEditor/MarkdownDoc.js.map +1 -1
  287. package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
  288. package/dist/components/smartEditor/SmartEditor.js +51 -136
  289. package/dist/components/smartEditor/SmartEditor.js.map +1 -1
  290. package/dist/components/smartEditor/completionStyle.d.ts +27 -0
  291. package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
  292. package/dist/components/smartEditor/completionStyle.js +66 -0
  293. package/dist/components/smartEditor/completionStyle.js.map +1 -0
  294. package/dist/components/smartEditor/index.d.ts +5 -1
  295. package/dist/components/smartEditor/index.d.ts.map +1 -1
  296. package/dist/components/smartEditor/index.js +19 -1
  297. package/dist/components/smartEditor/index.js.map +1 -1
  298. package/dist/components/smartEditor/templateCompletions.d.ts +18 -0
  299. package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
  300. package/dist/components/smartEditor/templateCompletions.js +94 -0
  301. package/dist/components/smartEditor/templateCompletions.js.map +1 -0
  302. package/dist/components/smartEditor/types.d.ts +12 -1
  303. package/dist/components/smartEditor/types.d.ts.map +1 -1
  304. package/dist/components/smartEditor/useLspAutocomplete.d.ts +32 -0
  305. package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
  306. package/dist/components/smartEditor/useLspAutocomplete.js +228 -118
  307. package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
  308. package/dist/components/smartEditor/useLspHover.d.ts +22 -7
  309. package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
  310. package/dist/components/smartEditor/useLspHover.js +86 -17
  311. package/dist/components/smartEditor/useLspHover.js.map +1 -1
  312. package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
  313. package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
  314. package/dist/components/smartEditor/useLspSession.d.ts +6 -0
  315. package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
  316. package/dist/components/smartEditor/useLspSession.js +7 -6
  317. package/dist/components/smartEditor/useLspSession.js.map +1 -1
  318. package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
  319. package/dist/components/supportTicket/AttachmentChips.js +15 -5
  320. package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
  321. package/dist/components/supportTicket/ReferencePicker.d.ts +9 -2
  322. package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
  323. package/dist/components/supportTicket/ReferencePicker.js +27 -6
  324. package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
  325. package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
  326. package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
  327. package/dist/components/supportTicket/TicketHeader.js +20 -2
  328. package/dist/components/supportTicket/TicketHeader.js.map +1 -1
  329. package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
  330. package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
  331. package/dist/components/ticketReferences/TicketReferences.js +9 -4
  332. package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
  333. package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
  334. package/dist/components/ticketThread/TicketThread.js +36 -11
  335. package/dist/components/ticketThread/TicketThread.js.map +1 -1
  336. package/dist/helpers/descriptionTooltip.d.ts +43 -0
  337. package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
  338. package/dist/helpers/descriptionTooltip.js +70 -0
  339. package/dist/helpers/descriptionTooltip.js.map +1 -0
  340. package/dist/helpers/domProps.d.ts +5 -0
  341. package/dist/helpers/domProps.d.ts.map +1 -0
  342. package/dist/helpers/domProps.js +47 -0
  343. package/dist/helpers/domProps.js.map +1 -0
  344. package/dist/helpers/expressions.d.ts +107 -2
  345. package/dist/helpers/expressions.d.ts.map +1 -1
  346. package/dist/helpers/expressions.js +223 -8
  347. package/dist/helpers/expressions.js.map +1 -1
  348. package/dist/helpers/hoveringPointer.d.ts +26 -0
  349. package/dist/helpers/hoveringPointer.d.ts.map +1 -0
  350. package/dist/helpers/hoveringPointer.js +29 -0
  351. package/dist/helpers/hoveringPointer.js.map +1 -0
  352. package/dist/helpers/markdownText.d.ts +14 -0
  353. package/dist/helpers/markdownText.d.ts.map +1 -0
  354. package/dist/helpers/markdownText.js +160 -0
  355. package/dist/helpers/markdownText.js.map +1 -0
  356. package/dist/helpers/qorusTypeCatalogue.d.ts +53 -0
  357. package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
  358. package/dist/helpers/qorusTypeCatalogue.js +262 -0
  359. package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
  360. package/dist/helpers/readableColors.d.ts +36 -0
  361. package/dist/helpers/readableColors.d.ts.map +1 -0
  362. package/dist/helpers/readableColors.js +116 -0
  363. package/dist/helpers/readableColors.js.map +1 -0
  364. package/dist/helpers/templateItems.d.ts +2 -2
  365. package/dist/helpers/templateItems.d.ts.map +1 -1
  366. package/dist/helpers/templateItems.js +6 -4
  367. package/dist/helpers/templateItems.js.map +1 -1
  368. package/dist/helpers/templates.d.ts +26 -1
  369. package/dist/helpers/templates.d.ts.map +1 -1
  370. package/dist/helpers/templates.js +41 -6
  371. package/dist/helpers/templates.js.map +1 -1
  372. package/dist/helpers/validations.d.ts +9 -0
  373. package/dist/helpers/validations.d.ts.map +1 -1
  374. package/dist/helpers/validations.js +139 -33
  375. package/dist/helpers/validations.js.map +1 -1
  376. package/dist/hooks/useQorusTypes.d.ts +7 -15
  377. package/dist/hooks/useQorusTypes.d.ts.map +1 -1
  378. package/dist/hooks/useQorusTypes.js +25 -166
  379. package/dist/hooks/useQorusTypes.js.map +1 -1
  380. package/dist/hooks/useReadableIntentShade.d.ts +9 -0
  381. package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
  382. package/dist/hooks/useReadableIntentShade.js +23 -0
  383. package/dist/hooks/useReadableIntentShade.js.map +1 -0
  384. package/dist/hooks/useReadableOpacity.d.ts +6 -0
  385. package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
  386. package/dist/hooks/useReadableOpacity.js +17 -0
  387. package/dist/hooks/useReadableOpacity.js.map +1 -0
  388. package/dist/index.d.ts +1 -0
  389. package/dist/index.d.ts.map +1 -1
  390. package/dist/index.js +1 -0
  391. package/dist/index.js.map +1 -1
  392. package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
  393. package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
  394. package/dist/tracking/ui/ExperimentCard.js +26 -10
  395. package/dist/tracking/ui/ExperimentCard.js.map +1 -1
  396. package/dist/tracking/ui/card.d.ts +2 -2
  397. package/dist/tracking/ui/card.d.ts.map +1 -1
  398. package/dist/tracking/ui/card.js +2 -2
  399. package/dist/tracking/ui/card.js.map +1 -1
  400. package/dist/tracking/ui/readable.d.ts +14 -0
  401. package/dist/tracking/ui/readable.d.ts.map +1 -0
  402. package/dist/tracking/ui/readable.js +60 -0
  403. package/dist/tracking/ui/readable.js.map +1 -0
  404. package/package.json +14 -5
  405. package/.claude/CLAUDE.md +0 -317
  406. package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
  407. package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
  408. package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
  409. package/.tasks/FIELD_STACK_REPORT.md +0 -234
  410. package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
  411. package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
  412. package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
  413. package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
  414. package/.tasks/INDEX.md +0 -111
  415. package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
  416. package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
  417. package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
  418. package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
  419. package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
  420. package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
  421. package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
  422. package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
  423. package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
  424. package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
  425. package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
  426. package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
  427. package/CODE_OF_CONDUCT.md +0 -105
  428. package/CONTRIBUTING.MD +0 -78
  429. package/SECURITY.md +0 -3
  430. package/chromatic.config.json +0 -5
  431. package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
  432. package/design/COMPACT_INFO_DISPLAY.md +0 -87
  433. package/design/COMPACT_PARITY.md +0 -85
  434. package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
  435. package/design/FORM_ENGINE_COMPACT.md +0 -300
  436. package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
  437. package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
  438. package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
  439. package/design/IDE_INTEGRATION.md +0 -64
  440. package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
  441. package/design/SELECT_DIALOG_FLOOR.md +0 -86
  442. package/design/SMART_EDITOR_UX.md +0 -438
  443. package/design/TRACKING.md +0 -290
  444. package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
  445. package/src/components/Description/index.tsx +0 -254
  446. package/src/components/Description/markdownRendererContext.tsx +0 -29
  447. package/src/components/FocusedEditing/index.tsx +0 -50
  448. package/src/components/codeSize/index.tsx +0 -79
  449. package/src/components/composer/Composer.stories.tsx +0 -238
  450. package/src/components/composer/Composer.tsx +0 -554
  451. package/src/components/composer/helpers.ts +0 -74
  452. package/src/components/composer/index.ts +0 -2
  453. package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
  454. package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
  455. package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
  456. package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
  457. package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
  458. package/src/components/dpqlEditor/dpqlTags.ts +0 -114
  459. package/src/components/dpqlEditor/index.ts +0 -41
  460. package/src/components/dpqlEditor/types.ts +0 -203
  461. package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
  462. package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
  463. package/src/components/form/engine/CompactRow.tsx +0 -2620
  464. package/src/components/form/engine/CompactToolbar.tsx +0 -330
  465. package/src/components/form/engine/FormEngine.stories.tsx +0 -9920
  466. package/src/components/form/engine/FormEngine.tsx +0 -4569
  467. package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
  468. package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -331
  469. package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
  470. package/src/components/form/engine/OptionFieldMessages.tsx +0 -477
  471. package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
  472. package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
  473. package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
  474. package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
  475. package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -742
  476. package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
  477. package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
  478. package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
  479. package/src/components/form/engine/compactRowContext.ts +0 -148
  480. package/src/components/form/engine/compactRowStyles.ts +0 -898
  481. package/src/components/form/engine/compactToolbarContext.ts +0 -69
  482. package/src/components/form/engine/optionActions.ts +0 -128
  483. package/src/components/form/engine/optionsContext.ts +0 -24
  484. package/src/components/form/engine/readFirst.ts +0 -1077
  485. package/src/components/form/engine/rendererTypes.ts +0 -107
  486. package/src/components/form/engine/revealRow.ts +0 -123
  487. package/src/components/form/engine/rowFocus.ts +0 -101
  488. package/src/components/form/engine/rowMenuContext.ts +0 -159
  489. package/src/components/form/engine/rowOpenPicker.ts +0 -27
  490. package/src/components/form/engine/typeChoices.ts +0 -63
  491. package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
  492. package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
  493. package/src/components/form/engine/variants/VariantCards.tsx +0 -212
  494. package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
  495. package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
  496. package/src/components/form/engine/variants/focusDemo.ts +0 -145
  497. package/src/components/form/engine/variants/variantModel.ts +0 -223
  498. package/src/components/form/engine/variants/variantParts.tsx +0 -313
  499. package/src/components/form/expressions/DpqlRendering.tsx +0 -85
  500. package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
  501. package/src/components/form/expressions/ExpressionField.tsx +0 -503
  502. package/src/components/form/expressions/argumentPresence.ts +0 -213
  503. package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
  504. package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
  505. package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
  506. package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
  507. package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
  508. package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
  509. package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
  510. package/src/components/form/expressions/builder/index.tsx +0 -1545
  511. package/src/components/form/expressions/builder/item.tsx +0 -89
  512. package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
  513. package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
  514. package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
  515. package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
  516. package/src/components/form/expressions/mockExpressions.ts +0 -317
  517. package/src/components/form/expressions/renderExpressionToText.ts +0 -137
  518. package/src/components/form/expressions/types.ts +0 -110
  519. package/src/components/form/expressions/useExpressions.ts +0 -101
  520. package/src/components/form/expressions/useRenderExpression.ts +0 -165
  521. package/src/components/form/fields/Field.stories.tsx +0 -143
  522. package/src/components/form/fields/Field.tsx +0 -732
  523. package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -297
  524. package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
  525. package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
  526. package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
  527. package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
  528. package/src/components/form/fields/auto/AutoFormField.tsx +0 -1164
  529. package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
  530. package/src/components/form/fields/binary/Binary.tsx +0 -91
  531. package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
  532. package/src/components/form/fields/boolean/Boolean.tsx +0 -34
  533. package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
  534. package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
  535. package/src/components/form/fields/color/Color.stories.tsx +0 -99
  536. package/src/components/form/fields/color/Color.tsx +0 -46
  537. package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
  538. package/src/components/form/fields/cron/Cron.tsx +0 -80
  539. package/src/components/form/fields/date/Date.stories.tsx +0 -77
  540. package/src/components/form/fields/date/Date.tsx +0 -55
  541. package/src/components/form/fields/emittedValues.ts +0 -70
  542. package/src/components/form/fields/file/File.stories.tsx +0 -161
  543. package/src/components/form/fields/file/File.tsx +0 -227
  544. package/src/components/form/fields/long-string/LongString.stories.tsx +0 -120
  545. package/src/components/form/fields/long-string/LongString.tsx +0 -130
  546. package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
  547. package/src/components/form/fields/markdown/Markdown.tsx +0 -81
  548. package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
  549. package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -139
  550. package/src/components/form/fields/number/Number.stories.tsx +0 -159
  551. package/src/components/form/fields/number/Number.tsx +0 -160
  552. package/src/components/form/fields/object/Object.stories.tsx +0 -398
  553. package/src/components/form/fields/object/Object.tsx +0 -255
  554. package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
  555. package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -46
  556. package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
  557. package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
  558. package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
  559. package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
  560. package/src/components/form/fields/rich-text/RichText.tsx +0 -537
  561. package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
  562. package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
  563. package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
  564. package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
  565. package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
  566. package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
  567. package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
  568. package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
  569. package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
  570. package/src/components/form/fields/schema-definition/catalog.ts +0 -237
  571. package/src/components/form/fields/schema-definition/helpers.ts +0 -90
  572. package/src/components/form/fields/schema-definition/index.tsx +0 -418
  573. package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
  574. package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
  575. package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
  576. package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
  577. package/src/components/form/fields/schema-definition/types.ts +0 -185
  578. package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
  579. package/src/components/form/fields/select/Select.stories.tsx +0 -872
  580. package/src/components/form/fields/select/Select.tsx +0 -624
  581. package/src/components/form/fields/select/SelectCollection.tsx +0 -594
  582. package/src/components/form/fields/string/String.stories.tsx +0 -86
  583. package/src/components/form/fields/string/String.tsx +0 -43
  584. package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
  585. package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
  586. package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
  587. package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
  588. package/src/components/form/fields/template/TemplateField.tsx +0 -1717
  589. package/src/components/form/fields/template/TemplateText.tsx +0 -115
  590. package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
  591. package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
  592. package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
  593. package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
  594. package/src/components/form/fields/timeout/Timeout.tsx +0 -87
  595. package/src/components/form/fields/url/Url.stories.tsx +0 -94
  596. package/src/components/form/fields/url/Url.tsx +0 -85
  597. package/src/components/form/index.tsx +0 -47
  598. package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
  599. package/src/components/imageLightbox/ImageLightbox.tsx +0 -236
  600. package/src/components/imageLightbox/index.ts +0 -1
  601. package/src/components/log/Log.stories.tsx +0 -333
  602. package/src/components/log/Log.tsx +0 -285
  603. package/src/components/menu/Menu.stories.tsx +0 -155
  604. package/src/components/menu/Menu.tsx +0 -312
  605. package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
  606. package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
  607. package/src/components/qonsoleSmartInput/index.ts +0 -16
  608. package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
  609. package/src/components/qonsoleSmartInput/types.ts +0 -133
  610. package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
  611. package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
  612. package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
  613. package/src/components/searchFilterBar/index.ts +0 -1
  614. package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
  615. package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
  616. package/src/components/smartEditor/SmartEditor.tsx +0 -808
  617. package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
  618. package/src/components/smartEditor/helpers.ts +0 -217
  619. package/src/components/smartEditor/index.ts +0 -35
  620. package/src/components/smartEditor/styling.ts +0 -45
  621. package/src/components/smartEditor/types.ts +0 -211
  622. package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
  623. package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
  624. package/src/components/smartEditor/useLspHover.ts +0 -230
  625. package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
  626. package/src/components/smartEditor/useLspSession.ts +0 -231
  627. package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
  628. package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
  629. package/src/components/supportTicket/AttachmentChips.tsx +0 -147
  630. package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
  631. package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -129
  632. package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -584
  633. package/src/components/supportTicket/ReferencePicker.tsx +0 -563
  634. package/src/components/supportTicket/TicketConversation.stories.tsx +0 -121
  635. package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
  636. package/src/components/supportTicket/TicketHeader.tsx +0 -247
  637. package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
  638. package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
  639. package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -354
  640. package/src/components/supportTicket/TicketReplyBox.tsx +0 -150
  641. package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
  642. package/src/components/supportTicket/attachmentAccess.ts +0 -97
  643. package/src/components/supportTicket/fileToAttachment.ts +0 -24
  644. package/src/components/supportTicket/index.ts +0 -10
  645. package/src/components/supportTicket/meta.ts +0 -206
  646. package/src/components/supportTicket/ticketModel.ts +0 -131
  647. package/src/components/supportTicket/useLoadedImages.ts +0 -73
  648. package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -315
  649. package/src/components/ticketReferences/TicketReferences.tsx +0 -906
  650. package/src/components/ticketReferences/index.ts +0 -2
  651. package/src/components/ticketThread/TicketThread.stories.tsx +0 -829
  652. package/src/components/ticketThread/TicketThread.tsx +0 -719
  653. package/src/components/ticketThread/index.ts +0 -6
  654. package/src/contexts/FetchContext.tsx +0 -25
  655. package/src/contexts/ReqraftContext.tsx +0 -9
  656. package/src/contexts/StorageContext.tsx +0 -33
  657. package/src/global.d.ts +0 -4
  658. package/src/helpers/allowedValues.ts +0 -249
  659. package/src/helpers/choiceChip.ts +0 -227
  660. package/src/helpers/common.ts +0 -326
  661. package/src/helpers/dpqlDetection.ts +0 -209
  662. package/src/helpers/expressions.ts +0 -140
  663. package/src/helpers/optionUiTypes.ts +0 -199
  664. package/src/helpers/options.ts +0 -150
  665. package/src/helpers/providerValue.ts +0 -125
  666. package/src/helpers/scrollbar.ts +0 -32
  667. package/src/helpers/singleLineString.ts +0 -61
  668. package/src/helpers/templateItems.ts +0 -81
  669. package/src/helpers/templateText.ts +0 -350
  670. package/src/helpers/templates.ts +0 -602
  671. package/src/helpers/validations.ts +0 -2085
  672. package/src/hooks/useArgSchema.ts +0 -37
  673. package/src/hooks/useCoarsePointer.ts +0 -30
  674. package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
  675. package/src/hooks/useFetch/useFetch.tsx +0 -154
  676. package/src/hooks/usePhoneViewport.ts +0 -34
  677. package/src/hooks/useQorusTypes.ts +0 -233
  678. package/src/hooks/useReqraftProperty.ts +0 -16
  679. package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
  680. package/src/hooks/useStorage/useStorage.ts +0 -35
  681. package/src/hooks/useTemplates.ts +0 -123
  682. package/src/hooks/useValidation.ts +0 -9
  683. package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
  684. package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
  685. package/src/hooks/useWhyDidYouUpdate.ts +0 -38
  686. package/src/index.tsx +0 -86
  687. package/src/providers/FetchProvider.tsx +0 -40
  688. package/src/providers/ReqraftProvider.tsx +0 -52
  689. package/src/providers/StorageProvider.tsx +0 -131
  690. package/src/stores/currentUser/currentUser.stories.tsx +0 -100
  691. package/src/stores/currentUser/currentUser.tsx +0 -94
  692. package/src/stories/Data/fileFieldArgSchema.json +0 -86
  693. package/src/stories/Tests/utils.ts +0 -320
  694. package/src/stories/storyNetwork.ts +0 -92
  695. package/src/stories/tracking.tsx +0 -206
  696. package/src/tracking/browser/attach.ts +0 -186
  697. package/src/tracking/browser/env.ts +0 -78
  698. package/src/tracking/core/consent.ts +0 -37
  699. package/src/tracking/core/engagement.ts +0 -47
  700. package/src/tracking/core/experiments.ts +0 -258
  701. package/src/tracking/core/hash.ts +0 -26
  702. package/src/tracking/core/ids.ts +0 -25
  703. package/src/tracking/core/observable.ts +0 -23
  704. package/src/tracking/core/queue.ts +0 -131
  705. package/src/tracking/core/sections.ts +0 -166
  706. package/src/tracking/core/storage.ts +0 -69
  707. package/src/tracking/core/tracker.ts +0 -417
  708. package/src/tracking/core/types.ts +0 -162
  709. package/src/tracking/core/utm.ts +0 -23
  710. package/src/tracking/index.ts +0 -72
  711. package/src/tracking/markup.ts +0 -17
  712. package/src/tracking/react/Experiment.tsx +0 -44
  713. package/src/tracking/react/TrackingProvider.tsx +0 -56
  714. package/src/tracking/react/hooks.ts +0 -106
  715. package/src/tracking/react/index.ts +0 -13
  716. package/src/tracking/testing.ts +0 -108
  717. package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
  718. package/src/tracking/ui/ExperimentCard.tsx +0 -667
  719. package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
  720. package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
  721. package/src/tracking/ui/anchor.ts +0 -180
  722. package/src/tracking/ui/card.ts +0 -464
  723. package/src/tracking/ui/client.ts +0 -117
  724. package/src/tracking/ui/index.ts +0 -77
  725. package/src/tracking/ui/types.ts +0 -110
  726. package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
  727. package/src/types/Form.ts +0 -29
  728. package/src/types.ts +0 -14
  729. package/src/utils/datetime.ts +0 -10
  730. package/src/utils/fetch.ts +0 -457
  731. package/src/utils/lspClient.ts +0 -711
  732. package/src/utils/lspClient.types.ts +0 -211
  733. package/src/utils/queryUnlessCancelled.ts +0 -28
  734. package/src/utils/websocket.ts +0 -293
  735. package/vite.config.ts +0 -58
  736. package/vitest.config.ts +0 -69
@@ -1,1183 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
3
- import { sleep } from '../../../__tests__/utils';
4
- import { useState } from 'react';
5
- import { StoryMeta } from '../../types';
6
- import {
7
- createMockLspServer,
8
- DEFAULT_LSP_CAPABILITIES,
9
- IMockLspServer,
10
- MOCK_LSP_URL,
11
- } from '../smartEditor/__fixtures__/mockLspServer';
12
- import { mockTokenizeDpql } from '../form/expressions/dpqlMockLanguage';
13
- import { DpqlEditor } from './DpqlEditor';
14
- import { TDpqlFsmContext } from './types';
15
-
16
- let lsp: IMockLspServer;
17
-
18
- interface IDpqlEditorStoryArgs {
19
- value?: string;
20
- onChange?: (v: string) => void;
21
- readOnly?: boolean;
22
- provider?: string;
23
- recordType?: string;
24
- useServerParse?: boolean;
25
- alertPayloadContext?: boolean;
26
- fsmContext?: TDpqlFsmContext;
27
- }
28
-
29
- const DpqlEditorWithState = (props: IDpqlEditorStoryArgs) => {
30
- const [value, setValue] = useState(props.value ?? '');
31
- return (
32
- <DpqlEditor
33
- {...props}
34
- value={value}
35
- onChange={(v) => {
36
- setValue(v);
37
- props.onChange?.(v);
38
- }}
39
- />
40
- );
41
- };
42
-
43
- const meta = {
44
- component: DpqlEditorWithState,
45
- title: 'Components/DpqlEditor',
46
- args: {
47
- value: '',
48
- onChange: fn(),
49
- },
50
- async beforeEach(context) {
51
- // Live stories (those with `parameters: { live: true }`) skip
52
- // the mock-socket server so the editor's WebSocket reaches the
53
- // real Qorus `/lsp` endpoint at `wss://hq.qoretechnologies.com:8092/lsp`.
54
- // Prereq: set `REACT_APP_QORUS_TOKEN` before running storybook.
55
- if (context.parameters?.live) {
56
- return undefined;
57
- }
58
- // Captured from the most recent `dpql/setFsmContext`; surfaced inside
59
- // a `$data:` template, mirroring the real server where `$data:{…}`
60
- // resolves against the bound FSM state.
61
- let fsmStateDataKeys: string[] = [];
62
- lsp = createMockLspServer(MOCK_LSP_URL, {
63
- capabilities: {
64
- ...DEFAULT_LSP_CAPABILITIES,
65
- // Trigger chars mirror the real server (QorusLspWebSocketHandler.qc:847).
66
- signatureHelpProvider: {
67
- triggerCharacters: ['(', ',', ' ', '-', '='],
68
- },
69
- },
70
- handlers: {
71
- 'textDocument/semanticTokens/full': (msg, server) => ({
72
- data: mockTokenizeDpql(server.textOf(msg.params?.textDocument?.uri)),
73
- }),
74
-
75
- // Position-aware like the real `dpql-get-completions`: `$` →
76
- // templates, `@` → fields, no sigil → functions/keywords. The
77
- // mock decides from the char before the cursor.
78
- 'textDocument/completion': (msg, server) => {
79
- const cpos = msg.params?.position ?? { line: 0, character: 0 };
80
- const cline = server.documentText.split('\n')[cpos.line] ?? '';
81
- const chead = cline.slice(0, cpos.character);
82
- const sigilMatch = chead.match(/[@$][\w:.{}]*$/);
83
- const sigilToken = sigilMatch ? sigilMatch[0] : '';
84
- const sigil = sigilToken ? sigilToken[0] : '';
85
- // `$data:` with a bound FSM context resolves against the FSM
86
- // state — surface its data keys.
87
- const inFsmDataTemplate =
88
- sigilToken.startsWith('$data:') && fsmStateDataKeys.length > 0;
89
-
90
- const FIELD_ITEMS = [
91
- {
92
- label: '@name',
93
- insertText: '@name',
94
- kind: 5,
95
- detail: 'string',
96
- documentation: {
97
- kind: 'markdown',
98
- value:
99
- '**Display name** of the record.\n\n' +
100
- '- Indexed, case-insensitive\n' +
101
- '- Maps to the `name` column on the underlying table',
102
- },
103
- },
104
- {
105
- label: '@status',
106
- insertText: '@status',
107
- kind: 5,
108
- detail: 'string',
109
- documentation: {
110
- kind: 'markdown',
111
- value:
112
- '**Lifecycle status** — one of:\n\n' +
113
- '- `active`\n- `paused`\n- `archived`',
114
- },
115
- },
116
- {
117
- label: '@age',
118
- insertText: '@age',
119
- kind: 5,
120
- detail: 'int',
121
- documentation: {
122
- kind: 'plaintext',
123
- value: 'Age in years, computed from birth_date.',
124
- },
125
- },
126
- ];
127
-
128
- // Template namespaces — the real server's `$`-context
129
- // completions (QorusExpressionMap).
130
- const TEMPLATE_ITEMS = [
131
- {
132
- label: '$data:',
133
- insertText: '$data:',
134
- kind: 1,
135
- detail: 'template',
136
- documentation: { kind: 'plaintext', value: 'FSM state data.' },
137
- },
138
- {
139
- label: '$config:',
140
- insertText: '$config:',
141
- kind: 1,
142
- detail: 'template',
143
- documentation: {
144
- kind: 'plaintext',
145
- value: 'Interface configuration item.',
146
- },
147
- },
148
- {
149
- label: '$static:',
150
- insertText: '$static:',
151
- kind: 1,
152
- detail: 'template',
153
- documentation: {
154
- kind: 'plaintext',
155
- value: 'Static workflow data.',
156
- },
157
- },
158
- {
159
- label: '$timestamp:',
160
- insertText: '$timestamp:',
161
- kind: 1,
162
- detail: 'template',
163
- documentation: {
164
- kind: 'plaintext',
165
- value: 'Timestamp value (e.g. `now`).',
166
- },
167
- },
168
- ];
169
-
170
- // No sigil → functions/keywords (what autosuggest surfaces).
171
- const FUNCTION_ITEMS = [
172
- {
173
- label: 'substr',
174
- insertText: 'substr',
175
- kind: 3,
176
- detail: '(string, start, length) → string',
177
- documentation: {
178
- kind: 'markdown',
179
- value: 'Extract a substring.',
180
- },
181
- },
182
- {
183
- label: 'coalesce',
184
- insertText: 'coalesce',
185
- kind: 3,
186
- detail: '(value, …) → auto',
187
- documentation: {
188
- kind: 'markdown',
189
- value: 'First non-null value.',
190
- },
191
- },
192
- {
193
- label: 'round',
194
- insertText: 'round',
195
- kind: 3,
196
- detail: '(number, precision) → auto',
197
- documentation: {
198
- kind: 'markdown',
199
- value: 'Round a number.',
200
- },
201
- },
202
- ];
203
-
204
- // FSM state-data keys from `dpql/setFsmContext`, surfaced inside
205
- // `$data:` when a context is bound.
206
- const FSM_DATA_KEY_ITEMS = fsmStateDataKeys.map((key) => ({
207
- label: key,
208
- insertText: key,
209
- kind: 5, // Field
210
- detail: 'FSM state data',
211
- documentation: {
212
- kind: 'plaintext',
213
- value: `\`${key}\` — resolved from the bound FSM state.`,
214
- },
215
- }));
216
-
217
- const items = inFsmDataTemplate
218
- ? FSM_DATA_KEY_ITEMS
219
- : sigil === '$'
220
- ? TEMPLATE_ITEMS
221
- : sigil === '@'
222
- ? FIELD_ITEMS
223
- : // no sigil → functions/keywords
224
- FUNCTION_ITEMS;
225
-
226
- return { items };
227
- },
228
-
229
- // `WithDelayedContext` slows this via `lsp.delays['dpql/setContext']`
230
- // to show the `isContextReady` overlay.
231
- 'dpql/setContext': (msg) => ({
232
- provider: msg.params?.provider ?? null,
233
- recordType: msg.params?.recordType ?? 'record',
234
- fields: {
235
- name: { display_name: 'Name', type: { name: 'string' } },
236
- status: { display_name: 'Status', type: { name: 'string' } },
237
- age: { display_name: 'Age', type: { name: 'int' } },
238
- },
239
- }),
240
-
241
- 'dpql/validate': () => ({ diagnostics: [] }),
242
-
243
- 'dpql/parse': () => ({
244
- success: true,
245
- expression: { exp: 'noop', args: [] },
246
- diagnostics: [],
247
- }),
248
-
249
- 'dpql/serialize': () => ({ dpql: '' }),
250
-
251
- // Canonical alert-payload schema; mirrors the real
252
- // `setDpqlAlertPayloadContext` (QorusLspWebSocketHandler.qc:8439).
253
- 'dpql/setAlertPayloadContext': () => ({
254
- context: 'alert-payload',
255
- fields: {
256
- severity: { display_name: 'Severity', type: { name: 'string' } },
257
- alert_type: { display_name: 'Alert Type', type: { name: 'string' } },
258
- alert_code: { display_name: 'Alert Code', type: { name: 'string' } },
259
- alert_class: { display_name: 'Alert Class', type: { name: 'string' } },
260
- interface_type: { display_name: 'Interface Type', type: { name: 'string' } },
261
- interface_name: { display_name: 'Interface Name', type: { name: 'string' } },
262
- alert_object: { display_name: 'Alert Object', type: { name: 'string' } },
263
- },
264
- }),
265
-
266
- // Echoes a synthetic state_data_keys list; mirrors the real
267
- // response shape (QorusLspWebSocketHandler.qc:8509).
268
- 'dpql/setFsmContext': (msg) => {
269
- const sourceType = msg.params?.fsm
270
- ? 'inline'
271
- : msg.params?.draft_id
272
- ? 'draft'
273
- : msg.params?.fsmid
274
- ? 'published'
275
- : 'cleared';
276
- const stateDataKeys = ['order_id', 'user_name', 'event_type'];
277
- // Keep the keys while bound so completions can surface them in
278
- // `$data:`; a cleared binding drops them.
279
- fsmStateDataKeys = sourceType === 'cleared' ? [] : stateDataKeys;
280
- return {
281
- source_type: sourceType,
282
- current_state: msg.params?.current_state ?? null,
283
- state_data_keys: stateDataKeys,
284
- };
285
- },
286
-
287
- // Synthetic parser mirroring the real response shape
288
- // (UserApi.qc:_priv_get_richtext_string): `$prefix:value` /
289
- // `$prefix:{value}` become tag children, everything else is text.
290
- 'dpql/toRichtext': (msg) => {
291
- const text = msg.params?.text ?? '';
292
- const TEMPLATE_RE = /\$[a-z][-a-z]+:(?:\{[^}]*\}|[\w.]+)/g;
293
- const children: Array<Record<string, unknown>> = [];
294
- let last = 0;
295
- let m: RegExpExecArray | null;
296
- while ((m = TEMPLATE_RE.exec(text)) !== null) {
297
- if (m.index > last) {
298
- children.push({ text: text.slice(last, m.index) });
299
- }
300
- children.push({
301
- type: 'tag',
302
- value: m[0],
303
- label: m[0],
304
- children: [{ text: '' }],
305
- });
306
- last = m.index + m[0].length;
307
- }
308
- if (last < text.length) {
309
- children.push({ text: text.slice(last) });
310
- }
311
- if (children.length === 0) children.push({ text: '' });
312
- return {
313
- type: 'richtext',
314
- value: [{ type: 'paragraph', children }],
315
- };
316
- },
317
-
318
- // Empty edit list — the editor treats this as "no change".
319
- 'textDocument/formatting': () => [],
320
-
321
- // Synthetic `substr(...)` signature; the real server returns the
322
- // active call's signature via `dpql-get-signature-help`.
323
- 'textDocument/signatureHelp': (msg, server) => {
324
- const position = msg.params?.position ?? { line: 0, character: 0 };
325
- const lineText = server.documentText.split('\n')[position.line] ?? '';
326
- const head = lineText.slice(0, position.character);
327
- // Innermost unclosed `(` before the cursor; none means the
328
- // cursor isn't inside a call, so the pill dismisses.
329
- let depth = 0;
330
- let openPos = -1;
331
- for (let i = head.length - 1; i >= 0; i--) {
332
- const c = head[i];
333
- if (c === ')') depth++;
334
- else if (c === '(') {
335
- if (depth === 0) {
336
- openPos = i;
337
- break;
338
- }
339
- depth--;
340
- }
341
- }
342
- if (openPos < 0) {
343
- return { signatures: [], activeSignature: 0, activeParameter: 0 };
344
- }
345
- // Active parameter = commas at depth 0 inside the open call.
346
- const argsRegion = head.slice(openPos + 1);
347
- let nestDepth = 0;
348
- let activeParameter = 0;
349
- for (let i = 0; i < argsRegion.length; i++) {
350
- const c = argsRegion[i];
351
- if (c === '(') nestDepth++;
352
- else if (c === ')') nestDepth--;
353
- else if (c === ',' && nestDepth === 0) activeParameter++;
354
- }
355
- // `substr` (3 distinct params) makes active-parameter
356
- // advancement visible as commas are typed.
357
- return {
358
- signatures: [
359
- {
360
- label: 'substr(String Value, Start Character, Length) → string',
361
- documentation: {
362
- kind: 'markdown',
363
- value:
364
- 'Extracts a substring from `String Value`, ' +
365
- 'starting at `Start Character` (0-based) and ' +
366
- 'taking at most `Length` characters.',
367
- },
368
- parameters: [
369
- {
370
- label: 'String Value',
371
- documentation: 'The source string to extract from.',
372
- },
373
- {
374
- label: 'Start Character',
375
- documentation:
376
- 'The starting character position where the first character is 0.',
377
- },
378
- {
379
- label: 'Length',
380
- documentation: 'The maximum number of characters to return.',
381
- },
382
- ],
383
- },
384
- ],
385
- activeSignature: 0,
386
- activeParameter,
387
- };
388
- },
389
- },
390
- });
391
- return () => lsp.close();
392
- },
393
- } as StoryMeta<typeof DpqlEditorWithState>;
394
-
395
- export default meta;
396
- export type Story = StoryObj<typeof meta>;
397
-
398
- export const Empty: Story = {
399
- parameters: {
400
- docs: {
401
- description: {
402
- story: 'Renders the DpqlEditor with no value — the editor mounts empty and ready for input.',
403
- },
404
- },
405
- },
406
- };
407
-
408
- /**
409
- * No chips / templates — just a valid DPQL literal expression so we can
410
- * verify the editor mounts plain text without any tag elements. (The
411
- * previous example here used SQL `SELECT * FROM …` syntax — DPQL has
412
- * no `SELECT` / `FROM` / `WHERE`; the value was invalid DPQL inherited
413
- * from the qorus-ide Monaco placeholder. See design doc §7.)
414
- */
415
- export const WithPlainText: Story = {
416
- args: {
417
- value: '1 == 1 && "hello" != "world"',
418
- },
419
- parameters: {
420
- docs: {
421
- description: {
422
- story:
423
- 'Renders the DpqlEditor with a plain DPQL literal expression — no field references or templates, so the editor mounts as plain text with no tag chips.',
424
- },
425
- },
426
- },
427
- };
428
-
429
- export const WithFieldReference: Story = {
430
- args: {
431
- value: '@name == "Alice"',
432
- },
433
- parameters: {
434
- docs: {
435
- description: {
436
- story:
437
- 'Renders the DpqlEditor with an @name field reference — the editor mounts with a tag chip for the field and the literal string operand.',
438
- },
439
- },
440
- },
441
- };
442
-
443
- export const WithTemplateVariable: Story = {
444
- args: {
445
- value: 'contains("$local:input", "es")',
446
- },
447
- parameters: {
448
- docs: {
449
- description: {
450
- story:
451
- 'Renders the DpqlEditor with a contains() call whose first argument is a $local:input template — the template renders as a tag chip inside the call.',
452
- },
453
- },
454
- },
455
- };
456
-
457
- export const WithMixedContent: Story = {
458
- args: {
459
- // DPQL uses `&&` for logical AND (not SQL's `AND`). See
460
- // qore-2/design/dpql-syntax.md §"Logical Operators".
461
- value: '@name == $data:{1.name} && @age > $config:min_age',
462
- },
463
- parameters: {
464
- docs: {
465
- description: {
466
- story:
467
- 'Renders the DpqlEditor with mixed content — two @field references, two $data / $config templates and the DPQL "&&" logical operator between them, each rendered as its own chip or token.',
468
- },
469
- },
470
- },
471
- };
472
-
473
- /**
474
- * Exercises the `useServerParse` opt-in (design doc §6). The editor
475
- * calls `dpql/toRichtext` on the LSP and uses the server's structured
476
- * response as the Slate document. While the request is in flight, the
477
- * loading overlay shows; on a successful response, the editor renders
478
- * the server-parsed tree; on failure it falls back silently to the
479
- * client-side regex parser.
480
- *
481
- * The mock's `dpql/toRichtext` handler wraps `$prefix:value` patterns
482
- * as tag chips (matching the real server's behaviour). `@field` refs
483
- * are intentionally NOT chipped by the server response — that's a
484
- * known limitation; the client-side parser handles them in normal
485
- * (non-server-parse) mode.
486
- */
487
- export const WithServerParse: Story = {
488
- args: {
489
- value: '$static:input == "Alice" && $config:min_age > 18',
490
- useServerParse: true,
491
- },
492
- parameters: {
493
- docs: {
494
- description: {
495
- story:
496
- 'Opts into `useServerParse`. Templates (`$static:input`, ' +
497
- '`$config:min_age`) are wrapped as tag chips by the server, ' +
498
- 'not by the client regex. Watch the brief "Connecting…" ' +
499
- 'overlay on first mount while the server response arrives.',
500
- },
501
- },
502
- },
503
- };
504
-
505
- /**
506
- * Demonstrates the `isContextReady` race-fix (CONTEXT_AND_POLISH item 1).
507
- * Mock LSP delays `dpql/setContext` by 1.5s, so for the first 1.5s
508
- * after mount:
509
- * - The editor shows the "Loading schema…" overlay
510
- * - Typing `@` produces no completion dropdown (gated on
511
- * `session.isContextReady`)
512
- * - Once setContext resolves, the overlay disappears and completions
513
- * begin working.
514
- *
515
- * Verifies that the gap between LSP-ready and DPQL-context-bound
516
- * doesn't surface as a silently-empty dropdown anymore.
517
- */
518
- export const WithDelayedContext: Story = {
519
- args: {
520
- value: '@name == "Alice"',
521
- provider: 'datasource:omq/table/users',
522
- recordType: 'record',
523
- },
524
- async beforeEach() {
525
- // The meta-level beforeEach has already created the per-story
526
- // harness; slow down setContext for this story only.
527
- lsp.delays['dpql/setContext'] = 1500;
528
- },
529
- parameters: {
530
- docs: {
531
- description: {
532
- story:
533
- 'Slow `dpql/setContext` response (1.5s). On mount: ' +
534
- '"Loading schema…" overlay; typing `@` during the wait ' +
535
- 'does NOT open the dropdown. After 1.5s: overlay clears, ' +
536
- 'completions begin working normally.',
537
- },
538
- },
539
- },
540
- // CI guard for the `isContextReady` gate: while the 1.5s setContext
541
- // is in flight the "Loading schema…" overlay shows; once it resolves
542
- // the overlay clears.
543
- play: async () => {
544
- // While the 1.5s setContext is in flight, the overlay shows. Poll
545
- // for it (substring match — the copy is "Loading schema…").
546
- await waitFor(
547
- () => expect(document.body.textContent).toContain('Loading schema'),
548
- { timeout: 30000 }
549
- );
550
- // Once setContext resolves, the overlay clears.
551
- await waitFor(
552
- () => expect(document.body.textContent).not.toContain('Loading schema'),
553
- { timeout: 30000 }
554
- );
555
- },
556
- };
557
-
558
- /**
559
- * Demonstrates the `alertPayloadContext` prop (CONTEXT_AND_POLISH
560
- * item 4). Binds the document to the canonical alert-payload schema
561
- * instead of a provider/recordType pair — the field set becomes
562
- * `severity` / `alert_type` / `alert_code` / etc.
563
- *
564
- * Required by the qorus-ide Alert Rule / Silence editor's `match`
565
- * field.
566
- *
567
- * Implementation detail: when `alertPayloadContext` is set at mount,
568
- * the editor includes `metadata.dpql_context: "alert-payload"` in
569
- * the `textDocument/didOpen` notification so the server binds at
570
- * open-time — no extra roundtrip. Later toggles fire an explicit
571
- * `dpql/setAlertPayloadContext` request.
572
- */
573
- export const WithAlertPayloadContext: Story = {
574
- args: {
575
- value: '@severity == "ERROR" && @interface_type == "service"',
576
- alertPayloadContext: true,
577
- },
578
- parameters: {
579
- docs: {
580
- description: {
581
- story:
582
- 'Alert-payload schema binding. Initial value uses ' +
583
- '`@severity` and `@interface_type` — fields the server ' +
584
- 'knows about via the canonical alert-payload context.',
585
- },
586
- },
587
- },
588
- // CI guard: `alertPayloadContext` must bind at `didOpen` time via the
589
- // `dpql_context: "alert-payload"` metadata (not a separate roundtrip).
590
- play: async () => {
591
- // Poll until the didOpen notification arrives and carries the
592
- // alert-payload binding metadata — no fixed sleep racing the socket.
593
- await waitFor(
594
- () => {
595
- const didOpen = lsp.received.find(
596
- (m) => m.method === 'textDocument/didOpen'
597
- );
598
- expect(didOpen).toBeDefined();
599
- expect(didOpen.params.textDocument.metadata?.dpql_context).toBe(
600
- 'alert-payload'
601
- );
602
- },
603
- { timeout: 30000 }
604
- );
605
- },
606
- };
607
-
608
- /**
609
- * Demonstrates the `fsmContext` prop (CONTEXT_AND_POLISH item 4).
610
- * Binds an FSM context for state-aware template completions; the
611
- * mock sends a "published" source_type response when `fsmId` is
612
- * provided.
613
- *
614
- * Required by the qorus-ide FSM state editor when DpqlEditor is
615
- * embedded inside an action's match expression — `$data:` /
616
- * `$fsminput:` templates then resolve against the FSM's state
617
- * graph.
618
- *
619
- * Composable: can be combined with `provider`/`recordType` (provider
620
- * yields `@field` completions; FSM yields `$template:` completions).
621
- */
622
- export const WithFsmContext: Story = {
623
- args: {
624
- value: '',
625
- provider: 'datasource:omq/table/orders',
626
- recordType: 'record',
627
- fsmContext: { fsmId: 42, currentState: 'process_order' },
628
- },
629
- parameters: {
630
- docs: {
631
- description: {
632
- story:
633
- 'Composes provider context (`@field` completions) with FSM ' +
634
- 'context. Typing a `$data:` template surfaces the bound FSM ' +
635
- "state's data keys (`order_id`, `user_name`, `event_type`) — " +
636
- 'the distinctive payload of `fsmContext`. The mock answers ' +
637
- '`dpql/setFsmContext` with `source_type: "published"` and that ' +
638
- 'key list, then returns the keys as completions inside `$data:`.',
639
- },
640
- },
641
- },
642
- // Open the `$data:` template so the snapshot shows the FSM-driven
643
- // state-data keys — this is what makes the story self-explanatory in
644
- // Chromatic and answers "which template is the FSM context": `$data:`.
645
- play: async ({ canvasElement }) => {
646
- const canvas = within(canvasElement);
647
- const editable = canvas.getByRole('textbox');
648
- await waitFor(
649
- () => {
650
- expect(document.body.textContent).not.toContain('Connecting to language server');
651
- expect(document.body.textContent).not.toContain('Loading schema');
652
- },
653
- { timeout: 30000 }
654
- );
655
- await userEvent.click(editable);
656
- await userEvent.type(editable, '$data:');
657
- await waitFor(
658
- () => {
659
- const dropdown = document.querySelector('.reqore-menu');
660
- expect(dropdown).not.toBeNull();
661
- // FSM state-data keys (from the bound fsmContext), NOT the generic
662
- // template namespaces — proves the FSM binding drives these completions.
663
- expect(dropdown!.textContent).toContain('order_id');
664
- expect(dropdown!.textContent).toContain('user_name');
665
- expect(dropdown!.textContent).toContain('event_type');
666
- },
667
- { timeout: 30000 }
668
- );
669
- },
670
- };
671
-
672
- /**
673
- * Demonstrates `textDocument/signatureHelp` (LSP_FEATURES task).
674
- * Initial value `substr("hello", ` leaves the cursor inside a
675
- * function call's argument list — on mount, the mock returns a
676
- * synthetic `substr(String Value, Start Character, Length) → string`
677
- * signature with the active parameter computed from the comma count
678
- * at the cursor.
679
- *
680
- * Mock shape mirrors the real Qorus DPQL server's `substr`
681
- * signature (3 distinct params, capitalized labels, `→ string`
682
- * return annotation) so the mock and live stories exercise
683
- * structurally-identical responses. See
684
- * `LiveDpqlEditorWithSignatureHelp` for the same flow against the
685
- * real backend.
686
- *
687
- * The signature pill renders ABOVE the caret line; the completion
688
- * popover (if it pops up alongside) anchors BELOW. The two coexist
689
- * without overlap.
690
- *
691
- * The mock advertises `signatureHelpProvider.triggerCharacters` in
692
- * its initialize response, so the editor wires up the hook. Servers
693
- * that don't advertise the provider get a silent no-op.
694
- */
695
- export const WithSignatureHelp: Story = {
696
- args: {
697
- value: 'substr("hello", ',
698
- },
699
- parameters: {
700
- docs: {
701
- description: {
702
- story:
703
- 'Signature-help pill above the caret. Type `0, ` to ' +
704
- 'advance to the next parameter (`Start Character` → ' +
705
- '`Length`); typing `)` dismisses.',
706
- },
707
- },
708
- },
709
- // CI regression guard: on mount (cursor inside the open `substr(`
710
- // call) the signature pill must render with the active parameter
711
- // (`Start Character`) highlighted. Mount fires the hook without
712
- // typing, so this is deterministic — see the `Editor.end` fallback
713
- // in `useLspSignatureHelp`.
714
- play: async () => {
715
- // Poll until the signature pill renders (mount fires the hook via the
716
- // `Editor.end` fallback) with the active parameter highlighted.
717
- await waitFor(
718
- () => {
719
- const pill = Array.from(document.querySelectorAll('div')).find(
720
- (el) =>
721
- (el as HTMLElement).style?.position === 'fixed' &&
722
- el.textContent?.includes('substr(String Value')
723
- );
724
- expect(pill).toBeDefined();
725
- expect(pill!.textContent).toContain(
726
- 'substr(String Value, Start Character, Length)'
727
- );
728
- // Active parameter highlighted in a <strong>.
729
- const strong = pill!.querySelector('strong');
730
- expect(strong).not.toBeNull();
731
- expect(strong!.textContent).toBe('Start Character');
732
- },
733
- { timeout: 30000 }
734
- );
735
- },
736
- };
737
-
738
- /**
739
- * **Live spike — hits the real Qorus `/lsp` endpoint** at
740
- * `wss://hq.qoretechnologies.com:8092/lsp` with `languageId: 'dpql'`.
741
- * Used to validate `useLspSignatureHelp` end-to-end against the
742
- * shipped Qorus DPQL handler (`dpql-get-signature-help` in
743
- * `qorus/Classes/QorusLspWebSocketHandler.qc`).
744
- *
745
- * **Initial value: `substr("hello", `** — uses `substr` rather than
746
- * `coalesce` because `substr` has THREE distinct positional
747
- * parameters (`String Value`, `Start Character`, `Length`), so typing
748
- * commas visibly advances the active parameter. The server models
749
- * `coalesce` and `concat` as single-variadic-parameter functions
750
- * (one `Value` slot) — the pill stays static on those.
751
- *
752
- * Server-confirmed via direct probes:
753
- * - `substr("hello", ` → `activeParameter: 1` (Start Character)
754
- * - `substr("hello", 0, ` → `activeParameter: 2` (Length)
755
- *
756
- * Other multi-param candidates verified to advance: `round(Number,
757
- * Precision)`, `format_date(Date To Format, Format String)`,
758
- * `nullif(Value, Compare Value)`, `split(String To Split, Separator)`.
759
- *
760
- * The `parameters: { live: true }` flag tells the meta-level
761
- * `beforeEach` to skip the mock-socket setup so the WebSocket reaches
762
- * the real backend.
763
- *
764
- * **Prereq:** export `REACT_APP_QORUS_TOKEN` before running storybook.
765
- * Without a valid token the WebSocket handshake fails with 401.
766
- *
767
- * **Expected behavior:**
768
- * - On mount, pill appears showing `substr(String Value, Start
769
- * Character, Length) → string` with `Start Character` highlighted
770
- * (already past the first comma).
771
- * - Type `0, ` — pill updates: `Length` is now highlighted.
772
- * - Type `)` — pill dismisses (server returns empty signatures when
773
- * the call is closed).
774
- *
775
- * **If no pill appears**, the most likely causes are:
776
- * - The real server doesn't advertise `signatureHelpProvider` for
777
- * `languageId: 'dpql'` (capability drift — check via DevTools
778
- * Network → WS frame inspector → `initialize` response).
779
- * - The server's `dpql-get-signature-help` returns a shape our
780
- * client doesn't parse (check the response body for the request).
781
- * - The token is invalid (401 in DevTools Network).
782
- */
783
- export const LiveDpqlEditorWithSignatureHelp: Story = {
784
- // Real DPQL LSP — excluded from the play-test runner and from Chromatic
785
- // (CI has no token/network, so the play would flake the snapshot).
786
- tags: ['!test'],
787
- args: {
788
- value: 'substr("hello", ',
789
- },
790
- parameters: {
791
- live: true,
792
- chromatic: { disable: true },
793
- docs: {
794
- description: {
795
- story:
796
- 'Hits the real Qorus DPQL LSP — no mock. Initial value is ' +
797
- '`substr("hello", ` so active-parameter advancement is ' +
798
- 'visible (`coalesce` would not advance because the server ' +
799
- 'models it as single-variadic-param). Set ' +
800
- '`REACT_APP_QORUS_TOKEN` before launching storybook.',
801
- },
802
- },
803
- },
804
- // The signature pill fires on mount (cursor inside the open `substr(`
805
- // call) — no typing needed. Poll for it so a manual run shows the
806
- // real pill. Verified live: `substr("hello", ` →
807
- // `substr(String Value, Start Character, Length) → string`,
808
- // activeParameter 1.
809
- play: async () => {
810
- await waitFor(
811
- () => {
812
- const pill = Array.from(document.querySelectorAll('div')).find(
813
- (el) =>
814
- (el as HTMLElement).style?.position === 'fixed' &&
815
- el.textContent?.includes('substr(String Value')
816
- );
817
- expect(pill).toBeDefined();
818
- },
819
- { timeout: 30000 }
820
- );
821
- },
822
- };
823
-
824
- /**
825
- * **Live — real `/lsp`, with an alert-payload context bound.** This is
826
- * the story to verify `@` **field** completions against the real
827
- * server. `alertPayloadContext: true` fires `dpql/setAlertPayloadContext`,
828
- * binding the canonical alert schema — so typing `@` returns real fields
829
- * (`@severity`, `@alert_type`, `@interface_type`, …).
830
- *
831
- * Why a dedicated story: the no-context `LiveDpqlEditorWithSignatureHelp`
832
- * returns nothing on `@` (field refs need a bound context — the server's
833
- * NO-CONTEXT path yields functions/keywords/templates but not fields).
834
- * This story supplies that context so the `@` path is exercisable live.
835
- *
836
- * Also exercises `$` → templates in the same editor (server returns the
837
- * global namespaces context-free).
838
- *
839
- * **Prereq:** export `REACT_APP_QORUS_TOKEN` before running storybook.
840
- */
841
- export const LiveDpqlEditorWithAlertPayload: Story = {
842
- // Real DPQL LSP — excluded from the play-test runner and from Chromatic
843
- // (CI has no token/network).
844
- tags: ['!test'],
845
- args: {
846
- value: '@severity == "MAJOR" and ',
847
- alertPayloadContext: true,
848
- },
849
- parameters: {
850
- live: true,
851
- chromatic: { disable: true },
852
- docs: {
853
- description: {
854
- story:
855
- 'Real `/lsp` with `alertPayloadContext`. Type `@` → real ' +
856
- 'alert-payload fields; type `$` → template namespaces. The ' +
857
- 'context story you use to verify `@` field completions live.',
858
- },
859
- },
860
- },
861
- // Type `@` to open real alert-payload field completions so the
862
- // Chromatic snapshot shows live data. Verified live (alert-payload
863
- // context bound at didOpen): `…and @` → 21 fields (alert_type,
864
- // alert_code, severity, …).
865
- play: async ({ canvasElement }) => {
866
- const canvas = within(canvasElement);
867
- const editable = canvas.getByRole('textbox');
868
- await sleep(3000); // let the live LSP session connect before typing (real WS handshake)
869
- await userEvent.click(editable);
870
- await userEvent.type(editable, '@');
871
- await waitFor(
872
- () => {
873
- const dropdown = document.querySelector('.reqore-menu');
874
- expect(dropdown).not.toBeNull();
875
- expect(dropdown!.textContent).toContain('alert_type');
876
- },
877
- { timeout: 30000 }
878
- );
879
- },
880
- };
881
-
882
- /**
883
- * Demonstrates LSP-driven syntax highlighting (design doc §7) across a
884
- * representative DPQL expression touching every coloured token type:
885
- * field references, templates, operators, string / number / boolean /
886
- * null literals, regex, range, keywords, parens.
887
- *
888
- * The story's mock LSP runs a small DPQL-correct tokenizer (defined at
889
- * the top of this file) and returns the LSP-encoded int array; the
890
- * editor's `useLspSemanticTokens` hook decodes it and renders each
891
- * token in the theme palette defined in `SmartEditor`.
892
- */
893
- export const WithSemanticTokens: Story = {
894
- args: {
895
- value:
896
- '@status in ("active", "pending") && @age between 18 and 65 ' +
897
- '&& @email =~ /^[a-z]+@example\\.com$/i ' +
898
- '&& @balance > 0 && @deleted != true',
899
- },
900
- parameters: {
901
- docs: {
902
- description: {
903
- story:
904
- 'Every coloured DPQL token category. Variables (`@status`, ' +
905
- '`@age`, …) in red, operators (`==`, `&&`, `=~`, `between`) ' +
906
- 'in cyan, strings in green, numbers in orange, keywords ' +
907
- '(`in`, `between`, `and`, `not`, `true`) in purple, regex ' +
908
- 'in cyan.',
909
- },
910
- },
911
- },
912
- // CI guard for the semantic-token pipeline (server tokens → decode →
913
- // decorate → coloured leaf). Assert the editor rendered spans carrying
914
- // the palette colours: keyword purple (#c678dd → rgb(198,120,221)) and
915
- // string green (#98c379 → rgb(152,195,121)). If the decoration breaks,
916
- // the tokens render uncoloured and these are absent.
917
- play: async ({ canvasElement }) => {
918
- const canvas = within(canvasElement);
919
- const editable = canvas.getByRole('textbox');
920
- // Poll until the semantic-token pipeline has coloured the leaves
921
- // (server tokens → decode → decorate). Before the round-trip lands
922
- // the spans are uncoloured and these assertions fail.
923
- await waitFor(
924
- () => {
925
- const colors = Array.from(editable.querySelectorAll('span'))
926
- .map((s) => (s as HTMLElement).style.color)
927
- .filter(Boolean);
928
- expect(colors).toContain('rgb(198, 120, 221)'); // keyword purple
929
- expect(colors).toContain('rgb(152, 195, 121)'); // string green
930
- },
931
- { timeout: 30000 }
932
- );
933
- },
934
- };
935
-
936
- export const ReadOnly: Story = {
937
- args: {
938
- value: '@name == "Alice"',
939
- readOnly: true,
940
- },
941
- parameters: {
942
- docs: {
943
- description: {
944
- story:
945
- 'Renders the DpqlEditor with a valued expression but readOnly enabled — the field chip and literal render but the editor cannot be edited.',
946
- },
947
- },
948
- },
949
- };
950
-
951
- /**
952
- * Templates via the `$` trigger — the server's design (mirrored in the
953
- * mock): typing `$` opens template-namespace completions
954
- * (`$data:`, `$config:`, `$static:`, `$timestamp:`), the same on-typing
955
- * dropdown that `@` uses for fields. There is no separate "Templates"
956
- * button — `dpql-get-completions` is position-aware and returns
957
- * templates after `$`, fields after `@`.
958
- */
959
- export const WithTemplates: Story = {
960
- args: {
961
- value: '',
962
- onChange: fn(),
963
- },
964
- parameters: {
965
- docs: {
966
- description: {
967
- story:
968
- 'Type `$` to open the template namespaces (`$data:`, ' +
969
- '`$config:`, …). Templates and fields share one on-typing ' +
970
- 'completion dropdown — `$`→templates, `@`→fields. No ' +
971
- 'separate Templates button.',
972
- },
973
- },
974
- },
975
- // CI guard: `$` opens templates, `@` opens fields — proves the
976
- // position-aware routing.
977
- play: async ({ canvasElement }) => {
978
- const canvas = within(canvasElement);
979
- const editable = canvas.getByRole('textbox');
980
- await userEvent.click(editable);
981
-
982
- // `$` → templates
983
- await userEvent.type(editable, '$');
984
- await waitFor(
985
- () => {
986
- const dropdown = document.querySelector('.reqore-menu');
987
- expect(dropdown).not.toBeNull();
988
- expect(dropdown!.textContent).toContain('$data:');
989
- expect(dropdown!.textContent).toContain('$config:');
990
- // Field refs must NOT appear in the `$` dropdown.
991
- expect(dropdown!.textContent).not.toContain('@name');
992
- },
993
- { timeout: 30000 }
994
- );
995
-
996
- // Clear and switch to `@` → fields.
997
- await userEvent.clear(editable);
998
- await userEvent.type(editable, '@');
999
- await waitFor(
1000
- () => {
1001
- const dropdown = document.querySelector('.reqore-menu');
1002
- expect(dropdown).not.toBeNull();
1003
- expect(dropdown!.textContent).toContain('@name');
1004
- expect(dropdown!.textContent).not.toContain('$data:');
1005
- },
1006
- { timeout: 30000 }
1007
- );
1008
- },
1009
- };
1010
-
1011
- /**
1012
- * Autosuggest — typing a **bare identifier** (no `@` / `$` sigil) opens
1013
- * function / keyword completions as you type, e.g. `sub` → `substr`.
1014
- * No trigger character or manual invoke needed.
1015
- *
1016
- * The dropdown only appears when the server actually has suggestions:
1017
- * the request is "quiet" (the popover stays closed until items arrive),
1018
- * and the position-aware server returns `[]` where completion isn't
1019
- * appropriate (inside a string, a dead-end token) so nothing flickers.
1020
- */
1021
- export const WithAutosuggest: Story = {
1022
- args: {
1023
- value: '',
1024
- onChange: fn(),
1025
- },
1026
- parameters: {
1027
- docs: {
1028
- description: {
1029
- story:
1030
- 'Type a bare identifier (no sigil) — e.g. `sub` — and ' +
1031
- 'function completions appear (`substr`). Autosuggest fires ' +
1032
- 'on identifier typing; the server gates what (if anything) ' +
1033
- 'shows.',
1034
- },
1035
- },
1036
- },
1037
- play: async ({ canvasElement }) => {
1038
- const canvas = within(canvasElement);
1039
- const editable = canvas.getByRole('textbox');
1040
- await userEvent.click(editable);
1041
- // Bare identifier — no trigger char. Autosuggest should open the
1042
- // dropdown and narrow to `substr`.
1043
- await userEvent.type(editable, 'sub');
1044
- await waitFor(
1045
- () => {
1046
- const dropdown = document.querySelector('.reqore-menu');
1047
- expect(dropdown).not.toBeNull();
1048
- expect(dropdown!.textContent).toContain('substr');
1049
- // Non-matching functions are filtered out by the typed prefix.
1050
- expect(dropdown!.textContent).not.toContain('round');
1051
- },
1052
- { timeout: 30000 }
1053
- );
1054
- },
1055
- };
1056
-
1057
- /**
1058
- * Sanity check that the editor mounts and accepts plain typing. Mirrors the
1059
- * `CanTypeText` story on the qorus-ide feature/dpql-editor branch.
1060
- */
1061
- export const CanTypeText: Story = {
1062
- args: {
1063
- value: '',
1064
- onChange: fn(),
1065
- },
1066
- parameters: {
1067
- docs: {
1068
- description: {
1069
- story:
1070
- 'Renders the empty DpqlEditor and types "hello" into it — the editor accepts the plain text and fires onChange.',
1071
- },
1072
- },
1073
- },
1074
- play: async ({ canvasElement, args }) => {
1075
- const canvas = within(canvasElement);
1076
-
1077
- const editable = canvas.getByRole('textbox');
1078
- await userEvent.click(editable);
1079
- await userEvent.type(editable, 'hello');
1080
-
1081
- await expect(args.onChange).toHaveBeenCalled();
1082
- },
1083
- };
1084
-
1085
- /**
1086
- * End-to-end LSP completion test. Types `@`, waits for the mock server to
1087
- * receive `textDocument/completion`, and asserts the canned completion
1088
- * items render in the dropdown. This guards the entire request-correlation
1089
- * + autocomplete-debounce + dropdown-rendering path.
1090
- */
1091
- export const LspCompletionRoundtrip: Story = {
1092
- args: {
1093
- value: '',
1094
- onChange: fn(),
1095
- },
1096
- parameters: {
1097
- docs: {
1098
- description: {
1099
- story:
1100
- 'Renders the empty DpqlEditor and types the "@" trigger — the LSP receives a textDocument/completion request against a dpql:// document URI and the dropdown mounts with the canned @name / @status / @age items.',
1101
- },
1102
- },
1103
- },
1104
- play: async ({ canvasElement }) => {
1105
- const canvas = within(canvasElement);
1106
-
1107
- const editable = canvas.getByRole('textbox');
1108
- await userEvent.click(editable);
1109
- await userEvent.type(editable, '@');
1110
-
1111
- // Poll until the server received the completion request (the
1112
- // autocomplete debounce is 150ms; the round-trip + re-render follow).
1113
- await waitFor(
1114
- () => {
1115
- const completionReq = lsp.received.find(
1116
- (m) => m.method === 'textDocument/completion'
1117
- );
1118
- expect(completionReq).toBeDefined();
1119
- // useLspSession (Phase 1 + SmartEditor refactor) generates URIs as
1120
- // `${languageId}://session/<n>` — for DPQL that's `dpql://session/<n>`.
1121
- expect(completionReq.params.textDocument.uri).toMatch(
1122
- /^dpql:\/\/session\//
1123
- );
1124
- },
1125
- { timeout: 30000 }
1126
- );
1127
-
1128
- // Dropdown rendered the canned items. They live outside the canvas
1129
- // (Popover portal), so query the document directly.
1130
- await waitFor(
1131
- () => {
1132
- const dropdown = document.querySelector('.reqore-menu');
1133
- expect(dropdown).not.toBeNull();
1134
- expect(dropdown!.textContent).toContain('@name');
1135
- expect(dropdown!.textContent).toContain('@status');
1136
- expect(dropdown!.textContent).toContain('@age');
1137
- },
1138
- { timeout: 30000 }
1139
- );
1140
- },
1141
- };
1142
-
1143
- /**
1144
- * Two editors mounted at once share ONE WebSocket — the `LspSharedConnection`
1145
- * multiplexing layer in `lspClient.ts`. Each editor opens its own document
1146
- * URI on the shared socket (`textDocument/didOpen` ×2) but the server sees a
1147
- * single physical connection and a single `initialize` handshake.
1148
- */
1149
- export const TwoEditorsOneConnection: Story = {
1150
- parameters: {
1151
- chromatic: { disable: true },
1152
- docs: {
1153
- description: {
1154
- story:
1155
- 'Renders two DpqlEditor instances side by side — both share a single WebSocket via LspSharedConnection and each opens its own document URI, so the server sees one initialize but two didOpen notifications.',
1156
- },
1157
- },
1158
- },
1159
- render: () => (
1160
- <>
1161
- <DpqlEditorWithState value='name' />
1162
- <DpqlEditorWithState value='status' />
1163
- </>
1164
- ),
1165
- async play() {
1166
- await waitFor(
1167
- () => expect(document.querySelectorAll('[contenteditable="true"]')).toHaveLength(2),
1168
- { timeout: 10000 }
1169
- );
1170
- await waitFor(
1171
- () => {
1172
- const uris = new Set(
1173
- lsp.received
1174
- .filter((m) => m.method === 'textDocument/didOpen')
1175
- .map((m) => m.params?.textDocument?.uri)
1176
- );
1177
- expect(uris.size).toBe(2);
1178
- },
1179
- { timeout: 10000 }
1180
- );
1181
- await waitFor(() => expect(lsp.getOpenConnectionCount()).toBe(1), { timeout: 10000 });
1182
- },
1183
- };