@mattebox/player 0.8.0 → 0.9.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 (102) hide show
  1. package/dist/cdn/mattebox-player.min.js +3 -3
  2. package/dist/controls/cues.d.ts.map +1 -1
  3. package/dist/controls/cues.js +11 -5
  4. package/dist/controls/cues.js.map +1 -1
  5. package/dist/controls/icons.d.ts +5 -30
  6. package/dist/controls/icons.d.ts.map +1 -1
  7. package/dist/controls/icons.js +38 -29
  8. package/dist/controls/icons.js.map +1 -1
  9. package/dist/controls/menu.d.ts +20 -0
  10. package/dist/controls/menu.d.ts.map +1 -1
  11. package/dist/controls/menu.js +83 -14
  12. package/dist/controls/menu.js.map +1 -1
  13. package/dist/element.d.ts +36 -2
  14. package/dist/element.d.ts.map +1 -1
  15. package/dist/element.js +140 -24
  16. package/dist/element.js.map +1 -1
  17. package/dist/elements/audio-menu.d.ts.map +1 -1
  18. package/dist/elements/audio-menu.js +3 -1
  19. package/dist/elements/audio-menu.js.map +1 -1
  20. package/dist/elements/component.d.ts.map +1 -1
  21. package/dist/elements/component.js +10 -0
  22. package/dist/elements/component.js.map +1 -1
  23. package/dist/elements/control-bar.d.ts +2 -0
  24. package/dist/elements/control-bar.d.ts.map +1 -1
  25. package/dist/elements/control-bar.js +23 -7
  26. package/dist/elements/control-bar.js.map +1 -1
  27. package/dist/elements/current-time.d.ts.map +1 -1
  28. package/dist/elements/current-time.js +1 -1
  29. package/dist/elements/current-time.js.map +1 -1
  30. package/dist/elements/drm-badge.js +1 -1
  31. package/dist/elements/duration.d.ts.map +1 -1
  32. package/dist/elements/duration.js +6 -2
  33. package/dist/elements/duration.js.map +1 -1
  34. package/dist/elements/error-screen.js +1 -1
  35. package/dist/elements/live-button.js +1 -1
  36. package/dist/elements/marker-button.d.ts +3 -3
  37. package/dist/elements/marker-button.d.ts.map +1 -1
  38. package/dist/elements/marker-button.js +18 -22
  39. package/dist/elements/marker-button.js.map +1 -1
  40. package/dist/elements/menu-element.d.ts.map +1 -1
  41. package/dist/elements/menu-element.js +2 -1
  42. package/dist/elements/menu-element.js.map +1 -1
  43. package/dist/elements/quality-menu.js +1 -1
  44. package/dist/elements/quality-menu.js.map +1 -1
  45. package/dist/elements/scan-button.js +1 -1
  46. package/dist/elements/seek-bar.d.ts.map +1 -1
  47. package/dist/elements/seek-bar.js +5 -4
  48. package/dist/elements/seek-bar.js.map +1 -1
  49. package/dist/elements/shared.js +3 -3
  50. package/dist/elements/skip-button.js +2 -2
  51. package/dist/elements/skip-button.js.map +1 -1
  52. package/dist/elements/spinner.js +1 -1
  53. package/dist/elements/start-button.d.ts +8 -0
  54. package/dist/elements/start-button.d.ts.map +1 -1
  55. package/dist/elements/start-button.js +18 -2
  56. package/dist/elements/start-button.js.map +1 -1
  57. package/dist/elements/subtitles-menu.d.ts +5 -1
  58. package/dist/elements/subtitles-menu.d.ts.map +1 -1
  59. package/dist/elements/subtitles-menu.js +29 -11
  60. package/dist/elements/subtitles-menu.js.map +1 -1
  61. package/dist/elements/title.d.ts.map +1 -1
  62. package/dist/elements/title.js +3 -1
  63. package/dist/elements/title.js.map +1 -1
  64. package/dist/elements/volume-slider.js +1 -1
  65. package/dist/elements/volume.js +1 -1
  66. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/asyncToGenerator.js +1 -1
  67. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.js +1 -1
  68. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/objectSpread2.js +1 -1
  69. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.js +1 -1
  70. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.js +1 -1
  71. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.js +1 -1
  72. package/dist/es2015/controls/chapters.js +1 -1
  73. package/dist/es2015/controls/cues.js +11 -5
  74. package/dist/es2015/controls/icons.js +38 -29
  75. package/dist/es2015/controls/menu.js +89 -17
  76. package/dist/es2015/element.js +144 -30
  77. package/dist/es2015/elements/audio-menu.js +4 -1
  78. package/dist/es2015/elements/component.js +10 -0
  79. package/dist/es2015/elements/control-bar.js +23 -7
  80. package/dist/es2015/elements/current-time.js +1 -1
  81. package/dist/es2015/elements/drm-badge.js +1 -1
  82. package/dist/es2015/elements/duration.js +6 -2
  83. package/dist/es2015/elements/error-screen.js +1 -1
  84. package/dist/es2015/elements/live-button.js +1 -1
  85. package/dist/es2015/elements/marker-button.js +19 -23
  86. package/dist/es2015/elements/menu-element.js +2 -1
  87. package/dist/es2015/elements/quality-menu.js +1 -1
  88. package/dist/es2015/elements/scan-button.js +1 -1
  89. package/dist/es2015/elements/seek-bar.js +5 -4
  90. package/dist/es2015/elements/shared.js +3 -3
  91. package/dist/es2015/elements/skip-button.js +2 -2
  92. package/dist/es2015/elements/spinner.js +1 -1
  93. package/dist/es2015/elements/start-button.js +18 -2
  94. package/dist/es2015/elements/subtitles-menu.js +35 -17
  95. package/dist/es2015/elements/title.js +3 -1
  96. package/dist/es2015/elements/volume-slider.js +1 -1
  97. package/dist/es2015/elements/volume.js +1 -1
  98. package/dist/es2015/presets.js +1 -1
  99. package/dist/es2015/style.js +1 -1
  100. package/dist/style.js +1 -1
  101. package/package.json +4 -5
  102. package/NOTICE +0 -24
