@code0-tech/pictor 0.0.0-mvp.25 → 0.0.0-mvp.27

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 (286) hide show
  1. package/dist/assets/components/badge/Badge.style.css +1 -1
  2. package/dist/assets/components/button/Button.style.css +1 -1
  3. package/dist/assets/components/context-menu/ContextMenu.style.css +1 -0
  4. package/dist/assets/components/d-flow-folder/DFlowFolder.style.css +1 -0
  5. package/dist/assets/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.style.css +1 -1
  6. package/dist/assets/components/d-flow-panel/DFlowMiniMap.style.css +1 -0
  7. package/dist/assets/components/d-flow-suggestion/DFlowSuggestionSearchInput.style.css +1 -0
  8. package/dist/assets/components/d-layout/DLayout.style.css +1 -1
  9. package/dist/assets/components/d-resizable/DResizable.style.css +1 -1
  10. package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
  11. package/dist/assets/components/form/Input.style.css +1 -1
  12. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
  13. package/dist/components/avatar/Avatar.js +7 -7
  14. package/dist/components/badge/Badge.d.ts +1 -1
  15. package/dist/components/badge/Badge.js +57 -17
  16. package/dist/components/breadcrumb/Breadcrumb.js +5 -5
  17. package/dist/components/button/Button.js +8 -8
  18. package/dist/components/context-menu/ContextMenu.d.ts +31 -0
  19. package/dist/components/context-menu/ContextMenu.js +191 -0
  20. package/dist/components/d-application/DApplication.service.d.ts +5 -0
  21. package/dist/components/d-application/DApplication.service.js +9 -0
  22. package/dist/components/d-flow/DFlow.d.ts +5 -3
  23. package/dist/components/d-flow/DFlow.edges.hook.d.ts +2 -1
  24. package/dist/components/d-flow/DFlow.edges.hook.js +98 -136
  25. package/dist/components/d-flow/DFlow.js +214 -199
  26. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +5 -1
  27. package/dist/components/d-flow/DFlow.nodes.hook.js +101 -123
  28. package/dist/components/d-flow/DFlow.service.d.ts +12 -7
  29. package/dist/components/d-flow/DFlow.service.js +117 -7
  30. package/dist/components/d-flow/{edge/DFlowEdge.d.ts → DFlowEdge.d.ts} +5 -3
  31. package/dist/components/d-flow/DFlowEdge.js +69 -0
  32. package/dist/components/d-flow/index.d.ts +1 -10
  33. package/dist/components/d-flow/index.js +9 -44
  34. package/dist/components/d-flow-data-type/DFlowDataType.service.d.ts +9 -0
  35. package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.service.js +12 -10
  36. package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.view.d.ts +8 -2
  37. package/dist/components/d-flow-data-type/DFlowDataType.view.js +71 -0
  38. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.d.ts +2 -3
  39. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.js +3 -3
  40. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.d.ts +2 -3
  41. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.js +4 -4
  42. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.d.ts +2 -3
  43. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.js +3 -3
  44. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -3
  45. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +246 -0
  46. package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.d.ts +2 -3
  47. package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabDefault.d.ts +2 -3
  48. package/dist/components/d-flow-file/DFlowTabDefault.js +139 -0
  49. package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabTrigger.d.ts +2 -2
  50. package/dist/components/d-flow-file/DFlowTabTrigger.js +75 -0
  51. package/dist/components/d-flow-file/DFlowTabs.d.ts +6 -0
  52. package/dist/components/d-flow-file/DFlowTabs.js +128 -0
  53. package/dist/components/d-flow-file/index.d.ts +1 -0
  54. package/dist/components/d-flow-file/index.js +4 -0
  55. package/dist/components/{d-flow/folder → d-flow-folder}/DFlowFolder.d.ts +11 -5
  56. package/dist/components/d-flow-folder/DFlowFolder.js +158 -0
  57. package/dist/components/d-flow-folder/DFlowFolderContextMenu.d.ts +18 -0
  58. package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +69 -0
  59. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +9 -0
  60. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +76 -0
  61. package/dist/components/d-flow-folder/DFlowFolderItemPathInput.d.ts +5 -0
  62. package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +49 -0
  63. package/dist/components/d-flow-folder/DFlowFolderRenameDialog.d.ts +9 -0
  64. package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +55 -0
  65. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.d.ts +1 -1
  66. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.js +1 -1
  67. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.return.hook.d.ts +2 -2
  68. package/dist/components/d-flow-function/DFlowFunction.return.hook.js +9 -0
  69. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.service.d.ts +1 -1
  70. package/dist/components/d-flow-function/DFlowFunction.service.js +12 -0
  71. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.view.d.ts +12 -0
  72. package/dist/components/d-flow-function/DFlowFunction.view.js +132 -0
  73. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.d.ts +4 -4
  74. package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +120 -0
  75. package/dist/components/d-flow-function/DFlowFunctionGroupCard.d.ts +13 -0
  76. package/dist/components/d-flow-function/DFlowFunctionGroupCard.js +68 -0
  77. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionSuggestionCard.d.ts +3 -4
  78. package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +48 -0
  79. package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionTriggerCard.d.ts +3 -3
  80. package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +71 -0
  81. package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.d.ts +1 -1
  82. package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.js +175 -165
  83. package/dist/components/d-flow-panel/DFlowExport.js +32 -0
  84. package/dist/components/d-flow-panel/DFlowMiniMap.js +33 -0
  85. package/dist/components/d-flow-panel/DFlowPanelControl.d.ts +6 -0
  86. package/dist/components/d-flow-panel/DFlowPanelControl.js +70 -0
  87. package/dist/components/d-flow-panel/DFlowPanelLayout.d.ts +4 -0
  88. package/dist/components/d-flow-panel/DFlowPanelLayout.js +47 -0
  89. package/dist/components/d-flow-panel/DFlowPanelSize.d.ts +2 -0
  90. package/dist/components/d-flow-panel/DFlowPanelSize.js +94 -0
  91. package/dist/components/d-flow-panel/index.d.ts +5 -0
  92. package/dist/components/d-flow-panel/index.js +12 -0
  93. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestion.hook.d.ts +0 -15
  94. package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +161 -0
  95. package/dist/components/d-flow-suggestion/DFlowSuggestion.view.d.ts +14 -0
  96. package/dist/components/d-flow-suggestion/DFlowSuggestion.view.js +4 -0
  97. package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +83 -0
  98. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.d.ts +1 -1
  99. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.js +1 -1
  100. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.js +5 -5
  101. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.d.ts +1 -1
  102. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.js +1 -1
  103. package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionSearchInput.d.ts +1 -1
  104. package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +35 -0
  105. package/dist/components/d-flow-suggestion/index.d.ts +1 -0
  106. package/dist/components/d-flow-suggestion/index.js +4 -0
  107. package/dist/components/{d-flow/type → d-flow-type}/DFlowType.service.d.ts +1 -1
  108. package/dist/components/d-flow-type/DFlowType.service.js +12 -0
  109. package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.d.ts +6 -0
  110. package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.js +16 -10
  111. package/dist/components/d-flow-validation/DDataTypeValidation.hook.d.ts +2 -0
  112. package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +18 -0
  113. package/dist/components/d-flow-validation/DFlowValidation.hook.d.ts +3 -0
  114. package/dist/components/d-flow-validation/DFlowValidation.hook.js +22 -0
  115. package/dist/components/d-flow-validation/DFlowValidation.js +66 -0
  116. package/dist/components/d-flow-validation/DNodeValidation.hook.d.ts +3 -0
  117. package/dist/components/d-flow-validation/DNodeValidation.hook.js +62 -0
  118. package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +3 -0
  119. package/dist/components/d-flow-validation/DValueValidation.hook.js +8 -0
  120. package/dist/components/{d-flow/validation → d-flow-validation}/index.js +2 -2
  121. package/dist/components/d-fullscreen/DFullScreen.js +2 -2
  122. package/dist/components/d-member/DNamespaceMemberContent.js +140 -92
  123. package/dist/components/d-member/DNamespaceMemberList.js +5 -5
  124. package/dist/components/d-organization/DOrganizationList.js +7 -7
  125. package/dist/components/d-organization/DOrganizationMenu.js +5 -5
  126. package/dist/components/d-organization/DOrganizatonContent.js +29 -29
  127. package/dist/components/d-project/DNamespaceProjectContent.js +6 -6
  128. package/dist/components/d-project/DNamespaceProjectList.js +5 -5
  129. package/dist/components/d-project/DNamespaceProjectMenu.js +51 -22
  130. package/dist/components/d-project/index.js +10 -9
  131. package/dist/components/d-resizable/DResizable.js +18 -17
  132. package/dist/components/d-role/DNamespaceRoleContent.js +11 -11
  133. package/dist/components/d-role/DNamespaceRolePermissions.js +5 -5
  134. package/dist/components/d-runtime/DRuntimeContent.js +10 -10
  135. package/dist/components/d-runtime/DRuntimeList.js +7 -7
  136. package/dist/components/d-user/DUser.session.hook.js +2 -2
  137. package/dist/components/d-user/DUserContent.js +19 -19
  138. package/dist/components/d-user/DUserInput.js +9 -9
  139. package/dist/components/d-user/DUserList.js +9 -9
  140. package/dist/components/file-tabs/FileTabs.js +2 -2
  141. package/dist/components/file-tabs/FileTabs.service.d.ts +5 -0
  142. package/dist/components/file-tabs/FileTabs.service.js +68 -16
  143. package/dist/components/file-tabs/FileTabs.view.d.ts +1 -0
  144. package/dist/components/form/CheckboxInput.js +4 -4
  145. package/dist/components/form/EmailInput.js +12 -12
  146. package/dist/components/form/Input.js +220 -206
  147. package/dist/components/form/Input.selection.hook.js +9 -9
  148. package/dist/components/form/Input.syntax.hook.js +7 -7
  149. package/dist/components/form/NumberInput.js +9 -9
  150. package/dist/components/form/PasswordInput.js +6 -6
  151. package/dist/components/form/SwitchInput.js +7 -7
  152. package/dist/components/form/TextInput.js +10 -10
  153. package/dist/components/segmented-control/SegmentedControl.d.ts +1 -1
  154. package/dist/components/segmented-control/SegmentedControl.js +14 -12
  155. package/dist/index.d.ts +8 -0
  156. package/dist/index.js +117 -117
  157. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
  158. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
  159. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
  160. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
  161. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
  162. package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  163. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  164. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
  165. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
  166. package/dist/node_modules/@radix-ui/react-context/dist/index.js +53 -0
  167. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +222 -0
  168. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
  169. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
  170. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
  171. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
  172. package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
  173. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +636 -0
  174. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
  175. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
  176. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
  177. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  178. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
  179. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  180. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
  181. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  182. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  183. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  184. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
  185. package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  186. package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
  187. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
  188. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
  189. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
  190. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
  191. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
  192. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
  193. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
  194. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  195. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  196. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
  197. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
  198. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
  199. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
  200. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
  201. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
  202. package/dist/node_modules/tslib/tslib.es6.js +27 -0
  203. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
  204. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
  205. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
  206. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  207. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
  208. package/dist/utils/generics.d.ts +5 -6
  209. package/dist/utils/generics.js +2 -2
  210. package/dist/utils/objectStore.js +15 -15
  211. package/dist/utils/reactiveArrayService.js +5 -5
  212. package/package.json +7 -4
  213. package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +0 -1
  214. package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +0 -1
  215. package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +0 -1
  216. package/dist/components/d-flow/DFlow.view.d.ts +0 -113
  217. package/dist/components/d-flow/DFlow.view.js +0 -248
  218. package/dist/components/d-flow/control/DFlowControl.d.ts +0 -2
  219. package/dist/components/d-flow/control/DFlowControl.js +0 -81
  220. package/dist/components/d-flow/control/index.d.ts +0 -1
  221. package/dist/components/d-flow/control/index.js +0 -4
  222. package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +0 -10
  223. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +0 -2
  224. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +0 -18
  225. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +0 -4
  226. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +0 -20
  227. package/dist/components/d-flow/data-type/DFlowDataType.view.js +0 -65
  228. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +0 -243
  229. package/dist/components/d-flow/edge/DFlowEdge.js +0 -48
  230. package/dist/components/d-flow/export/DFlowExport.js +0 -24
  231. package/dist/components/d-flow/folder/DFlowFolder.js +0 -119
  232. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +0 -11
  233. package/dist/components/d-flow/function/DFlowFunction.service.js +0 -9
  234. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +0 -10
  235. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +0 -74
  236. package/dist/components/d-flow/function/DFlowFunction.view.js +0 -117
  237. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +0 -158
  238. package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +0 -5
  239. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +0 -55
  240. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +0 -26
  241. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +0 -93
  242. package/dist/components/d-flow/minimap/DFlowMiniMap.js +0 -22
  243. package/dist/components/d-flow/minimap/index.d.ts +0 -1
  244. package/dist/components/d-flow/minimap/index.js +0 -4
  245. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +0 -150
  246. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +0 -5
  247. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +0 -18
  248. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +0 -21
  249. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +0 -25
  250. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +0 -67
  251. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +0 -35
  252. package/dist/components/d-flow/suggestion/index.d.ts +0 -2
  253. package/dist/components/d-flow/suggestion/index.js +0 -7
  254. package/dist/components/d-flow/tab/DFlowTabDefault.js +0 -103
  255. package/dist/components/d-flow/tab/DFlowTabTrigger.js +0 -51
  256. package/dist/components/d-flow/tab/DFlowTabs.d.ts +0 -2
  257. package/dist/components/d-flow/tab/DFlowTabs.js +0 -105
  258. package/dist/components/d-flow/type/DFlowType.service.js +0 -9
  259. package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +0 -3
  260. package/dist/components/d-flow/validation/DFlowValidation.hook.js +0 -10
  261. package/dist/components/d-flow/validation/DFlowValidation.js +0 -60
  262. /package/dist/assets/components/{d-flow/input → d-flow-input}/DFlowInputDataType.style.css +0 -0
  263. /package/dist/assets/components/{d-flow/validation → d-flow-validation}/DFlowValidation.style.css +0 -0
  264. /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.d.ts +0 -0
  265. /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.js +0 -0
  266. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.d.ts +0 -0
  267. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.js +0 -0
  268. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.d.ts +0 -0
  269. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.js +0 -0
  270. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.d.ts +0 -0
  271. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.js +0 -0
  272. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.js +0 -0
  273. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.d.ts +0 -0
  274. /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.js +0 -0
  275. /package/dist/components/{d-flow/folder → d-flow-folder}/index.d.ts +0 -0
  276. /package/dist/components/{d-flow/folder → d-flow-folder}/index.js +0 -0
  277. /package/dist/components/{d-flow/function → d-flow-function}/index.d.ts +0 -0
  278. /package/dist/components/{d-flow/function → d-flow-function}/index.js +0 -0
  279. /package/dist/components/{d-flow/export → d-flow-panel}/DFlowExport.d.ts +0 -0
  280. /package/dist/components/{d-flow/minimap → d-flow-panel}/DFlowMiniMap.d.ts +0 -0
  281. /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.d.ts +0 -0
  282. /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.d.ts +0 -0
  283. /package/dist/components/{d-flow/type → d-flow-type}/index.d.ts +0 -0
  284. /package/dist/components/{d-flow/type → d-flow-type}/index.js +0 -0
  285. /package/dist/components/{d-flow/validation → d-flow-validation}/DFlowValidation.d.ts +0 -0
  286. /package/dist/components/{d-flow/validation → d-flow-validation}/index.d.ts +0 -0
