@bravophone/webphone 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -13
- package/dist/bravophone.mjs +352 -300
- package/dist/bravophone.umd.js +33 -10
- package/host/popup.js +1 -1
- package/host/styles/theme-fixes.css +10 -4
- package/package.json +4 -2
- package/types/index.d.ts +9 -1
|
@@ -25,12 +25,18 @@
|
|
|
25
25
|
/* 1.22:1 — idem. Usado em textos de confirmação, como o modal de sair. */
|
|
26
26
|
#app .text-black { color: var(--bp-text) !important; }
|
|
27
27
|
|
|
28
|
-
/* 2.56:1
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
/* 2.56:1 contra o fundo escuro — ilegível se deixado como está.
|
|
29
|
+
Vira accent para acompanhar text-blue-500/600, que o dark-theme.css já
|
|
30
|
+
converte em verde: usos são link do portal, badge de origem da chamada e
|
|
31
|
+
aba selecionada, todos elementos de ação. */
|
|
32
32
|
#app .text-blue-700 { color: var(--bp-accent) !important; }
|
|
33
33
|
|
|
34
|
+
/* EXCEÇÃO: a palavra "BRAVOPHONE" também usa text-blue-700, e marca não é
|
|
35
|
+
elemento de ação — pintá-la de verde descaracteriza a identidade. Ela é a
|
|
36
|
+
única ocorrência que combina a classe com tracking-wider, o que dá um
|
|
37
|
+
seletor preciso sem tocar no bundle. */
|
|
38
|
+
#app .text-blue-700.tracking-wider { color: #ffffff !important; }
|
|
39
|
+
|
|
34
40
|
/* Mesma família, fora da allowlist original. */
|
|
35
41
|
#app .text-blue-800,
|
|
36
42
|
#app .text-blue-900 { color: var(--bp-accent) !important; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bravophone/webphone",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Webphone BRAVOPHONE embutível em qualquer página web. Renderiza uma janela flutuante arrastável com todas as funcionalidades do softphone.",
|
|
5
5
|
"main": "./dist/bravophone.umd.js",
|
|
6
6
|
"module": "./dist/bravophone.mjs",
|
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
"start": "node scripts/dev-server.mjs",
|
|
32
32
|
"audit:theme": "node scripts/audit-theme.mjs",
|
|
33
33
|
"prepublishOnly": "npm run build && npm test",
|
|
34
|
-
"prepare:host": "node scripts/sync-from-extension.mjs --cdn"
|
|
34
|
+
"prepare:host": "node scripts/sync-from-extension.mjs --cdn",
|
|
35
|
+
"purge": "node scripts/purge-cdn.mjs",
|
|
36
|
+
"postpublish": "node scripts/purge-cdn.mjs"
|
|
35
37
|
},
|
|
36
38
|
"keywords": [
|
|
37
39
|
"webphone",
|
package/types/index.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ export interface BravophoneOptions {
|
|
|
43
43
|
* arraste acontece pelo próprio app. Só um botão de fechar no hover.
|
|
44
44
|
* - `'bar'`: adiciona barra com título, indicador de estado, minimizar e fechar.
|
|
45
45
|
*/
|
|
46
|
+
/**
|
|
47
|
+
* Moldura da janela. Padrão: `'bar'` — título, estado e controles visíveis.
|
|
48
|
+
* `'none'` preserva 100% da UI do webphone: sem barra, o arraste acontece
|
|
49
|
+
* pelo próprio app e só um botão de fechar aparece no hover.
|
|
50
|
+
*/
|
|
46
51
|
frame?: 'none' | 'bar'
|
|
47
52
|
/**
|
|
48
53
|
* O que arrastar até a borda superior faz. Padrão: `'max'` (gesto universal).
|
|
@@ -99,10 +104,10 @@ export interface BravophoneEvents {
|
|
|
99
104
|
'call:dialing': CallInfo
|
|
100
105
|
'call:answered': CallInfo
|
|
101
106
|
'call:ended': CallInfo
|
|
102
|
-
'call:failed': CallInfo & { reason?: string }
|
|
103
107
|
resize: { width: number; height: number; dock: Exclude<DockZone, 'float'> | null }
|
|
104
108
|
open: undefined
|
|
105
109
|
close: undefined
|
|
110
|
+
reveal: undefined
|
|
106
111
|
error: { message: string }
|
|
107
112
|
}
|
|
108
113
|
|
|
@@ -111,8 +116,11 @@ export interface BravophoneInstance {
|
|
|
111
116
|
show(): void
|
|
112
117
|
hide(): void
|
|
113
118
|
toggle(): void
|
|
119
|
+
/** Abre a janela; se já estiver aberta, traz para a vista e destaca. */
|
|
120
|
+
reveal(): void
|
|
114
121
|
readonly isOpen: boolean
|
|
115
122
|
minimize(force?: boolean): void
|
|
123
|
+
reveal(): void
|
|
116
124
|
move(x: number, y: number): void
|
|
117
125
|
resize(width: number, height: number): void
|
|
118
126
|
dock(zone: DockZone): void
|