@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.
Files changed (133) hide show
  1. package/README.md +183 -0
  2. package/package.json +43 -0
  3. package/src/biome/biome.json +37 -0
  4. package/src/components/index.ts +1 -0
  5. package/src/eslint/index.ts +32 -0
  6. package/src/hooks/index.ts +1 -0
  7. package/src/index.ts +1 -0
  8. package/src/oxfmt/.oxfmtrc.json +9 -0
  9. package/src/oxlint/.oxlintrc.json +18 -0
  10. package/src/prettier/.prettierrc.json +9 -0
  11. package/src/sounds/back_001.mp3 +0 -0
  12. package/src/sounds/back_002.mp3 +0 -0
  13. package/src/sounds/back_003.mp3 +0 -0
  14. package/src/sounds/back_004.mp3 +0 -0
  15. package/src/sounds/bite.mp3 +0 -0
  16. package/src/sounds/bong_001.mp3 +0 -0
  17. package/src/sounds/boop.mp3 +0 -0
  18. package/src/sounds/buy-01.mp3 +0 -0
  19. package/src/sounds/buy-02.mp3 +0 -0
  20. package/src/sounds/click-01.mp3 +0 -0
  21. package/src/sounds/click-02.mp3 +0 -0
  22. package/src/sounds/click-03.mp3 +0 -0
  23. package/src/sounds/click-04.mp3 +0 -0
  24. package/src/sounds/click_001.mp3 +0 -0
  25. package/src/sounds/click_002.mp3 +0 -0
  26. package/src/sounds/click_003.mp3 +0 -0
  27. package/src/sounds/click_004.mp3 +0 -0
  28. package/src/sounds/click_005.mp3 +0 -0
  29. package/src/sounds/close_001.mp3 +0 -0
  30. package/src/sounds/close_002.mp3 +0 -0
  31. package/src/sounds/close_003.mp3 +0 -0
  32. package/src/sounds/close_004.mp3 +0 -0
  33. package/src/sounds/confirmation_001.mp3 +0 -0
  34. package/src/sounds/confirmation_002.mp3 +0 -0
  35. package/src/sounds/confirmation_003.mp3 +0 -0
  36. package/src/sounds/confirmation_004.mp3 +0 -0
  37. package/src/sounds/disable-sound.mp3 +0 -0
  38. package/src/sounds/drop_001.mp3 +0 -0
  39. package/src/sounds/drop_002.mp3 +0 -0
  40. package/src/sounds/drop_003.mp3 +0 -0
  41. package/src/sounds/drop_004.mp3 +0 -0
  42. package/src/sounds/enable-sound.mp3 +0 -0
  43. package/src/sounds/error_001.mp3 +0 -0
  44. package/src/sounds/error_002.mp3 +0 -0
  45. package/src/sounds/error_003.mp3 +0 -0
  46. package/src/sounds/error_004.mp3 +0 -0
  47. package/src/sounds/error_005.mp3 +0 -0
  48. package/src/sounds/error_006.mp3 +0 -0
  49. package/src/sounds/error_007.mp3 +0 -0
  50. package/src/sounds/error_008.mp3 +0 -0
  51. package/src/sounds/glass_001.mp3 +0 -0
  52. package/src/sounds/glass_002.mp3 +0 -0
  53. package/src/sounds/glass_003.mp3 +0 -0
  54. package/src/sounds/glass_004.mp3 +0 -0
  55. package/src/sounds/glass_005.mp3 +0 -0
  56. package/src/sounds/glass_006.mp3 +0 -0
  57. package/src/sounds/glitch_001.mp3 +0 -0
  58. package/src/sounds/glitch_002.mp3 +0 -0
  59. package/src/sounds/glitch_003.mp3 +0 -0
  60. package/src/sounds/glitch_004.mp3 +0 -0
  61. package/src/sounds/index.ts +177 -0
  62. package/src/sounds/maximize_001.mp3 +0 -0
  63. package/src/sounds/maximize_002.mp3 +0 -0
  64. package/src/sounds/maximize_003.mp3 +0 -0
  65. package/src/sounds/maximize_004.mp3 +0 -0
  66. package/src/sounds/maximize_005.mp3 +0 -0
  67. package/src/sounds/maximize_006.mp3 +0 -0
  68. package/src/sounds/maximize_007.mp3 +0 -0
  69. package/src/sounds/maximize_008.mp3 +0 -0
  70. package/src/sounds/maximize_009.mp3 +0 -0
  71. package/src/sounds/menu-open.mp3 +0 -0
  72. package/src/sounds/minimize_001.mp3 +0 -0
  73. package/src/sounds/minimize_002.mp3 +0 -0
  74. package/src/sounds/minimize_003.mp3 +0 -0
  75. package/src/sounds/minimize_004.mp3 +0 -0
  76. package/src/sounds/minimize_005.mp3 +0 -0
  77. package/src/sounds/minimize_006.mp3 +0 -0
  78. package/src/sounds/minimize_007.mp3 +0 -0
  79. package/src/sounds/minimize_008.mp3 +0 -0
  80. package/src/sounds/minimize_009.mp3 +0 -0
  81. package/src/sounds/open_001.mp3 +0 -0
  82. package/src/sounds/open_002.mp3 +0 -0
  83. package/src/sounds/open_003.mp3 +0 -0
  84. package/src/sounds/open_004.mp3 +0 -0
  85. package/src/sounds/pluck_001.mp3 +0 -0
  86. package/src/sounds/pluck_002.mp3 +0 -0
  87. package/src/sounds/plunger-immediate.mp3 +0 -0
  88. package/src/sounds/pop-down.mp3 +0 -0
  89. package/src/sounds/pop-off.mp3 +0 -0
  90. package/src/sounds/pop-on.mp3 +0 -0
  91. package/src/sounds/pop-up-off.mp3 +0 -0
  92. package/src/sounds/pop-up-on.mp3 +0 -0
  93. package/src/sounds/pop.mp3 +0 -0
  94. package/src/sounds/question_001.mp3 +0 -0
  95. package/src/sounds/question_002.mp3 +0 -0
  96. package/src/sounds/question_003.mp3 +0 -0
  97. package/src/sounds/question_004.mp3 +0 -0
  98. package/src/sounds/rising-pops.mp3 +0 -0
  99. package/src/sounds/scratch_001.mp3 +0 -0
  100. package/src/sounds/scratch_002.mp3 +0 -0
  101. package/src/sounds/scratch_003.mp3 +0 -0
  102. package/src/sounds/scratch_004.mp3 +0 -0
  103. package/src/sounds/scratch_005.mp3 +0 -0
  104. package/src/sounds/scroll_001.mp3 +0 -0
  105. package/src/sounds/scroll_002.mp3 +0 -0
  106. package/src/sounds/scroll_003.mp3 +0 -0
  107. package/src/sounds/scroll_004.mp3 +0 -0
  108. package/src/sounds/scroll_005.mp3 +0 -0
  109. package/src/sounds/select_001.mp3 +0 -0
  110. package/src/sounds/select_002.mp3 +0 -0
  111. package/src/sounds/select_003.mp3 +0 -0
  112. package/src/sounds/select_004.mp3 +0 -0
  113. package/src/sounds/select_005.mp3 +0 -0
  114. package/src/sounds/select_006.mp3 +0 -0
  115. package/src/sounds/select_007.mp3 +0 -0
  116. package/src/sounds/select_008.mp3 +0 -0
  117. package/src/sounds/switch-off.mp3 +0 -0
  118. package/src/sounds/switch-on.mp3 +0 -0
  119. package/src/sounds/switch_001.mp3 +0 -0
  120. package/src/sounds/switch_002.mp3 +0 -0
  121. package/src/sounds/switch_003.mp3 +0 -0
  122. package/src/sounds/switch_004.mp3 +0 -0
  123. package/src/sounds/switch_005.mp3 +0 -0
  124. package/src/sounds/switch_006.mp3 +0 -0
  125. package/src/sounds/switch_007.mp3 +0 -0
  126. package/src/sounds/tick_001.mp3 +0 -0
  127. package/src/sounds/tick_002.mp3 +0 -0
  128. package/src/sounds/tick_004.mp3 +0 -0
  129. package/src/sounds/toggle_001.mp3 +0 -0
  130. package/src/sounds/toggle_002.mp3 +0 -0
  131. package/src/sounds/toggle_003.mp3 +0 -0
  132. package/src/sounds/toggle_004.mp3 +0 -0
  133. 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,9 @@
1
+ {
2
+ "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
+ "printWidth": 100,
4
+ "semi": false,
5
+ "singleQuote": true,
6
+ "tabWidth": 2,
7
+ "trailingComma": "all",
8
+ "useTabs": false
9
+ }
@@ -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
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "semi": false,
4
+ "singleQuote": true,
5
+ "tabWidth": 2,
6
+ "trailingComma": "all",
7
+ "useTabs": false,
8
+ "printWidth": 100
9
+ }
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