@@ -1 +1 @@
1
- {"version":3,"file":"cues.js","names":[],"sources":["../../src/controls/cues.ts"],"sourcesContent":["/**\n * Subtitles and the bar. Two things.\n *\n * The lift: the browser draws native cues at the bottom of the video, under\n * the bar. While the bar shows, every active cue the author left\n * unpositioned is moved above it, and put back when the bar hides. The\n * position is a negative line count, the one form every browser wraps at\n * the video's width; a percentage does not wrap in Chromium. Chromium\n * anchors the box's top on the count and Gecko its bottom, and their\n * overlap avoidance pushes in opposite directions, so nothing is left to\n * them: subtitles often show two cues at once, and the cues stack by their\n * own measured heights, wrapping included, clear under both readings. A\n * cue with a position of its own is the author's and is not touched.\n *\n * The look: `::cue` can only be styled from the document that holds the\n * video, which is the page and not the shadow root, and it takes no custom\n * properties. So a small sheet goes into the document, once, with one rule\n * per look the host's `subtitle-size` and `subtitle-background` attributes\n * can take. Sizes are percentages of the browser's own cue size, which\n * already follows the video's height, in the page and in fullscreen alike.\n * A page that wants more writes its own `mattebox-player > video::cue`.\n */\nimport CUE_RULES from './cues.css?inline';\n/** How the sizes scale the browser's own cue size; the lift counts lines by it. */\nexport const SCALES: Readonly<Record<string, number>> = {\n small: 0.75,\n medium: 1,\n large: 1.5,\n xlarge: 2,\n};\n\n/**\n * The sheet in the document. `mattebox-player` is the element's tag. The\n * background goes on `::cue` and on the backdrop pseudo-element Chromium\n * and WebKit have, both: which of the two paints it differs by browser and\n * version, and a selector a browser does not know only voids its own rule.\n */\n\nconst MARK = 'data-mattebox-cue';\n\n/** The browser's cue size against the video's height, per WebVTT, and its line against the size. */\nconst CUE_SIZE = 0.05;\nconst LINE_HEIGHT = 1.2;\n/** What a cue box spans of the video's width by default, so wrapping is measured against it. */\nconst CUE_WIDTH = 0.96;\n/** Pixels of air between the bar and the cue above it, before rounding up to a line. */\nconst AIR = 6;\n\n/** Puts the cue rules in the document, once. */\nexport function cueStyle(): void {\n if (document.head.querySelector(`style[${MARK}]`) !== null) return;\n const style = document.createElement('style');\n style.setAttribute(MARK, '');\n style.textContent = CUE_RULES;\n document.head.append(style);\n}\n\n/** What a lifted cue looked like before, to put back. */\ninterface Placed {\n readonly line: number | 'auto';\n readonly snapToLines: boolean;\n readonly lineAlign: LineAlignSetting;\n}\n\nexport interface CueLift {\n /** Whether the bar is showing, so the cues move above it or back. */\n lifted(on: boolean): void;\n dispose(): void;\n}\n\n/** What the bar covers of the picture: from its first row's top, not its gradient run-in, to its bottom. */\nexport type Covered = () => { readonly top: number; readonly bottom: number };\n\nexport function cueLift(video: HTMLVideoElement, host: HTMLElement, covered: Covered): CueLift {\n /** The cues moved, with what they were, so they and only they are put back. */\n const lifted = new Map<VTTCue, Placed>();\n let on = false;\n let canvas: CanvasRenderingContext2D | null | undefined;\n\n function showing(): TextTrack[] {\n const out: TextTrack[] = [];\n for (const track of video.textTracks) if (track.mode === 'showing') out.push(track);\n return out;\n }\n\n /** The browser's cue font size, in pixels, from the video's height and the host's scale. */\n function fontSize(height: number): number {\n const scale = SCALES[host.getAttribute('subtitle-size') ?? ''] ?? 1;\n return height * CUE_SIZE * scale;\n }\n\n /** Measures text the way the browser draws cues, to count the lines a cue wraps into. */\n function measure(): CanvasRenderingContext2D | null {\n if (canvas === undefined) canvas = document.createElement('canvas').getContext('2d');\n return canvas;\n }\n\n /**\n * A cue's text without its tags, for measuring: `<b>`, `<c.name>`, the\n * timestamps and their closers. Brackets are counted, so a tag inside\n * another's brackets goes with it.\n */\n function plain(text: string): string {\n let out = '';\n let depth = 0;\n for (const char of text) {\n if (char === '<') depth += 1;\n else if (char === '>') depth = Math.max(0, depth - 1);\n else if (depth === 0) out += char;\n }\n return out;\n }\n\n /** The lines a cue takes: its own, each wrapped at the cue box's width. */\n function lines(cue: VTTCue, font: number, width: number): number {\n const context = measure();\n let total = 0;\n for (const line of plain(cue.text).split('\\n')) {\n if (context === null) {\n total += 1;\n continue;\n }\n context.font = `${font}px sans-serif`;\n total += Math.max(1, Math.ceil(context.measureText(line).width / (width * CUE_WIDTH)));\n }\n return total;\n }\n\n function apply(): void {\n const box = video.getBoundingClientRect();\n const height = box.height;\n const span = covered();\n const pixels = span.bottom - span.top;\n const lift = on && height > 0 && pixels > 0 && pixels < height;\n const font = fontSize(height);\n const unit = font * LINE_HEIGHT;\n // The lines the bar covers, with a little air, rounded up to whole lines.\n const base = Math.ceil((pixels + AIR) / unit);\n for (const track of showing()) {\n // Earliest first, the order the browser stacks them in, so the first\n // sits lowest and the rest climb.\n const active = [...(track.activeCues ?? [])]\n .filter((cue): cue is VTTCue => cue instanceof VTTCue)\n .sort((a, b) => a.startTime - b.startTime);\n let previous: { line: number; height: number } | null = null;\n let changed = false;\n for (const cue of active) {\n const was = lifted.get(cue);\n if (!lift) {\n if (was === undefined) continue;\n cue.line = was.line;\n cue.snapToLines = was.snapToLines;\n cue.lineAlign = was.lineAlign;\n lifted.delete(cue);\n changed = true;\n continue;\n }\n // The author's own placement is the author's.\n if (was === undefined && cue.line !== 'auto') continue;\n if (was === undefined) {\n lifted.set(cue, {\n line: cue.line,\n snapToLines: cue.snapToLines,\n lineAlign: cue.lineAlign,\n });\n }\n // A negative line count, which every browser wraps at the video's\n // width, unlike a percentage. Chromium anchors the box's top on it\n // and Gecko its bottom, so the count clears the bar and the cue\n // below under both readings, with a little air to spare in one.\n const own = lines(cue, font, box.width);\n const line: number =\n previous === null ? base + own : previous.line + Math.max(own, previous.height);\n if (cue.line !== -line || !cue.snapToLines) changed = true;\n cue.snapToLines = true;\n cue.line = -line;\n previous = { line, height: own };\n }\n // Chromium lays a changed line out again only when the track's display\n // is rebuilt, which neither time nor a seek does for a cue already\n // showing; the mode flipped off and on in one task rebuilds it with no\n // paint in between. Only on a change, so the change event this fires\n // finds nothing to do and the loop ends there.\n if (changed) {\n track.mode = 'hidden';\n track.mode = 'showing';\n }\n }\n }\n\n function watch(): void {\n for (const track of video.textTracks) {\n track.removeEventListener('cuechange', apply);\n track.addEventListener('cuechange', apply);\n }\n apply();\n }\n\n video.textTracks.addEventListener('change', watch);\n video.textTracks.addEventListener('addtrack', watch);\n watch();\n\n return {\n lifted(next: boolean): void {\n on = next;\n apply();\n },\n dispose(): void {\n on = false;\n apply();\n video.textTracks.removeEventListener('change', watch);\n video.textTracks.removeEventListener('addtrack', watch);\n for (const track of video.textTracks) track.removeEventListener('cuechange', apply);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;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AA,cAAA;IACA,IAAA,OAAA,CAAA;IACA,WAAA;KAAA;KAAA,QAAA;IAAA;GACA;GAMA,IAAA,SAAA;IACA,MAAA,OAAA;IACA,MAAA,OAAA;GACA;EACA;CACA;CAEA,SAAA,QAAA;EACA,KAAA,MAAA,SAAA,MAAA,YAAA;GACA,MAAA,oBAAA,aAAA,KAAA;GACA,MAAA,iBAAA,aAAA,KAAA;EACA;EACA,MAAA;CACA;CAEA,MAAA,WAAA,iBAAA,UAAA,KAAA;CACA,MAAA,WAAA,iBAAA,YAAA,KAAA;CACA,MAAA;CAEA,OAAA;EACA,OAAA,MAAA;GACA,KAAA;GACA,MAAA;EACA;EACA,UAAA;GACA,KAAA;GACA,MAAA;GACA,MAAA,WAAA,oBAAA,UAAA,KAAA;GACA,MAAA,WAAA,oBAAA,YAAA,KAAA;GACA,KAAA,MAAA,SAAA,MAAA,YAAA,MAAA,oBAAA,aAAA,KAAA;EACA;CACA;AACA"}
1
+ {"version":3,"file":"cues.js","names":[],"sources":["../../src/controls/cues.ts"],"sourcesContent":["/**\n * Subtitles and the bar. Two things.\n *\n * The lift: the browser draws native cues on the bottom edge of the video,\n * and under the bar. Every active cue the author left unpositioned is\n * moved up: above the bar while it shows, and one line off the edge while\n * it is hidden, so the text never sits on the picture's border. The\n * position is a negative line count, the one form every browser wraps at\n * the video's width; a percentage does not wrap in Chromium. Chromium\n * anchors the box's top on the count and Gecko its bottom, and their\n * overlap avoidance pushes in opposite directions, so nothing is left to\n * them: subtitles often show two cues at once, and the cues stack by their\n * own measured heights, wrapping included, clear under both readings. A\n * cue with a position of its own is the author's and is not touched.\n *\n * The look: `::cue` can only be styled from the document that holds the\n * video, which is the page and not the shadow root, and it takes no custom\n * properties. So a small sheet goes into the document, once, with one rule\n * per look the host's `subtitle-size` and `subtitle-background` attributes\n * can take. Sizes are percentages of the browser's own cue size, which\n * already follows the video's height, in the page and in fullscreen alike.\n * A page that wants more writes its own `mattebox-player > video::cue`.\n */\nimport CUE_RULES from './cues.css?inline';\n/** How the sizes scale the browser's own cue size; the lift counts lines by it. */\nexport const SCALES: Readonly<Record<string, number>> = {\n small: 0.75,\n medium: 1,\n large: 1.5,\n xlarge: 2,\n};\n\n/**\n * The sheet in the document. `mattebox-player` is the element's tag. The\n * background goes on `::cue` and on the backdrop pseudo-element Chromium\n * and WebKit have, both: which of the two paints it differs by browser and\n * version, and a selector a browser does not know only voids its own rule.\n */\n\nconst MARK = 'data-mattebox-cue';\n\n/** The browser's cue size against the video's height, per WebVTT, and its line against the size. */\nconst CUE_SIZE = 0.05;\nconst LINE_HEIGHT = 1.2;\n/** What a cue box spans of the video's width by default, so wrapping is measured against it. */\nconst CUE_WIDTH = 0.96;\n/** Pixels of air between the bar and the cue above it, before rounding up to a line. */\nconst AIR = 6;\n/** Lines of air under a cue while the bar is hidden. */\nconst REST = 1;\n\n/** Puts the cue rules in the document, once. */\nexport function cueStyle(): void {\n if (document.head.querySelector(`style[${MARK}]`) !== null) return;\n const style = document.createElement('style');\n style.setAttribute(MARK, '');\n style.textContent = CUE_RULES;\n document.head.append(style);\n}\n\n/** What a lifted cue looked like before, to put back. */\ninterface Placed {\n readonly line: number | 'auto';\n readonly snapToLines: boolean;\n readonly lineAlign: LineAlignSetting;\n}\n\nexport interface CueLift {\n /** Whether the bar is showing, so the cues move above it or back. */\n lifted(on: boolean): void;\n dispose(): void;\n}\n\n/** What the bar covers of the picture: from its first row's top, not its gradient run-in, to its bottom. */\nexport type Covered = () => { readonly top: number; readonly bottom: number };\n\nexport function cueLift(video: HTMLVideoElement, host: HTMLElement, covered: Covered): CueLift {\n /** The cues moved, with what they were, so they and only they are put back. */\n const lifted = new Map<VTTCue, Placed>();\n let on = false;\n /** False once disposed: the cues go back to where the author left them. */\n let live = true;\n let canvas: CanvasRenderingContext2D | null | undefined;\n\n function showing(): TextTrack[] {\n const out: TextTrack[] = [];\n for (const track of video.textTracks) if (track.mode === 'showing') out.push(track);\n return out;\n }\n\n /** The browser's cue font size, in pixels, from the video's height and the host's scale. */\n function fontSize(height: number): number {\n const scale = SCALES[host.getAttribute('subtitle-size') ?? ''] ?? 1;\n return height * CUE_SIZE * scale;\n }\n\n /** Measures text the way the browser draws cues, to count the lines a cue wraps into. */\n function measure(): CanvasRenderingContext2D | null {\n if (canvas === undefined) canvas = document.createElement('canvas').getContext('2d');\n return canvas;\n }\n\n /**\n * A cue's text without its tags, for measuring: `<b>`, `<c.name>`, the\n * timestamps and their closers. Brackets are counted, so a tag inside\n * another's brackets goes with it.\n */\n function plain(text: string): string {\n let out = '';\n let depth = 0;\n for (const char of text) {\n if (char === '<') depth += 1;\n else if (char === '>') depth = Math.max(0, depth - 1);\n else if (depth === 0) out += char;\n }\n return out;\n }\n\n /** The lines a cue takes: its own, each wrapped at the cue box's width. */\n function lines(cue: VTTCue, font: number, width: number): number {\n const context = measure();\n let total = 0;\n for (const line of plain(cue.text).split('\\n')) {\n if (context === null) {\n total += 1;\n continue;\n }\n context.font = `${font}px sans-serif`;\n total += Math.max(1, Math.ceil(context.measureText(line).width / (width * CUE_WIDTH)));\n }\n return total;\n }\n\n function apply(): void {\n const box = video.getBoundingClientRect();\n const height = box.height;\n const span = covered();\n const pixels = span.bottom - span.top;\n const lift = live && height > 0;\n const font = fontSize(height);\n const unit = font * LINE_HEIGHT;\n // The lines the bar covers, with a little air, rounded up to whole\n // lines. With the bar hidden, the cue rests a line off the edge.\n const barred = on && pixels > 0 && pixels < height;\n const base = barred ? Math.ceil((pixels + AIR) / unit) : REST;\n for (const track of showing()) {\n // Earliest first, the order the browser stacks them in, so the first\n // sits lowest and the rest climb.\n const active = [...(track.activeCues ?? [])]\n .filter((cue): cue is VTTCue => cue instanceof VTTCue)\n .sort((a, b) => a.startTime - b.startTime);\n let previous: { line: number; height: number } | null = null;\n let changed = false;\n for (const cue of active) {\n const was = lifted.get(cue);\n if (!lift) {\n if (was === undefined) continue;\n cue.line = was.line;\n cue.snapToLines = was.snapToLines;\n cue.lineAlign = was.lineAlign;\n lifted.delete(cue);\n changed = true;\n continue;\n }\n // The author's own placement is the author's.\n if (was === undefined && cue.line !== 'auto') continue;\n if (was === undefined) {\n lifted.set(cue, {\n line: cue.line,\n snapToLines: cue.snapToLines,\n lineAlign: cue.lineAlign,\n });\n }\n // A negative line count, which every browser wraps at the video's\n // width, unlike a percentage. Chromium anchors the box's top on it\n // and Gecko its bottom, so the count clears the bar and the cue\n // below under both readings, with a little air to spare in one.\n const own = lines(cue, font, box.width);\n const line: number =\n previous === null ? base + own : previous.line + Math.max(own, previous.height);\n if (cue.line !== -line || !cue.snapToLines) changed = true;\n cue.snapToLines = true;\n cue.line = -line;\n previous = { line, height: own };\n }\n // Chromium lays a changed line out again only when the track's display\n // is rebuilt, which neither time nor a seek does for a cue already\n // showing; the mode flipped off and on in one task rebuilds it with no\n // paint in between. Only on a change, so the change event this fires\n // finds nothing to do and the loop ends there.\n if (changed) {\n track.mode = 'hidden';\n track.mode = 'showing';\n }\n }\n }\n\n function watch(): void {\n for (const track of video.textTracks) {\n track.removeEventListener('cuechange', apply);\n track.addEventListener('cuechange', apply);\n }\n apply();\n }\n\n video.textTracks.addEventListener('change', watch);\n video.textTracks.addEventListener('addtrack', watch);\n watch();\n\n return {\n lifted(next: boolean): void {\n on = next;\n apply();\n },\n dispose(): void {\n on = false;\n live = false;\n apply();\n video.textTracks.removeEventListener('change', watch);\n video.textTracks.removeEventListener('addtrack', watch);\n for (const track of video.textTracks) track.removeEventListener('cuechange', apply);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAA,YAAA;;AAEA,MAAA,SAAA;CACA,OAAA;CACA,QAAA;CACA,OAAA;CACA,QAAA;AACA;;;;;;;AASA,MAAA,OAAA;;AAGA,MAAA,WAAA;AACA,MAAA,cAAA;;AAEA,MAAA,YAAA;;AAEA,MAAA,MAAA;;AAEA,MAAA,OAAA;;AAGA,SAAA,WAAA;CACA,IAAA,SAAA,KAAA,cAAA,SAAA,KAAA,EAAA,MAAA,M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AAA,KAAA;EACA;EACA,MAAA;CACA;CAEA,MAAA,WAAA,iBAAA,UAAA,KAAA;CACA,MAAA,WAAA,iBAAA,YAAA,KAAA;CACA,MAAA;CAEA,OAAA;EACA,OAAA,MAAA;GACA,KAAA;GACA,MAAA;EACA;EACA,UAAA;GACA,KAAA;GACA,OAAA;GACA,MAAA;GACA,MAAA,WAAA,oBAAA,UAAA,KAAA;GACA,MAAA,WAAA,oBAAA,YAAA,KAAA;GACA,KAAA,MAAA,SAAA,MAAA,YAAA,MAAA,oBAAA,aAAA,KAAA;EACA;CACA;AACA"}
@@ -1,35 +1,10 @@
1
1
  /**
2
- * The glyphs, copied from Vidstack's media-icons 0.10.0
3
- * (https://github.com/vidstack/media-icons): filled paths on a 32-unit
4
- * viewBox, drawn for a control bar, one visual weight across the set.
5
- * The paths went through svgo's path optimizer at 3 decimals: the
6
- * originals carry 4 to 6, which no screen shows on a 32-unit grid, and
7
- * cost about 4 kB of the bundle. Copied, not depended on. The notice below is the license's one condition,
8
- * and packages/player/NOTICE repeats it for the published tarball.
9
- *
10
- * MIT License
11
- *
12
- * Copyright (c) 2023 Rahim Alwer
13
- *
14
- * Permission is hereby granted, free of charge, to any person obtaining a copy
15
- * of this software and associated documentation files (the "Software"), to deal
16
- * in the Software without restriction, including without limitation the rights
17
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
- * copies of the Software, and to permit persons to whom the Software is
19
- * furnished to do so, subject to the following conditions:
20
- *
21
- * The above copyright notice and this permission notice shall be included in all
22
- * copies or substantial portions of the Software.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- * SOFTWARE.
2
+ * The glyphs, Mattebox's own drawings: filled paths on a 32-unit viewBox,
3
+ * one visual weight across the set, with hard corners and 45 degree cuts
4
+ * like the panels of the mark. Each is one path, so a glyph scales to any
5
+ * size and takes the text colour.
31
6
  */
32
- export type IconName = 'play' | 'pause' | 'replay' | 'mute' | 'volume-low' | 'volume-high' | 'fullscreen' | 'fullscreen-exit' | 'settings' | 'music' | 'closed-captions' | 'closed-captions-on' | 'lock-closed' | 'seek-backward' | 'seek-forward' | 'seek-backward-10' | 'seek-forward-10' | 'seek-backward-30' | 'seek-forward-30' | 'playback-speed' | 'picture-in-picture' | 'picture-in-picture-exit' | 'airplay' | 'airplay-active' | 'chapters' | 'fast-forward' | 'fast-backward';
7
+ export type IconName = 'play' | 'pause' | 'replay' | 'mute' | 'volume-low' | 'volume-high' | 'fullscreen' | 'fullscreen-exit' | 'quality' | 'audio' | 'subtitles' | 'subtitles-on' | 'lock-closed' | 'seek-backward' | 'seek-forward' | 'seek-backward-5' | 'seek-forward-5' | 'seek-backward-10' | 'seek-forward-10' | 'seek-backward-15' | 'seek-forward-15' | 'seek-backward-30' | 'seek-forward-30' | 'playback-speed' | 'picture-in-picture' | 'picture-in-picture-exit' | 'airplay' | 'airplay-active' | 'chapters' | 'fast-forward' | 'fast-backward' | 'audio-description' | 'sdh' | 'closed-captions' | 'text-size' | 'text-background';
33
8
  /** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */
34
9
  export declare function icon(name: IconName): SVGSVGElement;
35
10
  //# sourceMappingURL=icons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/controls/icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,UAAU,GACV,OAAO,GACP,iBAAiB,GACjB,oBAAoB,GACpB,aAAa,GACb,eAAe,GACf,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,oBAAoB,GACpB,yBAAyB,GACzB,SAAS,GACT,gBAAgB,GAChB,UAAU,GACV,cAAc,GACd,eAAe,CAAC;AAiEpB,2FAA2F;AAC3F,wBAAgB,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,CAUlD"}
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/controls/icons.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,SAAS,GACT,OAAO,GACP,WAAW,GACX,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,oBAAoB,GACpB,yBAAyB,GACzB,SAAS,GACT,gBAAgB,GAChB,UAAU,GACV,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,KAAK,GACL,iBAAiB,GACjB,WAAW,GACX,iBAAiB,CAAC;AA2EtB,2FAA2F;AAC3F,wBAAgB,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,CAUlD"}
@@ -1,37 +1,46 @@
1
1
  //#region src/controls/icons.ts
2
2
  /**
3
3
  * Each glyph's subpaths joined into one `d`. The path is drawn even-odd:
4
- * the gear, the note, the captions and the lock cut holes with a nested
5
- * subpath, and the rest have disjoint subpaths, where the rule is moot.
4
+ * a frame, a ring or a letter cuts its hole with a nested subpath, and no
5
+ * two filled subpaths overlap.
6
6
  */
7
7
  const PATHS = {
8
- play: "M10.667 6.655a.667.667 0 0 1 1.063-.536l12.647 9.344c.36.267.36.806 0 1.073L11.73 25.88a.667.667 0 0 1-1.063-.536z",
9
- pause: "M8.667 6.667A.667.667 0 0 0 8 7.333v17.334c0 .368.298.666.667.666h4a.667.667 0 0 0 .666-.666V7.333a.667.667 0 0 0-.666-.666zm10.666 0a.667.667 0 0 0-.666.666v17.334c0 .368.298.666.666.666h4a.667.667 0 0 0 .667-.666V7.333a.667.667 0 0 0-.667-.666z",
10
- replay: "M15.604 12.215a.667.667 0 0 0 1.063-.536v-1.5c0-.079.068-.14.146-.131a6.669 6.669 0 1 1-7.448 7.284c-.036-.367-.331-.666-.7-.666H6.667c-.369 0-.67.3-.645.667.343 5.212 4.68 9.334 9.978 9.334 5.523 0 10-4.478 10-10 0-5.257-4.056-9.566-9.208-9.97a.135.135 0 0 1-.125-.133V4.988a.667.667 0 0 0-1.063-.536l-4.527 3.345a.667.667 0 0 0 0 1.073z",
11
- mute: "M17.51 24.66a.667.667 0 0 1-1.064.536l-6.998-5.17a.13.13 0 0 0-.079-.027H4.667A.667.667 0 0 1 4 19.333v-6.667c0-.368.298-.667.667-.667H9.37q.044 0 .08-.026l6.995-5.17a.667.667 0 0 1 1.063.537zm11.352-11.018a.667.667 0 0 0 0-.943l-.943-.942a.667.667 0 0 0-.942 0l-2.264 2.263a.134.134 0 0 1-.188 0l-2.263-2.263a.667.667 0 0 0-.943 0l-.943.943a.667.667 0 0 0 0 .942l2.263 2.263a.133.133 0 0 1 0 .189l-2.262 2.262a.667.667 0 0 0 0 .943l.943.943c.26.26.682.26.942 0l2.263-2.262a.133.133 0 0 1 .188 0l2.263 2.262c.26.26.683.26.943 0l.943-.943a.667.667 0 0 0 0-.943l-2.263-2.262a.133.133 0 0 1 0-.189z",
12
- "volume-low": "M17.51 24.66a.667.667 0 0 1-1.064.536l-6.998-5.17a.13.13 0 0 0-.079-.027H4.667A.667.667 0 0 1 4 19.332v-6.666c0-.368.298-.667.667-.667H9.37q.044 0 .08-.026l6.995-5.17a.667.667 0 0 1 1.063.537zm5.332-11.993a.667.667 0 0 0-.666-.667h-1.334a.667.667 0 0 0-.666.667v6.666c0 .369.298.667.666.667h1.334a.667.667 0 0 0 .666-.667z",
13
- "volume-high": "M17.51 24.66a.667.667 0 0 1-1.064.536l-6.998-5.17a.13.13 0 0 0-.079-.027H4.667A.667.667 0 0 1 4 19.333v-6.667c0-.368.298-.667.667-.667H9.37q.044 0 .08-.026l6.995-5.17a.667.667 0 0 1 1.063.537zm10-15.327c.367 0 .666.299.666.667v12a.667.667 0 0 1-.667.667h-1.333a.667.667 0 0 1-.667-.667V10c0-.368.299-.667.667-.667zM22.175 12c.368 0 .666.299.666.667v6.666a.667.667 0 0 1-.666.667h-1.334a.667.667 0 0 1-.666-.667v-6.666c0-.368.298-.667.666-.667z",
14
- fullscreen: "M25.33 7.265a.667.667 0 0 0-.663-.598h-5.334a.667.667 0 0 0-.666.666v2c0 .369.298.667.666.667h2.534c.073 0 .133.06.133.133v2.534c0 .368.299.666.667.666h2a.667.667 0 0 0 .666-.666V7.333zM22 21.867c0 .073-.06.133-.133.133h-2.534a.667.667 0 0 0-.666.667v2c0 .368.298.666.666.666h5.334a.667.667 0 0 0 .666-.666v-5.334a.667.667 0 0 0-.666-.666h-2a.667.667 0 0 0-.667.666zM12.667 22h-2.534a.133.133 0 0 1-.133-.133v-2.534a.667.667 0 0 0-.667-.666h-2a.667.667 0 0 0-.666.666v5.334c0 .368.298.666.666.666h5.334a.667.667 0 0 0 .666-.666v-2a.667.667 0 0 0-.666-.667M10 12.667v-2.534c0-.073.06-.133.133-.133h2.534a.667.667 0 0 0 .666-.667v-2a.667.667 0 0 0-.666-.666H7.333a.667.667 0 0 0-.666.666v5.334c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666",
15
- "fullscreen-exit": "M19.333 13.333a.667.667 0 0 1-.666-.666V7.333c0-.368.298-.666.666-.666h2c.369 0 .667.298.667.666v2.534c0 .073.06.133.133.133h2.534c.368 0 .666.299.666.667v2a.667.667 0 0 1-.666.666zm-6 6a.667.667 0 0 0-.666-.666H7.333a.667.667 0 0 0-.666.666v2c0 .369.298.667.666.667h2.534c.073 0 .133.06.133.133v2.534c0 .368.299.666.667.666h2a.667.667 0 0 0 .666-.666zm5.334 5.334c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2.534c0-.073.06-.133.133-.133h2.534a.667.667 0 0 0 .666-.667v-2a.667.667 0 0 0-.666-.666h-5.334a.667.667 0 0 0-.666.666zm-8-11.334h2a.667.667 0 0 0 .666-.666V7.333a.667.667 0 0 0-.666-.666h-2a.667.667 0 0 0-.667.666v2.534c0 .073-.06.133-.133.133H7.333a.667.667 0 0 0-.666.667v2c0 .368.298.666.666.666z",
16
- settings: "M13.572 5.333c-.33 0-.61.24-.659.566l-.507 3.32a.13.13 0 0 1-.068.098q-.15.08-.294.17a.14.14 0 0 1-.119.01l-3.13-1.22a.67.67 0 0 0-.819.288L5.55 12.769a.67.67 0 0 0 .16.853l2.624 2.1a.14.14 0 0 1 .05.109 8 8 0 0 0 0 .337.14.14 0 0 1-.05.108L5.71 18.379a.67.67 0 0 0-.16.853l2.427 4.204a.67.67 0 0 0 .82.288l3.129-1.221a.14.14 0 0 1 .119.01q.144.088.293.17c.037.02.062.056.068.097l.507 3.32c.05.326.33.566.66.566h4.853c.33 0 .61-.24.66-.566l.507-3.319a.14.14 0 0 1 .069-.098q.15-.08.294-.17a.14.14 0 0 1 .12-.01l3.127 1.22a.67.67 0 0 0 .82-.287l2.427-4.204a.67.67 0 0 0-.16-.854l-2.622-2.1a.14.14 0 0 1-.05-.108 7 7 0 0 0 0-.338.14.14 0 0 1 .05-.109l2.622-2.099a.67.67 0 0 0 .161-.854l-2.427-4.204a.67.67 0 0 0-.82-.287l-3.128 1.22a.14.14 0 0 1-.12-.011 8 8 0 0 0-.294-.171.14.14 0 0 1-.069-.098L19.085 5.9a.67.67 0 0 0-.659-.566zM16 20.285a4.286 4.286 0 1 0 0-8.572 4.286 4.286 0 0 0 0 8.572",
17
- music: "M26.667 6A.667.667 0 0 0 26 5.333H11.333a.667.667 0 0 0-.666.667v11.571a.138.138 0 0 1-.193.125A4.667 4.667 0 1 0 13.334 22V8.667c0-.369.298-.667.666-.667h9.333c.369 0 .667.298.667.667v6.238a.138.138 0 0 1-.192.125 4.667 4.667 0 1 0 2.86 4.304zM22 21.333a2 2 0 1 0 0-4 2 2 0 0 0 0 4M8.667 24a2 2 0 1 0 0-4 2 2 0 0 0 0 4",
18
- "closed-captions": "M4.666 6.667A.667.667 0 0 0 4 7.334v17.333c0 .368.299.667.667.667h22.667a.667.667 0 0 0 .666-.667V7.334a.667.667 0 0 0-.666-.667zm4 14.666A.667.667 0 0 1 8 20.667v-9.334c0-.368.298-.666.667-.666H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666zm9.334 0a.667.667 0 0 1-.667-.666v-9.334c0-.368.299-.666.667-.666h5.333c.369 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134h3.2c.369 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666z",
19
- "closed-captions-on": "M8 28c0-.368.298-.666.667-.666h14.666c.369 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666H8.667A.667.667 0 0 1 8 29.334zM4.666 6.667a.667.667 0 0 0-.667.667v17.333c0 .368.299.667.667.667h22.667a.667.667 0 0 0 .666-.667V7.334a.667.667 0 0 0-.666-.667zm4 14.666A.667.667 0 0 1 8 20.667v-9.334c0-.368.298-.666.667-.666H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666zm9.334 0a.667.667 0 0 1-.667-.666v-9.334c0-.368.299-.666.667-.666h5.333c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134h3.2c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666z",
20
- "lock-closed": "M16 4a6.667 6.667 0 0 1 6.665 6.533.136.136 0 0 0 .135.134h1.867c.368 0 .666.298.666.666V26a.667.667 0 0 1-.666.667H7.333A.667.667 0 0 1 6.667 26V11.333c0-.368.298-.666.666-.666H9.2c.074 0 .133-.06.135-.134A6.667 6.667 0 0 1 16 4m-3.998 6.533a.13.13 0 0 0 .131.134h7.734a.13.13 0 0 0 .13-.134 4 4 0 0 0-7.995 0M9.333 14c0-.368.299-.667.667-.667h12c.368 0 .667.299.667.667v9.333A.667.667 0 0 1 22 24H10a.667.667 0 0 1-.667-.667z",
21
- "seek-backward": "M15.604 12.215a.667.667 0 0 0 1.063-.536v-1.5c0-.079.068-.14.146-.131a6.669 6.669 0 1 1-7.448 7.284c-.036-.367-.331-.666-.7-.666H6.667c-.369 0-.67.3-.645.667.343 5.212 4.68 9.334 9.978 9.334 5.523 0 10-4.478 10-10 0-5.257-4.056-9.566-9.208-9.97a.135.135 0 0 1-.125-.133V4.988a.667.667 0 0 0-1.063-.536l-4.527 3.345a.667.667 0 0 0 0 1.073z",
22
- "seek-forward": "M16.417 12.215a.667.667 0 0 1-1.063-.536v-1.5a.13.13 0 0 0-.147-.131 6.668 6.668 0 1 0 7.448 7.284c.037-.367.332-.666.7-.666h1.999c.368 0 .669.3.645.667-.343 5.212-4.68 9.334-9.978 9.334-5.523 0-10-4.478-10-10 0-5.257 4.055-9.566 9.208-9.97a.135.135 0 0 0 .125-.133V4.988a.667.667 0 0 1 1.063-.536l4.527 3.345c.36.267.36.806 0 1.073z",
23
- "seek-backward-10": "M16.667 10.345a.667.667 0 0 1-1.063.536l-4.527-3.345a.667.667 0 0 1 0-1.072l4.527-3.345a.667.667 0 0 1 1.063.536v1.572c0 .07.055.129.126.134 5.89.407 10.54 5.313 10.54 11.306C27.333 22.926 22.26 28 16 28 9.965 28 5.031 23.283 4.686 17.334a.64.64 0 0 1 .647-.667h2c.369 0 .664.3.694.667a8 8 0 1 0 8.784-8.627.132.132 0 0 0-.144.132zm.42 9.334q.552.36 1.313.36.765 0 1.313-.357.55-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02Q19.163 14 18.4 14q-.761 0-1.312.352-.549.35-.847 1.02-.295.668-.298 1.625t.295 1.64q.3.678.85 1.042m2.05-1.253q-.282.463-.737.463a.78.78 0 0 1-.53-.204q-.231-.208-.359-.628-.125-.42-.122-1.06.003-.943.281-1.397.28-.458.73-.458.304 0 .532.202.227.201.355.613.128.41.128 1.04.003.963-.279 1.43m-5.362 1.472c.073 0 .133-.06.133-.134v-5.551a.133.133 0 0 0-.133-.133h-1.133a.13.13 0 0 0-.07.02l-1.34.832a.13.13 0 0 0-.063.114v.904c0 .104.114.168.203.114l1.092-.668a.027.027 0 0 1 .04.023v4.345c0 .074.06.134.134.134z",
24
- "seek-forward-10": "M15.333 10.345c0 .547.623.862 1.063.536l4.527-3.345a.667.667 0 0 0 0-1.072l-4.527-3.345a.667.667 0 0 0-1.063.536v1.572c0 .07-.055.129-.126.134-5.89.407-10.54 5.313-10.54 11.306C4.667 22.926 9.74 28 16 28c6.035 0 10.969-4.717 11.314-10.666a.64.64 0 0 0-.647-.667h-2c-.369 0-.664.3-.694.667a8 8 0 1 1-8.784-8.627.132.132 0 0 1 .144.132zm1.755 9.334q.551.36 1.312.36.765 0 1.313-.357.55-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02Q19.163 14 18.4 14q-.761 0-1.312.352-.549.35-.847 1.02-.295.668-.298 1.625t.295 1.64q.3.678.85 1.042m2.048-1.253q-.281.463-.736.463a.78.78 0 0 1-.53-.204q-.231-.208-.359-.628-.125-.42-.122-1.06.003-.943.281-1.397.28-.458.73-.458.304 0 .532.202.227.201.355.613.128.41.128 1.04.003.963-.279 1.43m-5.361 1.472c.073 0 .133-.06.133-.134v-5.551a.133.133 0 0 0-.133-.133h-1.133a.13.13 0 0 0-.07.02l-1.34.832a.13.13 0 0 0-.063.114v.904c0 .104.114.168.203.114l1.092-.668a.027.027 0 0 1 .04.023v4.345c0 .074.06.134.134.134z",
25
- "seek-backward-30": "M16.667 10.345a.667.667 0 0 1-1.063.536l-4.527-3.345a.667.667 0 0 1 0-1.072l4.527-3.345a.667.667 0 0 1 1.063.536v1.572c0 .07.055.129.126.134 5.89.407 10.54 5.313 10.54 11.306C27.333 22.926 22.26 28 16 28 9.965 28 5.031 23.283 4.686 17.334a.64.64 0 0 1 .647-.667h2c.369 0 .664.3.694.667a8 8 0 1 0 8.784-8.627.132.132 0 0 0-.144.132zm-5.083 9.405a2.9 2.9 0 0 0 1.18.227q.681 0 1.207-.221.528-.225.824-.614.298-.391.298-.898a1.23 1.23 0 0 0-.344-.895q-.337-.351-.997-.434a.026.026 0 0 1-.023-.026q.002-.021.023-.026.49-.078.804-.389.324-.318.321-.81 0-.474-.264-.849a1.8 1.8 0 0 0-.739-.596 2.6 2.6 0 0 0-1.1-.219q-.626 0-1.118.225-.49.225-.773.622a1.53 1.53 0 0 0-.284.78.126.126 0 0 0 .129.134h1.08c.071 0 .129-.058.145-.128a.6.6 0 0 1 .1-.221.7.7 0 0 1 .299-.233q.19-.082.423-.082.221 0 .39.082a.62.62 0 0 1 .357.577.6.6 0 0 1-.108.358.7.7 0 0 1-.31.238q-.196.085-.454.085h-.432a.133.133 0 0 0-.133.134v.733c0 .074.06.134.133.134h.432q.295 0 .511.088a.77.77 0 0 1 .338.247q.12.159.117.363a.6.6 0 0 1-.105.364.74.74 0 0 1-.301.247 1 1 0 0 1-.44.088q-.251 0-.447-.082a.76.76 0 0 1-.31-.227.6.6 0 0 1-.103-.212c-.018-.07-.075-.127-.146-.127H10.61a.126.126 0 0 0-.128.135q.037.444.295.794.296.404.806.634m6.196-.071q.552.36 1.313.36.765 0 1.312-.357.551-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02-.55-.352-1.311-.352t-1.313.352q-.548.35-.847 1.02-.295.668-.298 1.625t.296 1.64q.298.678.85 1.042m2.048-1.253q-.28.463-.735.463a.78.78 0 0 1-.532-.204q-.23-.208-.358-.628-.125-.42-.122-1.06.003-.943.282-1.397.277-.458.73-.458.304 0 .53.202.227.201.356.613.128.41.128 1.04.003.963-.279 1.43",
26
- "seek-forward-30": "M15.333 10.345c0 .547.623.862 1.063.536l4.528-3.345a.667.667 0 0 0 0-1.072l-4.528-3.345a.667.667 0 0 0-1.063.536v1.572c0 .07-.055.129-.126.134-5.89.407-10.54 5.313-10.54 11.306C4.667 22.926 9.74 28 16 28c6.035 0 10.969-4.717 11.314-10.666a.64.64 0 0 0-.647-.667h-2c-.369 0-.664.3-.694.667a8 8 0 1 1-8.784-8.627.132.132 0 0 1 .144.132zm-3.748 9.405a2.9 2.9 0 0 0 1.178.227q.682 0 1.208-.221.528-.225.824-.614.298-.391.298-.898a1.23 1.23 0 0 0-.344-.895q-.337-.351-.997-.434a.026.026 0 0 1-.023-.026q.002-.021.023-.026.49-.078.804-.389.324-.318.321-.81 0-.474-.264-.849a1.8 1.8 0 0 0-.739-.596 2.6 2.6 0 0 0-1.1-.219q-.626 0-1.118.225-.49.225-.773.622a1.53 1.53 0 0 0-.284.78.126.126 0 0 0 .129.134h1.08c.071 0 .129-.058.145-.128a.6.6 0 0 1 .1-.221.7.7 0 0 1 .299-.233q.19-.082.423-.082.221 0 .39.082a.62.62 0 0 1 .357.577.6.6 0 0 1-.108.358.7.7 0 0 1-.31.238q-.196.085-.454.085h-.432a.133.133 0 0 0-.133.134v.733c0 .074.06.134.133.134h.432q.295 0 .511.088a.77.77 0 0 1 .338.247q.12.159.117.363a.6.6 0 0 1-.105.364.74.74 0 0 1-.301.247 1 1 0 0 1-.44.088q-.251 0-.447-.082a.76.76 0 0 1-.31-.227.6.6 0 0 1-.103-.212c-.018-.07-.075-.127-.146-.127H10.61a.126.126 0 0 0-.128.135q.037.444.295.794.296.404.806.634m6.195-.071q.552.36 1.313.36.765 0 1.312-.357.551-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02-.549-.352-1.31-.352t-1.313.352q-.548.35-.847 1.02-.295.668-.298 1.625t.296 1.64q.298.678.85 1.042m2.048-1.253q-.28.463-.735.463a.78.78 0 0 1-.532-.204q-.23-.208-.358-.628-.125-.42-.122-1.06.003-.943.282-1.397.277-.458.73-.458.304 0 .53.202.227.201.356.613.128.41.128 1.04.003.963-.279 1.43",
27
- "playback-speed": "M13.921 5.536c.394-.078.746.234.746.635v1.401c0 .326-.236.6-.553.677a8 8 0 0 0-3.905 2.257.71.71 0 0 1-.862.14l-1.206-.697c-.347-.2-.441-.661-.177-.963a10.66 10.66 0 0 1 5.957-3.45M5.89 12.59c.128-.38.575-.53.923-.33l1.199.693a.71.71 0 0 1 .31.816A8 8 0 0 0 8 16.026c0 .783.113 1.54.322 2.255a.71.71 0 0 1-.31.817l-1.185.684c-.346.2-.792.052-.922-.327A10.7 10.7 0 0 1 5.333 16c0-1.192.196-2.339.557-3.41m2.281 9.494c-.348.201-.442.664-.176.965a10.66 10.66 0 0 0 5.926 3.414c.394.078.746-.234.746-.635v-1.35c0-.325-.236-.6-.553-.677a8 8 0 0 1-3.905-2.257.71.71 0 0 0-.862-.139zm9.162 3.744c0 .401.353.713.746.635 4.896-.967 8.588-5.284 8.588-10.464s-3.692-9.497-8.588-10.464c-.393-.078-.746.234-.746.635v1.401c0 .326.237.6.553.677a8.003 8.003 0 0 1 0 15.553.71.71 0 0 0-.553.677zm-2.937-15.413a.667.667 0 0 0-1.063.537v10.094c0 .548.623.862 1.063.537l6.831-5.048a.667.667 0 0 0 0-1.073z",
28
- "picture-in-picture": "M16 15.333a.667.667 0 0 0-.667.667v4c0 .368.299.667.667.667h5.333A.667.667 0 0 0 22 20v-4a.667.667 0 0 0-.667-.667zm-10.667-8c0-.368.299-.666.667-.666h20c.368 0 .667.298.667.666v17.334a.667.667 0 0 1-.667.666H6a.667.667 0 0 1-.667-.666zM8 10c0-.368.298-.667.667-.667h14.666c.369 0 .667.299.667.667v12a.667.667 0 0 1-.667.667H8.667A.667.667 0 0 1 8 22z",
29
- "picture-in-picture-exit": "M5.333 26v-6.533c0-.074.06-.134.134-.134h2.4c.073 0 .133.06.133.134v3.866c0 .369.298.667.667.667h14.666a.667.667 0 0 0 .667-.667V8.667A.667.667 0 0 0 23.333 8h-3.866a.133.133 0 0 1-.134-.133v-2.4c0-.074.06-.134.134-.134H26c.368 0 .667.299.667.667v20a.667.667 0 0 1-.667.667H6A.667.667 0 0 1 5.333 26M14.01 8.424h-3.204a.133.133 0 0 0-.094.227l5.837 5.838c.26.26.26.682 0 .942l-1.226 1.226a.667.667 0 0 1-.942 0l-5.744-5.743a.133.133 0 0 0-.227.094v3.016a.667.667 0 0 1-.667.666H6.01a.667.667 0 0 1-.667-.666v-8c0-.369.299-.667.667-.667h8c.368 0 .666.298.666.667v1.733a.667.667 0 0 1-.666.667",
30
- airplay: "M5.333 6c0-.368.299-.667.667-.667h20c.368 0 .667.299.667.667v14.667a.667.667 0 0 1-.667.666h-2.293c-.211 0-.41-.1-.536-.27l-.985-1.333a.667.667 0 0 1 .536-1.063h.611A.667.667 0 0 0 24 18V8.667A.667.667 0 0 0 23.333 8H8.667A.667.667 0 0 0 8 8.667V18c0 .368.298.667.667.667h.627c.547 0 .86.622.536 1.063l-.985 1.333a.67.67 0 0 1-.537.27H6a.667.667 0 0 1-.667-.666zm3.452 19.604a.667.667 0 0 0 .536 1.063H22.68a.667.667 0 0 0 .536-1.063l-6.68-9.039a.667.667 0 0 0-1.072 0z",
31
- "airplay-active": "M5.333 6c0-.368.299-.667.667-.667h20c.368 0 .667.299.667.667v14.667a.667.667 0 0 1-.667.666H6a.667.667 0 0 1-.667-.666zm3.452 19.604a.667.667 0 0 0 .536 1.063H22.68a.667.667 0 0 0 .536-1.063l-6.68-9.039a.667.667 0 0 0-1.072 0z",
32
- chapters: "M16.693 25.335a.667.667 0 0 1-.667-.667V7.335c0-.369.299-.667.667-.667h2c.368 0 .666.298.666.667v17.333a.667.667 0 0 1-.666.667zm7.333 0a.667.667 0 0 1-.667-.667V7.335c0-.369.299-.667.667-.667h2c.368 0 .667.298.667.667v17.333a.667.667 0 0 1-.667.667zM5.481 23.94a.667.667 0 0 0 .472.816l1.931.518a.667.667 0 0 0 .817-.472L13.187 8.06a.667.667 0 0 0-.471-.817l-1.932-.517a.667.667 0 0 0-.817.47z",
33
- "fast-forward": "M16.125 8.119a.667.667 0 0 0-1.062.536v5.603a.134.134 0 0 1-.213.107L6.396 8.119a.667.667 0 0 0-1.063.536v14.69c0 .547.623.861 1.063.536l8.454-6.246a.133.133 0 0 1 .213.107v5.603c0 .547.622.861 1.062.536l9.941-7.345a.667.667 0 0 0 0-1.073z",
34
- "fast-backward": "M15.875 8.119a.667.667 0 0 1 1.063.536v5.603c0 .109.124.172.212.107l8.454-6.246a.667.667 0 0 1 1.063.536v14.69a.667.667 0 0 1-1.063.536l-8.454-6.246a.133.133 0 0 0-.212.107v5.603a.667.667 0 0 1-1.063.536l-9.941-7.345a.667.667 0 0 1 0-1.073z"
8
+ play: "M9 5L26 16L9 27z",
9
+ pause: "M8 6h5.5v20h-5.5zM18.5 6h5.5v20h-5.5z",
10
+ replay: "M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8z",
11
+ mute: "M4 12L9 12L16 6L16 26L9 20L4 20zM24 17.77L20.99 20.77L19.23 19.01L22.23 16L19.23 12.99L20.99 11.23L24 14.23L27.01 11.23L28.77 12.99L25.77 16L28.77 19.01L27.01 20.77z",
12
+ "volume-low": "M4 12L9 12L16 6L16 26L9 20L4 20zM21.13 10.87A7.25 7.25 0 0 1 21.13 21.13L19.36 19.36A4.75 4.75 0 0 0 19.36 12.64z",
13
+ "volume-high": "M4 12L9 12L16 6L16 26L9 20L4 20zM21.13 10.87A7.25 7.25 0 0 1 21.13 21.13L19.36 19.36A4.75 4.75 0 0 0 19.36 12.64zM24.31 7.69A11.75 11.75 0 0 1 24.31 24.31L22.54 22.54A9.25 9.25 0 0 0 22.54 9.46z",
14
+ fullscreen: "M5 5L14 5L11 8L8 8L8 11L5 14zM18 5L27 5L27 14L24 11L24 8L21 8zM5 18L8 21L8 24L11 24L14 27L5 27zM27 18L27 27L18 27L21 24L24 24L24 21z",
15
+ "fullscreen-exit": "M13 4L13 13L4 13L7 10L10 10L10 7zM19 4L22 7L22 10L25 10L28 13L19 13zM4 19L13 19L13 28L10 25L10 22L7 22zM19 19L28 19L25 22L22 22L22 25L19 28z",
16
+ quality: "M5 22L10 18.1L10 27L5 27zM13.5 15.4L18.5 11.6L18.5 27L13.5 27zM22 8.9L27 5L27 27L22 27z",
17
+ audio: "M4.75 13h2.5v6h-2.5zM9.75 9h2.5v14h-2.5zM14.75 5h2.5v22h-2.5zM19.75 10.5h2.5v11h-2.5zM24.75 13.5h2.5v5h-2.5z",
18
+ subtitles: "M4 6h20l4 4v16H4zM6.5 8.5H22.96L25.5 11.04V23.5H6.5zM9 14h8v2.5h-8zM19 14h4v2.5h-4zM9 18.5h4v2.5h-4zM15 18.5h8v2.5h-8z",
19
+ "subtitles-on": "M4 6h20l4 4v16H4zM9 14h8v2.5h-8zM19 14h4v2.5h-4zM9 18.5h4v2.5h-4zM15 18.5h8v2.5h-8z",
20
+ "lock-closed": "M7 14h18v13H7zM14.75 18.5v4.5h2.5v-4.5zM9.75 14V11A6.25 6.25 0 0 1 22.25 11V14H19.75V11A3.75 3.75 0 0 0 12.25 11V14z",
21
+ "seek-backward": "M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8z",
22
+ "seek-forward": "M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5z",
23
+ "seek-backward-5": "M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM13 13.5h6v2h-6zM13 15.5h2v0.5h-2zM13 16h6v2h-6zM17 18h2v0.5h-2zM13 18.5h6v2h-6z",
24
+ "seek-forward-5": "M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM13 13.5h6v2h-6zM13 15.5h2v0.5h-2zM13 16h6v2h-6zM17 18h2v0.5h-2zM13 18.5h6v2h-6z",
25
+ "seek-backward-10": "M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM11.5 13.5h2.2v7h-2.2zM15.5 13.5h5.5v7h-5.5zM17.6 15.6v2.8h1.3v-2.8z",
26
+ "seek-forward-10": "M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM11.5 13.5h2.2v7h-2.2zM15.5 13.5h5.5v7h-5.5zM17.6 15.6v2.8h1.3v-2.8z",
27
+ "seek-backward-15": "M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM10.5 13.5h2.2v7h-2.2zM14.7 13.5h5.8v2h-5.8zM14.7 15.5h2v0.5h-2zM14.7 16h5.8v2h-5.8zM18.5 18h2v0.5h-2zM14.7 18.5h5.8v2h-5.8z",
28
+ "seek-forward-15": "M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM10.5 13.5h2.2v7h-2.2zM14.7 13.5h5.8v2h-5.8zM14.7 15.5h2v0.5h-2zM14.7 16h5.8v2h-5.8zM18.5 18h2v0.5h-2zM14.7 18.5h5.8v2h-5.8z",
29
+ "seek-backward-30": "M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM13 13.5h2v7h-2zM10 13.5h3v2h-3zM11 16h2v2h-2zM10 18.5h3v2h-3zM16.5 13.5h5.5v7h-5.5zM18.6 15.6v2.8h1.3v-2.8z",
30
+ "seek-forward-30": "M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM13 13.5h2v7h-2zM10 13.5h3v2h-3zM11 16h2v2h-2zM10 18.5h3v2h-3zM16.5 13.5h5.5v7h-5.5zM18.6 15.6v2.8h1.3v-2.8z",
31
+ "playback-speed": "M7.69 26.31A11.75 11.75 0 1 1 24.31 26.31L22.54 24.54A9.25 9.25 0 1 0 9.46 24.54zM16.41 20.31L21.14 11.87L13.66 17.99z",
32
+ "picture-in-picture": "M4 6h24v20H4zM6.5 8.5v15h19v-15zM15 15h8v6h-8z",
33
+ "picture-in-picture-exit": "M4 6h24v20H4zM6.5 8.5v15h19v-15zM9.5 11.5L16 11.5L9.5 18zM13.63 13.87L19.29 19.52L17.52 21.29L11.87 15.63z",
34
+ airplay: "M4 6H28V23.25H23V20.75H25.5V8.5H6.5V20.75H9V23.25H4zM16 17.5L23.5 27L8.5 27z",
35
+ "airplay-active": "M4 6H28V23.25H22.1L16 15.5L9.9 23.25H4zM16 17.5L23.5 27L8.5 27z",
36
+ chapters: "M5 6.5h4v4h-4zM12 7.25h15v2.5h-15zM5 14h4v4h-4zM12 14.75h15v2.5h-15zM5 21.5h4v4h-4zM12 22.25h15v2.5h-15z",
37
+ "fast-forward": "M4 7L15 16L4 25zM16 7L27 16L16 25z",
38
+ "fast-backward": "M28 7L17 16L28 25zM16 7L5 16L16 25z",
39
+ "audio-description": "M1.5 23L4.8 9h2.6L10.7 23H8.4l-.75-3.2H4.55L3.8 23zM5.1 17.4h2L6.1 12.9zM12.2 9h2.8a7 7 0 0 1 0 14h-2.8zM14.6 11.4v9.2h.4a4.6 4.6 0 0 0 0-9.2zM24.2 9.96A9.4 9.4 0 0 1 24.2 22.04L22.82 20.89A7.6 7.6 0 0 0 22.82 11.11zM27.11 7.52A13.2 13.2 0 0 1 27.11 24.48L25.73 23.33A11.4 11.4 0 0 0 25.73 8.67z",
40
+ sdh: "M9.7 13.2L10.3 10.4L11.6 8.5L13.6 7.2L16 6.8L18.7 7.3L20.8 8.6L22.2 10.6L22.7 13L22.5 14.9L21.8 16.3L20.8 17.5L19.6 18.7L18.5 19.9L17.9 21.3L17.5 22.5L17.1 23.5L16.7 24.5L16 25.2L15.2 25.6L14.3 25.7L13.3 25.6L12.6 25.1L12 24.4L11.7 23.4L9.3 24.2L9.8 25.7L10.9 27L12.5 27.9L14.3 28.3L16 28L17.6 27.2L18.7 26L19.5 24.5L19.8 23.3L20.2 22.2L20.6 21.3L21.4 20.3L22.6 19.2L23.9 17.7L24.9 15.7L25.3 13L24.6 9.5L22.6 6.7L19.6 4.9L16 4.2L12.7 4.9L9.9 6.6L7.9 9.4L7.3 12.8zM13.7 13.2L13.9 12.1L14.4 11.4L15.1 10.9L16 10.8L16.9 10.9L17.6 11.4L18.1 12.1L18.3 13.2L20.7 12.8L20.4 11.1L19.4 9.6L17.9 8.6L16 8.2L14.1 8.6L12.6 9.6L11.6 11.1L11.3 12.8z",
41
+ "closed-captions": "M14.24 20.24A6 6 0 1 1 14.24 11.76L12.47 13.53A3.5 3.5 0 1 0 12.47 18.47zM26.24 20.24A6 6 0 1 1 26.24 11.76L24.47 13.53A3.5 3.5 0 1 0 24.47 18.47z",
42
+ "text-size": "M2.5 23L5.9 13L8.1 13L11.5 23zM7 16.53L7.64 18.4L6.36 18.4zM5.65 20.5L8.35 20.5L9.2 23L4.8 23zM12.5 23L19.5 6L22.5 6L29.5 23zM21 9.64L23.45 15.6L18.55 15.6zM17.48 18.2L24.52 18.2L26.5 23L15.5 23z",
43
+ "text-background": "M4 6h24v20h-24zM9 22.5L14.6 9.5L17.4 9.5L23 22.5zM16 12.75L17.66 16.6L14.34 16.6zM13.35 18.9L18.65 18.9L20.2 22.5L11.8 22.5z"
35
44
  };
36
45
  const SVG = "http://www.w3.org/2000/svg";
37
46
  /** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","names":[],"sources":["../../src/controls/icons.ts"],"sourcesContent":["/**\n * The glyphs, copied from Vidstack's media-icons 0.10.0\n * (https://github.com/vidstack/media-icons): filled paths on a 32-unit\n * viewBox, drawn for a control bar, one visual weight across the set.\n * The paths went through svgo's path optimizer at 3 decimals: the\n * originals carry 4 to 6, which no screen shows on a 32-unit grid, and\n * cost about 4 kB of the bundle. Copied, not depended on. The notice below is the license's one condition,\n * and packages/player/NOTICE repeats it for the published tarball.\n *\n * MIT License\n *\n * Copyright (c) 2023 Rahim Alwer\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport type IconName =\n | 'play'\n | 'pause'\n | 'replay'\n | 'mute'\n | 'volume-low'\n | 'volume-high'\n | 'fullscreen'\n | 'fullscreen-exit'\n | 'settings'\n | 'music'\n | 'closed-captions'\n | 'closed-captions-on'\n | 'lock-closed'\n | 'seek-backward'\n | 'seek-forward'\n | 'seek-backward-10'\n | 'seek-forward-10'\n | 'seek-backward-30'\n | 'seek-forward-30'\n | 'playback-speed'\n | 'picture-in-picture'\n | 'picture-in-picture-exit'\n | 'airplay'\n | 'airplay-active'\n | 'chapters'\n | 'fast-forward'\n | 'fast-backward';\n\n/**\n * Each glyph's subpaths joined into one `d`. The path is drawn even-odd:\n * the gear, the note, the captions and the lock cut holes with a nested\n * subpath, and the rest have disjoint subpaths, where the rule is moot.\n */\nconst PATHS: Readonly<Record<IconName, string>> = {\n play: 'M10.667 6.655a.667.667 0 0 1 1.063-.536l12.647 9.344c.36.267.36.806 0 1.073L11.73 25.88a.667.667 0 0 1-1.063-.536z',\n pause:\n 'M8.667 6.667A.667.667 0 0 0 8 7.333v17.334c0 .368.298.666.667.666h4a.667.667 0 0 0 .666-.666V7.333a.667.667 0 0 0-.666-.666zm10.666 0a.667.667 0 0 0-.666.666v17.334c0 .368.298.666.666.666h4a.667.667 0 0 0 .667-.666V7.333a.667.667 0 0 0-.667-.666z',\n replay:\n 'M15.604 12.215a.667.667 0 0 0 1.063-.536v-1.5c0-.079.068-.14.146-.131a6.669 6.669 0 1 1-7.448 7.284c-.036-.367-.331-.666-.7-.666H6.667c-.369 0-.67.3-.645.667.343 5.212 4.68 9.334 9.978 9.334 5.523 0 10-4.478 10-10 0-5.257-4.056-9.566-9.208-9.97a.135.135 0 0 1-.125-.133V4.988a.667.667 0 0 0-1.063-.536l-4.527 3.345a.667.667 0 0 0 0 1.073z',\n mute: 'M17.51 24.66a.667.667 0 0 1-1.064.536l-6.998-5.17a.13.13 0 0 0-.079-.027H4.667A.667.667 0 0 1 4 19.333v-6.667c0-.368.298-.667.667-.667H9.37q.044 0 .08-.026l6.995-5.17a.667.667 0 0 1 1.063.537zm11.352-11.018a.667.667 0 0 0 0-.943l-.943-.942a.667.667 0 0 0-.942 0l-2.264 2.263a.134.134 0 0 1-.188 0l-2.263-2.263a.667.667 0 0 0-.943 0l-.943.943a.667.667 0 0 0 0 .942l2.263 2.263a.133.133 0 0 1 0 .189l-2.262 2.262a.667.667 0 0 0 0 .943l.943.943c.26.26.682.26.942 0l2.263-2.262a.133.133 0 0 1 .188 0l2.263 2.262c.26.26.683.26.943 0l.943-.943a.667.667 0 0 0 0-.943l-2.263-2.262a.133.133 0 0 1 0-.189z',\n 'volume-low':\n 'M17.51 24.66a.667.667 0 0 1-1.064.536l-6.998-5.17a.13.13 0 0 0-.079-.027H4.667A.667.667 0 0 1 4 19.332v-6.666c0-.368.298-.667.667-.667H9.37q.044 0 .08-.026l6.995-5.17a.667.667 0 0 1 1.063.537zm5.332-11.993a.667.667 0 0 0-.666-.667h-1.334a.667.667 0 0 0-.666.667v6.666c0 .369.298.667.666.667h1.334a.667.667 0 0 0 .666-.667z',\n 'volume-high':\n 'M17.51 24.66a.667.667 0 0 1-1.064.536l-6.998-5.17a.13.13 0 0 0-.079-.027H4.667A.667.667 0 0 1 4 19.333v-6.667c0-.368.298-.667.667-.667H9.37q.044 0 .08-.026l6.995-5.17a.667.667 0 0 1 1.063.537zm10-15.327c.367 0 .666.299.666.667v12a.667.667 0 0 1-.667.667h-1.333a.667.667 0 0 1-.667-.667V10c0-.368.299-.667.667-.667zM22.175 12c.368 0 .666.299.666.667v6.666a.667.667 0 0 1-.666.667h-1.334a.667.667 0 0 1-.666-.667v-6.666c0-.368.298-.667.666-.667z',\n fullscreen:\n 'M25.33 7.265a.667.667 0 0 0-.663-.598h-5.334a.667.667 0 0 0-.666.666v2c0 .369.298.667.666.667h2.534c.073 0 .133.06.133.133v2.534c0 .368.299.666.667.666h2a.667.667 0 0 0 .666-.666V7.333zM22 21.867c0 .073-.06.133-.133.133h-2.534a.667.667 0 0 0-.666.667v2c0 .368.298.666.666.666h5.334a.667.667 0 0 0 .666-.666v-5.334a.667.667 0 0 0-.666-.666h-2a.667.667 0 0 0-.667.666zM12.667 22h-2.534a.133.133 0 0 1-.133-.133v-2.534a.667.667 0 0 0-.667-.666h-2a.667.667 0 0 0-.666.666v5.334c0 .368.298.666.666.666h5.334a.667.667 0 0 0 .666-.666v-2a.667.667 0 0 0-.666-.667M10 12.667v-2.534c0-.073.06-.133.133-.133h2.534a.667.667 0 0 0 .666-.667v-2a.667.667 0 0 0-.666-.666H7.333a.667.667 0 0 0-.666.666v5.334c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666',\n 'fullscreen-exit':\n 'M19.333 13.333a.667.667 0 0 1-.666-.666V7.333c0-.368.298-.666.666-.666h2c.369 0 .667.298.667.666v2.534c0 .073.06.133.133.133h2.534c.368 0 .666.299.666.667v2a.667.667 0 0 1-.666.666zm-6 6a.667.667 0 0 0-.666-.666H7.333a.667.667 0 0 0-.666.666v2c0 .369.298.667.666.667h2.534c.073 0 .133.06.133.133v2.534c0 .368.299.666.667.666h2a.667.667 0 0 0 .666-.666zm5.334 5.334c0 .368.298.666.666.666h2a.667.667 0 0 0 .667-.666v-2.534c0-.073.06-.133.133-.133h2.534a.667.667 0 0 0 .666-.667v-2a.667.667 0 0 0-.666-.666h-5.334a.667.667 0 0 0-.666.666zm-8-11.334h2a.667.667 0 0 0 .666-.666V7.333a.667.667 0 0 0-.666-.666h-2a.667.667 0 0 0-.667.666v2.534c0 .073-.06.133-.133.133H7.333a.667.667 0 0 0-.666.667v2c0 .368.298.666.666.666z',\n settings:\n 'M13.572 5.333c-.33 0-.61.24-.659.566l-.507 3.32a.13.13 0 0 1-.068.098q-.15.08-.294.17a.14.14 0 0 1-.119.01l-3.13-1.22a.67.67 0 0 0-.819.288L5.55 12.769a.67.67 0 0 0 .16.853l2.624 2.1a.14.14 0 0 1 .05.109 8 8 0 0 0 0 .337.14.14 0 0 1-.05.108L5.71 18.379a.67.67 0 0 0-.16.853l2.427 4.204a.67.67 0 0 0 .82.288l3.129-1.221a.14.14 0 0 1 .119.01q.144.088.293.17c.037.02.062.056.068.097l.507 3.32c.05.326.33.566.66.566h4.853c.33 0 .61-.24.66-.566l.507-3.319a.14.14 0 0 1 .069-.098q.15-.08.294-.17a.14.14 0 0 1 .12-.01l3.127 1.22a.67.67 0 0 0 .82-.287l2.427-4.204a.67.67 0 0 0-.16-.854l-2.622-2.1a.14.14 0 0 1-.05-.108 7 7 0 0 0 0-.338.14.14 0 0 1 .05-.109l2.622-2.099a.67.67 0 0 0 .161-.854l-2.427-4.204a.67.67 0 0 0-.82-.287l-3.128 1.22a.14.14 0 0 1-.12-.011 8 8 0 0 0-.294-.171.14.14 0 0 1-.069-.098L19.085 5.9a.67.67 0 0 0-.659-.566zM16 20.285a4.286 4.286 0 1 0 0-8.572 4.286 4.286 0 0 0 0 8.572',\n music:\n 'M26.667 6A.667.667 0 0 0 26 5.333H11.333a.667.667 0 0 0-.666.667v11.571a.138.138 0 0 1-.193.125A4.667 4.667 0 1 0 13.334 22V8.667c0-.369.298-.667.666-.667h9.333c.369 0 .667.298.667.667v6.238a.138.138 0 0 1-.192.125 4.667 4.667 0 1 0 2.86 4.304zM22 21.333a2 2 0 1 0 0-4 2 2 0 0 0 0 4M8.667 24a2 2 0 1 0 0-4 2 2 0 0 0 0 4',\n 'closed-captions':\n 'M4.666 6.667A.667.667 0 0 0 4 7.334v17.333c0 .368.299.667.667.667h22.667a.667.667 0 0 0 .666-.667V7.334a.667.667 0 0 0-.666-.667zm4 14.666A.667.667 0 0 1 8 20.667v-9.334c0-.368.298-.666.667-.666H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666zm9.334 0a.667.667 0 0 1-.667-.666v-9.334c0-.368.299-.666.667-.666h5.333c.369 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134h3.2c.369 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666z',\n 'closed-captions-on':\n 'M8 28c0-.368.298-.666.667-.666h14.666c.369 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666H8.667A.667.667 0 0 1 8 29.334zM4.666 6.667a.667.667 0 0 0-.667.667v17.333c0 .368.299.667.667.667h22.667a.667.667 0 0 0 .666-.667V7.334a.667.667 0 0 0-.666-.667zm4 14.666A.667.667 0 0 1 8 20.667v-9.334c0-.368.298-.666.667-.666H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134H14c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666zm9.334 0a.667.667 0 0 1-.667-.666v-9.334c0-.368.299-.666.667-.666h5.333c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666h-3.2a.133.133 0 0 0-.133.134v5.066c0 .074.06.134.133.134h3.2c.368 0 .667.298.667.666v1.334a.667.667 0 0 1-.667.666z',\n 'lock-closed':\n 'M16 4a6.667 6.667 0 0 1 6.665 6.533.136.136 0 0 0 .135.134h1.867c.368 0 .666.298.666.666V26a.667.667 0 0 1-.666.667H7.333A.667.667 0 0 1 6.667 26V11.333c0-.368.298-.666.666-.666H9.2c.074 0 .133-.06.135-.134A6.667 6.667 0 0 1 16 4m-3.998 6.533a.13.13 0 0 0 .131.134h7.734a.13.13 0 0 0 .13-.134 4 4 0 0 0-7.995 0M9.333 14c0-.368.299-.667.667-.667h12c.368 0 .667.299.667.667v9.333A.667.667 0 0 1 22 24H10a.667.667 0 0 1-.667-.667z',\n 'seek-backward':\n 'M15.604 12.215a.667.667 0 0 0 1.063-.536v-1.5c0-.079.068-.14.146-.131a6.669 6.669 0 1 1-7.448 7.284c-.036-.367-.331-.666-.7-.666H6.667c-.369 0-.67.3-.645.667.343 5.212 4.68 9.334 9.978 9.334 5.523 0 10-4.478 10-10 0-5.257-4.056-9.566-9.208-9.97a.135.135 0 0 1-.125-.133V4.988a.667.667 0 0 0-1.063-.536l-4.527 3.345a.667.667 0 0 0 0 1.073z',\n 'seek-forward':\n 'M16.417 12.215a.667.667 0 0 1-1.063-.536v-1.5a.13.13 0 0 0-.147-.131 6.668 6.668 0 1 0 7.448 7.284c.037-.367.332-.666.7-.666h1.999c.368 0 .669.3.645.667-.343 5.212-4.68 9.334-9.978 9.334-5.523 0-10-4.478-10-10 0-5.257 4.055-9.566 9.208-9.97a.135.135 0 0 0 .125-.133V4.988a.667.667 0 0 1 1.063-.536l4.527 3.345c.36.267.36.806 0 1.073z',\n 'seek-backward-10':\n 'M16.667 10.345a.667.667 0 0 1-1.063.536l-4.527-3.345a.667.667 0 0 1 0-1.072l4.527-3.345a.667.667 0 0 1 1.063.536v1.572c0 .07.055.129.126.134 5.89.407 10.54 5.313 10.54 11.306C27.333 22.926 22.26 28 16 28 9.965 28 5.031 23.283 4.686 17.334a.64.64 0 0 1 .647-.667h2c.369 0 .664.3.694.667a8 8 0 1 0 8.784-8.627.132.132 0 0 0-.144.132zm.42 9.334q.552.36 1.313.36.765 0 1.313-.357.55-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02Q19.163 14 18.4 14q-.761 0-1.312.352-.549.35-.847 1.02-.295.668-.298 1.625t.295 1.64q.3.678.85 1.042m2.05-1.253q-.282.463-.737.463a.78.78 0 0 1-.53-.204q-.231-.208-.359-.628-.125-.42-.122-1.06.003-.943.281-1.397.28-.458.73-.458.304 0 .532.202.227.201.355.613.128.41.128 1.04.003.963-.279 1.43m-5.362 1.472c.073 0 .133-.06.133-.134v-5.551a.133.133 0 0 0-.133-.133h-1.133a.13.13 0 0 0-.07.02l-1.34.832a.13.13 0 0 0-.063.114v.904c0 .104.114.168.203.114l1.092-.668a.027.027 0 0 1 .04.023v4.345c0 .074.06.134.134.134z',\n 'seek-forward-10':\n 'M15.333 10.345c0 .547.623.862 1.063.536l4.527-3.345a.667.667 0 0 0 0-1.072l-4.527-3.345a.667.667 0 0 0-1.063.536v1.572c0 .07-.055.129-.126.134-5.89.407-10.54 5.313-10.54 11.306C4.667 22.926 9.74 28 16 28c6.035 0 10.969-4.717 11.314-10.666a.64.64 0 0 0-.647-.667h-2c-.369 0-.664.3-.694.667a8 8 0 1 1-8.784-8.627.132.132 0 0 1 .144.132zm1.755 9.334q.551.36 1.312.36.765 0 1.313-.357.55-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02Q19.163 14 18.4 14q-.761 0-1.312.352-.549.35-.847 1.02-.295.668-.298 1.625t.295 1.64q.3.678.85 1.042m2.048-1.253q-.281.463-.736.463a.78.78 0 0 1-.53-.204q-.231-.208-.359-.628-.125-.42-.122-1.06.003-.943.281-1.397.28-.458.73-.458.304 0 .532.202.227.201.355.613.128.41.128 1.04.003.963-.279 1.43m-5.361 1.472c.073 0 .133-.06.133-.134v-5.551a.133.133 0 0 0-.133-.133h-1.133a.13.13 0 0 0-.07.02l-1.34.832a.13.13 0 0 0-.063.114v.904c0 .104.114.168.203.114l1.092-.668a.027.027 0 0 1 .04.023v4.345c0 .074.06.134.134.134z',\n 'seek-backward-30':\n 'M16.667 10.345a.667.667 0 0 1-1.063.536l-4.527-3.345a.667.667 0 0 1 0-1.072l4.527-3.345a.667.667 0 0 1 1.063.536v1.572c0 .07.055.129.126.134 5.89.407 10.54 5.313 10.54 11.306C27.333 22.926 22.26 28 16 28 9.965 28 5.031 23.283 4.686 17.334a.64.64 0 0 1 .647-.667h2c.369 0 .664.3.694.667a8 8 0 1 0 8.784-8.627.132.132 0 0 0-.144.132zm-5.083 9.405a2.9 2.9 0 0 0 1.18.227q.681 0 1.207-.221.528-.225.824-.614.298-.391.298-.898a1.23 1.23 0 0 0-.344-.895q-.337-.351-.997-.434a.026.026 0 0 1-.023-.026q.002-.021.023-.026.49-.078.804-.389.324-.318.321-.81 0-.474-.264-.849a1.8 1.8 0 0 0-.739-.596 2.6 2.6 0 0 0-1.1-.219q-.626 0-1.118.225-.49.225-.773.622a1.53 1.53 0 0 0-.284.78.126.126 0 0 0 .129.134h1.08c.071 0 .129-.058.145-.128a.6.6 0 0 1 .1-.221.7.7 0 0 1 .299-.233q.19-.082.423-.082.221 0 .39.082a.62.62 0 0 1 .357.577.6.6 0 0 1-.108.358.7.7 0 0 1-.31.238q-.196.085-.454.085h-.432a.133.133 0 0 0-.133.134v.733c0 .074.06.134.133.134h.432q.295 0 .511.088a.77.77 0 0 1 .338.247q.12.159.117.363a.6.6 0 0 1-.105.364.74.74 0 0 1-.301.247 1 1 0 0 1-.44.088q-.251 0-.447-.082a.76.76 0 0 1-.31-.227.6.6 0 0 1-.103-.212c-.018-.07-.075-.127-.146-.127H10.61a.126.126 0 0 0-.128.135q.037.444.295.794.296.404.806.634m6.196-.071q.552.36 1.313.36.765 0 1.312-.357.551-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02-.55-.352-1.311-.352t-1.313.352q-.548.35-.847 1.02-.295.668-.298 1.625t.296 1.64q.298.678.85 1.042m2.048-1.253q-.28.463-.735.463a.78.78 0 0 1-.532-.204q-.23-.208-.358-.628-.125-.42-.122-1.06.003-.943.282-1.397.277-.458.73-.458.304 0 .53.202.227.201.356.613.128.41.128 1.04.003.963-.279 1.43',\n 'seek-forward-30':\n 'M15.333 10.345c0 .547.623.862 1.063.536l4.528-3.345a.667.667 0 0 0 0-1.072l-4.528-3.345a.667.667 0 0 0-1.063.536v1.572c0 .07-.055.129-.126.134-5.89.407-10.54 5.313-10.54 11.306C4.667 22.926 9.74 28 16 28c6.035 0 10.969-4.717 11.314-10.666a.64.64 0 0 0-.647-.667h-2c-.369 0-.664.3-.694.667a8 8 0 1 1-8.784-8.627.132.132 0 0 1 .144.132zm-3.748 9.405a2.9 2.9 0 0 0 1.178.227q.682 0 1.208-.221.528-.225.824-.614.298-.391.298-.898a1.23 1.23 0 0 0-.344-.895q-.337-.351-.997-.434a.026.026 0 0 1-.023-.026q.002-.021.023-.026.49-.078.804-.389.324-.318.321-.81 0-.474-.264-.849a1.8 1.8 0 0 0-.739-.596 2.6 2.6 0 0 0-1.1-.219q-.626 0-1.118.225-.49.225-.773.622a1.53 1.53 0 0 0-.284.78.126.126 0 0 0 .129.134h1.08c.071 0 .129-.058.145-.128a.6.6 0 0 1 .1-.221.7.7 0 0 1 .299-.233q.19-.082.423-.082.221 0 .39.082a.62.62 0 0 1 .357.577.6.6 0 0 1-.108.358.7.7 0 0 1-.31.238q-.196.085-.454.085h-.432a.133.133 0 0 0-.133.134v.733c0 .074.06.134.133.134h.432q.295 0 .511.088a.77.77 0 0 1 .338.247q.12.159.117.363a.6.6 0 0 1-.105.364.74.74 0 0 1-.301.247 1 1 0 0 1-.44.088q-.251 0-.447-.082a.76.76 0 0 1-.31-.227.6.6 0 0 1-.103-.212c-.018-.07-.075-.127-.146-.127H10.61a.126.126 0 0 0-.128.135q.037.444.295.794.296.404.806.634m6.195-.071q.552.36 1.313.36.765 0 1.312-.357.551-.36.85-1.043.297-.681.298-1.642.003-.954-.296-1.625-.299-.67-.852-1.02-.549-.352-1.31-.352t-1.313.352q-.548.35-.847 1.02-.295.668-.298 1.625t.296 1.64q.298.678.85 1.042m2.048-1.253q-.28.463-.735.463a.78.78 0 0 1-.532-.204q-.23-.208-.358-.628-.125-.42-.122-1.06.003-.943.282-1.397.277-.458.73-.458.304 0 .53.202.227.201.356.613.128.41.128 1.04.003.963-.279 1.43',\n 'playback-speed':\n 'M13.921 5.536c.394-.078.746.234.746.635v1.401c0 .326-.236.6-.553.677a8 8 0 0 0-3.905 2.257.71.71 0 0 1-.862.14l-1.206-.697c-.347-.2-.441-.661-.177-.963a10.66 10.66 0 0 1 5.957-3.45M5.89 12.59c.128-.38.575-.53.923-.33l1.199.693a.71.71 0 0 1 .31.816A8 8 0 0 0 8 16.026c0 .783.113 1.54.322 2.255a.71.71 0 0 1-.31.817l-1.185.684c-.346.2-.792.052-.922-.327A10.7 10.7 0 0 1 5.333 16c0-1.192.196-2.339.557-3.41m2.281 9.494c-.348.201-.442.664-.176.965a10.66 10.66 0 0 0 5.926 3.414c.394.078.746-.234.746-.635v-1.35c0-.325-.236-.6-.553-.677a8 8 0 0 1-3.905-2.257.71.71 0 0 0-.862-.139zm9.162 3.744c0 .401.353.713.746.635 4.896-.967 8.588-5.284 8.588-10.464s-3.692-9.497-8.588-10.464c-.393-.078-.746.234-.746.635v1.401c0 .326.237.6.553.677a8.003 8.003 0 0 1 0 15.553.71.71 0 0 0-.553.677zm-2.937-15.413a.667.667 0 0 0-1.063.537v10.094c0 .548.623.862 1.063.537l6.831-5.048a.667.667 0 0 0 0-1.073z',\n 'picture-in-picture':\n 'M16 15.333a.667.667 0 0 0-.667.667v4c0 .368.299.667.667.667h5.333A.667.667 0 0 0 22 20v-4a.667.667 0 0 0-.667-.667zm-10.667-8c0-.368.299-.666.667-.666h20c.368 0 .667.298.667.666v17.334a.667.667 0 0 1-.667.666H6a.667.667 0 0 1-.667-.666zM8 10c0-.368.298-.667.667-.667h14.666c.369 0 .667.299.667.667v12a.667.667 0 0 1-.667.667H8.667A.667.667 0 0 1 8 22z',\n 'picture-in-picture-exit':\n 'M5.333 26v-6.533c0-.074.06-.134.134-.134h2.4c.073 0 .133.06.133.134v3.866c0 .369.298.667.667.667h14.666a.667.667 0 0 0 .667-.667V8.667A.667.667 0 0 0 23.333 8h-3.866a.133.133 0 0 1-.134-.133v-2.4c0-.074.06-.134.134-.134H26c.368 0 .667.299.667.667v20a.667.667 0 0 1-.667.667H6A.667.667 0 0 1 5.333 26M14.01 8.424h-3.204a.133.133 0 0 0-.094.227l5.837 5.838c.26.26.26.682 0 .942l-1.226 1.226a.667.667 0 0 1-.942 0l-5.744-5.743a.133.133 0 0 0-.227.094v3.016a.667.667 0 0 1-.667.666H6.01a.667.667 0 0 1-.667-.666v-8c0-.369.299-.667.667-.667h8c.368 0 .666.298.666.667v1.733a.667.667 0 0 1-.666.667',\n airplay:\n 'M5.333 6c0-.368.299-.667.667-.667h20c.368 0 .667.299.667.667v14.667a.667.667 0 0 1-.667.666h-2.293c-.211 0-.41-.1-.536-.27l-.985-1.333a.667.667 0 0 1 .536-1.063h.611A.667.667 0 0 0 24 18V8.667A.667.667 0 0 0 23.333 8H8.667A.667.667 0 0 0 8 8.667V18c0 .368.298.667.667.667h.627c.547 0 .86.622.536 1.063l-.985 1.333a.67.67 0 0 1-.537.27H6a.667.667 0 0 1-.667-.666zm3.452 19.604a.667.667 0 0 0 .536 1.063H22.68a.667.667 0 0 0 .536-1.063l-6.68-9.039a.667.667 0 0 0-1.072 0z',\n // The active glyph is the same drawing with the screen filled in.\n 'airplay-active':\n 'M5.333 6c0-.368.299-.667.667-.667h20c.368 0 .667.299.667.667v14.667a.667.667 0 0 1-.667.666H6a.667.667 0 0 1-.667-.666zm3.452 19.604a.667.667 0 0 0 .536 1.063H22.68a.667.667 0 0 0 .536-1.063l-6.68-9.039a.667.667 0 0 0-1.072 0z',\n chapters:\n 'M16.693 25.335a.667.667 0 0 1-.667-.667V7.335c0-.369.299-.667.667-.667h2c.368 0 .666.298.666.667v17.333a.667.667 0 0 1-.666.667zm7.333 0a.667.667 0 0 1-.667-.667V7.335c0-.369.299-.667.667-.667h2c.368 0 .667.298.667.667v17.333a.667.667 0 0 1-.667.667zM5.481 23.94a.667.667 0 0 0 .472.816l1.931.518a.667.667 0 0 0 .817-.472L13.187 8.06a.667.667 0 0 0-.471-.817l-1.932-.517a.667.667 0 0 0-.817.47z',\n 'fast-forward':\n 'M16.125 8.119a.667.667 0 0 0-1.062.536v5.603a.134.134 0 0 1-.213.107L6.396 8.119a.667.667 0 0 0-1.063.536v14.69c0 .547.623.861 1.063.536l8.454-6.246a.133.133 0 0 1 .213.107v5.603c0 .547.622.861 1.062.536l9.941-7.345a.667.667 0 0 0 0-1.073z',\n 'fast-backward':\n 'M15.875 8.119a.667.667 0 0 1 1.063.536v5.603c0 .109.124.172.212.107l8.454-6.246a.667.667 0 0 1 1.063.536v14.69a.667.667 0 0 1-1.063.536l-8.454-6.246a.133.133 0 0 0-.212.107v5.603a.667.667 0 0 1-1.063.536l-9.941-7.345a.667.667 0 0 1 0-1.073z',\n};\n\nconst SVG = 'http://www.w3.org/2000/svg';\n\n/** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */\nexport function icon(name: IconName): SVGSVGElement {\n const svg = document.createElementNS(SVG, 'svg');\n svg.setAttribute('viewBox', '0 0 32 32');\n svg.setAttribute('aria-hidden', 'true');\n svg.setAttribute('part', 'icon');\n const path = document.createElementNS(SVG, 'path');\n path.setAttribute('fill-rule', 'evenodd');\n path.setAttribute('d', PATHS[name]);\n svg.append(path);\n return svg;\n}\n"],"mappings":";;;;;;AAkEA,MAAM,QAA4C;CAChD,MAAM;CACN,OACE;CACF,QACE;CACF,MAAM;CACN,cACE;CACF,eACE;CACF,YACE;CACF,mBACE;CACF,UACE;CACF,OACE;CACF,mBACE;CACF,sBACE;CACF,eACE;CACF,iBACE;CACF,gBACE;CACF,oBACE;CACF,mBACE;CACF,oBACE;CACF,mBACE;CACF,kBACE;CACF,sBACE;CACF,2BACE;CACF,SACE;CAEF,kBACE;CACF,UACE;CACF,gBACE;CACF,iBACE;AACJ;AAEA,MAAM,MAAM;;AAGZ,SAAgB,KAAK,MAA+B;CAClD,MAAM,MAAM,SAAS,gBAAgB,KAAK,KAAK;CAC/C,IAAI,aAAa,WAAW,WAAW;CACvC,IAAI,aAAa,eAAe,MAAM;CACtC,IAAI,aAAa,QAAQ,MAAM;CAC/B,MAAM,OAAO,SAAS,gBAAgB,KAAK,MAAM;CACjD,KAAK,aAAa,aAAa,SAAS;CACxC,KAAK,aAAa,KAAK,MAAM,KAAK;CAClC,IAAI,OAAO,IAAI;CACf,OAAO;AACT"}
1
+ {"version":3,"file":"icons.js","names":[],"sources":["../../src/controls/icons.ts"],"sourcesContent":["/**\n * The glyphs, Mattebox's own drawings: filled paths on a 32-unit viewBox,\n * one visual weight across the set, with hard corners and 45 degree cuts\n * like the panels of the mark. Each is one path, so a glyph scales to any\n * size and takes the text colour.\n */\n\nexport type IconName =\n | 'play'\n | 'pause'\n | 'replay'\n | 'mute'\n | 'volume-low'\n | 'volume-high'\n | 'fullscreen'\n | 'fullscreen-exit'\n | 'quality'\n | 'audio'\n | 'subtitles'\n | 'subtitles-on'\n | 'lock-closed'\n | 'seek-backward'\n | 'seek-forward'\n | 'seek-backward-5'\n | 'seek-forward-5'\n | 'seek-backward-10'\n | 'seek-forward-10'\n | 'seek-backward-15'\n | 'seek-forward-15'\n | 'seek-backward-30'\n | 'seek-forward-30'\n | 'playback-speed'\n | 'picture-in-picture'\n | 'picture-in-picture-exit'\n | 'airplay'\n | 'airplay-active'\n | 'chapters'\n | 'fast-forward'\n | 'fast-backward'\n | 'audio-description'\n | 'sdh'\n | 'closed-captions'\n | 'text-size'\n | 'text-background';\n\n/**\n * Each glyph's subpaths joined into one `d`. The path is drawn even-odd:\n * a frame, a ring or a letter cuts its hole with a nested subpath, and no\n * two filled subpaths overlap.\n */\nconst PATHS: Readonly<Record<IconName, string>> = {\n play: 'M9 5L26 16L9 27z',\n pause: 'M8 6h5.5v20h-5.5zM18.5 6h5.5v20h-5.5z',\n replay:\n 'M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8z',\n mute: 'M4 12L9 12L16 6L16 26L9 20L4 20zM24 17.77L20.99 20.77L19.23 19.01L22.23 16L19.23 12.99L20.99 11.23L24 14.23L27.01 11.23L28.77 12.99L25.77 16L28.77 19.01L27.01 20.77z',\n 'volume-low':\n 'M4 12L9 12L16 6L16 26L9 20L4 20zM21.13 10.87A7.25 7.25 0 0 1 21.13 21.13L19.36 19.36A4.75 4.75 0 0 0 19.36 12.64z',\n 'volume-high':\n 'M4 12L9 12L16 6L16 26L9 20L4 20zM21.13 10.87A7.25 7.25 0 0 1 21.13 21.13L19.36 19.36A4.75 4.75 0 0 0 19.36 12.64zM24.31 7.69A11.75 11.75 0 0 1 24.31 24.31L22.54 22.54A9.25 9.25 0 0 0 22.54 9.46z',\n fullscreen:\n 'M5 5L14 5L11 8L8 8L8 11L5 14zM18 5L27 5L27 14L24 11L24 8L21 8zM5 18L8 21L8 24L11 24L14 27L5 27zM27 18L27 27L18 27L21 24L24 24L24 21z',\n 'fullscreen-exit':\n 'M13 4L13 13L4 13L7 10L10 10L10 7zM19 4L22 7L22 10L25 10L28 13L19 13zM4 19L13 19L13 28L10 25L10 22L7 22zM19 19L28 19L25 22L22 22L22 25L19 28z',\n quality:\n 'M5 22L10 18.1L10 27L5 27zM13.5 15.4L18.5 11.6L18.5 27L13.5 27zM22 8.9L27 5L27 27L22 27z',\n audio:\n 'M4.75 13h2.5v6h-2.5zM9.75 9h2.5v14h-2.5zM14.75 5h2.5v22h-2.5zM19.75 10.5h2.5v11h-2.5zM24.75 13.5h2.5v5h-2.5z',\n subtitles:\n 'M4 6h20l4 4v16H4zM6.5 8.5H22.96L25.5 11.04V23.5H6.5zM9 14h8v2.5h-8zM19 14h4v2.5h-4zM9 18.5h4v2.5h-4zM15 18.5h8v2.5h-8z',\n 'subtitles-on':\n 'M4 6h20l4 4v16H4zM9 14h8v2.5h-8zM19 14h4v2.5h-4zM9 18.5h4v2.5h-4zM15 18.5h8v2.5h-8z',\n 'lock-closed':\n 'M7 14h18v13H7zM14.75 18.5v4.5h2.5v-4.5zM9.75 14V11A6.25 6.25 0 0 1 22.25 11V14H19.75V11A3.75 3.75 0 0 0 12.25 11V14z',\n 'seek-backward':\n 'M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8z',\n 'seek-forward':\n 'M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5z',\n 'seek-backward-5':\n 'M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM13 13.5h6v2h-6zM13 15.5h2v0.5h-2zM13 16h6v2h-6zM17 18h2v0.5h-2zM13 18.5h6v2h-6z',\n 'seek-forward-5':\n 'M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM13 13.5h6v2h-6zM13 15.5h2v0.5h-2zM13 16h6v2h-6zM17 18h2v0.5h-2zM13 18.5h6v2h-6z',\n 'seek-backward-10':\n 'M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM11.5 13.5h2.2v7h-2.2zM15.5 13.5h5.5v7h-5.5zM17.6 15.6v2.8h1.3v-2.8z',\n 'seek-forward-10':\n 'M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM11.5 13.5h2.2v7h-2.2zM15.5 13.5h5.5v7h-5.5zM17.6 15.6v2.8h1.3v-2.8z',\n 'seek-backward-15':\n 'M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM10.5 13.5h2.2v7h-2.2zM14.7 13.5h5.8v2h-5.8zM14.7 15.5h2v0.5h-2zM14.7 16h5.8v2h-5.8zM18.5 18h2v0.5h-2zM14.7 18.5h5.8v2h-5.8z',\n 'seek-forward-15':\n 'M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM10.5 13.5h2.2v7h-2.2zM14.7 13.5h5.8v2h-5.8zM14.7 15.5h2v0.5h-2zM14.7 16h5.8v2h-5.8zM18.5 18h2v0.5h-2zM14.7 18.5h5.8v2h-5.8z',\n 'seek-backward-30':\n 'M16 6.75A10.25 10.25 0 1 1 7.12 11.88L9.29 13.12A7.75 7.75 0 1 0 16 9.25zM16 3.5L16 12.5L10 8zM13 13.5h2v7h-2zM10 13.5h3v2h-3zM11 16h2v2h-2zM10 18.5h3v2h-3zM16.5 13.5h5.5v7h-5.5zM18.6 15.6v2.8h1.3v-2.8z',\n 'seek-forward-30':\n 'M24.88 11.88A10.25 10.25 0 1 1 16 6.75L16 9.25A7.75 7.75 0 1 0 22.71 13.12zM16 3.5L22 8L16 12.5zM13 13.5h2v7h-2zM10 13.5h3v2h-3zM11 16h2v2h-2zM10 18.5h3v2h-3zM16.5 13.5h5.5v7h-5.5zM18.6 15.6v2.8h1.3v-2.8z',\n 'playback-speed':\n 'M7.69 26.31A11.75 11.75 0 1 1 24.31 26.31L22.54 24.54A9.25 9.25 0 1 0 9.46 24.54zM16.41 20.31L21.14 11.87L13.66 17.99z',\n 'picture-in-picture': 'M4 6h24v20H4zM6.5 8.5v15h19v-15zM15 15h8v6h-8z',\n 'picture-in-picture-exit':\n 'M4 6h24v20H4zM6.5 8.5v15h19v-15zM9.5 11.5L16 11.5L9.5 18zM13.63 13.87L19.29 19.52L17.52 21.29L11.87 15.63z',\n airplay: 'M4 6H28V23.25H23V20.75H25.5V8.5H6.5V20.75H9V23.25H4zM16 17.5L23.5 27L8.5 27z',\n 'airplay-active': 'M4 6H28V23.25H22.1L16 15.5L9.9 23.25H4zM16 17.5L23.5 27L8.5 27z',\n chapters:\n 'M5 6.5h4v4h-4zM12 7.25h15v2.5h-15zM5 14h4v4h-4zM12 14.75h15v2.5h-15zM5 21.5h4v4h-4zM12 22.25h15v2.5h-15z',\n 'fast-forward': 'M4 7L15 16L4 25zM16 7L27 16L16 25z',\n 'fast-backward': 'M28 7L17 16L28 25zM16 7L5 16L16 25z',\n 'audio-description':\n 'M1.5 23L4.8 9h2.6L10.7 23H8.4l-.75-3.2H4.55L3.8 23zM5.1 17.4h2L6.1 12.9zM12.2 9h2.8a7 7 0 0 1 0 14h-2.8zM14.6 11.4v9.2h.4a4.6 4.6 0 0 0 0-9.2zM24.2 9.96A9.4 9.4 0 0 1 24.2 22.04L22.82 20.89A7.6 7.6 0 0 0 22.82 11.11zM27.11 7.52A13.2 13.2 0 0 1 27.11 24.48L25.73 23.33A11.4 11.4 0 0 0 25.73 8.67z',\n sdh: 'M9.7 13.2L10.3 10.4L11.6 8.5L13.6 7.2L16 6.8L18.7 7.3L20.8 8.6L22.2 10.6L22.7 13L22.5 14.9L21.8 16.3L20.8 17.5L19.6 18.7L18.5 19.9L17.9 21.3L17.5 22.5L17.1 23.5L16.7 24.5L16 25.2L15.2 25.6L14.3 25.7L13.3 25.6L12.6 25.1L12 24.4L11.7 23.4L9.3 24.2L9.8 25.7L10.9 27L12.5 27.9L14.3 28.3L16 28L17.6 27.2L18.7 26L19.5 24.5L19.8 23.3L20.2 22.2L20.6 21.3L21.4 20.3L22.6 19.2L23.9 17.7L24.9 15.7L25.3 13L24.6 9.5L22.6 6.7L19.6 4.9L16 4.2L12.7 4.9L9.9 6.6L7.9 9.4L7.3 12.8zM13.7 13.2L13.9 12.1L14.4 11.4L15.1 10.9L16 10.8L16.9 10.9L17.6 11.4L18.1 12.1L18.3 13.2L20.7 12.8L20.4 11.1L19.4 9.6L17.9 8.6L16 8.2L14.1 8.6L12.6 9.6L11.6 11.1L11.3 12.8z',\n 'closed-captions':\n 'M14.24 20.24A6 6 0 1 1 14.24 11.76L12.47 13.53A3.5 3.5 0 1 0 12.47 18.47zM26.24 20.24A6 6 0 1 1 26.24 11.76L24.47 13.53A3.5 3.5 0 1 0 24.47 18.47z',\n 'text-size':\n 'M2.5 23L5.9 13L8.1 13L11.5 23zM7 16.53L7.64 18.4L6.36 18.4zM5.65 20.5L8.35 20.5L9.2 23L4.8 23zM12.5 23L19.5 6L22.5 6L29.5 23zM21 9.64L23.45 15.6L18.55 15.6zM17.48 18.2L24.52 18.2L26.5 23L15.5 23z',\n 'text-background':\n 'M4 6h24v20h-24zM9 22.5L14.6 9.5L17.4 9.5L23 22.5zM16 12.75L17.66 16.6L14.34 16.6zM13.35 18.9L18.65 18.9L20.2 22.5L11.8 22.5z',\n};\n\nconst SVG = 'http://www.w3.org/2000/svg';\n\n/** A glyph, hidden from the accessibility tree: the button it sits in carries the name. */\nexport function icon(name: IconName): SVGSVGElement {\n const svg = document.createElementNS(SVG, 'svg');\n svg.setAttribute('viewBox', '0 0 32 32');\n svg.setAttribute('aria-hidden', 'true');\n svg.setAttribute('part', 'icon');\n const path = document.createElementNS(SVG, 'path');\n path.setAttribute('fill-rule', 'evenodd');\n path.setAttribute('d', PATHS[name]);\n svg.append(path);\n return svg;\n}\n"],"mappings":";;;;;;AAkDA,MAAM,QAA4C;CAChD,MAAM;CACN,OAAO;CACP,QACE;CACF,MAAM;CACN,cACE;CACF,eACE;CACF,YACE;CACF,mBACE;CACF,SACE;CACF,OACE;CACF,WACE;CACF,gBACE;CACF,eACE;CACF,iBACE;CACF,gBACE;CACF,mBACE;CACF,kBACE;CACF,oBACE;CACF,mBACE;CACF,oBACE;CACF,mBACE;CACF,oBACE;CACF,mBACE;CACF,kBACE;CACF,sBAAsB;CACtB,2BACE;CACF,SAAS;CACT,kBAAkB;CAClB,UACE;CACF,gBAAgB;CAChB,iBAAiB;CACjB,qBACE;CACF,KAAK;CACL,mBACE;CACF,aACE;CACF,mBACE;AACJ;AAEA,MAAM,MAAM;;AAGZ,SAAgB,KAAK,MAA+B;CAClD,MAAM,MAAM,SAAS,gBAAgB,KAAK,KAAK;CAC/C,IAAI,aAAa,WAAW,WAAW;CACvC,IAAI,aAAa,eAAe,MAAM;CACtC,IAAI,aAAa,QAAQ,MAAM;CAC/B,MAAM,OAAO,SAAS,gBAAgB,KAAK,MAAM;CACjD,KAAK,aAAa,aAAa,SAAS;CACxC,KAAK,aAAa,KAAK,MAAM,KAAK;CAClC,IAAI,OAAO,IAAI;CACf,OAAO;AACT"}
@@ -3,6 +3,8 @@ export interface MenuGroup {
3
3
  readonly name: string;
4
4
  /** A heading, or none for a menu of one group. */
5
5
  readonly label?: string;
6
+ /** The label names the group for a screen reader, and no heading is drawn. */
7
+ readonly hideLabel?: boolean;
6
8
  /**
7
9
  * Each item's id, its text, a detail drawn at its end, such as a chapter's
8
10
  * time, the URL of a picture drawn at its start, and short badges drawn
@@ -11,12 +13,21 @@ export interface MenuGroup {
11
13
  readonly items: ReadonlyArray<readonly [string, string, (string | undefined)?, (string | undefined)?, (readonly string[])?]>;
12
14
  readonly value: string;
13
15
  readonly onSelect: (value: string) => void;
16
+ /**
17
+ * The badges drawn as a glyph, by their text. The text stays in the
18
+ * badge for a screen reader and as its tooltip.
19
+ */
20
+ readonly badgeGlyphs?: Readonly<Record<string, () => SVGSVGElement>>;
14
21
  }
15
22
  /** An entry that opens a page of groups, with a Back at its top. */
16
23
  export interface MenuPage {
17
24
  readonly name: string;
18
25
  readonly label: string;
19
26
  readonly entries: readonly MenuEntry[];
27
+ /** A glyph drawn before the label of the item that opens the page. */
28
+ readonly glyph?: () => SVGSVGElement;
29
+ /** A detail drawn at the end of that item, such as the value chosen on the page. */
30
+ readonly detail?: string;
20
31
  }
21
32
  export type MenuEntry = MenuGroup | MenuPage;
22
33
  export interface MenuOptions {
@@ -24,12 +35,21 @@ export interface MenuOptions {
24
35
  readonly host: HTMLElement;
25
36
  /** The picture, in viewport pixels, which the popup never leaves. */
26
37
  readonly picture: () => DOMRect | null;
38
+ /**
39
+ * The player, whose whole box a compact player's sheet fills from the
40
+ * foot. The box can be taller than the picture: a video letterboxed in
41
+ * its player leaves bars the controls sit over. The menu watches its
42
+ * size while it is open.
43
+ */
44
+ readonly frame: () => Element | null;
27
45
  /** The name of the Back item, from the page it leaves: "Back from {page}". */
28
46
  readonly back: (page: string) => string;
29
47
  }
30
48
  export interface Menu {
31
49
  readonly button: HTMLButtonElement;
32
50
  readonly popup: HTMLElement;
51
+ /** The dim over the picture behind a compact player's sheet. A press on it closes the menu. */
52
+ readonly backdrop: HTMLElement;
33
53
  /** The accessible name of the button and the popup. */
34
54
  label(text: string): void;
35
55
  /** Replaces the entries, back at the first page. */
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/controls/menu.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,SAAS;IACxB,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,aAAa,CAC3B,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC,CAC9F,CAAC;IACF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,oEAAoE;AACpE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,CAAC;CACxC;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7C,MAAM,WAAW,WAAW;IAC1B,kGAAkG;IAClG,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IACvC,8EAA8E;I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popup's top and the picture's. */
26
26
  const AIR = 8;
27
27
  /**
28
- * The tallest a popup grows, in pixels: about seven and a half rows, so
28
+ * The tallest a popup grows, in pixels: the title and about seven and a half rows, so
29
29
  * the half row at the foot says the list goes on. A page sets its own
30
30
  * with `--mbx-menu-max-height`.
31
31
  */
32
- const MAX_HEIGHT = 264;
32
+ const MAX_HEIGHT = 22;
33
33
  /** An item's picture. Decorative: the item's text names it. Loaded when the popup first shows it. */
34
34
  function picture(url) {
35
35
  const node = el("img", "item-image");
@@ -49,12 +49,30 @@ function menu(options) {
49
49
  button.setAttribute("aria-haspopup", "menu");
50
50
  button.setAttribute("aria-expanded", "false");
51
51
  const popup = el("div", "popup");
52
- popup.addEventListener("scroll", () => {
53
- more();
54
- });
55
52
  popup.setAttribute("role", "menu");
56
53
  popup.hidden = true;
54
+ const backdrop = el("div", "backdrop");
55
+ backdrop.hidden = true;
56
+ backdrop.addEventListener("click", () => {
57
+ close();
58
+ });
57
59
  let open = false;
60
+ /**
61
+ * While the menu is open it follows its player: a change of tier draws
62
+ * the page again, as a popup or as a sheet, and a change of size places
63
+ * it again. A page that resizes with a menu open sees it keep up.
64
+ */
65
+ const tiers = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
66
+ if (!open) return;
67
+ const held = popup.contains(focused());
68
+ render();
69
+ if (held) (checked() ?? items()[0])?.focus();
70
+ });
71
+ const sizes = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(() => {
72
+ if (open) fit();
73
+ });
74
+ /** Whether the page drawn last was drawn for a compact player. */
75
+ let drawnCompact = false;
58
76
  let name = "";
59
77
  let first = [];
60
78
  /** The pages opened, the first being the menu itself. */
@@ -79,19 +97,30 @@ function menu(options) {
79
97
  * left of its right edge.
80
98
  */
81
99
  function fit() {
82
- const picture = options.picture();
100
+ const compact = host.getAttribute("layout") === "compact";
101
+ const picture = compact ? options.frame()?.getBoundingClientRect() ?? null : options.picture();
102
+ backdrop.hidden = !(open && compact && picture !== null);
103
+ for (const node of [popup, backdrop]) node.style.left = node.style.bottom = node.style.width = "";
104
+ backdrop.style.height = "";
83
105
  if (picture === null) return;
106
+ if (compact) {
107
+ const box = host.getBoundingClientRect();
108
+ for (const node of [popup, backdrop]) {
109
+ node.style.left = `${picture.left - box.left}px`;
110
+ node.style.bottom = `${box.bottom - picture.bottom}px`;
111
+ node.style.width = `${picture.width}px`;
112
+ }
113
+ backdrop.style.height = `${picture.height}px`;
114
+ popup.style.maxHeight = `${Math.max(0, Math.floor(picture.height - AIR))}px`;
115
+ popup.style.maxWidth = "";
116
+ return;
117
+ }
84
118
  const room = button.getBoundingClientRect().top - picture.top - AIR;
85
- const most = Number.parseFloat(getComputedStyle(host).getPropertyValue("--mbx-menu-max-height")) || MAX_HEIGHT;
119
+ const most = Number.parseFloat(getComputedStyle(host).getPropertyValue("--mbx-menu-max-height")) || MAX_HEIGHT * (Number.parseFloat(getComputedStyle(host).fontSize) || 16);
86
120
  popup.style.maxHeight = `${Math.max(0, Math.floor(Math.min(most, room)))}px`;
87
- more();
88
121
  const wide = host.getBoundingClientRect().right - picture.left - AIR;
89
122
  popup.style.maxWidth = `${Math.max(0, Math.floor(wide))}px`;
90
123
  }
91
- /** `more` on the popup while rows wait below its foot, which then fades out. */
92
- function more() {
93
- popup.toggleAttribute("more", popup.scrollTop + popup.clientHeight < popup.scrollHeight - 1);
94
- }
95
124
  function clear() {
96
125
  for (const item of items()) {
97
126
  const handler = handlers.get(item);
@@ -113,6 +142,20 @@ function menu(options) {
113
142
  const page = stack[stack.length - 1];
114
143
  if (page === void 0) return;
115
144
  let tab = true;
145
+ drawnCompact = host.getAttribute("layout") === "compact";
146
+ if (stack.length === 1 && name !== "" && drawnCompact) {
147
+ const leave = item("item back-item", name, () => {
148
+ close();
149
+ button.focus();
150
+ });
151
+ leave.setAttribute("role", "menuitem");
152
+ leave.setAttribute("aria-label", options.back(name));
153
+ popup.append(leave);
154
+ } else if (stack.length === 1 && name !== "") {
155
+ const title = el("div", "title", name);
156
+ title.setAttribute("aria-hidden", "true");
157
+ popup.append(title);
158
+ }
116
159
  if (stack.length > 1) {
117
160
  const back = item("item back-item", page.label, () => {
118
161
  stack.pop();
@@ -132,6 +175,11 @@ function menu(options) {
132
175
  });
133
176
  link.setAttribute("role", "menuitem");
134
177
  link.setAttribute("aria-haspopup", "menu");
178
+ if (entry.glyph !== void 0) {
179
+ link.prepend(entry.glyph());
180
+ state(link, `item page-item ${entry.name}-item`, { "glyph-item": true });
181
+ }
182
+ if (entry.detail !== void 0) link.append(el("span", "item-detail", entry.detail));
135
183
  popup.append(link);
136
184
  continue;
137
185
  }
@@ -139,7 +187,7 @@ function menu(options) {
139
187
  section.setAttribute("role", "group");
140
188
  if (entry.label !== void 0) {
141
189
  section.setAttribute("aria-label", entry.label);
142
- section.append(el("div", `section-label ${entry.name}-label`, entry.label));
190
+ if (entry.hideLabel !== true) section.append(el("div", `section-label ${entry.name}-label`, entry.label));
143
191
  }
144
192
  for (const [id, text, detail, image, badges] of entry.items) {
145
193
  const choice = item(`item ${entry.name}-item`, text, () => {
@@ -147,7 +195,17 @@ function menu(options) {
147
195
  button.focus();
148
196
  entry.onSelect(id);
149
197
  });
150
- for (const badge of badges ?? []) choice.append(el("span", "item-badge", badge));
198
+ for (const badge of badges ?? []) {
199
+ const glyph = entry.badgeGlyphs?.[badge];
200
+ if (glyph === void 0) {
201
+ choice.append(el("span", "item-badge", badge));
202
+ continue;
203
+ }
204
+ const drawn = el("span", "item-badge item-glyph");
205
+ drawn.title = badge;
206
+ drawn.append(glyph(), el("span", "badge-text", badge));
207
+ choice.append(drawn);
208
+ }
151
209
  if (detail !== void 0) choice.append(el("span", "item-detail", detail));
152
210
  if (image !== void 0) {
153
211
  const [, ...rest] = choice.childNodes;
@@ -172,7 +230,10 @@ function menu(options) {
172
230
  function close() {
173
231
  if (!open) return;
174
232
  open = false;
233
+ tiers?.disconnect();
234
+ sizes?.disconnect();
175
235
  popup.hidden = true;
236
+ backdrop.hidden = true;
176
237
  button.setAttribute("aria-expanded", "false");
177
238
  host.removeAttribute("open");
178
239
  document.removeEventListener("pointerdown", outside, true);
@@ -184,10 +245,17 @@ function menu(options) {
184
245
  function show() {
185
246
  if (open) return;
186
247
  open = true;
248
+ if (host.getAttribute("layout") === "compact" !== drawnCompact) render();
187
249
  popup.hidden = false;
188
250
  button.setAttribute("aria-expanded", "true");
189
251
  host.setAttribute("open", "");
190
252
  document.addEventListener("pointerdown", outside, true);
253
+ tiers?.observe(host, {
254
+ attributes: true,
255
+ attributeFilter: ["layout"]
256
+ });
257
+ const frame = options.frame();
258
+ if (frame !== null) sizes?.observe(frame);
191
259
  fit();
192
260
  (checked() ?? items()[0])?.focus();
193
261
  }
@@ -234,6 +302,7 @@ function menu(options) {
234
302
  return {
235
303
  button,
236
304
  popup,
305
+ backdrop,
237
306
  label(text) {
238
307
  name = text;
239
308
  button.setAttribute("aria-label", text);