@redocly/marketing-pages 0.1.28 → 0.1.30
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/components/Blog/FeaturedClassics.js +3 -3
- package/dist/pages/editor/components/Layout/EditorLayout.d.ts +1 -1
- package/dist/pages/editor/components/Layout/EditorLayout.js +2 -2
- package/dist/pages/editor/components/Layout/PreviewLayout.d.ts +2 -0
- package/dist/pages/editor/components/Layout/PreviewLayout.js +2 -2
- package/dist/pages/editor/components/Page.js +39 -1
- package/dist/pages/editor/components/PreviewPanel/IframeContainer.js +2 -2
- package/dist/pages/editor/components/PreviewPanel/PreviewContent.js +5 -5
- package/dist/pages/editor/components/PreviewPanel.d.ts +1 -0
- package/dist/pages/editor/components/PreviewPanel.js +1 -1
- package/dist/pages/editor/hooks/useFileOperations.js +1 -1
- package/dist/pages/editor-preview/components/Page.js +2 -2
- package/dist/pages/editor-preview/hooks/useThemeManager.js +1 -1
- package/dist/pages/home/components/FamilyOfProducts.js +0 -1
- package/package.json +1 -1
- package/dist/pages/editor/components/Layout/FullPreviewLayout.d.ts +0 -13
- package/dist/pages/editor/components/Layout/FullPreviewLayout.js +0 -5
- package/dist/pages/editor/components/Layout/MainLayout.d.ts +0 -28
- package/dist/pages/editor/components/Layout/MainLayout.js +0 -39
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import t,{useMemo as
|
|
1
|
+
import t,{useMemo as s}from"react";import{linearGradient as l}from"polished";import m from"styled-components";import{PrimaryPostCard as c}from"./PrimaryPostCard";import{GridSection as d,MediaBox as f,Skewed as u}from"../PositionItems";import{TextGradient as p}from"../TextGradient/TextGradient";import{breakpoints as h}from"@redocly/theme/core/utils";import{useThemeHooks as g}from"@redocly/theme/core/hooks";const k=()=>{const{usePageSharedData:i}=g(),{posts:o}=i("blog-posts"),r=["Redocly Premium vs Open Source Features","Open-sourcing Redocly\u2019s unique approach to dogfooding","API documentation essentials","Using Redocly tools for better OpenAPI development","Build rich developer experiences with Markdown in OpenAPI","llms.txt is overhyped","Redocly Launches New API Tools Suite","The rise of interactive documentation","My favorite new features","Rethinking sub-resources in API design","What's an API?","API Governance: Shift-Left to Save Money and Accelerate Velocity","Learn OpenAPI in a day"],n=s(()=>[...o.filter(({title:a})=>r.includes(a))].sort(()=>Math.random()-.5).slice(0,3),[o]);return t.createElement(u,{angle:0,bg:l({colorStops:["rgb(0, 104, 251)","rgb(126, 65, 255)"],toDirection:"to right bottom"}),offsetTop:"-300px",offsetBottom:"-200px"},t.createElement(f,{mb:6},t.createElement(y,null,"Featured classics"),t.createElement(d,{gridTemplateColumns:{base:"1fr",medium:"repeat(3, 1fr)"},justifyItems:{base:"center"},gridGap:{base:"5rem"}},n.map(e=>t.createElement(c,{key:e.slug,title:e.title,to:`${e.slug}`,img:e.image,description:e.description,date:e.date,author:e.author})))))},y=m(p)`
|
|
2
2
|
font-size: 28px;
|
|
3
3
|
line-height: 30px;
|
|
4
4
|
font-family: var(--font-family);
|
|
5
5
|
font-weight: 600;
|
|
6
6
|
|
|
7
|
-
@media screen and (min-width: ${
|
|
7
|
+
@media screen and (min-width: ${h.medium}) {
|
|
8
8
|
font-size: 40px;
|
|
9
9
|
line-height: 48px;
|
|
10
10
|
}
|
|
11
|
-
`;export{
|
|
11
|
+
`;export{k as FeaturedClassics};
|
|
@@ -18,5 +18,5 @@ interface EditorLayoutProps {
|
|
|
18
18
|
onDownloadJson: () => void;
|
|
19
19
|
onToggleFullPreview: () => void;
|
|
20
20
|
}
|
|
21
|
-
declare const EditorLayout: React.
|
|
21
|
+
declare const EditorLayout: React.ForwardRefExoticComponent<EditorLayoutProps & React.RefAttributes<any>>;
|
|
22
22
|
export default EditorLayout;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react";import
|
|
1
|
+
import e from"react";import t from"styled-components";import{Panel as n,PanelGroup as h,PanelResizeHandle as S}from"react-resizable-panels";import k from"../EditorPanel";import{ProblemsPanel as w}from"../ProblemsPanel";import R from"../Toolbar";const i=e.forwardRef(({value:d,onChange:s,onValidationUpdate:c,hideWarnings:r,onHideWarningsChange:m,isFullPreview:p,gotoPosition:u,parsedErrors:f,onProblemClick:b,onFileLoad:P,onDownloadYaml:E,onDownloadJson:g,onToggleFullPreview:C},v)=>{const[l,a]=e.useState(!0),o=e.useRef(null),y=(z,x)=>{b(z,x),l&&o.current?.expand()};return e.createElement(F,{ref:v,defaultSize:50,minSize:20,collapsible:!0,collapsedSize:0},e.createElement(R,{onFileLoad:P,onDownloadYamlClick:E,onDownloadJsonClick:g,hideWarnings:r,onHideWarningsChange:m,onToggleFullPreview:C}),e.createElement(L,null,e.createElement(h,{direction:"vertical"},e.createElement(n,{defaultSize:95},e.createElement(k,{value:d,onChange:s,onValidationUpdate:c,hideWarnings:r,isFullPreview:p,gotoPosition:u})),e.createElement(S,{className:"resize-handle-horizontal",style:{display:l?"none":"block"}}),e.createElement(n,{ref:o,collapsible:!0,collapsedSize:5,defaultSize:5,minSize:20,onCollapse:a.bind(null,!0),onExpand:a.bind(null,!1)},e.createElement(w,{problems:f,onProblemClick:y,isCollapsed:l,onToggle:()=>{l?o.current?.expand():o.current?.collapse()}})))))});i.displayName="EditorLayout";var J=i;const F=t(n)`
|
|
2
2
|
flex: 2;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -8,7 +8,7 @@ import e from"react";import a from"styled-components";import{Panel as n,PanelGro
|
|
|
8
8
|
--vscode-editor-background: var(--layer-color);
|
|
9
9
|
--vscode-editorGutter-background: var(--layer-color);
|
|
10
10
|
}
|
|
11
|
-
`,
|
|
11
|
+
`,L=t.div`
|
|
12
12
|
flex: 1;
|
|
13
13
|
min-height: 0;
|
|
14
14
|
display: flex;
|
|
@@ -7,6 +7,8 @@ interface PreviewLayoutProps {
|
|
|
7
7
|
onTemplateClick: () => void;
|
|
8
8
|
onFileLoad: (content: string, fileName: string) => void;
|
|
9
9
|
isClient: boolean;
|
|
10
|
+
isFullPreview: boolean;
|
|
11
|
+
onExitFullPreview?: () => void;
|
|
10
12
|
}
|
|
11
13
|
declare const PreviewLayout: React.FC<PreviewLayoutProps>;
|
|
12
14
|
export default PreviewLayout;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import e from"react";import
|
|
1
|
+
import e from"react";import s from"styled-components";import{Panel as c}from"react-resizable-panels";import f from"../PreviewPanel";const o=e.memo(({definition:i,rawValue:t,hasRenderedOnce:a,hasStructErrors:l,onTemplateClick:n,onFileLoad:m,isClient:p,isFullPreview:r,onExitFullPreview:d})=>e.createElement(u,{defaultSize:r?100:50,minSize:20,collapsible:!0,collapsedSize:0},p&&e.createElement(f,{definition:i,rawValue:t,hasRenderedOnce:a,hasStructErrors:l,onTemplateClick:n,onFileLoad:m,onExitFullPreview:d,isFullPreview:r})));o.displayName="PreviewLayout";var y=o;const u=s(c)`
|
|
2
2
|
flex: 3;
|
|
3
3
|
position: relative;
|
|
4
4
|
border-left: 1px solid var(--border-color-primary);
|
|
5
5
|
--sidebar-width: 0px;
|
|
6
6
|
--panel-gap-horizontal: var(--spacing-md);
|
|
7
|
-
`;export{
|
|
7
|
+
`;export{y as default};
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
import e from"react";import{useEditorState as
|
|
1
|
+
import e from"react";import m from"styled-components";import{useEditorState as S}from"../hooks/useEditorState";import{useOpenApiValidation as T}from"../hooks/useOpenApiValidation";import{useFileOperations as H}from"../hooks/useFileOperations";import{PanelGroup as W,PanelResizeHandle as G}from"react-resizable-panels";import J from"./Layout/PreviewLayout";import Y from"./Layout/EditorLayout";function I(){const[p,g]=e.useState(!1),[r,d]=e.useState(!1),l=e.useRef(null);e.useEffect(()=>g(!0),[]);const{value:a,setValue:c,validatedValue:v,setValidatedValue:u,setValidationErrors:t,setFileName:b,parsedErrors:w,hasStructErrors:h,hideWarnings:P,setHideWarnings:k}=S(),{definition:n,hasRenderedOnce:E,setHasRenderedOnce:C}=T({validatedValue:v,hasStructErrors:h}),f=e.useRef(null);e.useEffect(()=>{n&&(f.current=n)},[n]);const F=n||f.current,[y,z]=e.useState(null),o=H({setValue:c,setFileName:b,setHasRenderedOnce:C,setValidationErrors:t}),x=e.useCallback((i,s)=>{t(i),u(s)},[t,u]),R=e.useCallback((i,s)=>{z({line:i,column:s})},[]),V=e.useCallback(()=>o.handleDownloadYaml(a),[o,a]),D=e.useCallback(()=>o.handleDownloadJson(a),[o,a]),L=e.useCallback(()=>d(!0),[]),O=e.useCallback(()=>d(!1),[]);return e.useEffect(()=>{l.current&&(r?l.current.collapse():l.current.expand())},[r]),e.createElement(N,null,e.createElement(U,{direction:"horizontal"},e.createElement(Y,{ref:l,value:a,onChange:c,onValidationUpdate:x,hideWarnings:P,onHideWarningsChange:k,isFullPreview:r,gotoPosition:y,parsedErrors:w,onProblemClick:R,onFileLoad:o.handleFileLoad,onDownloadYaml:V,onDownloadJson:D,onToggleFullPreview:L}),e.createElement(G,{className:"resize-handle",style:{display:r?"none":"block"}}),e.createElement(J,{definition:F,rawValue:a,hasRenderedOnce:E,hasStructErrors:h,onTemplateClick:o.handleTemplateClick,onFileLoad:o.handleFileLoad,isClient:p,isFullPreview:r,onExitFullPreview:O})))}const N=m.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: calc(100vh - var(--navbar-height));
|
|
5
|
+
|
|
6
|
+
background-color: var(--bg-color);
|
|
7
|
+
color: var(--text-color-primary);
|
|
8
|
+
|
|
9
|
+
[data-component-name='Layout/PageLayout']:has(&) + div + footer {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
`,U=m(W)`
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
height: 100%;
|
|
16
|
+
overflow: visible;
|
|
17
|
+
|
|
18
|
+
.resize-handle {
|
|
19
|
+
width: 4px;
|
|
20
|
+
background-color: var(--border-color-primary);
|
|
21
|
+
cursor: col-resize;
|
|
22
|
+
transition: background-color 0.2s ease;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.resize-handle[data-resize-handle-state="hover"] {
|
|
26
|
+
background-color: var(--color-blue-4);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.resize-handle-horizontal {
|
|
30
|
+
height: 4px;
|
|
31
|
+
background-color: var(--border-color-primary);
|
|
32
|
+
cursor: row-resize;
|
|
33
|
+
transition: background-color 0.2s ease;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.resize-handle-horizontal[data-resize-handle-state="hover"] {
|
|
37
|
+
background-color: var(--color-blue-4);
|
|
38
|
+
}
|
|
39
|
+
`;export{I as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a,{useRef as i,useEffect as s}from"react";import u from"styled-components";const c=a.memo(({definition:e,onIframeReady:n})=>{const d=i(null),r=i(null),[l,p]=a.useState(0);return s(()=>{const o=t=>{r.current=t,t.updateDefinition(e),n(t)};return window.onReady=o,()=>{delete window.onReady}},[e,n]),s(()=>{const o=t=>{t.data?.type==="scroll-to-operation"&&r.current&&r.current.postMessage(t.data,"*")};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),s(()=>{r.current&&e&&r.current.updateDefinition(e)},[e]),a.createElement(f,null,a.createElement(m,{key:l,ref:d,title:"API Documentation Preview",src:"/preview",onLoad:()=>{}}))},(e,n)=>e.definition===n.definition);c.displayName="IframeContainer";var h=c;const f=u.div`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
`,m=u.iframe`
|
|
5
5
|
width: 100%;
|
|
6
6
|
height: 100%;
|
|
7
7
|
border: none;
|
|
8
|
-
`;export{
|
|
8
|
+
`;export{h as default};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import e from"react";import t from"styled-components";import{Button as
|
|
1
|
+
import e from"react";import t from"styled-components";import{Button as s}from"@redocly/theme/components/Button/Button";import{Tooltip as d}from"@redocly/theme/components/Tooltip/Tooltip";import{ViewOffIcon as E}from"@redocly/theme/icons/ViewOffIcon/ViewOffIcon";import l from"./ErrorOverlay";import u from"./IframeContainer";import y from"../EmptyState";const m=e.memo(({definition:n,rawValue:o,hasStructErrors:r,onTemplateClick:p,onFileLoad:c,onExitFullPreview:i,onIframeReady:f})=>!o||typeof o!="string"||o.trim()===""?e.createElement(y,{onTemplateClick:p,onUploadClick:c}):n?e.createElement(a,null,e.createElement(l,{hasStructErrors:r}),i&&e.createElement(v,null,e.createElement(x,{tip:"Exit full preview mode",width:"fit-content",placement:"right"},e.createElement(s,{variant:"secondary",onClick:i,"aria-label":"Exit full preview",icon:e.createElement(E,null)}))),e.createElement(u,{definition:n,onIframeReady:f})):e.createElement(a,null,e.createElement(l,{hasStructErrors:r}),e.createElement(g,null,"Loading...")));m.displayName="PreviewContent";var b=m;const a=t.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
height: 100%;
|
|
4
|
-
`,
|
|
4
|
+
`,v=t.div`
|
|
5
5
|
position: absolute;
|
|
6
6
|
top: 12px;
|
|
7
7
|
left: 12px;
|
|
8
8
|
z-index: 100;
|
|
9
|
-
`,
|
|
9
|
+
`,x=t(d)`
|
|
10
10
|
[data-component-name='Tooltip/Tooltip'] {
|
|
11
11
|
z-index: 101 !important;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,g=t.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
align-items: center;
|
|
16
16
|
justify-content: center;
|
|
17
17
|
height: 100%;
|
|
18
18
|
font-size: 14px;
|
|
19
19
|
color: #666;
|
|
20
|
-
`;export{
|
|
20
|
+
`;export{b as default};
|
|
@@ -7,6 +7,7 @@ interface PreviewPanelProps {
|
|
|
7
7
|
onTemplateClick: () => void;
|
|
8
8
|
onFileLoad: (content: string, fileName: string) => void;
|
|
9
9
|
onExitFullPreview?: () => void;
|
|
10
|
+
isFullPreview?: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const PreviewPanel: React.FC<PreviewPanelProps>;
|
|
12
13
|
export default PreviewPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import
|
|
1
|
+
import*as e from"react";import f from"./PreviewPanel/PreviewContent";const a=e.memo(({definition:r,rawValue:n,hasStructErrors:o,onTemplateClick:t,onFileLoad:i,onExitFullPreview:l,isFullPreview:m})=>{const d=e.useCallback(c=>{},[]);return e.createElement(f,{definition:r??"",rawValue:n,hasStructErrors:o,onTemplateClick:t,onFileLoad:i,onExitFullPreview:m?l:void 0,onIframeReady:d})});a.displayName="PreviewPanel";var u=a;export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dump as
|
|
1
|
+
import{dump as h,load as s}from"js-yaml";import{downloadFile as c}from"../utils/download";import{defaultOpenapiTemplate as j}from"../templates/defaultOpenapiTemplate";import{useCallback as l}from"react";function S(d){const{setValue:n,setFileName:i,setHasRenderedOnce:e,setValidationErrors:a}=d,p=l((o,t)=>{n(o),i(t),e(!1),a([])},[n,i,e,a]),m=l(()=>{n(j),e(!1),a([])},[n,e,a]),f=l(o=>{let t=o;try{if(o.trim().startsWith("{")){const r=JSON.parse(o);t=h(r)}else s(o),t=o}catch{try{s(o),t=o}catch{alert("Content is not valid JSON or YAML. Cannot convert to YAML for download.");return}}c(t,"openapi.yaml","application/x-yaml")},[]),O=l(o=>{try{const t=s(o);if(typeof t!="object"||t===null)throw new Error("Parsed content is not an object.");const r=JSON.stringify(t,null,2);c(r,"openapi.json","application/json")}catch{alert("Content is not valid YAML/JSON. Cannot convert to JSON for download.")}},[]);return{handleFileLoad:p,handleTemplateClick:m,handleDownloadYaml:f,handleDownloadJson:O}}export{S as useFileOperations};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{useCommunicationManager as o}from"../hooks/useCommunicationManager";import r from"styled-components";import*as e from"react";import{RedoclyOpenAPIDocs as a,safeSlugify as s}from"@redocly/openapi-docs";function
|
|
1
|
+
import{useCommunicationManager as o}from"../hooks/useCommunicationManager";import r from"styled-components";import*as e from"react";import{RedoclyOpenAPIDocs as a,safeSlugify as s}from"@redocly/openapi-docs";import{useThemeManager as f}from"../hooks/useThemeManager";function d(){const[t,i]=e.useState(null);return o({definition:t,safeSlugify:s}),f(),e.useEffect(()=>{window.updateDefinition=n=>{i(n)},window.parent.onReady(window)},[t]),t?e.createElement(l,null,e.createElement(a,{store:{options:{routingBasePath:"/preview",disableRouter:!0,hideSidebar:!0,scrollYOffset:0,hideInfoMetadata:!0,feedback:{hide:!0}},definition:t}})):e.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",fontFamily:"system-ui, -apple-system, sans-serif",color:"#666"}},"No API definition available")}const l=r.div`
|
|
2
2
|
--sidebar-width: 0px;
|
|
3
|
-
`;export{
|
|
3
|
+
`;export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as
|
|
1
|
+
import{useEffect as i,useRef as d,useCallback as a}from"react";const h="manual",f=()=>{const e=d(null),r=a(t=>t.split(" ").filter(Boolean).find(n=>n==="light"||n==="dark")||"light",[]),l=a(()=>{try{const t=window.parent.document.documentElement.className;return r(t)}catch{return"light"}},[r]);return i(()=>{const t=window.useColorSwitcher,s=(()=>{const c=r(document.documentElement.className),n=l();return c!=="light"?c:n})();e.current=s,document.documentElement.className=s,window.useColorSwitcher=()=>({isSwitcherHidden:!0,initActiveColorMode:()=>{e.current&&(document.documentElement.className=e.current)},activeColorMode:e.current||"light"});const o=new MutationObserver(c=>{const n=document.documentElement.className,m=n.includes(h),u=r(n);if(m){e.current=u,document.documentElement.className=u;return}e.current&&u!==e.current&&(document.documentElement.className=e.current)});return o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>{o.disconnect(),t&&(window.useColorSwitcher=t)}},[l,r]),{preservedTheme:e.current}};export{f as useThemeManager};
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface FullPreviewLayoutProps {
|
|
3
|
-
definition: any | null;
|
|
4
|
-
rawValue: string;
|
|
5
|
-
hasRenderedOnce: boolean;
|
|
6
|
-
hasStructErrors: boolean;
|
|
7
|
-
onTemplateClick: () => void;
|
|
8
|
-
onFileLoad: (content: string, fileName: string) => void;
|
|
9
|
-
onExitFullPreview: () => void;
|
|
10
|
-
isClient: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const FullPreviewLayout: React.FC<FullPreviewLayoutProps>;
|
|
13
|
-
export default FullPreviewLayout;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import e from"react";import m from"styled-components";import u from"../PreviewPanel";const d=({definition:r,rawValue:t,hasRenderedOnce:l,hasStructErrors:i,onTemplateClick:a,onFileLoad:n,onExitFullPreview:o,isClient:c})=>e.createElement(v,null,c&&e.createElement(u,{definition:r,rawValue:t,hasRenderedOnce:l,hasStructErrors:i,onTemplateClick:a,onFileLoad:n,onExitFullPreview:o}));var p=d;const v=m.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
height: calc(100vh - var(--navbar-height));
|
|
5
|
-
`;export{p as default};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type * as Monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
3
|
-
interface MainLayoutProps {
|
|
4
|
-
value: string;
|
|
5
|
-
onChange: (value: string | undefined) => void;
|
|
6
|
-
onValidationUpdate: (errors: Monaco.editor.IMarkerData[], value: string | undefined) => void;
|
|
7
|
-
hideWarnings: boolean;
|
|
8
|
-
onHideWarningsChange: (hide: boolean) => void;
|
|
9
|
-
isFullPreview: boolean;
|
|
10
|
-
gotoPosition: {
|
|
11
|
-
line: number;
|
|
12
|
-
column: number;
|
|
13
|
-
} | null;
|
|
14
|
-
parsedErrors: Monaco.editor.IMarkerData[];
|
|
15
|
-
onProblemClick: (line: number, column: number) => void;
|
|
16
|
-
onFileLoad: (content: string, fileName: string) => void;
|
|
17
|
-
onDownloadYaml: () => void;
|
|
18
|
-
onDownloadJson: () => void;
|
|
19
|
-
onToggleFullPreview: () => void;
|
|
20
|
-
definition: any | null;
|
|
21
|
-
rawValue: string;
|
|
22
|
-
hasRenderedOnce: boolean;
|
|
23
|
-
hasStructErrors: boolean;
|
|
24
|
-
onTemplateClick: () => void;
|
|
25
|
-
isClient: boolean;
|
|
26
|
-
}
|
|
27
|
-
declare const MainLayout: React.FC<MainLayoutProps>;
|
|
28
|
-
export default MainLayout;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import e from"react";import r from"styled-components";import{PanelGroup as w,PanelResizeHandle as P}from"react-resizable-panels";import k from"./EditorLayout";import x from"./PreviewLayout";const E=({value:a,onChange:n,onValidationUpdate:l,hideWarnings:i,onHideWarningsChange:t,isFullPreview:c,gotoPosition:s,parsedErrors:d,onProblemClick:h,onFileLoad:o,onDownloadYaml:u,onDownloadJson:m,onToggleFullPreview:g,definition:p,rawValue:v,hasRenderedOnce:b,hasStructErrors:f,onTemplateClick:z,isClient:y})=>e.createElement(C,null,e.createElement(L,{direction:"horizontal"},e.createElement(k,{value:a,onChange:n,onValidationUpdate:l,hideWarnings:i,onHideWarningsChange:t,isFullPreview:c,gotoPosition:s,parsedErrors:d,onProblemClick:h,onFileLoad:o,onDownloadYaml:u,onDownloadJson:m,onToggleFullPreview:g}),e.createElement(P,{className:"resize-handle"}),e.createElement(x,{definition:p,rawValue:v,hasRenderedOnce:b,hasStructErrors:f,onTemplateClick:z,onFileLoad:o,isClient:y})));var V=E;const C=r.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
height: calc(100vh - var(--navbar-height));
|
|
5
|
-
|
|
6
|
-
background-color: var(--bg-color);
|
|
7
|
-
color: var(--text-color-primary);
|
|
8
|
-
|
|
9
|
-
[data-component-name='Layout/PageLayout']:has(&) + div + footer {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
`,L=r(w)`
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-grow: 1;
|
|
15
|
-
height: 100%;
|
|
16
|
-
overflow: visible;
|
|
17
|
-
|
|
18
|
-
.resize-handle {
|
|
19
|
-
width: 4px;
|
|
20
|
-
background-color: var(--border-color-primary);
|
|
21
|
-
cursor: col-resize;
|
|
22
|
-
transition: background-color 0.2s ease;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.resize-handle[data-resize-handle-state="hover"] {
|
|
26
|
-
background-color: var(--color-blue-4);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.resize-handle-horizontal {
|
|
30
|
-
height: 4px;
|
|
31
|
-
background-color: var(--border-color-primary);
|
|
32
|
-
cursor: row-resize;
|
|
33
|
-
transition: background-color 0.2s ease;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.resize-handle-horizontal[data-resize-handle-state="hover"] {
|
|
37
|
-
background-color: var(--color-blue-4);
|
|
38
|
-
}
|
|
39
|
-
`;export{V as default};
|