@code0-tech/pictor 0.0.0-mvp.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +0 -0
  3. package/dist/DFlowDataType.service-Dz8pQUeO.js +793 -0
  4. package/dist/assets/Avatar.css +1 -0
  5. package/dist/assets/Badge.css +1 -0
  6. package/dist/assets/Breadcrumb.css +1 -0
  7. package/dist/assets/Button.css +1 -0
  8. package/dist/assets/ButtonGroup.css +1 -0
  9. package/dist/assets/Card.css +1 -0
  10. package/dist/assets/Col.css +1 -0
  11. package/dist/assets/Command.css +1 -0
  12. package/dist/assets/Container.css +1 -0
  13. package/dist/assets/DFlow.css +1 -0
  14. package/dist/assets/DFlowFolder.css +1 -0
  15. package/dist/assets/DFlowFunctionDefaultCard.css +1 -0
  16. package/dist/assets/DFlowInputDataType.css +1 -0
  17. package/dist/assets/DFlowMiniMap.css +1 -0
  18. package/dist/assets/DFlowSuggestionSearchInput.css +1 -0
  19. package/dist/assets/DFlowValidation.css +1 -0
  20. package/dist/assets/DFullScreen.css +1 -0
  21. package/dist/assets/DLayout.css +1 -0
  22. package/dist/assets/DResizable.css +1 -0
  23. package/dist/assets/Dialog.css +1 -0
  24. package/dist/assets/FileTabs.css +1 -0
  25. package/dist/assets/Flex.css +1 -0
  26. package/dist/assets/Input.css +1 -0
  27. package/dist/assets/Menu.css +1 -0
  28. package/dist/assets/Quote.css +1 -0
  29. package/dist/assets/Row.css +1 -0
  30. package/dist/assets/ScrollArea.css +1 -0
  31. package/dist/assets/SegmentedControl.css +1 -0
  32. package/dist/assets/Text.css +1 -0
  33. package/dist/assets/Tooltip.css +1 -0
  34. package/dist/compiler-runtime-BNHg76kC.js +36 -0
  35. package/dist/components/avatar/Avatar.d.ts +8 -0
  36. package/dist/components/avatar/Avatar.js +55 -0
  37. package/dist/components/badge/Badge.d.ts +7 -0
  38. package/dist/components/badge/Badge.js +22 -0
  39. package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
  40. package/dist/components/breadcrumb/Breadcrumb.js +31 -0
  41. package/dist/components/button/Button.d.ts +10 -0
  42. package/dist/components/button/Button.js +28 -0
  43. package/dist/components/button-group/ButtonGroup.d.ts +7 -0
  44. package/dist/components/button-group/ButtonGroup.js +26 -0
  45. package/dist/components/card/Card.d.ts +14 -0
  46. package/dist/components/card/Card.js +39 -0
  47. package/dist/components/card/CardSection.d.ts +9 -0
  48. package/dist/components/card/CardSection.js +22 -0
  49. package/dist/components/col/Col.d.ts +13 -0
  50. package/dist/components/col/Col.js +26 -0
  51. package/dist/components/command/Command.d.ts +30 -0
  52. package/dist/components/command/Command.js +102 -0
  53. package/dist/components/container/Container.d.ts +6 -0
  54. package/dist/components/container/Container.js +20 -0
  55. package/dist/components/d-flow/DFlow.d.ts +5 -0
  56. package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
  57. package/dist/components/d-flow/DFlow.edges.hook.js +145 -0
  58. package/dist/components/d-flow/DFlow.js +373 -0
  59. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
  60. package/dist/components/d-flow/DFlow.nodes.hook.js +140 -0
  61. package/dist/components/d-flow/DFlow.service.d.ts +10 -0
  62. package/dist/components/d-flow/DFlow.service.js +11 -0
  63. package/dist/components/d-flow/DFlow.view.d.ts +109 -0
  64. package/dist/components/d-flow/DFlow.view.js +213 -0
  65. package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
  66. package/dist/components/d-flow/control/DFlowControl.js +77 -0
  67. package/dist/components/d-flow/control/index.d.ts +1 -0
  68. package/dist/components/d-flow/control/index.js +4 -0
  69. package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
  70. package/dist/components/d-flow/data-type/DFlowDataType.service.js +7 -0
  71. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
  72. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
  73. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
  74. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +6 -0
  75. package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
  76. package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
  77. package/dist/components/d-flow/data-type/index.d.ts +2 -0
  78. package/dist/components/d-flow/data-type/index.js +6 -0
  79. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
  80. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +6 -0
  81. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
  82. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +6 -0
  83. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
  84. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
  85. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
  86. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
  87. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
  88. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
  89. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
  90. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
  91. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
  92. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +7 -0
  93. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
  94. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
  95. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
  96. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -0
  97. package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
  98. package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
  99. package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
  100. package/dist/components/d-flow/folder/DFlowFolder.js +118 -0
  101. package/dist/components/d-flow/folder/index.d.ts +1 -0
  102. package/dist/components/d-flow/folder/index.js +6 -0
  103. package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
  104. package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
  105. package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
  106. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
  107. package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
  108. package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
  109. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
  110. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +75 -0
  111. package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
  112. package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
  113. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
  114. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
  115. package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
  116. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
  117. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
  118. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
  119. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
  120. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
  121. package/dist/components/d-flow/function/index.d.ts +2 -0
  122. package/dist/components/d-flow/function/index.js +7 -0
  123. package/dist/components/d-flow/index.d.ts +13 -0
  124. package/dist/components/d-flow/index.js +46 -0
  125. package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
  126. package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
  127. package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
  128. package/dist/components/d-flow/minimap/DFlowMiniMap.js +21 -0
  129. package/dist/components/d-flow/minimap/index.d.ts +1 -0
  130. package/dist/components/d-flow/minimap/index.js +4 -0
  131. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
  132. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +151 -0
  133. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
  134. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
  135. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
  136. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
  137. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
  138. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
  139. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
  140. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
  141. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
  142. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
  143. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
  144. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
  145. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
  146. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +21 -0
  147. package/dist/components/d-flow/suggestion/index.d.ts +2 -0
  148. package/dist/components/d-flow/suggestion/index.js +7 -0
  149. package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
  150. package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
  151. package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
  152. package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
  153. package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
  154. package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
  155. package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
  156. package/dist/components/d-flow/type/DFlowType.service.js +9 -0
  157. package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
  158. package/dist/components/d-flow/type/DFlowType.view.js +69 -0
  159. package/dist/components/d-flow/type/index.d.ts +2 -0
  160. package/dist/components/d-flow/type/index.js +6 -0
  161. package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
  162. package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
  163. package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
  164. package/dist/components/d-flow/validation/DFlowValidation.js +59 -0
  165. package/dist/components/d-flow/validation/index.d.ts +2 -0
  166. package/dist/components/d-flow/validation/index.js +6 -0
  167. package/dist/components/d-fullscreen/DFullScreen.d.ts +7 -0
  168. package/dist/components/d-fullscreen/DFullScreen.js +20 -0
  169. package/dist/components/d-layout/DLayout.d.ts +10 -0
  170. package/dist/components/d-layout/DLayout.js +51 -0
  171. package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
  172. package/dist/components/d-namespace/DNamespace.service.js +11 -0
  173. package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
  174. package/dist/components/d-namespace/DNamespace.view.js +65 -0
  175. package/dist/components/d-namespace/index.d.ts +12 -0
  176. package/dist/components/d-namespace/index.js +35 -0
  177. package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
  178. package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
  179. package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
  180. package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
  181. package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
  182. package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
  183. package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
  184. package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
  185. package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
  186. package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
  187. package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
  188. package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
  189. package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
  190. package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
  191. package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
  192. package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
  193. package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
  194. package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
  195. package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
  196. package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
  197. package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
  198. package/dist/components/d-organization/DOrganization.service.js +11 -0
  199. package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
  200. package/dist/components/d-organization/DOrganization.view.js +52 -0
  201. package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
  202. package/dist/components/d-organization/DOrganizationCard.js +63 -0
  203. package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
  204. package/dist/components/d-organization/DOrganizationMenu.js +18 -0
  205. package/dist/components/d-organization/index.d.ts +4 -0
  206. package/dist/components/d-organization/index.js +19 -0
  207. package/dist/components/d-resizable/DResizable.d.ts +10 -0
  208. package/dist/components/d-resizable/DResizable.js +31 -0
  209. package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
  210. package/dist/components/d-runtime/DRuntime.service.js +11 -0
  211. package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
  212. package/dist/components/d-runtime/DRuntime.view.js +73 -0
  213. package/dist/components/d-runtime/index.d.ts +2 -0
  214. package/dist/components/d-runtime/index.js +6 -0
  215. package/dist/components/d-user/DUser.service.d.ts +21 -0
  216. package/dist/components/d-user/DUser.service.js +17 -0
  217. package/dist/components/d-user/DUser.view.d.ts +52 -0
  218. package/dist/components/d-user/DUser.view.js +100 -0
  219. package/dist/components/d-user/DUserMenu.d.ts +8 -0
  220. package/dist/components/d-user/DUserMenu.js +28 -0
  221. package/dist/components/d-user/index.d.ts +3 -0
  222. package/dist/components/d-user/index.js +17 -0
  223. package/dist/components/dialog/Dialog.d.ts +28 -0
  224. package/dist/components/dialog/Dialog.js +98 -0
  225. package/dist/components/file-tabs/FileTabs.d.ts +17 -0
  226. package/dist/components/file-tabs/FileTabs.js +70 -0
  227. package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
  228. package/dist/components/file-tabs/FileTabs.service.js +47 -0
  229. package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
  230. package/dist/components/file-tabs/FileTabs.view.js +1 -0
  231. package/dist/components/flex/Flex.d.ts +7 -0
  232. package/dist/components/flex/Flex.js +21 -0
  233. package/dist/components/form/CheckboxInput.d.ts +5 -0
  234. package/dist/components/form/CheckboxInput.js +67 -0
  235. package/dist/components/form/EmailInput.d.ts +8 -0
  236. package/dist/components/form/EmailInput.js +20 -0
  237. package/dist/components/form/Input.d.ts +22 -0
  238. package/dist/components/form/Input.js +153 -0
  239. package/dist/components/form/InputDescription.d.ts +5 -0
  240. package/dist/components/form/InputDescription.js +12 -0
  241. package/dist/components/form/InputLabel.d.ts +5 -0
  242. package/dist/components/form/InputLabel.js +12 -0
  243. package/dist/components/form/InputMessage.d.ts +5 -0
  244. package/dist/components/form/InputMessage.js +18 -0
  245. package/dist/components/form/InputSuggestion.d.ts +19 -0
  246. package/dist/components/form/InputSuggestion.js +102 -0
  247. package/dist/components/form/NumberInput.d.ts +6 -0
  248. package/dist/components/form/NumberInput.js +20 -0
  249. package/dist/components/form/PasswordInput.d.ts +8 -0
  250. package/dist/components/form/PasswordInput.js +18 -0
  251. package/dist/components/form/PinInput.d.ts +11 -0
  252. package/dist/components/form/PinInput.js +66 -0
  253. package/dist/components/form/RadioGroup.d.ts +5 -0
  254. package/dist/components/form/RadioGroup.js +48 -0
  255. package/dist/components/form/RadioInput.d.ts +7 -0
  256. package/dist/components/form/RadioInput.js +27 -0
  257. package/dist/components/form/SwitchInput.d.ts +6 -0
  258. package/dist/components/form/SwitchInput.js +19 -0
  259. package/dist/components/form/TextInput.d.ts +7 -0
  260. package/dist/components/form/TextInput.js +19 -0
  261. package/dist/components/form/index.d.ts +15 -0
  262. package/dist/components/form/index.js +37 -0
  263. package/dist/components/form/useForm.d.ts +25 -0
  264. package/dist/components/form/useForm.js +57 -0
  265. package/dist/components/menu/Menu.d.ts +27 -0
  266. package/dist/components/menu/Menu.js +104 -0
  267. package/dist/components/quote/Quote.d.ts +10 -0
  268. package/dist/components/quote/Quote.js +48 -0
  269. package/dist/components/row/Row.d.ts +6 -0
  270. package/dist/components/row/Row.js +20 -0
  271. package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
  272. package/dist/components/scroll-area/ScrollArea.js +42 -0
  273. package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
  274. package/dist/components/segmented-control/SegmentedControl.js +23 -0
  275. package/dist/components/text/Text.d.ts +8 -0
  276. package/dist/components/text/Text.js +23 -0
  277. package/dist/components/tooltip/Tooltip.d.ts +13 -0
  278. package/dist/components/tooltip/Tooltip.js +47 -0
  279. package/dist/index.d.ts +28 -0
  280. package/dist/index.js +223 -0
  281. package/dist/utils/arrayService.d.ts +10 -0
  282. package/dist/utils/arrayService.js +1 -0
  283. package/dist/utils/contextStore.d.ts +62 -0
  284. package/dist/utils/contextStore.js +60 -0
  285. package/dist/utils/generics.d.ts +17 -0
  286. package/dist/utils/generics.js +311 -0
  287. package/dist/utils/index.d.ts +8 -0
  288. package/dist/utils/index.js +28 -0
  289. package/dist/utils/inspection.d.ts +13 -0
  290. package/dist/utils/inspection.js +4 -0
  291. package/dist/utils/nonReactiveArrayService.d.ts +19 -0
  292. package/dist/utils/nonReactiveArrayService.js +54 -0
  293. package/dist/utils/objectStore.d.ts +12 -0
  294. package/dist/utils/objectStore.js +34 -0
  295. package/dist/utils/reactiveArrayService.d.ts +22 -0
  296. package/dist/utils/reactiveArrayService.js +81 -0
  297. package/dist/utils/types.d.ts +57 -0
  298. package/dist/utils/types.js +4 -0
  299. package/dist/utils/utils.d.ts +68 -0
  300. package/dist/utils/utils.js +216 -0
  301. package/package.json +121 -0
