pxt-core 10.0.2 → 10.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/built/pxtblocks/blockDragger.d.ts +10 -0
- package/built/pxtblocks/breakpointIcon.d.ts +15 -0
- package/built/pxtblocks/builtins/functions.d.ts +2 -0
- package/built/pxtblocks/builtins/lists.d.ts +2 -0
- package/built/pxtblocks/builtins/logic.d.ts +2 -0
- package/built/pxtblocks/builtins/loops.d.ts +2 -0
- package/built/pxtblocks/builtins/math.d.ts +4 -0
- package/built/pxtblocks/builtins/misc.d.ts +1 -0
- package/built/pxtblocks/builtins/text.d.ts +1 -0
- package/built/pxtblocks/builtins/variables.d.ts +1 -0
- package/built/pxtblocks/codecardRenderer.d.ts +5 -0
- package/built/pxtblocks/compiler/compiler.d.ts +8 -0
- package/built/pxtblocks/compiler/environment.d.ts +97 -0
- package/built/pxtblocks/compiler/typeChecker.d.ts +25 -0
- package/built/pxtblocks/compiler/util.d.ts +15 -0
- package/built/pxtblocks/compiler/variables.d.ts +4 -0
- package/built/pxtblocks/composableMutations.d.ts +9 -0
- package/built/pxtblocks/constants.d.ts +4 -0
- package/built/pxtblocks/contextMenu/blockItems.d.ts +2 -0
- package/built/pxtblocks/contextMenu/contextMenu.d.ts +4 -0
- package/built/pxtblocks/contextMenu/index.d.ts +1 -0
- package/built/pxtblocks/contextMenu/workspaceItems.d.ts +2 -0
- package/built/pxtblocks/diff.d.ts +22 -0
- package/built/pxtblocks/external.d.ts +14 -0
- package/built/pxtblocks/fields/fieldEditorRegistry.d.ts +5 -0
- package/built/pxtblocks/fields/field_animation.d.ts +39 -0
- package/built/pxtblocks/fields/field_argumentvariable.d.ts +11 -0
- package/built/pxtblocks/fields/field_asset.d.ts +63 -0
- package/built/pxtblocks/fields/field_autocomplete.d.ts +32 -0
- package/built/pxtblocks/fields/field_base.d.ts +31 -0
- package/built/pxtblocks/fields/field_colorwheel.d.ts +32 -0
- package/built/pxtblocks/fields/field_colour.d.ts +38 -0
- package/built/pxtblocks/fields/field_dropdown.d.ts +5 -0
- package/built/pxtblocks/fields/field_gridpicker.d.ts +109 -0
- package/built/pxtblocks/fields/field_imagedropdown.d.ts +35 -0
- package/built/pxtblocks/fields/field_images.d.ts +20 -0
- package/built/pxtblocks/fields/field_kind.d.ts +12 -0
- package/built/pxtblocks/fields/field_ledmatrix.d.ts +52 -0
- package/built/pxtblocks/fields/field_melodySandbox.d.ts +89 -0
- package/built/pxtblocks/fields/field_musiceditor.d.ts +16 -0
- package/built/pxtblocks/fields/field_note.d.ts +117 -0
- package/built/pxtblocks/fields/field_numberdropdown.d.ts +28 -0
- package/built/pxtblocks/fields/field_position.d.ts +29 -0
- package/built/pxtblocks/fields/field_procedure.d.ts +12 -0
- package/built/pxtblocks/fields/field_protractor.d.ts +27 -0
- package/built/pxtblocks/fields/field_sound_effect.d.ts +37 -0
- package/built/pxtblocks/fields/field_speed.d.ts +32 -0
- package/built/pxtblocks/fields/field_sprite.d.ts +26 -0
- package/built/pxtblocks/fields/field_styledlabel.d.ts +11 -0
- package/built/pxtblocks/fields/field_textdropdown.d.ts +36 -0
- package/built/pxtblocks/fields/field_textinput.d.ts +6 -0
- package/built/pxtblocks/fields/field_tilemap.d.ts +30 -0
- package/built/pxtblocks/fields/field_tileset.d.ts +36 -0
- package/built/pxtblocks/fields/field_toggle.d.ts +48 -0
- package/built/pxtblocks/fields/field_toggle_downup.d.ts +7 -0
- package/built/pxtblocks/fields/field_toggle_highlow.d.ts +7 -0
- package/built/pxtblocks/fields/field_toggle_onoff.d.ts +7 -0
- package/built/pxtblocks/fields/field_toggle_updown.d.ts +7 -0
- package/built/pxtblocks/fields/field_toggle_winlose.d.ts +7 -0
- package/built/pxtblocks/fields/field_toggle_yesno.d.ts +7 -0
- package/built/pxtblocks/fields/field_tsexpression.d.ts +14 -0
- package/built/pxtblocks/fields/field_turnratio.d.ts +29 -0
- package/built/pxtblocks/fields/field_userenum.d.ts +12 -0
- package/built/pxtblocks/fields/field_utils.d.ts +64 -0
- package/built/pxtblocks/fields/index.d.ts +38 -0
- package/built/pxtblocks/help.d.ts +7 -0
- package/built/pxtblocks/importer.d.ts +38 -0
- package/built/pxtblocks/index.d.ts +24 -0
- package/built/pxtblocks/layout.d.ts +35 -0
- package/built/pxtblocks/legacyMutations.d.ts +42 -0
- package/built/pxtblocks/loader.d.ts +47 -0
- package/built/pxtblocks/monkeyPatches/blockSvg.d.ts +1 -0
- package/built/pxtblocks/monkeyPatches/index.d.ts +1 -0
- package/built/pxtblocks/plugins/arrays/createList.d.ts +35 -0
- package/built/pxtblocks/plugins/arrays/index.d.ts +1 -0
- package/built/pxtblocks/plugins/duplicateOnDrag/connectionChecker.d.ts +9 -0
- package/built/pxtblocks/plugins/duplicateOnDrag/duplicateOnDrag.d.ts +6 -0
- package/built/pxtblocks/plugins/duplicateOnDrag/index.d.ts +3 -0
- package/built/pxtblocks/plugins/duplicateOnDrag/variablesGetReporter.d.ts +11 -0
- package/built/pxtblocks/plugins/flyout/index.d.ts +1 -0
- package/built/pxtblocks/plugins/flyout/verticalFlyout.d.ts +51 -0
- package/built/pxtblocks/plugins/functions/blocks/argumentEditorBlocks.d.ts +11 -0
- package/built/pxtblocks/plugins/functions/blocks/argumentReporterBlocks.d.ts +13 -0
- package/built/pxtblocks/plugins/functions/blocks/functionCallBlocks.d.ts +1 -0
- package/built/pxtblocks/plugins/functions/blocks/functionDeclarationBlock.d.ts +17 -0
- package/built/pxtblocks/plugins/functions/blocks/functionDefinitionBlock.d.ts +12 -0
- package/built/pxtblocks/plugins/functions/commonFunctionMixin.d.ts +46 -0
- package/built/pxtblocks/plugins/functions/constants.d.ts +14 -0
- package/built/pxtblocks/plugins/functions/extensions.d.ts +5 -0
- package/built/pxtblocks/plugins/functions/fields/fieldArgumentEditor.d.ts +12 -0
- package/built/pxtblocks/plugins/functions/fields/fieldAutocapitalizeTextInput.d.ts +11 -0
- package/built/pxtblocks/plugins/functions/functionManager.d.ts +16 -0
- package/built/pxtblocks/plugins/functions/index.d.ts +11 -0
- package/built/pxtblocks/plugins/functions/msg.d.ts +21 -0
- package/built/pxtblocks/plugins/functions/svgs.d.ts +3 -0
- package/built/pxtblocks/plugins/functions/utils.d.ts +19 -0
- package/built/pxtblocks/plugins/logic/extensions.d.ts +1 -0
- package/built/pxtblocks/plugins/logic/ifElse.d.ts +59 -0
- package/built/pxtblocks/plugins/logic/index.d.ts +2 -0
- package/built/pxtblocks/plugins/math/fieldSlider.d.ts +21 -0
- package/built/pxtblocks/plugins/math/index.d.ts +2 -0
- package/built/pxtblocks/plugins/math/numberBlocks.d.ts +1 -0
- package/built/pxtblocks/plugins/newVariableField/fieldDropdownMixin.d.ts +2 -0
- package/built/pxtblocks/plugins/newVariableField/fieldVariable.d.ts +12 -0
- package/built/pxtblocks/plugins/newVariableField/index.d.ts +1 -0
- package/built/pxtblocks/plugins/renderer/collapsedInputRow.d.ts +7 -0
- package/built/pxtblocks/plugins/renderer/constants.d.ts +42 -0
- package/built/pxtblocks/plugins/renderer/drawer.d.ts +8 -0
- package/built/pxtblocks/plugins/renderer/index.d.ts +1 -0
- package/built/pxtblocks/plugins/renderer/info.d.ts +15 -0
- package/built/pxtblocks/plugins/renderer/pathObject.d.ts +14 -0
- package/built/pxtblocks/plugins/renderer/renderer.d.ts +16 -0
- package/built/pxtblocks/plugins/text/fieldString.d.ts +15 -0
- package/built/pxtblocks/plugins/text/index.d.ts +3 -0
- package/built/pxtblocks/plugins/text/join.d.ts +24 -0
- package/built/pxtblocks/plugins/text/text.d.ts +1 -0
- package/built/pxtblocks/render.d.ts +25 -0
- package/built/pxtblocks/sourceMap.d.ts +8 -0
- package/built/pxtblocks/toolbox.d.ts +14 -0
- package/built/pxtblocks/xml.d.ts +6 -0
- package/built/react-common/components/Notification.d.ts +18 -0
- package/built/react-common/components/animations/Confetti.d.ts +5 -0
- package/built/react-common/components/controls/Button.d.ts +29 -0
- package/built/react-common/components/controls/Card.d.ts +9 -0
- package/built/react-common/components/controls/Checkbox.d.ts +10 -0
- package/built/react-common/components/controls/DraggableGraph.d.ts +13 -0
- package/built/react-common/components/controls/Dropdown.d.ts +14 -0
- package/built/react-common/components/controls/EditorToggle.d.ts +18 -0
- package/built/react-common/components/controls/EmbedVideo.d.ts +8 -0
- package/built/react-common/components/controls/FocusList.d.ts +16 -0
- package/built/react-common/components/controls/FocusTrap.d.ts +10 -0
- package/built/react-common/components/controls/Input.d.ts +27 -0
- package/built/react-common/components/controls/LazyImage.d.ts +7 -0
- package/built/react-common/components/controls/Link.d.ts +7 -0
- package/built/react-common/components/controls/List.d.ts +4 -0
- package/built/react-common/components/controls/MenuBar.d.ts +4 -0
- package/built/react-common/components/controls/MenuDropdown.d.ts +18 -0
- package/built/react-common/components/controls/Modal.d.ts +25 -0
- package/built/react-common/components/controls/ProgressBar.d.ts +9 -0
- package/built/react-common/components/controls/RadioButtonGroup.d.ts +16 -0
- package/built/react-common/components/controls/TeachingBubble.d.ts +22 -0
- package/built/react-common/components/controls/Textarea.d.ts +18 -0
- package/built/react-common/components/controls/Tree.d.ts +15 -0
- package/built/react-common/components/controls/VerticalResizeContainer.d.ts +10 -0
- package/built/react-common/components/controls/VerticalSlider.d.ts +11 -0
- package/built/react-common/components/extensions/DeleteConfirmationModal.d.ts +6 -0
- package/built/react-common/components/extensions/ExtensionCard.d.ts +12 -0
- package/built/react-common/components/extensions/ImportModal.d.ts +5 -0
- package/built/react-common/components/language/LanguageCard.d.ts +14 -0
- package/built/react-common/components/language/LanguageSelector.d.ts +12 -0
- package/built/react-common/components/palette/ColorPickerField.d.ts +7 -0
- package/built/react-common/components/palette/PaletteEditor.d.ts +6 -0
- package/built/react-common/components/palette/PalettePicker.d.ts +7 -0
- package/built/react-common/components/palette/PaletteSwatch.d.ts +5 -0
- package/built/react-common/components/palette/Palettes.d.ts +18 -0
- package/built/react-common/components/profile/Badge.d.ts +7 -0
- package/built/react-common/components/profile/BadgeInfo.d.ts +6 -0
- package/built/react-common/components/profile/BadgeList.d.ts +6 -0
- package/built/react-common/components/profile/Profile.d.ts +12 -0
- package/built/react-common/components/profile/SignInModal.d.ts +14 -0
- package/built/react-common/components/profile/UserNotification.d.ts +4 -0
- package/built/react-common/components/profile/UserPane.d.ts +12 -0
- package/built/react-common/components/share/Kiosk.d.ts +1 -0
- package/built/react-common/components/share/MultiplayerConfirmation.d.ts +6 -0
- package/built/react-common/components/share/Share.d.ts +27 -0
- package/built/react-common/components/share/ShareInfo.d.ts +17 -0
- package/built/react-common/components/share/SocialButton.d.ts +8 -0
- package/built/react-common/components/share/ThumbnailRecorder.d.ts +25 -0
- package/built/react-common/components/util.d.ts +26 -0
- package/built/target.js +1 -1
- package/built/tests/common/testHost.d.ts +18 -0
- package/built/tests/common/testUtils.d.ts +21 -0
- package/built/tests/compile-test/compilerunner.d.ts +3 -0
- package/built/tests/decompile-test/decompilerunner.d.ts +1 -0
- package/built/tests/errors-test/errorrunner.d.ts +2 -0
- package/built/tests/format-test/formatrunner.d.ts +2 -0
- package/built/tests/helpers-test/helperrunner.d.ts +3 -0
- package/built/tests/language-service/languageservicerunner.d.ts +2 -0
- package/built/tests/pxt-editor-test/editorrunner.d.ts +2 -0
- package/built/tests/pyconverter-test/pyconvertrunner.d.ts +2 -0
- package/built/tests/pydecompile-test/pydecompilerunner.d.ts +2 -0
- package/built/tests/runtime-trace-tests/tracerunner.d.ts +3 -0
- package/built/tests/tutorial-test/tutorialrunner.d.ts +2 -0
- package/built/web/pxtweb.d.ts +31 -0
- package/built/web/teachertool/css/main.35eb3dd4.css +1 -0
- package/built/web/teachertool/js/main.70082f23.js +2 -0
- package/package.json +2 -2
- package/scripts/patchUglifyify.js +2 -1
- package/webapp/public/teachertool.html +1 -1
- package/built/web/teachertool/css/main.4df9c5c6.css +0 -1
- package/built/web/teachertool/js/main.bc2da240.js +0 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function findBlockIdByPosition(sourceMap: pxt.blocks.BlockSourceInterval[], loc: {
|
|
2
|
+
start: number;
|
|
3
|
+
length: number;
|
|
4
|
+
}): string;
|
|
5
|
+
export declare function findBlockIdByLine(sourceMap: pxt.blocks.BlockSourceInterval[], loc: {
|
|
6
|
+
start: number;
|
|
7
|
+
length: number;
|
|
8
|
+
}): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference path="../pxtlib.d.ts" />
|
|
2
|
+
import * as Blockly from "blockly";
|
|
3
|
+
export declare function isArrayType(type: string): string;
|
|
4
|
+
export declare function createShadowValue(info: pxtc.BlocksInfo, p: pxt.blocks.BlockParameter, shadowId?: string, defaultV?: string): Element;
|
|
5
|
+
export declare function createFlyoutHeadingLabel(name: string, color?: string, icon?: string, iconClass?: string): HTMLElement;
|
|
6
|
+
export declare function createFlyoutGroupLabel(name: string, icon?: string, labelLineWidth?: string, helpCallback?: string): HTMLElement;
|
|
7
|
+
export declare function createFlyoutButton(callbackKey: string, label: string): Element;
|
|
8
|
+
export declare function createFlyoutGap(gap: number): Element;
|
|
9
|
+
export declare function createToolboxBlock(info: pxtc.BlocksInfo, fn: pxtc.SymbolInfo, comp: pxt.blocks.BlockCompileInfo): HTMLElement;
|
|
10
|
+
export declare function mkPredicateBlock(type: string): HTMLElement;
|
|
11
|
+
export declare function mkFieldBlock(type: string, fieldName: string, fieldValue: string, isShadow: boolean): HTMLElement;
|
|
12
|
+
export declare function mkVariableFieldBlock(type: string, id: string, typeString: string, name: string, isShadow: boolean): HTMLElement;
|
|
13
|
+
export declare function mkReturnStatementBlock(): HTMLElement;
|
|
14
|
+
export declare function createFunctionsFlyoutCategory(workspace: Blockly.WorkspaceSvg): Element[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference path="../pxtlib.d.ts" />
|
|
2
|
+
export declare function getBlocksWithType(parent: Document | Element, type: string): Element[];
|
|
3
|
+
export declare function getChildrenWithAttr(parent: Document | Element, tag: string, attr: string, value: string): Element[];
|
|
4
|
+
export declare function getFirstChildWithAttr(parent: Document | Element, tag: string, attr: string, value: string): Element;
|
|
5
|
+
export declare function getDirectChildren(parent: Element, tag: string): Element[];
|
|
6
|
+
export declare function cleanOuterHTML(el: HTMLElement): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface NotificationOptions {
|
|
3
|
+
kind?: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
hc?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface NotificationState {
|
|
8
|
+
notifications?: pxt.Map<NotificationOptions>;
|
|
9
|
+
}
|
|
10
|
+
export interface NotificationProps {
|
|
11
|
+
}
|
|
12
|
+
export declare class Notification extends React.Component<NotificationProps, NotificationState> {
|
|
13
|
+
constructor(props?: NotificationProps);
|
|
14
|
+
push(notification: NotificationOptions): void;
|
|
15
|
+
remove(id: string): void;
|
|
16
|
+
render(): JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export declare function pushNotificationMessage(options: NotificationOptions): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ContainerProps } from "../util";
|
|
3
|
+
export interface ButtonViewProps extends ContainerProps {
|
|
4
|
+
buttonRef?: (ref: HTMLButtonElement) => void;
|
|
5
|
+
title: string;
|
|
6
|
+
label?: string | JSX.Element;
|
|
7
|
+
leftIcon?: string;
|
|
8
|
+
rightIcon?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
hardDisabled?: boolean;
|
|
11
|
+
href?: string;
|
|
12
|
+
target?: string;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
/** Miscellaneous aria pass-through props */
|
|
16
|
+
ariaControls?: string;
|
|
17
|
+
ariaExpanded?: boolean;
|
|
18
|
+
ariaHasPopup?: string;
|
|
19
|
+
ariaPosInSet?: number;
|
|
20
|
+
ariaSetSize?: number;
|
|
21
|
+
ariaSelected?: boolean;
|
|
22
|
+
ariaPressed?: boolean | "mixed";
|
|
23
|
+
}
|
|
24
|
+
export interface ButtonProps extends ButtonViewProps {
|
|
25
|
+
onClick: () => void;
|
|
26
|
+
onBlur?: () => void;
|
|
27
|
+
onKeydown?: (e: React.KeyboardEvent) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const Button: (props: ButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContainerProps } from "../util";
|
|
2
|
+
export interface CardProps extends ContainerProps {
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
tabIndex?: number;
|
|
5
|
+
ariaLabelledBy?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
labelClass?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Card: (props: CardProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ControlProps } from "../util";
|
|
3
|
+
interface CheckboxProps extends ControlProps {
|
|
4
|
+
id: string;
|
|
5
|
+
isChecked: boolean;
|
|
6
|
+
onChange: (newValue: boolean) => void;
|
|
7
|
+
label?: string | JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export declare const Checkbox: (props: CheckboxProps) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlProps } from "../util";
|
|
2
|
+
export interface DraggableGraphProps extends ControlProps {
|
|
3
|
+
interpolation: pxt.assets.SoundInterpolation;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
squiggly?: boolean;
|
|
7
|
+
valueUnits?: string;
|
|
8
|
+
aspectRatio: number;
|
|
9
|
+
onPointChange: (index: number, newValue: number) => void;
|
|
10
|
+
points: number[];
|
|
11
|
+
handleStartAnimationRef?: (startAnimation: (duration: number) => void) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const DraggableGraph: (props: DraggableGraphProps) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ControlProps } from "../util";
|
|
2
|
+
import { ButtonViewProps } from "./Button";
|
|
3
|
+
export interface DropdownItem extends ButtonViewProps {
|
|
4
|
+
id: string;
|
|
5
|
+
role?: "option" | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface DropdownProps extends ControlProps {
|
|
8
|
+
id: string;
|
|
9
|
+
selectedId: string;
|
|
10
|
+
items: DropdownItem[];
|
|
11
|
+
onItemSelected: (id: string) => void;
|
|
12
|
+
tabIndex?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const Dropdown: (props: DropdownProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ControlProps } from "../util";
|
|
2
|
+
export interface EditorToggleProps extends ControlProps {
|
|
3
|
+
items: EditorToggleItem[];
|
|
4
|
+
selected: number;
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export declare type EditorToggleItem = BasicEditorToggleItem | DropdownEditorToggleItem;
|
|
8
|
+
export interface BasicEditorToggleItem {
|
|
9
|
+
label: string;
|
|
10
|
+
title: string;
|
|
11
|
+
focusable: boolean;
|
|
12
|
+
icon?: string;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface DropdownEditorToggleItem extends BasicEditorToggleItem {
|
|
16
|
+
items: BasicEditorToggleItem[];
|
|
17
|
+
}
|
|
18
|
+
export declare const EditorToggle: (props: EditorToggleProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ControlProps } from "../util";
|
|
2
|
+
export interface EmbedVideoProps extends ControlProps {
|
|
3
|
+
src: "youtube" | "azuremedia";
|
|
4
|
+
id: string;
|
|
5
|
+
autoplay?: boolean;
|
|
6
|
+
allowFullScreen?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const EmbedVideo: (props: EmbedVideoProps) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ContainerProps } from "../util";
|
|
2
|
+
export interface FocusListProps extends ContainerProps {
|
|
3
|
+
role: string;
|
|
4
|
+
childTabStopId?: string;
|
|
5
|
+
useUpAndDownArrowKeys?: boolean;
|
|
6
|
+
onItemReceivedFocus?: (item: HTMLElement) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A list of focusable items that represents a single tab stop in the tab order. The
|
|
10
|
+
* children of the list can be navigated between using the arrow keys. Any child with
|
|
11
|
+
* a tabindex other than -1 will be included in the list.
|
|
12
|
+
*
|
|
13
|
+
* If childTabStopId is specified, then the tab stop will be placed on the child with
|
|
14
|
+
* the given id instead of the outer div.
|
|
15
|
+
*/
|
|
16
|
+
export declare const FocusList: (props: FocusListProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface FocusTrapProps extends React.PropsWithChildren<{}> {
|
|
3
|
+
onEscape: () => void;
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
arrowKeyNavigation?: boolean;
|
|
7
|
+
dontStealFocus?: boolean;
|
|
8
|
+
includeOutsideTabOrder?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const FocusTrap: (props: FocusTrapProps) => JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ControlProps } from "../util";
|
|
3
|
+
export interface InputProps extends ControlProps {
|
|
4
|
+
inputClassName?: string;
|
|
5
|
+
groupClassName?: string;
|
|
6
|
+
initialValue?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
iconTitle?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
type?: string;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
autoComplete?: boolean;
|
|
16
|
+
selectOnClick?: boolean;
|
|
17
|
+
treatSpaceAsEnter?: boolean;
|
|
18
|
+
handleInputRef?: React.RefObject<HTMLInputElement> | ((ref: HTMLInputElement) => void);
|
|
19
|
+
preserveValueOnBlur?: boolean;
|
|
20
|
+
options?: pxt.Map<string>;
|
|
21
|
+
onChange?: (newValue: string) => void;
|
|
22
|
+
onEnterKey?: (value: string) => void;
|
|
23
|
+
onIconClick?: (value: string) => void;
|
|
24
|
+
onBlur?: (value: string) => void;
|
|
25
|
+
onOptionSelected?: (value: string) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const Input: (props: InputProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ControlProps } from "../util";
|
|
3
|
+
import { ButtonProps } from "./Button";
|
|
4
|
+
export interface MenuItem extends ButtonProps {
|
|
5
|
+
role?: "menuitem" | undefined;
|
|
6
|
+
ariaPosInSet?: undefined;
|
|
7
|
+
ariaSetSize?: undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface MenuDropdownProps extends ControlProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
items: MenuItem[];
|
|
12
|
+
label?: string | JSX.Element;
|
|
13
|
+
title: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
tabIndex?: number;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const MenuDropdown: (props: MenuDropdownProps) => JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ContainerProps } from "../util";
|
|
3
|
+
export interface ModalAction {
|
|
4
|
+
label: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
icon?: string;
|
|
8
|
+
xicon?: boolean;
|
|
9
|
+
leftIcon?: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
url?: string;
|
|
12
|
+
fullscreen?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ModalProps extends ContainerProps {
|
|
15
|
+
title: string;
|
|
16
|
+
leftIcon?: string;
|
|
17
|
+
helpUrl?: string;
|
|
18
|
+
ariaDescribedBy?: string;
|
|
19
|
+
actions?: ModalAction[];
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
fullscreen?: boolean;
|
|
22
|
+
parentElement?: Element;
|
|
23
|
+
hideDismissButton?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const Modal: (props: ModalProps) => React.ReactPortal;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ControlProps } from "../util";
|
|
2
|
+
export interface ProgressBarProps extends ControlProps {
|
|
3
|
+
value: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
title?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
ariaValueText?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ProgressBar: (props: ProgressBarProps) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ControlProps } from "../util";
|
|
3
|
+
export interface RadioButtonGroupProps extends ControlProps {
|
|
4
|
+
id: string;
|
|
5
|
+
choices: RadioGroupChoice[];
|
|
6
|
+
selectedId: string;
|
|
7
|
+
onChoiceSelected: (id: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface RadioGroupChoice {
|
|
10
|
+
title: string;
|
|
11
|
+
id: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
icon?: string;
|
|
14
|
+
label?: string | JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export declare const RadioButtonGroup: (props: RadioButtonGroupProps) => JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ContainerProps } from "../util";
|
|
3
|
+
export interface CutoutBounds {
|
|
4
|
+
top: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TeachingBubbleProps extends ContainerProps {
|
|
12
|
+
targetContent: pxt.tour.BubbleStep;
|
|
13
|
+
stepNumber: number;
|
|
14
|
+
totalSteps: number;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
parentElement?: Element;
|
|
17
|
+
activeTarget?: boolean;
|
|
18
|
+
onNext: () => void;
|
|
19
|
+
onBack: () => void;
|
|
20
|
+
onFinish: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const TeachingBubble: (props: TeachingBubbleProps) => React.ReactPortal;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ControlProps } from "../util";
|
|
2
|
+
export interface TextareaProps extends ControlProps {
|
|
3
|
+
initialValue?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
autoComplete?: boolean;
|
|
8
|
+
cols?: number;
|
|
9
|
+
rows?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
minLength?: number;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
resize?: "both" | "horizontal" | "vertical";
|
|
14
|
+
wrap?: "hard" | "soft" | "off";
|
|
15
|
+
onChange?: (newValue: string) => void;
|
|
16
|
+
onEnterKey?: (value: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const Textarea: (props: TextareaProps) => JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContainerProps } from "../util";
|
|
2
|
+
export interface TreeProps extends ContainerProps {
|
|
3
|
+
role?: "tree" | "group";
|
|
4
|
+
}
|
|
5
|
+
export interface TreeItemProps extends ContainerProps {
|
|
6
|
+
role?: "treeitem";
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
initiallyExpanded?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TreeItemBodyProps extends ContainerProps {
|
|
12
|
+
}
|
|
13
|
+
export declare const Tree: (props: TreeProps) => JSX.Element;
|
|
14
|
+
export declare const TreeItem: (props: TreeItemProps) => JSX.Element;
|
|
15
|
+
export declare const TreeItemBody: (props: TreeItemBodyProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContainerProps } from "../util";
|
|
2
|
+
export interface VerticalResizeContainerProps extends ContainerProps {
|
|
3
|
+
minHeight?: string;
|
|
4
|
+
maxHeight?: string;
|
|
5
|
+
initialHeight?: string;
|
|
6
|
+
resizeEnabled?: boolean;
|
|
7
|
+
onResizeDrag?: (newSize: number) => void;
|
|
8
|
+
onResizeEnd?: (newSize: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const VerticalResizeContainer: (props: VerticalResizeContainerProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ControlProps } from "../util";
|
|
2
|
+
export interface VerticalSliderProps extends ControlProps {
|
|
3
|
+
value: number;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
step: number;
|
|
7
|
+
bigStep?: number;
|
|
8
|
+
onValueChanged: (newValue: number) => void;
|
|
9
|
+
ariaValueText: string | ((value: number) => string);
|
|
10
|
+
}
|
|
11
|
+
export declare const VerticalSlider: (props: VerticalSliderProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ExtensionCardProps<U> {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
imageUrl?: string;
|
|
5
|
+
learnMoreUrl?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
onClick?: (value: U) => void;
|
|
8
|
+
extension?: U;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
showDisclaimer?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const ExtensionCard: <U>(props: ExtensionCardProps<U>) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface LanguageCardProps {
|
|
3
|
+
langId: string;
|
|
4
|
+
name: string;
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
description: string;
|
|
7
|
+
onClick: (langId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class LanguageCard extends React.Component<LanguageCardProps> {
|
|
10
|
+
constructor(props: LanguageCardProps);
|
|
11
|
+
handleClick(): void;
|
|
12
|
+
render(): JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface LanguageSelectorProps {
|
|
3
|
+
onLanguageChanged: (newLang: string) => void;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class LanguageSelector extends React.Component<LanguageSelectorProps> {
|
|
7
|
+
constructor(props: LanguageSelectorProps);
|
|
8
|
+
languageList(): string[];
|
|
9
|
+
changeLanguage(newLang: string): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface Palette {
|
|
2
|
+
name: string;
|
|
3
|
+
id: string;
|
|
4
|
+
colors: string[];
|
|
5
|
+
custom?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const Adafruit: Palette;
|
|
8
|
+
export declare const Pastel: Palette;
|
|
9
|
+
export declare const Matte: Palette;
|
|
10
|
+
export declare const Grayscale: Palette;
|
|
11
|
+
export declare const Poke: Palette;
|
|
12
|
+
export declare const DIY: Palette;
|
|
13
|
+
export declare const StillLife: Palette;
|
|
14
|
+
export declare const SteamPunk: Palette;
|
|
15
|
+
export declare const Sweet: Palette;
|
|
16
|
+
export declare const Adventure: Palette;
|
|
17
|
+
export declare const Arcade: Palette;
|
|
18
|
+
export declare const AllPalettes: Palette[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference path="../../../../react-common/components/types.d.ts" />
|
|
2
|
+
import { CheckboxStatus } from "../util";
|
|
3
|
+
export interface ProfileProps {
|
|
4
|
+
user: pxt.auth.UserState;
|
|
5
|
+
signOut: () => void;
|
|
6
|
+
deleteProfile: () => void;
|
|
7
|
+
checkedEmail: CheckboxStatus;
|
|
8
|
+
onClickedEmail: (isChecked: boolean) => void;
|
|
9
|
+
notification?: pxt.ProfileNotification;
|
|
10
|
+
showModalAsync(options: DialogOptions): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare const Profile: (props: ProfileProps) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference path="../../../../react-common/components/types.d.ts" />
|
|
2
|
+
export interface SignInModalProps {
|
|
3
|
+
onSignIn: (provider: pxt.AppCloudProvider, rememberMe: boolean) => Promise<void>;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
hideDismissButton?: boolean;
|
|
6
|
+
appMessage?: string;
|
|
7
|
+
dialogMessages?: {
|
|
8
|
+
signInMessage?: string;
|
|
9
|
+
signUpMessage?: string;
|
|
10
|
+
};
|
|
11
|
+
resolvePath?: (path: string) => string;
|
|
12
|
+
mode?: "signin" | "signup";
|
|
13
|
+
}
|
|
14
|
+
export declare const SignInModal: (props: SignInModalProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference path="../../../../react-common/components/types.d.ts" />
|
|
2
|
+
/// <reference path="../../../../localtypings/react.d.ts" />
|
|
3
|
+
import { CheckboxStatus } from "../util";
|
|
4
|
+
export interface UserPaneProps {
|
|
5
|
+
profile: pxt.auth.UserProfile;
|
|
6
|
+
notification?: pxt.ProfileNotification;
|
|
7
|
+
emailChecked: CheckboxStatus;
|
|
8
|
+
onSignOutClick: () => void;
|
|
9
|
+
onDeleteProfileClick: () => void;
|
|
10
|
+
onEmailCheckClick: (isChecked: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const UserPane: (props: UserPaneProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const addGameToKioskAsync: (kioskId: string, gameId: string) => Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference path="../../../../react-common/components/types.d.ts" />
|
|
2
|
+
export interface MultiplayerConfirmationProps {
|
|
3
|
+
onCancelClicked: () => void;
|
|
4
|
+
onConfirmClicked: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const MultiplayerConfirmation: (props: MultiplayerConfirmationProps) => JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference path="../../../../react-common/components/types.d.ts" />
|
|
2
|
+
import { SimRecorder } from "./ThumbnailRecorder";
|
|
3
|
+
export interface ShareData {
|
|
4
|
+
url: string;
|
|
5
|
+
embed: {
|
|
6
|
+
code?: string;
|
|
7
|
+
editor?: string;
|
|
8
|
+
simulator?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
};
|
|
11
|
+
qr?: string;
|
|
12
|
+
error?: any;
|
|
13
|
+
}
|
|
14
|
+
export interface ShareProps {
|
|
15
|
+
projectName: string;
|
|
16
|
+
screenshotUri?: string;
|
|
17
|
+
isLoggedIn?: boolean;
|
|
18
|
+
hasProjectBeenPersistentShared?: boolean;
|
|
19
|
+
anonymousShareByDefault?: boolean;
|
|
20
|
+
isMultiplayerGame?: boolean;
|
|
21
|
+
kind?: "multiplayer" | "vscode" | "share";
|
|
22
|
+
setAnonymousSharePreference?: (anonymousByDefault: boolean) => void;
|
|
23
|
+
simRecorder: SimRecorder;
|
|
24
|
+
publishAsync: (name: string, screenshotUri?: string, forceAnonymous?: boolean) => Promise<ShareData>;
|
|
25
|
+
onClose: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const Share: (props: ShareProps) => JSX.Element;
|