camoucore 0.3.0 → 0.6.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 (168) hide show
  1. package/LICENSE +4 -3
  2. package/dist/camoufox/__main__.d.ts +10 -0
  3. package/dist/camoufox/__main__.js +1175 -0
  4. package/dist/camoufox/__version__.d.ts +31 -0
  5. package/dist/camoufox/__version__.js +32 -0
  6. package/dist/camoufox/_humanize_playwright.d.ts +54 -0
  7. package/dist/camoufox/_humanize_playwright.js +429 -0
  8. package/dist/camoufox/addons.d.ts +21 -0
  9. package/dist/camoufox/addons.js +56 -0
  10. package/dist/camoufox/async_api.d.ts +9 -0
  11. package/dist/camoufox/async_api.js +9 -0
  12. package/dist/camoufox/browser-pin.d.ts +46 -0
  13. package/dist/camoufox/browser-pin.js +96 -0
  14. package/dist/camoufox/cli.d.ts +7 -0
  15. package/dist/camoufox/cli.js +20 -0
  16. package/dist/camoufox/coherence.d.ts +141 -0
  17. package/dist/camoufox/coherence.js +708 -0
  18. package/dist/camoufox/data-files/browser-pin.json +7 -0
  19. package/dist/camoufox/data-files/essential-fonts.json +5 -0
  20. package/dist/camoufox/data-files/fingerprint-presets-v150.json +14544 -0
  21. package/dist/camoufox/data-files/fingerprint-presets.json +5192 -0
  22. package/dist/camoufox/data-files/font-bases.json +1887 -0
  23. package/dist/camoufox/data-files/font-groups.json +716 -0
  24. package/dist/camoufox/data-files/fonts.json +240 -0
  25. package/dist/camoufox/data-files/fpgen.yml +44 -0
  26. package/dist/camoufox/data-files/launcher-constants.json +66 -0
  27. package/dist/camoufox/data-files/media-devices.json +148 -0
  28. package/dist/camoufox/data-files/repos.yml +40 -0
  29. package/dist/camoufox/data-files/voice-manifests.json +1864 -0
  30. package/dist/camoufox/data-files/voice-uris.json +188 -0
  31. package/dist/camoufox/data-files/warnings.yml +132 -0
  32. package/dist/camoufox/display_profile.d.ts +17 -0
  33. package/dist/camoufox/display_profile.js +72 -0
  34. package/dist/camoufox/driver_defaults.d.ts +25 -0
  35. package/dist/camoufox/driver_defaults.js +114 -0
  36. package/dist/camoufox/exceptions.d.ts +78 -0
  37. package/dist/camoufox/exceptions.js +135 -0
  38. package/dist/camoufox/fingerprints.d.ts +341 -0
  39. package/dist/camoufox/fingerprints.js +1682 -0
  40. package/dist/camoufox/gpudisplay.d.ts +158 -0
  41. package/dist/camoufox/gpudisplay.js +695 -0
  42. package/dist/camoufox/host_rendering.d.ts +38 -0
  43. package/dist/camoufox/host_rendering.js +180 -0
  44. package/dist/camoufox/humanize.d.ts +89 -0
  45. package/dist/camoufox/humanize.js +143 -0
  46. package/dist/camoufox/index.d.ts +21 -0
  47. package/dist/camoufox/index.js +21 -0
  48. package/dist/camoufox/ip.d.ts +45 -0
  49. package/dist/camoufox/ip.js +114 -0
  50. package/dist/camoufox/multiversion.d.ts +131 -0
  51. package/dist/camoufox/multiversion.js +489 -0
  52. package/dist/camoufox/node-floor.d.ts +5 -0
  53. package/dist/camoufox/node-floor.js +17 -0
  54. package/dist/camoufox/paths.d.ts +45 -0
  55. package/dist/camoufox/paths.js +59 -0
  56. package/dist/camoufox/pkgman.d.ts +331 -0
  57. package/dist/camoufox/pkgman.js +972 -0
  58. package/dist/camoufox/product.d.ts +8 -0
  59. package/dist/camoufox/product.js +8 -0
  60. package/dist/camoufox/pycompat.d.ts +97 -0
  61. package/dist/camoufox/pycompat.js +458 -0
  62. package/dist/camoufox/server.d.ts +36 -0
  63. package/dist/camoufox/server.js +82 -0
  64. package/dist/camoufox/sync_api.d.ts +77 -0
  65. package/dist/camoufox/sync_api.js +194 -0
  66. package/dist/camoufox/utils.d.ts +515 -0
  67. package/dist/camoufox/utils.js +1995 -0
  68. package/dist/camoufox/warnings.d.ts +16 -0
  69. package/dist/camoufox/warnings.js +65 -0
  70. package/dist/camoufox/webgl.d.ts +52 -0
  71. package/dist/camoufox/webgl.js +264 -0
  72. package/dist/camouwolf/__main__.d.ts +10 -0
  73. package/dist/camouwolf/__main__.js +1180 -0
  74. package/dist/camouwolf/__version__.d.ts +31 -0
  75. package/dist/camouwolf/__version__.js +32 -0
  76. package/dist/camouwolf/_humanize_playwright.d.ts +53 -0
  77. package/dist/camouwolf/_humanize_playwright.js +427 -0
  78. package/dist/camouwolf/addons.d.ts +42 -0
  79. package/dist/camouwolf/addons.js +113 -0
  80. package/dist/camouwolf/async_api.d.ts +9 -0
  81. package/dist/camouwolf/async_api.js +9 -0
  82. package/dist/camouwolf/browser-pin.d.ts +46 -0
  83. package/dist/camouwolf/browser-pin.js +96 -0
  84. package/dist/camouwolf/cli.d.ts +7 -0
  85. package/dist/camouwolf/cli.js +20 -0
  86. package/dist/camouwolf/clienthints.d.ts +61 -0
  87. package/dist/camouwolf/clienthints.js +176 -0
  88. package/dist/camouwolf/coherence.d.ts +152 -0
  89. package/dist/camouwolf/coherence.js +554 -0
  90. package/dist/camouwolf/data-files/browser-pin.json +7 -0
  91. package/dist/camouwolf/data-files/camouwolf.defaults.json +118 -0
  92. package/dist/camouwolf/data-files/data/bundle-fonts.json +1983 -0
  93. package/dist/camouwolf/data-files/data/chrome-languages.json +517 -0
  94. package/dist/camouwolf/data-files/data/properties.json +321 -0
  95. package/dist/camouwolf/data-files/data/system-colors.json +35 -0
  96. package/dist/camouwolf/data-files/data/ubo.json +6 -0
  97. package/dist/camouwolf/data-files/fpgen.yml +41 -0
  98. package/dist/camouwolf/data-files/launcher-constants.json +26 -0
  99. package/dist/camouwolf/data-files/repos.yml +23 -0
  100. package/dist/camouwolf/data-files/warnings.yml +96 -0
  101. package/dist/camouwolf/driver_defaults.d.ts +25 -0
  102. package/dist/camouwolf/driver_defaults.js +114 -0
  103. package/dist/camouwolf/exceptions.d.ts +95 -0
  104. package/dist/camouwolf/exceptions.js +150 -0
  105. package/dist/camouwolf/fingerprints.d.ts +227 -0
  106. package/dist/camouwolf/fingerprints.js +753 -0
  107. package/dist/camouwolf/gpudisplay.d.ts +171 -0
  108. package/dist/camouwolf/gpudisplay.js +711 -0
  109. package/dist/camouwolf/host_rendering.d.ts +18 -0
  110. package/dist/camouwolf/host_rendering.js +114 -0
  111. package/dist/camouwolf/humanize.d.ts +84 -0
  112. package/dist/camouwolf/humanize.js +128 -0
  113. package/dist/camouwolf/index.d.ts +22 -0
  114. package/dist/camouwolf/index.js +21 -0
  115. package/dist/camouwolf/multiversion.d.ts +131 -0
  116. package/dist/camouwolf/multiversion.js +491 -0
  117. package/dist/camouwolf/node-floor.d.ts +5 -0
  118. package/dist/camouwolf/node-floor.js +17 -0
  119. package/dist/camouwolf/paths.d.ts +34 -0
  120. package/dist/camouwolf/paths.js +58 -0
  121. package/dist/camouwolf/pkgman.d.ts +331 -0
  122. package/dist/camouwolf/pkgman.js +972 -0
  123. package/dist/camouwolf/product.d.ts +3 -0
  124. package/dist/camouwolf/product.js +3 -0
  125. package/dist/camouwolf/pycompat.d.ts +92 -0
  126. package/dist/camouwolf/pycompat.js +461 -0
  127. package/dist/camouwolf/server.d.ts +36 -0
  128. package/dist/camouwolf/server.js +81 -0
  129. package/dist/camouwolf/switches.d.ts +77 -0
  130. package/dist/camouwolf/switches.js +222 -0
  131. package/dist/camouwolf/sync_api.d.ts +84 -0
  132. package/dist/camouwolf/sync_api.js +173 -0
  133. package/dist/camouwolf/utils.d.ts +644 -0
  134. package/dist/camouwolf/utils.js +2057 -0
  135. package/dist/camouwolf/warnings.d.ts +14 -0
  136. package/dist/camouwolf/warnings.js +59 -0
  137. package/dist/camouwolf/webgl.d.ts +41 -0
  138. package/dist/camouwolf/webgl.js +198 -0
  139. package/dist/data.d.ts +1 -1
  140. package/dist/data.js +3 -3
  141. package/dist/download.js +1 -1
  142. package/dist/exceptions.d.ts +1 -1
  143. package/dist/exceptions.js +1 -1
  144. package/dist/geolocation.js +1 -1
  145. package/dist/host.js +1 -1
  146. package/dist/ip.js +1 -1
  147. package/dist/locales.js +1 -1
  148. package/dist/mcp/cli.d.ts +15 -0
  149. package/dist/mcp/cli.js +108 -0
  150. package/dist/mcp/index.d.ts +8 -0
  151. package/dist/mcp/index.js +8 -0
  152. package/dist/mcp/main.d.ts +2 -0
  153. package/dist/mcp/main.js +8 -0
  154. package/dist/mcp/secrets.d.ts +50 -0
  155. package/dist/mcp/secrets.js +193 -0
  156. package/dist/mcp/server.d.ts +48 -0
  157. package/dist/mcp/server.js +653 -0
  158. package/dist/mcp/tree.d.ts +10 -0
  159. package/dist/mcp/tree.js +36 -0
  160. package/dist/passthrough.d.ts +1 -1
  161. package/dist/product.js +1 -1
  162. package/dist/settings.js +1 -1
  163. package/dist/telemetry.d.ts +0 -1
  164. package/dist/telemetry.js +5 -4
  165. package/dist/virtdisplay.d.ts +1 -1
  166. package/dist/virtdisplay.js +1 -1
  167. package/dist/warnings.js +1 -1
  168. package/package.json +57 -13
