Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
344 lines (344 loc) · 11.5 KB
/
Copy pathpackage.json
File metadata and controls
344 lines (344 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
{
"name": "root",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/TanStack/hotkeys.git"
},
"packageManager": "pnpm@12.18.0",
"engines": {
"pnpm": ">=12.6.0",
"node": "^22.22.3 || ^24.15.0 || >=26.0.0"
},
"type": "module",
"scripts": {
"build": "nx affected --skip-nx-cache --targets=build --exclude=examples/** && nx run-many --targets=build --exclude=examples/** && size-limit",
"build:all": "nx run-many --targets=build --exclude=examples/** && size-limit",
"build:core": "nx run-many --targets=build --projects=packages/hotkeys",
"changeset": "changeset",
"changeset:publish": "changeset publish",
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile && pnpm format",
"clean": "find . -name 'dist' -type d -prune -exec rm -rf {} +",
"clean:node_modules": "find . -name 'node_modules' -type d -prune -exec rm -rf {} +",
"clean:all": "pnpm run clean && pnpm run clean:node_modules",
"copy:readme": "cp README.md packages/hotkeys/README.md && cp README.md packages/hotkeys-devtools/README.md && cp README.md packages/angular-hotkeys/README.md && cp README.md packages/react-hotkeys/README.md && cp README.md packages/react-hotkeys-devtools/README.md && cp README.md packages/preact-hotkeys/README.md && cp README.md packages/preact-hotkeys-devtools/README.md && cp README.md packages/solid-hotkeys/README.md && cp README.md packages/solid-hotkeys-devtools/README.md && cp README.md packages/vue-hotkeys/README.md && cp README.md packages/vue-hotkeys-devtools/README.md && cp README.md packages/lit-hotkeys/README.md && cp README.md packages/svelte-hotkeys/README.md && cp README.md packages/alpine-hotkeys/README.md && cp README.md packages/ember-hotkeys/README.md && cp README.md packages/octane-hotkeys/README.md && cp README.md packages/angular-hotkeys-devtools/README.md && cp README.md packages/svelte-hotkeys-devtools/README.md",
"dev": "pnpm run watch",
"format": "oxfmt",
"format:check": "oxfmt --check",
"generate-docs": "node scripts/generate-docs.ts && pnpm run copy:readme",
"generate:layout-table": "node scripts/layout-table/generate.ts",
"lint": "nx affected --target=lint --exclude=examples/**",
"lint:all": "pnpm run test:oxlint && pnpm run test:eslint && nx run-many --target=lint --projects=\"examples/**\"",
"lint:fix": "nx affected --target=lint:fix --exclude=examples/**",
"lint:fix:all": "nx run-many --targets=lint:fix",
"test": "pnpm run test:ci",
"test:ci": "pnpm run lint:all && nx run-many --targets=test:sherif,test:knip,test:docs,test:lib,test:types,test:build,build && size-limit",
"test:docs": "node scripts/verify-links.ts",
"test:e2e": "pnpm --filter @tanstack/hotkeys-e2e test:e2e",
"test:e2e:adapters": "nx run-many --skip-nx-cache --targets=build --projects='@tanstack/hotkeys-e2e-app-*' && pnpm --filter @tanstack/hotkeys-e2e test:e2e:adapters",
"test:e2e:layouts": "pnpm --filter @tanstack/hotkeys-e2e test:e2e:layouts",
"test:e2e:layouts:docker": "pnpm --filter @tanstack/hotkeys-e2e test:e2e:layouts:docker",
"test:e2e:ember-compat": "nx run @tanstack/ember-hotkeys:build && pnpm --filter @tanstack/hotkeys-e2e test:e2e:ember-compat",
"test:e2e:ssr": "nx run-many --skip-nx-cache --targets=build --projects='@tanstack/hotkeys-example-*-format-for-display-*' && pnpm --filter @tanstack/hotkeys-e2e test:e2e:ssr",
"test:eslint": "nx affected --target=test:eslint --exclude=examples/**",
"test:oxlint": "nx affected --target=test:oxlint --exclude=examples/**",
"test:knip": "knip",
"test:lib": "nx affected --targets=test:lib --exclude=examples/**",
"test:lib:dev": "pnpm test:lib && nx watch --all -- pnpm test:lib",
"test:coverage": "nx run-many --targets=test:coverage --exclude=examples/**",
"test:pr": "pnpm run lint:all && nx affected --targets=test:sherif,test:knip,test:docs,test:lib,test:types,test:build,build",
"test:sherif": "sherif",
"test:skills": "intent maintainer check",
"test:types": "nx affected --targets=test:types --exclude=examples/**",
"watch": "pnpm run build:all && nx watch --all -- pnpm run build:all",
"test:build": "nx affected --target=test:build"
},
"size-limit": [
{
"name": "everything",
"path": "packages/hotkeys/dist/index.js",
"limit": "15.25 KB"
},
{
"name": "HotkeyManager",
"path": "packages/hotkeys/dist/index.js",
"import": "{ getHotkeyManager }",
"limit": "9 KB"
},
{
"name": "HotkeyRecorder",
"path": "packages/hotkeys/dist/index.js",
"import": "{ HotkeyRecorder }",
"limit": "7 KB"
},
{
"name": "KeyStateTracker",
"path": "packages/hotkeys/dist/index.js",
"import": "{ getKeyStateTracker }",
"limit": "3.5 KB"
},
{
"name": "Keyboard layout loader",
"path": "packages/hotkeys/dist/index.js",
"import": "{ loadKeyboardLayout, getKeyboardLayoutStore }",
"limit": "0.6 KB"
},
{
"name": "formatForDisplay",
"path": "packages/hotkeys/dist/index.js",
"import": "{ formatForDisplay }",
"limit": "3 KB"
},
{
"name": "formatForAria",
"path": "packages/hotkeys/dist/index.js",
"import": "{ formatForAria }",
"limit": "2 KB"
},
{
"name": "Provider without app hotkeys",
"path": "packages/hotkeys/dist/adapter.js",
"import": "{ createAppHotkeysStore }",
"limit": "0.5 KB"
},
{
"name": "React useHotkey",
"path": "packages/react-hotkeys/dist/index.js",
"import": "{ useHotkey }",
"ignore": [
"react",
"react-dom"
],
"limit": "11 KB"
},
{
"name": "React useHotkey + HotkeysProvider",
"path": "packages/react-hotkeys/dist/index.js",
"import": "{ useHotkey, HotkeysProvider }",
"ignore": [
"react",
"react-dom"
],
"limit": "12 KB"
},
{
"name": "React useHotkey + AppHotkeysProvider",
"path": "packages/react-hotkeys/dist/index.js",
"import": "{ useHotkey, AppHotkeysProvider }",
"ignore": [
"react",
"react-dom"
],
"limit": "12 KB"
},
{
"name": "Preact useHotkey",
"path": "packages/preact-hotkeys/dist/index.js",
"import": "{ useHotkey }",
"ignore": [
"preact",
"preact/hooks",
"preact/jsx-runtime"
],
"limit": "10 KB"
},
{
"name": "Vue useHotkey",
"path": "packages/vue-hotkeys/dist/index.js",
"import": "{ useHotkey }",
"ignore": [
"vue"
],
"limit": "10 KB"
},
{
"name": "Solid createHotkey",
"path": "packages/solid-hotkeys/dist/index.js",
"import": "{ createHotkey }",
"ignore": [
"solid-js",
"@solidjs/web"
],
"limit": "10 KB"
},
{
"name": "Svelte createHotkey",
"path": "packages/svelte-hotkeys/dist/createHotkey.svelte.js",
"import": "{ createHotkey }",
"ignore": [
"svelte",
"svelte/reactivity"
],
"limit": "10 KB"
},
{
"name": "Angular injectHotkey",
"path": "packages/angular-hotkeys/dist/index.js",
"import": "{ injectHotkey }",
"ignore": [
"@angular/core",
"@angular/common"
],
"limit": "10.25 KB"
},
{
"name": "Lit hotkey decorator",
"path": "packages/lit-hotkeys/dist/index.js",
"import": "{ hotkey }",
"ignore": [
"lit"
],
"limit": "10.25 KB"
},
{
"name": "Alpine createHotkeysScope + hotkeysPlugin",
"path": "packages/alpine-hotkeys/dist/index.js",
"import": "{ createHotkeysScope, hotkeysPlugin }",
"ignore": [
"alpinejs"
],
"limit": "13 KB"
},
{
"name": "Alpine hotkeyDirective",
"path": "packages/alpine-hotkeys/dist/index.js",
"import": "{ hotkeyDirective }",
"ignore": [
"alpinejs"
],
"limit": "10 KB"
},
{
"name": "Ember useHotkey",
"path": "packages/ember-hotkeys/dist/index.js",
"import": "{ useHotkey }",
"ignore": [
"@ember/component/helper",
"@ember/destroyable",
"@ember/runloop",
"@glimmer/tracking",
"ember-modifier",
"ember-source"
],
"limit": "10 KB"
},
{
"name": "Octane useHotkey",
"path": "packages/octane-hotkeys/dist/index.js",
"import": "{ useHotkey }",
"ignore": [
"octane"
],
"limit": "10.25 KB"
},
{
"name": "React devtools in production",
"path": "packages/react-hotkeys-devtools/dist/index.js",
"import": "{ HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin }",
"ignore": [
"react",
"react-dom",
"@tanstack/react-devtools"
],
"limit": "0.5 KB"
},
{
"name": "Preact devtools in production",
"path": "packages/preact-hotkeys-devtools/dist/index.js",
"import": "{ HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin }",
"ignore": [
"preact",
"@tanstack/preact-devtools"
],
"limit": "0.5 KB"
},
{
"name": "Vue devtools in production",
"path": "packages/vue-hotkeys-devtools/dist/index.js",
"import": "{ HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin }",
"ignore": [
"vue",
"@tanstack/vue-devtools"
],
"limit": "0.5 KB"
},
{
"name": "Solid devtools in production",
"path": "packages/solid-hotkeys-devtools/dist/index.js",
"import": "{ HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin }",
"ignore": [
"solid-js",
"@solidjs/web",
"@tanstack/solid-devtools"
],
"limit": "0.5 KB"
},
{
"name": "Svelte devtools in production",
"path": "packages/svelte-hotkeys-devtools/dist/index.js",
"import": "{ HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin }",
"ignore": [
"svelte",
"@tanstack/svelte-devtools"
],
"limit": "0.5 KB"
},
{
"name": "Angular devtools in production",
"path": "packages/angular-hotkeys-devtools/dist/index.js",
"import": "{ HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin }",
"ignore": [
"@angular/core",
"@tanstack/angular-devtools"
],
"limit": "0.5 KB"
},
{
"name": "Devtools core in production",
"path": "packages/hotkeys-devtools/dist/index.js",
"import": "{ HotkeysDevtoolsCore }",
"limit": "0.5 KB"
}
],
"nx": {
"includedScripts": [
"test:docs",
"test:knip",
"test:sherif"
]
},
"devDependencies": {
"@changesets/changelog-github": "^1.0.1",
"@changesets/cli": "^3.0.3",
"@eslint-react/eslint-plugin": "^5.28.8",
"@faker-js/faker": "^10.6.0",
"@size-limit/preset-small-lib": "^14.3.0",
"@tanstack/intent": "0.5.6",
"@tanstack/oxfmt-config": "0.1.0",
"@tanstack/oxlint-config": "0.2.0",
"@tanstack/typedoc-config": "0.3.5",
"@testing-library/jest-dom": "^7.0.1",
"@types/node": "^26.6.6",
"@vitest/coverage-v8": "^5.1.0",
"eslint-plugin-react-compiler": "19.1.0-rc.2",
"happy-dom": "^21.0.4",
"knip": "^6.44.2",
"markdown-link-extractor": "^4.0.4",
"nx": "^24.0.5",
"oxfmt": "^0.78.0",
"oxlint": "^1.93.0",
"oxlint-tsgolint": "^7.0.2006",
"premove": "^4.0.0",
"publint": "^0.3.25",
"sherif": "^1.13.0",
"size-limit": "^14.3.0",
"svelte": "^5.57.3",
"tinyglobby": "^0.2.17",
"tsdown": "^0.23.7",
"typescript": "6.0.3",
"vitest": "^5.1.0"
},
"volta": {
"node": "24.15.0"
}
}