-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation assets and error page
This commit introduces several new assets into the documentation, including images and WebAssembly files. Additionally, an error page and an index page have been added to enhance the user experience.
- Loading branch information
Showing
16 changed files
with
2,761 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Error - Sologger</title> | ||
<style> | ||
:root { | ||
--primary-50: #efede6; | ||
--primary-100: #ddadd8; | ||
--primary-200: #d37fcf; | ||
--primary-300: #d8ca47; | ||
--primary-400: #ff4513; | ||
--primary-500: #302d37; | ||
--surface-50: #e6efe9; | ||
--surface-100: #0f4d42; | ||
--surface-700: #0f4d42; | ||
--surface-800: #052b25; | ||
--surface-900: #021b17; | ||
} | ||
|
||
body { | ||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: var(--primary-50); | ||
color: var(--surface-800); | ||
} | ||
|
||
.container { | ||
text-align: center; | ||
padding: 2rem; | ||
max-width: 600px; | ||
} | ||
|
||
.logo { | ||
font-size: 2.5rem; | ||
font-weight: bold; | ||
color: var(--primary-400); | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.error-code { | ||
font-size: 6rem; | ||
font-weight: bold; | ||
color: var(--primary-200); | ||
margin: 0; | ||
line-height: 1; | ||
} | ||
|
||
.error-title { | ||
font-size: 1.5rem; | ||
margin: 1rem 0; | ||
color: var(--surface-100); | ||
} | ||
|
||
.error-message { | ||
margin-bottom: 2rem; | ||
line-height: 1.5; | ||
color: var(--surface-100); | ||
} | ||
|
||
.button { | ||
display: inline-block; | ||
padding: 0.75rem 1.5rem; | ||
background-color: var(--primary-300); | ||
color: var(--surface-900); | ||
text-decoration: none; | ||
border-radius: 0.375rem; | ||
font-weight: 500; | ||
transition: background-color 0.2s; | ||
} | ||
|
||
.button:hover { | ||
background-color: var(--primary-400); | ||
} | ||
|
||
.info { | ||
margin-top: 2rem; | ||
font-size: 0.875rem; | ||
color: var(--surface-100); | ||
} | ||
|
||
.info a { | ||
color: var(--primary-400); | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
body { | ||
background-color: var(--surface-900); | ||
color: var(--primary-50); | ||
} | ||
|
||
.error-title, .error-message, .info { | ||
color: var(--primary-50); | ||
} | ||
} | ||
|
||
@media (max-width: 640px) { | ||
.container { | ||
padding: 1rem; | ||
} | ||
.error-code { | ||
font-size: 4rem; | ||
} | ||
.error-title { | ||
font-size: 1.25rem; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<!-- Rest of the HTML remains the same --> | ||
<body> | ||
<div class="container"> | ||
<div class="logo">Sologger</div> | ||
<h1 class="error-code">404</h1> | ||
<h2 class="error-title">Page Not Found</h2> | ||
<p class="error-message"> | ||
The page you're looking for doesn't exist or has been moved. | ||
Try checking the URL for typos or return to the homepage. | ||
</p> | ||
<a href="/" class="button">Return to Homepage</a> | ||
<p class="info"> | ||
If you believe this is a mistake, please | ||
<a href="https://github.com/brytelands/sologger/issues" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
style="color: var(--primary-500);"> | ||
report the issue | ||
</a> | ||
</p> | ||
</div> | ||
|
||
<script> | ||
// Optional: Log error details to console | ||
console.log('Error page loaded:', { | ||
path: window.location.pathname, | ||
referrer: document.referrer, | ||
userAgent: navigator.userAgent | ||
}); | ||
|
||
// Optional: Track 404s in analytics | ||
if (typeof gtag !== 'undefined') { | ||
gtag('event', '404_error', { | ||
'event_category': 'error', | ||
'event_label': window.location.pathname | ||
}); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "sologger_log_transformer_wasm", | ||
"type": "module", | ||
"collaborators": [ | ||
"Will Kennedy" | ||
], | ||
"description": "This library provides utility to extract and structure logs from Solana API logSubscribe responses and provides WASM support.", | ||
"version": "0.2.1", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/brytelands/sologger" | ||
}, | ||
"files": [ | ||
"sologger_log_transformer_wasm_bg.wasm", | ||
"sologger_log_transformer_wasm.js", | ||
"sologger_log_transformer_wasm.d.ts" | ||
], | ||
"main": "sologger_log_transformer_wasm.js", | ||
"types": "sologger_log_transformer_wasm.d.ts", | ||
"sideEffects": [ | ||
"./snippets/*" | ||
], | ||
"keywords": [ | ||
"solana", | ||
"logging", | ||
"json", | ||
"parsing" | ||
] | ||
} |
81 changes: 81 additions & 0 deletions
81
docs/sologger-log-transformer-wasm/pkg/sologger_log_transformer_wasm.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {(string)[]} logs | ||
* @param {(string)[]} program_ids | ||
* @returns {any} | ||
*/ | ||
export function parse_logs_basic(logs: (string)[], program_ids: (string)[]): any; | ||
export class WasmLogContextTransformer { | ||
free(): void; | ||
/** | ||
* @param {(string)[]} program_ids | ||
*/ | ||
constructor(program_ids: (string)[]); | ||
/** | ||
* @param {any} response | ||
* @returns {any} | ||
*/ | ||
from_rpc_response(response: any): any; | ||
/** | ||
* @param {any} rpc_logs_response | ||
* @param {bigint} slot | ||
* @returns {any} | ||
*/ | ||
from_rpc_logs_response(rpc_logs_response: any, slot: bigint): any; | ||
} | ||
export class WasmLogParser { | ||
free(): void; | ||
/** | ||
* @param {(string)[]} program_ids | ||
*/ | ||
constructor(program_ids: (string)[]); | ||
/** | ||
* @param {(string)[]} logs | ||
* @param {string} transaction_error | ||
* @param {bigint} slot | ||
* @param {string} signature | ||
* @returns {any} | ||
*/ | ||
parse_logs(logs: (string)[], transaction_error: string, slot: bigint, signature: string): any; | ||
} | ||
|
||
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; | ||
|
||
export interface InitOutput { | ||
readonly memory: WebAssembly.Memory; | ||
readonly __wbg_wasmlogcontexttransformer_free: (a: number, b: number) => void; | ||
readonly wasmlogcontexttransformer_new: (a: number, b: number) => number; | ||
readonly wasmlogcontexttransformer_from_rpc_response: (a: number, b: number, c: number) => void; | ||
readonly wasmlogcontexttransformer_from_rpc_logs_response: (a: number, b: number, c: number, d: number) => void; | ||
readonly __wbg_wasmlogparser_free: (a: number, b: number) => void; | ||
readonly wasmlogparser_new: (a: number, b: number) => number; | ||
readonly wasmlogparser_parse_logs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number; | ||
readonly parse_logs_basic: (a: number, b: number, c: number, d: number) => number; | ||
readonly __wbindgen_malloc: (a: number, b: number) => number; | ||
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; | ||
readonly __wbindgen_add_to_stack_pointer: (a: number) => number; | ||
readonly __wbindgen_exn_store: (a: number) => void; | ||
readonly __wbindgen_free: (a: number, b: number, c: number) => void; | ||
} | ||
|
||
export type SyncInitInput = BufferSource | WebAssembly.Module; | ||
/** | ||
* Instantiates the given `module`, which can either be bytes or | ||
* a precompiled `WebAssembly.Module`. | ||
* | ||
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. | ||
* | ||
* @returns {InitOutput} | ||
*/ | ||
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; | ||
|
||
/** | ||
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and | ||
* for everything else, calls `WebAssembly.instantiate` directly. | ||
* | ||
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated. | ||
* | ||
* @returns {Promise<InitOutput>} | ||
*/ | ||
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>; |
Oops, something went wrong.