@readium/navigator 2.2.8 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/index.js +3079 -3225
  2. package/dist/index.umd.cjs +80 -87
  3. package/package.json +5 -4
  4. package/src/Navigator.ts +76 -0
  5. package/src/epub/EpubNavigator.ts +93 -10
  6. package/src/epub/css/Properties.ts +8 -8
  7. package/src/epub/css/ReadiumCSS.ts +7 -5
  8. package/src/epub/frame/FrameManager.ts +38 -2
  9. package/src/epub/frame/FramePoolManager.ts +9 -2
  10. package/src/epub/fxl/FXLFrameManager.ts +31 -2
  11. package/src/epub/fxl/FXLFramePoolManager.ts +9 -3
  12. package/src/epub/preferences/EpubDefaults.ts +6 -6
  13. package/src/epub/preferences/EpubPreferences.ts +6 -6
  14. package/src/epub/preferences/EpubPreferencesEditor.ts +1 -3
  15. package/src/epub/preferences/EpubSettings.ts +5 -7
  16. package/src/helpers/lineLength.ts +4 -6
  17. package/src/injection/epubInjectables.ts +11 -3
  18. package/src/injection/webpubInjectables.ts +12 -2
  19. package/src/peripherals/KeyboardPeripherals.ts +53 -0
  20. package/src/protection/AutomationDetector.ts +66 -0
  21. package/src/protection/ContextMenuProtector.ts +46 -0
  22. package/src/protection/DevToolsDetector.ts +290 -0
  23. package/src/protection/IframeEmbeddingDetector.ts +73 -0
  24. package/src/protection/NavigatorProtector.ts +95 -0
  25. package/src/protection/PrintProtector.ts +58 -0
  26. package/src/protection/utils/WorkerConsole.ts +84 -0
  27. package/src/protection/utils/console.ts +16 -0
  28. package/src/protection/utils/match.ts +18 -0
  29. package/src/protection/utils/platform.ts +22 -0
  30. package/src/webpub/WebPubFrameManager.ts +38 -5
  31. package/src/webpub/WebPubFramePoolManager.ts +9 -2
  32. package/src/webpub/WebPubNavigator.ts +87 -7
  33. package/types/src/Navigator.d.ts +14 -0
  34. package/types/src/epub/EpubNavigator.d.ts +14 -2
  35. package/types/src/epub/css/Properties.d.ts +4 -0
  36. package/types/src/epub/frame/FrameManager.d.ts +5 -1
  37. package/types/src/epub/frame/FramePoolManager.d.ts +4 -1
  38. package/types/src/epub/fxl/FXLFrameManager.d.ts +5 -1
  39. package/types/src/epub/fxl/FXLFramePoolManager.d.ts +4 -2
  40. package/types/src/epub/preferences/EpubDefaults.d.ts +4 -0
  41. package/types/src/epub/preferences/EpubPreferences.d.ts +4 -0
  42. package/types/src/epub/preferences/EpubPreferencesEditor.d.ts +2 -0
  43. package/types/src/epub/preferences/EpubSettings.d.ts +4 -0
  44. package/types/src/helpers/lineLength.d.ts +2 -3
  45. package/types/src/injection/epubInjectables.d.ts +2 -2
  46. package/types/src/injection/webpubInjectables.d.ts +2 -1
  47. package/types/src/peripherals/KeyboardPeripherals.d.ts +13 -0
  48. package/types/src/protection/AutomationDetector.d.ts +14 -0
  49. package/types/src/protection/ContextMenuProtector.d.ts +11 -0
  50. package/types/src/protection/DevToolsDetector.d.ts +75 -0
  51. package/types/src/protection/IframeEmbeddingDetector.d.ts +14 -0
  52. package/types/src/protection/NavigatorProtector.d.ts +12 -0
  53. package/types/src/protection/PrintProtector.d.ts +13 -0
  54. package/types/src/protection/utils/WorkerConsole.d.ts +15 -0
  55. package/types/src/protection/utils/console.d.ts +6 -0
  56. package/types/src/protection/utils/match.d.ts +8 -0
  57. package/types/src/protection/utils/platform.d.ts +4 -0
  58. package/types/src/webpub/WebPubFrameManager.d.ts +5 -1
  59. package/types/src/webpub/WebPubFramePoolManager.d.ts +4 -1
  60. package/types/src/webpub/WebPubNavigator.d.ts +13 -1
  61. package/dist/ar-DyHX_uy2-DyHX_uy2.js +0 -7
  62. package/dist/assets/AccessibleDfA-Bold.woff2 +0 -0
  63. package/dist/assets/AccessibleDfA-Italic.woff2 +0 -0
  64. package/dist/assets/AccessibleDfA-Regular.woff +0 -0
  65. package/dist/assets/AccessibleDfA-Regular.woff2 +0 -0
  66. package/dist/assets/iAWriterDuospace-Regular.ttf +0 -0
  67. package/dist/da-Dct0PS3E-Dct0PS3E.js +0 -7
  68. package/dist/fr-C5HEel98-C5HEel98.js +0 -7
  69. package/dist/it-DFOBoXGy-DFOBoXGy.js +0 -7
  70. package/dist/pt_PT-Di3sVjze-Di3sVjze.js +0 -7
  71. package/dist/sv-BfzAFsVN-BfzAFsVN.js +0 -7
  72. package/types/src/epub/preferences/guards.d.ts +0 -9
  73. package/types/src/web/WebPubBlobBuilder.d.ts +0 -10
  74. package/types/src/web/WebPubFrameManager.d.ts +0 -20
  75. package/types/src/web/WebPubNavigator.d.ts +0 -48
  76. package/types/src/web/index.d.ts +0 -3
  77. package/types/src/webpub/css/WebPubStylesheet.d.ts +0 -1
  78. /package/dist/{ar-DyHX_uy2-DyHX_uy2-DyHX_uy2.js → ar-DyHX_uy2.js} +0 -0
  79. /package/dist/{da-Dct0PS3E-Dct0PS3E-Dct0PS3E.js → da-Dct0PS3E.js} +0 -0
  80. /package/dist/{fr-C5HEel98-C5HEel98-C5HEel98.js → fr-C5HEel98.js} +0 -0
  81. /package/dist/{it-DFOBoXGy-DFOBoXGy-DFOBoXGy.js → it-DFOBoXGy.js} +0 -0
  82. /package/dist/{pt_PT-Di3sVjze-Di3sVjze-Di3sVjze.js → pt_PT-Di3sVjze.js} +0 -0
  83. /package/dist/{sv-BfzAFsVN-BfzAFsVN-BfzAFsVN.js → sv-BfzAFsVN.js} +0 -0
