Git Ignore and M5GO Update
This commit is contained in:
@@ -25,3 +25,5 @@ vite.config.ts.timestamp-*
|
||||
|
||||
.vscode/
|
||||
|
||||
.svelte-kit/
|
||||
|
||||
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
from m5stack import *
|
||||
from m5ui import *
|
||||
from uiflow import *
|
||||
import time
|
||||
import machine
|
||||
import math
|
||||
|
||||
setScreenColor(0x222222)
|
||||
|
||||
try:
|
||||
adc = machine.ADC(34)
|
||||
adc.atten(machine.ADC.ATTN_11DB)
|
||||
except:
|
||||
try:
|
||||
adc = machine.ADC(machine.Pin(34))
|
||||
adc.atten(machine.ADC.ATTN_11DB)
|
||||
except:
|
||||
adc = None
|
||||
|
||||
def get_db():
|
||||
if not adc: return 30
|
||||
sum_v = 0
|
||||
sum_sq = 0
|
||||
count = 0
|
||||
end_t = time.ticks_ms() + 40
|
||||
while time.ticks_ms() < end_t:
|
||||
try:
|
||||
v = adc.read()
|
||||
sum_v += v
|
||||
sum_sq += v * v
|
||||
count += 1
|
||||
except:
|
||||
pass
|
||||
|
||||
if count == 0: return 30
|
||||
|
||||
mean = sum_v / count
|
||||
variance = (sum_sq / count) - (mean * mean)
|
||||
|
||||
if variance <= 1: return 30
|
||||
amp = math.sqrt(variance)
|
||||
if amp <= 1: return 30
|
||||
|
||||
# +25 scales the RMS amplitude into a natural dB range
|
||||
db = 20 * math.log10(amp) + 25
|
||||
return db
|
||||
|
||||
C = {
|
||||
'0': 0x222222,
|
||||
'Y': 0xFFFF00,
|
||||
'R': 0xFF0000,
|
||||
'W': 0xFFFFFF,
|
||||
'B': 0x000000,
|
||||
'P': 0xFF8888,
|
||||
'D': 0x555555
|
||||
}
|
||||
|
||||
f_s_o = [
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000WWW0000WWW000",
|
||||
"00WWBW0000WWBW00",
|
||||
"00WWBW0000WWBW00",
|
||||
"000WWW0000WWW000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"YY000000000000YY",
|
||||
"0YY0000000000YY0",
|
||||
"00YY00000000YY00",
|
||||
"000YYYYYYYYYY000",
|
||||
"00000YYYYYY00000",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
f_s_h = [
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000WWW0000WWW000",
|
||||
"00WWBW0000WWBW00",
|
||||
"000WWW0000WWW000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"YY000000000000YY",
|
||||
"0YY0000000000YY0",
|
||||
"00YY00000000YY00",
|
||||
"000YYYYYYYYYY000",
|
||||
"00000YYYYYY00000",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
f_s_c = [
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"00WWWW0000WWWW00",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"YY000000000000YY",
|
||||
"0YY0000000000YY0",
|
||||
"00YY00000000YY00",
|
||||
"000YYYYYYYYYY000",
|
||||
"00000YYYYYY00000",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
f_a_o = [
|
||||
"0000000000000000",
|
||||
"0DDDD000000DDDD0",
|
||||
"00DDDD0000DDDD00",
|
||||
"000DDDD00DDDD000",
|
||||
"000WWW0000WWW000",
|
||||
"00WWBB0000BBWW00",
|
||||
"000WWW0000WWW000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000000RRRR000000",
|
||||
"0000RRRRRRRR0000",
|
||||
"00RRRR0000RRRR00",
|
||||
"0RRR00000000RRR0",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
f_a_h = [
|
||||
"0000000000000000",
|
||||
"0DDDD000000DDDD0",
|
||||
"00DDDD0000DDDD00",
|
||||
"000DDDD00DDDD000",
|
||||
"0000000000000000",
|
||||
"000WWW0000WWW000",
|
||||
"00WWBB0000BBWW00",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000000RRRR000000",
|
||||
"0000RRRRRRRR0000",
|
||||
"00RRRR0000RRRR00",
|
||||
"0RRR00000000RRR0",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
f_a_c = [
|
||||
"0000000000000000",
|
||||
"0DDDD000000DDDD0",
|
||||
"00DDDD0000DDDD00",
|
||||
"000DDDD00DDDD000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000WW000000WW000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000000RRRR000000",
|
||||
"0000RRRRRRRR0000",
|
||||
"00RRRR0000RRRR00",
|
||||
"0RRR00000000RRR0",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
f_t_1 = [
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000WWW0000WWW000",
|
||||
"00WWWW0000WWWW00",
|
||||
"000WWW0000WWW000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"000YYYYYYYYYY000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
f_t_2 = [
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"00DD00000000DD00",
|
||||
"000DD000000DD000",
|
||||
"0000000000000000",
|
||||
"000WWW0000WWW000",
|
||||
"00WWBW0000WWBW00",
|
||||
"000WWW0000WWW000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000RRRRRRRR0000",
|
||||
"000RR000000RR000",
|
||||
"0000000000000000",
|
||||
"0000000000000000",
|
||||
"0000000000000000"
|
||||
]
|
||||
|
||||
def d_s(f, s_x, s_y, p_s):
|
||||
for r in range(16):
|
||||
c = 0
|
||||
while c < 16:
|
||||
s_c = c
|
||||
v = f[r][c]
|
||||
while c < 16 and f[r][c] == v:
|
||||
c += 1
|
||||
w = c - s_c
|
||||
|
||||
x_p = s_x + (s_c * p_s)
|
||||
y_p = s_y + (r * p_s)
|
||||
|
||||
lcd.fillRect(x_p, y_p, w * p_s, p_s, C[v])
|
||||
|
||||
s = 14
|
||||
x = 48
|
||||
y = 16
|
||||
|
||||
a_f = 's'
|
||||
b_s = 'o'
|
||||
t_s = 0
|
||||
c_t = 0
|
||||
l_f = None
|
||||
b_p = False
|
||||
al_t = 0
|
||||
l_db_s = ""
|
||||
s_db = 30.0
|
||||
l_is_angry = False
|
||||
|
||||
while True:
|
||||
r_db = get_db()
|
||||
s_db = (s_db * 0.8) + (r_db * 0.2)
|
||||
db = int(s_db)
|
||||
|
||||
if db < 40:
|
||||
i_c = 0x89b4fa
|
||||
elif db < 55:
|
||||
i_c = 0x94e2d5
|
||||
elif db < 65:
|
||||
i_c = 0xf9e2af
|
||||
elif db < 80:
|
||||
i_c = 0xfab387
|
||||
else:
|
||||
i_c = 0xf38ba8
|
||||
|
||||
lcd.fillRect(0, 0, 320, 4, i_c)
|
||||
db_s = "Noise: %d dB" % db
|
||||
if db_s != l_db_s:
|
||||
lcd.fillRect(0, 4, 120, 12, 0x222222)
|
||||
lcd.print(db_s, 5, 4, i_c)
|
||||
l_db_s = db_s
|
||||
|
||||
i_a = btnA.isPressed() or btnB.isPressed() or btnC.isPressed() or db >= 65
|
||||
t_f = 'a' if i_a else 's'
|
||||
|
||||
b_n = btnB.isPressed()
|
||||
is_angry = (t_f == 'a')
|
||||
|
||||
if b_n or is_angry:
|
||||
al_t += 1
|
||||
if al_t % 4 < 2:
|
||||
try:
|
||||
if b_n: speaker.tone(1200, 50)
|
||||
rgb.setColorAll(0xFF0000)
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
if b_n: speaker.tone(800, 50)
|
||||
rgb.setColorAll(0x0000FF)
|
||||
except:
|
||||
pass
|
||||
elif b_p or l_is_angry:
|
||||
try:
|
||||
rgb.setColorAll(0x000000)
|
||||
except:
|
||||
pass
|
||||
al_t = 0
|
||||
b_p = b_n
|
||||
l_is_angry = is_angry
|
||||
|
||||
c_t += 1
|
||||
|
||||
if a_f != t_f and t_s == 0:
|
||||
t_s = 1
|
||||
c_t = 0
|
||||
|
||||
if t_s > 0:
|
||||
if c_t >= 2:
|
||||
t_s += 1
|
||||
c_t = 0
|
||||
if t_s == 3:
|
||||
a_f = t_f
|
||||
t_s = 0
|
||||
b_s = 'o'
|
||||
else:
|
||||
if b_s == 'o' and c_t >= 50:
|
||||
b_s = 'h'
|
||||
c_t = 0
|
||||
elif b_s == 'h' and c_t >= 1:
|
||||
b_s = 'c'
|
||||
c_t = 0
|
||||
elif b_s == 'c' and c_t >= 2:
|
||||
b_s = 'h_o'
|
||||
c_t = 0
|
||||
elif b_s == 'h_o' and c_t >= 1:
|
||||
b_s = 'o'
|
||||
c_t = 0
|
||||
|
||||
c_d = (a_f, b_s, t_s)
|
||||
if c_d != l_f:
|
||||
if t_s == 1:
|
||||
f = f_t_1 if a_f == 's' else f_t_2
|
||||
elif t_s == 2:
|
||||
f = f_t_2 if a_f == 's' else f_t_1
|
||||
else:
|
||||
if a_f == 'a':
|
||||
if b_s == 'o': f = f_a_o
|
||||
elif b_s in ['h', 'h_o']: f = f_a_h
|
||||
else: f = f_a_c
|
||||
else:
|
||||
if b_s == 'o': f = f_s_o
|
||||
elif b_s in ['h', 'h_o']: f = f_s_h
|
||||
else: f = f_s_c
|
||||
|
||||
d_s(f, x, y, s)
|
||||
l_f = c_d
|
||||
|
||||
time.sleep(0.02)
|
||||
Vendored
-310
@@ -1,310 +0,0 @@
|
||||
|
||||
// this file is generated — do not edit it
|
||||
|
||||
|
||||
/// <reference types="@sveltejs/kit" />
|
||||
|
||||
/**
|
||||
* This module provides access to environment variables that are injected _statically_ into your bundle at build time and are limited to _private_ access.
|
||||
*
|
||||
* | | Runtime | Build time |
|
||||
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
||||
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
||||
*
|
||||
* Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
|
||||
*
|
||||
* **_Private_ access:**
|
||||
*
|
||||
* - This module cannot be imported into client-side code
|
||||
* - This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
|
||||
*
|
||||
* For example, given the following build time environment:
|
||||
*
|
||||
* ```env
|
||||
* ENVIRONMENT=production
|
||||
* PUBLIC_BASE_URL=http://site.com
|
||||
* ```
|
||||
*
|
||||
* With the default `publicPrefix` and `privatePrefix`:
|
||||
*
|
||||
* ```ts
|
||||
* import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/private';
|
||||
*
|
||||
* console.log(ENVIRONMENT); // => "production"
|
||||
* console.log(PUBLIC_BASE_URL); // => throws error during build
|
||||
* ```
|
||||
*
|
||||
* The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
|
||||
*/
|
||||
declare module '$env/static/private' {
|
||||
export const CAML_LD_LIBRARY_PATH: string;
|
||||
export const TERM_PROGRAM: string;
|
||||
export const NODE: string;
|
||||
export const TERM: string;
|
||||
export const SHELL: string;
|
||||
export const HOMEBREW_REPOSITORY: string;
|
||||
export const TMPDIR: string;
|
||||
export const CONDA_SHLVL: string;
|
||||
export const VSCODE_PYTHON_AUTOACTIVATE_GUARD: string;
|
||||
export const TERM_PROGRAM_VERSION: string;
|
||||
export const CONDA_PROMPT_MODIFIER: string;
|
||||
export const MallocSpaceEfficient: string;
|
||||
export const ZDOTDIR: string;
|
||||
export const MallocNanoZone: string;
|
||||
export const OPAM_SWITCH_PREFIX: string;
|
||||
export const npm_config_local_prefix: string;
|
||||
export const EXTENSION_KIT_EXTENSION_TYPE: string;
|
||||
export const OCAML_TOPLEVEL_PATH: string;
|
||||
export const USER: string;
|
||||
export const COMMAND_MODE: string;
|
||||
export const CONDA_EXE: string;
|
||||
export const SSH_AUTH_SOCK: string;
|
||||
export const VSCODE_PROFILE_INITIALIZED: string;
|
||||
export const __CF_USER_TEXT_ENCODING: string;
|
||||
export const npm_execpath: string;
|
||||
export const PATH: string;
|
||||
export const npm_package_json: string;
|
||||
export const _: string;
|
||||
export const USER_ZDOTDIR: string;
|
||||
export const CONDA_PREFIX: string;
|
||||
export const __CFBundleIdentifier: string;
|
||||
export const npm_command: string;
|
||||
export const PWD: string;
|
||||
export const npm_lifecycle_event: string;
|
||||
export const npm_package_name: string;
|
||||
export const LANG: string;
|
||||
export const OPAM_LAST_ENV: string;
|
||||
export const VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
|
||||
export const XPC_FLAGS: string;
|
||||
export const npm_package_version: string;
|
||||
export const XPC_SERVICE_NAME: string;
|
||||
export const VSCODE_INJECTION: string;
|
||||
export const ANTIGRAVITY_CLI_ALIAS: string;
|
||||
export const SHLVL: string;
|
||||
export const HOME: string;
|
||||
export const VSCODE_GIT_ASKPASS_MAIN: string;
|
||||
export const HOMEBREW_PREFIX: string;
|
||||
export const CONDA_PYTHON_EXE: string;
|
||||
export const LOGNAME: string;
|
||||
export const npm_lifecycle_script: string;
|
||||
export const VSCODE_GIT_IPC_HANDLE: string;
|
||||
export const CONDA_DEFAULT_ENV: string;
|
||||
export const BUN_INSTALL: string;
|
||||
export const npm_config_user_agent: string;
|
||||
export const VSCODE_GIT_ASKPASS_NODE: string;
|
||||
export const GIT_ASKPASS: string;
|
||||
export const INFOPATH: string;
|
||||
export const HOMEBREW_CELLAR: string;
|
||||
export const DISPLAY: string;
|
||||
export const OSLogRateLimit: string;
|
||||
export const npm_node_execpath: string;
|
||||
export const COLORTERM: string;
|
||||
export const NODE_ENV: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This module provides access to environment variables that are injected _statically_ into your bundle at build time and are _publicly_ accessible.
|
||||
*
|
||||
* | | Runtime | Build time |
|
||||
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
||||
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
||||
*
|
||||
* Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
|
||||
*
|
||||
* **_Public_ access:**
|
||||
*
|
||||
* - This module _can_ be imported into client-side code
|
||||
* - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
|
||||
*
|
||||
* For example, given the following build time environment:
|
||||
*
|
||||
* ```env
|
||||
* ENVIRONMENT=production
|
||||
* PUBLIC_BASE_URL=http://site.com
|
||||
* ```
|
||||
*
|
||||
* With the default `publicPrefix` and `privatePrefix`:
|
||||
*
|
||||
* ```ts
|
||||
* import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/public';
|
||||
*
|
||||
* console.log(ENVIRONMENT); // => throws error during build
|
||||
* console.log(PUBLIC_BASE_URL); // => "http://site.com"
|
||||
* ```
|
||||
*
|
||||
* The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
|
||||
*/
|
||||
declare module '$env/static/public' {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This module provides access to environment variables set _dynamically_ at runtime and that are limited to _private_ access.
|
||||
*
|
||||
* | | Runtime | Build time |
|
||||
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
||||
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
||||
*
|
||||
* Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
|
||||
*
|
||||
* **_Private_ access:**
|
||||
*
|
||||
* - This module cannot be imported into client-side code
|
||||
* - This module includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
|
||||
*
|
||||
* > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
|
||||
*
|
||||
* > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
|
||||
* >
|
||||
* > ```env
|
||||
* > MY_FEATURE_FLAG=
|
||||
* > ```
|
||||
* >
|
||||
* > You can override `.env` values from the command line like so:
|
||||
* >
|
||||
* > ```sh
|
||||
* > MY_FEATURE_FLAG="enabled" npm run dev
|
||||
* > ```
|
||||
*
|
||||
* For example, given the following runtime environment:
|
||||
*
|
||||
* ```env
|
||||
* ENVIRONMENT=production
|
||||
* PUBLIC_BASE_URL=http://site.com
|
||||
* ```
|
||||
*
|
||||
* With the default `publicPrefix` and `privatePrefix`:
|
||||
*
|
||||
* ```ts
|
||||
* import { env } from '$env/dynamic/private';
|
||||
*
|
||||
* console.log(env.ENVIRONMENT); // => "production"
|
||||
* console.log(env.PUBLIC_BASE_URL); // => undefined
|
||||
* ```
|
||||
*/
|
||||
declare module '$env/dynamic/private' {
|
||||
export const env: {
|
||||
CAML_LD_LIBRARY_PATH: string;
|
||||
TERM_PROGRAM: string;
|
||||
NODE: string;
|
||||
TERM: string;
|
||||
SHELL: string;
|
||||
HOMEBREW_REPOSITORY: string;
|
||||
TMPDIR: string;
|
||||
CONDA_SHLVL: string;
|
||||
VSCODE_PYTHON_AUTOACTIVATE_GUARD: string;
|
||||
TERM_PROGRAM_VERSION: string;
|
||||
CONDA_PROMPT_MODIFIER: string;
|
||||
MallocSpaceEfficient: string;
|
||||
ZDOTDIR: string;
|
||||
MallocNanoZone: string;
|
||||
OPAM_SWITCH_PREFIX: string;
|
||||
npm_config_local_prefix: string;
|
||||
EXTENSION_KIT_EXTENSION_TYPE: string;
|
||||
OCAML_TOPLEVEL_PATH: string;
|
||||
USER: string;
|
||||
COMMAND_MODE: string;
|
||||
CONDA_EXE: string;
|
||||
SSH_AUTH_SOCK: string;
|
||||
VSCODE_PROFILE_INITIALIZED: string;
|
||||
__CF_USER_TEXT_ENCODING: string;
|
||||
npm_execpath: string;
|
||||
PATH: string;
|
||||
npm_package_json: string;
|
||||
_: string;
|
||||
USER_ZDOTDIR: string;
|
||||
CONDA_PREFIX: string;
|
||||
__CFBundleIdentifier: string;
|
||||
npm_command: string;
|
||||
PWD: string;
|
||||
npm_lifecycle_event: string;
|
||||
npm_package_name: string;
|
||||
LANG: string;
|
||||
OPAM_LAST_ENV: string;
|
||||
VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
|
||||
XPC_FLAGS: string;
|
||||
npm_package_version: string;
|
||||
XPC_SERVICE_NAME: string;
|
||||
VSCODE_INJECTION: string;
|
||||
ANTIGRAVITY_CLI_ALIAS: string;
|
||||
SHLVL: string;
|
||||
HOME: string;
|
||||
VSCODE_GIT_ASKPASS_MAIN: string;
|
||||
HOMEBREW_PREFIX: string;
|
||||
CONDA_PYTHON_EXE: string;
|
||||
LOGNAME: string;
|
||||
npm_lifecycle_script: string;
|
||||
VSCODE_GIT_IPC_HANDLE: string;
|
||||
CONDA_DEFAULT_ENV: string;
|
||||
BUN_INSTALL: string;
|
||||
npm_config_user_agent: string;
|
||||
VSCODE_GIT_ASKPASS_NODE: string;
|
||||
GIT_ASKPASS: string;
|
||||
INFOPATH: string;
|
||||
HOMEBREW_CELLAR: string;
|
||||
DISPLAY: string;
|
||||
OSLogRateLimit: string;
|
||||
npm_node_execpath: string;
|
||||
COLORTERM: string;
|
||||
NODE_ENV: string;
|
||||
[key: `PUBLIC_${string}`]: undefined;
|
||||
[key: `${string}`]: string | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This module provides access to environment variables set _dynamically_ at runtime and that are _publicly_ accessible.
|
||||
*
|
||||
* | | Runtime | Build time |
|
||||
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
||||
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
||||
*
|
||||
* Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
|
||||
*
|
||||
* **_Public_ access:**
|
||||
*
|
||||
* - This module _can_ be imported into client-side code
|
||||
* - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
|
||||
*
|
||||
* > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
|
||||
*
|
||||
* > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
|
||||
* >
|
||||
* > ```env
|
||||
* > MY_FEATURE_FLAG=
|
||||
* > ```
|
||||
* >
|
||||
* > You can override `.env` values from the command line like so:
|
||||
* >
|
||||
* > ```sh
|
||||
* > MY_FEATURE_FLAG="enabled" npm run dev
|
||||
* > ```
|
||||
*
|
||||
* For example, given the following runtime environment:
|
||||
*
|
||||
* ```env
|
||||
* ENVIRONMENT=production
|
||||
* PUBLIC_BASE_URL=http://example.com
|
||||
* ```
|
||||
*
|
||||
* With the default `publicPrefix` and `privatePrefix`:
|
||||
*
|
||||
* ```ts
|
||||
* import { env } from '$env/dynamic/public';
|
||||
* console.log(env.ENVIRONMENT); // => undefined, not public
|
||||
* console.log(env.PUBLIC_BASE_URL); // => "http://example.com"
|
||||
* ```
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
declare module '$env/dynamic/public' {
|
||||
export const env: {
|
||||
[key: `PUBLIC_${string}`]: string | undefined;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
export { matchers } from './matchers.js';
|
||||
|
||||
export const nodes = [
|
||||
() => import('./nodes/0'),
|
||||
() => import('./nodes/1'),
|
||||
() => import('./nodes/2'),
|
||||
() => import('./nodes/3'),
|
||||
() => import('./nodes/4')
|
||||
];
|
||||
|
||||
export const server_loads = [];
|
||||
|
||||
export const dictionary = {
|
||||
"/": [2],
|
||||
"/history": [3],
|
||||
"/settings": [4]
|
||||
};
|
||||
|
||||
export const hooks = {
|
||||
handleError: (({ error }) => { console.error(error) }),
|
||||
|
||||
reroute: (() => {}),
|
||||
transport: {}
|
||||
};
|
||||
|
||||
export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
|
||||
export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode]));
|
||||
|
||||
export const hash = false;
|
||||
|
||||
export const decode = (type, value) => decoders[type](value);
|
||||
|
||||
export { default as root } from '../root.js';
|
||||
@@ -1 +0,0 @@
|
||||
export const matchers = {};
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../src/routes/+layout.svelte";
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../src/routes/+page.svelte";
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../src/routes/history/+page.svelte";
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../src/routes/settings/+page.svelte";
|
||||
@@ -1,3 +0,0 @@
|
||||
import { asClassComponent } from 'svelte/legacy';
|
||||
import Root from './root.svelte';
|
||||
export default asClassComponent(Root);
|
||||
@@ -1,68 +0,0 @@
|
||||
<!-- This file is generated by @sveltejs/kit — do not edit it! -->
|
||||
<svelte:options runes={true} />
|
||||
<script>
|
||||
import { setContext, onMount, tick } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
// stores
|
||||
let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $props();
|
||||
|
||||
if (!browser) {
|
||||
// svelte-ignore state_referenced_locally
|
||||
setContext('__svelte__', stores);
|
||||
}
|
||||
|
||||
if (browser) {
|
||||
$effect.pre(() => stores.page.set(page));
|
||||
} else {
|
||||
// svelte-ignore state_referenced_locally
|
||||
stores.page.set(page);
|
||||
}
|
||||
$effect(() => {
|
||||
stores;page;constructors;components;form;data_0;data_1;
|
||||
stores.page.notify();
|
||||
});
|
||||
|
||||
let mounted = $state(false);
|
||||
let navigated = $state(false);
|
||||
let title = $state(null);
|
||||
|
||||
onMount(() => {
|
||||
const unsubscribe = stores.page.subscribe(() => {
|
||||
if (mounted) {
|
||||
navigated = true;
|
||||
tick().then(() => {
|
||||
title = document.title || 'untitled page';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
mounted = true;
|
||||
return unsubscribe;
|
||||
});
|
||||
|
||||
const Pyramid_1=$derived(constructors[1])
|
||||
</script>
|
||||
|
||||
{#if constructors[1]}
|
||||
{@const Pyramid_0 = constructors[0]}
|
||||
<!-- svelte-ignore binding_property_non_reactive -->
|
||||
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params}>
|
||||
<!-- svelte-ignore binding_property_non_reactive -->
|
||||
<Pyramid_1 bind:this={components[1]} data={data_1} {form} params={page.params} />
|
||||
</Pyramid_0>
|
||||
|
||||
{:else}
|
||||
{@const Pyramid_0 = constructors[0]}
|
||||
<!-- svelte-ignore binding_property_non_reactive -->
|
||||
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params} />
|
||||
|
||||
{/if}
|
||||
|
||||
{#if mounted}
|
||||
<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px">
|
||||
{#if navigated}
|
||||
{title}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1,54 +0,0 @@
|
||||
|
||||
import root from '../root.js';
|
||||
import { set_building, set_prerendering } from '__sveltekit/environment';
|
||||
import { set_assets } from '$app/paths/internal/server';
|
||||
import { set_manifest, set_read_implementation } from '__sveltekit/server';
|
||||
import { set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js';
|
||||
|
||||
export const options = {
|
||||
app_template_contains_nonce: false,
|
||||
async: false,
|
||||
csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}},
|
||||
csrf_check_origin: true,
|
||||
csrf_trusted_origins: [],
|
||||
embedded: false,
|
||||
env_public_prefix: 'PUBLIC_',
|
||||
env_private_prefix: '',
|
||||
hash_routing: false,
|
||||
hooks: null, // added lazily, via `get_hooks`
|
||||
preload_strategy: "modulepreload",
|
||||
root,
|
||||
service_worker: false,
|
||||
service_worker_options: undefined,
|
||||
server_error_boundaries: false,
|
||||
templates: {
|
||||
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\t\t<meta name=\"text-scale\" content=\"scale\" />\n\t\t<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n\t\t<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n\t\t<link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap\" rel=\"stylesheet\">\n\t\t" + head + "\n\t</head>\n\t<body data-sveltekit-preload-data=\"hover\" class=\"bg-black text-slate-200 font-sans antialiased selection:bg-neon-primary/30 selection:text-neon-primary\">\n\t\t<div style=\"display: contents\">" + body + "</div>\n\t</body>\n</html>\n",
|
||||
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
||||
},
|
||||
version_hash: "1jkuefu"
|
||||
};
|
||||
|
||||
export async function get_hooks() {
|
||||
let handle;
|
||||
let handleFetch;
|
||||
let handleError;
|
||||
let handleValidationError;
|
||||
let init;
|
||||
|
||||
|
||||
let reroute;
|
||||
let transport;
|
||||
|
||||
|
||||
return {
|
||||
handle,
|
||||
handleFetch,
|
||||
handleError,
|
||||
handleValidationError,
|
||||
init,
|
||||
reroute,
|
||||
transport
|
||||
};
|
||||
}
|
||||
|
||||
export { set_assets, set_building, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation };
|
||||
Vendored
-45
@@ -1,45 +0,0 @@
|
||||
|
||||
// this file is generated — do not edit it
|
||||
|
||||
|
||||
declare module "svelte/elements" {
|
||||
export interface HTMLAttributes<T> {
|
||||
'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null;
|
||||
'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null;
|
||||
'data-sveltekit-preload-code'?:
|
||||
| true
|
||||
| ''
|
||||
| 'eager'
|
||||
| 'viewport'
|
||||
| 'hover'
|
||||
| 'tap'
|
||||
| 'off'
|
||||
| undefined
|
||||
| null;
|
||||
'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null;
|
||||
'data-sveltekit-reload'?: true | '' | 'off' | undefined | null;
|
||||
'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
|
||||
|
||||
declare module "$app/types" {
|
||||
type MatcherParam<M> = M extends (param : string) => param is (infer U extends string) ? U : string;
|
||||
|
||||
export interface AppTypes {
|
||||
RouteId(): "/" | "/history" | "/settings";
|
||||
RouteParams(): {
|
||||
|
||||
};
|
||||
LayoutParams(): {
|
||||
"/": Record<string, never>;
|
||||
"/history": Record<string, never>;
|
||||
"/settings": Record<string, never>
|
||||
};
|
||||
Pathname(): "/" | "/history" | "/settings";
|
||||
ResolvedPathname(): `${"" | `/${string}`}${ReturnType<AppTypes['Pathname']>}`;
|
||||
Asset(): "/robots.txt" | string & {};
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"$lib": [
|
||||
"../src/lib"
|
||||
],
|
||||
"$lib/*": [
|
||||
"../src/lib/*"
|
||||
],
|
||||
"$app/types": [
|
||||
"./types/index.d.ts"
|
||||
]
|
||||
},
|
||||
"rootDirs": [
|
||||
"..",
|
||||
"./types"
|
||||
],
|
||||
"verbatimModuleSyntax": true,
|
||||
"isolatedModules": true,
|
||||
"lib": [
|
||||
"esnext",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"moduleResolution": "bundler",
|
||||
"module": "esnext",
|
||||
"noEmit": true,
|
||||
"target": "esnext",
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"ambient.d.ts",
|
||||
"non-ambient.d.ts",
|
||||
"./types/**/$types.d.ts",
|
||||
"../vite.config.js",
|
||||
"../vite.config.ts",
|
||||
"../src/**/*.js",
|
||||
"../src/**/*.ts",
|
||||
"../src/**/*.svelte",
|
||||
"../test/**/*.js",
|
||||
"../test/**/*.ts",
|
||||
"../test/**/*.svelte",
|
||||
"../tests/**/*.js",
|
||||
"../tests/**/*.ts",
|
||||
"../tests/**/*.svelte"
|
||||
],
|
||||
"exclude": [
|
||||
"../node_modules/**",
|
||||
"../src/service-worker.js",
|
||||
"../src/service-worker/**/*.js",
|
||||
"../src/service-worker.ts",
|
||||
"../src/service-worker/**/*.ts",
|
||||
"../src/service-worker.d.ts",
|
||||
"../src/service-worker/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"/": [],
|
||||
"/history": [],
|
||||
"/settings": []
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import type * as Kit from '@sveltejs/kit';
|
||||
|
||||
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||
type MatcherParam<M> = M extends (param : string) => param is (infer U extends string) ? U : string;
|
||||
type RouteParams = { };
|
||||
type RouteId = '/';
|
||||
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
||||
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
|
||||
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
|
||||
type EnsureDefined<T> = T extends null | undefined ? {} : T;
|
||||
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
||||
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
||||
type PageParentData = EnsureDefined<LayoutData>;
|
||||
type LayoutRouteId = RouteId | "/" | "/history" | "/settings" | null
|
||||
type LayoutParams = RouteParams & { }
|
||||
type LayoutParentData = EnsureDefined<{}>;
|
||||
|
||||
export type PageServerData = null;
|
||||
export type PageData = Expand<PageParentData>;
|
||||
export type PageProps = { params: RouteParams; data: PageData }
|
||||
export type LayoutServerData = null;
|
||||
export type LayoutData = Expand<LayoutParentData>;
|
||||
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|
||||
@@ -1,17 +0,0 @@
|
||||
import type * as Kit from '@sveltejs/kit';
|
||||
|
||||
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||
type MatcherParam<M> = M extends (param : string) => param is (infer U extends string) ? U : string;
|
||||
type RouteParams = { };
|
||||
type RouteId = '/history';
|
||||
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
||||
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
|
||||
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
|
||||
type EnsureDefined<T> = T extends null | undefined ? {} : T;
|
||||
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
||||
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
||||
type PageParentData = EnsureDefined<import('../$types.js').LayoutData>;
|
||||
|
||||
export type PageServerData = null;
|
||||
export type PageData = Expand<PageParentData>;
|
||||
export type PageProps = { params: RouteParams; data: PageData }
|
||||
@@ -1,17 +0,0 @@
|
||||
import type * as Kit from '@sveltejs/kit';
|
||||
|
||||
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||
type MatcherParam<M> = M extends (param : string) => param is (infer U extends string) ? U : string;
|
||||
type RouteParams = { };
|
||||
type RouteId = '/settings';
|
||||
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
||||
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
|
||||
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
|
||||
type EnsureDefined<T> = T extends null | undefined ? {} : T;
|
||||
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
||||
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
||||
type PageParentData = EnsureDefined<import('../$types.js').LayoutData>;
|
||||
|
||||
export type PageServerData = null;
|
||||
export type PageData = Expand<PageParentData>;
|
||||
export type PageProps = { params: RouteParams; data: PageData }
|
||||
Reference in New Issue
Block a user