@code0-tech/pictor 0.0.0-mvp.10

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 (313) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +0 -0
  3. package/dist/_virtual/compiler-runtime.js +5 -0
  4. package/dist/_virtual/compiler-runtime2.js +4 -0
  5. package/dist/_virtual/react-compiler-runtime.development.js +4 -0
  6. package/dist/_virtual/react-compiler-runtime.production.js +4 -0
  7. package/dist/assets/components/avatar/Avatar.style.css +1 -0
  8. package/dist/assets/components/badge/Badge.style.css +1 -0
  9. package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -0
  10. package/dist/assets/components/button/Button.style.css +1 -0
  11. package/dist/assets/components/button-group/ButtonGroup.style.css +1 -0
  12. package/dist/assets/components/card/Card.style.css +1 -0
  13. package/dist/assets/components/col/Col.style.css +1 -0
  14. package/dist/assets/components/command/Command.style.css +1 -0
  15. package/dist/assets/components/container/Container.style.css +1 -0
  16. package/dist/assets/components/d-flow/DFlow.style.css +1 -0
  17. package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
  18. package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
  19. package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
  20. package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
  21. package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +1 -0
  22. package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
  23. package/dist/assets/components/d-fullscreen/DFullScreen.style.css +1 -0
  24. package/dist/assets/components/d-layout/DLayout.style.css +1 -0
  25. package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
  26. package/dist/assets/components/dialog/Dialog.style.css +1 -0
  27. package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
  28. package/dist/assets/components/flex/Flex.style.css +1 -0
  29. package/dist/assets/components/form/Input.style.css +1 -0
  30. package/dist/assets/components/menu/Menu.style.css +1 -0
  31. package/dist/assets/components/quote/Quote.style.css +1 -0
  32. package/dist/assets/components/row/Row.style.css +1 -0
  33. package/dist/assets/components/scroll-area/ScrollArea.style.css +1 -0
  34. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
  35. package/dist/assets/components/spacing/Spacing.style.css +1 -0
  36. package/dist/assets/components/tab/Tab.style.css +1 -0
  37. package/dist/assets/components/text/Text.style.css +1 -0
  38. package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
  39. package/dist/assets/node_modules/@xyflow/react/dist/style.css +1 -0
  40. package/dist/components/avatar/Avatar.d.ts +8 -0
  41. package/dist/components/avatar/Avatar.js +55 -0
  42. package/dist/components/badge/Badge.d.ts +7 -0
  43. package/dist/components/badge/Badge.js +22 -0
  44. package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
  45. package/dist/components/breadcrumb/Breadcrumb.js +32 -0
  46. package/dist/components/button/Button.d.ts +10 -0
  47. package/dist/components/button/Button.js +29 -0
  48. package/dist/components/button-group/ButtonGroup.d.ts +7 -0
  49. package/dist/components/button-group/ButtonGroup.js +27 -0
  50. package/dist/components/card/Card.d.ts +14 -0
  51. package/dist/components/card/Card.js +39 -0
  52. package/dist/components/card/CardSection.d.ts +9 -0
  53. package/dist/components/card/CardSection.js +22 -0
  54. package/dist/components/col/Col.d.ts +13 -0
  55. package/dist/components/col/Col.js +27 -0
  56. package/dist/components/command/Command.d.ts +30 -0
  57. package/dist/components/command/Command.js +103 -0
  58. package/dist/components/container/Container.d.ts +6 -0
  59. package/dist/components/container/Container.js +21 -0
  60. package/dist/components/d-flow/DFlow.d.ts +5 -0
  61. package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
  62. package/dist/components/d-flow/DFlow.edges.hook.js +144 -0
  63. package/dist/components/d-flow/DFlow.js +375 -0
  64. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
  65. package/dist/components/d-flow/DFlow.nodes.hook.js +139 -0
  66. package/dist/components/d-flow/DFlow.service.d.ts +10 -0
  67. package/dist/components/d-flow/DFlow.service.js +11 -0
  68. package/dist/components/d-flow/DFlow.view.d.ts +109 -0
  69. package/dist/components/d-flow/DFlow.view.js +213 -0
  70. package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
  71. package/dist/components/d-flow/control/DFlowControl.js +77 -0
  72. package/dist/components/d-flow/control/index.d.ts +1 -0
  73. package/dist/components/d-flow/control/index.js +4 -0
  74. package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
  75. package/dist/components/d-flow/data-type/DFlowDataType.service.js +91 -0
  76. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
  77. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
  78. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
  79. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +20 -0
  80. package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
  81. package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
  82. package/dist/components/d-flow/data-type/index.d.ts +2 -0
  83. package/dist/components/d-flow/data-type/index.js +6 -0
  84. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
  85. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +222 -0
  86. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
  87. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +229 -0
  88. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
  89. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
  90. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
  91. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
  92. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
  93. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
  94. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
  95. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
  96. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
  97. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +243 -0
  98. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
  99. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
  100. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
  101. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +10 -0
  102. package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
  103. package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
  104. package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
  105. package/dist/components/d-flow/folder/DFlowFolder.js +119 -0
  106. package/dist/components/d-flow/folder/index.d.ts +1 -0
  107. package/dist/components/d-flow/folder/index.js +6 -0
  108. package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
  109. package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
  110. package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
  111. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
  112. package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
  113. package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
  114. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
  115. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +74 -0
  116. package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
  117. package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
  118. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
  119. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
  120. package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
  121. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
  122. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
  123. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
  124. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
  125. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
  126. package/dist/components/d-flow/function/index.d.ts +2 -0
  127. package/dist/components/d-flow/function/index.js +7 -0
  128. package/dist/components/d-flow/index.d.ts +13 -0
  129. package/dist/components/d-flow/index.js +46 -0
  130. package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
  131. package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
  132. package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
  133. package/dist/components/d-flow/minimap/DFlowMiniMap.js +22 -0
  134. package/dist/components/d-flow/minimap/index.d.ts +1 -0
  135. package/dist/components/d-flow/minimap/index.js +4 -0
  136. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
  137. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +150 -0
  138. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
  139. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
  140. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
  141. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
  142. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
  143. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
  144. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
  145. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
  146. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
  147. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
  148. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
  149. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
  150. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
  151. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +22 -0
  152. package/dist/components/d-flow/suggestion/index.d.ts +2 -0
  153. package/dist/components/d-flow/suggestion/index.js +7 -0
  154. package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
  155. package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
  156. package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
  157. package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
  158. package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
  159. package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
  160. package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
  161. package/dist/components/d-flow/type/DFlowType.service.js +9 -0
  162. package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
  163. package/dist/components/d-flow/type/DFlowType.view.js +69 -0
  164. package/dist/components/d-flow/type/index.d.ts +2 -0
  165. package/dist/components/d-flow/type/index.js +6 -0
  166. package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
  167. package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
  168. package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
  169. package/dist/components/d-flow/validation/DFlowValidation.js +60 -0
  170. package/dist/components/d-flow/validation/index.d.ts +2 -0
  171. package/dist/components/d-flow/validation/index.js +6 -0
  172. package/dist/components/d-fullscreen/DFullScreen.d.ts +6 -0
  173. package/dist/components/d-fullscreen/DFullScreen.js +26 -0
  174. package/dist/components/d-layout/DLayout.d.ts +10 -0
  175. package/dist/components/d-layout/DLayout.js +52 -0
  176. package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
  177. package/dist/components/d-namespace/DNamespace.service.js +11 -0
  178. package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
  179. package/dist/components/d-namespace/DNamespace.view.js +65 -0
  180. package/dist/components/d-namespace/index.d.ts +12 -0
  181. package/dist/components/d-namespace/index.js +35 -0
  182. package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
  183. package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
  184. package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
  185. package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
  186. package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
  187. package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
  188. package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
  189. package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
  190. package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
  191. package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
  192. package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
  193. package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
  194. package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
  195. package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
  196. package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
  197. package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
  198. package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
  199. package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
  200. package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
  201. package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
  202. package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
  203. package/dist/components/d-organization/DOrganization.service.js +11 -0
  204. package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
  205. package/dist/components/d-organization/DOrganization.view.js +52 -0
  206. package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
  207. package/dist/components/d-organization/DOrganizationCard.js +63 -0
  208. package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
  209. package/dist/components/d-organization/DOrganizationMenu.js +18 -0
  210. package/dist/components/d-organization/index.d.ts +4 -0
  211. package/dist/components/d-organization/index.js +19 -0
  212. package/dist/components/d-resizable/DResizable.d.ts +10 -0
  213. package/dist/components/d-resizable/DResizable.js +32 -0
  214. package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
  215. package/dist/components/d-runtime/DRuntime.service.js +11 -0
  216. package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
  217. package/dist/components/d-runtime/DRuntime.view.js +73 -0
  218. package/dist/components/d-runtime/index.d.ts +2 -0
  219. package/dist/components/d-runtime/index.js +6 -0
  220. package/dist/components/d-user/DUser.service.d.ts +21 -0
  221. package/dist/components/d-user/DUser.service.js +17 -0
  222. package/dist/components/d-user/DUser.view.d.ts +52 -0
  223. package/dist/components/d-user/DUser.view.js +100 -0
  224. package/dist/components/d-user/DUserMenu.d.ts +8 -0
  225. package/dist/components/d-user/DUserMenu.js +28 -0
  226. package/dist/components/d-user/index.d.ts +3 -0
  227. package/dist/components/d-user/index.js +17 -0
  228. package/dist/components/dialog/Dialog.d.ts +28 -0
  229. package/dist/components/dialog/Dialog.js +99 -0
  230. package/dist/components/file-tabs/FileTabs.d.ts +17 -0
  231. package/dist/components/file-tabs/FileTabs.js +71 -0
  232. package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
  233. package/dist/components/file-tabs/FileTabs.service.js +47 -0
  234. package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
  235. package/dist/components/file-tabs/FileTabs.view.js +1 -0
  236. package/dist/components/flex/Flex.d.ts +7 -0
  237. package/dist/components/flex/Flex.js +21 -0
  238. package/dist/components/form/CheckboxInput.d.ts +5 -0
  239. package/dist/components/form/CheckboxInput.js +67 -0
  240. package/dist/components/form/EmailInput.d.ts +8 -0
  241. package/dist/components/form/EmailInput.js +20 -0
  242. package/dist/components/form/Input.d.ts +22 -0
  243. package/dist/components/form/Input.js +153 -0
  244. package/dist/components/form/InputDescription.d.ts +5 -0
  245. package/dist/components/form/InputDescription.js +12 -0
  246. package/dist/components/form/InputLabel.d.ts +5 -0
  247. package/dist/components/form/InputLabel.js +12 -0
  248. package/dist/components/form/InputMessage.d.ts +5 -0
  249. package/dist/components/form/InputMessage.js +18 -0
  250. package/dist/components/form/InputSuggestion.d.ts +19 -0
  251. package/dist/components/form/InputSuggestion.js +102 -0
  252. package/dist/components/form/NumberInput.d.ts +6 -0
  253. package/dist/components/form/NumberInput.js +20 -0
  254. package/dist/components/form/PasswordInput.d.ts +8 -0
  255. package/dist/components/form/PasswordInput.js +18 -0
  256. package/dist/components/form/PinInput.d.ts +11 -0
  257. package/dist/components/form/PinInput.js +66 -0
  258. package/dist/components/form/RadioGroup.d.ts +5 -0
  259. package/dist/components/form/RadioGroup.js +48 -0
  260. package/dist/components/form/RadioInput.d.ts +7 -0
  261. package/dist/components/form/RadioInput.js +27 -0
  262. package/dist/components/form/SwitchInput.d.ts +6 -0
  263. package/dist/components/form/SwitchInput.js +19 -0
  264. package/dist/components/form/TextInput.d.ts +7 -0
  265. package/dist/components/form/TextInput.js +19 -0
  266. package/dist/components/form/index.d.ts +15 -0
  267. package/dist/components/form/index.js +37 -0
  268. package/dist/components/form/useForm.d.ts +25 -0
  269. package/dist/components/form/useForm.js +57 -0
  270. package/dist/components/menu/Menu.d.ts +27 -0
  271. package/dist/components/menu/Menu.js +104 -0
  272. package/dist/components/quote/Quote.d.ts +10 -0
  273. package/dist/components/quote/Quote.js +49 -0
  274. package/dist/components/row/Row.d.ts +6 -0
  275. package/dist/components/row/Row.js +21 -0
  276. package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
  277. package/dist/components/scroll-area/ScrollArea.js +43 -0
  278. package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
  279. package/dist/components/segmented-control/SegmentedControl.js +24 -0
  280. package/dist/components/spacing/Spacing.d.ts +6 -0
  281. package/dist/components/spacing/Spacing.js +23 -0
  282. package/dist/components/tab/Tab.d.ts +11 -0
  283. package/dist/components/tab/Tab.js +40 -0
  284. package/dist/components/text/Text.d.ts +8 -0
  285. package/dist/components/text/Text.js +23 -0
  286. package/dist/components/tooltip/Tooltip.d.ts +13 -0
  287. package/dist/components/tooltip/Tooltip.js +48 -0
  288. package/dist/index.d.ts +29 -0
  289. package/dist/index.js +226 -0
  290. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
  291. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
  292. package/dist/node_modules/react/compiler-runtime.js +10 -0
  293. package/dist/utils/arrayService.d.ts +10 -0
  294. package/dist/utils/arrayService.js +1 -0
  295. package/dist/utils/contextStore.d.ts +62 -0
  296. package/dist/utils/contextStore.js +60 -0
  297. package/dist/utils/generics.d.ts +17 -0
  298. package/dist/utils/generics.js +310 -0
  299. package/dist/utils/index.d.ts +8 -0
  300. package/dist/utils/index.js +28 -0
  301. package/dist/utils/inspection.d.ts +13 -0
  302. package/dist/utils/inspection.js +4 -0
  303. package/dist/utils/nonReactiveArrayService.d.ts +19 -0
  304. package/dist/utils/nonReactiveArrayService.js +54 -0
  305. package/dist/utils/objectStore.d.ts +12 -0
  306. package/dist/utils/objectStore.js +34 -0
  307. package/dist/utils/reactiveArrayService.d.ts +22 -0
  308. package/dist/utils/reactiveArrayService.js +91 -0
  309. package/dist/utils/types.d.ts +57 -0
  310. package/dist/utils/types.js +4 -0
  311. package/dist/utils/utils.d.ts +68 -0
  312. package/dist/utils/utils.js +216 -0
  313. package/package.json +119 -0
