@codecademy/codebytes 1.0.4-alpha.8d0a0395a.0 → 1.0.4-alpha.e5dc1d5e0.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.
@@ -1,32 +1,32 @@
1
- export declare const syntax: {
2
- attribute: "#b4d353";
3
- annotation: "#ea6c8b";
4
- atom: "#cc7bc2";
5
- basic: "#ffffff";
6
- comment: "#939598";
7
- constant: "#ff8973";
8
- decoration: "#ea6c8b";
9
- invalid: "#ea6c8b";
10
- key: "#83fff5";
11
- keyword: "#b3ccff";
12
- number: "#ea6c8b";
13
- operator: "#ea6c8b";
14
- predefined: "#ffffff";
15
- property: "#ea6c8b";
16
- regexp: "#b4d353";
17
- string: "#ffe083";
18
- tag: "#ea6c8b";
19
- text: "#ff8973";
20
- value: "#ffe083";
21
- variable: "#b4d353";
22
- };
23
- export declare const ui: {
24
- background: string;
25
- text: "#ffffff";
26
- indent: {
27
- active: string;
28
- inactive: string;
29
- };
30
- };
31
- export declare type SyntaxColors = typeof syntax;
32
- export declare type UIColors = typeof ui;
1
+ export declare const syntax: {
2
+ attribute: "#b4d353";
3
+ annotation: "#ea6c8b";
4
+ atom: "#cc7bc2";
5
+ basic: "#ffffff";
6
+ comment: "#939598";
7
+ constant: "#ff8973";
8
+ decoration: "#ea6c8b";
9
+ invalid: "#ea6c8b";
10
+ key: "#83fff5";
11
+ keyword: "#b3ccff";
12
+ number: "#ea6c8b";
13
+ operator: "#ea6c8b";
14
+ predefined: "#ffffff";
15
+ property: "#ea6c8b";
16
+ regexp: "#b4d353";
17
+ string: "#ffe083";
18
+ tag: "#ea6c8b";
19
+ text: "#ff8973";
20
+ value: "#ffe083";
21
+ variable: "#b4d353";
22
+ };
23
+ export declare const ui: {
24
+ background: string;
25
+ text: "#ffffff";
26
+ indent: {
27
+ active: string;
28
+ inactive: string;
29
+ };
30
+ };
31
+ export declare type SyntaxColors = typeof syntax;
32
+ export declare type UIColors = typeof ui;
@@ -1,8 +1,8 @@
1
- import { EditorProps } from '@monaco-editor/react';
2
- import React from 'react';
3
- export declare type SimpleMonacoEditorProps = {
4
- value: string;
5
- language: string;
6
- onChange?: EditorProps['onChange'];
7
- };
8
- export declare const SimpleMonacoEditor: React.FC<SimpleMonacoEditorProps>;
1
+ import { EditorProps } from '@monaco-editor/react';
2
+ import React from 'react';
3
+ export declare type SimpleMonacoEditorProps = {
4
+ value: string;
5
+ language: string;
6
+ onChange?: EditorProps['onChange'];
7
+ };
8
+ export declare const SimpleMonacoEditor: React.FC<SimpleMonacoEditorProps>;
@@ -1,2 +1,2 @@
1
- import type * as monaco from 'monaco-editor';
2
- export declare const dark: monaco.editor.IStandaloneThemeData;
1
+ import type * as monaco from 'monaco-editor';
2
+ export declare const dark: monaco.editor.IStandaloneThemeData;
@@ -1 +1 @@
1
- export declare type Monaco = typeof import('monaco-editor');
1
+ export declare type Monaco = typeof import('monaco-editor');
package/dist/api.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import type { LanguageOption } from './consts';
2
- interface Response {
3
- stderr: string;
4
- stdout: string;
5
- exit_code: number;
6
- }
7
- interface PostSnippetData {
8
- language: LanguageOption;
9
- code: string;
10
- }
11
- export declare const postSnippet: (data: PostSnippetData, snippetsBaseUrl?: string | undefined) => Promise<Response>;
12
- export {};
1
+ import type { LanguageOption } from './consts';
2
+ interface Response {
3
+ stderr: string;
4
+ stdout: string;
5
+ exit_code: number;
6
+ }
7
+ interface PostSnippetData {
8
+ language: LanguageOption;
9
+ code: string;
10
+ }
11
+ export declare const postSnippet: (data: PostSnippetData, snippetsBaseUrl?: string | undefined) => Promise<Response>;
12
+ export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { CodeByteEditorProps } from './types';
3
- export declare const CodeByteEditor: React.FC<CodeByteEditorProps>;
4
- export default CodeByteEditor;
1
+ import React from 'react';
2
+ import { CodeByteEditorProps } from './types';
3
+ export declare const CodeByteEditor: React.FC<CodeByteEditorProps>;
4
+ export default CodeByteEditor;
package/dist/consts.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- export declare const LanguageOptions: {
2
- '': string;
3
- cpp: string;
4
- csharp: string;
5
- golang: string;
6
- javascript: string;
7
- php: string;
8
- python: string;
9
- ruby: string;
10
- scheme: string;
11
- };
12
- export declare type LanguageOption = keyof typeof LanguageOptions;
13
- export declare const validLanguages: ("cpp" | "csharp" | "golang" | "javascript" | "php" | "python" | "ruby" | "scheme")[];
14
- export declare const helloWorld: {
15
- readonly cpp: "#include <iostream>\nint main() {\n std::cout << \"Hello world!\";\n return 0;\n}";
16
- readonly csharp: "namespace HelloWorld {\n class Hello {\n static void Main(string[] args) {\n System.Console.WriteLine(\"Hello world!\");\n }\n }\n}";
17
- readonly golang: "package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello world!\")\n}";
18
- readonly javascript: "console.log('Hello world!');";
19
- readonly php: "<?php\n echo \"Hello world!\";\n?>";
20
- readonly python: "print('Hello world!')";
21
- readonly ruby: "puts \"Hello world!\"";
22
- readonly scheme: "(begin\n (display \"Hello world!\")\n (newline))";
23
- };
1
+ export declare const LanguageOptions: {
2
+ '': string;
3
+ cpp: string;
4
+ csharp: string;
5
+ golang: string;
6
+ javascript: string;
7
+ php: string;
8
+ python: string;
9
+ ruby: string;
10
+ scheme: string;
11
+ };
12
+ export declare type LanguageOption = keyof typeof LanguageOptions;
13
+ export declare const validLanguages: ("cpp" | "csharp" | "golang" | "javascript" | "php" | "python" | "ruby" | "scheme")[];
14
+ export declare const helloWorld: {
15
+ readonly cpp: "#include <iostream>\nint main() {\n std::cout << \"Hello world!\";\n return 0;\n}";
16
+ readonly csharp: "namespace HelloWorld {\n class Hello {\n static void Main(string[] args) {\n System.Console.WriteLine(\"Hello world!\");\n }\n }\n}";
17
+ readonly golang: "package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello world!\")\n}";
18
+ readonly javascript: "console.log('Hello world!');";
19
+ readonly php: "<?php\n echo \"Hello world!\";\n?>";
20
+ readonly python: "print('Hello world!')";
21
+ readonly ruby: "puts \"Hello world!\"";
22
+ readonly scheme: "(begin\n (display \"Hello world!\")\n (newline))";
23
+ };
package/dist/drawers.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- export declare type DrawersProps = {
3
- leftChild: React.ReactNode;
4
- rightChild: React.ReactNode;
5
- };
6
- export declare const Drawers: React.FC<DrawersProps>;
1
+ import React from 'react';
2
+ export declare type DrawersProps = {
3
+ leftChild: React.ReactNode;
4
+ rightChild: React.ReactNode;
5
+ };
6
+ export declare const Drawers: React.FC<DrawersProps>;
package/dist/editor.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import { UserClickData } from '@codecademy/tracking';
2
- import React from 'react';
3
- import type { LanguageOption } from './consts';
4
- import { CodebytesCopyFormatter } from './types';
5
- declare type EditorProps = {
6
- hideCopyButton: boolean;
7
- language: LanguageOption;
8
- text: string;
9
- onChange: (text: string) => void;
10
- snippetsBaseUrl?: string;
11
- copyFormatter?: CodebytesCopyFormatter;
12
- trackingData?: Omit<UserClickData, 'target'>;
13
- };
14
- export declare const Editor: React.FC<EditorProps>;
15
- export {};
1
+ import { UserClickData } from '@codecademy/tracking';
2
+ import React from 'react';
3
+ import type { LanguageOption } from './consts';
4
+ import { CodebytesCopyFormatter } from './types';
5
+ declare type EditorProps = {
6
+ hideCopyButton: boolean;
7
+ language: LanguageOption;
8
+ text: string;
9
+ onChange: (text: string) => void;
10
+ snippetsBaseUrl?: string;
11
+ copyFormatter?: CodebytesCopyFormatter;
12
+ trackingData?: Omit<UserClickData, 'target'>;
13
+ };
14
+ export declare const Editor: React.FC<EditorProps>;
15
+ export {};
@@ -1,2 +1,2 @@
1
- import { UserClickData } from '@codecademy/tracking';
2
- export declare const trackClick: (target: string, trackingData?: Omit<UserClickData, "target"> | undefined) => void;
1
+ import { UserClickData } from '@codecademy/tracking';
2
+ export declare const trackClick: (target: string, trackingData?: Omit<UserClickData, "target"> | undefined) => void;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- export declare const useEverInView: (rootMargin?: string, threshold?: number) => {
3
- everInView: boolean;
4
- ref: import("react").MutableRefObject<null>;
5
- };
1
+ /// <reference types="react" />
2
+ export declare const useEverInView: (rootMargin?: string, threshold?: number) => {
3
+ everInView: boolean;
4
+ ref: import("react").MutableRefObject<null>;
5
+ };
@@ -1,2 +1,2 @@
1
- import { RefObject } from 'react';
2
- export declare const useIntersection: (ref: RefObject<HTMLElement>, options: IntersectionObserverInit) => IntersectionObserverEntry | null;
1
+ import { RefObject } from 'react';
2
+ export declare const useIntersection: (ref: RefObject<HTMLElement>, options: IntersectionObserverInit) => IntersectionObserverEntry | null;