@redocly/replay 0.18.0-next.5 → 0.18.0-next.7

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-CDP0PkWJ.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),s=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),p=Math.min(a.length,s.length);let i=0;for(let o=0;o<p&&a[o]===s[o];o++)i++;const m=a.slice(i).map(()=>".."),f=s.slice(i);return[...m,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
@@ -0,0 +1,21 @@
1
+ import { s as h, r as i, e as x } from "./replay-index-DzJpa9d7.js";
2
+ import { i as j, j as b } from "./replay-index-DzJpa9d7.js";
3
+ async function u(a, e) {
4
+ const t = h(), l = await i(a), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), r = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), p = Math.min(o.length, r.length);
5
+ let s = 0;
6
+ for (let n = 0; n < p && o[n] === r[n]; n++)
7
+ s++;
8
+ const m = o.slice(s).map(() => ".."), f = r.slice(s);
9
+ return [...m, ...f].join(t);
10
+ }
11
+ async function w(a) {
12
+ const e = await x(a);
13
+ return e ? `.${e}` : "";
14
+ }
15
+ export {
16
+ w as extname,
17
+ j as isAbsolute,
18
+ b as join,
19
+ u as relative,
20
+ i as resolve
21
+ };
package/dist/replay.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-eKN-00kz.js");exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-CDP0PkWJ.js");exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;exports.applyThemeToDOM=e.applyThemeToDOM;exports.getCurrentTheme=e.getCurrentTheme;exports.resolveTheme=e.resolveTheme;
package/dist/replay.d.ts CHANGED
@@ -8,6 +8,8 @@ declare type ApiPath = {
8
8
  method: string;
9
9
  };
10
10
 
11
+ export declare function applyThemeToDOM(resolvedTheme: ResolvedTheme): void;
12
+
11
13
  declare type AuthorizationCodeOAuthFlowsObject = {
12
14
  authorizationUrl: string;
13
15
  tokenUrl: string;
@@ -53,6 +55,8 @@ declare type ConvertOperationFunction = (path: string, method: string, openAPI:
53
55
 
54
56
  export declare function EmbeddedReplay(props: ReplayAppProps): JSX.Element;
55
57
 
58
+ export declare function getCurrentTheme(): ResolvedTheme;
59
+
56
60
  declare type GetOperationURLFunction = (operationId?: string) => string | undefined;
57
61
 
58
62
  declare type ImplicitOAuthFlowsObject = {
@@ -115,6 +119,7 @@ declare type ModalProps = {
115
119
  isOpen: boolean;
116
120
  onClose: () => void;
117
121
  title: string;
122
+ hideHeader?: boolean;
118
123
  content: ReactElement;
119
124
  mountId?: string;
120
125
  className?: string;
@@ -582,6 +587,7 @@ declare type ReplayAppProps = {
582
587
  activeOperationPointer?: string;
583
588
  api?: OpenAPIDefinition;
584
589
  settings: InputSettings;
590
+ renderProjectSelect?: () => React.ReactNode;
585
591
  };
586
592
 
587
593
  export declare type ReplayOnChangeParams = {
@@ -601,6 +607,10 @@ declare type ReplayOverlayProps = {
601
607
  onRequestChange?: (props: ReplayOnChangeParams) => void;
602
608
  } & ReplayAppProps;
603
609
 
610
+ export declare type ResolvedTheme = 'light' | 'dark';
611
+
612
+ export declare function resolveTheme(theme: Theme): ResolvedTheme;
613
+
604
614
  declare type Response_2 = ImmutableObject<{
605
615
  headers: [string, string][];
606
616
  cookies: [string, string][];
@@ -628,6 +638,8 @@ declare type ServerVariable = {
628
638
  description?: string;
629
639
  };
630
640
 
641
+ export declare type Theme = 'light' | 'dark' | 'auto';
642
+
631
643
  declare type TracerName = 'try-it' | 'replay-openapi' | 'desktop';
632
644
 
633
645
  declare interface XLogo {
package/dist/replay.js CHANGED
@@ -1,7 +1,10 @@
1
- import { E as l, M as d, R as p, w as s } from "./replay-index-Dv6kFBEl.js";
1
+ import { V as s, W as l, X as p, Y as r, _ as m, $ as o, Z as y } from "./replay-index-DzJpa9d7.js";
2
2
  export {
3
- l as EmbeddedReplay,
4
- d as Modal,
3
+ s as EmbeddedReplay,
4
+ l as Modal,
5
5
  p as Replay,
6
- s as ReplayOverlay
6
+ r as ReplayOverlay,
7
+ m as applyThemeToDOM,
8
+ o as getCurrentTheme,
9
+ y as resolveTheme
7
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/replay",
3
- "version": "0.18.0-next.5",
3
+ "version": "0.18.0-next.7",
4
4
  "type": "module",
5
5
  "main": "./dist/replay.cjs",
6
6
  "module": "./dist/replay.js",
@@ -19,7 +19,7 @@
19
19
  "react-dom": "^19.1.0",
20
20
  "react-router-dom": "^6.21.1",
21
21
  "styled-components": "^5.3.11",
22
- "@redocly/theme": "0.59.0-next.4"
22
+ "@redocly/theme": "0.59.0-next.6"
23
23
  },
24
24
  "dependencies": {
25
25
  "@codemirror/autocomplete": "^6.15.0",