@mrmartineau/kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -0
- package/package.json +43 -0
- package/src/biome/biome.json +37 -0
- package/src/components/index.ts +1 -0
- package/src/eslint/index.ts +32 -0
- package/src/hooks/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/oxfmt/.oxfmtrc.json +9 -0
- package/src/oxlint/.oxlintrc.json +18 -0
- package/src/prettier/.prettierrc.json +9 -0
- package/src/sounds/back_001.mp3 +0 -0
- package/src/sounds/back_002.mp3 +0 -0
- package/src/sounds/back_003.mp3 +0 -0
- package/src/sounds/back_004.mp3 +0 -0
- package/src/sounds/bite.mp3 +0 -0
- package/src/sounds/bong_001.mp3 +0 -0
- package/src/sounds/boop.mp3 +0 -0
- package/src/sounds/buy-01.mp3 +0 -0
- package/src/sounds/buy-02.mp3 +0 -0
- package/src/sounds/click-01.mp3 +0 -0
- package/src/sounds/click-02.mp3 +0 -0
- package/src/sounds/click-03.mp3 +0 -0
- package/src/sounds/click-04.mp3 +0 -0
- package/src/sounds/click_001.mp3 +0 -0
- package/src/sounds/click_002.mp3 +0 -0
- package/src/sounds/click_003.mp3 +0 -0
- package/src/sounds/click_004.mp3 +0 -0
- package/src/sounds/click_005.mp3 +0 -0
- package/src/sounds/close_001.mp3 +0 -0
- package/src/sounds/close_002.mp3 +0 -0
- package/src/sounds/close_003.mp3 +0 -0
- package/src/sounds/close_004.mp3 +0 -0
- package/src/sounds/confirmation_001.mp3 +0 -0
- package/src/sounds/confirmation_002.mp3 +0 -0
- package/src/sounds/confirmation_003.mp3 +0 -0
- package/src/sounds/confirmation_004.mp3 +0 -0
- package/src/sounds/disable-sound.mp3 +0 -0
- package/src/sounds/drop_001.mp3 +0 -0
- package/src/sounds/drop_002.mp3 +0 -0
- package/src/sounds/drop_003.mp3 +0 -0
- package/src/sounds/drop_004.mp3 +0 -0
- package/src/sounds/enable-sound.mp3 +0 -0
- package/src/sounds/error_001.mp3 +0 -0
- package/src/sounds/error_002.mp3 +0 -0
- package/src/sounds/error_003.mp3 +0 -0
- package/src/sounds/error_004.mp3 +0 -0
- package/src/sounds/error_005.mp3 +0 -0
- package/src/sounds/error_006.mp3 +0 -0
- package/src/sounds/error_007.mp3 +0 -0
- package/src/sounds/error_008.mp3 +0 -0
- package/src/sounds/glass_001.mp3 +0 -0
- package/src/sounds/glass_002.mp3 +0 -0
- package/src/sounds/glass_003.mp3 +0 -0
- package/src/sounds/glass_004.mp3 +0 -0
- package/src/sounds/glass_005.mp3 +0 -0
- package/src/sounds/glass_006.mp3 +0 -0
- package/src/sounds/glitch_001.mp3 +0 -0
- package/src/sounds/glitch_002.mp3 +0 -0
- package/src/sounds/glitch_003.mp3 +0 -0
- package/src/sounds/glitch_004.mp3 +0 -0
- package/src/sounds/index.ts +177 -0
- package/src/sounds/maximize_001.mp3 +0 -0
- package/src/sounds/maximize_002.mp3 +0 -0
- package/src/sounds/maximize_003.mp3 +0 -0
- package/src/sounds/maximize_004.mp3 +0 -0
- package/src/sounds/maximize_005.mp3 +0 -0
- package/src/sounds/maximize_006.mp3 +0 -0
- package/src/sounds/maximize_007.mp3 +0 -0
- package/src/sounds/maximize_008.mp3 +0 -0
- package/src/sounds/maximize_009.mp3 +0 -0
- package/src/sounds/menu-open.mp3 +0 -0
- package/src/sounds/minimize_001.mp3 +0 -0
- package/src/sounds/minimize_002.mp3 +0 -0
- package/src/sounds/minimize_003.mp3 +0 -0
- package/src/sounds/minimize_004.mp3 +0 -0
- package/src/sounds/minimize_005.mp3 +0 -0
- package/src/sounds/minimize_006.mp3 +0 -0
- package/src/sounds/minimize_007.mp3 +0 -0
- package/src/sounds/minimize_008.mp3 +0 -0
- package/src/sounds/minimize_009.mp3 +0 -0
- package/src/sounds/open_001.mp3 +0 -0
- package/src/sounds/open_002.mp3 +0 -0
- package/src/sounds/open_003.mp3 +0 -0
- package/src/sounds/open_004.mp3 +0 -0
- package/src/sounds/pluck_001.mp3 +0 -0
- package/src/sounds/pluck_002.mp3 +0 -0
- package/src/sounds/plunger-immediate.mp3 +0 -0
- package/src/sounds/pop-down.mp3 +0 -0
- package/src/sounds/pop-off.mp3 +0 -0
- package/src/sounds/pop-on.mp3 +0 -0
- package/src/sounds/pop-up-off.mp3 +0 -0
- package/src/sounds/pop-up-on.mp3 +0 -0
- package/src/sounds/pop.mp3 +0 -0
- package/src/sounds/question_001.mp3 +0 -0
- package/src/sounds/question_002.mp3 +0 -0
- package/src/sounds/question_003.mp3 +0 -0
- package/src/sounds/question_004.mp3 +0 -0
- package/src/sounds/rising-pops.mp3 +0 -0
- package/src/sounds/scratch_001.mp3 +0 -0
- package/src/sounds/scratch_002.mp3 +0 -0
- package/src/sounds/scratch_003.mp3 +0 -0
- package/src/sounds/scratch_004.mp3 +0 -0
- package/src/sounds/scratch_005.mp3 +0 -0
- package/src/sounds/scroll_001.mp3 +0 -0
- package/src/sounds/scroll_002.mp3 +0 -0
- package/src/sounds/scroll_003.mp3 +0 -0
- package/src/sounds/scroll_004.mp3 +0 -0
- package/src/sounds/scroll_005.mp3 +0 -0
- package/src/sounds/select_001.mp3 +0 -0
- package/src/sounds/select_002.mp3 +0 -0
- package/src/sounds/select_003.mp3 +0 -0
- package/src/sounds/select_004.mp3 +0 -0
- package/src/sounds/select_005.mp3 +0 -0
- package/src/sounds/select_006.mp3 +0 -0
- package/src/sounds/select_007.mp3 +0 -0
- package/src/sounds/select_008.mp3 +0 -0
- package/src/sounds/switch-off.mp3 +0 -0
- package/src/sounds/switch-on.mp3 +0 -0
- package/src/sounds/switch_001.mp3 +0 -0
- package/src/sounds/switch_002.mp3 +0 -0
- package/src/sounds/switch_003.mp3 +0 -0
- package/src/sounds/switch_004.mp3 +0 -0
- package/src/sounds/switch_005.mp3 +0 -0
- package/src/sounds/switch_006.mp3 +0 -0
- package/src/sounds/switch_007.mp3 +0 -0
- package/src/sounds/tick_001.mp3 +0 -0
- package/src/sounds/tick_002.mp3 +0 -0
- package/src/sounds/tick_004.mp3 +0 -0
- package/src/sounds/toggle_001.mp3 +0 -0
- package/src/sounds/toggle_002.mp3 +0 -0
- package/src/sounds/toggle_003.mp3 +0 -0
- package/src/sounds/toggle_004.mp3 +0 -0
- package/src/utils/index.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# @mrmartineau/kit
|
|
2
|
+
|
|
3
|
+
A personal collection of sounds, utilities, components, and hooks for use across projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @mrmartineau/kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This package provides **configuration files and static assets only** — it does not install the underlying tools. Install whichever tools you actually need in your project:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Biome (linter + formatter)
|
|
15
|
+
bun add -d @biomejs/biome
|
|
16
|
+
|
|
17
|
+
# oxc (linter + formatter)
|
|
18
|
+
bun add -d oxlint oxfmt
|
|
19
|
+
|
|
20
|
+
# ESLint + Prettier
|
|
21
|
+
bun add -d eslint prettier
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
You don't need all of them — just pick the tools you want to use and reference the matching config from this package.
|
|
25
|
+
|
|
26
|
+
## Project structure
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
src/
|
|
30
|
+
├── biome/ # Shared Biome config
|
|
31
|
+
├── eslint/ # Shared ESLint flat config
|
|
32
|
+
├── oxfmt/ # Shared oxfmt config
|
|
33
|
+
├── oxlint/ # Shared oxlint config
|
|
34
|
+
├── prettier/ # Shared Prettier config
|
|
35
|
+
├── sounds/ # Static audio assets (.mp3) — not bundled
|
|
36
|
+
├── utils/ # Utility functions
|
|
37
|
+
├── components/ # Reusable components
|
|
38
|
+
├── hooks/ # Reusable hooks
|
|
39
|
+
└── scripts/ # Standalone scripts
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
### Sounds
|
|
45
|
+
|
|
46
|
+
Sound files are exposed as raw `.mp3` files via subpath exports — they are **not** bundled or transformed. Your bundler or runtime resolves them as static assets.
|
|
47
|
+
|
|
48
|
+
**Import a sound file directly:**
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
// Resolves to the raw .mp3 file in node_modules
|
|
52
|
+
import clickSound from '@mrmartineau/kit/sounds/click_001.mp3'
|
|
53
|
+
|
|
54
|
+
// Use with Audio API
|
|
55
|
+
const audio = new Audio(clickSound)
|
|
56
|
+
audio.play()
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Use the metadata module for programmatic access:**
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import {
|
|
63
|
+
sounds,
|
|
64
|
+
soundCategories,
|
|
65
|
+
getSoundsByCategory,
|
|
66
|
+
getSoundPath,
|
|
67
|
+
} from '@mrmartineau/kit/sounds'
|
|
68
|
+
|
|
69
|
+
// List all sound names
|
|
70
|
+
console.log(sounds)
|
|
71
|
+
|
|
72
|
+
// Get all sounds in a category
|
|
73
|
+
const clickSounds = getSoundsByCategory('click')
|
|
74
|
+
// => ["click_001", "click_002", "click_003", "click_004", "click_005"]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Available sound categories:** back, bite, bong, boop, buy, click, close, confirmation, disable, drop, enable, error, glass, glitch, maximize, menu, minimize, open, pluck, plunger, pop, question, rising, scratch, scroll, select, switch, tick, toggle
|
|
78
|
+
|
|
79
|
+
### Biome
|
|
80
|
+
|
|
81
|
+
Shared [Biome](https://biomejs.dev) config for linting and formatting. Biome natively supports extending from packages via its `extends` field.
|
|
82
|
+
|
|
83
|
+
In your project's `biome.json`:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
|
|
88
|
+
"extends": ["@mrmartineau/kit/biome"]
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Included settings:** space indentation, single quotes, no semicolons, import sorting, sorted keys, recommended lint rules, React domain rules.
|
|
93
|
+
|
|
94
|
+
### oxlint
|
|
95
|
+
|
|
96
|
+
Shared [oxlint](https://oxc.rs/docs/guide/usage/linter/config) config. Reference it via `extends` in your `.oxlintrc.json`:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
101
|
+
"extends": ["./node_modules/@mrmartineau/kit/src/oxlint/.oxlintrc.json"]
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Included settings:** correctness (error), suspicious + perf (warn), typescript/unicorn/import/react/jsx-a11y plugins, no-console warn, no-debugger error.
|
|
106
|
+
|
|
107
|
+
### oxfmt
|
|
108
|
+
|
|
109
|
+
Shared [oxfmt](https://oxc.rs/docs/guide/usage/formatter) config. Reference it when running oxfmt:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
oxfmt -c ./node_modules/@mrmartineau/kit/src/oxfmt/.oxfmtrc.json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Or copy the settings into your own `.oxfmtrc.json`. The settings are kept consistent with the Biome config: single quotes, no semicolons, 2-space indentation, 100 print width.
|
|
116
|
+
|
|
117
|
+
### ESLint
|
|
118
|
+
|
|
119
|
+
Shared [ESLint](https://eslint.org) flat config with sensible base rules (no formatting rules — use Prettier/Biome/oxfmt for that).
|
|
120
|
+
|
|
121
|
+
In your project's `eslint.config.ts` (or `.js`):
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import packConfig from '@mrmartineau/kit/eslint'
|
|
125
|
+
import { defineConfig } from 'eslint/config'
|
|
126
|
+
|
|
127
|
+
export default defineConfig([
|
|
128
|
+
{
|
|
129
|
+
files: ['**/*.{ts,tsx,js,jsx}'],
|
|
130
|
+
extends: [packConfig],
|
|
131
|
+
},
|
|
132
|
+
])
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Included rules:** prefer-const, no-var, no-console (warn), no-debugger (error), eqeqeq, object-shorthand, prefer-template, prefer-arrow-callback, curly (multi-line). Add your own TypeScript/React plugins on top.
|
|
136
|
+
|
|
137
|
+
### Prettier
|
|
138
|
+
|
|
139
|
+
Shared [Prettier](https://prettier.io) config. Reference it in your `package.json`:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"prettier": "@mrmartineau/kit/prettier"
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Or create a `.prettierrc.json`:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
"@mrmartineau/kit/prettier"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Included settings:** single quotes, no semicolons, 2-space indentation, trailing commas, 100 print width.
|
|
154
|
+
|
|
155
|
+
### Utils, Components, Hooks
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
import { ... } from "@mrmartineau/kit/utils";
|
|
159
|
+
import { ... } from "@mrmartineau/kit/components";
|
|
160
|
+
import { ... } from "@mrmartineau/kit/hooks";
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Exports map
|
|
164
|
+
|
|
165
|
+
| Specifier | Resolves to |
|
|
166
|
+
| ------------------------------- | -------------------------------- |
|
|
167
|
+
| `@mrmartineau/kit` | `src/index.ts` |
|
|
168
|
+
| `@mrmartineau/kit/biome` | `src/biome/biome.json` |
|
|
169
|
+
| `@mrmartineau/kit/eslint` | `src/eslint/index.ts` |
|
|
170
|
+
| `@mrmartineau/kit/oxlint` | `src/oxlint/.oxlintrc.json` |
|
|
171
|
+
| `@mrmartineau/kit/oxfmt` | `src/oxfmt/.oxfmtrc.json` |
|
|
172
|
+
| `@mrmartineau/kit/prettier` | `src/prettier/.prettierrc.json` |
|
|
173
|
+
| `@mrmartineau/kit/sounds` | `src/sounds/index.ts` (metadata) |
|
|
174
|
+
| `@mrmartineau/kit/sounds/*.mp3` | `src/sounds/*.mp3` (raw files) |
|
|
175
|
+
| `@mrmartineau/kit/utils` | `src/utils/index.ts` |
|
|
176
|
+
| `@mrmartineau/kit/components` | `src/components/index.ts` |
|
|
177
|
+
| `@mrmartineau/kit/hooks` | `src/hooks/index.ts` |
|
|
178
|
+
|
|
179
|
+
## Attribution
|
|
180
|
+
|
|
181
|
+
### Sounds
|
|
182
|
+
|
|
183
|
+
Sounds by [Kenney](https://www.kenney.nl), licensed under [CC0 1.0](http://creativecommons.org/publicdomain/zero/1.0/) and some from [use-sound](https://github.com/joshwcomeau/use-sound) by [Josh Comeau](https://www.joshwcomeau.com/)
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mrmartineau/kit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./src/index.ts",
|
|
10
|
+
"./biome": "./src/biome/biome.json",
|
|
11
|
+
"./components": "./src/components/index.ts",
|
|
12
|
+
"./eslint": "./src/eslint/index.ts",
|
|
13
|
+
"./hooks": "./src/hooks/index.ts",
|
|
14
|
+
"./oxfmt": "./src/oxfmt/.oxfmtrc.json",
|
|
15
|
+
"./oxlint": "./src/oxlint/.oxlintrc.json",
|
|
16
|
+
"./prettier": "./src/prettier/.prettierrc.json",
|
|
17
|
+
"./sounds": "./src/sounds/index.ts",
|
|
18
|
+
"./sounds/*": "./src/sounds/*",
|
|
19
|
+
"./utils": "./src/utils/index.ts"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"src"
|
|
23
|
+
],
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/bun": "latest",
|
|
26
|
+
"@types/eslint": "^9.6.1"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"eslint": "",
|
|
30
|
+
"typescript": "^5"
|
|
31
|
+
},
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"eslint": {
|
|
34
|
+
"optional": true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"release-it": "^19.2.4"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"release": "release-it"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
|
|
3
|
+
"assist": {
|
|
4
|
+
"actions": {
|
|
5
|
+
"source": {
|
|
6
|
+
"organizeImports": "on",
|
|
7
|
+
"useSortedKeys": "on"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"enabled": true
|
|
11
|
+
},
|
|
12
|
+
"formatter": {
|
|
13
|
+
"enabled": true,
|
|
14
|
+
"formatWithErrors": true,
|
|
15
|
+
"indentStyle": "space"
|
|
16
|
+
},
|
|
17
|
+
"javascript": {
|
|
18
|
+
"formatter": {
|
|
19
|
+
"quoteStyle": "single",
|
|
20
|
+
"semicolons": "asNeeded"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"linter": {
|
|
24
|
+
"domains": {
|
|
25
|
+
"react": "recommended"
|
|
26
|
+
},
|
|
27
|
+
"enabled": true,
|
|
28
|
+
"rules": {
|
|
29
|
+
"recommended": true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"vcs": {
|
|
33
|
+
"clientKind": "git",
|
|
34
|
+
"enabled": true,
|
|
35
|
+
"useIgnoreFile": true
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Components — add exports here
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Linter } from 'eslint'
|
|
2
|
+
|
|
3
|
+
const config: Linter.Config[] = [
|
|
4
|
+
{
|
|
5
|
+
name: '@mrmartineau/kit/base',
|
|
6
|
+
rules: {
|
|
7
|
+
'no-console': 'warn',
|
|
8
|
+
'no-debugger': 'error',
|
|
9
|
+
'no-alert': 'warn',
|
|
10
|
+
'prefer-const': 'error',
|
|
11
|
+
'no-var': 'error',
|
|
12
|
+
'object-shorthand': 'error',
|
|
13
|
+
'prefer-template': 'error',
|
|
14
|
+
'prefer-arrow-callback': 'error',
|
|
15
|
+
'no-restricted-imports': [
|
|
16
|
+
'error',
|
|
17
|
+
{
|
|
18
|
+
patterns: [
|
|
19
|
+
{
|
|
20
|
+
group: ['../*'],
|
|
21
|
+
message: 'Prefer absolute imports over relative parent imports.',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
eqeqeq: ['error', 'always'],
|
|
27
|
+
curly: ['error', 'multi-line'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
export default config
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Hooks — add exports here
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./sounds/index.ts";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"categories": {
|
|
4
|
+
"correctness": "error",
|
|
5
|
+
"perf": "warn",
|
|
6
|
+
"suspicious": "warn"
|
|
7
|
+
},
|
|
8
|
+
"env": {
|
|
9
|
+
"browser": true,
|
|
10
|
+
"es2024": true
|
|
11
|
+
},
|
|
12
|
+
"plugins": ["typescript", "unicorn", "import", "react", "jsx-a11y"],
|
|
13
|
+
"rules": {
|
|
14
|
+
"no-console": "warn",
|
|
15
|
+
"no-debugger": "error",
|
|
16
|
+
"typescript/no-explicit-any": "warn"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
export const soundCategories = [
|
|
2
|
+
"back",
|
|
3
|
+
"bite",
|
|
4
|
+
"bong",
|
|
5
|
+
"boop",
|
|
6
|
+
"buy",
|
|
7
|
+
"click",
|
|
8
|
+
"close",
|
|
9
|
+
"confirmation",
|
|
10
|
+
"disable",
|
|
11
|
+
"drop",
|
|
12
|
+
"enable",
|
|
13
|
+
"error",
|
|
14
|
+
"glass",
|
|
15
|
+
"glitch",
|
|
16
|
+
"maximize",
|
|
17
|
+
"menu",
|
|
18
|
+
"minimize",
|
|
19
|
+
"open",
|
|
20
|
+
"pluck",
|
|
21
|
+
"plunger",
|
|
22
|
+
"pop",
|
|
23
|
+
"question",
|
|
24
|
+
"rising",
|
|
25
|
+
"scratch",
|
|
26
|
+
"scroll",
|
|
27
|
+
"select",
|
|
28
|
+
"switch",
|
|
29
|
+
"tick",
|
|
30
|
+
"toggle",
|
|
31
|
+
] as const;
|
|
32
|
+
|
|
33
|
+
export type SoundCategory = (typeof soundCategories)[number];
|
|
34
|
+
|
|
35
|
+
export const sounds = [
|
|
36
|
+
"back_001",
|
|
37
|
+
"back_002",
|
|
38
|
+
"back_003",
|
|
39
|
+
"back_004",
|
|
40
|
+
"bite",
|
|
41
|
+
"bong_001",
|
|
42
|
+
"boop",
|
|
43
|
+
"buy-01",
|
|
44
|
+
"buy-02",
|
|
45
|
+
"click_001",
|
|
46
|
+
"click_002",
|
|
47
|
+
"click_003",
|
|
48
|
+
"click_004",
|
|
49
|
+
"click_005",
|
|
50
|
+
"click-01",
|
|
51
|
+
"click-02",
|
|
52
|
+
"click-03",
|
|
53
|
+
"click-04",
|
|
54
|
+
"close_001",
|
|
55
|
+
"close_002",
|
|
56
|
+
"close_003",
|
|
57
|
+
"close_004",
|
|
58
|
+
"confirmation_001",
|
|
59
|
+
"confirmation_002",
|
|
60
|
+
"confirmation_003",
|
|
61
|
+
"confirmation_004",
|
|
62
|
+
"disable-sound",
|
|
63
|
+
"drop_001",
|
|
64
|
+
"drop_002",
|
|
65
|
+
"drop_003",
|
|
66
|
+
"drop_004",
|
|
67
|
+
"enable-sound",
|
|
68
|
+
"error_001",
|
|
69
|
+
"error_002",
|
|
70
|
+
"error_003",
|
|
71
|
+
"error_004",
|
|
72
|
+
"error_005",
|
|
73
|
+
"error_006",
|
|
74
|
+
"error_007",
|
|
75
|
+
"error_008",
|
|
76
|
+
"glass_001",
|
|
77
|
+
"glass_002",
|
|
78
|
+
"glass_003",
|
|
79
|
+
"glass_004",
|
|
80
|
+
"glass_005",
|
|
81
|
+
"glass_006",
|
|
82
|
+
"glitch_001",
|
|
83
|
+
"glitch_002",
|
|
84
|
+
"glitch_003",
|
|
85
|
+
"glitch_004",
|
|
86
|
+
"maximize_001",
|
|
87
|
+
"maximize_002",
|
|
88
|
+
"maximize_003",
|
|
89
|
+
"maximize_004",
|
|
90
|
+
"maximize_005",
|
|
91
|
+
"maximize_006",
|
|
92
|
+
"maximize_007",
|
|
93
|
+
"maximize_008",
|
|
94
|
+
"maximize_009",
|
|
95
|
+
"menu-open",
|
|
96
|
+
"minimize_001",
|
|
97
|
+
"minimize_002",
|
|
98
|
+
"minimize_003",
|
|
99
|
+
"minimize_004",
|
|
100
|
+
"minimize_005",
|
|
101
|
+
"minimize_006",
|
|
102
|
+
"minimize_007",
|
|
103
|
+
"minimize_008",
|
|
104
|
+
"minimize_009",
|
|
105
|
+
"open_001",
|
|
106
|
+
"open_002",
|
|
107
|
+
"open_003",
|
|
108
|
+
"open_004",
|
|
109
|
+
"pluck_001",
|
|
110
|
+
"pluck_002",
|
|
111
|
+
"plunger-immediate",
|
|
112
|
+
"pop",
|
|
113
|
+
"pop-down",
|
|
114
|
+
"pop-off",
|
|
115
|
+
"pop-on",
|
|
116
|
+
"pop-up-off",
|
|
117
|
+
"pop-up-on",
|
|
118
|
+
"question_001",
|
|
119
|
+
"question_002",
|
|
120
|
+
"question_003",
|
|
121
|
+
"question_004",
|
|
122
|
+
"rising-pops",
|
|
123
|
+
"scratch_001",
|
|
124
|
+
"scratch_002",
|
|
125
|
+
"scratch_003",
|
|
126
|
+
"scratch_004",
|
|
127
|
+
"scratch_005",
|
|
128
|
+
"scroll_001",
|
|
129
|
+
"scroll_002",
|
|
130
|
+
"scroll_003",
|
|
131
|
+
"scroll_004",
|
|
132
|
+
"scroll_005",
|
|
133
|
+
"select_001",
|
|
134
|
+
"select_002",
|
|
135
|
+
"select_003",
|
|
136
|
+
"select_004",
|
|
137
|
+
"select_005",
|
|
138
|
+
"select_006",
|
|
139
|
+
"select_007",
|
|
140
|
+
"select_008",
|
|
141
|
+
"switch_001",
|
|
142
|
+
"switch_002",
|
|
143
|
+
"switch_003",
|
|
144
|
+
"switch_004",
|
|
145
|
+
"switch_005",
|
|
146
|
+
"switch_006",
|
|
147
|
+
"switch_007",
|
|
148
|
+
"switch-off",
|
|
149
|
+
"switch-on",
|
|
150
|
+
"tick_001",
|
|
151
|
+
"tick_002",
|
|
152
|
+
"tick_004",
|
|
153
|
+
"toggle_001",
|
|
154
|
+
"toggle_002",
|
|
155
|
+
"toggle_003",
|
|
156
|
+
"toggle_004",
|
|
157
|
+
] as const;
|
|
158
|
+
|
|
159
|
+
export type SoundName = (typeof sounds)[number];
|
|
160
|
+
|
|
161
|
+
export function getSoundsByCategory(category: SoundCategory): SoundName[] {
|
|
162
|
+
return sounds.filter((s) => s.startsWith(category)) as SoundName[];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Returns the subpath import specifier for a sound file.
|
|
167
|
+
* Use with `new URL()` or your bundler's asset handling.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* const path = getSoundPath("click_001");
|
|
172
|
+
* // => "@mrmartineau/kit/sounds/click_001.mp3"
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
export function getSoundPath(name: SoundName): string {
|
|
176
|
+
return `@mrmartineau/kit/sounds/${name}.mp3`;
|
|
177
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Utility functions — add exports here
|