@@ -0,0 +1,17 @@
1
+ import { FunctionDefinitionView } from '../components/d-flow/function/DFlowFunction.view';
2
+ import { DFlowDataTypeReactiveService } from '../components/d-flow/data-type/DFlowDataType.service';
3
+ import { DataType, DataTypeIdentifier, GenericMapper, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
4
+ import { FlowView } from '../components/d-flow/DFlow.view';
5
+ type GenericMappingResult = Record<string, DataTypeIdentifier>;
6
+ type GenericReplacement = DataTypeIdentifier | GenericMapper;
7
+ type GenericMap = Map<string, GenericReplacement>;
8
+ export declare const resolveGenericKeyMappings: (parameterType: DataTypeIdentifier, valueType: DataTypeIdentifier, genericKeys: string[]) => GenericMappingResult;
9
+ export declare const replaceGenericKeysInType: (type: DataTypeIdentifier, genericMap: GenericMap) => DataTypeIdentifier;
10
+ export declare const resolveAllGenericKeysInDataTypeObject: (genericObj: DataType, concreteObj: DataType, genericKeys: string[]) => Record<string, GenericReplacement | undefined>;
11
+ export declare const replaceGenericKeysInDataTypeObject: (dataType: DataType, genericMap: GenericMap) => DataType;
12
+ export declare const resolveGenericKeys: (func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService: DFlowDataTypeReactiveService, flow?: FlowView) => GenericMap;
13
+ export declare function isMatchingDataTypeObject(source: DataType, target: DataType): boolean;
14
+ export declare function isMatchingType(source: DataTypeIdentifier, target: DataTypeIdentifier): boolean;
15
+ export declare const resolveType: (type: DataTypeIdentifier, service: DFlowDataTypeReactiveService) => DataTypeIdentifier;
16
+ export declare const replaceGenericsAndSortType: (type: DataTypeIdentifier, genericKeys?: string[]) => DataTypeIdentifier;
17
+ export {};
@@ -0,0 +1,310 @@
1
+ const C = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isArray(e), T = (e) => y(e) ? "genericKey" in e || "genericType" in e || "dataType" in e : !1, A = (e) => y(e) && "target" in e && Array.isArray(e.sourceDataTypeIdentifiers), E = (e) => y(e) && "variant" in e && "identifier" in e, b = (e) => y(e) && "variant" in e && "config" in e, O = (e) => {
2
+ if (e)
3
+ return typeof e == "string" ? e : e?.dataType?.identifier ?? e?.genericType?.dataType?.identifier ?? void 0;
4
+ }, j = (e, n) => {
5
+ if (e)
6
+ return typeof e == "string" ? n && n.has(e) ? e : void 0 : e.genericKey ?? void 0;
7
+ }, _ = (e) => !e || typeof e == "string" ? [] : e.genericType?.genericMappers ?? [], G = (e, n) => ({
8
+ ...e,
9
+ sourceDataTypeIdentifiers: n
10
+ }), R = (e) => {
11
+ const n = e.genericCombinationStrategies ?? [];
12
+ return new Set(n.map((i) => i.type));
13
+ }, m = (e) => {
14
+ if (Array.isArray(e))
15
+ return e.map(m);
16
+ if (y(e)) {
17
+ const n = {};
18
+ return Object.entries(e).forEach(([i, t]) => {
19
+ i === "__typename" || i === "id" || i === "createdAt" || i === "updatedAt" || (n[i] = m(t));
20
+ }), n;
21
+ }
22
+ return e;
23
+ }, S = (e, n) => {
24
+ if (!n) return !e;
25
+ if (typeof n == "string")
26
+ return n === C ? !0 : O(e) === n;
27
+ if (n.genericKey) return !0;
28
+ const t = O(n), a = O(e);
29
+ return !!t && t === a;
30
+ }, z = (e, n) => {
31
+ switch (e.__typename) {
32
+ case "DataTypeRulesContainsKeyConfig":
33
+ case "DataTypeRulesContainsTypeConfig":
34
+ case "DataTypeRulesReturnTypeConfig": {
35
+ const i = e.dataTypeIdentifier;
36
+ return i ? {
37
+ ...e,
38
+ dataTypeIdentifier: M(i, n)
39
+ } : e;
40
+ }
41
+ case "DataTypeRulesInputTypesConfig": {
42
+ const i = e, t = i.inputTypes?.map((a) => ({
43
+ ...a,
44
+ dataTypeIdentifier: M(a.dataTypeIdentifier, n)
45
+ }));
46
+ return {
47
+ ...i,
48
+ inputTypes: t
49
+ };
50
+ }
51
+ default:
52
+ return e;
53
+ }
54
+ }, w = (e, n, i) => {
55
+ const t = {}, a = new Set(i), c = (s, r) => {
56
+ if (!s || !r) return;
57
+ const f = j(s, a);
58
+ if (f && a.has(f)) {
59
+ T(r) && (t[f] = r);
60
+ return;
61
+ }
62
+ const o = _(s);
63
+ if (o.length === 0) return;
64
+ const u = _(r);
65
+ for (const p of o) {
66
+ const l = u.find((g) => g.target === p.target);
67
+ if (!l) continue;
68
+ const d = (p.sourceDataTypeIdentifiers ?? []).map((g) => j(g, a)).filter((g) => !!g && a.has(g)), I = R(p), D = l.sourceDataTypeIdentifiers ?? [];
69
+ if ((I.has("AND") || I.has("OR")) && D.length === 1 && d.length === (p.sourceDataTypeIdentifiers?.length ?? 0))
70
+ for (const g of d)
71
+ t[g] = D[0];
72
+ else {
73
+ const g = Math.min(p.sourceDataTypeIdentifiers?.length ?? 0, D.length);
74
+ for (let K = 0; K < g; K++)
75
+ c(p.sourceDataTypeIdentifiers[K], D[K]);
76
+ }
77
+ }
78
+ };
79
+ return c(e, n), t;
80
+ }, M = (e, n) => {
81
+ if (!T(e)) return e;
82
+ const {
83
+ genericKey: i,
84
+ genericType: t
85
+ } = e;
86
+ if (i && n.has(i)) {
87
+ const c = n.get(i);
88
+ return c && T(c) ? c : e;
89
+ }
90
+ if (!t) return e;
91
+ const a = (t.genericMappers ?? []).map((c) => {
92
+ const s = [];
93
+ for (const r of c.sourceDataTypeIdentifiers ?? []) {
94
+ if (!r) continue;
95
+ const f = r.genericKey;
96
+ if (f && n.has(f)) {
97
+ const o = n.get(f);
98
+ o && A(o) ? s.push(...o.sourceDataTypeIdentifiers) : o && T(o) ? s.push(o) : s.push(r);
99
+ } else T(r) ? s.push(M(r, n)) : s.push(r);
100
+ }
101
+ return G(c, s);
102
+ });
103
+ return {
104
+ ...e,
105
+ genericType: {
106
+ ...t,
107
+ genericMappers: a
108
+ }
109
+ };
110
+ }, J = (e, n, i) => {
111
+ const t = {}, a = new Set(i), c = (s, r, f) => {
112
+ if (!(!s || !r || a.size === 0)) {
113
+ if (T(s)) {
114
+ const o = s.genericKey;
115
+ if (o && a.has(o) && (f ? t[o] = f : (A(r) || T(r)) && (t[o] = r), a.delete(o), a.size === 0))
116
+ return;
117
+ }
118
+ if (A(s) && A(r)) {
119
+ const o = Math.min(s.sourceDataTypeIdentifiers?.length, r.sourceDataTypeIdentifiers?.length);
120
+ for (let u = 0; u < o; u++)
121
+ if (c(s.sourceDataTypeIdentifiers[u], r.sourceDataTypeIdentifiers[u], r), a.size === 0) return;
122
+ return;
123
+ }
124
+ if (E(s) && E(r)) {
125
+ const o = s.rules?.nodes ?? [], u = r.rules?.nodes ?? [], p = Math.min(o.length, u.length);
126
+ for (let l = 0; l < p; l++) {
127
+ const d = o[l], I = u[l];
128
+ if (!(!d || !I) && (c(d, I), a.size === 0))
129
+ return;
130
+ }
131
+ return;
132
+ }
133
+ if (b(s) && b(r)) {
134
+ c(s.config, r.config);
135
+ return;
136
+ }
137
+ if (Array.isArray(s) && Array.isArray(r)) {
138
+ const o = Math.min(s.length, r.length);
139
+ for (let u = 0; u < o; u++)
140
+ if (c(s[u], r[u], f), a.size === 0) return;
141
+ return;
142
+ }
143
+ if (y(s) && y(r)) {
144
+ for (const o of Object.keys(s))
145
+ if (o in r && o !== "__typename" && (c(s[o], r[o], f), a.size === 0))
146
+ return;
147
+ }
148
+ }
149
+ };
150
+ return c(e, n), t;
151
+ }, Y = (e, n) => {
152
+ const i = e.rules ? {
153
+ ...e.rules,
154
+ nodes: e.rules.nodes?.map((t) => t && {
155
+ ...t,
156
+ config: z(t.config, n)
157
+ })
158
+ } : void 0;
159
+ return {
160
+ ...e,
161
+ rules: i
162
+ };
163
+ }, k = (e, n, i, t) => {
164
+ const a = /* @__PURE__ */ new Map(), c = e.genericKeys ?? [];
165
+ if (!e.parameterDefinitions || c.length <= 0) return a;
166
+ const s = new Set(c);
167
+ return e.parameterDefinitions.forEach((r, f) => {
168
+ const o = r.dataTypeIdentifier, u = n[f], p = i.getTypeFromValue(u, t);
169
+ if (!o || !p) return;
170
+ const l = w(o, p, c);
171
+ for (const [d, I] of Object.entries(l))
172
+ s.has(d) && (a.has(d) || a.set(d, I));
173
+ }), a;
174
+ };
175
+ function L(e, n) {
176
+ if (e.variant !== n.variant) return !1;
177
+ const i = n.rules?.nodes ?? [];
178
+ if (i.length === 0) return !0;
179
+ const t = e.rules?.nodes ?? [];
180
+ for (const a of i) {
181
+ if (!a) continue;
182
+ if (!t.some((s) => s ? x(s, a) : !1)) return !1;
183
+ }
184
+ return !0;
185
+ }
186
+ function x(e, n) {
187
+ if (e.variant !== n.variant) return !1;
188
+ switch (n.variant) {
189
+ case "CONTAINS_TYPE":
190
+ case "RETURN_TYPE":
191
+ return S(e.config.dataTypeIdentifier, n.config.dataTypeIdentifier);
192
+ case "CONTAINS_KEY": {
193
+ const i = e.config, t = n.config;
194
+ return i.key !== t.key ? !1 : S(i.dataTypeIdentifier, t.dataTypeIdentifier);
195
+ }
196
+ case "INPUT_TYPE": {
197
+ const i = e.config, a = n.config.inputTypes ?? [], c = i.inputTypes ?? [];
198
+ return a.every((s) => c.some((r) => S(r.dataTypeIdentifier, s.dataTypeIdentifier)));
199
+ }
200
+ case "ITEM_OF_COLLECTION": {
201
+ const i = e.config.items ?? [], t = n.config.items ?? [];
202
+ return i.length !== t.length ? !1 : i.every((a, c) => a === t[c]);
203
+ }
204
+ case "NUMBER_RANGE": {
205
+ const i = e.config, t = n.config;
206
+ return i.from === t.from && i.to === t.to && i.steps === t.steps;
207
+ }
208
+ case "REGEX": {
209
+ const i = e.config.pattern, t = n.config.pattern;
210
+ return i === t;
211
+ }
212
+ default:
213
+ return JSON.stringify(m(e.config)) === JSON.stringify(m(n.config));
214
+ }
215
+ }
216
+ function V(e, n) {
217
+ const i = (s) => !!(s === C || T(s) && s.genericKey), t = (s, r) => i(s) || i(r) ? !0 : s == null || r == null ? s === r : Array.isArray(r) ? !Array.isArray(s) || s.length !== r.length ? !1 : s.every((f, o) => t(f, r[o])) : y(r) ? y(s) ? Object.keys(r).every((o) => t(s[o], r[o])) : !1 : s === r, a = m(e), c = m(n);
218
+ return t(a, c);
219
+ }
220
+ const P = (e, n) => {
221
+ if (typeof e == "string") {
222
+ const t = n.getDataType(e);
223
+ if (!t) return e;
224
+ const a = t.genericKeys ?? [];
225
+ if (t.variant === "ARRAY" && a.length > 0) {
226
+ const s = t.rules?.nodes?.find((r) => r?.variant === "CONTAINS_TYPE")?.config?.dataTypeIdentifier;
227
+ if (s) {
228
+ const [r] = a;
229
+ return r ? {
230
+ dataType: t.json,
231
+ genericType: {
232
+ dataType: t.json,
233
+ genericMappers: [{
234
+ target: r,
235
+ sourceDataTypeIdentifiers: [P(s, n)]
236
+ }]
237
+ }
238
+ } : e;
239
+ }
240
+ }
241
+ return e;
242
+ }
243
+ if (!T(e) || !e.genericType) return e;
244
+ const i = e.genericType.genericMappers?.map((t) => ({
245
+ ...t,
246
+ sourceDataTypeIdentifiers: t?.sourceDataTypeIdentifiers?.map((a) => P(a, n))
247
+ })) ?? [];
248
+ return {
249
+ ...e,
250
+ genericType: {
251
+ ...e.genericType,
252
+ genericMappers: i
253
+ }
254
+ };
255
+ }, h = (e) => {
256
+ if (Array.isArray(e)) {
257
+ const n = e.map(h);
258
+ return n.length <= 1 ? n : n.every(y) ? [...n].sort((a, c) => JSON.stringify(a).localeCompare(JSON.stringify(c))) : n.every((a) => !Array.isArray(a) && !y(a)) ? [...n].sort((a, c) => JSON.stringify(a).localeCompare(JSON.stringify(c))) : n;
259
+ }
260
+ if (y(e)) {
261
+ const n = e;
262
+ return Object.keys(n).sort().reduce((i, t) => (i[t] = h(n[t]), i), {});
263
+ }
264
+ return e;
265
+ }, F = (e, n = []) => {
266
+ const i = new Set(n), t = (r) => r ? i.size === 0 ? !0 : i.has(r) : !1, a = (r) => {
267
+ const o = t(r.target) ? C : r.target, u = (r.sourceDataTypeIdentifiers ?? []).map((p) => s(p));
268
+ return h({
269
+ ...r,
270
+ target: o,
271
+ sourceDataTypeIdentifiers: u
272
+ });
273
+ }, c = (r) => {
274
+ const o = t(r.genericKey) ? C : r.genericKey, u = {
275
+ ...r,
276
+ genericKey: o,
277
+ dataType: r.dataType ? s(r.dataType) : r.dataType,
278
+ genericType: r.genericType ? s(r.genericType) : r.genericType
279
+ };
280
+ return h(u);
281
+ };
282
+ function s(r) {
283
+ if (r == null) return r;
284
+ if (Array.isArray(r)) {
285
+ const f = r.map((o) => s(o));
286
+ return h(f);
287
+ }
288
+ if (T(r))
289
+ return c(r);
290
+ if (A(r))
291
+ return a(r);
292
+ if (y(r)) {
293
+ const f = Object.entries(r).reduce((o, [u, p]) => (o[u] = s(p), o), {});
294
+ return h(f);
295
+ }
296
+ return r;
297
+ }
298
+ return s(e);
299
+ };
300
+ export {
301
+ L as isMatchingDataTypeObject,
302
+ V as isMatchingType,
303
+ Y as replaceGenericKeysInDataTypeObject,
304
+ M as replaceGenericKeysInType,
305
+ F as replaceGenericsAndSortType,
306
+ J as resolveAllGenericKeysInDataTypeObject,
307
+ w as resolveGenericKeyMappings,
308
+ k as resolveGenericKeys,
309
+ P as resolveType
310
+ };
@@ -0,0 +1,8 @@
1
+ export * from './arrayService';
2
+ export * from './contextStore';
3
+ export * from './inspection';
4
+ export * from './nonReactiveArrayService';
5
+ export * from './objectStore';
6
+ export * from './reactiveArrayService';
7
+ export * from './types';
8
+ export * from './utils';
@@ -0,0 +1,28 @@
1
+ import { ContextStore as o, ContextStoreProvider as t, useService as i, useStore as c } from "./contextStore.js";
2
+ import { InspectionSeverity as v } from "./inspection.js";
3
+ import { NonReactiveArrayService as S, createNonReactiveArrayService as p } from "./nonReactiveArrayService.js";
4
+ import { ObjectService as g, createObjectService as x } from "./objectStore.js";
5
+ import { ReactiveArrayService as f, useReactiveArrayService as C } from "./reactiveArrayService.js";
6
+ import { Colors as y } from "./types.js";
7
+ import { getChild as P, getContent as u, getPositionAroundTarget as R, getPositioning as b, getWindowPositioning as j, mergeCode0Props as l, parseUnit as N } from "./utils.js";
8
+ export {
9
+ y as Colors,
10
+ o as ContextStore,
11
+ t as ContextStoreProvider,
12
+ v as InspectionSeverity,
13
+ S as NonReactiveArrayService,
14
+ g as ObjectService,
15
+ f as ReactiveArrayService,
16
+ p as createNonReactiveArrayService,
17
+ x as createObjectService,
18
+ P as getChild,
19
+ u as getContent,
20
+ R as getPositionAroundTarget,
21
+ b as getPositioning,
22
+ j as getWindowPositioning,
23
+ l as mergeCode0Props,
24
+ N as parseUnit,
25
+ C as useReactiveArrayService,
26
+ i as useService,
27
+ c as useStore
28
+ };
@@ -0,0 +1,13 @@
1
+ import { Maybe, Scalars, TranslationConnection } from '@code0-tech/sagittarius-graphql-types';
2
+ export declare enum InspectionSeverity {
3
+ TYPO = 0,
4
+ GRAMMAR = 1,
5
+ WEAK = 2,
6
+ WARNING = 3,
7
+ ERROR = 4
8
+ }
9
+ export interface ValidationResult {
10
+ parameterId: Maybe<Scalars["ParameterDefinitionID"]["output"]>;
11
+ type: InspectionSeverity;
12
+ message: TranslationConnection;
13
+ }
@@ -0,0 +1,4 @@
1
+ var A = /* @__PURE__ */ ((R) => (R[R.TYPO = 0] = "TYPO", R[R.GRAMMAR = 1] = "GRAMMAR", R[R.WEAK = 2] = "WEAK", R[R.WARNING = 3] = "WARNING", R[R.ERROR = 4] = "ERROR", R))(A || {});
2
+ export {
3
+ A as InspectionSeverity
4
+ };
@@ -0,0 +1,19 @@
1
+ import { ArrayService } from './arrayService';
2
+ /**
3
+ * using a React ref as a store in combination with a map
4
+ * to be able to access and modify the store easily
5
+ */
6
+ export type NonReactiveArrayStore<K> = K[];
7
+ export declare class NonReactiveArrayService<T> implements ArrayService<T> {
8
+ protected store: NonReactiveArrayStore<T>;
9
+ constructor(store: NonReactiveArrayStore<T>);
10
+ delete(index: number): void;
11
+ add(value: T): void;
12
+ set(index: number, value: T): void;
13
+ has(index: number): boolean;
14
+ get(index: number): T;
15
+ values(): NonReactiveArrayStore<T>;
16
+ update(): void;
17
+ clear(): void;
18
+ }
19
+ export declare const createNonReactiveArrayService: <K, T extends ArrayService<K>>(service: typeof T, callback?: (store: NonReactiveArrayStore<K>) => T) => [K[] | undefined, T];
@@ -0,0 +1,54 @@
1
+ function o(t, e, r) {
2
+ return (e = s(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
3
+ }
4
+ function s(t) {
5
+ var e = n(t, "string");
6
+ return typeof e == "symbol" ? e : e + "";
7
+ }
8
+ function n(t, e) {
9
+ if (typeof t != "object" || !t) return t;
10
+ var r = t[Symbol.toPrimitive];
11
+ if (r !== void 0) {
12
+ var i = r.call(t, e);
13
+ if (typeof i != "object") return i;
14
+ throw new TypeError("@@toPrimitive must return a primitive value.");
15
+ }
16
+ return (e === "string" ? String : Number)(t);
17
+ }
18
+ class u {
19
+ constructor(e) {
20
+ o(this, "store", void 0), this.store = e;
21
+ }
22
+ delete(e) {
23
+ delete this.store[e];
24
+ }
25
+ add(e) {
26
+ this.store.push(e);
27
+ }
28
+ set(e, r) {
29
+ this.store[e] = r;
30
+ }
31
+ has(e) {
32
+ return !!this.store[e];
33
+ }
34
+ get(e) {
35
+ return this.store[e];
36
+ }
37
+ values() {
38
+ return this.store;
39
+ }
40
+ update() {
41
+ this.store = [...this.store];
42
+ }
43
+ clear() {
44
+ this.store = [];
45
+ }
46
+ }
47
+ const a = (t, e) => {
48
+ const r = [];
49
+ return [r, e ? e(r) : new t(r)];
50
+ };
51
+ export {
52
+ u as NonReactiveArrayService,
53
+ a as createNonReactiveArrayService
54
+ };
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * using a React ref as a store in combination with a map
4
+ * to be able to access and modify the store easily
5
+ */
6
+ export type ObjectStore<K> = [K | undefined, React.Dispatch<React.SetStateAction<K>>];
7
+ export declare class ObjectService<K> {
8
+ protected readonly store: ObjectStore<K>;
9
+ constructor(store: ObjectStore<K>);
10
+ object(): K | undefined;
11
+ }
12
+ export declare const createObjectService: <K, T extends ObjectService<K>>(service: typeof T, callback?: (store: ObjectStore<K>) => T, initial?: K) => [K | undefined, T];
@@ -0,0 +1,34 @@
1
+ import o from "react";
2
+ function n(e, r, t) {
3
+ return (r = u(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
4
+ }
5
+ function u(e) {
6
+ var r = c(e, "string");
7
+ return typeof r == "symbol" ? r : r + "";
8
+ }
9
+ function c(e, r) {
10
+ if (typeof e != "object" || !e) return e;
11
+ var t = e[Symbol.toPrimitive];
12
+ if (t !== void 0) {
13
+ var i = t.call(e, r);
14
+ if (typeof i != "object") return i;
15
+ throw new TypeError("@@toPrimitive must return a primitive value.");
16
+ }
17
+ return (r === "string" ? String : Number)(e);
18
+ }
19
+ class f {
20
+ constructor(r) {
21
+ n(this, "store", void 0), this.store = r;
22
+ }
23
+ object() {
24
+ return this.store[0];
25
+ }
26
+ }
27
+ const v = (e, r, t) => {
28
+ const i = o.useState(t);
29
+ return [i[0], r ? r(i) : new e(i)];
30
+ };
31
+ export {
32
+ f as ObjectService,
33
+ v as createObjectService
34
+ };
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { ArrayService } from './arrayService';
3
+ export type ReactiveArrayStore<T> = {
4
+ getState: () => T[];
5
+ setState: React.Dispatch<React.SetStateAction<T[]>>;
6
+ };
7
+ export declare class ReactiveArrayService<T> implements ArrayService<T> {
8
+ protected readonly access: ReactiveArrayStore<T>;
9
+ constructor(access: ReactiveArrayStore<T>);
10
+ delete(index: number): void;
11
+ add(value: T): void;
12
+ set(index: number, value: T): void;
13
+ has(index: number): boolean;
14
+ get(index: number): T;
15
+ values(): T[];
16
+ update(): void;
17
+ clear(): void;
18
+ }
19
+ type ArrayServiceCtor<K, S extends ArrayService<K>> = new (access: ReactiveArrayStore<K>) => S;
20
+ type InitialArg<K, S extends ArrayService<K>> = K[] | ((svc: S) => K[]);
21
+ export declare function useReactiveArrayService<K, S extends ArrayService<K>>(Ctor: ArrayServiceCtor<K, S> | ((store: ReactiveArrayStore<K>) => S), initial?: InitialArg<K, S>): [K[], S];
22
+ export {};
@@ -0,0 +1,91 @@
1
+ import n, { startTransition as a } from "react";
2
+ function v(t, e, r) {
3
+ return (e = y(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
4
+ }
5
+ function y(t) {
6
+ var e = h(t, "string");
7
+ return typeof e == "symbol" ? e : e + "";
8
+ }
9
+ function h(t, e) {
10
+ if (typeof t != "object" || !t) return t;
11
+ var r = t[Symbol.toPrimitive];
12
+ if (r !== void 0) {
13
+ var s = r.call(t, e);
14
+ if (typeof s != "object") return s;
15
+ throw new TypeError("@@toPrimitive must return a primitive value.");
16
+ }
17
+ return (e === "string" ? String : Number)(t);
18
+ }
19
+ class b {
20
+ constructor(e) {
21
+ v(this, "access", void 0), this.access = e;
22
+ }
23
+ delete(e) {
24
+ a(() => {
25
+ this.access.setState((r) => r.filter((s, c) => c !== e));
26
+ });
27
+ }
28
+ add(e) {
29
+ a(() => {
30
+ this.access.setState((r) => [...r, e]);
31
+ });
32
+ }
33
+ set(e, r) {
34
+ a(() => {
35
+ this.access.setState((s) => {
36
+ const c = s.slice();
37
+ return c[e] = r, c;
38
+ });
39
+ });
40
+ }
41
+ has(e) {
42
+ const r = this.access.getState();
43
+ return e >= 0 && e < r.length;
44
+ }
45
+ get(e) {
46
+ return this.access.getState()[e];
47
+ }
48
+ values() {
49
+ return this.access.getState();
50
+ }
51
+ update() {
52
+ a(() => {
53
+ this.access.setState((e) => e.slice());
54
+ });
55
+ }
56
+ clear() {
57
+ a(() => {
58
+ this.access.setState(() => []);
59
+ });
60
+ }
61
+ }
62
+ function g(t, e = []) {
63
+ const [r, s] = n.useState(Array.isArray(e) ? e : []), c = n.useRef(r);
64
+ n.useEffect(() => {
65
+ c.current = r;
66
+ }, [r]);
67
+ const u = n.useCallback(() => c.current, []), o = n.useMemo(() => {
68
+ const i = {
69
+ getState: u,
70
+ setState: s
71
+ }, f = {
72
+ construct() {
73
+ return f;
74
+ }
75
+ };
76
+ return ((l) => {
77
+ try {
78
+ return !!new new Proxy(l, f)();
79
+ } catch {
80
+ return !1;
81
+ }
82
+ })(t) ? new t(i) : t(i);
83
+ }, [t, u, s]);
84
+ return n.useEffect(() => {
85
+ typeof e == "function" && s(e(o));
86
+ }, [o, e]), [r, o];
87
+ }
88
+ export {
89
+ b as ReactiveArrayService,
90
+ g as useReactiveArrayService
91
+ };
@@ -0,0 +1,57 @@
1
+ import { default as React, HTMLProps } from 'react';
2
+ export type Color = "primary" | "secondary" | "info" | "success" | "warning" | "error";
3
+ export declare const Colors: Color[];
4
+ export type Code0Sizes = "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
5
+ export type Code0FontSizes = "0.35" | "0.7" | "0.8" | "1" | "1.2" | "1.3";
6
+ export type StyleProp<Value> = Value;
7
+ export interface Code0ComponentProps {
8
+ m?: StyleProp<number | `${number}`>;
9
+ my?: StyleProp<number | `${number}`>;
10
+ mx?: StyleProp<number | `${number}`>;
11
+ mt?: StyleProp<number | `${number}`>;
12
+ mb?: StyleProp<number | `${number}`>;
13
+ ml?: StyleProp<number | `${number}`>;
14
+ mr?: StyleProp<number | `${number}`>;
15
+ p?: StyleProp<number | `${number}`>;
16
+ py?: StyleProp<number | `${number}`>;
17
+ px?: StyleProp<number | `${number}`>;
18
+ pt?: StyleProp<number | `${number}`>;
19
+ pb?: StyleProp<number | `${number}`>;
20
+ pl?: StyleProp<number | `${number}`>;
21
+ pr?: StyleProp<number | `${number}`>;
22
+ bg?: React.CSSProperties['backgroundColor'];
23
+ c?: React.CSSProperties['color'];
24
+ opacity?: React.CSSProperties['opacity'];
25
+ ff?: StyleProp<'mono' | 'text' | 'heading' | (string & {})>;
26
+ fz?: StyleProp<Code0FontSizes | number | `${number}`>;
27
+ fw?: StyleProp<React.CSSProperties['fontWeight']>;
28
+ lts?: StyleProp<React.CSSProperties['letterSpacing']>;
29
+ ta?: StyleProp<React.CSSProperties['textAlign']>;
30
+ lh?: StyleProp<number | (string & {})>;
31
+ fs?: StyleProp<React.CSSProperties['fontStyle']>;
32
+ tt?: StyleProp<React.CSSProperties['textTransform']>;
33
+ td?: StyleProp<React.CSSProperties['textDecoration']>;
34
+ w?: StyleProp<React.CSSProperties['width']>;
35
+ miw?: StyleProp<React.CSSProperties['minWidth']>;
36
+ maw?: StyleProp<React.CSSProperties['maxWidth']>;
37
+ h?: StyleProp<React.CSSProperties['height']>;
38
+ mih?: StyleProp<React.CSSProperties['minHeight']>;
39
+ mah?: StyleProp<React.CSSProperties['maxHeight']>;
40
+ bgsz?: StyleProp<React.CSSProperties['backgroundSize']>;
41
+ bgp?: StyleProp<React.CSSProperties['backgroundPosition']>;
42
+ bgr?: StyleProp<React.CSSProperties['backgroundRepeat']>;
43
+ bga?: StyleProp<React.CSSProperties['backgroundAttachment']>;
44
+ pos?: StyleProp<React.CSSProperties['position']>;
45
+ top?: StyleProp<React.CSSProperties['top']>;
46
+ left?: StyleProp<React.CSSProperties['left']>;
47
+ bottom?: StyleProp<React.CSSProperties['bottom']>;
48
+ right?: StyleProp<React.CSSProperties['right']>;
49
+ inset?: StyleProp<React.CSSProperties['inset']>;
50
+ display?: StyleProp<React.CSSProperties['display']>;
51
+ flex?: StyleProp<React.CSSProperties['flex']>;
52
+ align?: StyleProp<React.CSSProperties['alignItems']>;
53
+ justify?: StyleProp<React.CSSProperties['justifyContent']>;
54
+ tf?: StyleProp<React.CSSProperties['transform']>;
55
+ }
56
+ export interface Code0Component<T> extends Code0ComponentProps, HTMLProps<T> {
57
+ }
@@ -0,0 +1,4 @@
1
+ const r = ["primary", "secondary", "info", "success", "warning", "error"];
2
+ export {
3
+ r as Colors
4
+ };