uiconfig-blueprint 0.0.3 → 0.1.0-dev.11

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 (260) hide show
  1. package/README.md +41 -3
  2. package/dist/ConfigObject.d.ts +7 -4
  3. package/dist/UiConfigRendererBlueprint.d.ts +6 -4
  4. package/dist/allPaths-Dhco1c7a.js +23 -0
  5. package/dist/{allPaths-3YKfhB8Q.js.map → allPaths-Dhco1c7a.js.map} +1 -1
  6. package/dist/{allPathsLoader-lWFPuUtu.js → allPathsLoader-BNvrKJa2.js} +5 -5
  7. package/dist/{allPathsLoader-lWFPuUtu.js.map → allPathsLoader-BNvrKJa2.js.map} +1 -1
  8. package/dist/bpComponents/BPButtonComponent.d.ts +2 -1
  9. package/dist/bpComponents/BPColorInputComponent.d.ts +2 -2
  10. package/dist/bpComponents/BPComponent.d.ts +10 -4
  11. package/dist/bpComponents/BPContainerComponent.d.ts +1 -1
  12. package/dist/bpComponents/BPDropdownInputComponent.d.ts +1 -2
  13. package/dist/bpComponents/BPFileComponent.d.ts +9 -7
  14. package/dist/bpComponents/BPFolderComponent.d.ts +10 -2
  15. package/dist/bpComponents/BPInputComponent.d.ts +4 -3
  16. package/dist/bpComponents/BPNumberInputComponent.d.ts +4 -3
  17. package/dist/bpComponents/BPPanelComponent.d.ts +1 -2
  18. package/dist/bpComponents/BPSliderInputComponent.d.ts +2 -2
  19. package/dist/bpComponents/BPTextInputComponent.d.ts +1 -2
  20. package/dist/bpComponents/BPToggleInputComponent.d.ts +2 -3
  21. package/dist/bpComponents/BPTreeComponent.d.ts +26 -12
  22. package/dist/bpComponents/BPTreeFolderComponent.d.ts +2 -2
  23. package/dist/bpComponents/BPValueComponent.d.ts +4 -1
  24. package/dist/bpComponents/BPVectorInputComponent.d.ts +2 -2
  25. package/dist/bpComponents/GetNumberTransformFunctions.d.ts +4 -0
  26. package/dist/bpComponents/NumberUnits.d.ts +7 -0
  27. package/dist/components/AppToaster.d.ts +6 -0
  28. package/dist/components/ConfigurationPanelComponent.d.ts +4 -0
  29. package/dist/components/DialogContext.d.ts +60 -0
  30. package/dist/components/DraggableIcon.d.ts +2 -1
  31. package/dist/components/ExtendedNumericInput.d.ts +14 -4
  32. package/dist/components/FileComponent.d.ts +3 -1
  33. package/dist/components/FormGroupComponent.d.ts +2 -2
  34. package/dist/components/InspectorStackComponent.d.ts +3 -3
  35. package/dist/components/NumericInput.d.ts +79 -0
  36. package/dist/components/Tree2.d.ts +52 -0
  37. package/dist/components/TreeNode2.d.ts +43 -0
  38. package/dist/components/VisualStyleContext.d.ts +10 -1
  39. package/dist/components/axesIcons.d.ts +7 -0
  40. package/dist/components/bpIconWrapper.d.ts +2 -2
  41. package/dist/components/iconMapping.d.ts +198 -0
  42. package/dist/components/loadingState.d.ts +8 -0
  43. package/dist/components/shapesIcons.d.ts +100 -0
  44. package/dist/components/treeTypes.d.ts +18 -0
  45. package/dist/components/variableIcons.d.ts +40 -41
  46. package/dist/index-B1k4Miq7.js +671 -0
  47. package/dist/index-B1k4Miq7.js.map +1 -0
  48. package/dist/index-BvGAMcRo.js +671 -0
  49. package/dist/index-BvGAMcRo.js.map +1 -0
  50. package/dist/index-GANXo7JZ.js +13560 -0
  51. package/dist/index-GANXo7JZ.js.map +1 -0
  52. package/dist/index.js +71 -36
  53. package/dist/index.js.map +1 -1
  54. package/dist/index.mjs +3 -3
  55. package/dist/lib.d.ts +36 -0
  56. package/dist/{splitPathsBySizeLoader-97pYQiA7.js → splitPathsBySizeLoader-DGIXBgyZ.js} +6 -6
  57. package/dist/{splitPathsBySizeLoader-97pYQiA7.js.map → splitPathsBySizeLoader-DGIXBgyZ.js.map} +1 -1
  58. package/docs/assets/highlight.css +45 -17
  59. package/docs/assets/main.js +4 -3
  60. package/docs/assets/navigation.js +1 -0
  61. package/docs/assets/search.js +1 -1
  62. package/docs/assets/style.css +484 -369
  63. package/docs/classes/UI.html +27 -403
  64. package/docs/classes/UiConfigRendererBlueprint.html +27 -404
  65. package/docs/index.html +41 -107
  66. package/docs/modules.html +3 -50
  67. package/lib/css/renderer.css +13276 -0
  68. package/lib/css/renderer.css.map +1 -0
  69. package/lib/esm/ConfigObject.d.ts +19 -0
  70. package/lib/esm/ConfigObject.js +84 -0
  71. package/lib/esm/ConfigObject.js.map +1 -0
  72. package/lib/esm/UiConfigRendererBlueprint.d.ts +15 -0
  73. package/lib/esm/UiConfigRendererBlueprint.js +65 -0
  74. package/lib/esm/UiConfigRendererBlueprint.js.map +1 -0
  75. package/lib/esm/bpComponents/BPButtonComponent.d.ts +9 -0
  76. package/lib/esm/bpComponents/BPButtonComponent.js +17 -0
  77. package/lib/esm/bpComponents/BPButtonComponent.js.map +1 -0
  78. package/lib/esm/bpComponents/BPColorInputComponent.d.ts +25 -0
  79. package/lib/esm/bpComponents/BPColorInputComponent.js +125 -0
  80. package/lib/esm/bpComponents/BPColorInputComponent.js.map +1 -0
  81. package/lib/esm/bpComponents/BPComponent.d.ts +31 -0
  82. package/lib/esm/bpComponents/BPComponent.js +68 -0
  83. package/lib/esm/bpComponents/BPComponent.js.map +1 -0
  84. package/lib/esm/bpComponents/BPContainerComponent.d.ts +21 -0
  85. package/lib/esm/bpComponents/BPContainerComponent.js +60 -0
  86. package/lib/esm/bpComponents/BPContainerComponent.js.map +1 -0
  87. package/lib/esm/bpComponents/BPDropdownInputComponent.d.ts +15 -0
  88. package/lib/esm/bpComponents/BPDropdownInputComponent.js +43 -0
  89. package/lib/esm/bpComponents/BPDropdownInputComponent.js.map +1 -0
  90. package/lib/esm/bpComponents/BPFileComponent.d.ts +28 -0
  91. package/lib/esm/bpComponents/BPFileComponent.js +59 -0
  92. package/lib/esm/bpComponents/BPFileComponent.js.map +1 -0
  93. package/lib/esm/bpComponents/BPFolderComponent.d.ts +24 -0
  94. package/lib/esm/bpComponents/BPFolderComponent.js +77 -0
  95. package/lib/esm/bpComponents/BPFolderComponent.js.map +1 -0
  96. package/lib/esm/bpComponents/BPInputComponent.d.ts +12 -0
  97. package/lib/esm/bpComponents/BPInputComponent.js +31 -0
  98. package/lib/esm/bpComponents/BPInputComponent.js.map +1 -0
  99. package/lib/esm/bpComponents/BPLabelledComponent.d.ts +8 -0
  100. package/lib/esm/bpComponents/BPLabelledComponent.js +10 -0
  101. package/lib/esm/bpComponents/BPLabelledComponent.js.map +1 -0
  102. package/lib/esm/bpComponents/BPNumberInputComponent.d.ts +12 -0
  103. package/lib/esm/bpComponents/BPNumberInputComponent.js +41 -0
  104. package/lib/esm/bpComponents/BPNumberInputComponent.js.map +1 -0
  105. package/lib/esm/bpComponents/BPPanelComponent.d.ts +16 -0
  106. package/lib/esm/bpComponents/BPPanelComponent.js +31 -0
  107. package/lib/esm/bpComponents/BPPanelComponent.js.map +1 -0
  108. package/lib/esm/bpComponents/BPSliderInputComponent.d.ts +15 -0
  109. package/lib/esm/bpComponents/BPSliderInputComponent.js +49 -0
  110. package/lib/esm/bpComponents/BPSliderInputComponent.js.map +1 -0
  111. package/lib/esm/bpComponents/BPTextInputComponent.d.ts +7 -0
  112. package/lib/esm/bpComponents/BPTextInputComponent.js +15 -0
  113. package/lib/esm/bpComponents/BPTextInputComponent.js.map +1 -0
  114. package/lib/esm/bpComponents/BPToggleInputComponent.d.ts +8 -0
  115. package/lib/esm/bpComponents/BPToggleInputComponent.js +19 -0
  116. package/lib/esm/bpComponents/BPToggleInputComponent.js.map +1 -0
  117. package/lib/esm/bpComponents/BPTreeComponent.d.ts +46 -0
  118. package/lib/esm/bpComponents/BPTreeComponent.js +221 -0
  119. package/lib/esm/bpComponents/BPTreeComponent.js.map +1 -0
  120. package/lib/esm/bpComponents/BPTreeFolderComponent.d.ts +10 -0
  121. package/lib/esm/bpComponents/BPTreeFolderComponent.js +37 -0
  122. package/lib/esm/bpComponents/BPTreeFolderComponent.js.map +1 -0
  123. package/lib/esm/bpComponents/BPValueComponent.d.ts +19 -0
  124. package/lib/esm/bpComponents/BPValueComponent.js +58 -0
  125. package/lib/esm/bpComponents/BPValueComponent.js.map +1 -0
  126. package/lib/esm/bpComponents/BPVectorInputComponent.d.ts +20 -0
  127. package/lib/esm/bpComponents/BPVectorInputComponent.js +112 -0
  128. package/lib/esm/bpComponents/BPVectorInputComponent.js.map +1 -0
  129. package/lib/esm/bpComponents/GetNumberTransformFunctions.d.ts +4 -0
  130. package/lib/esm/bpComponents/GetNumberTransformFunctions.js +14 -0
  131. package/lib/esm/bpComponents/GetNumberTransformFunctions.js.map +1 -0
  132. package/lib/esm/bpComponents/NumberUnits.d.ts +7 -0
  133. package/lib/esm/bpComponents/NumberUnits.js +101 -0
  134. package/lib/esm/bpComponents/NumberUnits.js.map +1 -0
  135. package/lib/esm/components/AppToaster.d.ts +6 -0
  136. package/lib/esm/components/AppToaster.js +8 -0
  137. package/lib/esm/components/AppToaster.js.map +1 -0
  138. package/lib/esm/components/ConfigurationPanelComponent.d.ts +4 -0
  139. package/lib/esm/components/ConfigurationPanelComponent.js +31 -0
  140. package/lib/esm/components/ConfigurationPanelComponent.js.map +1 -0
  141. package/lib/esm/components/DialogContext.d.ts +60 -0
  142. package/lib/esm/components/DialogContext.js +108 -0
  143. package/lib/esm/components/DialogContext.js.map +1 -0
  144. package/lib/esm/components/DraggableIcon.d.ts +20 -0
  145. package/lib/esm/components/DraggableIcon.js +69 -0
  146. package/lib/esm/components/DraggableIcon.js.map +1 -0
  147. package/lib/esm/components/ExtendedNumericInput.d.ts +35 -0
  148. package/lib/esm/components/ExtendedNumericInput.js +215 -0
  149. package/lib/esm/components/ExtendedNumericInput.js.map +1 -0
  150. package/lib/esm/components/FileComponent.d.ts +9 -0
  151. package/lib/esm/components/FileComponent.js +45 -0
  152. package/lib/esm/components/FileComponent.js.map +1 -0
  153. package/lib/esm/components/FormGroupComponent.d.ts +6 -0
  154. package/lib/esm/components/FormGroupComponent.js +12 -0
  155. package/lib/esm/components/FormGroupComponent.js.map +1 -0
  156. package/lib/esm/components/InspectorStackComponent.d.ts +5 -0
  157. package/lib/esm/components/InspectorStackComponent.js +23 -0
  158. package/lib/esm/components/InspectorStackComponent.js.map +1 -0
  159. package/lib/esm/components/NumericInput.d.ts +79 -0
  160. package/lib/esm/components/NumericInput.js +311 -0
  161. package/lib/esm/components/NumericInput.js.map +1 -0
  162. package/lib/esm/components/Tree2.d.ts +52 -0
  163. package/lib/esm/components/Tree2.js +177 -0
  164. package/lib/esm/components/Tree2.js.map +1 -0
  165. package/lib/esm/components/TreeNode2.d.ts +43 -0
  166. package/lib/esm/components/TreeNode2.js +111 -0
  167. package/lib/esm/components/TreeNode2.js.map +1 -0
  168. package/lib/esm/components/VisualStyleContext.d.ts +119 -0
  169. package/lib/esm/components/VisualStyleContext.js +59 -0
  170. package/lib/esm/components/VisualStyleContext.js.map +1 -0
  171. package/lib/esm/components/axesIcons.d.ts +7 -0
  172. package/lib/esm/components/axesIcons.js +10 -0
  173. package/lib/esm/components/axesIcons.js.map +1 -0
  174. package/lib/esm/components/bpIconWrapper.d.ts +2 -0
  175. package/lib/esm/components/bpIconWrapper.js +5 -0
  176. package/lib/esm/components/bpIconWrapper.js.map +1 -0
  177. package/lib/esm/components/iconMapping.d.ts +198 -0
  178. package/lib/esm/components/iconMapping.js +202 -0
  179. package/lib/esm/components/iconMapping.js.map +1 -0
  180. package/lib/esm/components/loadingState.d.ts +8 -0
  181. package/lib/esm/components/loadingState.js +31 -0
  182. package/lib/esm/components/loadingState.js.map +1 -0
  183. package/lib/esm/components/shapesIcons.d.ts +100 -0
  184. package/lib/esm/components/shapesIcons.js +102 -0
  185. package/lib/esm/components/shapesIcons.js.map +1 -0
  186. package/lib/esm/components/treeTypes.d.ts +18 -0
  187. package/lib/esm/components/treeTypes.js +2 -0
  188. package/lib/esm/components/treeTypes.js.map +1 -0
  189. package/lib/esm/components/variableIcons.d.ts +40 -0
  190. package/lib/esm/components/variableIcons.js +43 -0
  191. package/lib/esm/components/variableIcons.js.map +1 -0
  192. package/lib/esm/contexts.d.ts +1 -0
  193. package/lib/esm/contexts.js +2 -0
  194. package/lib/esm/contexts.js.map +1 -0
  195. package/lib/esm/index.d.ts +4 -0
  196. package/lib/esm/index.js +5 -0
  197. package/lib/esm/index.js.map +1 -0
  198. package/lib/esm/lib.d.ts +36 -0
  199. package/lib/esm/lib.js +37 -0
  200. package/lib/esm/lib.js.map +1 -0
  201. package/lib/esm/renderer.css.js +1 -0
  202. package/lib/esm/threejs.d.ts +2 -0
  203. package/lib/esm/threejs.js +2 -0
  204. package/lib/esm/threejs.js.map +1 -0
  205. package/package.json +64 -11
  206. package/src/ConfigObject.tsx +29 -15
  207. package/src/UiConfigRendererBlueprint.tsx +33 -35
  208. package/src/bpComponents/BPButtonComponent.scss +6 -1
  209. package/src/bpComponents/BPButtonComponent.tsx +9 -2
  210. package/src/bpComponents/BPColorInputComponent.tsx +9 -3
  211. package/src/bpComponents/BPComponent.tsx +26 -7
  212. package/src/bpComponents/BPContainerComponent.tsx +13 -1
  213. package/src/bpComponents/BPDropdownInputComponent.tsx +8 -3
  214. package/src/bpComponents/BPFileComponent.tsx +56 -29
  215. package/src/bpComponents/BPFolderComponent.scss +22 -8
  216. package/src/bpComponents/BPFolderComponent.tsx +105 -16
  217. package/src/bpComponents/BPInputComponent.tsx +7 -3
  218. package/src/bpComponents/BPNumberInputComponent.tsx +14 -2
  219. package/src/bpComponents/BPPanelComponent.tsx +1 -2
  220. package/src/bpComponents/BPSliderInputComponent.tsx +40 -21
  221. package/src/bpComponents/BPTextInputComponent.tsx +2 -1
  222. package/src/bpComponents/BPToggleInputComponent.tsx +7 -4
  223. package/src/bpComponents/BPTreeComponent.tsx +153 -36
  224. package/src/bpComponents/BPTreeFolderComponent.tsx +5 -5
  225. package/src/bpComponents/BPValueComponent.tsx +31 -4
  226. package/src/bpComponents/BPVectorInputComponent.tsx +23 -20
  227. package/src/bpComponents/GetNumberTransformFunctions.tsx +14 -0
  228. package/src/bpComponents/NumberUnits.tsx +123 -0
  229. package/src/components/AppToaster.tsx +38 -0
  230. package/src/components/ConfigurationPanelComponent.tsx +74 -0
  231. package/src/components/DialogContext.tsx +210 -0
  232. package/src/components/DraggableIcon.tsx +7 -5
  233. package/src/components/ExtendedNumericInput.tsx +70 -18
  234. package/src/components/FileComponent.tsx +48 -25
  235. package/src/components/FormGroupComponent.tsx +1 -1
  236. package/src/components/InspectorStackComponent.tsx +4 -34
  237. package/src/components/NumericInput.tsx +679 -0
  238. package/src/components/Tree2.tsx +344 -0
  239. package/src/components/TreeNode2.tsx +192 -0
  240. package/src/components/VisualStyleContext.tsx +41 -1
  241. package/src/components/axesIcons.tsx +116 -0
  242. package/src/components/bpIconWrapper.tsx +5 -4
  243. package/src/components/common.scss +23 -0
  244. package/src/components/iconMapping.ts +354 -0
  245. package/src/components/loadingState.tsx +20 -0
  246. package/src/components/shapesIcons.tsx +980 -0
  247. package/src/components/tree2.scss +69 -0
  248. package/src/components/treeTypes.ts +97 -0
  249. package/src/components/variableIcons.tsx +0 -1
  250. package/src/lib.ts +36 -0
  251. package/src/renderer.scss +136 -65
  252. package/src/tsconfig.json +6 -0
  253. package/tsconfig.json +2 -1
  254. package/dist/allPaths-3YKfhB8Q.js +0 -23
  255. package/dist/index-RJDPvlPL.js +0 -604
  256. package/dist/index-RJDPvlPL.js.map +0 -1
  257. package/dist/index-sUDdkVfJ.js +0 -604
  258. package/dist/index-sUDdkVfJ.js.map +0 -1
  259. package/dist/index-zXngzS2o.js +0 -12752
  260. package/dist/index-zXngzS2o.js.map +0 -1
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # UiConfig Blurprint.js
1
+ # UiConfig Blueprint.js
2
2
 
