api_binding_ui 0.0.0-stage → 1.1.0
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.
- package/README.md +394 -3
- package/SKILL.md +350 -0
- package/dist/api-binding-ui.css +248 -0
- package/dist/components/ApiBindingWorkspace.d.ts +10 -0
- package/dist/components/ApiMappings.d.ts +21 -0
- package/dist/components/BindApiButton.d.ts +41 -0
- package/dist/components/RequestPreview.d.ts +7 -0
- package/dist/components/SimulationDialog.d.ts +8 -0
- package/dist/components/ValidationDialog.d.ts +8 -0
- package/dist/components/WorkspaceContext.d.ts +7 -0
- package/dist/components/ui/AppGrid.d.ts +27 -0
- package/dist/components/ui/Badge.d.ts +9 -0
- package/dist/components/ui/Banner.d.ts +8 -0
- package/dist/components/ui/Button.d.ts +31 -0
- package/dist/components/ui/Card.d.ts +14 -0
- package/dist/components/ui/Dialog.d.ts +61 -0
- package/dist/components/ui/Icons.d.ts +21 -0
- package/dist/components/ui/Input.d.ts +31 -0
- package/dist/core/bindingContext.d.ts +67 -0
- package/dist/core/catalog.d.ts +18 -0
- package/dist/core/componentId.d.ts +12 -0
- package/dist/core/model.d.ts +63 -0
- package/dist/core/openapi.d.ts +2 -0
- package/dist/core/transport.d.ts +33 -0
- package/dist/core/validation.d.ts +2 -0
- package/dist/core/valueCoercion.d.ts +17 -0
- package/dist/hooks/useAppliedBinding.d.ts +6 -0
- package/dist/index.css +248 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +11932 -0
- package/dist/style.css +244 -0
- package/dist/types.d.ts +245 -0
- package/package.json +47 -6
package/dist/index.css
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/* src/styles/highradius-bridge.css */
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/* src/styles/index.css */
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/* src/styles/workspace.css */
|
|
8
|
+
.binding-workspace, .binding-workspace * {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.binding-workspace, .api-binding, .binding-v2 {
|
|
13
|
+
display: flex;
|
|
14
|
+
background: var(--ds-color-background, #fff);
|
|
15
|
+
color: var(--ds-color-foreground, #0f172a);
|
|
16
|
+
font-family: var(--ds-font-family-sans, sans-serif);
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
height: 100vh;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.binding-workspace h1, .api-binding h1, .binding-v2 h1 {
|
|
22
|
+
font-size: var(--ds-font-size-2xl, 1.5rem);
|
|
23
|
+
font-weight: var(--ds-font-weight-bold, 700);
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.binding-workspace h2, .api-binding h2, .binding-v2 h2 {
|
|
28
|
+
font-size: var(--ds-font-size-lg, 1.125rem);
|
|
29
|
+
font-weight: var(--ds-font-weight-semibold, 600);
|
|
30
|
+
margin: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.binding-workspace h3, .api-binding h3, .binding-v2 h3 {
|
|
34
|
+
font-size: var(--ds-font-size-base, .875rem);
|
|
35
|
+
font-weight: var(--ds-font-weight-semibold, 600);
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.binding-workspace p, .api-binding p, .binding-v2 p {
|
|
40
|
+
line-height: var(--ds-line-height-normal, 1.5);
|
|
41
|
+
margin: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.binding-header, .binding-footer, .binding-v2-header, .binding-v2-footer {
|
|
45
|
+
padding: var(--ds-page-padding, 1rem 1.5rem);
|
|
46
|
+
display: flex;
|
|
47
|
+
gap: var(--ds-space-4, 1rem);
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
align-items: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.binding-header, .binding-v2-header {
|
|
54
|
+
border-bottom-width: var(--ds-screen-surface-border-width, 1px);
|
|
55
|
+
border-bottom-style: solid;
|
|
56
|
+
border-bottom-color: var(--ds-color-border, #e2e8f0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.binding-body, .binding-v2-body {
|
|
60
|
+
overflow: auto;
|
|
61
|
+
position: relative;
|
|
62
|
+
padding: var(--ds-page-padding, 1rem 1.5rem);
|
|
63
|
+
flex: 1;
|
|
64
|
+
min-height: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.binding-columns, .binding-v2-columns {
|
|
68
|
+
isolation: isolate;
|
|
69
|
+
display: flex;
|
|
70
|
+
gap: var(--ds-space-8, 2rem);
|
|
71
|
+
flex-wrap: wrap;
|
|
72
|
+
align-items: start;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.binding-main, .binding-v2-main {
|
|
76
|
+
flex-grow: 1;
|
|
77
|
+
flex-basis: var(--ds-dialog-form-min-width, 32rem);
|
|
78
|
+
padding-bottom: var(--ds-space-12, 3rem);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.binding-main, .binding-stack, .binding-v2-main, .binding-v2-stack {
|
|
82
|
+
display: flex;
|
|
83
|
+
gap: var(--ds-space-4, 1rem);
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
min-width: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.binding-section, .binding-v2-section {
|
|
89
|
+
padding-bottom: var(--ds-space-6, 1.5rem);
|
|
90
|
+
display: flex;
|
|
91
|
+
gap: var(--ds-space-4, 1rem);
|
|
92
|
+
border-bottom-width: var(--ds-screen-surface-border-width, 1px);
|
|
93
|
+
border-bottom-style: solid;
|
|
94
|
+
border-bottom-color: var(--ds-color-border, #e2e8f0);
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.binding-section-title, .binding-v2-section-title {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: var(--ds-space-4, 1rem);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.binding-muted, .binding-v2-muted {
|
|
106
|
+
color: var(--ds-color-muted-foreground, #64748b);
|
|
107
|
+
font-size: var(--ds-font-size-sm, .8125rem);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.binding-preview, .binding-v2-preview {
|
|
111
|
+
flex-basis: var(--ds-dialog-min-width, 24rem);
|
|
112
|
+
position: sticky;
|
|
113
|
+
background: var(--ds-color-surface, #fff);
|
|
114
|
+
border-width: var(--ds-screen-surface-border-width, 1px);
|
|
115
|
+
border-style: solid;
|
|
116
|
+
border-color: var(--ds-color-border, #e2e8f0);
|
|
117
|
+
border-radius: var(--ds-radius-md, 6px);
|
|
118
|
+
padding: var(--ds-space-6, 1.5rem);
|
|
119
|
+
display: flex;
|
|
120
|
+
gap: var(--ds-space-4, 1rem);
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
flex-grow: 0;
|
|
123
|
+
max-width: 100%;
|
|
124
|
+
top: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.binding-panel, .binding-v2-panel {
|
|
128
|
+
position: absolute;
|
|
129
|
+
width: var(--ds-dialog-form-min-width, 32rem);
|
|
130
|
+
background: var(--ds-color-background, #fff);
|
|
131
|
+
border-left-width: var(--ds-screen-surface-border-width, 1px);
|
|
132
|
+
border-left-style: solid;
|
|
133
|
+
border-left-color: var(--ds-color-border, #e2e8f0);
|
|
134
|
+
box-shadow: var(--ds-shadow-md, 0 4px 6px -1px #0000001a);
|
|
135
|
+
padding: var(--ds-space-6, 1.5rem);
|
|
136
|
+
display: flex;
|
|
137
|
+
gap: var(--ds-space-6, 1.5rem);
|
|
138
|
+
z-index: var(--ds-focus-z-index, 50);
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
max-width: 100%;
|
|
141
|
+
min-height: 100%;
|
|
142
|
+
top: 0;
|
|
143
|
+
right: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.binding-details, .binding-v2-details {
|
|
147
|
+
display: flex;
|
|
148
|
+
gap: var(--ds-space-2, .5rem);
|
|
149
|
+
font-size: var(--ds-font-size-sm, .8125rem);
|
|
150
|
+
overflow-wrap: anywhere;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.binding-details summary, .binding-v2-details summary {
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
color: var(--ds-color-muted-foreground, #64748b);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.binding-footer, .binding-v2-footer {
|
|
160
|
+
border-top-width: var(--ds-screen-surface-border-width, 1px);
|
|
161
|
+
border-top-style: solid;
|
|
162
|
+
border-top-color: var(--ds-color-border, #e2e8f0);
|
|
163
|
+
background: var(--ds-color-background, #fff);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.binding-simulation, .binding-v2-simulation {
|
|
167
|
+
display: flex;
|
|
168
|
+
gap: var(--ds-space-4, 1rem);
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.binding-empty, .binding-v2-empty {
|
|
173
|
+
padding: var(--ds-space-12, 3rem);
|
|
174
|
+
margin: auto;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.binding-error, .binding-v2-error {
|
|
178
|
+
color: var(--ds-color-destructive, #ef4444);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.binding-stack-tight, .binding-v2-stack-tight {
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: flex-start;
|
|
184
|
+
gap: var(--ds-space-1, .25rem);
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.binding-list, .binding-v2-list {
|
|
189
|
+
padding-left: var(--ds-space-4, 1rem);
|
|
190
|
+
margin: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.binding-panel-wide, .binding-v2-panel-wide {
|
|
194
|
+
width: var(--ds-dialog-width-large, 48rem);
|
|
195
|
+
overflow: auto;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.binding-call, .binding-v2-call {
|
|
199
|
+
display: flex;
|
|
200
|
+
gap: var(--ds-space-3, .75rem);
|
|
201
|
+
padding: var(--ds-space-4, 1rem);
|
|
202
|
+
border-width: var(--ds-screen-surface-border-width, 1px);
|
|
203
|
+
border-style: solid;
|
|
204
|
+
border-color: var(--ds-color-border, #e2e8f0);
|
|
205
|
+
border-radius: var(--ds-radius-md, 6px);
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
min-width: 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.binding-call-grid, .binding-v2-call-grid {
|
|
211
|
+
display: grid;
|
|
212
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--ds-menu-min-width, 12rem), 1fr));
|
|
213
|
+
gap: var(--ds-space-3, .75rem);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.binding-params, .binding-v2-params {
|
|
217
|
+
display: flex;
|
|
218
|
+
gap: var(--ds-space-2, .5rem);
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.binding-param, .binding-v2-param {
|
|
223
|
+
display: grid;
|
|
224
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
225
|
+
gap: var(--ds-space-3, .75rem);
|
|
226
|
+
overflow-wrap: anywhere;
|
|
227
|
+
align-items: start;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.binding-endpoint, .binding-v2-endpoint {
|
|
231
|
+
font-family: var(--ds-font-family-mono, monospace);
|
|
232
|
+
font-size: var(--ds-font-size-sm, .8125rem);
|
|
233
|
+
overflow-wrap: anywhere;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.binding-preview-parts, .binding-v2-preview-parts {
|
|
237
|
+
display: grid;
|
|
238
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--ds-menu-min-width, 12rem), 1fr));
|
|
239
|
+
gap: var(--ds-space-3, .75rem);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.binding-pre, .binding-v2-pre {
|
|
243
|
+
font-family: var(--ds-font-family-mono, monospace);
|
|
244
|
+
font-size: var(--ds-font-size-sm, .8125rem);
|
|
245
|
+
white-space: pre-wrap;
|
|
246
|
+
overflow-wrap: anywhere;
|
|
247
|
+
margin: 0;
|
|
248
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Binding Studio - Public Package Entry Point
|
|
3
|
+
*/
|
|
4
|
+
import "./styles/index.css";
|
|
5
|
+
export * from "./types";
|
|
6
|
+
export { CONFIG_VERSION, SUBMIT, CANCEL, CUSTOMER_PARAM, draftKey, appliedKey, fingerprint, newCallId, definitionFor, methodsFor, apisOf, fieldId, reconcileCallParams, proposeConfig, reconcileConfig, migrateConfig, callsFor, changeCallTarget, droppedBy, populated, changePurpose, newCall, moveCall, setParamSource, gridPaths, componentLabel, endpointLabel, callIssues, issuesFor, actionContext, snapshotForm, resolutionIssues, previewRequests, isNoteContract, isSimulated, simulatorGaps, simulationErrors, simulationForm, simulateSave, canApply, validateBindings, verificationSignature, fieldSummary, isButton, } from "./core/model";
|
|
7
|
+
export { contextKey, storeBindingContext, readBindingContext, validBindingContext, validContext, openBindingStudio, notifyApplied, notifySelectionUpdate, type OpenStudioOptions, } from "./core/transport";
|
|
8
|
+
export { friendlyLabel, buildCatalogFromRegistry, type RawBindings, } from "./core/catalog";
|
|
9
|
+
export { buildCatalogFromOpenApi } from "./core/openapi";
|
|
10
|
+
export { validateRequest } from "./core/validation";
|
|
11
|
+
export { FREE_TEXT_SOURCE, FREE_TEXT_OPTION, storageKey, storeSnapshot, readSnapshot, windowIds, gridPropertyPaths, contextComponents, sourceComponents, discoverFormComponents, discoverButtons, buildSnapshot, } from "./core/bindingContext";
|
|
12
|
+
export { componentId, isButtonId, parseComponentId, normalizeComponent, type ComponentDescriptor, } from "./core/componentId";
|
|
13
|
+
export { baseType, coerceScalar, coerce, resolveParam, buildRequest, parameterKey, parameterFor, coerceValue, type Scalar, } from "./core/valueCoercion";
|
|
14
|
+
export { useAppliedBinding } from "./hooks/useAppliedBinding";
|
|
15
|
+
export { BindApiButton, type BindApiButtonProps } from "./components/BindApiButton";
|
|
16
|
+
export { ApiBindingWorkspace, ApiBindingStudio, type ApiBindingWorkspaceProps } from "./components/ApiBindingWorkspace";
|
|
17
|
+
export { WorkspaceComponentsProvider, useWorkspaceComponents } from "./components/WorkspaceContext";
|
|
18
|
+
export { ApiMappings } from "./components/ApiMappings";
|
|
19
|
+
export { RequestPreview } from "./components/RequestPreview";
|
|
20
|
+
export { SimulationDialog } from "./components/SimulationDialog";
|
|
21
|
+
export { ValidationDialog } from "./components/ValidationDialog";
|
|
22
|
+
export { AppGrid, createActionColumn, type AppGridColDef, type AppGridProps } from "./components/ui/AppGrid";
|
|
23
|
+
export { Button, ButtonBar, ButtonGroup, type ButtonProps } from "./components/ui/Button";
|
|
24
|
+
export { Badge, type BadgeProps } from "./components/ui/Badge";
|
|
25
|
+
export { Banner, type BannerProps } from "./components/ui/Banner";
|
|
26
|
+
export { DetailCard, type DetailCardProps, type DetailCardField } from "./components/ui/Card";
|
|
27
|
+
export { Dialog, actionFormDialogTemplateV1, alertDialogTemplateV1, type DialogProps } from "./components/ui/Dialog";
|
|
28
|
+
export { Input, TextArea, Select, Checkbox, type InputProps, type TextAreaProps, type SelectProps, type CheckboxProps, type SelectOption } from "./components/ui/Input";
|
|
29
|
+
export * as Icons from "./components/ui/Icons";
|