@djangocfg/ui-tools 2.1.285 → 2.1.287
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/DocsLayout-BCVU6TTX.cjs +2027 -0
- package/dist/DocsLayout-BCVU6TTX.cjs.map +1 -0
- package/dist/DocsLayout-ERETJLLV.mjs +2020 -0
- package/dist/DocsLayout-ERETJLLV.mjs.map +1 -0
- package/dist/{PlaygroundLayout-O52C6HK5.css → DocsLayout-MBFIB4NO.css} +1 -1
- package/dist/{PrettyCode.client-SGDGQTYT.cjs → PrettyCode.client-5GABIN2I.cjs} +57 -35
- package/dist/PrettyCode.client-5GABIN2I.cjs.map +1 -0
- package/dist/{PrettyCode.client-DW5LTG47.mjs → PrettyCode.client-IZTXXYHG.mjs} +57 -35
- package/dist/PrettyCode.client-IZTXXYHG.mjs.map +1 -0
- package/dist/chunk-IULI4XII.cjs +1129 -0
- package/dist/chunk-IULI4XII.cjs.map +1 -0
- package/dist/chunk-VZGQC3NG.mjs +1100 -0
- package/dist/chunk-VZGQC3NG.mjs.map +1 -0
- package/dist/index.cjs +88 -552
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -6
- package/dist/index.d.ts +18 -6
- package/dist/index.mjs +25 -496
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/tools/OpenapiViewer/.claude/.sidecar/activity.jsonl +6 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/history/2026-04-22.md +35 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/map_cache.json +30 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/review.md +35 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/scan.log +3 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-001.md +18 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-002.md +18 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-003.md +18 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-004.md +18 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-005.md +18 -0
- package/src/tools/OpenapiViewer/.claude/.sidecar/usage.json +5 -0
- package/src/tools/OpenapiViewer/.claude/project-map.md +23 -0
- package/src/tools/OpenapiViewer/OpenapiViewer.story.tsx +28 -2
- package/src/tools/OpenapiViewer/README.md +104 -51
- package/src/tools/OpenapiViewer/components/DocsLayout/ApiIntroSection.tsx +64 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/DocsView.tsx +137 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/EndpointDoc.tsx +268 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/SchemaCopyMenu.tsx +139 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/Sidebar.tsx +211 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/SlideInPlayground.tsx +101 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/TryItSheet.tsx +57 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/anchor.ts +11 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/grouping.ts +71 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/index.tsx +166 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/schemaFields.ts +121 -0
- package/src/tools/OpenapiViewer/components/DocsLayout/sidebarLabel.ts +60 -0
- package/src/tools/OpenapiViewer/components/index.ts +5 -2
- package/src/tools/OpenapiViewer/components/shared/BodyFormEditor.tsx +422 -0
- package/src/tools/OpenapiViewer/components/shared/EndpointDraftSync.tsx +108 -0
- package/src/tools/OpenapiViewer/components/shared/EndpointResetButton.tsx +50 -0
- package/src/tools/OpenapiViewer/components/{PlaygroundLayout → shared}/RequestPanel.tsx +174 -87
- package/src/tools/OpenapiViewer/components/shared/SendButton.tsx +91 -0
- package/src/tools/OpenapiViewer/components/{PlaygroundLayout → shared}/ui.tsx +5 -4
- package/src/tools/OpenapiViewer/context/PlaygroundContext.tsx +82 -8
- package/src/tools/OpenapiViewer/hooks/useEndpointDraft.ts +142 -0
- package/src/tools/OpenapiViewer/hooks/useOpenApiSchema.ts +126 -13
- package/src/tools/OpenapiViewer/index.tsx +3 -7
- package/src/tools/OpenapiViewer/lazy.tsx +6 -27
- package/src/tools/OpenapiViewer/types.ts +44 -0
- package/src/tools/OpenapiViewer/utils/formatters.ts +2 -23
- package/src/tools/OpenapiViewer/utils/index.ts +3 -1
- package/src/tools/OpenapiViewer/utils/schemaExport.ts +206 -0
- package/src/tools/OpenapiViewer/utils/url.ts +202 -0
- package/src/tools/PrettyCode/PrettyCode.client.tsx +42 -8
- package/src/tools/PrettyCode/index.tsx +6 -0
- package/dist/PlaygroundLayout-DHUATCHB.cjs +0 -798
- package/dist/PlaygroundLayout-DHUATCHB.cjs.map +0 -1
- package/dist/PlaygroundLayout-NONWOVQR.mjs +0 -791
- package/dist/PlaygroundLayout-NONWOVQR.mjs.map +0 -1
- package/dist/PrettyCode.client-DW5LTG47.mjs.map +0 -1
- package/dist/PrettyCode.client-SGDGQTYT.cjs.map +0 -1
- package/dist/chunk-5FKE7OME.cjs +0 -369
- package/dist/chunk-5FKE7OME.cjs.map +0 -1
- package/dist/chunk-BKWDHJKF.mjs +0 -356
- package/dist/chunk-BKWDHJKF.mjs.map +0 -1
- package/src/tools/OpenapiViewer/components/PlaygroundLayout/EndpointList.tsx +0 -228
- package/src/tools/OpenapiViewer/components/PlaygroundLayout/index.tsx +0 -107
- /package/dist/{PlaygroundLayout-O52C6HK5.css.map → DocsLayout-MBFIB4NO.css.map} +0 -0
- /package/src/tools/OpenapiViewer/components/{PlaygroundLayout → shared}/ResponsePanel.tsx +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -339,10 +339,21 @@ interface SchemaSource {
|
|
|
339
339
|
id: string;
|
|
340
340
|
name: string;
|
|
341
341
|
url: string;
|
|
342
|
+
/** Per-schema override for the request base URL. Wins over the
|
|
343
|
+
* global ``PlaygroundConfig.baseUrl`` and over ``schema.servers[0].url``
|
|
344
|
+
* from the OpenAPI document. Use when a single playground hosts
|
|
345
|
+
* several APIs that live on different domains. */
|
|
346
|
+
baseUrl?: string;
|
|
342
347
|
}
|
|
343
348
|
interface PlaygroundConfig {
|
|
344
349
|
schemas: SchemaSource[];
|
|
345
350
|
defaultSchemaId?: string;
|
|
351
|
+
/** Global override for the request base URL. Used when the OpenAPI
|
|
352
|
+
* document has no ``servers`` entry, or when docs are hosted on a
|
|
353
|
+
* different origin than the API. Resolution order (highest wins):
|
|
354
|
+
* ``SchemaSource.baseUrl`` → ``PlaygroundConfig.baseUrl`` →
|
|
355
|
+
* ``schema.servers[0].url`` → empty string (relative paths). */
|
|
356
|
+
baseUrl?: string;
|
|
346
357
|
/** Optional API keys the user can pick from in the request panel.
|
|
347
358
|
* When provided, the playground auto-selects the first one and
|
|
348
359
|
* syncs the ``X-API-Key`` header from ``ApiKey.secret``. Pass
|
|
@@ -359,18 +370,13 @@ interface PlaygroundConfig {
|
|
|
359
370
|
* Use this for automatic code-splitting with Suspense fallback.
|
|
360
371
|
*
|
|
361
372
|
* For direct imports without lazy loading, use:
|
|
362
|
-
*
|
|
373
|
+
* import OpenapiViewer from '@djangocfg/ui-tools/openapi'
|
|
363
374
|
*/
|
|
364
375
|
|
|
365
376
|
interface PlaygroundProps$1 {
|
|
366
377
|
config: PlaygroundConfig;
|
|
367
378
|
}
|
|
368
379
|
|
|
369
|
-
/**
|
|
370
|
-
* LazyOpenapiViewer - Lazy-loaded OpenAPI schema viewer & playground
|
|
371
|
-
*
|
|
372
|
-
* Automatically shows loading state while OpenAPI components load (~400KB)
|
|
373
|
-
*/
|
|
374
380
|
declare const LazyOpenapiViewer: React$1.FC<PlaygroundProps$1>;
|
|
375
381
|
|
|
376
382
|
/**
|
|
@@ -1458,6 +1464,12 @@ interface PrettyCodeProps {
|
|
|
1458
1464
|
isCompact?: boolean;
|
|
1459
1465
|
/** Block scroll capture until user clicks (default: true) */
|
|
1460
1466
|
scrollIsolation?: boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* Line count above which the block starts scrolling instead of growing.
|
|
1469
|
+
* ``undefined`` (default) = no cap, block grows to fit. Set e.g. ``50``
|
|
1470
|
+
* to inline short snippets and cap long ones.
|
|
1471
|
+
*/
|
|
1472
|
+
maxLines?: number;
|
|
1461
1473
|
}
|
|
1462
1474
|
declare const PrettyCode: React__default.FC<PrettyCodeProps>;
|
|
1463
1475
|
|
package/dist/index.d.ts
CHANGED
|
@@ -339,10 +339,21 @@ interface SchemaSource {
|
|
|
339
339
|
id: string;
|
|
340
340
|
name: string;
|
|
341
341
|
url: string;
|
|
342
|
+
/** Per-schema override for the request base URL. Wins over the
|
|
343
|
+
* global ``PlaygroundConfig.baseUrl`` and over ``schema.servers[0].url``
|
|
344
|
+
* from the OpenAPI document. Use when a single playground hosts
|
|
345
|
+
* several APIs that live on different domains. */
|
|
346
|
+
baseUrl?: string;
|
|
342
347
|
}
|
|
343
348
|
interface PlaygroundConfig {
|
|
344
349
|
schemas: SchemaSource[];
|
|
345
350
|
defaultSchemaId?: string;
|
|
351
|
+
/** Global override for the request base URL. Used when the OpenAPI
|
|
352
|
+
* document has no ``servers`` entry, or when docs are hosted on a
|
|
353
|
+
* different origin than the API. Resolution order (highest wins):
|
|
354
|
+
* ``SchemaSource.baseUrl`` → ``PlaygroundConfig.baseUrl`` →
|
|
355
|
+
* ``schema.servers[0].url`` → empty string (relative paths). */
|
|
356
|
+
baseUrl?: string;
|
|
346
357
|
/** Optional API keys the user can pick from in the request panel.
|
|
347
358
|
* When provided, the playground auto-selects the first one and
|
|
348
359
|
* syncs the ``X-API-Key`` header from ``ApiKey.secret``. Pass
|
|
@@ -359,18 +370,13 @@ interface PlaygroundConfig {
|
|
|
359
370
|
* Use this for automatic code-splitting with Suspense fallback.
|
|
360
371
|
*
|
|
361
372
|
* For direct imports without lazy loading, use:
|
|
362
|
-
*
|
|
373
|
+
* import OpenapiViewer from '@djangocfg/ui-tools/openapi'
|
|
363
374
|
*/
|
|
364
375
|
|
|
365
376
|
interface PlaygroundProps$1 {
|
|
366
377
|
config: PlaygroundConfig;
|
|
367
378
|
}
|
|
368
379
|
|
|
369
|
-
/**
|
|
370
|
-
* LazyOpenapiViewer - Lazy-loaded OpenAPI schema viewer & playground
|
|
371
|
-
*
|
|
372
|
-
* Automatically shows loading state while OpenAPI components load (~400KB)
|
|
373
|
-
*/
|
|
374
380
|
declare const LazyOpenapiViewer: React$1.FC<PlaygroundProps$1>;
|
|
375
381
|
|
|
376
382
|
/**
|
|
@@ -1458,6 +1464,12 @@ interface PrettyCodeProps {
|
|
|
1458
1464
|
isCompact?: boolean;
|
|
1459
1465
|
/** Block scroll capture until user clicks (default: true) */
|
|
1460
1466
|
scrollIsolation?: boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* Line count above which the block starts scrolling instead of growing.
|
|
1469
|
+
* ``undefined`` (default) = no cap, block grows to fit. Set e.g. ``50``
|
|
1470
|
+
* to inline short snippets and cap long ones.
|
|
1471
|
+
*/
|
|
1472
|
+
maxLines?: number;
|
|
1461
1473
|
}
|
|
1462
1474
|
declare const PrettyCode: React__default.FC<PrettyCodeProps>;
|
|
1463
1475
|
|