@bloxwap/hig 0.0.0-stage → 0.5.1

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 (220) hide show
  1. package/LICENSE +5 -0
  2. package/README.md +44 -2
  3. package/chart/README.md +23 -0
  4. package/chart/dist/index.d.ts +8 -0
  5. package/chart/dist/index.js +12 -0
  6. package/contracts/README.md +3 -0
  7. package/contracts/dist/announcements.d.ts +12 -0
  8. package/contracts/dist/announcements.js +8 -0
  9. package/contracts/dist/feedback.d.ts +40 -0
  10. package/contracts/dist/feedback.js +1 -0
  11. package/contracts/dist/index.d.ts +41 -0
  12. package/contracts/dist/index.js +52 -0
  13. package/contracts/dist/messages.d.ts +300 -0
  14. package/contracts/dist/messages.js +114 -0
  15. package/css.d.ts +2 -0
  16. package/feedback/README.md +7 -0
  17. package/feedback/assets/error.wav +0 -0
  18. package/feedback/assets/manifest.json +78 -0
  19. package/feedback/assets/success.wav +0 -0
  20. package/feedback/assets/tick.wav +0 -0
  21. package/feedback/assets/toggle.wav +0 -0
  22. package/feedback/dist/browser-haptic.d.ts +23 -0
  23. package/feedback/dist/browser-haptic.js +41 -0
  24. package/feedback/dist/contract.d.ts +40 -0
  25. package/feedback/dist/contract.js +59 -0
  26. package/feedback/dist/native.d.ts +28 -0
  27. package/feedback/dist/native.js +63 -0
  28. package/feedback/dist/preferences.d.ts +8 -0
  29. package/feedback/dist/preferences.js +24 -0
  30. package/feedback/dist/presets.d.ts +57 -0
  31. package/feedback/dist/presets.js +1 -0
  32. package/feedback/dist/react.d.ts +19 -0
  33. package/feedback/dist/react.js +23 -0
  34. package/feedback/dist/web-haptic.d.ts +6 -0
  35. package/feedback/dist/web-haptic.js +6 -0
  36. package/feedback/dist/web-sound.d.ts +5 -0
  37. package/feedback/dist/web-sound.js +32 -0
  38. package/feedback/dist/web.d.ts +3 -0
  39. package/feedback/dist/web.js +4 -0
  40. package/native/README.md +16 -0
  41. package/native/android/build.gradle +28 -0
  42. package/native/android/src/main/java/com/bloxwap/hig/HIGAdjustableView.java +173 -0
  43. package/native/android/src/main/java/com/bloxwap/hig/HIGAdjustableViewManager.java +23 -0
  44. package/native/android/src/main/java/com/bloxwap/hig/HIGPackage.java +24 -0
  45. package/native/dist/animated-number-model.d.ts +24 -0
  46. package/native/dist/animated-number-model.js +110 -0
  47. package/native/dist/animated-number.d.ts +9 -0
  48. package/native/dist/animated-number.js +97 -0
  49. package/native/dist/brand.d.ts +7 -0
  50. package/native/dist/brand.js +7 -0
  51. package/native/dist/button.d.ts +30 -0
  52. package/native/dist/button.js +36 -0
  53. package/native/dist/checkbox.d.ts +3 -0
  54. package/native/dist/checkbox.js +11 -0
  55. package/native/dist/data.d.ts +57 -0
  56. package/native/dist/data.js +47 -0
  57. package/native/dist/field.d.ts +16 -0
  58. package/native/dist/field.js +26 -0
  59. package/native/dist/gesture-sheet.d.ts +73 -0
  60. package/native/dist/gesture-sheet.js +153 -0
  61. package/native/dist/icons.d.ts +21 -0
  62. package/native/dist/icons.js +20 -0
  63. package/native/dist/navigation.d.ts +48 -0
  64. package/native/dist/navigation.js +58 -0
  65. package/native/dist/overlay.d.ts +36 -0
  66. package/native/dist/overlay.js +65 -0
  67. package/native/dist/pickers.d.ts +54 -0
  68. package/native/dist/pickers.js +60 -0
  69. package/native/dist/provider.d.ts +62 -0
  70. package/native/dist/provider.js +67 -0
  71. package/native/dist/radio-group.d.ts +21 -0
  72. package/native/dist/radio-group.js +91 -0
  73. package/native/dist/recipes.d.ts +45 -0
  74. package/native/dist/recipes.js +32 -0
  75. package/native/dist/roles.d.ts +6 -0
  76. package/native/dist/roles.js +4 -0
  77. package/native/dist/select.d.ts +3 -0
  78. package/native/dist/select.js +9 -0
  79. package/native/dist/selection-types.d.ts +22 -0
  80. package/native/dist/selection-types.js +1 -0
  81. package/native/dist/selection.d.ts +8 -0
  82. package/native/dist/selection.js +7 -0
  83. package/native/dist/slider.d.ts +11 -0
  84. package/native/dist/slider.js +42 -0
  85. package/native/dist/status.d.ts +86 -0
  86. package/native/dist/status.js +112 -0
  87. package/native/dist/surface.d.ts +19 -0
  88. package/native/dist/surface.js +42 -0
  89. package/native/dist/swap-panel.d.ts +125 -0
  90. package/native/dist/swap-panel.js +177 -0
  91. package/native/dist/swap-parts.d.ts +86 -0
  92. package/native/dist/swap-parts.js +66 -0
  93. package/native/dist/swap-shared.d.ts +65 -0
  94. package/native/dist/swap-shared.js +76 -0
  95. package/native/dist/swap-sheet.d.ts +14 -0
  96. package/native/dist/swap-sheet.js +26 -0
  97. package/native/dist/swap-views.d.ts +41 -0
  98. package/native/dist/swap-views.js +37 -0
  99. package/native/dist/switch-row.d.ts +8 -0
  100. package/native/dist/switch-row.js +18 -0
  101. package/native/dist/switch.d.ts +10 -0
  102. package/native/dist/switch.js +30 -0
  103. package/native/dist/text-content.d.ts +5 -0
  104. package/native/dist/text-content.js +6 -0
  105. package/native/dist/wallet-address.d.ts +37 -0
  106. package/native/dist/wallet-address.js +50 -0
  107. package/native-fonts/README.md +17 -0
  108. package/native-fonts/dist/index.d.ts +164 -0
  109. package/native-fonts/dist/index.js +164 -0
  110. package/native-fonts/fonts/BloxwapMono-Bold.ttf +0 -0
  111. package/native-fonts/fonts/BloxwapMono-ExtraBold.ttf +0 -0
  112. package/native-fonts/fonts/BloxwapMono-Medium.ttf +0 -0
  113. package/native-fonts/fonts/BloxwapMono-SemiBold.ttf +0 -0
  114. package/native-fonts/fonts/BloxwapMono.ttf +0 -0
  115. package/native-fonts/fonts/BloxwapSans-Black.ttf +0 -0
  116. package/native-fonts/fonts/BloxwapSans-Bold.ttf +0 -0
  117. package/native-fonts/fonts/BloxwapSans-ExtraBold.ttf +0 -0
  118. package/native-fonts/fonts/BloxwapSans-Medium.ttf +0 -0
  119. package/native-fonts/fonts/BloxwapSans-SemiBold.ttf +0 -0
  120. package/native-fonts/fonts/BloxwapSans.ttf +0 -0
  121. package/native-fonts/fonts/BloxwapSansKR-SemiBold.ttf +0 -0
  122. package/native-fonts/fonts/BloxwapSansKR.ttf +0 -0
  123. package/native-fonts/fonts/BloxwapSansSC-SemiBold.ttf +0 -0
  124. package/native-fonts/fonts/BloxwapSansSC.ttf +0 -0
  125. package/native-fonts/fonts/OFL.txt +93 -0
  126. package/native-fonts/fonts/manifest.json +164 -0
  127. package/og-fonts/README.md +34 -0
  128. package/og-fonts/dist/index.d.ts +116 -0
  129. package/og-fonts/dist/index.js +102 -0
  130. package/og-fonts/dist/node.d.ts +11 -0
  131. package/og-fonts/dist/node.js +39 -0
  132. package/og-fonts/fonts/BloxwapMono-Medium.ttf +0 -0
  133. package/og-fonts/fonts/BloxwapSans-Black.ttf +0 -0
  134. package/og-fonts/fonts/BloxwapSans-Bold.ttf +0 -0
  135. package/og-fonts/fonts/BloxwapSans-Medium.ttf +0 -0
  136. package/og-fonts/fonts/BloxwapSans.ttf +0 -0
  137. package/og-fonts/fonts/OFL.txt +93 -0
  138. package/og-fonts/fonts/manifest.json +65 -0
  139. package/package.json +476 -4
  140. package/react/README.md +30 -0
  141. package/react/dist/animated-number-model.d.ts +20 -0
  142. package/react/dist/animated-number-model.js +92 -0
  143. package/react/dist/animated-number.d.ts +8 -0
  144. package/react/dist/animated-number.js +72 -0
  145. package/react/dist/base.css +9 -0
  146. package/react/dist/brand.d.ts +7 -0
  147. package/react/dist/brand.js +5 -0
  148. package/react/dist/button.d.ts +14 -0
  149. package/react/dist/button.js +20 -0
  150. package/react/dist/data.d.ts +78 -0
  151. package/react/dist/data.js +36 -0
  152. package/react/dist/dialog.d.ts +29 -0
  153. package/react/dist/dialog.js +21 -0
  154. package/react/dist/field.d.ts +16 -0
  155. package/react/dist/field.js +20 -0
  156. package/react/dist/gesture-sheet.d.ts +41 -0
  157. package/react/dist/gesture-sheet.js +128 -0
  158. package/react/dist/navigation.d.ts +48 -0
  159. package/react/dist/navigation.js +69 -0
  160. package/react/dist/notify.d.ts +14 -0
  161. package/react/dist/notify.js +6 -0
  162. package/react/dist/overlay.d.ts +17 -0
  163. package/react/dist/overlay.js +18 -0
  164. package/react/dist/provider.d.ts +25 -0
  165. package/react/dist/provider.js +50 -0
  166. package/react/dist/recipes/activity-list.d.ts +8 -0
  167. package/react/dist/recipes/activity-list.js +6 -0
  168. package/react/dist/recipes/balance-card.d.ts +6 -0
  169. package/react/dist/recipes/balance-card.js +5 -0
  170. package/react/dist/recipes/code-window.d.ts +4 -0
  171. package/react/dist/recipes/code-window.js +4 -0
  172. package/react/dist/recipes/install-command.d.ts +6 -0
  173. package/react/dist/recipes/install-command.js +15 -0
  174. package/react/dist/recipes/market-row.d.ts +25 -0
  175. package/react/dist/recipes/market-row.js +8 -0
  176. package/react/dist/recipes/marketing-hero.d.ts +7 -0
  177. package/react/dist/recipes/marketing-hero.js +5 -0
  178. package/react/dist/recipes/pickers.d.ts +57 -0
  179. package/react/dist/recipes/pickers.js +78 -0
  180. package/react/dist/recipes/swap/amount-card.d.ts +40 -0
  181. package/react/dist/recipes/swap/amount-card.js +7 -0
  182. package/react/dist/recipes/swap/picker.d.ts +26 -0
  183. package/react/dist/recipes/swap/picker.js +20 -0
  184. package/react/dist/recipes/swap/settings.d.ts +24 -0
  185. package/react/dist/recipes/swap/settings.js +25 -0
  186. package/react/dist/recipes/swap/shared.d.ts +98 -0
  187. package/react/dist/recipes/swap/shared.js +106 -0
  188. package/react/dist/recipes/swap-panel.d.ts +127 -0
  189. package/react/dist/recipes/swap-panel.js +170 -0
  190. package/react/dist/recipes/swap-sheet.d.ts +16 -0
  191. package/react/dist/recipes/swap-sheet.js +22 -0
  192. package/react/dist/recipes/trade-entry.d.ts +11 -0
  193. package/react/dist/recipes/trade-entry.js +12 -0
  194. package/react/dist/recipes.d.ts +10 -0
  195. package/react/dist/recipes.js +11 -0
  196. package/react/dist/select.d.ts +4 -0
  197. package/react/dist/select.js +174 -0
  198. package/react/dist/selection.d.ts +40 -0
  199. package/react/dist/selection.js +23 -0
  200. package/react/dist/slider.d.ts +11 -0
  201. package/react/dist/slider.js +10 -0
  202. package/react/dist/status.d.ts +63 -0
  203. package/react/dist/status.js +47 -0
  204. package/react/dist/styles.css +542 -0
  205. package/react/dist/surface.d.ts +291 -0
  206. package/react/dist/surface.js +9 -0
  207. package/react/dist/toast.d.ts +17 -0
  208. package/react/dist/toast.js +21 -0
  209. package/react/dist/wallet-address.d.ts +23 -0
  210. package/react/dist/wallet-address.js +24 -0
  211. package/tokens/README.md +17 -0
  212. package/tokens/assets/bloxwap-icon.svg +1 -0
  213. package/tokens/dist/brand.d.ts +19 -0
  214. package/tokens/dist/brand.js +24 -0
  215. package/tokens/dist/index.d.ts +437 -0
  216. package/tokens/dist/index.js +514 -0
  217. package/tokens/dist/manifest.json +200 -0
  218. package/tokens/dist/theme.d.ts +11 -0
  219. package/tokens/dist/theme.js +22 -0
  220. package/tokens/dist/tokens.css +120 -0