@@ -0,0 +1,188 @@
1
+ {
2
+ "mac": {
3
+ "Albert|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Albert",
4
+ "Alice|it-IT": "urn:moz-tts:osx:com.apple.voice.compact.it-IT.Alice",
5
+ "Alva|sv-SE": "urn:moz-tts:osx:com.apple.voice.compact.sv-SE.Alva",
6
+ "Aman|en-IN": "urn:moz-tts:osx:com.apple.voice.Aman",
7
+ "Amira|ms-MY": "urn:moz-tts:osx:com.apple.voice.compact.ms-MY.Amira",
8
+ "Amélie|fr-CA": "urn:moz-tts:osx:com.apple.voice.compact.fr-CA.Amelie",
9
+ "Anna|de-DE": "urn:moz-tts:osx:com.apple.voice.compact.de-DE.Anna",
10
+ "Aru|kk-KZ": "urn:moz-tts:osx:com.apple.voice.Aru",
11
+ "Bad News|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.BadNews",
12
+ "Bahh|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Bahh",
13
+ "Bells|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Bells",
14
+ "Boing|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Boing",
15
+ "Bubbles|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Bubbles",
16
+ "Carmit|he-IL": "urn:moz-tts:osx:com.apple.voice.compact.he-IL.Carmit",
17
+ "Cellos|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Cellos",
18
+ "Damayanti|id-ID": "urn:moz-tts:osx:com.apple.voice.compact.id-ID.Damayanti",
19
+ "Daniel|en-GB": "urn:moz-tts:osx:com.apple.voice.compact.en-GB.Daniel",
20
+ "Daria|bg-BG": "urn:moz-tts:osx:com.apple.voice.compact.bg-BG.Daria",
21
+ "Eddy (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Eddy",
22
+ "Eddy (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Eddy",
23
+ "Eddy (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Eddy",
24
+ "Eddy (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Eddy",
25
+ "Eddy (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Eddy",
26
+ "Eddy (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Eddy",
27
+ "Eddy (French (France))|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Eddy",
28
+ "Eddy (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Eddy",
29
+ "Eddy (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Eddy",
30
+ "Eddy (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Eddy",
31
+ "Eddy (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Eddy",
32
+ "Eddy (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Eddy",
33
+ "Eddy (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Eddy",
34
+ "Eddy (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Eddy",
35
+ "Ellen|nl-BE": "urn:moz-tts:osx:com.apple.voice.compact.nl-BE.Ellen",
36
+ "Flo (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Flo",
37
+ "Flo (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Flo",
38
+ "Flo (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Flo",
39
+ "Flo (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Flo",
40
+ "Flo (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Flo",
41
+ "Flo (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Flo",
42
+ "Flo (French (France))|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Flo",
43
+ "Flo (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Flo",
44
+ "Flo (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Flo",
45
+ "Flo (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Flo",
46
+ "Flo (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Flo",
47
+ "Flo (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Flo",
48
+ "Flo (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Flo",
49
+ "Flo (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Flo",
50
+ "Fred|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Fred",
51
+ "Geeta|te-IN": "urn:moz-tts:osx:com.apple.voice.compact.te-IN.Geeta",
52
+ "Good News|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.GoodNews",
53
+ "Grandma (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Grandma",
54
+ "Grandma (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Grandma",
55
+ "Grandma (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Grandma",
56
+ "Grandma (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Grandma",
57
+ "Grandma (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Grandma",
58
+ "Grandma (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Grandma",
59
+ "Grandma (French (France))|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Grandma",
60
+ "Grandma (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Grandma",
61
+ "Grandma (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Grandma",
62
+ "Grandma (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Grandma",
63
+ "Grandma (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Grandma",
64
+ "Grandma (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Grandma",
65
+ "Grandma (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Grandma",
66
+ "Grandma (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Grandma",
67
+ "Grandpa (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Grandpa",
68
+ "Grandpa (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Grandpa",
69
+ "Grandpa (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Grandpa",
70
+ "Grandpa (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Grandpa",
71
+ "Grandpa (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Grandpa",
72
+ "Grandpa (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Grandpa",
73
+ "Grandpa (French (France))|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Grandpa",
74
+ "Grandpa (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Grandpa",
75
+ "Grandpa (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Grandpa",
76
+ "Grandpa (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Grandpa",
77
+ "Grandpa (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Grandpa",
78
+ "Grandpa (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Grandpa",
79
+ "Grandpa (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Grandpa",
80
+ "Grandpa (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Grandpa",
81
+ "Ioana|ro-RO": "urn:moz-tts:osx:com.apple.voice.compact.ro-RO.Ioana",
82
+ "Jacques|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Jacques",
83
+ "Jester|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Hysterical",
84
+ "Joana|pt-PT": "urn:moz-tts:osx:com.apple.voice.compact.pt-PT.Joana",
85
+ "Junior|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Junior",
86
+ "Kanya|th-TH": "urn:moz-tts:osx:com.apple.voice.compact.th-TH.Kanya",
87
+ "Karen|en-AU": "urn:moz-tts:osx:com.apple.voice.compact.en-AU.Karen",
88
+ "Kathy|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Kathy",
89
+ "Kyoko|ja-JP": "urn:moz-tts:osx:com.apple.voice.compact.ja-JP.Kyoko",
90
+ "Lana|hr-HR": "urn:moz-tts:osx:com.apple.voice.compact.hr-HR.Lana",
91
+ "Laura|sk-SK": "urn:moz-tts:osx:com.apple.voice.compact.sk-SK.Laura",
92
+ "Lekha|hi-IN": "urn:moz-tts:osx:com.apple.voice.compact.hi-IN.Lekha",
93
+ "Lesya|uk-UA": "urn:moz-tts:osx:com.apple.voice.compact.uk-UA.Lesya",
94
+ "Linh|vi-VN": "urn:moz-tts:osx:com.apple.voice.compact.vi-VN.Linh",
95
+ "Luciana|pt-BR": "urn:moz-tts:osx:com.apple.voice.compact.pt-BR.Luciana",
96
+ "Majed|ar-001": "urn:moz-tts:osx:com.apple.voice.compact.ar-001.Maged",
97
+ "Meijia|zh-TW": "urn:moz-tts:osx:com.apple.voice.compact.zh-TW.Meijia",
98
+ "Melina|el-GR": "urn:moz-tts:osx:com.apple.voice.compact.el-GR.Melina",
99
+ "Milena|ru-RU": "urn:moz-tts:osx:com.apple.voice.compact.ru-RU.Milena",
100
+ "Moira|en-IE": "urn:moz-tts:osx:com.apple.voice.compact.en-IE.Moira",
101
+ "Montse|ca-ES": "urn:moz-tts:osx:com.apple.voice.compact.ca-ES.Montserrat",
102
+ "Mónica|es-ES": "urn:moz-tts:osx:com.apple.voice.compact.es-ES.Monica",
103
+ "Nora|nb-NO": "urn:moz-tts:osx:com.apple.voice.compact.nb-NO.Nora",
104
+ "Ona|lt-LT": "urn:moz-tts:osx:com.apple.voice.Ona",
105
+ "Organ|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Organ",
106
+ "Paulina|es-MX": "urn:moz-tts:osx:com.apple.voice.compact.es-MX.Paulina",
107
+ "Piya|bn-IN": "urn:moz-tts:osx:com.apple.voice.compact.bn-IN.Paya",
108
+ "Ralph|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Ralph",
109
+ "Reed (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Reed",
110
+ "Reed (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Reed",
111
+ "Reed (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Reed",
112
+ "Reed (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Reed",
113
+ "Reed (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Reed",
114
+ "Reed (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Reed",
115
+ "Reed (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Reed",
116
+ "Reed (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Reed",
117
+ "Reed (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Reed",
118
+ "Reed (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Reed",
119
+ "Reed (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Reed",
120
+ "Reed (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Reed",
121
+ "Reed (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Reed",
122
+ "Rishi|en-IN": "urn:moz-tts:osx:com.apple.voice.compact.en-IN.Rishi",
123
+ "Rocko (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Rocko",
124
+ "Rocko (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Rocko",
125
+ "Rocko (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Rocko",
126
+ "Rocko (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Rocko",
127
+ "Rocko (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Rocko",
128
+ "Rocko (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Rocko",
129
+ "Rocko (French (France))|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Rocko",
130
+ "Rocko (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Rocko",
131
+ "Rocko (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Rocko",
132
+ "Rocko (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Rocko",
133
+ "Rocko (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Rocko",
134
+ "Rocko (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Rocko",
135
+ "Rocko (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Rocko",
136
+ "Rocko (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Rocko",
137
+ "Samantha|en-US": "urn:moz-tts:osx:com.apple.voice.compact.en-US.Samantha",
138
+ "Sandy (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Sandy",
139
+ "Sandy (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Sandy",
140
+ "Sandy (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Sandy",
141
+ "Sandy (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Sandy",
142
+ "Sandy (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Sandy",
143
+ "Sandy (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Sandy",
144
+ "Sandy (French (France))|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Sandy",
145
+ "Sandy (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Sandy",
146
+ "Sandy (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Sandy",
147
+ "Sandy (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Sandy",
148
+ "Sandy (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Sandy",
149
+ "Sandy (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Sandy",
150
+ "Sandy (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Sandy",
151
+ "Sandy (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Sandy",
152
+ "Sara|da-DK": "urn:moz-tts:osx:com.apple.voice.compact.da-DK.Sara",
153
+ "Satu|fi-FI": "urn:moz-tts:osx:com.apple.voice.compact.fi-FI.Satu",
154
+ "Shelley (Chinese (China mainland))|zh-CN": "urn:moz-tts:osx:com.apple.eloquence.zh-CN.Shelley",
155
+ "Shelley (Chinese (Taiwan))|zh-TW": "urn:moz-tts:osx:com.apple.eloquence.zh-TW.Shelley",
156
+ "Shelley (English (UK))|en-GB": "urn:moz-tts:osx:com.apple.eloquence.en-GB.Shelley",
157
+ "Shelley (English (US))|en-US": "urn:moz-tts:osx:com.apple.eloquence.en-US.Shelley",
158
+ "Shelley (Finnish (Finland))|fi-FI": "urn:moz-tts:osx:com.apple.eloquence.fi-FI.Shelley",
159
+ "Shelley (French (Canada))|fr-CA": "urn:moz-tts:osx:com.apple.eloquence.fr-CA.Shelley",
160
+ "Shelley (French (France))|fr-FR": "urn:moz-tts:osx:com.apple.eloquence.fr-FR.Shelley",
161
+ "Shelley (German (Germany))|de-DE": "urn:moz-tts:osx:com.apple.eloquence.de-DE.Shelley",
162
+ "Shelley (Italian (Italy))|it-IT": "urn:moz-tts:osx:com.apple.eloquence.it-IT.Shelley",
163
+ "Shelley (Japanese (Japan))|ja-JP": "urn:moz-tts:osx:com.apple.eloquence.ja-JP.Shelley",
164
+ "Shelley (Korean (South Korea))|ko-KR": "urn:moz-tts:osx:com.apple.eloquence.ko-KR.Shelley",
165
+ "Shelley (Portuguese (Brazil))|pt-BR": "urn:moz-tts:osx:com.apple.eloquence.pt-BR.Shelley",
166
+ "Shelley (Spanish (Mexico))|es-MX": "urn:moz-tts:osx:com.apple.eloquence.es-MX.Shelley",
167
+ "Shelley (Spanish (Spain))|es-ES": "urn:moz-tts:osx:com.apple.eloquence.es-ES.Shelley",
168
+ "Sinji|zh-HK": "urn:moz-tts:osx:com.apple.voice.compact.zh-HK.Sinji",
169
+ "Soumya|kn-IN": "urn:moz-tts:osx:com.apple.voice.compact.kn-IN.Alpana",
170
+ "Superstar|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Princess",
171
+ "Tara|en-IN": "urn:moz-tts:osx:com.apple.voice.Tara",
172
+ "Tessa|en-ZA": "urn:moz-tts:osx:com.apple.voice.compact.en-ZA.Tessa",
173
+ "Thomas|fr-FR": "urn:moz-tts:osx:com.apple.voice.compact.fr-FR.Thomas",
174
+ "Tina|sl-SI": "urn:moz-tts:osx:com.apple.voice.compact.sl-SI.Tina",
175
+ "Tingting|zh-CN": "urn:moz-tts:osx:com.apple.voice.compact.zh-CN.Tingting",
176
+ "Trinoids|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Trinoids",
177
+ "Tünde|hu-HU": "urn:moz-tts:osx:com.apple.voice.compact.hu-HU.Mariska",
178
+ "Vani|ta-IN": "urn:moz-tts:osx:com.apple.voice.compact.ta-IN.Vani",
179
+ "Whisper|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Whisper",
180
+ "Wobble|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Deranged",
181
+ "Xander|nl-NL": "urn:moz-tts:osx:com.apple.voice.compact.nl-NL.Xander",
182
+ "Yelda|tr-TR": "urn:moz-tts:osx:com.apple.voice.compact.tr-TR.Yelda",
183
+ "Yuna|ko-KR": "urn:moz-tts:osx:com.apple.voice.compact.ko-KR.Yuna",
184
+ "Zarvox|en-US": "urn:moz-tts:osx:com.apple.speech.synthesis.voice.Zarvox",
185
+ "Zosia|pl-PL": "urn:moz-tts:osx:com.apple.voice.compact.pl-PL.Zosia",
186
+ "Zuzana|cs-CZ": "urn:moz-tts:osx:com.apple.voice.compact.cs-CZ.Zuzana"
187
+ }
188
+ }
@@ -0,0 +1,132 @@
1
+ navigator: >-
2
+ Manually setting navigator properties is not recommended.
3
+ Device information is automatically generated within Camoufox
4
+ based on the provided `os`.
5
+
6
+ locale: >-
7
+ Use the `locale` parameter in Camoufox instead of setting the config manually.
8
+
9
+ geolocation: >-
10
+ Please use the `geoip` parameter in Camoufox instead of setting your geolocation manually.
11
+ This can lead to detection if your target geolocation does not match your IP.
12
+ Pass `geoip=True` or a target IP (ex: geoip='123.45.67.89') to let Camoufox populate this data for you.
13
+
14
+ header-ua: >-
15
+ Do not set the header.User-Agent manually. Camoufox will generate a User-Agent for you.
16
+
17
+ viewport: >-
18
+ Manually setting screen & window properties is not recommended.
19
+ Screen dimensions are randomly generated within Camoufox
20
+ based on the provided screen constraints.
21
+
22
+ custom_fingerprint: >-
23
+ Passing your own fingerprint is not recommended.
24
+ Fingerprints are automatically generated within Camoufox
25
+ based on the provided `os` and `screen` constraints.
26
+
27
+ proxy_without_geoip: >-
28
+ When using a proxy, it is heavily recommended that you pass `geoip=True`.
29
+
30
+ proxy_http_no_udp: >-
31
+ An HTTP proxy carries no UDP, so WebRTC and HTTP/3 behave as on a machine whose firewall drops all UDP (no
32
+ server-reflexive candidate, STUN that never answers), which sites can tell from an ordinary user.
33
+ Use a SOCKS5 proxy that supports UDP ASSOCIATE (`socks5://...`): WebRTC and HTTP/3 then leave from the proxy's exit.
34
+
35
+ ipv6_elsewhere: >-
36
+ This machine's IPv6 address geolocates somewhere other than the IPv4 address the identity was drawn from,
37
+ so the browser behaves as on an IPv4-only network and sites that only have an IPv6 address will not load.
38
+ A VPN that tunnels only IPv4 is the usual cause. Use a proxy, or route IPv6 through the VPN as well.
39
+
40
+ ff_version: >-
41
+ Spoofing the Firefox version will likely lead to detection.
42
+ If rotating the Firefox version is absolutely necessary, it would be more advisable to
43
+ rotate between older versions of Camoufox instead.
44
+
45
+ instant_animations: >-
46
+ instantAnimations makes every finite animation finish at once, so Playwright
47
+ never waits on one. A page can see it: getComputedTiming() reports a duration
48
+ of 0 where stock Firefox reports the real one.
49
+
50
+ context_proxy_without_launch_proxy: >-
51
+ This browser was launched without a proxy, so its own traffic, which belongs
52
+ to no context (the push connection every context shares), goes through the
53
+ first proxied context's proxy for the browser's life. Pass a launch-level
54
+ `proxy` to choose where it goes.
55
+
56
+ is_mobile: >-
57
+ Camoufox is built for desktops and only draws desktop identities, so is_mobile
58
+ cannot produce a believable phone and will leak: the page still sees a desktop
59
+ User-Agent, platform, fonts, GPU and screen. Camoufox ignores is_mobile rather
60
+ than put the page in Responsive Design Mode, which a page can read too.
61
+ Use has_touch, device_scale_factor and viewport for the parts you need.
62
+
63
+ block_webgl: >-
64
+ Disabling WebGL is not recommended. Many WAFs will check if WebGL is enabled.
65
+
66
+ canvas_noise: >-
67
+ Canvas and WebGL readback return random data, as privacy.resistFingerprinting
68
+ does in LibreWolf, Tor Browser and Mullvad Browser. Stock Firefox does not
69
+ do this, so the browser reads as a privacy-hardened Firefox. It is on because
70
+ the identity claims another OS or GPU than this machine's, whose canvas would
71
+ show the real one. Pass `canvas_noise=False` to keep stock canvas behaviour.
72
+
73
+ gpu_software_rendering: >-
74
+ The browser on the headless="virtual-gpu" display never rendered on the GPU, so it
75
+ renders canvas and WebGL in software, which a page can tell from the GPU the
76
+ identity claims. Pass `require_gpu=True` (the default) to fail the launch instead.
77
+
78
+ block_images: >-
79
+ Blocking image requests has been reported to cause detection issues on major WAFs.
80
+
81
+ custom_fonts_only: >-
82
+ Disabling OS-specific fonts while spoofing your OS will make your browser fingerprint inconsistent.
83
+ WAFs can detect this mismatch between your claimed OS and available system fonts.
84
+
85
+ disable_coop: >-
86
+ Disabling Cross-Origin-Opener-Policy (COOP) handling can potentially be detected by sophisticated WAFs.
87
+
88
+ max_touch_points: >-
89
+ Setting navigator.maxTouchPoints manually overrides Camoufox's touchscreen handling.
90
+ A non-zero value presents a touch digitizer: Camoufox adds `(any-pointer: coarse)` and
91
+ the TouchEvent/Touch interfaces to match a touchscreen laptop, while deliberately leaving
92
+ `(pointer: coarse)` false and `ontouchstart` absent, exactly as a real one does.
93
+ The rest of your fingerprint is not adjusted to suit, so a device that claims a digitizer
94
+ but reports a screen size no touchscreen laptop ships with is still inconsistent.
95
+
96
+ fallback: |-
97
+ {what} failed, so this identity uses {instead} instead.
98
+ A substitute is not drawn to match the rest of the identity, and a page may be able to tell.
99
+ Please report this at https://github.com/daijro/camoufox/issues/new and include:
100
+
101
+ {report}
102
+
103
+ audio_seed_removed: >-
104
+ `audio:seed` has been removed and is ignored. Audio is now rendered exactly as
105
+ stock Firefox renders it: stock gives one value per CPU architecture, so noise
106
+ was a tell, not a disguise (ci/tribal-rules.yml: audio-is-not-noised).
107
+
108
+ humanize_remote: >-
109
+ humanize runs on a remote browser. Each event myuri plays is a round trip over the network,
110
+ so network jitter lands between the events. Run the driver next to the browser to avoid it.
111
+
112
+ addon_not_bundled: >-
113
+ This Camoufox build has no {addon} addon at {path}, so it launches without it.
114
+ Browser releases bundle their default addons; an older release or an unpackaged build does not.
115
+ Install a current release with `camoufox fetch` (for a local build, `make stage-ubo`),
116
+ or list {addon} in exclude_addons to leave it out on purpose.
117
+
118
+ no_h264_encoder: >-
119
+ This Linux host has no system FFmpeg (libavcodec), so the browser cannot encode H.264 and
120
+ WebCodecs reports avc1 encoding unsupported, which Windows Firefox never does.
121
+ Install it (Debian/Ubuntu: `apt install libavcodec60` or the release's libavcodecNN; Fedora: ffmpeg-libs
122
+ from RPM Fusion, which includes libx264).
123
+
124
+ caller_value_incoherent: >-
125
+ LEAK: config sets {keys}, which no real machine presents together with the rest of this identity
126
+ ({detail}). Camoufox launches with the value you passed, but a page that checks these values against each other
127
+ can tell this browser is not the machine it claims to be. Leave {keys} out of config to have a coherent value drawn.
128
+ i_know_what_im_doing does not silence this warning.
129
+
130
+ voices_unread: >-
131
+ This browser build cannot read voices:speechd, so a Linux identity reports no voices.
132
+ Run `camoufox set --release` for the paired build, or pass `voices` in config.
@@ -0,0 +1,17 @@
1
+ export declare const DISPLAY_PROFILE_PREF = "gfx.color_management.display_profile";
2
+ /** ICC bytes or a path; undefined, null, true or false keep the browser's own. */
3
+ export type DisplayProfileOption = Uint8Array | string | boolean | null | undefined;
4
+ /** Seam for tests: where profiles are written. */
5
+ export declare const displayProfileDeps: {
6
+ cacheDirs: (installDir: string) => string[];
7
+ };
8
+ /** `data` if it is an ICC profile (its declared size fits, "acsp" at 36), else throws. */
9
+ export declare function checkIcc(data: Uint8Array): Uint8Array;
10
+ /**
11
+ * Point gfx.color_management.display_profile at the caller's display profile.
12
+ *
13
+ * `option`: ICC bytes or a path. undefined, null, true or false: nothing is
14
+ * set and the browser reads the display's own, as stock does. A caller's own
15
+ * pref wins. Returns the path set, or null.
16
+ */
17
+ export declare function applyDisplayProfile(prefs: Record<string, any>, userPrefKeys: Set<string>, option: DisplayProfileOption, installDir: string): string | null;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The display's ICC colour profile, which a page reads through every
3
+ * ICC-tagged image it decodes. The TS twin of display_profile.py; see there
4
+ * for the reasoning.
5
+ *
6
+ * Firefox converts tagged images (gfx.color_management.mode 2) to the
7
+ * display's profile: the OS's, or the file gfx.color_management.display_profile
8
+ * names, which every platform reads first. `display_profile` sets that file
9
+ * from the caller's profile; without one the browser reads the real display's,
10
+ * as stock does. It is a stock Firefox pref, so any release honours it.
11
+ */
12
+ import { createHash } from "node:crypto";
13
+ import * as fs from "node:fs";
14
+ import * as os from "node:os";
15
+ import * as path from "node:path";
16
+ export const DISPLAY_PROFILE_PREF = "gfx.color_management.display_profile";
17
+ /** Seam for tests: where profiles are written. */
18
+ export const displayProfileDeps = {
19
+ cacheDirs: (installDir) => [
20
+ path.join(installDir, "display-profiles"),
21
+ path.join(os.tmpdir(), "camoufox-display-profiles"),
22
+ ],
23
+ };
24
+ /** `data` if it is an ICC profile (its declared size fits, "acsp" at 36), else throws. */
25
+ export function checkIcc(data) {
26
+ const b = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
27
+ if (b.length < 132 ||
28
+ b.toString("latin1", 36, 40) !== "acsp" ||
29
+ b.readUInt32BE(0) > b.length)
30
+ throw new Error("display_profile is not an ICC profile");
31
+ return data;
32
+ }
33
+ /** The profile's path in the cache (content-addressed, written once). */
34
+ function writeProfile(data, installDir) {
35
+ const name = `${createHash("sha256").update(data).digest("hex").slice(0, 24)}.icc`;
36
+ for (const base of displayProfileDeps.cacheDirs(installDir)) {
37
+ const file = path.join(base, name);
38
+ try {
39
+ if (!fs.existsSync(file) ||
40
+ !Buffer.from(data).equals(fs.readFileSync(file))) {
41
+ fs.mkdirSync(base, { recursive: true });
42
+ const tmp = path.join(base, `.${name}.${process.pid}`);
43
+ fs.writeFileSync(tmp, data);
44
+ fs.renameSync(tmp, file);
45
+ }
46
+ return file;
47
+ }
48
+ catch {
49
+ // next directory
50
+ }
51
+ }
52
+ throw new Error("no writable directory for the display profile");
53
+ }
54
+ /**
55
+ * Point gfx.color_management.display_profile at the caller's display profile.
56
+ *
57
+ * `option`: ICC bytes or a path. undefined, null, true or false: nothing is
58
+ * set and the browser reads the display's own, as stock does. A caller's own
59
+ * pref wins. Returns the path set, or null.
60
+ */
61
+ export function applyDisplayProfile(prefs, userPrefKeys, option, installDir) {
62
+ if (userPrefKeys.has(DISPLAY_PROFILE_PREF) ||
63
+ option == null ||
64
+ typeof option === "boolean")
65
+ return null;
66
+ const data = typeof option === "string"
67
+ ? fs.readFileSync(option.replace(/^~(?=$|\/)/, os.homedir()))
68
+ : option;
69
+ const file = writeProfile(checkIcc(data), installDir);
70
+ prefs[DISPLAY_PROFILE_PREF] = file;
71
+ return file;
72
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Driver calls that reach the page as a person's actions would. The TypeScript
3
+ * twin of python/camoucore/src/camoucore/camoufox/driver_defaults.py, which holds the reasoning.
4
+ *
5
+ * Screenshots default to caret: "initial", which leaves the page's style
6
+ * attributes alone. fill() clicks a text field that is not focused first, unless
7
+ * something covers it. Both apply only under a Browser or BrowserContext marked
8
+ * by a Camoufox launch (attachDriverDefaults).
9
+ */
10
+ export declare const FILL_NEEDS_CLICK = "(e) => {\n const field = e.matches('a, input, textarea, button, select') || e.isContentEditable\n ? e : (e.closest('label')?.control || e);\n const type = field.localName === 'input' ? field.type : null;\n const typed = field.localName === 'textarea' || field.isContentEditable ||\n ['text', 'search', 'email', 'url', 'tel', 'password', 'number'].includes(type);\n if (!typed || field.disabled || field.readOnly)\n return false;\n const active = field.getRootNode().activeElement;\n return active !== field && !(field.isContentEditable && field.contains(active));\n}";
11
+ /**
12
+ * The JS client sends a string as an expression and does not call what it
13
+ * evaluates to (isFunction: false), where Python's lets the page decide. A
14
+ * function whose source is the string is sent and called.
15
+ */
16
+ export declare function pageFunction(source: string): () => unknown;
17
+ /** Page, Locator and Frame fill (and Locator.clear) all go through Frame.fill. */
18
+ export declare function patchFrameFill(prototype: any): void;
19
+ /**
20
+ * Give every page under `target` (a Browser or BrowserContext from a Camoufox
21
+ * launch) these defaults. The caret is filled in where the client sends the
22
+ * request, so page, element and locator screenshots all get it; an explicit
23
+ * caret is kept.
24
+ */
25
+ export declare function attachDriverDefaults<T>(target: T): T;
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Driver calls that reach the page as a person's actions would. The TypeScript
3
+ * twin of python/camoucore/src/camoucore/camoufox/driver_defaults.py, which holds the reasoning.
4
+ *
5
+ * Screenshots default to caret: "initial", which leaves the page's style
6
+ * attributes alone. fill() clicks a text field that is not focused first, unless
7
+ * something covers it. Both apply only under a Browser or BrowserContext marked
8
+ * by a Camoufox launch (attachDriverDefaults).
9
+ */
10
+ import { HIT_TEST_JS } from "@jwriter20/myuri";
11
+ const LAUNCHED = Symbol.for("camoufox.driver-defaults");
12
+ const FILL_PATCHED = Symbol.for("camoufox.driver-defaults.fill");
13
+ // Byte-identical to the Python constant (tests/package-parity.test.ts).
14
+ // Whether fill() on this target should click first: a text field a person types
15
+ // into, without focus. fill() on a label, or inside one, fills its control.
16
+ export const FILL_NEEDS_CLICK = `(e) => {
17
+ const field = e.matches('a, input, textarea, button, select') || e.isContentEditable
18
+ ? e : (e.closest('label')?.control || e);
19
+ const type = field.localName === 'input' ? field.type : null;
20
+ const typed = field.localName === 'textarea' || field.isContentEditable ||
21
+ ['text', 'search', 'email', 'url', 'tel', 'password', 'number'].includes(type);
22
+ if (!typed || field.disabled || field.readOnly)
23
+ return false;
24
+ const active = field.getRootNode().activeElement;
25
+ return active !== field && !(field.isContentEditable && field.contains(active));
26
+ }`;
27
+ /**
28
+ * The JS client sends a string as an expression and does not call what it
29
+ * evaluates to (isFunction: false), where Python's lets the page decide. A
30
+ * function whose source is the string is sent and called.
31
+ */
32
+ export function pageFunction(source) {
33
+ return Object.assign(() => undefined, { toString: () => source });
34
+ }
35
+ async function clickToFocus(target, evaluate, { timeout, force }) {
36
+ if (await evaluate(pageFunction(FILL_NEEDS_CLICK))) {
37
+ await target.scrollIntoViewIfNeeded({ timeout });
38
+ if ((await evaluate(HIT_TEST_JS)) === null)
39
+ await target.click({ timeout, force });
40
+ }
41
+ }
42
+ /** Page, Locator and Frame fill (and Locator.clear) all go through Frame.fill. */
43
+ export function patchFrameFill(prototype) {
44
+ if (Object.hasOwn(prototype, FILL_PATCHED))
45
+ return;
46
+ prototype[FILL_PATCHED] = true;
47
+ const original = prototype.fill;
48
+ prototype.fill = async function (selector, value, options = {}) {
49
+ if (launchedByCamoufox(this)) {
50
+ const locator = this.locator(selector);
51
+ const target = options.strict ? locator : locator.first();
52
+ await clickToFocus(target, (script) => target.evaluate(script, null, { timeout: options.timeout }), options);
53
+ }
54
+ return original.call(this, selector, value, options);
55
+ };
56
+ }
57
+ function patchHandleFill(prototype) {
58
+ if (Object.hasOwn(prototype, FILL_PATCHED))
59
+ return;
60
+ prototype[FILL_PATCHED] = true;
61
+ const original = prototype.fill;
62
+ prototype.fill = async function (value, options = {}) {
63
+ if (launchedByCamoufox(this))
64
+ await clickToFocus(this, (script) => this.evaluate(script, null), options);
65
+ return original.call(this, value, options);
66
+ };
67
+ }
68
+ /** playwright-core does not export its client classes, so they are taken from
69
+ * the objects its connection creates. */
70
+ function patchClientClass(object) {
71
+ if (object._type === "Frame")
72
+ patchFrameFill(Object.getPrototypeOf(object));
73
+ if (object._type === "ElementHandle")
74
+ patchHandleFill(Object.getPrototypeOf(object));
75
+ }
76
+ /**
77
+ * Give every page under `target` (a Browser or BrowserContext from a Camoufox
78
+ * launch) these defaults. The caret is filled in where the client sends the
79
+ * request, so page, element and locator screenshots all get it; an explicit
80
+ * caret is kept.
81
+ */
82
+ export function attachDriverDefaults(target) {
83
+ const owner = target;
84
+ owner[LAUNCHED] = true;
85
+ const connection = owner._connection;
86
+ if (!connection || connection[LAUNCHED])
87
+ return target;
88
+ connection[LAUNCHED] = true;
89
+ const send = connection.sendMessageToServer;
90
+ connection.sendMessageToServer = function (object, method, params, ...rest) {
91
+ if (method === "screenshot" &&
92
+ params?.caret === undefined &&
93
+ launchedByCamoufox(object))
94
+ params = { ...params, caret: "initial" };
95
+ return send.call(this, object, method, params, ...rest);
96
+ };
97
+ // A persistent context arrives with its pages, and so its frames, created.
98
+ for (const object of connection._objects.values())
99
+ patchClientClass(object);
100
+ const create = connection._createRemoteObject;
101
+ connection._createRemoteObject = function (...args) {
102
+ const object = create.apply(this, args);
103
+ patchClientClass(object);
104
+ return object;
105
+ };
106
+ return target;
107
+ }
108
+ /** ElementHandle -> Frame -> Page -> BrowserContext -> Browser. */
109
+ function launchedByCamoufox(object) {
110
+ for (let owner = object; owner; owner = owner._parent)
111
+ if (owner[LAUNCHED])
112
+ return true;
113
+ return false;
114
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * TypeScript twin of python/camoucore/src/camoucore/camoufox/exceptions.py. The errors the core
3
+ * raises are camoucore's, re-exported so `catch` sites keep one import.
4
+ *
5
+ * The Python hierarchy leans on builtin bases (FileNotFoundError, ValueError,
6
+ * ImportError) that have no JS analogue; those become plain Error subclasses
7
+ * here. Every relationship that callers actually catch on -- LocaleError,
8
+ * VirtualDisplayError -- is preserved.
9
+ */
10
+ import { VirtualDisplayError } from "../exceptions.js";
11
+ export { CannotExecuteXvfb, CannotFindXvfb, CorruptedDownload, InvalidIP, InvalidLocale, InvalidProxy, LocaleError, NotInstalledGeoIPExtra, UnknownIPLocation, UnknownLanguage, UnknownTerritory, UnsupportedOS, VirtualDisplayError, VirtualDisplayNotSupported, } from "../exceptions.js";
12
+ /** The Python twin relies on the builtin FileNotFoundError; JS has no such
13
+ * class, so version-lookup misses raise this instead. */
14
+ export declare class FileNotFoundError extends Error {
15
+ constructor(message?: string);
16
+ }
17
+ export declare class UnsupportedVersion extends Error {
18
+ constructor(message?: string);
19
+ }
20
+ export declare class MissingRelease extends Error {
21
+ constructor(message?: string);
22
+ }
23
+ export declare class UnsupportedArchitecture extends Error {
24
+ constructor(message?: string);
25
+ }
26
+ export declare class InvalidPropertyType extends Error {
27
+ constructor(message?: string);
28
+ }
29
+ export declare class InvalidAddonPath extends FileNotFoundError {
30
+ constructor(message?: string);
31
+ }
32
+ export declare class NonFirefoxFingerprint extends Error {
33
+ constructor(message?: string);
34
+ }
35
+ export declare class InvalidOS extends Error {
36
+ constructor(message?: string);
37
+ }
38
+ export declare class GpuDisplayError extends VirtualDisplayError {
39
+ constructor(message?: string);
40
+ }
41
+ export declare class NoGpuFound extends GpuDisplayError {
42
+ constructor(message?: string);
43
+ }
44
+ export declare class AmbiguousGpuSelection extends GpuDisplayError {
45
+ constructor(message?: string);
46
+ }
47
+ export declare class GpuNotFound extends GpuDisplayError {
48
+ constructor(message?: string);
49
+ }
50
+ export declare class CannotFindXorg extends GpuDisplayError {
51
+ constructor(message?: string);
52
+ }
53
+ export declare class CannotExecuteXorg extends GpuDisplayError {
54
+ constructor(message?: string);
55
+ }
56
+ export declare class GpuVtTakeover extends GpuDisplayError {
57
+ constructor(message?: string);
58
+ }
59
+ export declare class GpuSoftwareFallback extends GpuDisplayError {
60
+ constructor(message?: string);
61
+ }
62
+ export declare class CamoufoxNotInstalled extends FileNotFoundError {
63
+ constructor(message?: string);
64
+ }
65
+ /** Raised when Camoufox's required runtime directory cannot be prepared. */
66
+ export declare class ProfileDirectoryError extends Error {
67
+ constructor(message?: string, options?: ErrorOptions);
68
+ }
69
+ /**
70
+ * Thrown in strict mode (CAMOUFOX_STRICT_CONFIG=1) when the launcher writes a
71
+ * config key the browser's properties.json does not declare. Outside strict
72
+ * mode such a key is reported and skipped, so a newer library still launches
73
+ * an older build. (A KeyError in Python; pycompat imports this module, so it
74
+ * cannot extend pycompat's KeyError here.)
75
+ */
76
+ export declare class UnknownProperty extends Error {
77
+ constructor(message?: string);
78
+ }