@@ -1 +0,0 @@
1
- export declare const webPubStylesheet = "\n/* TextAlign */\n\n:root[style*=\"--USER__textAlign\"] {\n text-align: var(--USER__textAlign);\n}\n\n:root[style*=\"--USER__textAlign\"] body,\n:root[style*=\"--USER__textAlign\"] p:not([class*=\"title\"]):not(blockquote p):not(figcaption p):not(header p):not(hgroup p):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)),\n:root[style*=\"--USER__textAlign\"] li,\n:root[style*=\"--USER__textAlign\"] dd {\n text-align: var(--USER__textAlign) !important;\n -moz-text-align-last: auto !important;\n -epub-text-align-last: auto !important;\n text-align-last: auto !important;\n}\n\n/* Hyphens */\n\n:root[style*=\"--USER__bodyHyphens\"] {\n -webkit-hyphens: var(--USER__bodyHyphens) !important;\n -moz-hyphens: var(--USER__bodyHyphens) !important;\n -ms-hyphens: var(--USER__bodyHyphens) !important;\n -epub-hyphens: var(--USER__bodyHyphens) !important;\n hyphens: var(--USER__bodyHyphens) !important;\n}\n\n:root[style*=\"--USER__bodyHyphens\"] body,\n:root[style*=\"--USER__bodyHyphens\"] p,\n:root[style*=\"--USER__bodyHyphens\"] li,\n:root[style*=\"--USER__bodyHyphens\"] div,\n:root[style*=\"--USER__bodyHyphens\"] dd {\n -webkit-hyphens: inherit;\n -moz-hyphens: inherit;\n -ms-hyphens: inherit;\n -epub-hyphens: inherit;\n hyphens: inherit;\n}\n\n/* FontFamily */\n\n:root[style*=\"--USER__fontFamily\"] {\n font-family: var(--USER__fontFamily) !important;\n}\n\n:root[style*=\"--USER__fontFamily\"] * {\n font-family: revert !important;\n}\n\n/* TextNormalize */\n\n:root[style*=\"readium-a11y-on\"] {\n font-weight: normal !important;\n font-style: normal !important;\n}\n\n:root[style*=\"readium-a11y-on\"] body *:not(code):not(var):not(kbd):not(samp) {\n font-family: inherit !important;\n font-weight: inherit !important;\n font-style: inherit !important;\n}\n\n:root[style*=\"readium-a11y-on\"] body * {\n text-decoration: none !important;\n font-variant-caps: normal !important;\n font-variant-position: normal !important;\n font-variant-numeric: normal !important;\n}\n\n:root[style*=\"readium-a11y-on\"] sup,\n:root[style*=\"readium-a11y-on\"] sub {\n font-size: 1rem !important;\n vertical-align: baseline !important;\n}\n\n/* Zoom */\n\n:root {\n --USER__zoom: 1;\n}\n\n:root[style*=\"--USER__zoom\"] body {\n zoom: var(--USER__zoom) !important;\n}\n\n@supports selector(figure:has(> img)) {\n :root[style*=\"--USER__zoom\"] figure:has(> img),\n :root[style*=\"--USER__zoom\"] figure:has(> video),\n :root[style*=\"--USER__zoom\"] figure:has(> svg),\n :root[style*=\"--USER__zoom\"] figure:has(> canvas),\n :root[style*=\"--USER__zoom\"] figure:has(> iframe),\n :root[style*=\"--USER__zoom\"] figure:has(> audio),\n :root[style*=\"--USER__zoom\"] div:has(> img),\n :root[style*=\"--USER__zoom\"] div:has(> video),\n :root[style*=\"--USER__zoom\"] div:has(> svg),\n :root[style*=\"--USER__zoom\"] div:has(> canvas),\n :root[style*=\"--USER__zoom\"] div:has(> iframe),\n :root[style*=\"--USER__zoom\"] div:has(> audio),\n :root[style*=\"--USER__zoom\"] table {\n zoom: calc(100% / var(--USER__zoom)) !important;\n }\n\n :root[style*=\"--USER__zoom\"] figcaption,\n :root[style*=\"--USER__zoom\"] caption,\n :root[style*=\"--USER__zoom\"] td,\n :root[style*=\"--USER__zoom\"] th {\n zoom: var(--USER__zoom) !important;\n }\n}\n\n/* LineHeight */\n\n:root[style*=\"--USER__lineHeight\"] {\n line-height: var(--USER__lineHeight) !important;\n}\n\n:root[style*=\"--USER__lineHeight\"] body,\n:root[style*=\"--USER__lineHeight\"] p,\n:root[style*=\"--USER__lineHeight\"] li,\n:root[style*=\"--USER__lineHeight\"] div {\n line-height: inherit;\n}\n\n/* ParagraphSpacing */\n\n:root[style*=\"--USER__paraSpacing\"] p {\n margin-block: var(--USER__paraSpacing) !important;\n}\n\n/* ParagraphIndent */\n\n:root[style*=\"--USER__paraIndent\"] p {\n text-indent: var(--USER__paraIndent) !important;\n}\n\n:root[style*=\"--USER__paraIndent\"] p *,\n:root[style*=\"--USER__paraIndent\"] p:first-letter {\n text-indent: 0 !important;\n}\n\n/* WordSpacing */\n\n:root[style*=\"--USER__wordSpacing\"] h1,\n:root[style*=\"--USER__wordSpacing\"] h2,\n:root[style*=\"--USER__wordSpacing\"] h3,\n:root[style*=\"--USER__wordSpacing\"] h4,\n:root[style*=\"--USER__wordSpacing\"] h5,\n:root[style*=\"--USER__wordSpacing\"] h6,\n:root[style*=\"--USER__wordSpacing\"] p,\n:root[style*=\"--USER__wordSpacing\"] li,\n:root[style*=\"--USER__wordSpacing\"] div,\n:root[style*=\"--USER__wordSpacing\"] dt,\n:root[style*=\"--USER__wordSpacing\"] dd {\n word-spacing: var(--USER__wordSpacing);\n}\n\n/* LetterSpacing */\n\n:root[style*=\"--USER__letterSpacing\"] h1,\n:root[style*=\"--USER__letterSpacing\"] h2,\n:root[style*=\"--USER__letterSpacing\"] h3,\n:root[style*=\"--USER__letterSpacing\"] h4,\n:root[style*=\"--USER__letterSpacing\"] h5,\n:root[style*=\"--USER__letterSpacing\"] h6,\n:root[style*=\"--USER__letterSpacing\"] p,\n:root[style*=\"--USER__letterSpacing\"] li,\n:root[style*=\"--USER__letterSpacing\"] div,\n:root[style*=\"--USER__letterSpacing\"] dt,\n:root[style*=\"--USER__letterSpacing\"] dd {\n letter-spacing: var(--USER__letterSpacing);\n font-variant: none;\n}\n\n/* FontWeight */\n\n:root[style*=\"--USER__fontWeight\"] body {\n font-weight: var(--USER__fontWeight) !important;\n}\n\n/* Attempt to handle known bolds */\n:root[style*=\"--USER__fontWeight\"] b,\n:root[style*=\"--USER__fontWeight\"] strong {\n font-weight: bolder;\n}\n\n/* Ruby */\n\n:root[style*=\"readium-noRuby-on\"] body rt,\n:root[style*=\"readium-noRuby-on\"] body rp {\n display: none;\n}\n\n/* Ligatures */\n\n:root[style*=\"--USER__ligatures\"] {\n font-variant-ligatures: var(--USER__ligatures) !important;\n}\n\n:root[style*=\"--USER__ligatures\"] * {\n font-variant-ligatures: inherit !important;\n}\n";