@trismegisto/media 0.0.0-stage → 4.0.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/LICENSE +56 -0
  2. package/MIGRATION.md +831 -0
  3. package/NOTICE +14 -0
  4. package/README.md +87 -2
  5. package/dist/announce.d.ts +60 -0
  6. package/dist/announce.js +124 -0
  7. package/dist/announce.js.map +1 -0
  8. package/dist/archive.d.ts +121 -0
  9. package/dist/archive.js +413 -0
  10. package/dist/archive.js.map +1 -0
  11. package/dist/captions.d.ts +180 -0
  12. package/dist/captions.js +468 -0
  13. package/dist/captions.js.map +1 -0
  14. package/dist/controls.d.ts +79 -0
  15. package/dist/controls.js +153 -0
  16. package/dist/controls.js.map +1 -0
  17. package/dist/csv.d.ts +43 -0
  18. package/dist/csv.js +197 -0
  19. package/dist/csv.js.map +1 -0
  20. package/dist/detect.d.ts +86 -0
  21. package/dist/detect.js +597 -0
  22. package/dist/detect.js.map +1 -0
  23. package/dist/file-source.d.ts +72 -0
  24. package/dist/file-source.js +19 -0
  25. package/dist/file-source.js.map +1 -0
  26. package/dist/file-view.d.ts +77 -0
  27. package/dist/file-view.js +124 -0
  28. package/dist/file-view.js.map +1 -0
  29. package/dist/format.d.ts +29 -0
  30. package/dist/format.js +122 -0
  31. package/dist/format.js.map +1 -0
  32. package/dist/gallery.d.ts +40 -0
  33. package/dist/gallery.js +53 -0
  34. package/dist/gallery.js.map +1 -0
  35. package/dist/html-preview.d.ts +24 -0
  36. package/dist/html-preview.js +30 -0
  37. package/dist/html-preview.js.map +1 -0
  38. package/dist/image-view.d.ts +71 -0
  39. package/dist/image-view.js +158 -0
  40. package/dist/image-view.js.map +1 -0
  41. package/dist/image.d.ts +101 -0
  42. package/dist/image.js +146 -0
  43. package/dist/image.js.map +1 -0
  44. package/dist/index.d.ts +25 -0
  45. package/dist/index.js +28 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/keyboard.d.ts +101 -0
  48. package/dist/keyboard.js +144 -0
  49. package/dist/keyboard.js.map +1 -0
  50. package/dist/markdown-html.d.ts +12 -0
  51. package/dist/markdown-html.js +32 -0
  52. package/dist/markdown-html.js.map +1 -0
  53. package/dist/media-i18n.d.ts +17 -0
  54. package/dist/media-i18n.js +27 -0
  55. package/dist/media-i18n.js.map +1 -0
  56. package/dist/media-messages.d.ts +249 -0
  57. package/dist/media-messages.en.d.ts +2 -0
  58. package/dist/media-messages.en.js +218 -0
  59. package/dist/media-messages.en.js.map +1 -0
  60. package/dist/media-messages.es.d.ts +2 -0
  61. package/dist/media-messages.es.js +218 -0
  62. package/dist/media-messages.es.js.map +1 -0
  63. package/dist/media-messages.js +218 -0
  64. package/dist/media-messages.js.map +1 -0
  65. package/dist/player-view.d.ts +104 -0
  66. package/dist/player-view.js +171 -0
  67. package/dist/player-view.js.map +1 -0
  68. package/dist/player.d.ts +324 -0
  69. package/dist/player.js +1146 -0
  70. package/dist/player.js.map +1 -0
  71. package/dist/range.d.ts +75 -0
  72. package/dist/range.js +185 -0
  73. package/dist/range.js.map +1 -0
  74. package/dist/registry.d.ts +55 -0
  75. package/dist/registry.js +81 -0
  76. package/dist/registry.js.map +1 -0
  77. package/dist/text.d.ts +103 -0
  78. package/dist/text.js +192 -0
  79. package/dist/text.js.map +1 -0
  80. package/dist/thumbnail.d.ts +113 -0
  81. package/dist/thumbnail.js +332 -0
  82. package/dist/thumbnail.js.map +1 -0
  83. package/package.json +55 -6
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Atalhos de teclado do reprodutor, sem framework: a decisão de cada tecla pelo lugar do foco. Os atalhos valem só com
3
+ * o foco DENTRO do reprodutor (a casca escuta no próprio host), nunca na página inteira: dois reprodutores não disputam
4
+ * teclas e a página do app continua com os atalhos dela.
5
+ */
6
+ /** Passos de tempo e volume dos atalhos. */
7
+ export declare const MEDIA_KEY_STEPS: {
8
+ /** Setas: 5 s, o passo em que dá para reencontrar o início de uma frase sem ouvir a anterior inteira. */
9
+ readonly seekSmall: 5;
10
+ /** J/L e os botões: 10 s, o tamanho de uma frase longa de fala. */
11
+ readonly seekLarge: 10;
12
+ /** Page Up/Down no slider de posição: 1 minuto, a unidade que a pessoa usa para falar de um ponto do vídeo. */
13
+ readonly seekPage: 60;
14
+ /** ↑/↓: 10%, dez passos audivelmente diferentes do mudo ao máximo. */
15
+ readonly volume: 0.1;
16
+ /** Page Up/Down no slider de volume: 25%. */
17
+ readonly volumePage: 0.25;
18
+ };
19
+ /** Onde está o foco dentro do reprodutor. */
20
+ export type MediaKeyTarget = 'surface' | 'position' | 'volume' | 'button' | 'menu' | 'editable' | 'other';
21
+ export interface MediaKeyContext {
22
+ readonly target: MediaKeyTarget;
23
+ readonly paused: boolean;
24
+ readonly kind: 'video' | 'audio';
25
+ }
26
+ export interface MediaKeyEventLike {
27
+ readonly key: string;
28
+ readonly shiftKey?: boolean;
29
+ readonly ctrlKey?: boolean;
30
+ readonly altKey?: boolean;
31
+ readonly metaKey?: boolean;
32
+ }
33
+ export type MediaKeyAction = {
34
+ readonly type: 'toggle-play';
35
+ } | {
36
+ readonly type: 'seek-by';
37
+ readonly delta: number;
38
+ } | {
39
+ readonly type: 'seek-start';
40
+ } | {
41
+ readonly type: 'seek-end';
42
+ } | {
43
+ readonly type: 'seek-fraction';
44
+ readonly fraction: number;
45
+ } | {
46
+ readonly type: 'volume-by';
47
+ readonly delta: number;
48
+ } | {
49
+ readonly type: 'volume-to';
50
+ readonly volume: number;
51
+ } | {
52
+ readonly type: 'toggle-mute';
53
+ } | {
54
+ readonly type: 'toggle-fullscreen';
55
+ } | {
56
+ readonly type: 'toggle-captions';
57
+ } | {
58
+ readonly type: 'toggle-pip';
59
+ } | {
60
+ readonly type: 'rate-step';
61
+ readonly direction: 1 | -1;
62
+ } | {
63
+ readonly type: 'frame-step';
64
+ readonly direction: 1 | -1;
65
+ } | {
66
+ readonly type: 'escape';
67
+ } | {
68
+ readonly type: 'shortcuts';
69
+ };
70
+ /**
71
+ * Ação de uma tecla, ou `null` (a tecla segue o caminho normal: o botão ativa com Espaço, o menu trata as setas).
72
+ *
73
+ * - Espaço/K: tocar/pausar (Espaço só na superfície ou no slider de posição; num botão, Espaço ativa o botão).
74
+ * - ←/→ ±5 s; J/L ±10 s; Home/End início/fim; 0–9 vão a 0%–90%.
75
+ * - ↑/↓ volume ±10% (na superfície e no slider de volume); no slider de posição, ±5 s, como manda o padrão de slider.
76
+ * - Page Up/Down: ±60 s no slider de posição, ±25% no de volume.
77
+ * - M mudo, F tela cheia (vídeo), C legendas, P janela flutuante (vídeo), `<`/`>` velocidade, `,`/`.` quadro (pausado),
78
+ * Esc sai/fecha, `?` atalhos.
79
+ * - Com Ctrl, Alt ou Meta, nada (atalhos do navegador e do sistema). Num campo editável dentro do reprodutor, só o Esc.
80
+ * Dentro de um menu aberto, nada: o menu cuida das próprias teclas.
81
+ */
82
+ export declare function mediaKeyAction(event: MediaKeyEventLike, context: MediaKeyContext): MediaKeyAction | null;
83
+ /** O foco está num campo editável (onde tecla de uma letra é texto, não atalho)? */
84
+ export declare function isEditableTarget(element: Element | null): boolean;
85
+ /** Teclas de atalho que o diálogo "Atalhos" lista (a casca põe as descrições do catálogo). */
86
+ export declare const MEDIA_SHORTCUT_KEYS: {
87
+ readonly playPause: readonly ["Space", "K"];
88
+ readonly seekSmall: readonly ["ArrowLeft", "ArrowRight"];
89
+ readonly seekLarge: readonly ["J", "L"];
90
+ readonly startEnd: readonly ["Home", "End"];
91
+ readonly percent: readonly ["0", "9"];
92
+ readonly volume: readonly ["ArrowUp", "ArrowDown"];
93
+ readonly mute: readonly ["M"];
94
+ readonly fullscreen: readonly ["F"];
95
+ readonly captions: readonly ["C"];
96
+ readonly pip: readonly ["P"];
97
+ readonly speed: readonly ["Shift+,", "Shift+."];
98
+ readonly frame: readonly [",", "."];
99
+ readonly escape: readonly ["Escape"];
100
+ readonly help: readonly ["Shift+/"];
101
+ };
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Atalhos de teclado do reprodutor, sem framework: a decisão de cada tecla pelo lugar do foco. Os atalhos valem só com
3
+ * o foco DENTRO do reprodutor (a casca escuta no próprio host), nunca na página inteira: dois reprodutores não disputam
4
+ * teclas e a página do app continua com os atalhos dela.
5
+ */
6
+ /** Passos de tempo e volume dos atalhos. */
7
+ export const MEDIA_KEY_STEPS = {
8
+ /** Setas: 5 s, o passo em que dá para reencontrar o início de uma frase sem ouvir a anterior inteira. */
9
+ seekSmall: 5,
10
+ /** J/L e os botões: 10 s, o tamanho de uma frase longa de fala. */
11
+ seekLarge: 10,
12
+ /** Page Up/Down no slider de posição: 1 minuto, a unidade que a pessoa usa para falar de um ponto do vídeo. */
13
+ seekPage: 60,
14
+ /** ↑/↓: 10%, dez passos audivelmente diferentes do mudo ao máximo. */
15
+ volume: 0.1,
16
+ /** Page Up/Down no slider de volume: 25%. */
17
+ volumePage: 0.25,
18
+ };
19
+ /**
20
+ * Ação de uma tecla, ou `null` (a tecla segue o caminho normal: o botão ativa com Espaço, o menu trata as setas).
21
+ *
22
+ * - Espaço/K: tocar/pausar (Espaço só na superfície ou no slider de posição; num botão, Espaço ativa o botão).
23
+ * - ←/→ ±5 s; J/L ±10 s; Home/End início/fim; 0–9 vão a 0%–90%.
24
+ * - ↑/↓ volume ±10% (na superfície e no slider de volume); no slider de posição, ±5 s, como manda o padrão de slider.
25
+ * - Page Up/Down: ±60 s no slider de posição, ±25% no de volume.
26
+ * - M mudo, F tela cheia (vídeo), C legendas, P janela flutuante (vídeo), `<`/`>` velocidade, `,`/`.` quadro (pausado),
27
+ * Esc sai/fecha, `?` atalhos.
28
+ * - Com Ctrl, Alt ou Meta, nada (atalhos do navegador e do sistema). Num campo editável dentro do reprodutor, só o Esc.
29
+ * Dentro de um menu aberto, nada: o menu cuida das próprias teclas.
30
+ */
31
+ export function mediaKeyAction(event, context) {
32
+ if (event.ctrlKey || event.altKey || event.metaKey)
33
+ return null;
34
+ const { target } = context;
35
+ const key = event.key;
36
+ if (target === 'menu')
37
+ return null;
38
+ if (target === 'editable')
39
+ return key === 'Escape' ? { type: 'escape' } : null;
40
+ const video = context.kind === 'video';
41
+ switch (key) {
42
+ case ' ':
43
+ case 'Spacebar':
44
+ return target === 'surface' || target === 'position' ? { type: 'toggle-play' } : null;
45
+ case 'ArrowLeft':
46
+ case 'ArrowRight': {
47
+ const sign = key === 'ArrowLeft' ? -1 : 1;
48
+ if (target === 'volume')
49
+ return { type: 'volume-by', delta: sign * MEDIA_KEY_STEPS.volume };
50
+ return { type: 'seek-by', delta: sign * MEDIA_KEY_STEPS.seekSmall };
51
+ }
52
+ case 'ArrowUp':
53
+ case 'ArrowDown': {
54
+ const sign = key === 'ArrowDown' ? -1 : 1;
55
+ if (target === 'position')
56
+ return { type: 'seek-by', delta: sign * MEDIA_KEY_STEPS.seekSmall };
57
+ if (target === 'surface' || target === 'volume')
58
+ return { type: 'volume-by', delta: sign * MEDIA_KEY_STEPS.volume };
59
+ return null;
60
+ }
61
+ case 'PageUp':
62
+ case 'PageDown': {
63
+ const sign = key === 'PageDown' ? -1 : 1;
64
+ if (target === 'position')
65
+ return { type: 'seek-by', delta: sign * MEDIA_KEY_STEPS.seekPage };
66
+ if (target === 'volume')
67
+ return { type: 'volume-by', delta: sign * MEDIA_KEY_STEPS.volumePage };
68
+ return null;
69
+ }
70
+ case 'Home':
71
+ if (target === 'volume')
72
+ return { type: 'volume-to', volume: 0 };
73
+ return { type: 'seek-start' };
74
+ case 'End':
75
+ if (target === 'volume')
76
+ return { type: 'volume-to', volume: 1 };
77
+ return { type: 'seek-end' };
78
+ case 'Escape':
79
+ return { type: 'escape' };
80
+ case '?':
81
+ return { type: 'shortcuts' };
82
+ case '<':
83
+ return { type: 'rate-step', direction: -1 };
84
+ case '>':
85
+ return { type: 'rate-step', direction: 1 };
86
+ case ',':
87
+ return video && context.paused ? { type: 'frame-step', direction: -1 } : null;
88
+ case '.':
89
+ return video && context.paused ? { type: 'frame-step', direction: 1 } : null;
90
+ default:
91
+ break;
92
+ }
93
+ if (/^[0-9]$/.test(key) && !event.shiftKey)
94
+ return { type: 'seek-fraction', fraction: Number(key) / 10 };
95
+ switch (key.toLowerCase()) {
96
+ case 'k':
97
+ return { type: 'toggle-play' };
98
+ case 'j':
99
+ return { type: 'seek-by', delta: -MEDIA_KEY_STEPS.seekLarge };
100
+ case 'l':
101
+ return { type: 'seek-by', delta: MEDIA_KEY_STEPS.seekLarge };
102
+ case 'm':
103
+ return { type: 'toggle-mute' };
104
+ case 'f':
105
+ return video ? { type: 'toggle-fullscreen' } : null;
106
+ case 'c':
107
+ return { type: 'toggle-captions' };
108
+ case 'p':
109
+ return video ? { type: 'toggle-pip' } : null;
110
+ default:
111
+ return null;
112
+ }
113
+ }
114
+ /** O foco está num campo editável (onde tecla de uma letra é texto, não atalho)? */
115
+ export function isEditableTarget(element) {
116
+ if (!element)
117
+ return false;
118
+ const tag = element.tagName;
119
+ if (tag === 'TEXTAREA' || tag === 'SELECT')
120
+ return true;
121
+ if (tag === 'INPUT') {
122
+ const type = element.type;
123
+ return !['button', 'checkbox', 'radio', 'range', 'reset', 'submit', 'image', 'color', 'file'].includes(type);
124
+ }
125
+ return element.isContentEditable === true || element.getAttribute('contenteditable') === 'true';
126
+ }
127
+ /** Teclas de atalho que o diálogo "Atalhos" lista (a casca põe as descrições do catálogo). */
128
+ export const MEDIA_SHORTCUT_KEYS = {
129
+ playPause: ['Space', 'K'],
130
+ seekSmall: ['ArrowLeft', 'ArrowRight'],
131
+ seekLarge: ['J', 'L'],
132
+ startEnd: ['Home', 'End'],
133
+ percent: ['0', '9'],
134
+ volume: ['ArrowUp', 'ArrowDown'],
135
+ mute: ['M'],
136
+ fullscreen: ['F'],
137
+ captions: ['C'],
138
+ pip: ['P'],
139
+ speed: ['Shift+,', 'Shift+.'],
140
+ frame: [',', '.'],
141
+ escape: ['Escape'],
142
+ help: ['Shift+/'],
143
+ };
144
+ //# sourceMappingURL=keyboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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AAC,KAAK,MAAM,CAAC;AACnH,CAAC;AAED,8FAA8F;AAC9F,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC;IACzB,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;IACtC,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;IACzB,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IACnB,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,IAAI,EAAE,CAAC,GAAG,CAAC;IACX,UAAU,EAAE,CAAC,GAAG,CAAC;IACjB,QAAQ,EAAE,CAAC,GAAG,CAAC;IACf,GAAG,EAAE,CAAC,GAAG,CAAC;IACV,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IAC7B,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IACjB,MAAM,EAAE,CAAC,QAAQ,CAAC;IAClB,IAAI,EAAE,CAAC,SAAS,CAAC;CACT,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Pós-processo do HTML de Markdown JÁ SANEADO (o saneamento é do renderizador que o app liga): imagens remotas não
3
+ * carregam por padrão (evitam rastreio e pedidos a outros domínios) — viram um link com o texto alternativo — e todo
4
+ * link abre em nova aba com `rel="noopener noreferrer"`. Usa só a API de DOM (`<template>`), sem framework.
5
+ */
6
+ export interface MarkdownHtmlOptions {
7
+ /** Carregar imagens de outros endereços (padrão `false`). `data:` e `blob:` sempre carregam. */
8
+ readonly remoteImages?: boolean;
9
+ readonly document?: Document;
10
+ }
11
+ /** HTML com as imagens remotas trocadas por links e os links abrindo em nova aba sem referência. */
12
+ export declare function secureMarkdownHtml(html: string, options?: MarkdownHtmlOptions): string;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Pós-processo do HTML de Markdown JÁ SANEADO (o saneamento é do renderizador que o app liga): imagens remotas não
3
+ * carregam por padrão (evitam rastreio e pedidos a outros domínios) — viram um link com o texto alternativo — e todo
4
+ * link abre em nova aba com `rel="noopener noreferrer"`. Usa só a API de DOM (`<template>`), sem framework.
5
+ */
6
+ const LOCAL_IMAGE = /^(data:image\/|blob:)/i;
7
+ /** HTML com as imagens remotas trocadas por links e os links abrindo em nova aba sem referência. */
8
+ export function secureMarkdownHtml(html, options = {}) {
9
+ const doc = options.document ?? (typeof document === 'undefined' ? null : document);
10
+ if (!doc || !html)
11
+ return html;
12
+ const template = doc.createElement('template');
13
+ template.innerHTML = html;
14
+ const root = template.content;
15
+ if (!options.remoteImages) {
16
+ for (const img of Array.from(root.querySelectorAll('img'))) {
17
+ const src = img.getAttribute('src') ?? '';
18
+ if (LOCAL_IMAGE.test(src.trim()))
19
+ continue;
20
+ const link = doc.createElement('a');
21
+ link.setAttribute('href', src);
22
+ link.textContent = img.getAttribute('alt') || src;
23
+ img.replaceWith(link);
24
+ }
25
+ }
26
+ for (const link of Array.from(root.querySelectorAll('a[href]'))) {
27
+ link.setAttribute('target', '_blank');
28
+ link.setAttribute('rel', 'noopener noreferrer');
29
+ }
30
+ return template.innerHTML;
31
+ }
32
+ //# sourceMappingURL=markdown-html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-html.js","sourceRoot":"","sources":["../src/markdown-html.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAE7C,oGAAoG;AACpG,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,UAA+B,EAAE;IAChF,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,IAAI,CAAC,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpF,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC;IAC9B,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAC1B,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC3D,MAAM,GAAG,GAAG,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC1C,IAAI,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;gBAAE,SAAS;YAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAC/B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;YAClD,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;QAChE,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,QAAQ,CAAC,SAAS,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type CatalogOverride } from '@trismegisto/primitives/messages';
2
+ import { type MediaMessages } from './media-messages';
3
+ export type MediaMessagesOverride = CatalogOverride<MediaMessages>;
4
+ export interface MediaI18nConfig {
5
+ /** Catálogos extras ou substitutos, por idioma (mesmas chaves de `MediaMessages`). */
6
+ readonly catalogs?: Readonly<Record<string, MediaMessages>>;
7
+ /** Textos avulsos sobrescritos por cima do catálogo ativo, em qualquer idioma. */
8
+ readonly override?: MediaMessagesOverride;
9
+ }
10
+ /** pt-BR, en e es, embutidos. */
11
+ export declare const MEDIA_CATALOGS: Readonly<Record<string, MediaMessages>>;
12
+ /** Os embutidos com os catálogos da configuração por cima. */
13
+ export declare function mediaCatalogs(config?: MediaI18nConfig): Readonly<Record<string, MediaMessages>>;
14
+ /** Aplica a sobrescrita da configuração ao catálogo do idioma ativo. */
15
+ export declare function resolveMediaMessages(base: MediaMessages, config?: MediaI18nConfig): MediaMessages;
16
+ /** Sobrescrita parcial de uma instância (input `texts`) por cima do catálogo ativo. */
17
+ export declare function withMediaTexts(base: MediaMessages, texts: MediaMessagesOverride | null | undefined): MediaMessages;
@@ -0,0 +1,27 @@
1
+ // Catálogos embutidos do visualizador por idioma e a sobrescrita do app, sem framework. A casca (Angular, React) escolhe o
2
+ // idioma ativo com o `pick` do i18n da lib e aplica a sobrescrita com `resolveMediaMessages`.
3
+ import { mergeCatalog } from '@trismegisto/primitives/messages';
4
+ import { MEDIA_MESSAGES_EN } from './media-messages.en';
5
+ import { MEDIA_MESSAGES_ES } from './media-messages.es';
6
+ import { MEDIA_MESSAGES_PT_BR } from './media-messages';
7
+ /** pt-BR, en e es, embutidos. */
8
+ export const MEDIA_CATALOGS = {
9
+ 'pt-BR': MEDIA_MESSAGES_PT_BR,
10
+ pt: MEDIA_MESSAGES_PT_BR,
11
+ en: MEDIA_MESSAGES_EN,
12
+ 'en-US': MEDIA_MESSAGES_EN,
13
+ es: MEDIA_MESSAGES_ES,
14
+ };
15
+ /** Os embutidos com os catálogos da configuração por cima. */
16
+ export function mediaCatalogs(config = {}) {
17
+ return { ...MEDIA_CATALOGS, ...config.catalogs };
18
+ }
19
+ /** Aplica a sobrescrita da configuração ao catálogo do idioma ativo. */
20
+ export function resolveMediaMessages(base, config = {}) {
21
+ return config.override ? mergeCatalog(config.override, base) : base;
22
+ }
23
+ /** Sobrescrita parcial de uma instância (input `texts`) por cima do catálogo ativo. */
24
+ export function withMediaTexts(base, texts) {
25
+ return texts && Object.keys(texts).length ? mergeCatalog(texts, base) : base;
26
+ }
27
+ //# sourceMappingURL=media-i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-i18n.js","sourceRoot":"","sources":["../src/media-i18n.ts"],"names":[],"mappings":"AAAA,2HAA2H;AAC3H,8FAA8F;AAC9F,OAAO,EAAwB,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAsB,MAAM,kBAAkB,CAAC;AAW5E,iCAAiC;AACjC,MAAM,CAAC,MAAM,cAAc,GAA4C;IACrE,OAAO,EAAE,oBAAoB;IAC7B,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,iBAAiB;IACrB,OAAO,EAAE,iBAAiB;IAC1B,EAAE,EAAE,iBAAiB;CACtB,CAAC;AAEF,8DAA8D;AAC9D,MAAM,UAAU,aAAa,CAAC,SAA0B,EAAE;IACxD,OAAO,EAAE,GAAG,cAAc,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;AACnD,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,oBAAoB,CAAC,IAAmB,EAAE,SAA0B,EAAE;IACpF,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACtE,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,cAAc,CAAC,IAAmB,EAAE,KAA+C;IACjG,OAAO,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,249 @@
1
+ import type { PluralMessage } from '@trismegisto/primitives/i18n';
2
+ import type { FileKind } from './detect';
3
+ /**
4
+ * Textos do `@trismegisto/media`: o que o visualizador e o reprodutor escrevem na tela e anunciam. Texto com variável é
5
+ * template nomeado; contagem é `PluralMessage`. O tempo falado ("1 minuto e 5 segundos") sai do `Intl` (unidades e
6
+ * lista), sem texto aqui.
7
+ */
8
+ export interface MediaMessages {
9
+ readonly meta: {
10
+ readonly locale: string;
11
+ };
12
+ /** Nome de cada família (cartões, rótulos). */
13
+ readonly kinds: Readonly<Record<FileKind, string>>;
14
+ readonly formats: {
15
+ /** Compactado de várias extensões: `{inner}` é o formato de dentro ("TAR comprimido"). */
16
+ readonly compressed: string;
17
+ };
18
+ readonly viewer: {
19
+ /** Nome do corpo do visualizador: `{name}` é o nome do arquivo. */
20
+ readonly label: string;
21
+ readonly loading: string;
22
+ /** Anúncio de carregamento demorado. */
23
+ readonly loadingNamed: string;
24
+ readonly actions: string;
25
+ readonly tooLarge: string;
26
+ /** `{size}` do arquivo e `{limit}` do tipo. */
27
+ readonly tooLargeDetail: string;
28
+ readonly tooLargeImage: string;
29
+ /** Imagem grande demais: `{width}`×`{height}` em pixels. */
30
+ readonly tooLargeImageDetail: string;
31
+ readonly showStart: string;
32
+ /** Faixa do trecho: `{shown}` lidos de `{size}`. */
33
+ readonly showingStart: string;
34
+ readonly excerptMark: string;
35
+ readonly unsupported: string;
36
+ readonly unsupportedFormat: string;
37
+ readonly binary: string;
38
+ readonly forbidden: string;
39
+ readonly missing: string;
40
+ readonly expired: string;
41
+ readonly refresh: string;
42
+ readonly error: string;
43
+ readonly errorNetwork: string;
44
+ readonly retry: string;
45
+ readonly empty: string;
46
+ readonly size: string;
47
+ readonly type: string;
48
+ readonly unknownSize: string;
49
+ };
50
+ readonly text: {
51
+ /** `{encoding}` presumida. */
52
+ readonly presumedEncoding: string;
53
+ readonly encoding: string;
54
+ /** `{line}`/`{column}` do erro. */
55
+ readonly invalidJson: string;
56
+ readonly invalidJsonLine: string;
57
+ readonly invalidJsonUnknown: string;
58
+ readonly view: string;
59
+ readonly formatted: string;
60
+ readonly source: string;
61
+ readonly tree: string;
62
+ readonly markdownUnavailable: string;
63
+ /** Vista do HTML renderizado numa moldura sem scripts. */
64
+ readonly rendered: string;
65
+ readonly noScripts: string;
66
+ };
67
+ readonly image: {
68
+ /** `{name}` do arquivo. */
69
+ readonly label: string;
70
+ readonly toolbar: string;
71
+ readonly zoomIn: string;
72
+ readonly zoomOut: string;
73
+ readonly fit: string;
74
+ readonly actualSize: string;
75
+ readonly rotateLeft: string;
76
+ readonly rotateRight: string;
77
+ /** `{percent}` do zoom atual. */
78
+ readonly zoomValue: string;
79
+ readonly playAnimation: string;
80
+ readonly pauseAnimation: string;
81
+ /** O navegador não decodifica o formato: `{format}`. */
82
+ readonly unsupported: string;
83
+ };
84
+ readonly preview: {
85
+ /** Rótulo da miniatura com `label`: `{name}` e o `{kind}`. */
86
+ readonly label: string;
87
+ };
88
+ readonly player: {
89
+ readonly videoLabel: string;
90
+ readonly audioLabel: string;
91
+ readonly videoUntitled: string;
92
+ readonly audioUntitled: string;
93
+ readonly controls: string;
94
+ readonly surfaceHint: string;
95
+ readonly play: string;
96
+ readonly pause: string;
97
+ readonly replay: string;
98
+ readonly back: PluralMessage;
99
+ readonly forward: PluralMessage;
100
+ readonly position: string;
101
+ /** `{current}` de `{duration}`, por extenso. */
102
+ readonly positionValue: string;
103
+ readonly volume: string;
104
+ readonly mute: string;
105
+ readonly unmute: string;
106
+ readonly speed: string;
107
+ /** Botão de velocidade: `{rate}`. */
108
+ readonly speedButton: string;
109
+ /** Valor da velocidade: `{rate}` formatado no idioma. */
110
+ readonly rate: string;
111
+ readonly captions: string;
112
+ readonly captionsOff: string;
113
+ /** Item do menu de legendas que abre o diálogo de aparência. */
114
+ readonly captionsAppearance: string;
115
+ readonly appearance: {
116
+ readonly title: string;
117
+ readonly size: string;
118
+ readonly background: string;
119
+ readonly backgroundOpaque: string;
120
+ readonly backgroundTranslucent: string;
121
+ readonly backgroundNone: string;
122
+ readonly color: string;
123
+ readonly colorLight: string;
124
+ readonly colorDark: string;
125
+ readonly colorYellow: string;
126
+ readonly outline: string;
127
+ /** Texto de exemplo da prévia. */
128
+ readonly sample: string;
129
+ readonly reset: string;
130
+ };
131
+ readonly chapters: string;
132
+ /** Posição dentro de um capítulo: `{position}` por extenso e o `{chapter}`. */
133
+ readonly chapterValue: string;
134
+ readonly transcript: {
135
+ readonly title: string;
136
+ readonly show: string;
137
+ readonly hide: string;
138
+ readonly loading: string;
139
+ readonly empty: string;
140
+ /** Botão de cada fala: `{time}` por extenso e o `{text}`. */
141
+ readonly goTo: string;
142
+ };
143
+ readonly pip: string;
144
+ readonly pipExit: string;
145
+ readonly fullscreen: string;
146
+ readonly fullscreenExit: string;
147
+ readonly more: string;
148
+ readonly shortcuts: string;
149
+ readonly close: string;
150
+ readonly buffering: string;
151
+ readonly live: string;
152
+ readonly announce: {
153
+ readonly playing: string;
154
+ readonly paused: string;
155
+ readonly ended: string;
156
+ /** `{language}` da faixa ligada. */
157
+ readonly captionsOn: string;
158
+ readonly captionsOff: string;
159
+ /** `{rate}` já formatada. */
160
+ readonly speed: string;
161
+ readonly fullscreenOn: string;
162
+ readonly fullscreenOff: string;
163
+ readonly pipOn: string;
164
+ readonly pipOff: string;
165
+ /** `{percent}` já formatado. */
166
+ readonly volume: string;
167
+ readonly muted: string;
168
+ /** `{time}` por extenso. */
169
+ readonly seek: string;
170
+ };
171
+ readonly errors: {
172
+ readonly network: string;
173
+ readonly decode: string;
174
+ /** `{format}` do arquivo. */
175
+ readonly unsupported: string;
176
+ readonly unsupportedUnknown: string;
177
+ readonly streaming: string;
178
+ readonly expired: string;
179
+ readonly blocked: string;
180
+ readonly audioOnly: string;
181
+ readonly slowRange: string;
182
+ };
183
+ readonly retry: string;
184
+ readonly refresh: string;
185
+ readonly keys: {
186
+ readonly playPause: string;
187
+ readonly seekSmall: string;
188
+ readonly seekLarge: string;
189
+ readonly startEnd: string;
190
+ readonly percent: string;
191
+ readonly volume: string;
192
+ readonly mute: string;
193
+ readonly fullscreen: string;
194
+ readonly captions: string;
195
+ readonly pip: string;
196
+ readonly speed: string;
197
+ readonly frame: string;
198
+ readonly escape: string;
199
+ readonly help: string;
200
+ };
201
+ };
202
+ readonly gallery: {
203
+ readonly label: string;
204
+ /** `{index}` de `{count}`. */
205
+ readonly position: string;
206
+ readonly previous: string;
207
+ readonly next: string;
208
+ readonly close: string;
209
+ /** Troca de item: `{name}`, `{index}` de `{count}`. */
210
+ readonly announce: string;
211
+ };
212
+ readonly csv: {
213
+ readonly view: string;
214
+ readonly table: string;
215
+ readonly text: string;
216
+ readonly delimiter: string;
217
+ readonly comma: string;
218
+ readonly semicolon: string;
219
+ readonly tab: string;
220
+ readonly pipe: string;
221
+ readonly header: string;
222
+ /** Coluna sem nome: `{index}`. */
223
+ readonly column: string;
224
+ /** `{name}` do arquivo (nome da tabela). */
225
+ readonly caption: string;
226
+ readonly irregular: PluralMessage;
227
+ readonly truncated: PluralMessage;
228
+ };
229
+ readonly archive: {
230
+ /** `{name}` do arquivo. */
231
+ readonly label: string;
232
+ readonly summary: PluralMessage;
233
+ readonly size: string;
234
+ readonly compressed: string;
235
+ readonly modified: string;
236
+ readonly encrypted: string;
237
+ readonly suspicious: string;
238
+ readonly folder: string;
239
+ readonly comment: string;
240
+ readonly empty: string;
241
+ readonly corrupt: string;
242
+ /** Diretório central grande demais: `{count}` itens. */
243
+ readonly tooMany: string;
244
+ readonly noRange: string;
245
+ /** Só metadados (TAR comprimido, 7Z, RAR...). */
246
+ readonly metadataOnly: string;
247
+ };
248
+ }
249
+ export declare const MEDIA_MESSAGES_PT_BR: MediaMessages;
@@ -0,0 +1,2 @@
1
+ import type { MediaMessages } from './media-messages';
2
+ export declare const MEDIA_MESSAGES_EN: MediaMessages;