@seedgrid/fe-playground 0.1.0

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 ADDED
@@ -0,0 +1,17 @@
1
+ # @seedgrid/fe-playground
2
+
3
+ Pacote separado para o `SgPlayground`, com editor + preview baseado em Sandpack.
4
+
5
+ ## Instalacao
6
+
7
+ ```bash
8
+ pnpm add @seedgrid/fe-playground @seedgrid/fe-components
9
+ ```
10
+
11
+ ## Uso rapido
12
+
13
+ ```tsx
14
+ import { SgPlayground } from "@seedgrid/fe-playground";
15
+
16
+ <SgPlayground code={`<div>Hello</div>`} />;
17
+ ```
@@ -0,0 +1,38 @@
1
+ import * as React from "react";
2
+ export type SgPlaygroundProps = {
3
+ code: string;
4
+ interactive?: boolean;
5
+ codeContract?: "renderBody" | "appFile";
6
+ preset?: SgPlaygroundPreset;
7
+ title?: string;
8
+ description?: string;
9
+ height?: number | string;
10
+ expandedHeight?: number | string;
11
+ expandable?: boolean;
12
+ resizable?: boolean;
13
+ resizeAxis?: "vertical" | "horizontal" | "both";
14
+ previewPadding?: number | string;
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ dependencies?: Record<string, string>;
18
+ defaultImports?: string;
19
+ previewWrapperClassName?: string;
20
+ seedgridDependency?: string;
21
+ bundlerURL?: string;
22
+ bundlerTimeoutMs?: number;
23
+ npmRegistries?: SgPlaygroundNpmRegistry[];
24
+ withCard?: boolean;
25
+ collapsible?: boolean;
26
+ defaultOpen?: boolean;
27
+ cardId?: string;
28
+ };
29
+ export type SgPlaygroundPreset = "auto" | "basic" | "seedgrid" | "editor" | "full";
30
+ export type SgPlaygroundNpmRegistry = {
31
+ enabledScopes: string[];
32
+ limitToScopes: boolean;
33
+ registryUrl: string;
34
+ proxyEnabled: boolean;
35
+ registryAuthToken?: string;
36
+ };
37
+ export default function SgPlayground(props: Readonly<SgPlaygroundProps>): import("react/jsx-runtime").JSX.Element;
38
+ //# sourceMappingURL=Sg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