@codespark/react 1.0.3 → 1.0.4
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/index.d.ts +6 -6
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Framework, Output } from "@codespark/framework";
|
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { ComponentProps, ComponentType, JSX, ReactElement, ReactNode, RefObject } from "react";
|
|
4
4
|
import { LoaderType } from "@codespark/framework/loaders";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
import { Tabs } from "radix-ui";
|
|
7
7
|
import { ReactCodeMirrorProps, ReactCodeMirrorRef } from "@uiw/react-codemirror";
|
|
8
8
|
import { EditorProps } from "@monaco-editor/react";
|
|
@@ -340,7 +340,7 @@ interface CodesparkContextValue extends ConfigContextValue, WorkspaceDerivedStat
|
|
|
340
340
|
interface ConfigProviderProps extends ConfigContextValue {
|
|
341
341
|
children?: ReactNode;
|
|
342
342
|
}
|
|
343
|
-
declare function ConfigProvider(props: ConfigProviderProps):
|
|
343
|
+
declare function ConfigProvider(props: ConfigProviderProps): react_jsx_runtime0.JSX.Element;
|
|
344
344
|
interface CodesparkProviderProps extends Omit<CodesparkContextValue, 'files' | 'currentFile' | keyof WorkspaceDerivedState> {
|
|
345
345
|
children?: ReactNode;
|
|
346
346
|
}
|
|
@@ -351,7 +351,7 @@ interface CodesparkProviderProps extends Omit<CodesparkContextValue, 'files' | '
|
|
|
351
351
|
* Required when using CodesparkEditor, CodesparkPreview, or CodesparkFileExplorer independently.
|
|
352
352
|
* Automatically manages workspace state synchronization across all child components.
|
|
353
353
|
*/
|
|
354
|
-
declare function CodesparkProvider(props: CodesparkProviderProps):
|
|
354
|
+
declare function CodesparkProvider(props: CodesparkProviderProps): react_jsx_runtime0.JSX.Element;
|
|
355
355
|
//#endregion
|
|
356
356
|
//#region src/components/editor/index.d.ts
|
|
357
357
|
type ToolboxItemId = 'reset' | 'format' | 'copy';
|
|
@@ -500,13 +500,13 @@ interface CodesparkPreviewProps extends ConfigContextValue, Pick<WorkspaceInit,
|
|
|
500
500
|
* Supports Tailwind CSS, custom scripts/styles injection, and console output capture.
|
|
501
501
|
* Displays a loading indicator during code compilation and execution.
|
|
502
502
|
*/
|
|
503
|
-
declare function CodesparkPreview(props: CodesparkPreviewProps):
|
|
503
|
+
declare function CodesparkPreview(props: CodesparkPreviewProps): react_jsx_runtime0.JSX.Element;
|
|
504
504
|
//#endregion
|
|
505
505
|
//#region src/ui/tabs.d.ts
|
|
506
506
|
declare function Tabs$1({
|
|
507
507
|
className,
|
|
508
508
|
...props
|
|
509
|
-
}: React$1.ComponentProps<typeof Tabs.Root>):
|
|
509
|
+
}: React$1.ComponentProps<typeof Tabs.Root>): react_jsx_runtime0.JSX.Element;
|
|
510
510
|
//#endregion
|
|
511
511
|
//#region src/components/file-explorer/index.d.ts
|
|
512
512
|
interface FileExplorerItemRenderContext {
|
|
@@ -714,7 +714,7 @@ interface CodesparkProps extends Pick<ConfigContextValue, 'theme'>, Pick<Codespa
|
|
|
714
714
|
* to provide a complete interactive code demonstration experience.
|
|
715
715
|
* Supports both single-file mode (via `code` prop) and multi-file mode (via `files` prop).
|
|
716
716
|
*/
|
|
717
|
-
declare function Codespark(props: CodesparkProps):
|
|
717
|
+
declare function Codespark(props: CodesparkProps): react_jsx_runtime0.JSX.Element;
|
|
718
718
|
declare const useMDXComponents: () => {
|
|
719
719
|
Codespark: typeof Codespark;
|
|
720
720
|
CodesparkEditor: typeof CodesparkEditor;
|
package/dist/index.js
CHANGED
|
@@ -1577,7 +1577,7 @@ function useTailwindCSS() {
|
|
|
1577
1577
|
const PREFLIGHT_STYLE = `
|
|
1578
1578
|
:root {
|
|
1579
1579
|
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
1580
|
-
font-size:
|
|
1580
|
+
font-size: 16px;
|
|
1581
1581
|
line-height: 1.5;
|
|
1582
1582
|
font-synthesis: none;
|
|
1583
1583
|
text-rendering: optimizeLegibility;
|
|
@@ -1600,6 +1600,7 @@ html {
|
|
|
1600
1600
|
body {
|
|
1601
1601
|
height: 100%;
|
|
1602
1602
|
padding: 12px;
|
|
1603
|
+
font-size: 14px;
|
|
1603
1604
|
overflow: auto;
|
|
1604
1605
|
box-sizing: border-box;
|
|
1605
1606
|
display: flex;
|