@@ -0,0 +1,68 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ export declare const parseUnit: (str: string) => (number | string)[];
3
+ export declare const getChild: (children: ReactNode | ReactNode[], child: React.FC<any>, required?: boolean, matchingProps?: Object) => React.ReactElement | undefined;
4
+ export declare const getContent: (children: ReactNode | ReactNode[], ...child: React.FC<any>[]) => ReactNode[] | null;
5
+ export interface Positioning {
6
+ height: number;
7
+ width: number;
8
+ x: number;
9
+ y: number;
10
+ }
11
+ export declare const mergeCode0Props: (cn: string, rest: object) => {
12
+ m?: import('./types').StyleProp<number | `${number}`> | undefined;
13
+ my?: import('./types').StyleProp<number | `${number}`> | undefined;
14
+ mx?: import('./types').StyleProp<number | `${number}`> | undefined;
15
+ mt?: import('./types').StyleProp<number | `${number}`> | undefined;
16
+ mb?: import('./types').StyleProp<number | `${number}`> | undefined;
17
+ ml?: import('./types').StyleProp<number | `${number}`> | undefined;
18
+ mr?: import('./types').StyleProp<number | `${number}`> | undefined;
19
+ p?: import('./types').StyleProp<number | `${number}`> | undefined;
20
+ py?: import('./types').StyleProp<number | `${number}`> | undefined;
21
+ px?: import('./types').StyleProp<number | `${number}`> | undefined;
22
+ pt?: import('./types').StyleProp<number | `${number}`> | undefined;
23
+ pb?: import('./types').StyleProp<number | `${number}`> | undefined;
24
+ pl?: import('./types').StyleProp<number | `${number}`> | undefined;
25
+ pr?: import('./types').StyleProp<number | `${number}`> | undefined;
26
+ bg?: import("csstype").Property.BackgroundColor | undefined;
27
+ c?: import("csstype").Property.Color | undefined;
28
+ opacity?: import("csstype").Property.Opacity | undefined;
29
+ ff?: import('./types').StyleProp<"mono" | "text" | "heading" | (string & {})> | undefined;
30
+ fz?: import('./types').StyleProp<import('./types').Code0FontSizes | number | `${number}`> | undefined;
31
+ fw?: import("csstype").Property.FontWeight | undefined;
32
+ lts?: import("csstype").Property.LetterSpacing<string | number> | undefined;
33
+ ta?: import("csstype").Property.TextAlign | undefined;
34
+ lh?: import('./types').StyleProp<number | (string & {})> | undefined;
35
+ fs?: import("csstype").Property.FontStyle | undefined;
36
+ tt?: import("csstype").Property.TextTransform | undefined;
37
+ td?: import("csstype").Property.TextDecoration<string | number> | undefined;
38
+ w?: import("csstype").Property.Width<string | number> | undefined;
39
+ miw?: import("csstype").Property.MinWidth<string | number> | undefined;
40
+ maw?: import("csstype").Property.MaxWidth<string | number> | undefined;
41
+ h?: import("csstype").Property.Height<string | number> | undefined;
42
+ mih?: import("csstype").Property.MinHeight<string | number> | undefined;
43
+ mah?: import("csstype").Property.MaxHeight<string | number> | undefined;
44
+ bgsz?: import("csstype").Property.BackgroundSize<string | number> | undefined;
45
+ bgp?: import("csstype").Property.BackgroundPosition<string | number> | undefined;
46
+ bgr?: import("csstype").Property.BackgroundRepeat | undefined;
47
+ bga?: import("csstype").Property.BackgroundAttachment | undefined;
48
+ pos?: import("csstype").Property.Position | undefined;
49
+ top?: import("csstype").Property.Top<string | number> | undefined;
50
+ left?: import("csstype").Property.Left<string | number> | undefined;
51
+ bottom?: import("csstype").Property.Bottom<string | number> | undefined;
52
+ right?: import("csstype").Property.Right<string | number> | undefined;
53
+ inset?: import("csstype").Property.Inset<string | number> | undefined;
54
+ display?: import("csstype").Property.Display | undefined;
55
+ flex?: import("csstype").Property.Flex<string | number> | undefined;
56
+ align?: import("csstype").Property.AlignItems | undefined;
57
+ justify?: import("csstype").Property.JustifyContent | undefined;
58
+ tf?: import("csstype").Property.Transform | undefined;
59
+ style?: React.CSSProperties | undefined;
60
+ className: string;
61
+ };
62
+ export declare const getWindowPositioning: () => Omit<Omit<Positioning, "x">, "y">;
63
+ export declare const getPositioning: (node: HTMLElement) => Positioning;
64
+ export declare const getPositionAroundTarget: (target: HTMLElement, element: HTMLElement, position?: "top" | "bottom" | "left" | "right") => {
65
+ position: string;
66
+ y: number;
67
+ x: number;
68
+ };
@@ -0,0 +1,216 @@
1
+ import h from "react";
2
+ import u from "merge-props";
3
+ const l = (i) => {
4
+ const r = /-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/, o = parseFloat(i), n = i.match(r) || [], t = n.length > 0 ? i.substr(n[0]?.length ?? 0).trim() : "";
5
+ return [o, t];
6
+ }, C = (i, r, o, n) => {
7
+ let t, a = !1;
8
+ return h.Children.forEach(i, (m, c) => {
9
+ let e = !0;
10
+ if (h.isValidElement(m) && n)
11
+ for (const g in n) {
12
+ const p = n[g];
13
+ if (!m.props[g] || m.props[g] != p) {
14
+ e = !1;
15
+ break;
16
+ }
17
+ }
18
+ if (h.isValidElement(m) && m.type == r && e)
19
+ t = m, a = !0;
20
+ else if (h.Children.count(i) - 1 == c && !a && !t && o) throw new Error(`${r.name} is required`);
21
+ }), t;
22
+ }, E = (i, ...r) => {
23
+ const o = h.Children.toArray(i).filter((n) => h.isValidElement(n) ? !r.find((t) => t == n.type) : !0);
24
+ return o.length == 0 ? null : o;
25
+ }, b = (i) => ({
26
+ ...i.m ? {
27
+ margin: `${i.m}rem`
28
+ } : {},
29
+ ...i.my ? {
30
+ marginTop: `${i.my}rem`,
31
+ marginBottom: `${i.my}rem`
32
+ } : {},
33
+ ...i.mx ? {
34
+ marginLeft: `${i.mx}rem`,
35
+ marginRight: `${i.mx}rem`
36
+ } : {},
37
+ ...i.mt ? {
38
+ marginTop: `${i.mt}rem`
39
+ } : {},
40
+ ...i.mb ? {
41
+ marginBottom: `${i.mb}rem`
42
+ } : {},
43
+ ...i.ml ? {
44
+ marginLeft: `${i.ml}rem`
45
+ } : {},
46
+ ...i.mr ? {
47
+ marginRight: `${i.mr}rem`
48
+ } : {},
49
+ ...i.p ? {
50
+ padding: `${i.p}rem`
51
+ } : {},
52
+ ...i.py ? {
53
+ paddingTop: `${i.py}rem`,
54
+ paddingBottom: `${i.py}rem`
55
+ } : {},
56
+ ...i.px ? {
57
+ paddingLeft: `${i.px}rem`,
58
+ paddingRight: `${i.px}rem`
59
+ } : {},
60
+ ...i.pt ? {
61
+ paddingTop: `${i.pt}rem`
62
+ } : {},
63
+ ...i.pb ? {
64
+ paddingBottom: `${i.pb}rem`
65
+ } : {},
66
+ ...i.pl ? {
67
+ paddingLeft: `${i.pl}rem`
68
+ } : {},
69
+ ...i.pr ? {
70
+ paddingRight: `${i.pr}rem`
71
+ } : {},
72
+ ...i.bg ? {
73
+ backgroundColor: i.bg
74
+ } : {},
75
+ ...i.c ? {
76
+ color: i.c
77
+ } : {},
78
+ ...i.opacity ? {
79
+ opacity: i.opacity
80
+ } : {},
81
+ ...i.ff ? {
82
+ fontFamily: i.ff
83
+ } : {},
84
+ ...i.fz ? {
85
+ fontSize: `${i.fz}rem`
86
+ } : {},
87
+ ...i.ta ? {
88
+ textAlign: i.ta
89
+ } : {},
90
+ ...i.w ? {
91
+ width: i.w
92
+ } : {},
93
+ ...i.miw ? {
94
+ minWidth: i.miw
95
+ } : {},
96
+ ...i.maw ? {
97
+ maxWidth: i.maw
98
+ } : {},
99
+ ...i.h ? {
100
+ height: i.h
101
+ } : {},
102
+ ...i.mih ? {
103
+ minHeight: i.mih
104
+ } : {},
105
+ ...i.mah ? {
106
+ maxHeight: i.mah
107
+ } : {},
108
+ ...i.pos ? {
109
+ position: i.pos
110
+ } : {},
111
+ ...i.top ? {
112
+ top: i.top
113
+ } : {},
114
+ ...i.left ? {
115
+ left: i.left
116
+ } : {},
117
+ ...i.bottom ? {
118
+ bottom: i.bottom
119
+ } : {},
120
+ ...i.right ? {
121
+ right: i.right
122
+ } : {},
123
+ ...i.display ? {
124
+ display: i.display
125
+ } : {},
126
+ ...i.flex ? {
127
+ flex: i.flex
128
+ } : {},
129
+ ...i.align ? {
130
+ alignItems: i.align
131
+ } : {},
132
+ ...i.justify ? {
133
+ justifyContent: i.justify
134
+ } : {},
135
+ ...i.tf ? {
136
+ transform: i.tf
137
+ } : {}
138
+ }), R = (i, r) => {
139
+ const o = b(r), n = {
140
+ ...r
141
+ };
142
+ return ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex", "align", "justify", "tf"].forEach((a) => {
143
+ delete n[a];
144
+ }), u(n, {
145
+ className: i,
146
+ ...Object.keys(o).length !== 0 ? {
147
+ style: o
148
+ } : {}
149
+ });
150
+ }, w = () => ({
151
+ height: window.innerHeight,
152
+ width: window.innerWidth
153
+ }), f = (i) => ({
154
+ width: i.offsetWidth,
155
+ height: i.offsetHeight,
156
+ x: i.getBoundingClientRect().left,
157
+ y: i.getBoundingClientRect().top
158
+ }), X = (i, r, o = "bottom") => {
159
+ const t = f(i), a = f(r), m = w(), c = [{
160
+ name: "bottom",
161
+ hierarchy: ["top", "left", "right"],
162
+ calculationY: t.y + t.height + 8,
163
+ calculationX: t.x,
164
+ conditionFit: t.y + t.height + 8 + a.height <= m.height
165
+ }, {
166
+ name: "top",
167
+ hierarchy: ["bottom", "left", "right"],
168
+ calculationY: t.y - 8 - a.height,
169
+ calculationX: t.x,
170
+ conditionFit: t.y - 8 - a.height >= 0
171
+ }, {
172
+ name: "left",
173
+ hierarchy: ["right", "bottom", "top"],
174
+ calculationY: t.y,
175
+ calculationX: t.x - 8 - a.width,
176
+ conditionFit: t.x - 8 - a.width >= 0
177
+ }, {
178
+ name: "right",
179
+ hierarchy: ["left", "bottom", "top"],
180
+ calculationY: t.y,
181
+ calculationX: t.x + 8 + t.width,
182
+ conditionFit: t.x + t.width + 8 + a.width <= m.width
183
+ }], e = c.find((g) => g.name == o);
184
+ if (!e) return {
185
+ position: "bottom",
186
+ y: c[0].calculationY,
187
+ x: c[0].calculationX
188
+ };
189
+ if (e.conditionFit) return {
190
+ position: o,
191
+ y: e.calculationY,
192
+ x: e.calculationX
193
+ };
194
+ for (let g = 0; g < e.hierarchy.length; g++) {
195
+ const p = c.find((d) => d.name == e.hierarchy[g]);
196
+ if (p?.conditionFit) return {
197
+ position: p.name,
198
+ y: p.calculationY,
199
+ x: p.calculationX
200
+ };
201
+ }
202
+ return {
203
+ position: "bottom",
204
+ y: c[0].calculationY,
205
+ x: c[0].calculationX
206
+ };
207
+ };
208
+ export {
209
+ C as getChild,
210
+ E as getContent,
211
+ X as getPositionAroundTarget,
212
+ f as getPositioning,
213
+ w as getWindowPositioning,
214
+ R as mergeCode0Props,
215
+ l as parseUnit
216
+ };
package/package.json ADDED
@@ -0,0 +1,121 @@
1
+ {
2
+ "name": "@code0-tech/pictor",
3
+ "version": "0.0.0-mvp.2",
4
+ "type": "module",
5
+ "description": "A simple template for a custom React component library",
6
+ "scripts": {
7
+ "dev": "npm run storybook:dev",
8
+ "test": "jest --passWithNoTests",
9
+ "build": "npm run clear && vite build",
10
+ "clear": "concurrently \"rimraf ./dist\" \"rimraf ./storybook-static\"",
11
+ "rollup": "rollup -c",
12
+ "storybook:dev": "storybook dev -p 6006",
13
+ "storybook:build": "storybook build",
14
+ "storybook:test": "test-storybook",
15
+ "storybook:test:all": "test-storybook --browsers chromium firefox webkit",
16
+ "storybook:test:update": "npm run storybook:test:all -- -u",
17
+ "docs:preview": "npm run --prefix ../telescopium project:preview pictor"
18
+ },
19
+ "author": "CodeZero",
20
+ "devDependencies": {
21
+ "@ariakit/react": "^0.4.17",
22
+ "@babel/plugin-proposal-decorators": "^7.28.0",
23
+ "@babel/plugin-transform-class-properties": "^7.27.1",
24
+ "@code0-tech/sagittarius-graphql-types": "^0.0.0-65144a9920c6a8de3bcf24acdcb8eec4158cef73",
25
+ "@dagrejs/dagre": "^1.1.5",
26
+ "@mdx-js/react": "^3.1.1",
27
+ "@radix-ui/react-checkbox": "^1.3.3",
28
+ "@radix-ui/react-dialog": "^1.1.15",
29
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
30
+ "@radix-ui/react-one-time-password-field": "^0.1.8",
31
+ "@radix-ui/react-radio-group": "^1.3.8",
32
+ "@radix-ui/react-scroll-area": "^1.2.10",
33
+ "@radix-ui/react-tabs": "^1.1.13",
34
+ "@radix-ui/react-toggle-group": "^1.1.11",
35
+ "@radix-ui/react-tooltip": "^1.2.8",
36
+ "@rollup/plugin-commonjs": "^28.0.9",
37
+ "@rollup/plugin-node-resolve": "^16.0.3",
38
+ "@rollup/plugin-terser": "^0.4.4",
39
+ "@rollup/plugin-typescript": "^12.3.0",
40
+ "@storybook/addon-a11y": "^10.0.4",
41
+ "@storybook/addon-links": "^10.0.4",
42
+ "@storybook/addon-onboarding": "^10.0.4",
43
+ "@storybook/builder-vite": "^10.0.4",
44
+ "@storybook/cli": "^10.0.4",
45
+ "@storybook/react": "^10.0.4",
46
+ "@storybook/react-vite": "^10.0.4",
47
+ "@storybook/test-runner": "^0.24.1",
48
+ "@storybook/testing-library": "^0.2.2",
49
+ "@tabler/icons-react": "3.35.0",
50
+ "@types/jest-image-snapshot": "^6.4.0",
51
+ "@types/react": "^19.2.2",
52
+ "@vitejs/plugin-react": "^5.1.0",
53
+ "@xyflow/react": "^12.9.2",
54
+ "axe-playwright": "^2.2.2",
55
+ "babel-loader": "^10.0.0",
56
+ "babel-plugin-react-compiler": "^19.1.0-rc.3",
57
+ "cmdk": "^1.1.1",
58
+ "concurrently": "^9.2.1",
59
+ "css-loader": "^7.1.2",
60
+ "html-webpack-plugin": "^5.6.4",
61
+ "identity-obj-proxy": "^3.0.0",
62
+ "jest-image-snapshot": "^6.5.1",
63
+ "js-md5": "^0.8.3",
64
+ "merge-props": "^6.0.0",
65
+ "overlap-area": "^1.1.0",
66
+ "playwright": "1.55.1",
67
+ "react": "^19.2.0",
68
+ "react-dom": "^19.2.0",
69
+ "react-resizable-panels": "^3.0.6",
70
+ "react-zoom-pan-pinch": "^3.7.0",
71
+ "rimraf": "^6.1.0",
72
+ "sass": "^1.93.3",
73
+ "sass-loader": "^16.0.6",
74
+ "storybook": "^10.0.4",
75
+ "style-loader": "^4.0.0",
76
+ "ts-jest": "^29.4.5",
77
+ "ts-node": "^10.9.2",
78
+ "typescript": "^5.9.3",
79
+ "vite": "^7.2.1",
80
+ "vite-plugin-dts": "^4.5.4",
81
+ "vite-plugin-lib-inject-css": "^2.2.2"
82
+ },
83
+ "main": "dist/index.js",
84
+ "repository": {
85
+ "type": "git",
86
+ "url": "https://github.com/code0-tech/pictor"
87
+ },
88
+ "files": [
89
+ "dist"
90
+ ],
91
+ "types": "dist/index.d.ts",
92
+ "peerDependencies": {
93
+ "@ariakit/react": "^0.4.5",
94
+ "@code0-tech/sagittarius-graphql-types": "^0.0.0-4b2e73eae302fe499001bf42fdb3a6bcc5be78aa",
95
+ "@radix-ui/react-checkbox": "^1.3.2",
96
+ "@radix-ui/react-dialog": "^1.1.14",
97
+ "@radix-ui/react-dropdown-menu": "^2.1.15",
98
+ "@radix-ui/react-one-time-password-field": "^0.1.7",
99
+ "@radix-ui/react-radio-group": "^1.3.7",
100
+ "@radix-ui/react-scroll-area": "^1.2.10",
101
+ "@radix-ui/react-tabs": "^1.1.12",
102
+ "@radix-ui/react-toggle-group": "^1.1.10",
103
+ "@radix-ui/react-tooltip": "^1.2.8",
104
+ "@tabler/icons-react": "^3.5.0",
105
+ "@xyflow/react": "^12.8.2",
106
+ "cmdk": "^1.1.1",
107
+ "js-md5": "^0.8.3",
108
+ "merge-props": "^6.0.0",
109
+ "overlap-area": "^1.1.0",
110
+ "react": "^18.0.0 || ^19.0.0",
111
+ "react-dom": "^18.0.0 || ^19.0.0",
112
+ "react-resizable-panels": "^3.0.3",
113
+ "react-zoom-pan-pinch": "^3.6.1"
114
+ },
115
+ "publishConfig": {
116
+ "access": "public"
117
+ },
118
+ "dependencies": {
119
+ "@code0-tech/definition-reader": "^0.0.16"
120
+ }
121
+ }