plugin-gentleman 1.0.7 → 1.0.9
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/ascii-frames.ts +19 -19
- package/components.tsx +13 -38
- package/package.json +11 -3
- package/phrases.ts +17 -0
package/ascii-frames.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
export const eyeNeutralCenter = [
|
|
10
10
|
" █████ █████ ", // 27 chars
|
|
11
11
|
" ██░░░░░██ ██░░░░░██ ", // 27 chars
|
|
12
|
-
" ██░░███░░██ ██░░░░░░░██ ", // 27 chars
|
|
13
|
-
" ██░░███░░██ ██░░░░░░░██ ", // 27 chars
|
|
12
|
+
" ██░░███░░██ ██░░░░░░░██ ", // 27 chars - pupils center
|
|
13
|
+
" ██░░███░░██ ██░░░░░░░██ ", // 27 chars - pupils center
|
|
14
14
|
"██ ██░░░░░██ ██░░░░░██ ██", // 27 chars
|
|
15
15
|
]
|
|
16
16
|
|
|
@@ -33,31 +33,31 @@ export const eyeNeutralDown = [
|
|
|
33
33
|
export const eyeNeutralLeft = [
|
|
34
34
|
" █████ █████ ", // 27 chars
|
|
35
35
|
" ██░░░░░██ ██░░░░░██ ", // 27 chars
|
|
36
|
-
" ██████░░░██ ██░░░░░░░██ ", // 27 chars
|
|
37
|
-
" ██████░░░██ ██░░░░░░░██ ", // 27 chars
|
|
36
|
+
" ██████░░░██ ██░░░░░░░██ ", // 27 chars - pupils left
|
|
37
|
+
" ██████░░░██ ██░░░░░░░██ ", // 27 chars - pupils left
|
|
38
38
|
"██ ██░░░░░██ ██░░░░░██ ██", // 27 chars
|
|
39
39
|
]
|
|
40
40
|
|
|
41
41
|
export const eyeNeutralRight = [
|
|
42
42
|
" █████ █████ ", // 27 chars
|
|
43
43
|
" ██░░░░░██ ██░░░░░██ ", // 27 chars
|
|
44
|
-
" ██░░░██████ ██░░░░░░░██ ", // 27 chars
|
|
45
|
-
" ██░░░██████ ██░░░░░░░██ ", // 27 chars
|
|
44
|
+
" ██░░░██████ ██░░░░░░░██ ", // 27 chars - pupils right
|
|
45
|
+
" ██░░░██████ ██░░░░░░░██ ", // 27 chars - pupils right
|
|
46
46
|
"██ ██░░░░░██ ██░░░░░██ ██", // 27 chars
|
|
47
47
|
]
|
|
48
48
|
|
|
49
49
|
export const eyeNeutralUpLeft = [
|
|
50
50
|
" █████ █████ ", // 27 chars
|
|
51
51
|
" ███████░██ ██░░░░░██ ", // 27 chars - up-left diagonal
|
|
52
|
-
" ████████░██ ██░░░░░░░██ ", // 27 chars
|
|
52
|
+
" ████████░██ ██░░░░░░░██ ", // 27 chars - up-left diagonal
|
|
53
53
|
" ██░░░░░░░██ ██░░░░░░░██ ", // 27 chars
|
|
54
54
|
"██ ██░░░░░██ ██░░░░░██ ██", // 27 chars
|
|
55
55
|
]
|
|
56
56
|
|
|
57
57
|
export const eyeNeutralUpRight = [
|
|
58
58
|
" █████ █████ ", // 27 chars
|
|
59
|
-
" ██░░░░░██
|
|
60
|
-
" ██░░░░░░░██
|
|
59
|
+
" ██░███████ ██░░░░░██ ", // 27 chars - up-right diagonal
|
|
60
|
+
" ██░████████ ██░░░░░░░██ ", // 27 chars - up-right diagonal
|
|
61
61
|
" ██░░░░░░░██ ██░░░░░░░██ ", // 27 chars
|
|
62
62
|
"██ ██░░░░░██ ██░░░░░██ ██", // 27 chars
|
|
63
63
|
]
|
|
@@ -67,7 +67,7 @@ export const eyeNeutralDownLeft = [
|
|
|
67
67
|
" ██░░░░░██ ██░░░░░██ ", // 27 chars
|
|
68
68
|
" ██░░░░░░░██ ██░░░░░░░██ ", // 27 chars
|
|
69
69
|
" ███████░░██ ██░░░░░░░██ ", // 27 chars - down-left diagonal
|
|
70
|
-
"██ ████████░█ ██░░░░░██ ██", // 27 chars
|
|
70
|
+
"██ ████████░█ ██░░░░░██ ██", // 27 chars - down-left diagonal
|
|
71
71
|
]
|
|
72
72
|
|
|
73
73
|
export const eyeNeutralDownRight = [
|
|
@@ -75,7 +75,7 @@ export const eyeNeutralDownRight = [
|
|
|
75
75
|
" ██░░░░░██ ██░░░░░██ ", // 27 chars
|
|
76
76
|
" ██░░░░░░░██ ██░░░░░░░██ ", // 27 chars
|
|
77
77
|
" ██░░░███████ ██░░░░░░░██ ", // 27 chars - down-right diagonal
|
|
78
|
-
"██ ██░░░░░██
|
|
78
|
+
"██ ██░████████ ██░░░░░██ ██", // 27 chars - down-right diagonal
|
|
79
79
|
]
|
|
80
80
|
|
|
81
81
|
// Squinted eyes version for busy/expressive state
|
|
@@ -90,7 +90,7 @@ export const eyeSquinted = [
|
|
|
90
90
|
// Blink frames - half closed (upper eyelid descending from top)
|
|
91
91
|
export const eyeBlinkHalf = [
|
|
92
92
|
" █████ █████ ", // 27 chars - monocle border top unchanged
|
|
93
|
-
" ██████████
|
|
93
|
+
" █████████ ██████████ ", // 27 chars - upper eyelid descends halfway
|
|
94
94
|
" ██░░███░░██ ██░░░░░░░██ ", // 27 chars - pupils still visible
|
|
95
95
|
" ██░░███░░██ ██░░░░░░░██ ", // 27 chars - pupils still visible
|
|
96
96
|
"██ ██░░░░░██ ██░░░░░██ ██", // 27 chars - bottom unchanged
|
|
@@ -99,19 +99,19 @@ export const eyeBlinkHalf = [
|
|
|
99
99
|
// Blink frames - fully closed (upper eyelid fully descended)
|
|
100
100
|
export const eyeBlinkClosed = [
|
|
101
101
|
" █████ █████ ", // 27 chars - monocle border top unchanged
|
|
102
|
-
" ██████████
|
|
103
|
-
" ██████████
|
|
102
|
+
" █████████ ██████████ ", // 27 chars - upper eyelid down
|
|
103
|
+
" █████████ ██████████ ", // 27 chars - eyes fully closed
|
|
104
104
|
" █████████ █████████ ", // 27 chars - bottom transition
|
|
105
105
|
"██ █████ █████ ██", // 27 chars - bottom unchanged
|
|
106
106
|
]
|
|
107
107
|
|
|
108
108
|
// Mustache section (all lines padded to 27 chars for alignment)
|
|
109
109
|
export const mustachiMustacheSection = [
|
|
110
|
-
"
|
|
111
|
-
"████████████
|
|
112
|
-
"
|
|
113
|
-
" ▓██████████
|
|
114
|
-
"
|
|
110
|
+
"███████████ ███████████", // 27 chars - perfectly symmetric
|
|
111
|
+
"████████████ ████████████", // 27 chars - perfectly symmetric
|
|
112
|
+
" █████████████████████████ ", // 27 chars - perfectly symmetric
|
|
113
|
+
" ▓██████████ ██████████▓ ", // 27 chars - perfectly symmetric
|
|
114
|
+
" ▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓ ", // 27 chars - perfectly symmetric
|
|
115
115
|
]
|
|
116
116
|
|
|
117
117
|
// Tongue animation frames (progressive) - compact design
|
package/components.tsx
CHANGED
|
@@ -54,9 +54,7 @@ export const SidebarMustachi = (props: { theme: TuiThemeCurrent; config: Cfg; is
|
|
|
54
54
|
const [pupilIndex, setPupilIndex] = createSignal(0)
|
|
55
55
|
const [blinkFrame, setBlinkFrame] = createSignal(0)
|
|
56
56
|
const [tongueFrame, setTongueFrame] = createSignal(0)
|
|
57
|
-
const [
|
|
58
|
-
const [busyPhrases2, setBusyPhrases2] = createSignal("")
|
|
59
|
-
const [busyPhrases3, setBusyPhrases3] = createSignal("")
|
|
57
|
+
const [busyPhrase, setBusyPhrase] = createSignal("")
|
|
60
58
|
const [expressiveCycle, setExpressiveCycle] = createSignal(false)
|
|
61
59
|
|
|
62
60
|
// Animation: pupil movement (look around) - random transitions, not a sequence
|
|
@@ -109,14 +107,12 @@ export const SidebarMustachi = (props: { theme: TuiThemeCurrent; config: Cfg; is
|
|
|
109
107
|
onCleanup(() => clearInterval(interval))
|
|
110
108
|
})
|
|
111
109
|
|
|
112
|
-
// Busy/expressive state animation: tongue +
|
|
110
|
+
// Busy/expressive state animation: tongue + single rotating phrase
|
|
113
111
|
// If isBusy is reliably reactive, use it; otherwise demonstrate expressiveness periodically
|
|
114
112
|
createEffect(() => {
|
|
115
113
|
if (!props.config.animations) {
|
|
116
114
|
setTongueFrame(0)
|
|
117
|
-
|
|
118
|
-
setBusyPhrases2("")
|
|
119
|
-
setBusyPhrases3("")
|
|
115
|
+
setBusyPhrase("")
|
|
120
116
|
setExpressiveCycle(false)
|
|
121
117
|
return
|
|
122
118
|
}
|
|
@@ -125,9 +121,7 @@ export const SidebarMustachi = (props: { theme: TuiThemeCurrent; config: Cfg; is
|
|
|
125
121
|
|
|
126
122
|
if (!shouldShowExpression) {
|
|
127
123
|
setTongueFrame(0)
|
|
128
|
-
|
|
129
|
-
setBusyPhrases2("")
|
|
130
|
-
setBusyPhrases3("")
|
|
124
|
+
setBusyPhrase("")
|
|
131
125
|
return
|
|
132
126
|
}
|
|
133
127
|
|
|
@@ -142,29 +136,16 @@ export const SidebarMustachi = (props: { theme: TuiThemeCurrent; config: Cfg; is
|
|
|
142
136
|
}
|
|
143
137
|
tongueTimeoutId = setTimeout(growTongue, 200)
|
|
144
138
|
|
|
145
|
-
// Pick
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
return shuffled.slice(0, count)
|
|
139
|
+
// Pick a random phrase and rotate through the library
|
|
140
|
+
const pickRandomPhrase = () => {
|
|
141
|
+
const randomIndex = Math.floor(Math.random() * busyPhrases.length)
|
|
142
|
+
return busyPhrases[randomIndex]
|
|
150
143
|
}
|
|
151
144
|
|
|
152
|
-
|
|
153
|
-
let phraseIdx = 0
|
|
154
|
-
setBusyPhrases1(phraseSet[0] || "")
|
|
155
|
-
setBusyPhrases2(phraseSet[1] || "")
|
|
156
|
-
setBusyPhrases3(phraseSet[2] || "")
|
|
145
|
+
setBusyPhrase(pickRandomPhrase())
|
|
157
146
|
|
|
158
147
|
const interval = setInterval(() => {
|
|
159
|
-
|
|
160
|
-
if (phraseIdx >= phraseSet.length) {
|
|
161
|
-
// Refresh the phrase set
|
|
162
|
-
phraseSet = pickRandomPhrases()
|
|
163
|
-
phraseIdx = 0
|
|
164
|
-
}
|
|
165
|
-
setBusyPhrases1(phraseSet[0] || "")
|
|
166
|
-
setBusyPhrases2(phraseSet[1] || "")
|
|
167
|
-
setBusyPhrases3(phraseSet[2] || "")
|
|
148
|
+
setBusyPhrase(pickRandomPhrase())
|
|
168
149
|
}, 3000)
|
|
169
150
|
|
|
170
151
|
onCleanup(() => {
|
|
@@ -254,15 +235,9 @@ export const SidebarMustachi = (props: { theme: TuiThemeCurrent; config: Cfg; is
|
|
|
254
235
|
return <text fg={color}>{paddedLine}</text>
|
|
255
236
|
})}
|
|
256
237
|
|
|
257
|
-
{/* Display
|
|
258
|
-
{
|
|
259
|
-
<text fg={props.theme.warning}>{
|
|
260
|
-
)}
|
|
261
|
-
{busyPhrases2() && (
|
|
262
|
-
<text fg={props.theme.warning}>{busyPhrases2()}</text>
|
|
263
|
-
)}
|
|
264
|
-
{busyPhrases3() && (
|
|
265
|
-
<text fg={props.theme.warning}>{busyPhrases3()}</text>
|
|
238
|
+
{/* Display single busy phrase if loading */}
|
|
239
|
+
{busyPhrase() && (
|
|
240
|
+
<text fg={props.theme.warning}>{busyPhrase()}</text>
|
|
266
241
|
)}
|
|
267
242
|
|
|
268
243
|
<text> </text>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "plugin-gentleman",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"description": "OpenCode TUI plugin featuring Mustachi - an animated ASCII mascot with eyes, mustache, and optional motivational phrases during busy states",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -36,7 +36,15 @@
|
|
|
36
36
|
"@opentui/solid": "*",
|
|
37
37
|
"solid-js": "*"
|
|
38
38
|
},
|
|
39
|
-
"keywords": [
|
|
39
|
+
"keywords": [
|
|
40
|
+
"opencode",
|
|
41
|
+
"plugin",
|
|
42
|
+
"theme",
|
|
43
|
+
"gentleman",
|
|
44
|
+
"tui",
|
|
45
|
+
"ascii",
|
|
46
|
+
"mustachi"
|
|
47
|
+
],
|
|
40
48
|
"author": "",
|
|
41
49
|
"license": "ISC",
|
|
42
50
|
"repository": {
|
|
@@ -47,4 +55,4 @@
|
|
|
47
55
|
"bugs": {
|
|
48
56
|
"url": "https://github.com/IrrealV/plugin-gentleman/issues"
|
|
49
57
|
}
|
|
50
|
-
}
|
|
58
|
+
}
|
package/phrases.ts
CHANGED
|
@@ -38,4 +38,21 @@ export const busyPhrases = [
|
|
|
38
38
|
"Tranquilo, todo bajo control...",
|
|
39
39
|
"Un segundo de concentración...",
|
|
40
40
|
"Mirá cómo se hace esto...",
|
|
41
|
+
|
|
42
|
+
// Dev jokes (Argentina + Spain friendly)
|
|
43
|
+
"¿Qué le dice un bit a otro? Nos vemos en el bus",
|
|
44
|
+
"Hay 10 tipos de personas: las que entienden binario y las que no",
|
|
45
|
+
"¿Por qué los programadores confunden Halloween con Navidad? Porque Oct 31 = Dec 25",
|
|
46
|
+
"Mi código no tiene bugs, desarrolla características inesperadas",
|
|
47
|
+
"Un SQL entra a un bar, ve dos tablas y pregunta: ¿Puedo unirme?",
|
|
48
|
+
"¿Cuál es el animal favorito de un programador? El bug",
|
|
49
|
+
"No es un bug, es una funcionalidad no documentada",
|
|
50
|
+
"Hay dos cosas difíciles en programación: naming y cache invalidation",
|
|
51
|
+
"¿Qué hace un programador en la playa? Hace surf... por la web",
|
|
52
|
+
"Código que funciona en mi máquina™",
|
|
53
|
+
"99 little bugs in the code, 99 bugs to fix... take one down, patch it around, 127 little bugs in the code",
|
|
54
|
+
"¿Por qué los programadores prefieren el modo oscuro? Porque la luz atrae bugs",
|
|
55
|
+
"Debugging: ser el detective en una novela de crimen donde también sos el asesino",
|
|
56
|
+
"¡Todo compila! (pero no hace lo que debería)",
|
|
57
|
+
"Si depurar es quitar bugs, programar debe ser ponerlos",
|
|
41
58
|
]
|