@@ -1,121 +1,133 @@
1
- import { jsx as y, jsxs as z, Fragment as et } from "react/jsx-runtime";
2
- import f, { useRef as A, useState as N, useEffect as k, useMemo as Ke } from "react";
1
+ import { jsx as y, jsxs as z, Fragment as lt } from "react/jsx-runtime";
2
+ import d, { useRef as A, useState as L, useEffect as k, useMemo as Je } from "react";
3
3
  import "../../utils/contextStore.js";
4
- import { mergeCode0Props as fe } from "../../utils/utils.js";
4
+ import { mergeCode0Props as ge } from "../../utils/utils.js";
5
5
  import '../../assets/components/form/Input.style.css';/* empty css */
6
- import { InputLabel as tt } from "./InputLabel.js";
7
- import { InputDescription as nt } from "./InputDescription.js";
8
- import { InputMessage as rt } from "./InputMessage.js";
9
- import { Menu as at, MenuTrigger as st, MenuPortal as ot } from "../menu/Menu.js";
10
- import { InputSuggestionMenuContent as it, InputSuggestionMenuContentItems as lt } from "./InputSuggestion.js";
11
- import { InputSyntax as ut } from "./InputSyntax.js";
12
- import { useSyntaxModel as ct } from "./Input.syntax.hook.js";
13
- import { useSelectionVisibility as dt, useSelectionNormalization as ft, useSelectionResolution as gt } from "./Input.selection.hook.js";
14
- import { setSelectionRangeSafe as T, getSelectionMetrics as U, setElementKey as ze } from "./Input.utils.js";
15
- import { Card as mt } from "../card/Card.js";
16
- const pt = f.forwardRef((te, Ue) => {
6
+ import { InputLabel as ut } from "./InputLabel.js";
7
+ import { InputDescription as ct } from "./InputDescription.js";
8
+ import { InputMessage as dt } from "./InputMessage.js";
9
+ import { Menu as ft, MenuTrigger as gt, MenuPortal as mt } from "../menu/Menu.js";
10
+ import { InputSuggestionMenuContent as pt, InputSuggestionMenuContentItems as ht } from "./InputSuggestion.js";
11
+ import { InputSyntax as xt } from "./InputSyntax.js";
12
+ import { useSyntaxModel as St } from "./Input.syntax.hook.js";
13
+ import { useSelectionVisibility as vt, useSelectionNormalization as kt, useSelectionResolution as wt } from "./Input.selection.hook.js";
14
+ import { setSelectionRangeSafe as T, getSelectionMetrics as U, setElementKey as Xe } from "./Input.utils.js";
15
+ import { Card as yt } from "../card/Card.js";
16
+ const It = d.forwardRef((te, Ye) => {
17
17
  const {
18
- wrapperComponent: We = {},
19
- title: ge,
20
- description: me,
21
- disabled: pe = !1,
22
- left: he,
23
- right: xe,
24
- leftType: je = "icon",
25
- rightType: _e = "action",
26
- formValidation: b = {
18
+ wrapperComponent: Ge = {},
19
+ title: me,
20
+ description: pe,
21
+ disabled: he = !1,
22
+ left: xe,
23
+ right: Se,
24
+ leftType: Qe = "icon",
25
+ rightType: Ze = "action",
26
+ formValidation: I = {
27
27
  valid: !0,
28
28
  notValidMessage: null,
29
29
  setValue: null
30
30
  },
31
31
  suggestions: x,
32
- suggestionsHeader: Se,
33
- suggestionsFooter: ve,
32
+ suggestionsHeader: ve,
33
+ suggestionsFooter: ke,
34
34
  onSuggestionSelect: W,
35
- disableOnValue: ke = () => !1,
35
+ disableOnValue: we = () => !1,
36
36
  transformSyntax: ne,
37
37
  validationUsesSuggestions: j = !1,
38
- filterSuggestionsByLastToken: V = !1,
39
- enforceUniqueSuggestions: we = !1,
38
+ filterSuggestionsByLastToken: C = !1,
39
+ enforceUniqueSuggestions: ye = !1,
40
40
  onLastTokenChange: re,
41
- suggestionsEmptyState: ye,
42
- ...L
43
- } = te, s = Ue || A(null), P = A(null), _ = A(null), H = A(!0), E = A(null), He = A(0), be = A([]), Ie = A(null), [C, F] = N(!1), [m, Je] = N(te.defaultValue || te.initialValue), [J, Me] = N([]), [X, Ve] = N([]), [Ee, $] = N(null), [ae, B] = N(null), [Ce, Re] = N(!1), Y = f.useMemo(() => ke(m), [m, ke]), I = f.useCallback((e) => {
41
+ suggestionsEmptyState: Ie,
42
+ ...et
43
+ } = te, {
44
+ onFocus: be,
45
+ onBlur: Me,
46
+ onKeyDown: Ce,
47
+ onKeyDownCapture: Ve,
48
+ onChange: Ee,
49
+ onInput: De,
50
+ ...P
51
+ } = et, a = Ye || A(null), N = A(null), _ = A(null), H = A(!0), V = A(null), tt = A(0), Re = A([]), Ae = A(null), [E, F] = L(!1), [m, nt] = L(te.defaultValue || te.initialValue), [J, Te] = L([]), [X, Fe] = L([]), [Le, O] = L(null), [se, $] = L(null), [Pe, Ne] = L(!1), Y = d.useMemo(() => we(m), [m, we]), ae = d.useMemo(() => ({
52
+ ...P,
53
+ onChange: Ee,
54
+ onInput: De
55
+ }), [P, Ee, De]), b = d.useCallback((e) => {
44
56
  const t = e ?? "";
45
57
  return typeof t == "string" ? t : String(t);
46
- }, []), De = f.useCallback((e, t, n) => {
58
+ }, []), Oe = d.useCallback((e, t, n) => {
47
59
  if (e.length === 0) return t <= n.length ? t : null;
48
60
  let r = n.indexOf(e);
49
61
  if (r === -1) return null;
50
- let a = r;
51
- for (; a !== -1; )
52
- Math.abs(a - t) < Math.abs(r - t) && (r = a), a = n.indexOf(e, a + 1);
62
+ let s = r;
63
+ for (; s !== -1; )
64
+ Math.abs(s - t) < Math.abs(r - t) && (r = s), s = n.indexOf(e, s + 1);
53
65
  return r;
54
- }, []), G = f.useCallback((e, t) => {
66
+ }, []), G = d.useCallback((e, t) => {
55
67
  const n = [];
56
68
  return e.forEach((r) => {
57
- const a = De(r.text, r.start, t);
58
- if (a === null) return;
59
- const i = a + r.text.length;
60
- t.slice(a, i) === r.text && n.push({
69
+ const s = Oe(r.text, r.start, t);
70
+ if (s === null) return;
71
+ const i = s + r.text.length;
72
+ t.slice(s, i) === r.text && n.push({
61
73
  ...r,
62
- start: a,
74
+ start: s,
63
75
  end: i
64
76
  });
65
77
  }), n;
66
- }, [De]);
78
+ }, [Oe]);
67
79
  k(() => {
68
- be.current = X;
80
+ Re.current = X;
69
81
  }, [X]), k(() => {
70
- const e = s.current;
71
- if (!e || !b?.setValue) return;
82
+ const e = a.current;
83
+ if (!e || !I?.setValue) return;
72
84
  const t = (n) => {
73
- const r = L.type !== "checkbox" ? n.target.value : n.target.checked, a = j ? be.current : r;
74
- b.setValue?.(a);
85
+ const r = P.type !== "checkbox" ? n.target.value : n.target.checked, s = j ? Re.current : r;
86
+ I.setValue?.(s);
75
87
  };
76
88
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
77
- }, [b?.setValue, s, L.type, j]), k(() => {
89
+ }, [I?.setValue, P.type, a, j]), k(() => {
78
90
  if (!x) return;
79
91
  const e = (t) => {
80
- const n = t.target, r = !!s.current?.contains(n), a = !!_.current?.contains(n);
81
- H.current = r || a;
92
+ const n = t.target, r = !!a.current?.contains(n), s = !!_.current?.contains(n);
93
+ H.current = r || s;
82
94
  };
83
95
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
84
- }, [s, x]), k(() => {
85
- const e = s.current;
96
+ }, [a, x]), k(() => {
97
+ const e = a.current;
86
98
  if (!e) return;
87
99
  const t = (n) => {
88
- Y || Je(n.target.value);
100
+ Y || nt(n.target.value);
89
101
  };
90
102
  return e.addEventListener("change", t), e.addEventListener("input", t), () => {
91
103
  e.removeEventListener("change", t), e.removeEventListener("input", t);
92
104
  };
93
- }, [Y, s]), k(() => {
94
- const e = I(s.current?.value ?? m);
95
- Me((t) => {
105
+ }, [Y, a]), k(() => {
106
+ const e = b(a.current?.value ?? m);
107
+ Te((t) => {
96
108
  const n = G(t, e);
97
- return Ve(n.map((r) => r.suggestion)), n;
109
+ return Fe(n.map((r) => r.suggestion)), n;
98
110
  });
99
- }, [I, G, m]);
100
- const Ae = f.useCallback((e, t) => {
101
- const n = I(e), r = [...t].sort((l, o) => l.start - o.start), a = [];
111
+ }, [b, G, m]);
112
+ const $e = d.useCallback((e, t) => {
113
+ const n = b(e), r = [...t].sort((l, o) => l.start - o.start), s = [];
102
114
  let i = 0;
103
115
  return r.forEach((l) => {
104
116
  if (l.start < i) return;
105
117
  const o = Math.min(l.end, n.length);
106
- i < l.start && a.push(n.slice(i, l.start));
118
+ i < l.start && s.push(n.slice(i, l.start));
107
119
  const c = l.suggestion?.value ?? l.text ?? "", g = c == null ? "" : String(c), u = Math.max(o - l.start, g.length);
108
- u > 0 ? (a.push(l.suggestion), i = l.start + u) : i = l.start;
109
- }), i < n.length && a.push(n.slice(i)), a.length ? a : [n];
110
- }, [I]);
120
+ u > 0 ? (s.push(l.suggestion), i = l.start + u) : i = l.start;
121
+ }), i < n.length && s.push(n.slice(i)), s.length ? s : [n];
122
+ }, [b]);
111
123
  k(() => {
112
- if (!b?.setValue) return;
113
- const e = L.type !== "checkbox" ? I(s.current?.value ?? m) : m, t = j ? X : e;
114
- Object.is(Ie.current, t) || (Ie.current = t, b.setValue(t));
115
- }, [X, b?.setValue, s, I, L.type, j, m]);
116
- const Te = f.useCallback(() => {
124
+ if (!I?.setValue) return;
125
+ const e = P.type !== "checkbox" ? b(a.current?.value ?? m) : m, t = j ? X : e;
126
+ Object.is(Ae.current, t) || (Ae.current = t, I.setValue(t));
127
+ }, [X, I?.setValue, P.type, a, b, j, m]);
128
+ const Be = d.useCallback(() => {
117
129
  setTimeout(() => {
118
- const e = s.current;
130
+ const e = a.current;
119
131
  if (!e) return;
120
132
  e.focus({
121
133
  preventScroll: !0
@@ -123,24 +135,24 @@ const pt = f.forwardRef((te, Ue) => {
123
135
  const t = e.value.length;
124
136
  T(e, t, t), e.scrollLeft = e.scrollWidth;
125
137
  }, 0);
126
- }, [s]), se = f.useMemo(() => Ae(m, J), [J, Ae, m]), d = f.useMemo(() => {
138
+ }, [a]), oe = d.useMemo(() => $e(m, J), [J, $e, m]), f = d.useMemo(() => {
127
139
  if (ne)
128
- return (e, t = se) => ne(e, t);
129
- }, [se, ne]), {
130
- syntaxSegments: oe,
140
+ return (e, t = oe) => ne(e, t);
141
+ }, [oe, ne]), {
142
+ syntaxSegments: ie,
131
143
  visualizedSyntaxSegments: M,
132
- expandSelectionRangeToBlockBoundaries: O,
133
- mapVisualIndexToRawIndex: q,
134
- mapRawIndexToVisualIndex: R,
135
- totalVisualLength: ie
136
- } = ct(m, d, s, se), w = f.useMemo(() => {
137
- const e = I(s.current?.value ?? m);
138
- if (!V || !oe?.length) return null;
139
- const t = [...oe].reverse().find((h) => h?.type === "text" && h?.end === e.length);
144
+ expandSelectionRangeToBlockBoundaries: B,
145
+ mapVisualIndexToRawIndex: K,
146
+ mapRawIndexToVisualIndex: D,
147
+ totalVisualLength: le
148
+ } = St(m, f, a, oe), w = d.useMemo(() => {
149
+ const e = b(a.current?.value ?? m);
150
+ if (!C || !ie?.length) return null;
151
+ const t = [...ie].reverse().find((h) => h?.type === "text" && h?.end === e.length);
140
152
  if (!t) return null;
141
153
  const n = e.slice(t.start, t.end), r = n.trim();
142
154
  if (!r.length) return null;
143
- const a = r.split(/\s+/), i = a[a.length - 1]?.trim();
155
+ const s = r.split(/\s+/), i = s[s.length - 1]?.trim();
144
156
  if (!i) return null;
145
157
  const l = n.search(/\S/), o = l === -1 ? 0 : l, c = r.lastIndexOf(i), g = t.start + o + c, u = g + i.length;
146
158
  return {
@@ -148,27 +160,27 @@ const pt = f.forwardRef((te, Ue) => {
148
160
  start: g,
149
161
  end: u
150
162
  };
151
- }, [V, s, I, oe, m]);
163
+ }, [C, a, b, ie, m]);
152
164
  k(() => {
153
- V && re && (w?.token && F(!0), re(w?.token ?? null));
154
- }, [V, re, w?.token]);
155
- const K = f.useMemo(() => {
156
- if (!V || !x) return x;
165
+ C && re && (w?.token && F(!0), re(w?.token ?? null));
166
+ }, [C, re, w?.token]);
167
+ const q = d.useMemo(() => {
168
+ if (!C || !x) return x;
157
169
  const e = w?.token?.trim();
158
170
  return e?.length ? x.filter((t) => {
159
171
  const n = t?.value ?? "";
160
172
  return (n == null ? "" : String(n)).toLowerCase().startsWith(e.toLowerCase());
161
173
  }) : x;
162
- }, [V, w?.token, x]), Q = f.useMemo(() => {
163
- if (!we || !K) return K;
174
+ }, [C, w?.token, x]), Q = d.useMemo(() => {
175
+ if (!ye || !q) return q;
164
176
  const e = new Set(J.map((t) => t.suggestion));
165
- return K.filter((t) => !e.has(t));
166
- }, [J, we, K]), {
177
+ return q.filter((t) => !e.has(t));
178
+ }, [J, ye, q]), {
167
179
  ensureVisualIndexVisible: Z,
168
180
  syncSyntaxScroll: S
169
- } = dt(s, _), Le = ft(d, O), p = f.useCallback(() => {
170
- if (!d) return;
171
- const e = s.current;
181
+ } = vt(a, _), Ke = kt(f, B), p = d.useCallback(() => {
182
+ if (!f) return;
183
+ const e = a.current;
172
184
  if (!e) return;
173
185
  const {
174
186
  rawStart: t,
@@ -177,25 +189,25 @@ const pt = f.forwardRef((te, Ue) => {
177
189
  if (r && t === n) {
178
190
  const u = t - r.start, h = r.end - t, v = u <= h ? r.start : r.end;
179
191
  T(e, v, v);
180
- const D = v === r.start ? r.visualStart : r.visualEnd;
181
- $(null), B(D), requestAnimationFrame(() => {
182
- S(), Z(D);
192
+ const R = v === r.start ? r.visualStart : r.visualEnd;
193
+ O(null), $(R), requestAnimationFrame(() => {
194
+ S(), Z(R);
183
195
  });
184
196
  return;
185
197
  }
186
198
  if (t === n) {
187
- const u = Math.round(R(t));
188
- $(null), B(Number.isFinite(u) ? u : null), requestAnimationFrame(() => {
199
+ const u = Math.round(D(t));
200
+ O(null), $(Number.isFinite(u) ? u : null), requestAnimationFrame(() => {
189
201
  S(), Z(u);
190
202
  });
191
203
  return;
192
204
  }
193
- let a = R(t), i = R(n);
205
+ let s = D(t), i = D(n);
194
206
  M.forEach((u) => {
195
- u?.type !== "block" || !(t < u?.end && n > u?.start) || (a = Math.min(a, u?.visualStart), i = Math.max(i, u?.visualEnd));
207
+ u?.type !== "block" || !(t < u?.end && n > u?.start) || (s = Math.min(s, u?.visualStart), i = Math.max(i, u?.visualEnd));
196
208
  });
197
- const l = Math.min(a, i), o = Math.max(a, i);
198
- B(null), $({
209
+ const l = Math.min(s, i), o = Math.max(s, i);
210
+ $(null), O({
199
211
  start: l,
200
212
  end: o
201
213
  });
@@ -203,49 +215,49 @@ const pt = f.forwardRef((te, Ue) => {
203
215
  requestAnimationFrame(() => {
204
216
  S(), Z(g);
205
217
  });
206
- }, [Z, s, R, S, d, M]), Fe = gt(d, s, Ee, M, R), Ne = f.useCallback((e) => {
218
+ }, [Z, a, D, S, f, M]), qe = wt(f, a, Le, M, D), ze = d.useCallback((e) => {
207
219
  if (!e) return null;
208
- const t = e.dataset.rawIndex, n = e.dataset.visualIndex || e.dataset.visualStart || e.dataset.visualEnd, r = t ? Number(t) : void 0, a = n ? Number(n) : void 0;
209
- return !Number.isNaN(r) && r !== void 0 ? r : a !== void 0 ? q(a) : null;
210
- }, [q]), ee = f.useCallback((e) => {
220
+ const t = e.dataset.rawIndex, n = e.dataset.visualIndex || e.dataset.visualStart || e.dataset.visualEnd, r = t ? Number(t) : void 0, s = n ? Number(n) : void 0;
221
+ return !Number.isNaN(r) && r !== void 0 ? r : s !== void 0 ? K(s) : null;
222
+ }, [K]), ee = d.useCallback((e) => {
211
223
  const t = document.elementFromPoint(e.clientX, e.clientY);
212
- return Ne(t ?? e.target);
213
- }, [Ne]), Pe = f.useCallback((e) => {
214
- if (!s.current) return;
224
+ return ze(t ?? e.target);
225
+ }, [ze]), Ue = d.useCallback((e) => {
226
+ if (!a.current) return;
215
227
  const t = ee(e);
216
228
  if (t === null || Number.isNaN(t)) return;
217
229
  e.preventDefault(), H.current = !0;
218
- const n = Math.min(Math.max(t, 0), s.current.value.length), {
230
+ const n = Math.min(Math.max(t, 0), a.current.value.length), {
219
231
  selectionStart: r
220
- } = U(s.current), a = e.shiftKey && Number.isFinite(r) ? r : n;
221
- E.current = a, s.current.focus({
232
+ } = U(a.current), s = e.shiftKey && Number.isFinite(r) ? r : n;
233
+ V.current = s, a.current.focus({
222
234
  preventScroll: !0
223
- }), T(s.current, a, n), _.current?.setPointerCapture(e.pointerId), p();
224
- }, [s, ee, p]), $e = f.useCallback((e) => {
225
- if (!s.current || E.current === null) return;
235
+ }), T(a.current, s, n), _.current?.setPointerCapture(e.pointerId), p();
236
+ }, [a, ee, p]), We = d.useCallback((e) => {
237
+ if (!a.current || V.current === null) return;
226
238
  if (!(e.buttons & 1)) {
227
- E.current = null;
239
+ V.current = null;
228
240
  return;
229
241
  }
230
242
  const t = ee(e);
231
243
  if (t === null || Number.isNaN(t)) return;
232
244
  e.preventDefault();
233
- const n = E.current, r = Math.min(Math.max(t, 0), s.current.value.length);
234
- s.current.focus({
245
+ const n = V.current, r = Math.min(Math.max(t, 0), a.current.value.length);
246
+ a.current.focus({
235
247
  preventScroll: !0
236
- }), T(s.current, n, r), p();
237
- }, [s, ee, p]), Be = f.useCallback(() => {
238
- E.current = null;
239
- }, []), Oe = f.useCallback((e) => {
240
- if (!d) return !1;
248
+ }), T(a.current, n, r), p();
249
+ }, [a, ee, p]), je = d.useCallback(() => {
250
+ V.current = null;
251
+ }, []), _e = d.useCallback((e) => {
252
+ if (!f) return !1;
241
253
  const t = e.target, {
242
254
  rawStart: n,
243
255
  rawEnd: r
244
- } = U(t), a = (o, c) => {
256
+ } = U(t), s = (o, c) => {
245
257
  if (o === c) return !1;
246
258
  e.preventDefault();
247
259
  const g = `${t.value.slice(0, o)}${t.value.slice(c)}`;
248
- return ze(t, "value", g, "input"), requestAnimationFrame(() => {
260
+ return Xe(t, "value", g, "input"), requestAnimationFrame(() => {
249
261
  T(t, o, o), p();
250
262
  }), !0;
251
263
  };
@@ -254,37 +266,37 @@ const pt = f.forwardRef((te, Ue) => {
254
266
  start: o,
255
267
  end: c,
256
268
  hasBlockOverlap: g
257
- } = O(n, r);
258
- return g ? a(o, c) : !1;
269
+ } = B(n, r);
270
+ return g ? s(o, c) : !1;
259
271
  }
260
272
  const i = M.find((o) => o?.type !== "block" ? !1 : n === o?.end || n > o?.start && n < o?.end);
261
273
  if (e.key === "Backspace" && i)
262
- return a(i.start, i.end);
274
+ return s(i.start, i.end);
263
275
  const l = M.find((o) => o?.type !== "block" ? !1 : n === o?.start || n > o?.start && n < o?.end);
264
- return e.key === "Delete" && l ? a(l.start, l.end) : !1;
265
- }, [O, d, p, M]), le = f.useCallback((e) => {
266
- if (d && Le(e.target), d && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
276
+ return e.key === "Delete" && l ? s(l.start, l.end) : !1;
277
+ }, [B, f, p, M]), ue = d.useCallback((e) => {
278
+ if (f && Ke(e.target), f && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
267
279
  const t = e.target, {
268
280
  selectionStart: n,
269
281
  selectionEnd: r,
270
- rawStart: a,
282
+ rawStart: s,
271
283
  rawEnd: i,
272
284
  direction: l
273
285
  } = U(t), o = e.key === "ArrowLeft" ? -1 : 1;
274
286
  if (e.shiftKey) {
275
- const c = E.current ?? (l === "backward" ? r : n);
276
- E.current = c;
277
- const u = Math.round(R(c === n ? r : n)), h = Math.max(0, Math.min(u + o, ie)), v = q(h);
287
+ const c = V.current ?? (l === "backward" ? r : n);
288
+ V.current = c;
289
+ const u = Math.round(D(c === n ? r : n)), h = Math.max(0, Math.min(u + o, le)), v = K(h);
278
290
  if (!Number.isNaN(v)) {
279
291
  e.preventDefault();
280
- const D = Math.min(Math.max(Math.round(v), 0), t.value.length), Ge = D < c ? "backward" : "forward", Qe = Math.min(c, D), Ze = Math.max(c, D);
281
- T(t, Qe, Ze, Ge), requestAnimationFrame(() => {
292
+ const R = Math.min(Math.max(Math.round(v), 0), t.value.length), at = R < c ? "backward" : "forward", ot = Math.min(c, R), it = Math.max(c, R);
293
+ T(t, ot, it, at), requestAnimationFrame(() => {
282
294
  S(), p();
283
295
  });
284
296
  }
285
297
  } else {
286
- E.current = null;
287
- const c = e.key === "ArrowLeft" ? a : i, g = Math.round(R(c)), u = Math.max(0, Math.min(g + o, ie)), h = q(u);
298
+ V.current = null;
299
+ const c = e.key === "ArrowLeft" ? s : i, g = Math.round(D(c)), u = Math.max(0, Math.min(g + o, le)), h = K(u);
288
300
  if (!Number.isNaN(h)) {
289
301
  e.preventDefault();
290
302
  const v = Math.min(Math.max(Math.round(h), 0), t.value.length);
@@ -295,78 +307,80 @@ const pt = f.forwardRef((te, Ue) => {
295
307
  }
296
308
  if (e.defaultPrevented) return;
297
309
  }
298
- if (!(d && (e.key === "Backspace" || e.key === "Delete") && Oe(e)) && x)
310
+ if (!(f && (e.key === "Backspace" || e.key === "Delete") && _e(e)) && x) {
299
311
  if (e.key === "ArrowDown") {
300
312
  e.preventDefault();
301
- const t = C;
302
- F(!0), t ? P.current?.highlightNextItem() : setTimeout(() => P.current?.focusFirstItem(), 0);
313
+ const t = E;
314
+ F(!0), t ? N.current?.highlightNextItem() : setTimeout(() => N.current?.focusFirstItem(), 0);
303
315
  } else if (e.key === "ArrowUp") {
304
316
  e.preventDefault();
305
- const t = C;
306
- F(!0), t ? P.current?.highlightPreviousItem() : setTimeout(() => P.current?.focusLastItem(), 0);
307
- } else e.key === "Enter" && C && P.current?.selectActiveItem() && F(!1);
308
- }, [Oe, R, q, Le, C, x, S, ie, d, p]), ue = f.useCallback((e) => {
309
- (e.key === " " || e.code === "Space") && (e.stopPropagation(), e.nativeEvent?.stopImmediatePropagation?.());
310
- }, []), ce = f.useCallback(() => {
311
- Re(!0), requestAnimationFrame(() => {
317
+ const t = E;
318
+ F(!0), t ? N.current?.highlightPreviousItem() : setTimeout(() => N.current?.focusLastItem(), 0);
319
+ } else e.key === "Enter" && E && N.current?.selectActiveItem() && F(!1);
320
+ Ce?.(e);
321
+ }
322
+ }, [_e, D, K, Ke, E, x, S, le, f, p, Ce]), ce = d.useCallback((e) => {
323
+ (e.key === " " || e.code === "Space") && (e.stopPropagation(), e.nativeEvent?.stopImmediatePropagation?.()), Ve?.(e);
324
+ }, [Ve]), de = d.useCallback((e) => {
325
+ Ne(!0), requestAnimationFrame(() => {
312
326
  p(), S();
313
- }), x && !C && F(!0);
314
- }, [C, x, S, p]), de = f.useCallback(() => {
315
- Re(!1), B(null), $(null);
316
- }, []);
327
+ }), x && !E && F(!0), be?.(e);
328
+ }, [E, x, S, p, be]), fe = d.useCallback((e) => {
329
+ Ne(!1), $(null), O(null), Me?.(e);
330
+ }, [Me]);
317
331
  k(() => {
318
- const e = s.current;
319
- if (!e || !d) return;
332
+ const e = a.current;
333
+ if (!e || !f) return;
320
334
  const t = () => requestAnimationFrame(p);
321
335
  t();
322
336
  const n = ["select", "keyup", "mouseup", "input", "keydown"];
323
337
  return n.forEach((r) => e.addEventListener(r, t)), () => {
324
338
  n.forEach((r) => e.removeEventListener(r, t));
325
339
  };
326
- }, [s, d, p]), k(() => {
327
- if (!d) return;
340
+ }, [a, f, p]), k(() => {
341
+ if (!f) return;
328
342
  const e = () => {
329
- document.activeElement === s.current && p();
343
+ document.activeElement === a.current && p();
330
344
  };
331
345
  return document.addEventListener("selectionchange", e), () => document.removeEventListener("selectionchange", e);
332
- }, [s, d, p]), k(() => {
333
- const e = s.current;
346
+ }, [a, f, p]), k(() => {
347
+ const e = a.current;
334
348
  if (!e) return;
335
349
  const t = () => S();
336
350
  return t(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
337
- }, [s, S]), k(() => {
351
+ }, [a, S]), k(() => {
338
352
  S();
339
- }, [S, m, ae, Ee]), k(() => {
340
- d || ($(null), B(null));
341
- }, [d]);
342
- const qe = f.useCallback((e) => {
343
- if (!s.current) return;
344
- const t = typeof m == "object" ? JSON.stringify(e.value) : e.value, n = t == null ? "" : String(t), r = e.insertMode ?? "replace", a = s.current.value ?? "";
345
- let i = a, l = null, o = 0;
346
- if (V && w)
347
- i = `${a.slice(0, w.start)}${n}${a.slice(w.end)}`, l = w.start + n.length, o = w.start;
353
+ }, [S, m, se, Le]), k(() => {
354
+ f || (O(null), $(null));
355
+ }, [f]);
356
+ const He = d.useCallback((e) => {
357
+ if (!a.current) return;
358
+ const t = typeof m == "object" ? JSON.stringify(e.value) : e.value, n = t == null ? "" : String(t), r = e.insertMode ?? "replace", s = a.current.value ?? "";
359
+ let i = s, l = null, o = 0;
360
+ if (C && w)
361
+ i = `${s.slice(0, w.start)}${n}${s.slice(w.end)}`, l = w.start + n.length, o = w.start;
348
362
  else
349
363
  switch (r) {
350
364
  case "append": {
351
- i = `${a}${n}`, l = i.length, o = a.length;
365
+ i = `${s}${n}`, l = i.length, o = s.length;
352
366
  break;
353
367
  }
354
368
  case "prepend": {
355
- i = `${n}${a}`, l = n.length, o = 0;
369
+ i = `${n}${s}`, l = n.length, o = 0;
356
370
  break;
357
371
  }
358
372
  case "insert": {
359
373
  const {
360
374
  rawStart: c,
361
375
  rawEnd: g
362
- } = U(s.current), {
376
+ } = U(a.current), {
363
377
  start: u,
364
378
  end: h
365
- } = d ? O(c, g) : {
379
+ } = f ? B(c, g) : {
366
380
  start: c,
367
381
  end: g
368
382
  };
369
- i = `${a.slice(0, u)}${n}${a.slice(h)}`, l = u + n.length, o = u;
383
+ i = `${s.slice(0, u)}${n}${s.slice(h)}`, l = u + n.length, o = u;
370
384
  break;
371
385
  }
372
386
  case "replace":
@@ -375,62 +389,62 @@ const pt = f.forwardRef((te, Ue) => {
375
389
  break;
376
390
  }
377
391
  }
378
- ze(s.current, "value", i, "change"), Me((c) => {
379
- const g = I(i), u = G(c, g), h = n.length ? {
380
- id: He.current++,
392
+ Xe(a.current, "value", i, "change"), Te((c) => {
393
+ const g = b(i), u = G(c, g), h = n.length ? {
394
+ id: tt.current++,
381
395
  suggestion: e,
382
396
  text: n,
383
397
  start: o,
384
398
  end: o + n.length
385
399
  } : null, v = h ? [...u, h] : u;
386
- return Ve(v.map((D) => D.suggestion)), v;
400
+ return Fe(v.map((R) => R.suggestion)), v;
387
401
  }), l !== null && requestAnimationFrame(() => {
388
- const c = s.current;
402
+ const c = a.current;
389
403
  c && (c.focus({
390
404
  preventScroll: !0
391
405
  }), T(c, l, l));
392
406
  });
393
- }, [O, V, s, I, G, w, d, m]), Xe = Ke(() => /* @__PURE__ */ y(ut, { transformSyntax: d, syntaxRef: _, visualizedSyntaxSegments: M, resolvedVisualSelectionRange: Fe, visualCaretIndex: ae, isFocused: Ce, onPointerDown: Pe, onPointerMove: $e, onPointerUp: Be }), [Pe, Be, $e, Ce, Fe, d, ae, M]), Ye = Ke(() => /* @__PURE__ */ z(at, { open: C, modal: !1, onOpenChange: (e) => {
407
+ }, [B, C, a, b, G, w, f, m]), rt = Je(() => /* @__PURE__ */ y(xt, { transformSyntax: f, syntaxRef: _, visualizedSyntaxSegments: M, resolvedVisualSelectionRange: qe, visualCaretIndex: se, isFocused: Pe, onPointerDown: Ue, onPointerMove: We, onPointerUp: je }), [Ue, je, We, Pe, qe, f, se, M]), st = Je(() => /* @__PURE__ */ z(ft, { open: E, modal: !1, onOpenChange: (e) => {
394
408
  if (!e && H.current) {
395
409
  H.current = !1;
396
410
  return;
397
411
  }
398
- F(e), e && setTimeout(() => s.current?.focus(), 0);
412
+ F(e), e && setTimeout(() => a.current?.focus(), 0);
399
413
  }, children: [
400
- /* @__PURE__ */ y(st, { asChild: !0, children: /* @__PURE__ */ y("input", { ref: s, ...fe(`input__control ${d ? "input__control--syntax" : ""}`, L), onFocus: ce, onBlur: de, onKeyDownCapture: ue, onKeyDown: le, spellCheck: !1, disabled: pe || Y }) }),
401
- /* @__PURE__ */ y(ot, { children: /* @__PURE__ */ z(it, { color: "secondary", inputRef: s, children: [
402
- Se,
403
- /* @__PURE__ */ z(mt, { paddingSize: "xxs", mt: -0.35, mx: -0.35, style: {
414
+ /* @__PURE__ */ y(gt, { asChild: !0, children: /* @__PURE__ */ y("input", { ref: a, ...ge(`input__control ${f ? "input__control--syntax" : ""}`, ae), onFocus: de, onBlur: fe, onKeyDownCapture: ce, onKeyDown: ue, spellCheck: !1, disabled: he || Y }) }),
415
+ /* @__PURE__ */ y(mt, { children: /* @__PURE__ */ z(pt, { color: "secondary", inputRef: a, children: [
416
+ ve,
417
+ /* @__PURE__ */ z(yt, { paddingSize: "xxs", mt: -0.35, mx: -0.35, style: {
404
418
  borderWidth: "2px"
405
419
  }, children: [
406
- Q?.length === 0 && ye,
420
+ Q?.length === 0 && Ie,
407
421
  !!Q?.length && /* @__PURE__ */ y(
408
- lt,
422
+ ht,
409
423
  {
410
- ref: P,
411
- inputRef: s,
424
+ ref: N,
425
+ inputRef: a,
412
426
  suggestions: Q,
413
427
  onSuggestionSelect: (e) => {
414
- W ? W?.(e) : qe(e), F(!1), W && Te();
428
+ W ? W?.(e) : He(e), F(!1), W && Be();
415
429
  }
416
430
  }
417
431
  )
418
432
  ] }),
419
- ve
433
+ ke
420
434
  ] }) })
421
- ] }), [qe, Q, Y, Te, de, ce, le, ue, s, W, C, L, ye, ve, Se, d]);
422
- return /* @__PURE__ */ z(et, { children: [
423
- ge && /* @__PURE__ */ y(tt, { children: ge }),
424
- me && /* @__PURE__ */ y(nt, { children: me }),
425
- /* @__PURE__ */ z("div", { ...fe(`input ${b?.valid ? "" : "input--not-valid"}`, We), children: [
426
- he && /* @__PURE__ */ y("div", { className: `input__left input__left--${je}`, children: he }),
427
- x ? Ye : /* @__PURE__ */ y("input", { tabIndex: 2, ref: s, disabled: pe, onFocus: ce, onBlur: de, onKeyDownCapture: ue, onKeyDown: le, ...fe(`input__control ${d ? "input__control--syntax" : ""}`, L) }),
428
- Xe,
429
- xe && /* @__PURE__ */ y("div", { className: `input__right input__right--${_e}`, children: xe })
435
+ ] }), [He, Q, Y, Be, fe, de, ue, ce, a, ae, W, E, Ie, ke, ve, f]);
436
+ return /* @__PURE__ */ z(lt, { children: [
437
+ me && /* @__PURE__ */ y(ut, { children: me }),
438
+ pe && /* @__PURE__ */ y(ct, { children: pe }),
439
+ /* @__PURE__ */ z("div", { ...ge(`input ${I?.valid ? "" : "input--not-valid"}`, Ge), children: [
440
+ xe && /* @__PURE__ */ y("div", { className: `input__left input__left--${Qe}`, children: xe }),
441
+ x ? st : /* @__PURE__ */ y("input", { tabIndex: 2, ref: a, disabled: he, onFocus: de, onBlur: fe, onKeyDownCapture: ce, onKeyDown: ue, ...ge(`input__control ${f ? "input__control--syntax" : ""}`, ae) }),
442
+ rt,
443
+ Se && /* @__PURE__ */ y("div", { className: `input__right input__right--${Ze}`, children: Se })
430
444
  ] }),
431
- !b?.valid && b?.notValidMessage && /* @__PURE__ */ y(rt, { children: b.notValidMessage })
445
+ !I?.valid && I?.notValidMessage && /* @__PURE__ */ y(dt, { children: I.notValidMessage })
432
446
  ] });
433
- }), At = pt;
447
+ }), Bt = It;
434
448
  export {
435
- At as Input
449
+ Bt as Input
436
450
  };