3
3
  [![NPM Package](https://img.shields.io/npm/v/uiconfig-blueprint.svg)](https://www.npmjs.com/package/uiconfig-blueprint)
4
4
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/license/apache-2-0/)
5
5
 
6
- Blurprint.js theme/wrapper library for [uiconfig.js](https://github.com/repalash/uiconfig.js): A UI renderer framework to dynamically generate website/configuration UIs from a JSON-like configurations and/or typescript decorators.
6
+ Blueprint.js theme/wrapper library for [uiconfig.js](https://github.com/repalash/uiconfig.js): A UI renderer framework to dynamically generate website/configuration UIs from a JSON-like configurations and/or typescript decorators.
7
7
 
8
8
  It includes several components for editor-like user interfaces like folders, panels, sliders, pickers, inputs for string, number, file, vector, colors, etc.
9
9
 
10
- The UI components are bound to javascript/typescript objects and properties through a simple and flexible JSON configuration.
10
+ The UI components are bound to javascript/typescript objects and properties through a simple and flexible JSON configuration.
11
11
 
12
12
  ### Examples
13
13
 
@@ -29,6 +29,8 @@ npm install uiconfig-blueprint
29
29
  Use in any javascript/typescript file.
30
30
  ```typescript
31
31
  import { UI } from 'uiconfig-blueprint';
32
+ // or for the browser
33
+ // import { UI } from 'https://unpkg.com/uiconfig-blueprint/dist/index.mjs';
32
34
 
33
35
  const config = {
34
36
  type: "slider",
@@ -127,3 +129,39 @@ npm publish
127
129
 
128
130
  ## License
129
131
  All code is licensed under [Apache 2.0](LICENSE).
132
+
133
+ ## Library usage in react
134
+
135
+ This part is still a WIP.
136
+
137
+ Note: First check the dependencies. (Install all the required peerDependencies)
138
+
139
+ Import from `uiconfig-blueprint/lib` build.
140
+
141
+ In JS/TS/JSX/TSX files:
142
+ ```javascript
143
+ import {ConfigurationPanelComponent} from 'uiconfig-blueprint/lib/esm/lib'
144
+ ```
145
+
146
+ In SCSS
147
+ ```scss
148
+ @import 'uiconfig-blueprint/src/renderer';
149
+ ```
150
+ or
151
+ In CSS
152
+ ```css
153
+ @import 'uiconfig-blueprint/lib/css/renderer.css';
154
+ ```
155
+
156
+ postcss plugin for themes
157
+ ```javascript
158
+ {
159
+ postcssPlugin: 'modify-css-content',
160
+ Once(root) {
161
+ // Modify to fix :root.bpx-flat :root twice when imported in renderer.scss
162
+ root.walkRules(rule => {
163
+ rule.selector = rule.selector.replace(/:root.bpx-(.*) :root/g, ':root.bpx-$1');
164
+ });
165
+ },
166
+ }
167
+ ```
@@ -1,16 +1,19 @@
1
1
  import React from "react";
2
- import { UiConfigRendererContext } from "./bpComponents/BPComponent";
2
+ import { Class, PartialRecord } from "ts-browser-helpers";
3
+ import { BPComponentProps, BPComponentState, UiConfigRendererContext } from "./bpComponents/BPComponent";
3
4
  import { PanelActions } from "@blueprintjs/core/lib/esm/components/panel-stack2/panelTypes";
4
5
  import { UiObjectConfig } from 'uiconfig.js';
5
- export type UiConfigTypes = 'input' | 'button' | 'folder' | 'checkbox' | 'toggle' | 'dropdown' | 'slider' | 'color' | 'image' | 'number' | 'panel' | 'tree' | 'hierarchy' | 'vec' | 'vec2' | 'vec3' | 'vec4' | 'monitor';
6
+ export type UiConfigTypes = 'input' | 'button' | 'folder' | 'checkbox' | 'toggle' | 'dropdown' | 'slider' | 'color' | 'image' | 'number' | 'panel' | 'tree' | 'hierarchy' | 'materials' | 'textures' | 'vec' | 'vec2' | 'vec3' | 'vec4' | 'monitor' | 'vector';
6
7
  export interface ConfigProps extends PanelActions {
7
8
  config: UiObjectConfig;
8
9
  isPanel?: boolean;
9
10
  level?: number;
11
+ className?: string;
10
12
  }
13
+ export declare const ConfigObjectGenerators: PartialRecord<UiConfigTypes, Class<React.Component<BPComponentProps<any>, BPComponentState>>>;
11
14
  export declare class ConfigObject extends React.Component<ConfigProps, {}> {
12
- static contextType: React.Context<import("./UiConfigRendererBlueprint").UiConfigRendererBlueprint>;
15
+ static contextType: React.Context<import("./bpComponents/BPComponent").UiConfigRendererBaseBp>;
13
16
  context: React.ContextType<typeof UiConfigRendererContext>;
14
17
  state: {};
15
- render(): React.JSX.Element;
18
+ render(): import("react/jsx-runtime").JSX.Element;
16
19
  }
@@ -1,13 +1,15 @@
1
- import { UiConfigRendererBase, UiObjectConfig } from "uiconfig.js";
1
+ import { JSUndoManager } from "ts-browser-helpers";
2
+ import { UiConfigRenderer, UiObjectConfig } from "uiconfig.js";
2
3
  import { Root } from 'react-dom/client';
3
4
  import { THREE } from "./threejs";
4
- export declare class UiConfigRendererBlueprint extends UiConfigRendererBase<Root> {
5
+ export declare class UiConfigRendererBlueprint extends UiConfigRenderer {
5
6
  constructor(container?: HTMLElement, { autoPostFrame }?: {
6
7
  autoPostFrame?: boolean | undefined;
7
- });
8
+ }, undoManager?: JSUndoManager | false);
9
+ protected _root: Root;
8
10
  protected _createUiContainer(): HTMLDivElement;
9
11
  protected _refreshUiConfigObject(config: UiObjectConfig): void;
10
12
  renderUiConfig(_: UiObjectConfig): void;
11
13
  THREE: THREE | undefined;
12
- dispose(): void;
14
+ unmount(): void;
13
15
  }
@@ -0,0 +1,23 @@
1
+ import { I as n } from "./index-B1k4Miq7.js";
2
+ import { I as e } from "./index-BvGAMcRo.js";
3
+ import { p as r, I as s } from "./index-GANXo7JZ.js";
4
+ /**
5
+ * @license
6
+ * uiconfig-blueprint v0.1.0-dev.11
7
+ * Copyright 2022-2025 repalash <palash@shaders.app>
8
+ * Apache-2.0 License
9
+ */
10
+ function I(o, t) {
11
+ var a = r(o);
12
+ return t === s.STANDARD ? n[a] : e[a];
13
+ }
14
+ function p(o) {
15
+ return r(o);
16
+ }
17
+ export {
18
+ n as IconSvgPaths16,
19
+ e as IconSvgPaths20,
20
+ I as getIconPaths,
21
+ p as iconNameToPathsRecordKey
22
+ };
23
+ //# sourceMappingURL=allPaths-Dhco1c7a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"allPaths-3YKfhB8Q.js","sources":["../node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":["getIconPaths","name","size","key","pascalCase","IconSize","IconSvgPaths16","IconSvgPaths20","iconNameToPathsRecordKey"],"mappings":";;;;;;;;;AA6BO,SAASA,EAAaC,GAAMC,GAAM;AACrC,MAAIC,IAAMC,EAAWH,CAAI;AACzB,SAAOC,MAASG,EAAS,WAAWC,EAAeH,CAAG,IAAII,EAAeJ,CAAG;AAChF;AAOO,SAASK,EAAyBP,GAAM;AAC3C,SAAOG,EAAWH,CAAI;AAC1B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"allPaths-Dhco1c7a.js","sources":["../node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":["getIconPaths","name","size","key","pascalCase","IconSize","IconSvgPaths16","IconSvgPaths20","iconNameToPathsRecordKey"],"mappings":";;;;;;;;;AA6BO,SAASA,EAAaC,GAAMC,GAAM;AACrC,MAAIC,IAAMC,EAAWH,CAAI;AACzB,SAAOC,MAASG,EAAS,WAAWC,EAAeH,CAAG,IAAII,EAAeJ,CAAG;AAChF;AAOO,SAASK,EAAyBP,GAAM;AAC3C,SAAOG,EAAWH,CAAI;AAC1B;","x_google_ignoreList":[0]}
@@ -1,8 +1,8 @@
1
- import { _ as n, a as o } from "./index-zXngzS2o.js";
1
+ import { _ as n, a as o } from "./index-GANXo7JZ.js";
2
2
  /**
3
3
  * @license
4
- * uiconfig-blueprint v0.0.3
5
- * Copyright 2022-2023 repalash <palash@shaders.app>
4
+ * uiconfig-blueprint v0.1.0-dev.11
5
+ * Copyright 2022-2025 repalash <palash@shaders.app>
6
6
  * Apache-2.0 License
7
7
  */
8
8
  var s = function(a, e) {
@@ -13,7 +13,7 @@ var s = function(a, e) {
13
13
  case 0:
14
14
  return [4, import(
15
15
  /* webpackChunkName: "blueprint-icons-all-paths" */
16
- "./allPaths-3YKfhB8Q.js"
16
+ "./allPaths-Dhco1c7a.js"
17
17
  )];
18
18
  case 1:
19
19
  return t = r.sent().getIconPaths, [2, t(a, e)];
@@ -24,4 +24,4 @@ var s = function(a, e) {
24
24
  export {
25
25
  s as allPathsLoader
26
26
  };
27
- //# sourceMappingURL=allPathsLoader-lWFPuUtu.js.map
27
+ //# sourceMappingURL=allPathsLoader-BNvrKJa2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"allPathsLoader-lWFPuUtu.js","sources":["../node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":["allPathsLoader","name","size","__awaiter","getIconPaths","__generator","_a"],"mappings":";;;;;;;AAmBU,IAACA,IAAiB,SAAUC,GAAMC,GAAM;AAAE,SAAOC,EAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAIC;AACJ,WAAOC,EAAY,MAAM,SAAUC,GAAI;AACnC,cAAQA,EAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,iBAAAF,IAAgBE,EAAG,KAAI,EAAI,cACpB,CAAC,GAAcF,EAAaH,GAAMC,CAAI,CAAC;AAAA,MACrD;AAAA,IACT,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"allPathsLoader-BNvrKJa2.js","sources":["../node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":["allPathsLoader","name","size","__awaiter","getIconPaths","__generator","_a"],"mappings":";;;;;;;AAmBU,IAACA,IAAiB,SAAUC,GAAMC,GAAM;AAAE,SAAOC,EAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAIC;AACJ,WAAOC,EAAY,MAAM,SAAUC,GAAI;AACnC,cAAQA,EAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,iBAAAF,IAAgBE,EAAG,KAAI,EAAI,cACpB,CAAC,GAAcF,EAAaH,GAAMC,CAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
@@ -4,5 +4,6 @@ import { BPLabelledComponent, BPLabelledComponentState } from "./BPLabelledCompo
4
4
  export declare class BPButtonComponent extends BPLabelledComponent<() => void, BPLabelledComponentState> {
5
5
  constructor(props: BPComponentProps<() => void>, context: UiConfigRendererContextType);
6
6
  onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
7
- render(): React.JSX.Element | null;
7
+ protected flexBasis: string;
8
+ render(): import("react/jsx-runtime").JSX.Element | null;
8
9
  }
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPValueComponent, BPValueComponentState } from "./BPValueComponent";
4
3
  import type { ColorRepresentation } from "three";
@@ -21,5 +20,6 @@ export declare class BPColorInputComponent extends BPValueComponent<ColorReprese
21
20
  componentWillUnmount(): void;
22
21
  private _hasMouseUp;
23
22
  private _mouseUp;
24
- render(): React.JSX.Element | null;
23
+ protected flexBasis: string;
24
+ render(): import("react/jsx-runtime").JSX.Element | null;
25
25
  }
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
- import type { UiConfigRendererBlueprint } from '../UiConfigRendererBlueprint';
2
+ import type { UiConfigRendererBase } from 'uiconfig.js';
3
3
  import { UiObjectConfig } from 'uiconfig.js';
4
+ import { THREE } from "../threejs";
4
5
  export type BPComponentProps<T> = {
5
6
  config: UiObjectConfig<T>;
6
7
  level?: number;
@@ -9,14 +10,19 @@ export type BPComponentState = {
9
10
  hidden?: boolean;
10
11
  disabled?: boolean;
11
12
  readOnly?: boolean;
13
+ baseWidth?: string;
12
14
  };
13
- export declare const UiConfigRendererContext: React.Context<UiConfigRendererBlueprint>;
15
+ export interface UiConfigRendererBaseBp extends UiConfigRendererBase {
16
+ THREE: THREE | undefined;
17
+ }
18
+ export declare const UiConfigRendererContext: React.Context<UiConfigRendererBaseBp>;
14
19
  export type UiConfigRendererContextType = React.ContextType<typeof UiConfigRendererContext>;
15
- export declare abstract class BPComponent<TValue, TState, TProps extends BPComponentProps<TValue> = BPComponentProps<TValue>> extends React.Component<TProps, TState> {
16
- static contextType: React.Context<UiConfigRendererBlueprint>;
20
+ export declare abstract class BPComponent<TValue, TState extends BPComponentState, TProps extends BPComponentProps<TValue> = BPComponentProps<TValue>> extends React.Component<TProps, TState> {
21
+ static contextType: React.Context<UiConfigRendererBaseBp>;
17
22
  context: UiConfigRendererContextType;
18
23
  protected constructor(props: TProps, context: UiConfigRendererContextType, state: TState);
19
24
  setStatePromise(state: TState): Promise<void>;
25
+ keyVersion: number;
20
26
  getUpdatedState(state: TState): TState;
21
27
  private _refreshing;
22
28
  refreshConfigState(state?: TState): Promise<void>;
@@ -12,7 +12,7 @@ export declare class BPContainerComponent<TState extends BPContainerComponentSta
12
12
  protected _unregisterChild(child: UiObjectConfig): void;
13
13
  constructor(props: BPComponentProps<void> & PanelActions, context: UiConfigRendererContextType, state: TState);
14
14
  getUpdatedState(state: TState): TState & import("./BPComponent").BPComponentState & {
15
- children: UiObjectConfig<any, string, any>[];
15
+ children: any[];
16
16
  expanded: boolean;
17
17
  label: string;
18
18
  };
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPInputComponent } from "./BPInputComponent";
4
3
  import { BPValueComponentState } from "./BPValueComponent";
@@ -12,5 +11,5 @@ export type BPDropdownComponentState = BPValueComponentState<string | number> &
12
11
  export declare class BPDropdownInputComponent extends BPInputComponent<string | number, BPDropdownComponentState> {
13
12
  constructor(props: BPComponentProps<string | number>, context: UiConfigRendererContextType);
14
13
  getUpdatedState(state: BPDropdownComponentState): BPDropdownComponentState;
15
- renderInput(): React.JSX.Element;
14
+ renderInput(): import("react/jsx-runtime").JSX.Element;
16
15
  }
@@ -1,10 +1,10 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPValueComponent, BPValueComponentState } from "./BPValueComponent";
4
3
  type StateValue = string | File | null;
5
4
  type FileImportType = any;
6
5
  export type BPFileComponentState = BPValueComponentState<StateValue> & {
7
6
  mode: 'url' | 'file';
7
+ preview?: string;
8
8
  };
9
9
  type BPFileComponentExtras = {
10
10
  fileLoader?: {
@@ -15,12 +15,14 @@ type BPFileComponentExtras = {
15
15
  };
16
16
  };
17
17
  type BPFileComponentContextType = UiConfigRendererContextType & BPFileComponentExtras;
18
- export declare class BPFileComponent extends BPValueComponent<FileImportType | null, BPFileComponentState, StateValue> {
18
+ export declare class BPFileComponent<T extends FileImportType = FileImportType, TP = {}> extends BPValueComponent<T | null, BPFileComponentState, StateValue> {
19
19
  context: BPFileComponentContextType;
20
- props: BPComponentProps<FileImportType | null> & BPFileComponentExtras;
21
- constructor(props: BPComponentProps<FileImportType | null> & BPFileComponentExtras, context: BPFileComponentContextType);
22
- convertValueToState(val: FileImportType | null, state: BPFileComponentState): BPFileComponentState;
23
- convertStateToValue(state: BPFileComponentState): Promise<FileImportType | null>;
24
- render(): React.JSX.Element | null;
20
+ props: BPComponentProps<T | null> & BPFileComponentExtras & TP;
21
+ constructor(props: BPComponentProps<T | null> & BPFileComponentExtras & TP, context: BPFileComponentContextType);
22
+ convertValueToState(_val: T | null, _state: BPFileComponentState): BPFileComponentState;
23
+ convertStateToValue(state: BPFileComponentState): Promise<T | null>;
24
+ renderPreviewSlot(): import("react/jsx-runtime").JSX.Element;
25
+ protected flexBasis: string;
26
+ render(): import("react/jsx-runtime").JSX.Element | null;
25
27
  }
26
28
  export {};
@@ -1,16 +1,24 @@
1
- import React, { DOMAttributes } from "react";
1
+ import React, { ChangeEventHandler, DOMAttributes } from "react";
2
2
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { Collapse } from "@blueprintjs/core";
3
4
  import { PanelActions } from "@blueprintjs/core/lib/esm/components/panel-stack2/panelTypes";
4
5
  import { BPContainerComponent, BPContainerComponentState } from './BPContainerComponent';
5
6
  export type BPFolderComponentState = BPContainerComponentState & {};
6
7
  export declare class BPFolderComponent extends BPContainerComponent<BPFolderComponentState> {
7
8
  constructor(props: BPComponentProps<void> & PanelActions, context: UiConfigRendererContextType);
8
- render(): React.JSX.Element | null;
9
+ render(): import("react/jsx-runtime").JSX.Element | null;
9
10
  }
10
11
  export declare const FolderHeadCard: React.FC<React.PropsWithChildren<{
11
12
  open: boolean;
12
13
  label: string;
13
14
  minimal: boolean;
15
+ level: number;
14
16
  disabled?: boolean;
17
+ enabled?: boolean;
18
+ onEnabledChange?: ChangeEventHandler<HTMLInputElement>;
15
19
  onClick: DOMAttributes<HTMLElement>['onClick'];
16
20
  }>>;
21
+ export declare class Collapse2 extends Collapse {
22
+ private contentsRefHandler2;
23
+ render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
24
+ }
@@ -1,11 +1,12 @@
1
1
  import { BPValueComponent, BPValueComponentState } from "./BPValueComponent";
2
2
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
- import React, { ReactNode } from "react";
4
- export declare abstract class BPInputComponent<TStateValue, TState extends BPValueComponentState<TStateValue> = BPValueComponentState<TStateValue>> extends BPValueComponent<TStateValue, TState, TStateValue> {
3
+ import { ReactNode } from "react";
4
+ import { PrimitiveVal } from "uiconfig.js";
5
+ export declare abstract class BPInputComponent<TStateValue extends PrimitiveVal, TState extends BPValueComponentState<TStateValue> = BPValueComponentState<TStateValue>> extends BPValueComponent<TStateValue, TState, TStateValue> {
5
6
  protected constructor(props: BPComponentProps<TStateValue>, context: UiConfigRendererContextType, state: TState);
6
7
  convertValueToState(value: TStateValue, state: TState): TState;
7
8
  convertStateToValue(state: TState): Promise<TStateValue>;
8
9
  abstract renderInput(): ReactNode;
9
10
  protected flexBasis: string;
10
- render(): React.JSX.Element | null;
11
+ render(): import("react/jsx-runtime").JSX.Element | null;
11
12
  }
@@ -1,11 +1,12 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPInputComponent } from "./BPInputComponent";
4
3
  import { BPValueComponentState } from "./BPValueComponent";
5
- export declare class BPNumberInputComponent extends BPInputComponent<number> {
4
+ export declare class BPNumberInputComponent extends BPInputComponent<number, BPValueComponentState<number> & {
5
+ unit?: string;
6
+ }> {
6
7
  constructor(props: BPComponentProps<number>, context: UiConfigRendererContextType);
7
8
  private _inputs;
8
9
  refreshConfigState(state?: BPValueComponentState<number>): Promise<void>;
9
10
  private _onChange;
10
- renderInput(): React.JSX.Element;
11
+ renderInput(): import("react/jsx-runtime").JSX.Element;
11
12
  }
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPLabelledComponentState } from "./BPLabelledComponent";
4
3
  import { PanelActions } from "@blueprintjs/core/lib/esm/components/panel-stack2/panelTypes";
@@ -13,5 +12,5 @@ export declare class BPPanelComponent extends BPContainerComponent<BPPanelCompon
13
12
  setExpanded: (e: boolean) => void;
14
13
  componentDidMount(): void;
15
14
  componentWillUnmount(): void;
16
- render(): React.JSX.Element | null;
15
+ render(): import("react/jsx-runtime").JSX.Element | null;
17
16
  }
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPInputComponent } from "./BPInputComponent";
4
3
  import { BPValueComponentState } from "./BPValueComponent";
@@ -6,10 +5,11 @@ export type BPSliderComponentState = BPValueComponentState<number> & {
6
5
  min: number;
7
6
  max: number;
8
7
  step: number;
8
+ unit?: string;
9
9
  };
10
10
  export declare class BPSliderInputComponent extends BPInputComponent<number, BPSliderComponentState> {
11
11
  constructor(props: BPComponentProps<number>, context: UiConfigRendererContextType);
12
12
  getUpdatedState(state: BPSliderComponentState): BPSliderComponentState;
13
13
  flexBasis: string;
14
- renderInput(): React.JSX.Element[];
14
+ renderInput(): import("react/jsx-runtime").JSX.Element[];
15
15
  }
@@ -1,8 +1,7 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPInputComponent } from "./BPInputComponent";
4
3
  export declare class BPTextInputComponent extends BPInputComponent<string> {
5
4
  constructor(props: BPComponentProps<string>, context: UiConfigRendererContextType);
6
5
  private _onChange;
7
- renderInput(): React.JSX.Element;
6
+ renderInput(): import("react/jsx-runtime").JSX.Element;
8
7
  }
@@ -1,9 +1,8 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPInputComponent } from "./BPInputComponent";
4
3
  export declare class BPToggleInputComponent extends BPInputComponent<boolean> {
5
4
  constructor(props: BPComponentProps<boolean>, context: UiConfigRendererContextType);
6
5
  private _onChange;
7
- renderInput(): React.JSX.Element;
8
- render(): React.JSX.Element | null;
6
+ renderInput(): import("react/jsx-runtime").JSX.Element;
7
+ render(): import("react/jsx-runtime").JSX.Element | null;
9
8
  }
@@ -4,29 +4,43 @@ import React from "react";
4
4
  export type BPTreeComponentState<T = {}> = BPComponentState & {
5
5
  nodes: TreeNodeInfo<T>[];
6
6
  };
7
- export declare function forEachTreeNode<T>(nodes: TreeNodeInfo<T>[] | undefined, callback: (node: TreeNodeInfo<T>) => void): void;
8
- export declare abstract class BPTreeComponent<T = {}, TConfigVal = void> extends BPComponent<TConfigVal, BPTreeComponentState<T>> {
9
- constructor(props: BPComponentProps<TConfigVal>, context: UiConfigRendererContextType);
10
- protected _infoMap: Map<string, TreeNodeInfo<T>>;
7
+ type NodePath = (string | number)[];
8
+ export declare abstract class BPTreeComponent<T = {}, TConfigVal extends any = void> extends BPComponent<TConfigVal, BPTreeComponentState<T>, BPComponentProps<TConfigVal> & {
9
+ className: string;
10
+ }> {
11
+ constructor(props: BPComponentProps<TConfigVal> & {
12
+ className: string;
13
+ }, context: UiConfigRendererContextType);
14
+ protected _infoMap: Map<string | number, TreeNodeInfo<T>>;
11
15
  protected _createNodeInfo(id: string, obj: T): {
12
16
  id: string;
13
17
  label: string;
14
18
  nodeData: T;
15
19
  childNodes: never[];
20
+ isExpanded: boolean;
21
+ isSelected: boolean;
16
22
  };
17
23
  protected abstract _getNodeId(obj: T): string;
18
24
  protected abstract _updateNodeInfo(node: TreeNodeInfo<T>, obj: T): TreeNodeInfo<T>;
19
25
  protected abstract _getRootNodes(): T[];
20
- protected _onNodeClick(_node: TreeNodeInfo<T>): Promise<void>;
21
- protected _onNodeDoubleClick(_node: TreeNodeInfo<T>): Promise<void>;
22
- protected _onNodeExpand(node: TreeNodeInfo<T>): Promise<void>;
23
- protected _onNodeCollapse(node: TreeNodeInfo<T>): Promise<void>;
24
- protected _onNodeContextMenu(_node: TreeNodeInfo<T>): Promise<void>;
26
+ protected _onNodeClick(_id: string | number): Promise<void>;
27
+ protected _onNodeDoubleClick(_id: string | number): Promise<void>;
28
+ protected _cloneNodes(callback?: (t: TreeNodeInfo<T>) => void, state?: TreeNodeInfo<T>[]): TreeNodeInfo<T>[];
29
+ protected _getNodePath(id: string, nodes?: TreeNodeInfo<T>[]): NodePath;
30
+ protected _forEachNode<T>(nodes: TreeNodeInfo<T>[] | undefined, callback: (node: TreeNodeInfo<T>, path: NodePath) => void, path?: NodePath): TreeNodeInfo<T>[] | undefined;
31
+ protected _onNodeExpandCollapse(_id: string | number, expanded?: boolean): Promise<void>;
32
+ protected _onNodeContextMenu(_id: string | number): Promise<void>;
25
33
  protected buildData(data: TreeNodeInfo<T>[], obj: T, _?: any, _2?: any): TreeNodeInfo<T>[];
26
34
  getUpdatedState(_state: BPTreeComponentState<T>): BPTreeComponentState<T>;
27
- deselectAll(): void;
28
- setSelected(node?: TreeNodeInfo<T>): Promise<void>;
35
+ deselectAll(): Promise<void>;
36
+ setSelected(id?: string | string[], expand?: boolean): Promise<void>;
29
37
  componentDidMount(): void;
30
38
  componentWillUnmount(): void;
31
- render(): React.JSX.Element | null;
39
+ findSelectedNode(nodes?: TreeNodeInfo<T>[]): TreeNodeInfo<T> | undefined;
40
+ getFlatNodes(onlyVisible?: boolean, nodes?: TreeNodeInfo<T>[], res?: TreeNodeInfo<T>[]): TreeNodeInfo<T>[];
41
+ protected _handleKeyDown(e: React.KeyboardEvent): void;
42
+ protected _canDropNode(_sourceNode: TreeNodeInfo<T>, _sourcePath: NodePath, _targetNode: TreeNodeInfo<T>, _targetPath: NodePath, _index?: number): boolean;
43
+ protected _onDropNode(_sourceNode: TreeNodeInfo<T>, _sourcePath: NodePath, _targetNode: TreeNodeInfo<T>, _targetPath: NodePath, _e?: React.DragEvent, _index?: number): void;
44
+ render(): import("react/jsx-runtime").JSX.Element | null;
32
45
  }
46
+ export {};
@@ -5,6 +5,6 @@ export declare class BPTreeFolderComponent extends BPTreeComponent<UiObjectConfi
5
5
  protected _getNodeId(obj: UiObjectConfig): string;
6
6
  protected _updateNodeInfo(node: TreeNodeInfo<UiObjectConfig>, obj: UiObjectConfig): TreeNodeInfo<UiObjectConfig<any, string, any>>;
7
7
  protected _getRootNodes(): UiObjectConfig[];
8
- protected _onNodeClick(_node: TreeNodeInfo<UiObjectConfig>): Promise<void>;
9
- protected _onNodeDoubleClick(_node: TreeNodeInfo<UiObjectConfig>): Promise<void>;
8
+ protected _onNodeClick(_id: string | number): Promise<void>;
9
+ protected _onNodeDoubleClick(_id: string | number): Promise<void>;
10
10
  }
@@ -1,15 +1,18 @@
1
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
2
2
  import { BPLabelledComponent, BPLabelledComponentState } from "./BPLabelledComponent";
3
+ import { PrimitiveVal } from "uiconfig.js";
3
4
  export type BPValueComponentState<TStateValue> = BPLabelledComponentState & {
4
5
  value: TStateValue;
5
6
  };
6
- export declare abstract class BPValueComponent<TValue, TState extends BPValueComponentState<TStateValue>, TStateValue> extends BPLabelledComponent<TValue, TState> {
7
+ export declare abstract class BPValueComponent<TValue extends PrimitiveVal, TState extends BPValueComponentState<TStateValue>, TStateValue> extends BPLabelledComponent<TValue, TState> {
7
8
  protected constructor(props: BPComponentProps<TValue>, context: UiConfigRendererContextType, state: TState);
8
9
  abstract convertValueToState(value: TValue, state: TState): TState;
9
10
  abstract convertStateToValue(state: TState): Promise<TValue>;
11
+ private _lastValRef;
10
12
  getUpdatedState(state: TState): TState;
11
13
  protected _previousLast: boolean;
12
14
  doesNeedRefresh(state: TState, _last?: boolean): boolean;
15
+ setState(state: TState, callback?: () => void): void;
13
16
  setValue(value: TStateValue, last?: boolean): Promise<void>;
14
17
  forceOnChange: boolean;
15
18
  updateStateValue(state: TState, last?: boolean): Promise<void>;
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
2
  import { BPInputComponent } from "./BPInputComponent";
4
3
  import { BPValueComponentState } from "./BPValueComponent";
@@ -8,6 +7,7 @@ export type BPVectorComponentState = BPValueComponentState<Vector2 | Vector3 | V
8
7
  max: number;
9
8
  step: number;
10
9
  components: 1 | 2 | 3 | 4;
10
+ unit?: string;
11
11
  };
12
12
  export declare class BPVectorInputComponent extends BPInputComponent<Vector2 | Vector3 | Vector4, BPVectorComponentState> {
13
13
  constructor(props: BPComponentProps<Vector2 | Vector3 | Vector4>, context: UiConfigRendererContextType);
@@ -16,5 +16,5 @@ export declare class BPVectorInputComponent extends BPInputComponent<Vector2 | V
16
16
  getUpdatedState(state: BPVectorComponentState): BPVectorComponentState;
17
17
  private _inputs;
18
18
  refreshConfigState(state?: BPVectorComponentState): Promise<void>;
19
- renderInput(): React.JSX.Element | React.JSX.Element[];
19
+ renderInput(): import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[];
20
20
  }
@@ -0,0 +1,4 @@
1
+ export declare function getNumberTransformFunctions(unit: string | undefined, unitType1: string | undefined, targetUnit: string | undefined): {
2
+ transformValue: ((v: number) => number) | undefined;
3
+ invTransformValue: ((v: number) => number) | undefined;
4
+ };
@@ -0,0 +1,7 @@
1
+ export interface NumberUnit {
2
+ name: string;
3
+ symbol: string;
4
+ from: (value: number) => number;
5
+ to: (value: number) => number;
6
+ }
7
+ export declare const NumberUnits: Record<string, Record<string, NumberUnit>>;
@@ -0,0 +1,6 @@
1
+ import { Toaster } from "@blueprintjs/core";
2
+ export declare const AppToasterRef: {
3
+ ref: Toaster | null;
4
+ };
5
+ export declare const AppToaster: () => Toaster;
6
+ export declare function AppToasterOverlay(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { UiObjectConfig } from 'uiconfig.js';
2
+ export declare function ConfigurationPanelComponent({ config }: {
3
+ config: UiObjectConfig<any, 'panel'>;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,60 @@
1
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
+ export type DialogStateType = {
3
+ isOpen: boolean;
4
+ title: string;
5
+ content: ReactNode;
6
+ actions: ReactNode;
7
+ state: any;
8
+ canClose: boolean;
9
+ };
10
+ export declare const defaultDialogContext: {
11
+ isOpen: boolean;
12
+ title: string;
13
+ content: ReactNode;
14
+ actions: ReactNode;
15
+ state: any;
16
+ canClose: boolean;
17
+ };
18
+ export declare function setupDialog(): {
19
+ dialog: DialogStateType;
20
+ open: (d: Partial<DialogStateType>) => void;
21
+ close: () => void;
22
+ setDialog: Dispatch<SetStateAction<DialogStateType>>;
23
+ state: any;
24
+ setState: (state: any) => void;
25
+ };
26
+ export declare const DialogContext: import("react").Context<{
27
+ dialog: DialogStateType;
28
+ open: (d: Partial<DialogStateType>) => void;
29
+ close: () => void;
30
+ setDialog: Dispatch<SetStateAction<DialogStateType>>;
31
+ setState: Dispatch<SetStateAction<any>>;
32
+ state: any;
33
+ }>;
34
+ export declare const useDialog: () => {
35
+ dialog: DialogStateType;
36
+ open: (d: Partial<DialogStateType>) => void;
37
+ close: () => void;
38
+ setDialog: Dispatch<SetStateAction<DialogStateType>>;
39
+ setState: Dispatch<SetStateAction<any>>;
40
+ state: any;
41
+ };
42
+ export declare function DialogProvider({ children }: {
43
+ children: ReactNode;
44
+ }): import("react/jsx-runtime").JSX.Element;
45
+ export declare function DialogComponent(): import("react/jsx-runtime").JSX.Element;
46
+ interface DialogPromptProps extends Partial<DialogStateType> {
47
+ closeButtonText?: string;
48
+ submitButtonText?: string;
49
+ message?: string;
50
+ placeholder?: string;
51
+ value?: string;
52
+ showInput?: boolean;
53
+ onClose?: (value: string) => boolean | undefined | Promise<boolean | undefined>;
54
+ onSubmit?: (value: string) => boolean | undefined | any | Promise<boolean | undefined | any>;
55
+ }
56
+ export declare function useDialogPrompt(): {
57
+ prompt: ({ closeButtonText, submitButtonText, message, placeholder, value, showInput, onClose, onSubmit, ...props }: DialogPromptProps) => Promise<string | null>;
58
+ close: () => void;
59
+ };
60
+ export {};