uiconfig-blueprint 0.0.1

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 (97) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +129 -0
  3. package/dist/ConfigObject.d.ts +16 -0
  4. package/dist/UiConfigRendererBlueprint.d.ts +13 -0
  5. package/dist/allPaths-PklnL3F6.js +23 -0
  6. package/dist/allPaths-PklnL3F6.js.map +1 -0
  7. package/dist/allPathsLoader-2dOu0jQ3.js +27 -0
  8. package/dist/allPathsLoader-2dOu0jQ3.js.map +1 -0
  9. package/dist/bpComponents/BPButtonComponent.d.ts +8 -0
  10. package/dist/bpComponents/BPColorInputComponent.d.ts +25 -0
  11. package/dist/bpComponents/BPComponent.d.ts +25 -0
  12. package/dist/bpComponents/BPContainerComponent.d.ts +21 -0
  13. package/dist/bpComponents/BPDropdownInputComponent.d.ts +16 -0
  14. package/dist/bpComponents/BPFileComponent.d.ts +26 -0
  15. package/dist/bpComponents/BPFolderComponent.d.ts +16 -0
  16. package/dist/bpComponents/BPInputComponent.d.ts +11 -0
  17. package/dist/bpComponents/BPLabelledComponent.d.ts +8 -0
  18. package/dist/bpComponents/BPNumberInputComponent.d.ts +11 -0
  19. package/dist/bpComponents/BPPanelComponent.d.ts +17 -0
  20. package/dist/bpComponents/BPSliderInputComponent.d.ts +15 -0
  21. package/dist/bpComponents/BPTextInputComponent.d.ts +8 -0
  22. package/dist/bpComponents/BPToggleInputComponent.d.ts +9 -0
  23. package/dist/bpComponents/BPTreeComponent.d.ts +32 -0
  24. package/dist/bpComponents/BPTreeFolderComponent.d.ts +10 -0
  25. package/dist/bpComponents/BPValueComponent.d.ts +16 -0
  26. package/dist/bpComponents/BPVectorInputComponent.d.ts +20 -0
  27. package/dist/components/DraggableIcon.d.ts +17 -0
  28. package/dist/components/ExtendedNumericInput.d.ts +23 -0
  29. package/dist/components/FileComponent.d.ts +7 -0
  30. package/dist/components/FormGroupComponent.d.ts +6 -0
  31. package/dist/components/InspectorStackComponent.d.ts +5 -0
  32. package/dist/components/VisualStyleContext.d.ts +110 -0
  33. package/dist/components/bpIconWrapper.d.ts +2 -0
  34. package/dist/components/variableIcons.d.ts +41 -0
  35. package/dist/contexts.d.ts +1 -0
  36. package/dist/index-PTojlie-.js +29271 -0
  37. package/dist/index-PTojlie-.js.map +1 -0
  38. package/dist/index-iM9IChdK.js +604 -0
  39. package/dist/index-iM9IChdK.js.map +1 -0
  40. package/dist/index-tqa0R-I0.js +604 -0
  41. package/dist/index-tqa0R-I0.js.map +1 -0
  42. package/dist/index.d.ts +4 -0
  43. package/dist/index.js +292 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/index.mjs +12 -0
  46. package/dist/index.mjs.map +1 -0
  47. package/dist/splitPathsBySizeLoader-QNLjzk6A.js +36 -0
  48. package/dist/splitPathsBySizeLoader-QNLjzk6A.js.map +1 -0
  49. package/dist/threejs.d.ts +2 -0
  50. package/docs/.nojekyll +1 -0
  51. package/docs/assets/highlight.css +120 -0
  52. package/docs/assets/main.js +58 -0
  53. package/docs/assets/search.js +1 -0
  54. package/docs/assets/style.css +1279 -0
  55. package/docs/classes/UI.html +403 -0
  56. package/docs/classes/UiConfigRendererBlueprint.html +404 -0
  57. package/docs/index.html +134 -0
  58. package/docs/modules.html +50 -0
  59. package/package.json +127 -0
  60. package/src/ConfigObject.tsx +137 -0
  61. package/src/UiConfigRendererBlueprint.tsx +85 -0
  62. package/src/bpComponents/BPButtonComponent.scss +8 -0
  63. package/src/bpComponents/BPButtonComponent.tsx +27 -0
  64. package/src/bpComponents/BPColorInputComponent.tsx +138 -0
  65. package/src/bpComponents/BPComponent.tsx +93 -0
  66. package/src/bpComponents/BPContainerComponent.tsx +57 -0
  67. package/src/bpComponents/BPDropdownInputComponent.tsx +80 -0
  68. package/src/bpComponents/BPFileComponent.tsx +73 -0
  69. package/src/bpComponents/BPFolderComponent.scss +107 -0
  70. package/src/bpComponents/BPFolderComponent.tsx +91 -0
  71. package/src/bpComponents/BPInputComponent.tsx +33 -0
  72. package/src/bpComponents/BPLabelledComponent.tsx +19 -0
  73. package/src/bpComponents/BPNumberInputComponent.tsx +35 -0
  74. package/src/bpComponents/BPPanelComponent.tsx +50 -0
  75. package/src/bpComponents/BPSliderInputComponent.tsx +71 -0
  76. package/src/bpComponents/BPTextInputComponent.tsx +26 -0
  77. package/src/bpComponents/BPToggleInputComponent.tsx +31 -0
  78. package/src/bpComponents/BPTreeComponent.scss +3 -0
  79. package/src/bpComponents/BPTreeComponent.tsx +127 -0
  80. package/src/bpComponents/BPTreeFolderComponent.tsx +31 -0
  81. package/src/bpComponents/BPValueComponent.tsx +46 -0
  82. package/src/bpComponents/BPVectorInputComponent.tsx +163 -0
  83. package/src/bpComponents/index.scss +3 -0
  84. package/src/components/DraggableIcon.tsx +75 -0
  85. package/src/components/ExtendedNumericInput.tsx +219 -0
  86. package/src/components/FileComponent.tsx +79 -0
  87. package/src/components/FormGroupComponent.tsx +22 -0
  88. package/src/components/InspectorStackComponent.tsx +72 -0
  89. package/src/components/VisualStyleContext.tsx +69 -0
  90. package/src/components/bpIconWrapper.tsx +20 -0
  91. package/src/components/common.scss +21 -0
  92. package/src/components/variableIcons.tsx +177 -0
  93. package/src/contexts.ts +1 -0
  94. package/src/index.ts +8 -0
  95. package/src/renderer.scss +193 -0
  96. package/src/threejs.ts +3 -0
  97. package/tsconfig.json +40 -0
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2023 Palash Bansal <palash@shaders.app>
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,129 @@
1
+ # UiConfig Blurprint.js
2
+
3
+ [![NPM Package](https://img.shields.io/npm/v/uiconfig-blueprint.svg)](https://www.npmjs.com/package/uiconfig-blueprint)
4
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/license/apache-2-0/)
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.
7
+
8
+ It includes several components for editor-like user interfaces like folders, panels, sliders, pickers, inputs for string, number, file, vector, colors, etc.
9
+
10
+ The UI components are bound to javascript/typescript objects and properties through a simple and flexible JSON configuration.
11
+
12
+ ### Examples
13
+
14
+ Basic Examples: https://repalash.com/uiconfig-blueprint/examples/index.html
15
+
16
+ Threepipe Basic UI: https://threepipe.org/examples/#blueprintjs-ui-plugin/
17
+
18
+ Threepipe Editor: https://threepipe.org/examples/#blueprintjs-editor/
19
+
20
+ ## Installation and Usage
21
+
22
+ ### npm package
23
+
24
+ Install the `uiconfig-blueprint` package from npm.
25
+ ```bash
26
+ npm install uiconfig-blueprint
27
+ ```
28
+
29
+ Use in any javascript/typescript file.
30
+ ```typescript
31
+ import { UI } from 'uiconfig-blueprint';
32
+
33
+ const config = {
34
+ type: "slider",
35
+ label: "slider",
36
+ value: 0.5,
37
+ bounds: [0, 1],
38
+ onChange: () => {
39
+ console.log("changed", config.value);
40
+ },
41
+ }
42
+
43
+ const ui = new UI();
44
+ ui.appendChild(config);
45
+ ```
46
+
47
+ ### CDN link
48
+
49
+ The module can be imported to HTML/JS a CDN link using [unpkg](https://unpkg.com/) or [jsdelivr](https://www.jsdelivr.com/).
50
+
51
+ ```html
52
+ <script src="https://unpkg.com/uiconfig-blueprint"></script>
53
+ <!--or-->
54
+ <script src="https://cdn.jsdelivr.net/npm/uiconfig-blueprint"></script>
55
+ ```
56
+
57
+ The module can be accessed with the short-form `bpui`
58
+ ```html
59
+ <script>
60
+ const config = {
61
+ type: "button",
62
+ label: "click me",
63
+ onClick: () => {
64
+ console.log("clicked");
65
+ },
66
+ }
67
+
68
+ const ui = new bpui.UI()
69
+ ui.appendChild(config)
70
+ </script>
71
+ ```
72
+
73
+ ## Configuration
74
+
75
+ Check the documentation at [uiconfig.js](https://github.com/repalash/uiconfig.js) on how to create a configuration for the UI.
76
+
77
+ ## Components
78
+
79
+ 1. `folder` - A folder that can be collapsed and expanded. It can have other components as children.
80
+ 2. `panel` - A panel that will replace the current panel.
81
+ 3. `input` - A text input field for any kind of primitive types. The type is determined automatically from initial value.
82
+ 4. `number` - A number input field for numbers.
83
+ 5. `slider` - A slider for numbers.
84
+ 6. `dropdown` - A dropdown. Options can be specified in children with label and optional value properties.
85
+ 7. `checkbox/toggle` - A toggle for boolean values.
86
+ 8. `button` - A button that can trigger a function, `onClick` or bound property/value function.
87
+ 9. `color` - A color picker for colors.
88
+ 10. `vector/vec/vec2/vec3/vec4` - Multiple number input fields in a row for vectors.
89
+ 11. `image` - A file input field for files.
90
+
91
+ ## Three.js integration
92
+
93
+ Set the three.js classes for Color, Vector2, Vector3, Vector4 in the renderer and the color and vector components will automatically use them.
94
+
95
+ ```typescript
96
+ import { UI } from 'uiconfig-blueprint';
97
+ import { Color, Vector4, Vector3, Vector2 } from 'three';
98
+
99
+ const ui = new UI();
100
+ ui.THREE = {Color, Vector4, Vector3, Vector2}
101
+ ```
102
+
103
+
104
+ ## Development
105
+
106
+ Clone the project and install dependencies.
107
+ ```bash
108
+ git clone git://github.com/repalash/uiconfig-blueprint.git
109
+ npm install
110
+ ```
111
+
112
+ Run the development server.
113
+ ```bash
114
+ npm run dev
115
+ ```
116
+ Navigate to the given URL to view the examples. Make changes in the `src` folder and the page will automatically reload.
117
+
118
+ Build the project.
119
+ ```bash
120
+ npm run build
121
+ ```
122
+
123
+ Publish the project to npm.
124
+ ```bash
125
+ npm publish
126
+ ```
127
+
128
+ ## License
129
+ All code is licensed under [Apache 2.0](LICENSE).
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { UiConfigRendererContext } from "./bpComponents/BPComponent";
3
+ import { PanelActions } from "@blueprintjs/core/lib/esm/components/panel-stack2/panelTypes";
4
+ 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 interface ConfigProps extends PanelActions {
7
+ config: UiObjectConfig;
8
+ isPanel?: boolean;
9
+ level?: number;
10
+ }
11
+ export declare class ConfigObject extends React.Component<ConfigProps, {}> {
12
+ static contextType: React.Context<import("./UiConfigRendererBlueprint").UiConfigRendererBlueprint>;
13
+ context: React.ContextType<typeof UiConfigRendererContext>;
14
+ state: {};
15
+ render(): React.JSX.Element;
16
+ }
@@ -0,0 +1,13 @@
1
+ import { UiConfigRendererBase, UiObjectConfig } from "uiconfig.js";
2
+ import { Root } from 'react-dom/client';
3
+ import { THREE } from "./threejs";
4
+ export declare class UiConfigRendererBlueprint extends UiConfigRendererBase<Root> {
5
+ constructor(container?: HTMLElement, { autoPostFrame }?: {
6
+ autoPostFrame?: boolean | undefined;
7
+ });
8
+ protected _createUiContainer(): HTMLDivElement;
9
+ protected _refreshUiConfigObject(config: UiObjectConfig): void;
10
+ renderUiConfig(_: UiObjectConfig): void;
11
+ THREE: THREE | undefined;
12
+ dispose(): void;
13
+ }
@@ -0,0 +1,23 @@
1
+ import { I as n } from "./index-tqa0R-I0.js";
2
+ import { I as e } from "./index-iM9IChdK.js";
3
+ import { p as r, I as s } from "./index-PTojlie-.js";
4
+ /**
5
+ * @license
6
+ * uiconfig-blueprint v0.0.1
7
+ * Copyright 2022-2023 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-PklnL3F6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allPaths-PklnL3F6.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]}
@@ -0,0 +1,27 @@
1
+ import { _ as n, a as o } from "./index-PTojlie-.js";
2
+ /**
3
+ * @license
4
+ * uiconfig-blueprint v0.0.1
5
+ * Copyright 2022-2023 repalash <palash@shaders.app>
6
+ * Apache-2.0 License
7
+ */
8
+ var s = function(a, e) {
9
+ return n(void 0, void 0, void 0, function() {
10
+ var t;
11
+ return o(this, function(r) {
12
+ switch (r.label) {
13
+ case 0:
14
+ return [4, import(
15
+ /* webpackChunkName: "blueprint-icons-all-paths" */
16
+ "./allPaths-PklnL3F6.js"
17
+ )];
18
+ case 1:
19
+ return t = r.sent().getIconPaths, [2, t(a, e)];
20
+ }
21
+ });
22
+ });
23
+ };
24
+ export {
25
+ s as allPathsLoader
26
+ };
27
+ //# sourceMappingURL=allPathsLoader-2dOu0jQ3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allPathsLoader-2dOu0jQ3.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]}
@@ -0,0 +1,8 @@
1
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
2
+ import React from "react";
3
+ import { BPLabelledComponent, BPLabelledComponentState } from "./BPLabelledComponent";
4
+ export declare class BPButtonComponent extends BPLabelledComponent<() => void, BPLabelledComponentState> {
5
+ constructor(props: BPComponentProps<() => void>, context: UiConfigRendererContextType);
6
+ onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
7
+ render(): React.JSX.Element | null;
8
+ }
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { BPValueComponent, BPValueComponentState } from "./BPValueComponent";
4
+ import type { ColorRepresentation } from "three";
5
+ export type BPColorComponentState = BPValueComponentState<string> & {
6
+ mode: 'number' | 'string' | 'Color';
7
+ lastValue?: ColorRepresentation;
8
+ srgbConvert: boolean;
9
+ };
10
+ export declare class BPColorInputComponent extends BPValueComponent<ColorRepresentation, BPColorComponentState, string> {
11
+ private _inputRef;
12
+ private _tempColor;
13
+ constructor(props: BPComponentProps<ColorRepresentation>, context: UiConfigRendererContextType);
14
+ convertValueToState(val: ColorRepresentation, state: BPColorComponentState): BPColorComponentState;
15
+ convertStateToValue(state: BPColorComponentState): Promise<ColorRepresentation>;
16
+ forceOnChange: boolean;
17
+ doesNeedRefresh(state: BPColorComponentState, _?: boolean): boolean;
18
+ private _mouseButtons;
19
+ componentDidMount(): void;
20
+ private _mouseMove;
21
+ componentWillUnmount(): void;
22
+ private _hasMouseUp;
23
+ private _mouseUp;
24
+ render(): React.JSX.Element | null;
25
+ }
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import type { UiConfigRendererBlueprint } from '../UiConfigRendererBlueprint';
3
+ import { UiObjectConfig } from 'uiconfig.js';
4
+ export type BPComponentProps<T> = {
5
+ config: UiObjectConfig<T>;
6
+ level?: number;
7
+ };
8
+ export type BPComponentState = {
9
+ hidden?: boolean;
10
+ disabled?: boolean;
11
+ readOnly?: boolean;
12
+ };
13
+ export declare const UiConfigRendererContext: React.Context<UiConfigRendererBlueprint>;
14
+ 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>;
17
+ context: UiConfigRendererContextType;
18
+ protected constructor(props: TProps, context: UiConfigRendererContextType, state: TState);
19
+ setStatePromise(state: TState): Promise<void>;
20
+ getUpdatedState(state: TState): TState;
21
+ private _refreshing;
22
+ refreshConfigState(state?: TState): Promise<void>;
23
+ componentDidMount(): void;
24
+ componentWillUnmount(): void;
25
+ }
@@ -0,0 +1,21 @@
1
+ import { BPLabelledComponent, BPLabelledComponentState } from './BPLabelledComponent';
2
+ import { BPComponentProps, UiConfigRendererContextType } from './BPComponent';
3
+ import { PanelActions } from '@blueprintjs/core/lib/esm/components/panel-stack2/panelTypes';
4
+ import { UiObjectConfig } from 'uiconfig.js';
5
+ export type BPContainerComponentState = BPLabelledComponentState & {
6
+ children: UiObjectConfig[];
7
+ expanded: boolean;
8
+ };
9
+ export declare class BPContainerComponent<TState extends BPContainerComponentState = BPContainerComponentState> extends BPLabelledComponent<void, TState, BPComponentProps<void> & PanelActions> {
10
+ protected _childParentOnChange: UiObjectConfig['parentOnChange'];
11
+ protected _registerChild(child: UiObjectConfig): void;
12
+ protected _unregisterChild(child: UiObjectConfig): void;
13
+ constructor(props: BPComponentProps<void> & PanelActions, context: UiConfigRendererContextType, state: TState);
14
+ getUpdatedState(state: TState): TState & import("./BPComponent").BPComponentState & {
15
+ children: UiObjectConfig<any, string, any>[];
16
+ expanded: boolean;
17
+ label: string;
18
+ };
19
+ componentDidMount(): void;
20
+ componentWillUnmount(): void;
21
+ }
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { BPInputComponent } from "./BPInputComponent";
4
+ import { BPValueComponentState } from "./BPValueComponent";
5
+ export interface DropdownItem {
6
+ label: string;
7
+ value: string | number;
8
+ }
9
+ export type BPDropdownComponentState = BPValueComponentState<string | number> & {
10
+ options: DropdownItem[];
11
+ };
12
+ export declare class BPDropdownInputComponent extends BPInputComponent<string | number, BPDropdownComponentState> {
13
+ constructor(props: BPComponentProps<string | number>, context: UiConfigRendererContextType);
14
+ getUpdatedState(state: BPDropdownComponentState): BPDropdownComponentState;
15
+ renderInput(): React.JSX.Element;
16
+ }
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { BPValueComponent, BPValueComponentState } from "./BPValueComponent";
4
+ type StateValue = string | File | null;
5
+ type FileImportType = any;
6
+ export type BPFileComponentState = BPValueComponentState<StateValue> & {
7
+ mode: 'url' | 'file';
8
+ };
9
+ type BPFileComponentExtras = {
10
+ fileLoader?: {
11
+ load: (v: string | File | {
12
+ path: string;
13
+ file: File | Blob;
14
+ }) => Promise<FileImportType>;
15
+ };
16
+ };
17
+ type BPFileComponentContextType = UiConfigRendererContextType & BPFileComponentExtras;
18
+ export declare class BPFileComponent extends BPValueComponent<FileImportType | null, BPFileComponentState, StateValue> {
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;
25
+ }
26
+ export {};
@@ -0,0 +1,16 @@
1
+ import React, { DOMAttributes } from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { PanelActions } from "@blueprintjs/core/lib/esm/components/panel-stack2/panelTypes";
4
+ import { BPContainerComponent, BPContainerComponentState } from './BPContainerComponent';
5
+ export type BPFolderComponentState = BPContainerComponentState & {};
6
+ export declare class BPFolderComponent extends BPContainerComponent<BPFolderComponentState> {
7
+ constructor(props: BPComponentProps<void> & PanelActions, context: UiConfigRendererContextType);
8
+ render(): React.JSX.Element | null;
9
+ }
10
+ export declare const FolderHeadCard: React.FC<React.PropsWithChildren<{
11
+ open: boolean;
12
+ label: string;
13
+ minimal: boolean;
14
+ disabled?: boolean;
15
+ onClick: DOMAttributes<HTMLElement>['onClick'];
16
+ }>>;
@@ -0,0 +1,11 @@
1
+ import { BPValueComponent, BPValueComponentState } from "./BPValueComponent";
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> {
5
+ protected constructor(props: BPComponentProps<TStateValue>, context: UiConfigRendererContextType, state: TState);
6
+ convertValueToState(value: TStateValue, state: TState): TState;
7
+ convertStateToValue(state: TState): Promise<TStateValue>;
8
+ abstract renderInput(): ReactNode;
9
+ protected flexBasis: string;
10
+ render(): React.JSX.Element | null;
11
+ }
@@ -0,0 +1,8 @@
1
+ import { BPComponent, BPComponentProps, BPComponentState, UiConfigRendererContextType } from "./BPComponent";
2
+ export type BPLabelledComponentState = BPComponentState & {
3
+ label: string;
4
+ };
5
+ export declare abstract class BPLabelledComponent<TValue, TState, TProps extends BPComponentProps<TValue> = BPComponentProps<TValue>> extends BPComponent<TValue, TState & BPLabelledComponentState, TProps> {
6
+ protected constructor(props: TProps, context: UiConfigRendererContextType, state: TState);
7
+ getUpdatedState(state: TState & BPLabelledComponentState): TState & BPLabelledComponentState;
8
+ }
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { BPInputComponent } from "./BPInputComponent";
4
+ import { BPValueComponentState } from "./BPValueComponent";
5
+ export declare class BPNumberInputComponent extends BPInputComponent<number> {
6
+ constructor(props: BPComponentProps<number>, context: UiConfigRendererContextType);
7
+ private _inputs;
8
+ refreshConfigState(state?: BPValueComponentState<number>): Promise<void>;
9
+ private _onChange;
10
+ renderInput(): React.JSX.Element;
11
+ }
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { BPLabelledComponentState } from "./BPLabelledComponent";
4
+ import { PanelActions } from "@blueprintjs/core/lib/esm/components/panel-stack2/panelTypes";
5
+ import { UiObjectConfig } from 'uiconfig.js';
6
+ import { BPContainerComponent } from './BPContainerComponent';
7
+ export type BPPanelComponentState = BPLabelledComponentState & {
8
+ children: UiObjectConfig[];
9
+ expanded: boolean;
10
+ };
11
+ export declare class BPPanelComponent extends BPContainerComponent<BPPanelComponentState> {
12
+ constructor(props: BPComponentProps<void> & PanelActions, context: UiConfigRendererContextType);
13
+ setExpanded: (e: boolean) => void;
14
+ componentDidMount(): void;
15
+ componentWillUnmount(): void;
16
+ render(): React.JSX.Element | null;
17
+ }
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { BPInputComponent } from "./BPInputComponent";
4
+ import { BPValueComponentState } from "./BPValueComponent";
5
+ export type BPSliderComponentState = BPValueComponentState<number> & {
6
+ min: number;
7
+ max: number;
8
+ step: number;
9
+ };
10
+ export declare class BPSliderInputComponent extends BPInputComponent<number, BPSliderComponentState> {
11
+ constructor(props: BPComponentProps<number>, context: UiConfigRendererContextType);
12
+ getUpdatedState(state: BPSliderComponentState): BPSliderComponentState;
13
+ flexBasis: string;
14
+ renderInput(): React.JSX.Element[];
15
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { BPComponentProps, UiConfigRendererContextType } from "./BPComponent";
3
+ import { BPInputComponent } from "./BPInputComponent";
4
+ export declare class BPTextInputComponent extends BPInputComponent<string> {
5
+ constructor(props: BPComponentProps<string>, context: UiConfigRendererContextType);
6
+ private _onChange;
7
+ renderInput(): React.JSX.Element;
8
+ }