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.
@@ -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 used for OpenAPI route resolution. When set, it takes precedence
91
- * over the document's `servers[0].url` useful when the spec points at a
92
- * different environment than the one to call (e.g. staging vs prod).
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
  /**