treege 3.0.0-beta.57 → 3.0.0-beta.58
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/dist/{DefaultInputs-CoJrOYMe.js → DefaultInputs-Dr3R5r53.js} +783 -761
- package/dist/ThemeContext-DrI5HTYl.js +1402 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/inputs/ApiUrlCombobox.d.ts +0 -10
- package/dist/editor/types/editor.d.ts +16 -3
- package/dist/{editor-D3cbfAxI.js → editor-BhL3w_KP.js} +1176 -1157
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/context/TreegeRendererContext.d.ts +12 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +2 -1
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/hooks/useSubmitHandler.d.ts +2 -1
- package/dist/renderer/types/renderer.d.ts +15 -0
- package/dist/renderer/utils/http.d.ts +11 -0
- package/dist/renderer/utils/submit.d.ts +2 -1
- package/dist/renderer-native.js +701 -680
- package/dist/renderer.js +3 -3
- package/dist/shared/locales/ar.json.d.ts +3 -1
- package/dist/shared/locales/de.json.d.ts +3 -1
- package/dist/shared/locales/en.json.d.ts +3 -1
- package/dist/shared/locales/es.json.d.ts +3 -1
- package/dist/shared/locales/fr.json.d.ts +3 -1
- package/dist/shared/locales/it.json.d.ts +3 -1
- package/dist/shared/locales/pt.json.d.ts +3 -1
- package/package.json +1 -1
- package/dist/ThemeContext-BhIeqgqN.js +0 -1398
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TreegeEditorProps } from '../../types/editor';
|
|
2
|
-
declare const TreegeEditor: ({ flow, onExportJson, onSave, theme, language: controlledLanguage, defaultLanguage, onLanguageChange, aiConfig, extraMenuItems, openApi, openApiBaseUrl, onAuthorize, headers, onHeadersChange, }: TreegeEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TreegeEditor: ({ flow, onExportJson, onSave, theme, language: controlledLanguage, defaultLanguage, onLanguageChange, aiConfig, extraMenuItems, openApi, baseUrl, openApiBaseUrl, onAuthorize, headers, onHeadersChange, }: TreegeEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TreegeEditor;
|
|
@@ -16,15 +16,5 @@ interface ApiUrlComboboxProps extends Omit<ComponentProps<typeof Input>, "onChan
|
|
|
16
16
|
*/
|
|
17
17
|
children?: ReactNode;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
* URL field that augments a regular `<Input>` with a Popover suggesting
|
|
21
|
-
* routes from the editor-loaded OpenAPI document. The user can either type
|
|
22
|
-
* a custom URL freely (current behavior preserved) or click the Globe icon
|
|
23
|
-
* to pick a route — selecting one resolves the URL with the document's
|
|
24
|
-
* server and emits the route's HTTP method back to the caller.
|
|
25
|
-
*
|
|
26
|
-
* When no OpenAPI document is loaded, the Globe trigger is hidden and the
|
|
27
|
-
* component is functionally identical to a plain `<Input>`.
|
|
28
|
-
*/
|
|
29
19
|
declare const ApiUrlCombobox: ({ value, onChange, placeholder, children, ...inputProps }: ApiUrlComboboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
20
|
export default ApiUrlCombobox;
|
|
@@ -87,9 +87,22 @@ export interface TreegeEditorProps {
|
|
|
87
87
|
*/
|
|
88
88
|
openApi?: OpenApiDocument | string;
|
|
89
89
|
/**
|
|
90
|
-
* Base URL
|
|
91
|
-
*
|
|
92
|
-
*
|
|
90
|
+
* Base URL the produced tree is meant to run against. Pass the same value you
|
|
91
|
+
* give to `TreegeRenderer`'s `baseUrl`. It drives two things in the editor:
|
|
92
|
+
* - HTTP/Options-source urls are stored **relative** to it (route picker emits
|
|
93
|
+
* relative paths), so the exported JSON stays environment-agnostic.
|
|
94
|
+
* - it is shown as a read-only prefix on URL fields and used to resolve the
|
|
95
|
+
* "Detect fields" probe, so editor-time previews hit a real host.
|
|
96
|
+
*
|
|
97
|
+
* Works with or without OpenAPI. When an OpenAPI document is loaded, its
|
|
98
|
+
* `servers[0].url` (or the Authorize dialog override) takes precedence for
|
|
99
|
+
* route resolution; otherwise this value is the base.
|
|
100
|
+
*/
|
|
101
|
+
baseUrl?: string;
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated Use `baseUrl` instead — it now covers OpenAPI route resolution
|
|
104
|
+
* and the general runtime base. Kept as an alias for backward compatibility;
|
|
105
|
+
* `baseUrl` wins when both are set.
|
|
93
106
|
*/
|
|
94
107
|
openApiBaseUrl?: string;
|
|
95
108
|
/**
|