treege 3.0.0-beta.59 → 3.0.0-beta.60

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 CHANGED
@@ -542,24 +542,22 @@ Use the HTTP input type to fetch and map data from APIs:
542
542
 
543
543
  ### Global Configuration
544
544
 
545
- Configure the renderer globally using the TreegeConfigProvider:
545
+ Configure the renderer globally using the TreegeRendererProvider:
546
546
 
547
547
  ```tsx
548
- import { TreegeConfigProvider } from "treege/renderer";
548
+ import { TreegeRendererProvider } from "treege/renderer";
549
549
 
550
550
  function App() {
551
551
  return (
552
- <TreegeConfigProvider
553
- config={{
554
- language: "fr",
555
- googleApiKey: "your-google-api-key",
556
- components: {
557
- // Your custom components
558
- }
552
+ <TreegeRendererProvider
553
+ language="fr"
554
+ googleApiKey="your-google-api-key"
555
+ components={{
556
+ // Your custom components
559
557
  }}
560
558
  >
561
559
  <TreegeRenderer flow={flow} />
562
- </TreegeConfigProvider>
560
+ </TreegeRendererProvider>
563
561
  );
564
562
  }
565
563
  ```
@@ -678,8 +676,8 @@ Once the development server is running, you can access these examples:
678
676
  - **Custom Input Example**: [http://localhost:5173/example-custom-input](http://localhost:5173/example-custom-input)
679
677
  - Demonstrates how to create and integrate custom input components
680
678
 
681
- - **TreegeConfigProvider Example**: [http://localhost:5173/example-treege-config-provider](http://localhost:5173/example-treege-config-provider)
682
- - Shows global configuration with TreegeConfigProvider
679
+ - **TreegeRendererProvider Example**: [http://localhost:5173/example-treege-renderer-provider](http://localhost:5173/example-treege-renderer-provider)
680
+ - Shows global configuration with TreegeRendererProvider
683
681
 
684
682
  ## API Reference
685
683
 
@@ -698,7 +696,7 @@ Once the development server is running, you can access these examples:
698
696
  | `openApi` | `OpenApiDocument \| string` | - | OpenAPI 3.x source used to power URL/route suggestions and the Authorize flow. Accepts a pre-parsed document or a URL string (the editor fetches it on mount and toasts on failure) |
699
697
  | `openApiBaseUrl` | `string` | - | Base URL used for OpenAPI route resolution. When set, takes precedence over the document's `servers[0].url` — useful when the spec points at a different environment than the one to call |
700
698
  | `headers` | `HttpHeader[]` | - | Global HTTP headers applied to in-editor requests (e.g. the "Detect fields" button). Pass the same value you give to `TreegeRenderer` so editor previews use the same auth/headers as runtime |
701
- | `onAuthorize` | `(headers: HttpHeader[]) => void` | - | Called when the user submits the Authorize dialog. Forward the resulting headers to `TreegeRenderer` (or `TreegeConfigProvider`) so every form request is authenticated |
699
+ | `onAuthorize` | `(headers: HttpHeader[]) => void` | - | Called when the user submits the Authorize dialog. Forward the resulting headers to `TreegeRenderer` (or `TreegeRendererProvider`) so every form request is authenticated |
702
700
  | `onHeadersChange` | `(headers: HttpHeader[]) => void` | - | Called when the user edits headers in the built-in "Global headers" dialog. The component is controlled — update your `headers` state in response and pass the new list back via the `headers` prop |
703
701
 
704
702
  ### TreegeRenderer Props
@@ -1,4 +1,4 @@
1
- import { C as e, D as t, E as n, N as r, O as i, P as a, S as o, T as s, b as c, d as l, h as u, i as d, j as f, k as p, r as m, s as h, t as g, w as _, y as v } from "./ThemeContext-ClYtPOGK.js";
1
+ import { C as e, D as t, E as n, N as r, O as i, P as a, S as o, T as s, b as c, d as l, h as u, i as d, j as f, k as p, r as m, s as h, t as g, w as _, y as v } from "./ThemeContext-Ddk_Y-Dz.js";
2
2
  import * as y from "react";
3
3
  import { forwardRef as b, useCallback as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
4
4
  import { Fragment as ee, jsx as E, jsxs as D } from "react/jsx-runtime";