repo_id
stringclasses
563 values
file_path
stringlengths
40
166
content
stringlengths
1
2.94M
__index_level_0__
int64
0
0
solana_public_repos/solana-playground/solana-playground/vscode
solana_public_repos/solana-playground/solana-playground/vscode/.vscode/tasks.json
// See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format { "version": "2.0.0", "tasks": [ { "type": "npm", "script": "watch", "problemMatcher": "$ts-webpack-watch", "isBackground": true, "presentation": { "reveal": "never", "group": "watchers"...
0
solana_public_repos/solana-playground/solana-playground/vscode
solana_public_repos/solana-playground/solana-playground/vscode/src/extension.ts
import * as vscode from "vscode"; import { processCmd, Command } from "./commands"; import { PgStorage } from "./utils"; export function activate(context: vscode.ExtensionContext) { // Get access to global state PgStorage.state = context.globalState; context.subscriptions.push( vscode.commands.registerComm...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/constants/project.ts
export const SERVER_URL = "https://api.solpg.io"; export const CLIENT_URL = "https://beta.solpg.io"; export const GITHUB_URL = "https://github.com/solana-playground/solana-playground";
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/constants/fs.ts
import * as path from "path"; export const PATHS = { DIRS: { APP: "app", MIGRATIONS: "migrations", PROGRAM: "program", PROGRAMS: "programs", TESTS: "tests", SRC: "src", PROGRAMS_PY: "programs_py", SEAHORSE: "seahorse", NODE_MODULES: "node_modules", TARGET: "target", get DE...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/constants/index.ts
export * from "./fs"; export * from "./project";
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/wallet.ts
import * as vscode from "vscode"; import * as os from "os"; import * as path from "path"; import * as TOML from "@iarna/toml"; import { Keypair } from "@solana/web3.js"; import { Framework, PgFs } from "./fs"; import { PgTerminal } from "./terminal"; import { PATHS } from "../constants"; export class PgWallet { sta...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/tx.ts
import { Connection, Keypair, Signer, Transaction } from "@solana/web3.js"; import { PgConnection } from "./connection"; export class PgTx { /** * Send a transaction with additional signer optionality * @returns transaction signature */ static async send( tx: Transaction, conn: Connection, wa...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/program-info.ts
import * as vscode from "vscode"; import { Keypair } from "@solana/web3.js"; import { PgStorage } from "./storage"; import { PgFs } from "./fs"; interface ProgramInfo { uuid?: string; keypairBytes?: number[]; } export class PgProgramInfo { private static readonly _KEY = "program-info"; static get(): Program...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/storage.ts
import * as vscode from "vscode"; export class PgStorage { static state: vscode.ExtensionContext["globalState"]; static getItem(key: string): string | undefined { return this.state.get(key); } static setItem(key: string, value: string) { this.state.update(key, value); } }
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/fs.ts
import * as vscode from "vscode"; import * as path from "path"; import * as TOML from "@iarna/toml"; import { PATHS } from "../constants"; import { PgCommon } from "./common"; /** Array of [path, content] */ export type Files = [string, string][]; /** Solana program frameworks */ export enum Framework { NATIVE = 0...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/common.ts
import { LAMPORTS_PER_SOL } from "@solana/web3.js"; import { Response } from "node-fetch"; import { TextDecoder } from "util"; /** Package managers */ export enum PackageMananger { NPM = 0, YARN = 1, } export class PgCommon { /** * @param ms amount of time to sleep in ms * @returns a promise that will res...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/connection.ts
import { Commitment, Connection } from "@solana/web3.js"; import { PgStorage } from "./storage"; import { PgTerminal } from "./terminal"; interface ConnectionConfig { endpoint: Endpoint | string; commitment: Commitment; preflightChecks: boolean; } interface Network { name: NetworkName; endpoint: Endpoint; ...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/channel.ts
import * as vscode from "vscode"; export const pgChannel = vscode.window.createOutputChannel("Solana Playground");
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/terminal.ts
import * as vscode from "vscode"; import { execSync } from "child_process"; import { PackageMananger, PgCommon } from "./common"; export class PgTerminal { static async getTerminal() { // Check for active terminal const activeTerminal = vscode.window.activeTerminal; if (activeTerminal) { return ac...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/index.ts
export * from "./channel"; export * from "./common"; export * from "./connection"; export * from "./fs"; export * from "./program-info"; export * from "./storage"; export * from "./terminal"; export * from "./tx"; export * from "./validator"; export * from "./wallet";
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/validator.ts
export class PgValidator { /** * @returns whether a given string is parseable to an int */ static isInt(str: string) { const intRegex = /^-?\d+$/; if (!intRegex.test(str)) return false; const int = parseInt(str, 10); return parseFloat(str) === int && !isNaN(int); } }
0
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/pg
solana_public_repos/solana-playground/solana-playground/vscode/src/utils/pg/terminal/terminal.ts
// TODO: Remove this import { pgChannel } from "../../channel"; export class PgTerminal { static enable() {} static logWasm(msg: string) { pgChannel.appendLine(msg); } }
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/commands.ts
import { processAddress } from "./address"; import { processAirdrop } from "./airdrop"; import { processBalance } from "./balance"; import { processBuild } from "./build"; import { processConnection } from "./connection"; import { processCreateAnchor, processCreateNative, processCreateSeahorse, } from "./create";...
0
solana_public_repos/solana-playground/solana-playground/vscode/src
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/index.ts
export { processCmd, Command } from "./commands";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/connection/connection.ts
import * as vscode from "vscode"; import { Commitment } from "@solana/web3.js"; import { PgConnection } from "../../utils"; enum ConnectionCommand { ENDPOINT = "RPC Endpoint", COMMITMENT = "Commitment", } enum GetOrSet { GET = "Get", SET = "Set", } export const processConnection = async () => { const sele...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/connection/index.ts
export { processConnection } from "./connection";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy/index.ts
export { processDeploy } from "./deploy";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy/deploy.ts
import fetch from "node-fetch"; import { Keypair } from "@solana/web3.js"; import { GITHUB_URL, SERVER_URL } from "../../constants"; import { pgChannel, PgCommon, PgConnection, PgFs, PgProgramInfo, PgTx, PgWallet, } from "../../utils"; import { BpfLoaderUpgradeable } from "./bpf-upgradeable"; const MAX_...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy/bpf-upgradeable/instruction.ts
import * as BufferLayout from "@solana/buffer-layout"; import * as Layout from "./layout"; /** * @internal */ export type InstructionType = { /** The Instruction index (from solana upstream program) */ index: number; /** The BufferLayout to use to build data */ layout: BufferLayout.Layout<any>; }; /** * P...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy/bpf-upgradeable/bpf-upgradeable.ts
import * as vscode from "vscode"; import * as BufferLayout from "@solana/buffer-layout"; import { PACKET_DATA_SIZE, PublicKey, SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY, SystemProgram, Transaction, TransactionInstruction, Connection, Signer, Keypair, } from "@solana/web3.js"; import { encodeData, In...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy/bpf-upgradeable/layout.ts
import * as BufferLayout from "@solana/buffer-layout"; /** * Layout for a Rust Vec<u8> type */ export const rustVecBytes = (property: string = "string") => { const rvbl = BufferLayout.struct<any>( [ BufferLayout.u32("length"), BufferLayout.u32("lengthPadding"), BufferLayout.blob(BufferLayout....
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/deploy/bpf-upgradeable/index.ts
export * from "./bpf-upgradeable";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/balance/balance.ts
import * as vscode from "vscode"; import { pgChannel, PgCommon, PgConnection, PgWallet } from "../../utils"; export const processBalance = async () => { const connection = PgConnection.get(); const walletPk = await PgWallet.getPublicKey(); const lamports = await connection.getBalance(walletPk); const msg = `Y...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/balance/index.ts
export { processBalance } from "./balance";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/address/index.ts
export { processAddress } from "./address";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/address/address.ts
import * as vscode from "vscode"; import { pgChannel, PgWallet } from "../../utils"; export const processAddress = async () => { const walletPk = await PgWallet.getPublicKey(); const msg = `Your address is: ${walletPk.toBase58()}`; vscode.window.showInformationMessage(msg); pgChannel.appendLine(msg); };
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/build/index.ts
export { processBuild } from "./build";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/build/build.ts
import * as vscode from "vscode"; import * as path from "path"; import fetch from "node-fetch"; import { Keypair } from "@solana/web3.js"; import { PATHS, SERVER_URL } from "../../constants"; import { Files, Framework, pgChannel, PgCommon, PgFs, PgProgramInfo, } from "../../utils"; interface BuildResponse...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/create/common.ts
import * as vscode from "vscode"; import * as path from "path"; import { spawnSync } from "child_process"; import { Files, PackageMananger, PgCommon, PgFs, PgTerminal, } from "../../utils"; import { GITHUB_URL, PATHS } from "../../constants"; interface CreateProps { name: string; files: Files; } export...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/create/native.ts
import * as _ from "lodash"; import * as path from "path"; import { PATHS } from "../../constants"; import { CARGO_TOML_DEPENDENCIES_INFO, getProjectName, processCreate, } from "./common"; const SOLANA_VERSION = "1.13.4"; export const processCreateNative = async () => { // Get the name of the project const...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/create/anchor.ts
import * as vscode from "vscode"; import * as os from "os"; import * as path from "path"; import * as _ from "lodash"; import { PATHS } from "../../constants"; import { CARGO_TOML_DEPENDENCIES_INFO, getProjectName, processCreate, processInstallNodeModules, } from "./common"; import { PgFs, PgWallet } from "../...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/create/index.ts
export { processCreateNative } from "./native"; export { processCreateAnchor } from "./anchor"; export { processCreateSeahorse } from "./seahorse";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/create/seahorse-prelude.py
# seahorse.prelude: the basis for writing Seahorse programs. # # NOTE: this file just contains types and documentation for your editor. This # is NOT executable code, and you won't be able to change the behavior of your # Seahorse programs by editing this file. from typing import * from math import floor, ceil T = Ty...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/create/seahorse.ts
import * as path from "path"; import { PATHS } from "../../constants"; import { Files, PgFs } from "../../utils"; import { processCreateAnchor } from "./anchor"; export const processCreateSeahorse = async () => { // Create Anchor const { name, projectUri } = await processCreateAnchor(); const seahorseFiles: Fi...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/airdrop/airdrop.ts
import * as vscode from "vscode"; import { pgChannel, PgCommon, PgConnection, PgValidator, PgWallet, } from "../../utils"; export const processAirdrop = async () => { let amountStr = await vscode.window.showInputBox({ placeHolder: "SOL Amount", validateInput: (value) => { if (PgValidator.isI...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/airdrop/index.ts
export { processAirdrop } from "./airdrop";
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/share/share.ts
import * as vscode from "vscode"; import fetch from "node-fetch"; import { CLIENT_URL, PATHS, SERVER_URL } from "../../constants"; import { pgChannel, PgCommon, PgFs } from "../../utils"; interface ShareJSON { files: { [key: string]: { content?: string; current?: boolean; tabs?: boolean; }...
0
solana_public_repos/solana-playground/solana-playground/vscode/src/commands
solana_public_repos/solana-playground/solana-playground/vscode/src/commands/share/index.ts
export { processShare } from "./share";
0
solana_public_repos/solana-playground/solana-playground
solana_public_repos/solana-playground/solana-playground/client/craco.config.js
const webpack = require("webpack"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const CircularDependencyPlugin = require("circular-dependency-plugin"); const fs = require("fs"); const path = require("path"); module.exports = { webpack: { configure: (webpackConfig) => { // Resolve W...
0
solana_public_repos/solana-playground/solana-playground
solana_public_repos/solana-playground/solana-playground/client/.prettierignore
# Ignore artifacts: build # Skip build folders inside src, e.g. src/commands/build !src/**/build public # Declaration files: *.d.ts
0
solana_public_repos/solana-playground/solana-playground
solana_public_repos/solana-playground/solana-playground/client/yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@ampproject/remapping@^2.1.0": version "2.1.2" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.2.tgz#4edca94973ded9630d20101cd8559cedb8d8bd34" integrity sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cM...
0
solana_public_repos/solana-playground/solana-playground
solana_public_repos/solana-playground/solana-playground/client/.prettierrc.json
{}
0
solana_public_repos/solana-playground/solana-playground
solana_public_repos/solana-playground/solana-playground/client/package.json
{ "name": "solpg", "description": "UI for Solana Playground", "version": "0.1.0", "author": "@acheroncrypto", "license": "GPL-3.0", "private": true, "dependencies": { "@clockwork-xyz/sdk": "^0.3.1", "@codemirror/autocomplete": "^6.2.0", "@codemirror/commands": "^6.1.0", "@codemirror/lang-j...
0
solana_public_repos/solana-playground/solana-playground
solana_public_repos/solana-playground/solana-playground/client/tsconfig.json
{ "compilerOptions": { "target": "es2020", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, ...
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/scripts/generate-packages.mjs
// Generate TypeScript declarations for the supported packages. import fs from "fs/promises"; import pathModule from "path"; import { exists, readJSON, REPO_ROOT_PATH, resetDir } from "./utils.mjs"; /** Supported packages path */ const SUPPORTED_PACKAGES_PATH = pathModule.join( REPO_ROOT_PATH, "supported-package...
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/scripts/package-import-template.ts.raw
// DO NOT MANUALLY EDIT! // This file has been generated by running `yarn generate-packages`. import type { OrString } from "../types"; /** All packages that are allowed to be used in client/test code */ export type ClientPackageName =<PACKAGE_NAMES> | "solana-playground"; export class PgClientPackage { /** *...
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/scripts/generate-crates.mjs
// Generate crates for Rust Analyzer. import path from "path"; import fs from "fs/promises"; import { homedir } from "os"; import { execSync, spawnSync } from "child_process"; import { exists, readJSON, REPO_ROOT_PATH, resetDir, SUPPORTED_CRATES_PATH, } from "./utils.mjs"; /** Crates output directory path ...
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/scripts/utils.mjs
import fs from "fs/promises"; import path from "path"; /** Repository root directory path */ export const REPO_ROOT_PATH = path.join(process.argv[1], "..", "..", ".."); /** Supported program crates path */ export const SUPPORTED_CRATES_PATH = path.join( REPO_ROOT_PATH, "supported-crates.json" ); /** * Remove th...
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/scripts/sync-readme.mjs
// Sync root `README.md`. import path from "path"; import fs from "fs/promises"; import { spawnSync } from "child_process"; import { MarkdownTable, readJSON, REPO_ROOT_PATH, SUPPORTED_CRATES_PATH, } from "./utils.mjs"; /** Root README file path */ const README_PATH = path.join(REPO_ROOT_PATH, "README.md"); c...
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/src/index.tsx
import React from "react"; import ReactDOM from "react-dom"; import "./index.css"; import App from "./App"; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById("root") );
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/src/App.tsx
import { lazy, Suspense } from "react"; import { ThemeProvider } from "./providers/theme"; import { AppLoading } from "./components/Loading/App"; import { PgSettings } from "./utils/pg/settings"; import { useDisposable } from "./hooks/useDisposable"; const AppLazy = lazy(() => import("./AppLazy")); const App = () =>...
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/src/index.css
/* Remove default margin and padding */ *, ::after, ::before { box-sizing: border-box; margin: 0; padding: 0; } body { position: relative; } a { text-decoration: none; color: inherit; }
0
solana_public_repos/solana-playground/solana-playground/client
solana_public_repos/solana-playground/solana-playground/client/src/AppLazy.tsx
import { BrowserRouter } from "react-router-dom"; import { SolanaProvider } from "./providers/solana"; import IDE from "./pages/ide"; const AppLazy = () => ( <SolanaProvider> <BrowserRouter> <IDE /> </BrowserRouter> </SolanaProvider> ); export default AppLazy;
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/settings/settings.ts
import { automaticAirdrop } from "./automatic-airdrop"; import { blockExplorer } from "./block-explorer"; import { commitment } from "./commitment"; import { endpoint } from "./endpoint"; import { font } from "./font"; import { improveBuildErrors } from "./improve-build-errors"; import { preflightChecks } from "./prefl...
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/settings/index.ts
export { SETTINGS } from "./settings"; export type { Setting } from "./create";
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/settings/create.ts
import { CallableJSX, PgCommon, RequiredKey } from "../utils/pg"; import type { TooltipProps } from "../components/Tooltip"; /** UI setting parameter */ interface SettingParam { /** Name of the setting */ name: string; /** Setting component, default to `./setting-name/Component` */ Component?: CallableJSX; /...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/block-explorer/block-explorer.ts
import { createSetting } from "../create"; export const blockExplorer = createSetting({ name: "Block explorer", tooltip: { element: "Default block explorer to use", }, });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/block-explorer/Component.tsx
import { useEffect, useMemo, useState } from "react"; import Select from "../../components/Select"; import { PgBlockExplorer, PgSettings } from "../../utils/pg"; const BlockExplorer = () => { const options = useMemo( () => PgBlockExplorer.all.map((be) => ({ value: be.name, label: be.name, ...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/block-explorer/index.ts
export { blockExplorer } from "./block-explorer";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/show-transaction-details/show-transaction-details.ts
import { createSetting } from "../create"; export const showTransactionDetails = createSetting({ name: "Show transaction details", tooltip: { element: "Whether to automatically fetch transaction details and show them in terminal(only applies to test UI)", maxWidth: "18rem", }, isCheckBox: true, }...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/show-transaction-details/Component.tsx
import Checkbox from "../../components/Checkbox"; import { PgSettings } from "../../utils/pg"; const ShowTxDetailsSetting = () => ( <Checkbox onChange={(ev) => { PgSettings.testUi.showTxDetailsInTerminal = ev.target.checked; }} defaultChecked={PgSettings.testUi.showTxDetailsInTerminal} /> ); exp...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/show-transaction-details/index.ts
export { showTransactionDetails } from "./show-transaction-details";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/improve-build-errors/improve-build-errors.ts
import { createSetting } from "../create"; export const improveBuildErrors = createSetting({ name: "Improve build errors", tooltip: { element: "Make build errors shorter and more useful(experimental)", maxWidth: "15rem", }, isCheckBox: true, });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/improve-build-errors/Component.tsx
import Checkbox from "../../components/Checkbox"; import { PgSettings } from "../../utils/pg"; const ShowTxDetailsSetting = () => ( <Checkbox onChange={(ev) => { PgSettings.build.improveErrors = ev.target.checked; }} defaultChecked={PgSettings.build.improveErrors} /> ); export default ShowTxDeta...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/improve-build-errors/index.ts
export { improveBuildErrors } from "./improve-build-errors";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/commitment/commitment.ts
import { createSetting } from "../create"; export const commitment = createSetting({ name: "Commitment", tooltip: { element: "Commitment level to use when interacting with the endpoint", maxWidth: "12rem", }, });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/commitment/Component.tsx
import { useEffect, useState } from "react"; import Select from "../../components/Select"; import { PgSettings, UnionToTuple } from "../../utils/pg"; type Option = UnionToTuple<typeof PgSettings["connection"]["commitment"]>; const OPTIONS = (["processed", "confirmed", "finalized"] as Option).map( (o) => ({ valu...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/commitment/index.ts
export { commitment } from "./commitment";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/automatic-airdrop/Component.tsx
import Checkbox from "../../components/Checkbox"; import { PgSettings } from "../../utils/pg"; const AutomaticAirdrop = () => ( <Checkbox onChange={(ev) => { PgSettings.wallet.automaticAirdrop = ev.target.checked; }} defaultChecked={PgSettings.wallet.automaticAirdrop} /> ); export default Automa...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/automatic-airdrop/index.ts
export { automaticAirdrop } from "./automatic-airdrop";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/automatic-airdrop/automatic-airdrop.ts
import { createSetting } from "../create"; export const automaticAirdrop = createSetting({ name: "Automatic airdrop", tooltip: { element: "Whether to automatically send airdrop requests based on the current endpoint", maxWidth: "14rem", }, isCheckBox: true, });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/theme/Component.tsx
import { useMemo } from "react"; import { useTheme } from "styled-components"; import Select from "../../components/Select"; import { PgTheme } from "../../utils/pg"; const ThemeSetting = () => { const theme = useTheme(); const options = useMemo( () => PgTheme.themes.map((t) => ({ value: t.name, label: t.nam...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/theme/index.ts
export { theme } from "./theme";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/theme/theme.ts
import { createSetting } from "../create"; export const theme = createSetting({ name: "Theme", });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/endpoint/endpoint.ts
import { createSetting } from "../create"; export const endpoint = createSetting({ name: "Endpoint", tooltip: { element: "RPC URL that lets you interact with a specific Solana cluster", maxWidth: "10rem", }, });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/endpoint/Component.tsx
import { ChangeEvent, useEffect, useMemo, useState } from "react"; import styled from "styled-components"; import Input from "../../components/Input"; import Link from "../../components/Link"; import Modal from "../../components/Modal"; import Select from "../../components/Select"; import Text from "../../components/T...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/endpoint/index.ts
export { endpoint } from "./endpoint";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/priority-fee/priority-fee.ts
import { createSetting } from "../create"; export const priorityFee = createSetting({ name: "Priority fee", tooltip: { element: "Priority fee calculation method to use when sending transactions", maxWidth: "16rem", }, });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/priority-fee/Component.tsx
import { useEffect, useState } from "react"; import styled from "styled-components"; import Input from "../../components/Input"; import Link from "../../components/Link"; import Modal from "../../components/Modal"; import Select from "../../components/Select"; import Text from "../../components/Text"; import { Info } ...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/priority-fee/index.ts
export { priorityFee } from "./priority-fee";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/show-transaction-notifications/show-transaction-notification.ts
import { createSetting } from "../create"; export const showTransactionNotifications = createSetting({ name: "Show transaction notifications", tooltip: { element: "Whether to show explorer links after a transaction is sent", maxWidth: "15rem", }, isCheckBox: true, });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/show-transaction-notifications/Component.tsx
import Checkbox from "../../components/Checkbox"; import { PgSettings } from "../../utils/pg"; const ShowTransactionNotifications = () => ( <Checkbox onChange={(ev) => { PgSettings.notification.showTx = ev.target.checked; }} defaultChecked={PgSettings.notification.showTx} /> ); export default Sh...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/show-transaction-notifications/index.ts
export { showTransactionNotifications } from "./show-transaction-notification";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/font/font.ts
import { createSetting } from "../create"; export const font = createSetting({ name: "Font", });
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/font/Component.tsx
import { useMemo } from "react"; import { useTheme } from "styled-components"; import Select from "../../components/Select"; import { PgTheme } from "../../utils/pg"; const FontSetting = () => { const theme = useTheme(); const options = useMemo( () => PgTheme.fonts.map((f) => ({ value: f.family, label: f.fam...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/font/index.ts
export { font } from "./font";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/preflight-checks/Component.tsx
import Checkbox from "../../components/Checkbox"; import { PgSettings } from "../../utils/pg"; const PreflightSetting = () => ( <Checkbox onChange={(ev) => { PgSettings.connection.preflightChecks = ev.target.checked; }} defaultChecked={PgSettings.connection.preflightChecks} /> ); export default ...
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/preflight-checks/index.ts
export { preflightChecks } from "./preflight-checks";
0
solana_public_repos/solana-playground/solana-playground/client/src/settings
solana_public_repos/solana-playground/solana-playground/client/src/settings/preflight-checks/preflight-checks.ts
import { createSetting } from "../create"; export const preflightChecks = createSetting({ name: "Preflight checks", tooltip: { element: "If enabled, this check will simulate transactions before sending them and only the transactions that pass the simulation will be sent", maxWidth: "18rem", }, is...
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/types/markdown.d.ts
declare module '*.md' { const content: string; export = content; }
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/types/declarations.d.ts
import "styled-components"; import { COMMANDS } from "../commands"; import { FRAMEWORKS } from "../frameworks"; import { LANGUAGES } from "../languages"; import { ROUTES } from "../routes"; import { MAIN_SECONDARY, SIDEBAR } from "../views"; import { Arrayable, ClientPackageName, Disposable, SyncOrAsync, The...
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/constants/project.ts
export const PROJECT_NAME = "Solana Playground"; export const GITHUB_URL = "https://github.com/solana-playground/solana-playground";
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/constants/dom.ts
export enum ClassName { ACTIVE = "active", ERROR = "error", SUCCESS = "success", OPEN = "open", HIDDEN = "hidden", TOUCHED = "touched", SELECTED = "selected", CTX_SELECTED = "ctx-selected", FILE = "file", FOLDER = "folder", FOLDER_INSIDE = "folder-inside", LOADING = "loading", DARKEN = "darken...
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/constants/errors.ts
import { GITHUB_URL } from "./project"; export enum ItemError { ALREADY_EXISTS = "Already exists", INVALID_NAME = "Invalid name", TYPE_MISMATCH = "Types don't match", SRC_DELETE = "Cannot delete src folder", SRC_RENAME = "Cannot rename src folder", } export enum WorkspaceError { ALREADY_EXISTS = "Already ...
0
solana_public_repos/solana-playground/solana-playground/client/src
solana_public_repos/solana-playground/solana-playground/client/src/constants/connection.ts
/** Name that will be showed in the UI */ export enum NetworkName { PLAYNET = "playnet", LOCALHOST = "localhost", DEVNET = "devnet", TESTNET = "testnet", MAINNET_BETA = "mainnet-beta", CUSTOM = "custom", } /** RPC endpoint */ export enum Endpoint { PLAYNET = "http://playnet", LOCALHOST = "http://localh...
0