@@ -0,0 +1,114 @@
1
+ // Canonical English copy, one export per key. Hosts translate these; they do not edit them.
2
+ export const close = 'Close';
3
+ export const cancel = 'Cancel';
4
+ export const dismiss = 'Dismiss';
5
+ export const dismissNotice = (message, dismiss) => `${dismiss} ${message}`;
6
+ export const busy = 'Working';
7
+ export const notifications = 'Notifications';
8
+ export const loading = 'Loading';
9
+ export const loadingContent = 'Loading content';
10
+ export const loadingItems = 'Loading items';
11
+ export const loadingChart = 'Loading chart…';
12
+ export const noItems = 'No items';
13
+ export const noRows = 'No rows';
14
+ export const retry = 'Retry';
15
+ export const loadMore = 'Load more';
16
+ export const stale = '(stale)';
17
+ export const required = '(required)';
18
+ export const breadcrumb = 'Breadcrumb';
19
+ export const pagination = 'Pagination';
20
+ export const previous = 'Previous';
21
+ export const next = 'Next';
22
+ export const pageOf = (page, total) => `Page ${page} of ${total}`;
23
+ export const search = 'Search';
24
+ export const searching = 'Searching…';
25
+ export const noResults = 'No results';
26
+ export const resultCount = (count, locale) => `${new Intl.NumberFormat(locale).format(count)} ${count === 1 ? 'result' : 'results'}`;
27
+ export const back = 'Back';
28
+ export const menuDescription = 'Available actions';
29
+ export const choose = 'Choose';
30
+ export const chooseOne = 'Choose one option.';
31
+ export const inProgress = 'In progress';
32
+ export const progressValue = (value, max) => `${value} of ${max}`;
33
+ export const copied = 'Copied';
34
+ export const copyFailed = 'Copy failed. Select the command and copy manually.';
35
+ export const copyInstallCommand = 'Copy install command';
36
+ export const reviewAssetOrder = (asset) => `Review ${asset} order`;
37
+ export const amountInAsset = (asset) => `Amount (${asset})`;
38
+ export const availableAmount = (available) => `Available: ${available}`;
39
+ export const reviewOrder = 'Review order';
40
+ export const confirmOrder = 'Confirm order';
41
+ export const confirmOrderDescription = (amount, asset) => `Amount: ${amount} ${asset}. Verify the host-provided terms before submission.`;
42
+ export const orderUnavailable = 'Order unavailable';
43
+ export const noActivity = 'No activity yet';
44
+ export const statusOnline = 'online';
45
+ export const statusOffline = 'offline';
46
+ export const statusStale = 'stale';
47
+ export const increase = 'Increase';
48
+ export const decrease = 'Decrease';
49
+ export const swapFrom = 'From';
50
+ export const swapTo = 'To';
51
+ export const swapSelectToken = (side) => `Select ${side} token`;
52
+ export const swapAmount = (side) => `${side} amount`;
53
+ export const swapSwitchDenomination = 'Switch between dollars and token units';
54
+ export const swapFlip = 'Swap direction';
55
+ export const swapActionSend = 'Send';
56
+ export const swapActionSwap = 'Swap';
57
+ export const swapActionBridge = 'Bridge';
58
+ export const swapChooseToken = 'Select a token';
59
+ export const swapChooseDestination = 'Pick a destination';
60
+ export const swapEnterAmount = 'Enter an amount';
61
+ export const swapInsufficient = (symbol) => `Insufficient ${symbol}`;
62
+ export const swapSendFromWallet = 'Send from your wallet';
63
+ export const swapReset = 'Reset';
64
+ export const swapSettings = 'Settings';
65
+ export const swapMax = 'Max';
66
+ export const swapTest = 'Test';
67
+ export const swapSlippage = (percent) => `Slippage ${percent}`;
68
+ export const swapSlippageTitle = 'Slippage';
69
+ export const swapSlippageCustom = 'Custom slippage (%)';
70
+ export const swapFee = (amount) => `Fee ${amount}`;
71
+ export const swapFees = 'Fees';
72
+ export const swapFeeTotal = 'Total';
73
+ export const swapDenomination = 'Show amounts in';
74
+ export const swapDollars = 'Dollars';
75
+ export const swapUnits = 'Units';
76
+ export const swapSearchTokens = 'Search name or paste address';
77
+ export const swapChains = 'Chains';
78
+ export const swapAllChains = 'All';
79
+ export const swapHot = 'Hot';
80
+ export const swapAllTokens = 'All tokens';
81
+ export const swapNoTokens = 'No tokens found';
82
+ export const swapSelected = 'Selected';
83
+ export const swapConnectWallet = 'Connect wallet';
84
+ export const swapDisconnect = 'Disconnect wallet';
85
+ export const swapGenerateAddress = 'Generate address';
86
+ export const swapRecipient = 'Recipient address';
87
+ export const swapScan = 'Scan QR code';
88
+ export const copyAddress = 'Copy address';
89
+ export const addressCopied = 'Address copied';
90
+ export const tapToCopy = 'Tap to copy';
91
+ export const qrCode = 'QR code';
92
+ export const swapControlKey = 'Ctrl';
93
+ export const swapKeypad = 'Keypad';
94
+ export const swapDelete = 'Delete';
95
+ /** The complete English catalog. */
96
+ export const defaultMessages = { close, cancel, dismiss, dismissNotice, busy, notifications, loading, loadingContent, loadingItems, loadingChart, noItems, noRows, retry, loadMore, stale, required, breadcrumb, pagination, previous, next, pageOf, search, searching, noResults, resultCount, back, menuDescription, choose, chooseOne, inProgress, progressValue, copied, copyFailed, copyInstallCommand, reviewAssetOrder, amountInAsset, availableAmount, reviewOrder, confirmOrder, confirmOrderDescription, orderUnavailable, noActivity, statusOnline, statusOffline, statusStale, increase, decrease, swapFrom, swapTo, swapSelectToken, swapAmount, swapSwitchDenomination, swapFlip, swapActionSend, swapActionSwap, swapActionBridge, swapChooseToken, swapChooseDestination, swapEnterAmount, swapInsufficient, swapSendFromWallet, swapReset, swapSettings, swapMax, swapTest, swapSlippage, swapSlippageTitle, swapSlippageCustom, swapFee, swapFees, swapFeeTotal, swapDenomination, swapDollars, swapUnits, swapSearchTokens, swapChains, swapAllChains, swapHot, swapAllTokens, swapNoTokens, swapSelected, swapConnectWallet, swapDisconnect, swapGenerateAddress, swapRecipient, swapScan, copyAddress, addressCopied, tapToCopy, qrCode, swapControlKey, swapKeypad, swapDelete };
97
+ /** Every message key, in documentation order. */
98
+ export const messageKeys = /* @__PURE__ */ Object.keys(defaultMessages);
99
+ /**
100
+ * Overlays host overrides on a base catalog (both may be partial). `undefined` entries keep the base copy, and a
101
+ * value of the wrong kind (a string for a formatter key, or the reverse) is ignored, so a partial or untyped catalog
102
+ * never blanks a label or throws while rendering.
103
+ */
104
+ export function resolveMessages(base, overrides) {
105
+ if (!overrides)
106
+ return base;
107
+ const formatters = ['dismissNotice', 'pageOf', 'resultCount', 'progressValue', 'reviewAssetOrder', 'amountInAsset', 'availableAmount', 'confirmOrderDescription', 'swapSelectToken', 'swapAmount', 'swapInsufficient', 'swapSlippage', 'swapFee'];
108
+ const resolved = { ...base };
109
+ for (const [key, value] of Object.entries(overrides)) {
110
+ if (value !== undefined && typeof value === (formatters.includes(key) ? 'function' : 'string'))
111
+ resolved[key] = value;
112
+ }
113
+ return resolved;
114
+ }
package/css.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Stylesheet imports have no JavaScript exports. Bundlers load the default CSS target.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ # @bloxwap/hig/feedback
2
+
3
+ Version 0.5.1, an entry of `@bloxwap/hig`. Root contract imports no React, DOM, RN, audio or device API. Use independent web/native entries and opt in to each channel. Successful API invocation never certifies physical output. See docs/feedback for timing, storage, capability and device verification.
4
+
5
+ `createWebSoundAdapter` passes a per-adapter abort signal to SFX. The signal-aware engine cancels that root's active voices while other roots and host-owned playback continue. The shared default engine remains reference-counted.
6
+
7
+ `createBrowserHapticAdapter` retains its no-import browser fallback and optional `{vibrate}` backend. Hosts using the imperative Haptic API can inject `{canTriggerHaptic, triggerHaptic}`. Capability is probed at request time; iOS imperative output remains unavailable and observation remains false. Browser vibration cancellation is document-wide.
Binary file
@@ -0,0 +1,78 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "exporter": "@bloxwap/sfx 0.3.0 / node-web-audio-api 2.2.0",
4
+ "command": "node --import ./scripts/cue-random.mjs node_modules/@bloxwap/sfx/dist/cli/sfx-wav.js --out packages/hig/feedback/assets --sounds tick,toggle,success,error --sample-rate 48000 --bit-depth 16 --channels 1 --trim",
5
+ "flags": [
6
+ "--sample-rate",
7
+ "48000",
8
+ "--bit-depth",
9
+ "16",
10
+ "--channels",
11
+ "1",
12
+ "--trim"
13
+ ],
14
+ "noiseSeed": "mulberry32:0x183",
15
+ "noise": "Noise recipes can vary; compare duration/envelope/levels, not regenerated bytes. Hashes identify the reviewed committed artifact.",
16
+ "cues": [
17
+ {
18
+ "name": "tick",
19
+ "file": "tick.wav",
20
+ "recipe": "tick",
21
+ "package": "@bloxwap/sfx",
22
+ "packageVersion": "0.3.0",
23
+ "channels": 1,
24
+ "sampleRate": 48000,
25
+ "bitDepth": 16,
26
+ "durationMs": 83.06,
27
+ "peakDbFS": -17.11,
28
+ "rmsDbFS": -40.59,
29
+ "bytes": 8018,
30
+ "sha256": "942150b5f9001cc9a9579225aff79ae3a52223dac636301c028b4be4d188befc"
31
+ },
32
+ {
33
+ "name": "toggle",
34
+ "file": "toggle.wav",
35
+ "recipe": "toggle",
36
+ "package": "@bloxwap/sfx",
37
+ "packageVersion": "0.3.0",
38
+ "channels": 1,
39
+ "sampleRate": 48000,
40
+ "bitDepth": 16,
41
+ "durationMs": 114.6,
42
+ "peakDbFS": -17.01,
43
+ "rmsDbFS": -39.84,
44
+ "bytes": 11046,
45
+ "sha256": "00ba23f1bffebf72340c08aece8caa9a9f8966fbb108b5dd8189aec047c8197d"
46
+ },
47
+ {
48
+ "name": "success",
49
+ "file": "success.wav",
50
+ "recipe": "success",
51
+ "package": "@bloxwap/sfx",
52
+ "packageVersion": "0.3.0",
53
+ "channels": 1,
54
+ "sampleRate": 48000,
55
+ "bitDepth": 16,
56
+ "durationMs": 566.92,
57
+ "peakDbFS": -15.46,
58
+ "rmsDbFS": -31.85,
59
+ "bytes": 54468,
60
+ "sha256": "297662685cf37860711fbb54f670e424974905a3c35eb2440d932a1a332b1c1e"
61
+ },
62
+ {
63
+ "name": "error",
64
+ "file": "error.wav",
65
+ "recipe": "error",
66
+ "package": "@bloxwap/sfx",
67
+ "packageVersion": "0.3.0",
68
+ "channels": 1,
69
+ "sampleRate": 48000,
70
+ "bitDepth": 16,
71
+ "durationMs": 314,
72
+ "peakDbFS": -14.99,
73
+ "rmsDbFS": -31.89,
74
+ "bytes": 30188,
75
+ "sha256": "c3a4b4d82447326ae656e0828a7648b59f6979437dc2ea4d7821e6dc2ce3b3c3"
76
+ }
77
+ ]
78
+ }
Binary file
Binary file
Binary file
@@ -0,0 +1,23 @@
1
+ import type { FeedbackAdapter, FeedbackCapability } from '@bloxwap/hig/contracts/feedback';
2
+ declare const vibrationPatterns: {
3
+ readonly selection: readonly [8];
4
+ readonly success: readonly [30, 60, 40];
5
+ readonly warning: readonly [40, 100, 40];
6
+ readonly error: readonly [40, 40, 40, 40, 40];
7
+ };
8
+ type HapticCue = keyof typeof vibrationPatterns;
9
+ export interface BrowserVibrationBackend {
10
+ vibrate: (pattern: number | number[]) => boolean;
11
+ }
12
+ /** Optional structural bridge to the merged @bloxwap/haptic imperative API; no package import. */
13
+ export interface ImperativeHapticBackend {
14
+ canTriggerHaptic: () => FeedbackCapability;
15
+ triggerHaptic: (cue: HapticCue) => Promise<{
16
+ delivered: boolean;
17
+ mechanism: 'browser-vibration' | 'physical-tap' | 'none';
18
+ reason?: string;
19
+ }>;
20
+ }
21
+ /** Browser vibration for accepted semantic events. iOS imperative haptics remain unavailable. */
22
+ export declare function createBrowserHapticAdapter(backend?: BrowserVibrationBackend | ImperativeHapticBackend): FeedbackAdapter;
23
+ export {};
@@ -0,0 +1,41 @@
1
+ import { presets } from './contract.js';
2
+ const vibrationPatterns = { selection: [8], success: [30, 60, 40], warning: [40, 100, 40], error: [40, 40, 40, 40, 40] };
3
+ /** Browser vibration for accepted semantic events. iOS imperative haptics remain unavailable. */
4
+ export function createBrowserHapticAdapter(backend) {
5
+ let dead = false;
6
+ const imperative = backend && 'canTriggerHaptic' in backend ? backend : undefined;
7
+ const target = backend && 'vibrate' in backend ? backend : typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function' ? navigator : undefined;
8
+ const capability = () => {
9
+ if (dead)
10
+ return { available: false, mechanism: 'none', observed: false, reason: 'Adapter disposed' };
11
+ if (imperative) {
12
+ try {
13
+ return { ...imperative.canTriggerHaptic(), observed: false };
14
+ }
15
+ catch {
16
+ return { available: false, mechanism: 'none', observed: false, reason: 'Imperative capability probe failed' };
17
+ }
18
+ }
19
+ return { available: !!target, mechanism: target ? 'browser-vibration' : 'none', observed: false, reason: target ? 'Patterns approximate native cues; physical observation pending' : 'Imperative iOS feedback is unavailable; use an eligible physical-tap target' };
20
+ };
21
+ const cancel = () => { target?.vibrate(0); };
22
+ return { get capability() { return capability(); }, play(event, prefs) {
23
+ if (dead || !prefs.haptics)
24
+ return;
25
+ const cue = presets[event.intent].haptic;
26
+ if (!cue)
27
+ return;
28
+ if (imperative) {
29
+ if (!capability().available)
30
+ return;
31
+ try {
32
+ return imperative.triggerHaptic(cue).then(() => { }, () => { });
33
+ }
34
+ catch {
35
+ return;
36
+ }
37
+ }
38
+ target?.vibrate([...vibrationPatterns[cue]]);
39
+ }, cancel, dispose() { if (dead)
40
+ return; dead = true; cancel(); } };
41
+ }
@@ -0,0 +1,40 @@
1
+ import type { FeedbackAdapter, FeedbackEvent, FeedbackPreferences, FeedbackSink } from '@bloxwap/hig/contracts/feedback';
2
+ export type { FeedbackAdapter, FeedbackEvent, FeedbackPreferences, FeedbackSink, FeedbackCapability, PreferenceStorage, FeedbackIntent } from '@bloxwap/hig/contracts/feedback';
3
+ export declare const defaultPreferences: FeedbackPreferences;
4
+ export { presets } from './presets.js';
5
+ export interface ControllerOptions {
6
+ sound?: FeedbackAdapter;
7
+ haptics?: FeedbackAdapter;
8
+ preferences?: Partial<FeedbackPreferences>;
9
+ now?: () => number;
10
+ policy?: {
11
+ sound?: boolean;
12
+ haptics?: boolean;
13
+ };
14
+ maxRemembered?: number;
15
+ }
16
+ export declare class FeedbackController implements FeedbackSink {
17
+ private options;
18
+ private preferences;
19
+ private seen;
20
+ private cadence;
21
+ private dead;
22
+ private background;
23
+ private clock;
24
+ constructor(options?: ControllerOptions);
25
+ getPreferences(): {
26
+ version: 1;
27
+ sound: boolean;
28
+ haptics: boolean;
29
+ volume: number;
30
+ motion: boolean;
31
+ };
32
+ getCapabilities(): {
33
+ sound: import("@bloxwap/hig/contracts/feedback").FeedbackCapability;
34
+ haptics: import("@bloxwap/hig/contracts/feedback").FeedbackCapability;
35
+ };
36
+ updatePreferences(next: Partial<FeedbackPreferences>): void;
37
+ setBackground(value: boolean): void;
38
+ emit: (event: FeedbackEvent) => void;
39
+ dispose(): void;
40
+ }
@@ -0,0 +1,59 @@
1
+ export const defaultPreferences = { version: 1, sound: false, haptics: false, volume: 0.3, motion: true };
2
+ import { presets } from './presets.js';
3
+ export { presets } from './presets.js';
4
+ function attempt(fn) { if (!fn)
5
+ return; try {
6
+ Promise.resolve(fn()).catch(() => { });
7
+ }
8
+ catch { /* Feedback never changes the primary action. */ } }
9
+ export class FeedbackController {
10
+ options;
11
+ preferences;
12
+ seen = new Map();
13
+ cadence = new Map();
14
+ dead = false;
15
+ background = false;
16
+ clock;
17
+ constructor(options = {}) {
18
+ this.options = options;
19
+ this.preferences = { ...defaultPreferences, ...options.preferences };
20
+ this.clock = options.now ?? Date.now;
21
+ this.updatePreferences(this.preferences);
22
+ }
23
+ getPreferences() { return { ...this.preferences }; }
24
+ getCapabilities() { return { sound: this.options.sound?.capability ?? { available: false, mechanism: 'none', observed: false }, haptics: this.options.haptics?.capability ?? { available: false, mechanism: 'none', observed: false } }; }
25
+ updatePreferences(next) { this.preferences = { ...this.preferences, ...next, version: 1 }; this.preferences.volume = Number.isFinite(this.preferences.volume) ? Math.max(0, Math.min(1, this.preferences.volume)) : defaultPreferences.volume; if (!this.preferences.sound || this.preferences.volume <= 0)
26
+ attempt(this.options.sound?.cancel?.bind(this.options.sound)); if (!this.preferences.haptics)
27
+ attempt(this.options.haptics?.cancel?.bind(this.options.haptics)); }
28
+ setBackground(value) { this.background = value; if (value) {
29
+ attempt(this.options.sound?.cancel?.bind(this.options.sound));
30
+ attempt(this.options.haptics?.cancel?.bind(this.options.haptics));
31
+ } }
32
+ emit = (event) => {
33
+ if (this.dead || this.background || event.cancelled || event.disabled || event.busy || event.suppressed)
34
+ return;
35
+ if (event.intent === 'cancel') {
36
+ attempt(this.options.sound?.cancel?.bind(this.options.sound));
37
+ attempt(this.options.haptics?.cancel?.bind(this.options.haptics));
38
+ return;
39
+ }
40
+ const now = this.clock(), key = `${event.source}/${event.id}/${event.intent}`, cadenceKey = `${event.source}/${event.intent}`;
41
+ if (this.seen.has(key) || now - (this.cadence.get(cadenceKey) ?? -Infinity) < presets[event.intent].cooldown)
42
+ return;
43
+ this.seen.set(key, now);
44
+ this.cadence.set(cadenceKey, now);
45
+ const requestedCap = this.options.maxRemembered ?? 256;
46
+ const cap = Number.isFinite(requestedCap) ? Math.max(1, Math.trunc(requestedCap)) : 256;
47
+ while (this.seen.size > cap)
48
+ this.seen.delete(this.seen.keys().next().value);
49
+ while (this.cadence.size > cap)
50
+ this.cadence.delete(this.cadence.keys().next().value);
51
+ const prefs = this.getPreferences();
52
+ if (prefs.sound && prefs.volume > 0 && this.options.policy?.sound !== false && this.options.sound?.capability.available && presets[event.intent].sound)
53
+ attempt(() => this.options.sound.play(event, prefs));
54
+ if (prefs.haptics && this.options.policy?.haptics !== false && this.options.haptics?.capability.available && (presets[event.intent].haptic || event.impact))
55
+ attempt(() => this.options.haptics.play(event, prefs));
56
+ };
57
+ dispose() { if (this.dead)
58
+ return; this.dead = true; attempt(this.options.sound?.dispose?.bind(this.options.sound)); attempt(this.options.haptics?.dispose?.bind(this.options.haptics)); this.seen.clear(); this.cadence.clear(); }
59
+ }
@@ -0,0 +1,28 @@
1
+ import type { FeedbackAdapter } from '@bloxwap/hig/contracts/feedback';
2
+ import { presets } from './contract.js';
3
+ export interface NativePlayer {
4
+ play: () => void;
5
+ pause: () => void;
6
+ seekTo: (seconds: number) => Promise<void>;
7
+ remove: () => void;
8
+ volume: number;
9
+ }
10
+ export interface NativeAudioBackend {
11
+ create: (asset: unknown) => NativePlayer;
12
+ configure?: () => Promise<void>;
13
+ }
14
+ export type CueAssets = Readonly<Partial<Record<NonNullable<(typeof presets)[keyof typeof presets]['sound']>, unknown>>>;
15
+ /** Host provides packaged Metro asset ids and lifecycle hooks; no browser audio at module load.
16
+ * After preload() settles, play() dispatches synchronously: no bridge round trip (configure, seek) precedes player.play(). */
17
+ export declare function createNativeSoundAdapter(backend: NativeAudioBackend, assets: CueAssets): FeedbackAdapter & {
18
+ preload: () => Promise<void>;
19
+ };
20
+ /** Host imports Expo only in its native feedback setup. This bridge keeps the contract injectable. */
21
+ export declare function expoAudioBackend(expo: Pick<typeof import('expo-audio'), 'createAudioPlayer' | 'setAudioModeAsync'>): NativeAudioBackend;
22
+ export interface NativeHapticBackend {
23
+ selection: () => Promise<void>;
24
+ impact: (style: 'light' | 'medium' | 'heavy') => Promise<void>;
25
+ notification: (type: 'success' | 'warning' | 'error') => Promise<void>;
26
+ }
27
+ export declare function createNativeHapticAdapter(backend: NativeHapticBackend, available?: boolean): FeedbackAdapter;
28
+ export declare function expoHapticBackend(expo: typeof import('expo-haptics')): NativeHapticBackend;
@@ -0,0 +1,63 @@
1
+ import { presets } from './contract.js';
2
+ /** Host provides packaged Metro asset ids and lifecycle hooks; no browser audio at module load.
3
+ * After preload() settles, play() dispatches synchronously: no bridge round trip (configure, seek) precedes player.play(). */
4
+ export function createNativeSoundAdapter(backend, assets) {
5
+ const players = new Map();
6
+ let dead = false, ready = false, epoch = 0;
7
+ let configured;
8
+ let active;
9
+ const preload = async () => { if (dead)
10
+ return; configured ??= backend.configure?.() ?? Promise.resolve(); try {
11
+ await configured;
12
+ }
13
+ catch (error) {
14
+ configured = undefined;
15
+ throw error;
16
+ } if (dead)
17
+ return; for (const [name, asset] of Object.entries(assets))
18
+ if (asset != null && !players.has(name))
19
+ players.set(name, backend.create(asset)); ready = true; };
20
+ const stopActive = () => { const previous = active; active = undefined; if (previous)
21
+ try {
22
+ previous.pause();
23
+ }
24
+ catch { /* A failed pause cannot block the next cue. */ } };
25
+ // One active cue: stop the previous player, restart this one and play without awaiting the seek; native players apply calls in order.
26
+ const dispatch = (player, volume) => { if (active !== player)
27
+ stopActive(); active = player; player.volume = volume; try {
28
+ void player.seekTo(0).catch(() => { });
29
+ }
30
+ catch { /* Playing from the current position beats dropping the cue. */ } player.play(); };
31
+ const cancel = () => { epoch++; active = undefined; for (const player of players.values())
32
+ try {
33
+ player.pause();
34
+ }
35
+ catch { /* Continue cleaning other players. */ } };
36
+ return { capability: { available: true, mechanism: 'native-audio', observed: false, reason: 'Backend supplied; playback latency/silent mode/interruption observations pending' }, preload,
37
+ play(event, prefs) {
38
+ if (dead || !prefs.sound || prefs.volume <= 0)
39
+ return;
40
+ const cue = presets[event.intent].sound;
41
+ if (!cue || assets[cue] == null)
42
+ return;
43
+ const generation = ++epoch;
44
+ const cached = ready ? players.get(cue) : undefined;
45
+ if (cached)
46
+ return dispatch(cached, prefs.volume);
47
+ stopActive();
48
+ return preload().then(() => { const player = players.get(cue); if (!dead && generation === epoch && player)
49
+ dispatch(player, prefs.volume); });
50
+ }, cancel,
51
+ dispose() { if (dead)
52
+ return; dead = true; cancel(); for (const player of players.values())
53
+ try {
54
+ player.remove();
55
+ }
56
+ catch { /* Release all remaining players. */ } players.clear(); } };
57
+ }
58
+ /** Host imports Expo only in its native feedback setup. This bridge keeps the contract injectable. */
59
+ export function expoAudioBackend(expo) { return { create: asset => expo.createAudioPlayer(asset), configure: () => expo.setAudioModeAsync({ playsInSilentMode: false, shouldPlayInBackground: false, interruptionMode: 'doNotMix' }) }; }
60
+ export function createNativeHapticAdapter(backend, available = true) { let dead = false; return { capability: { available, mechanism: available ? 'native-haptics' : 'none', observed: false, reason: 'Native backend supplied; OS settings/hardware may suppress output' }, play(event, prefs) { if (dead || !available || !prefs.haptics)
61
+ return; if (event.impact)
62
+ return backend.impact(event.impact); const cue = presets[event.intent].haptic; return cue === 'selection' ? backend.selection() : cue ? backend.notification(cue) : undefined; }, dispose() { dead = true; } }; }
63
+ export function expoHapticBackend(expo) { return { selection: () => expo.selectionAsync(), impact: style => expo.impactAsync(style === 'light' ? expo.ImpactFeedbackStyle.Light : style === 'medium' ? expo.ImpactFeedbackStyle.Medium : expo.ImpactFeedbackStyle.Heavy), notification: type => expo.notificationAsync(type === 'success' ? expo.NotificationFeedbackType.Success : type === 'warning' ? expo.NotificationFeedbackType.Warning : expo.NotificationFeedbackType.Error) }; }
@@ -0,0 +1,8 @@
1
+ import type { FeedbackPreferences, PreferenceStorage } from '@bloxwap/hig/contracts/feedback';
2
+ export declare function migratePreferences(value: unknown): FeedbackPreferences;
3
+ export declare function jsonStorage(storage: {
4
+ getItem: (key: string) => string | null | Promise<string | null>;
5
+ setItem: (key: string, value: string) => void | Promise<void>;
6
+ }, key?: string): PreferenceStorage;
7
+ /** Avoid overwriting a user's new local choice with a delayed saved read. */
8
+ export declare function loadPreferences(storage: PreferenceStorage | undefined, revision: () => number, apply: (value: FeedbackPreferences) => void): Promise<void>;
@@ -0,0 +1,24 @@
1
+ import { defaultPreferences } from './contract.js';
2
+ export function migratePreferences(value) {
3
+ if (!value || typeof value !== 'object')
4
+ return { ...defaultPreferences };
5
+ const saved = value;
6
+ const sound = saved.sound ?? saved.soundEnabled, haptics = saved.haptics ?? saved.hapticsEnabled;
7
+ const volume = typeof saved.volume === 'number' && Number.isFinite(saved.volume) ? Math.max(0, Math.min(1, saved.volume)) : defaultPreferences.volume;
8
+ return { version: 1, sound: typeof sound === 'boolean' ? sound : defaultPreferences.sound, haptics: typeof haptics === 'boolean' ? haptics : defaultPreferences.haptics, volume, motion: typeof saved.motion === 'boolean' ? saved.motion : typeof saved.reducedMotion === 'boolean' ? !saved.reducedMotion : defaultPreferences.motion };
9
+ }
10
+ export function jsonStorage(storage, key = 'bloxwap.hig.feedback.v1') { return { read: async () => { try {
11
+ const raw = await storage.getItem(key);
12
+ return raw ? JSON.parse(raw) : undefined;
13
+ }
14
+ catch {
15
+ return undefined;
16
+ } }, write: value => storage.setItem(key, JSON.stringify(value)) }; }
17
+ /** Avoid overwriting a user's new local choice with a delayed saved read. */
18
+ export async function loadPreferences(storage, revision, apply) { if (!storage)
19
+ return; const initial = revision(); try {
20
+ const value = await storage.read();
21
+ if (revision() === initial)
22
+ apply(migratePreferences(value));
23
+ }
24
+ catch { /* Storage is optional. */ } }
@@ -0,0 +1,57 @@
1
+ export declare const presets: {
2
+ readonly press: {
3
+ readonly sound: null;
4
+ readonly haptic: null;
5
+ readonly cooldown: 0;
6
+ };
7
+ readonly activate: {
8
+ readonly sound: 'tick';
9
+ readonly haptic: 'selection';
10
+ readonly cooldown: 80;
11
+ };
12
+ readonly release: {
13
+ readonly sound: null;
14
+ readonly haptic: null;
15
+ readonly cooldown: 0;
16
+ };
17
+ readonly cancel: {
18
+ readonly sound: null;
19
+ readonly haptic: null;
20
+ readonly cooldown: 0;
21
+ };
22
+ readonly selection: {
23
+ readonly sound: 'tick';
24
+ readonly haptic: 'selection';
25
+ readonly cooldown: 80;
26
+ };
27
+ readonly toggle: {
28
+ readonly sound: 'toggle';
29
+ readonly haptic: 'selection';
30
+ readonly cooldown: 80;
31
+ };
32
+ readonly disclosure: {
33
+ readonly sound: null;
34
+ readonly haptic: null;
35
+ readonly cooldown: 120;
36
+ };
37
+ readonly success: {
38
+ readonly sound: 'success';
39
+ readonly haptic: 'success';
40
+ readonly cooldown: 400;
41
+ };
42
+ readonly warning: {
43
+ readonly sound: null;
44
+ readonly haptic: 'warning';
45
+ readonly cooldown: 400;
46
+ };
47
+ readonly error: {
48
+ readonly sound: 'error';
49
+ readonly haptic: 'error';
50
+ readonly cooldown: 400;
51
+ };
52
+ readonly notification: {
53
+ readonly sound: null;
54
+ readonly haptic: null;
55
+ readonly cooldown: 800;
56
+ };
57
+ };
@@ -0,0 +1 @@
1
+ export const presets = { press: { sound: null, haptic: null, cooldown: 0 }, activate: { sound: 'tick', haptic: 'selection', cooldown: 80 }, release: { sound: null, haptic: null, cooldown: 0 }, cancel: { sound: null, haptic: null, cooldown: 0 }, selection: { sound: 'tick', haptic: 'selection', cooldown: 80 }, toggle: { sound: 'toggle', haptic: 'selection', cooldown: 80 }, disclosure: { sound: null, haptic: null, cooldown: 120 }, success: { sound: 'success', haptic: 'success', cooldown: 400 }, warning: { sound: null, haptic: 'warning', cooldown: 400 }, error: { sound: 'error', haptic: 'error', cooldown: 400 }, notification: { sound: null, haptic: null, cooldown: 800 } };
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { FeedbackPreferences, FeedbackSink, PreferenceStorage } from '@bloxwap/hig/contracts/feedback';
3
+ import { FeedbackController } from './contract.js';
4
+ interface FeedbackContext {
5
+ preferences: FeedbackPreferences;
6
+ update: (next: Partial<FeedbackPreferences>) => void;
7
+ sink: FeedbackSink;
8
+ controller: () => FeedbackController | null;
9
+ }
10
+ export declare function FeedbackProvider({ children, createController, storage, initialPreferences }: React.PropsWithChildren<{
11
+ initialPreferences?: Partial<FeedbackPreferences>;
12
+ createController: (prefs: FeedbackPreferences) => FeedbackController;
13
+ storage?: PreferenceStorage;
14
+ }>): React.JSX.Element;
15
+ export declare const useFeedback: () => FeedbackContext;
16
+ export declare function FeedbackPreferencesControl({ children }: {
17
+ children: (context: Pick<FeedbackContext, 'preferences' | 'update'>) => React.ReactNode;
18
+ }): React.JSX.Element;
19
+ export {};
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext, useEffect, useRef, useState, useCallback } from 'react';
4
+ import { defaultPreferences } from './contract.js';
5
+ import { loadPreferences, migratePreferences } from './preferences.js';
6
+ const Context = createContext({ preferences: defaultPreferences, update: () => { }, sink: { emit: () => { } }, controller: () => null });
7
+ export function FeedbackProvider({ children, createController, storage, initialPreferences }) {
8
+ const [preferences, setPreferences] = useState(() => migratePreferences({ ...defaultPreferences, ...initialPreferences }));
9
+ const current = useRef(preferences);
10
+ const revision = useRef(0);
11
+ const controller = useRef(null);
12
+ const [sink] = useState(() => ({ emit: event => controller.current?.emit(event) }));
13
+ useEffect(() => { const instance = createController(current.current); controller.current = instance; let alive = true; void loadPreferences(storage, () => revision.current, value => { if (!alive)
14
+ return; current.current = value; setPreferences(value); instance.updatePreferences(value); }); return () => { alive = false; controller.current = null; instance.dispose(); }; }, [createController, storage]);
15
+ const update = useCallback((next) => { revision.current++; const value = migratePreferences({ ...current.current, ...next }); current.current = value; setPreferences(value); controller.current?.updatePreferences(value); try {
16
+ Promise.resolve(storage?.write(value)).catch(() => { });
17
+ }
18
+ catch { /* Preferences remain live without storage. */ } }, [storage]);
19
+ const getController = useCallback(() => controller.current, []);
20
+ return _jsx(Context.Provider, { value: { preferences, update, sink, controller: getController }, children: children });
21
+ }
22
+ export const useFeedback = () => useContext(Context);
23
+ export function FeedbackPreferencesControl({ children }) { const { preferences, update } = useFeedback(); return _jsx(_Fragment, { children: children({ preferences, update }) }); }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { type HapticTargetProps } from '@bloxwap/haptic';
3
+ /** Physical-tap opt-in. Pre-approval is required because an iOS tick precedes delegated cancellation. */
4
+ export declare function HapticFeedbackTarget({ eligible, children, ...props }: Omit<HapticTargetProps, 'enabled' | 'webHapticsOptions'> & {
5
+ eligible?: boolean;
6
+ }): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { HapticTarget, useIOSNativeHaptics } from '@bloxwap/haptic';
4
+ import { useFeedback } from './react.js';
5
+ /** Physical-tap opt-in. Pre-approval is required because an iOS tick precedes delegated cancellation. */
6
+ export function HapticFeedbackTarget({ eligible = false, children, ...props }) { const { preferences } = useFeedback(); const physicalTap = useIOSNativeHaptics(); return _jsx(HapticTarget, { ...props, enabled: physicalTap && eligible && preferences.haptics, webHapticsOptions: { debug: false, showSwitch: false }, children: children }); }
@@ -0,0 +1,5 @@
1
+ import type { FeedbackAdapter } from '@bloxwap/hig/contracts/feedback';
2
+ type SfxEngine = Pick<typeof import('@bloxwap/sfx'), 'unlock' | 'play' | 'preload' | 'dispose'>;
3
+ /** No import/AudioContext until an enabled semantic request follows a trusted gesture. */
4
+ export declare function createWebSoundAdapter(load?: () => Promise<SfxEngine>): FeedbackAdapter;
5
+ export {};