@shell-shock/plugin-theme 0.3.29 → 0.4.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 (45) hide show
  1. package/dist/core/dist/types/command.d.cts +14 -0
  2. package/dist/core/dist/types/command.d.cts.map +1 -1
  3. package/dist/helpers/ansi-utils.cjs +684 -133
  4. package/dist/helpers/ansi-utils.d.cts +1 -0
  5. package/dist/helpers/ansi-utils.d.cts.map +1 -1
  6. package/dist/helpers/ansi-utils.d.mts +1 -0
  7. package/dist/helpers/ansi-utils.d.mts.map +1 -1
  8. package/dist/helpers/ansi-utils.mjs +685 -133
  9. package/dist/helpers/ansi-utils.mjs.map +1 -1
  10. package/dist/index.d.cts +2 -2
  11. package/dist/index.d.mts +2 -2
  12. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/acronyms.cjs +415 -0
  13. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/acronyms.mjs +414 -0
  14. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/acronyms.mjs.map +1 -0
  15. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/camel-case.cjs +31 -0
  16. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/camel-case.mjs +32 -0
  17. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/camel-case.mjs.map +1 -0
  18. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/get-words.cjs +38 -0
  19. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/get-words.mjs +38 -0
  20. package/dist/node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/get-words.mjs.map +1 -0
  21. package/dist/{core → packages/core}/dist/types/command.d.mts +14 -0
  22. package/dist/packages/core/dist/types/command.d.mts.map +1 -0
  23. package/dist/packages/core/dist/types/config.d.mts.map +1 -0
  24. package/dist/packages/core/dist/types/context.d.mts.map +1 -0
  25. package/dist/style-dictionary/colors.cjs +13 -3
  26. package/dist/style-dictionary/colors.mjs +13 -3
  27. package/dist/style-dictionary/colors.mjs.map +1 -1
  28. package/dist/themes/default.cjs +23 -17
  29. package/dist/themes/default.mjs +23 -17
  30. package/dist/themes/default.mjs.map +1 -1
  31. package/dist/types/index.d.cts +2 -2
  32. package/dist/types/index.d.mts +2 -2
  33. package/dist/types/plugin.d.mts +2 -2
  34. package/dist/types/theme.d.cts +11 -1
  35. package/dist/types/theme.d.cts.map +1 -1
  36. package/dist/types/theme.d.mts +11 -1
  37. package/dist/types/theme.d.mts.map +1 -1
  38. package/package.json +3 -2
  39. package/dist/core/dist/types/command.d.mts.map +0 -1
  40. package/dist/core/dist/types/config.d.mts.map +0 -1
  41. package/dist/core/dist/types/context.d.mts.map +0 -1
  42. /package/dist/{core → packages/core}/dist/api.d.mts +0 -0
  43. /package/dist/{core → packages/core}/dist/index.d.mts +0 -0
  44. /package/dist/{core → packages/core}/dist/types/config.d.mts +0 -0
  45. /package/dist/{core → packages/core}/dist/types/context.d.mts +0 -0
@@ -1,3 +1,5 @@
1
+ import { camelCase } from "../node_modules/.pnpm/@stryke_string-format@0.17.7/node_modules/@stryke/string-format/dist/camel-case.mjs";
2
+
1
3
  //#region src/helpers/ansi-utils.ts
2
4
  const ANSI_BACKGROUND_OFFSET = 10;
3
5
  const modifiers = {
@@ -117,383 +119,727 @@ function buildThemeAnsiStyles(theme, wrapFn, convertFn) {
117
119
  title: {
118
120
  primary: {
119
121
  open: wrapFn()(convertFn(theme.text.banner.title.primary)),
120
- close: wrapAnsi16()(39)
122
+ close: wrapAnsi16()(39),
123
+ background: {
124
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.title.primary)),
125
+ close: wrapAnsi16()(49)
126
+ }
121
127
  },
122
128
  secondary: {
123
129
  open: wrapFn()(convertFn(theme.text.banner.title.secondary)),
124
- close: wrapAnsi16()(39)
130
+ close: wrapAnsi16()(39),
131
+ background: {
132
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.title.secondary)),
133
+ close: wrapAnsi16()(49)
134
+ }
125
135
  },
126
136
  tertiary: {
127
137
  open: wrapFn()(convertFn(theme.text.banner.title.tertiary)),
128
- close: wrapAnsi16()(39)
138
+ close: wrapAnsi16()(39),
139
+ background: {
140
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.title.tertiary)),
141
+ close: wrapAnsi16()(49)
142
+ }
129
143
  }
130
144
  },
131
145
  command: {
132
146
  primary: {
133
147
  open: wrapFn()(convertFn(theme.text.banner.command.primary)),
134
- close: wrapAnsi16()(39)
148
+ close: wrapAnsi16()(39),
149
+ background: {
150
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.command.primary)),
151
+ close: wrapAnsi16()(49)
152
+ }
135
153
  },
136
154
  secondary: {
137
155
  open: wrapFn()(convertFn(theme.text.banner.command.secondary)),
138
- close: wrapAnsi16()(39)
156
+ close: wrapAnsi16()(39),
157
+ background: {
158
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.command.secondary)),
159
+ close: wrapAnsi16()(49)
160
+ }
139
161
  },
140
162
  tertiary: {
141
163
  open: wrapFn()(convertFn(theme.text.banner.command.tertiary)),
142
- close: wrapAnsi16()(39)
164
+ close: wrapAnsi16()(39),
165
+ background: {
166
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.command.tertiary)),
167
+ close: wrapAnsi16()(49)
168
+ }
143
169
  }
144
170
  },
145
171
  description: {
146
172
  primary: {
147
173
  open: wrapFn()(convertFn(theme.text.banner.description.primary)),
148
- close: wrapAnsi16()(39)
174
+ close: wrapAnsi16()(39),
175
+ background: {
176
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.description.primary)),
177
+ close: wrapAnsi16()(49)
178
+ }
149
179
  },
150
180
  secondary: {
151
181
  open: wrapFn()(convertFn(theme.text.banner.description.secondary)),
152
- close: wrapAnsi16()(39)
182
+ close: wrapAnsi16()(39),
183
+ background: {
184
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.description.secondary)),
185
+ close: wrapAnsi16()(49)
186
+ }
153
187
  },
154
188
  tertiary: {
155
189
  open: wrapFn()(convertFn(theme.text.banner.description.tertiary)),
156
- close: wrapAnsi16()(39)
190
+ close: wrapAnsi16()(39),
191
+ background: {
192
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.description.tertiary)),
193
+ close: wrapAnsi16()(49)
194
+ }
157
195
  }
158
196
  },
159
197
  header: {
160
198
  primary: {
161
199
  open: wrapFn()(convertFn(theme.text.banner.header.primary)),
162
- close: wrapAnsi16()(39)
200
+ close: wrapAnsi16()(39),
201
+ background: {
202
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.header.primary)),
203
+ close: wrapAnsi16()(49)
204
+ }
163
205
  },
164
206
  secondary: {
165
207
  open: wrapFn()(convertFn(theme.text.banner.header.secondary)),
166
- close: wrapAnsi16()(39)
208
+ close: wrapAnsi16()(39),
209
+ background: {
210
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.header.secondary)),
211
+ close: wrapAnsi16()(49)
212
+ }
167
213
  },
168
214
  tertiary: {
169
215
  open: wrapFn()(convertFn(theme.text.banner.header.tertiary)),
170
- close: wrapAnsi16()(39)
216
+ close: wrapAnsi16()(39),
217
+ background: {
218
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.header.tertiary)),
219
+ close: wrapAnsi16()(49)
220
+ }
171
221
  }
172
222
  },
173
223
  footer: {
174
224
  primary: {
175
225
  open: wrapFn()(convertFn(theme.text.banner.footer.primary)),
176
- close: wrapAnsi16()(39)
226
+ close: wrapAnsi16()(39),
227
+ background: {
228
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.footer.primary)),
229
+ close: wrapAnsi16()(49)
230
+ }
177
231
  },
178
232
  secondary: {
179
233
  open: wrapFn()(convertFn(theme.text.banner.footer.secondary)),
180
- close: wrapAnsi16()(39)
234
+ close: wrapAnsi16()(39),
235
+ background: {
236
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.footer.secondary)),
237
+ close: wrapAnsi16()(49)
238
+ }
181
239
  },
182
240
  tertiary: {
183
241
  open: wrapFn()(convertFn(theme.text.banner.footer.tertiary)),
184
- close: wrapAnsi16()(39)
242
+ close: wrapAnsi16()(39),
243
+ background: {
244
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.footer.tertiary)),
245
+ close: wrapAnsi16()(49)
246
+ }
185
247
  }
186
248
  },
187
249
  link: {
188
250
  primary: {
189
251
  open: wrapFn()(convertFn(theme.text.banner.link.primary)),
190
- close: wrapAnsi16()(39)
252
+ close: wrapAnsi16()(39),
253
+ background: {
254
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.link.primary)),
255
+ close: wrapAnsi16()(49)
256
+ }
191
257
  },
192
258
  secondary: {
193
259
  open: wrapFn()(convertFn(theme.text.banner.link.secondary)),
194
- close: wrapAnsi16()(39)
260
+ close: wrapAnsi16()(39),
261
+ background: {
262
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.link.secondary)),
263
+ close: wrapAnsi16()(49)
264
+ }
195
265
  },
196
266
  tertiary: {
197
267
  open: wrapFn()(convertFn(theme.text.banner.link.tertiary)),
198
- close: wrapAnsi16()(39)
268
+ close: wrapAnsi16()(39),
269
+ background: {
270
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.banner.link.tertiary)),
271
+ close: wrapAnsi16()(49)
272
+ }
199
273
  }
200
274
  }
201
275
  },
202
276
  heading: {
203
277
  primary: {
204
278
  open: wrapFn()(convertFn(theme.text.heading.primary)),
205
- close: wrapAnsi16()(39)
279
+ close: wrapAnsi16()(39),
280
+ background: {
281
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.heading.primary)),
282
+ close: wrapAnsi16()(49)
283
+ }
206
284
  },
207
285
  secondary: {
208
286
  open: wrapFn()(convertFn(theme.text.heading.secondary)),
209
- close: wrapAnsi16()(39)
287
+ close: wrapAnsi16()(39),
288
+ background: {
289
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.heading.secondary)),
290
+ close: wrapAnsi16()(49)
291
+ }
210
292
  },
211
293
  tertiary: {
212
294
  open: wrapFn()(convertFn(theme.text.heading.tertiary)),
213
- close: wrapAnsi16()(39)
295
+ close: wrapAnsi16()(39),
296
+ background: {
297
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.heading.tertiary)),
298
+ close: wrapAnsi16()(49)
299
+ }
214
300
  }
215
301
  },
216
302
  body: {
217
303
  primary: {
218
304
  open: wrapFn()(convertFn(theme.text.body.primary)),
219
- close: wrapAnsi16()(39)
305
+ close: wrapAnsi16()(39),
306
+ background: {
307
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.body.primary)),
308
+ close: wrapAnsi16()(49)
309
+ }
220
310
  },
221
311
  secondary: {
222
312
  open: wrapFn()(convertFn(theme.text.body.secondary)),
223
- close: wrapAnsi16()(39)
313
+ close: wrapAnsi16()(39),
314
+ background: {
315
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.body.secondary)),
316
+ close: wrapAnsi16()(49)
317
+ }
224
318
  },
225
319
  tertiary: {
226
320
  open: wrapFn()(convertFn(theme.text.body.tertiary)),
227
- close: wrapAnsi16()(39)
321
+ close: wrapAnsi16()(39),
322
+ background: {
323
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.body.tertiary)),
324
+ close: wrapAnsi16()(49)
325
+ }
228
326
  },
229
327
  link: {
230
328
  open: wrapFn()(convertFn(theme.text.body.link)),
231
- close: wrapAnsi16()(39)
329
+ close: wrapAnsi16()(39),
330
+ background: {
331
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.body.link)),
332
+ close: wrapAnsi16()(49)
333
+ }
232
334
  }
233
335
  },
234
336
  message: {
235
337
  description: {
236
338
  help: {
237
339
  open: wrapFn()(convertFn(theme.text.message.description.help)),
238
- close: wrapAnsi16()(39)
340
+ close: wrapAnsi16()(39),
341
+ background: {
342
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.description.help)),
343
+ close: wrapAnsi16()(49)
344
+ }
239
345
  },
240
346
  success: {
241
347
  open: wrapFn()(convertFn(theme.text.message.description.success)),
242
- close: wrapAnsi16()(39)
348
+ close: wrapAnsi16()(39),
349
+ background: {
350
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.description.success)),
351
+ close: wrapAnsi16()(49)
352
+ }
243
353
  },
244
354
  info: {
245
355
  open: wrapFn()(convertFn(theme.text.message.description.info)),
246
- close: wrapAnsi16()(39)
356
+ close: wrapAnsi16()(39),
357
+ background: {
358
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.description.info)),
359
+ close: wrapAnsi16()(49)
360
+ }
247
361
  },
248
362
  debug: {
249
363
  open: wrapFn()(convertFn(theme.text.message.description.debug)),
250
- close: wrapAnsi16()(39)
364
+ close: wrapAnsi16()(39),
365
+ background: {
366
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.description.debug)),
367
+ close: wrapAnsi16()(49)
368
+ }
251
369
  },
252
370
  warning: {
253
371
  open: wrapFn()(convertFn(theme.text.message.description.warning)),
254
- close: wrapAnsi16()(39)
372
+ close: wrapAnsi16()(39),
373
+ background: {
374
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.description.warning)),
375
+ close: wrapAnsi16()(49)
376
+ }
255
377
  },
256
378
  danger: {
257
379
  open: wrapFn()(convertFn(theme.text.message.description.danger)),
258
- close: wrapAnsi16()(39)
380
+ close: wrapAnsi16()(39),
381
+ background: {
382
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.description.danger)),
383
+ close: wrapAnsi16()(49)
384
+ }
259
385
  },
260
386
  error: {
261
387
  open: wrapFn()(convertFn(theme.text.message.description.error)),
262
- close: wrapAnsi16()(39)
388
+ close: wrapAnsi16()(39),
389
+ background: {
390
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.description.error)),
391
+ close: wrapAnsi16()(49)
392
+ }
263
393
  }
264
394
  },
265
395
  link: {
266
396
  help: {
267
397
  open: wrapFn()(convertFn(theme.text.message.link.help)),
268
- close: wrapAnsi16()(39)
398
+ close: wrapAnsi16()(39),
399
+ background: {
400
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.link.help)),
401
+ close: wrapAnsi16()(49)
402
+ }
269
403
  },
270
404
  success: {
271
405
  open: wrapFn()(convertFn(theme.text.message.link.success)),
272
- close: wrapAnsi16()(39)
406
+ close: wrapAnsi16()(39),
407
+ background: {
408
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.link.success)),
409
+ close: wrapAnsi16()(49)
410
+ }
273
411
  },
274
412
  info: {
275
413
  open: wrapFn()(convertFn(theme.text.message.link.info)),
276
- close: wrapAnsi16()(39)
414
+ close: wrapAnsi16()(39),
415
+ background: {
416
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.link.info)),
417
+ close: wrapAnsi16()(49)
418
+ }
277
419
  },
278
420
  debug: {
279
421
  open: wrapFn()(convertFn(theme.text.message.link.debug)),
280
- close: wrapAnsi16()(39)
422
+ close: wrapAnsi16()(39),
423
+ background: {
424
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.link.debug)),
425
+ close: wrapAnsi16()(49)
426
+ }
281
427
  },
282
428
  warning: {
283
429
  open: wrapFn()(convertFn(theme.text.message.link.warning)),
284
- close: wrapAnsi16()(39)
430
+ close: wrapAnsi16()(39),
431
+ background: {
432
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.link.warning)),
433
+ close: wrapAnsi16()(49)
434
+ }
285
435
  },
286
436
  danger: {
287
437
  open: wrapFn()(convertFn(theme.text.message.link.danger)),
288
- close: wrapAnsi16()(39)
438
+ close: wrapAnsi16()(39),
439
+ background: {
440
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.link.danger)),
441
+ close: wrapAnsi16()(49)
442
+ }
289
443
  },
290
444
  error: {
291
445
  open: wrapFn()(convertFn(theme.text.message.link.error)),
292
- close: wrapAnsi16()(39)
446
+ close: wrapAnsi16()(39),
447
+ background: {
448
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.link.error)),
449
+ close: wrapAnsi16()(49)
450
+ }
293
451
  }
294
452
  },
295
453
  header: {
296
454
  help: {
297
455
  open: wrapFn()(convertFn(theme.text.message.header.help)),
298
- close: wrapAnsi16()(39)
456
+ close: wrapAnsi16()(39),
457
+ background: {
458
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.header.help)),
459
+ close: wrapAnsi16()(49)
460
+ }
299
461
  },
300
462
  success: {
301
463
  open: wrapFn()(convertFn(theme.text.message.header.success)),
302
- close: wrapAnsi16()(39)
464
+ close: wrapAnsi16()(39),
465
+ background: {
466
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.header.success)),
467
+ close: wrapAnsi16()(49)
468
+ }
303
469
  },
304
470
  info: {
305
471
  open: wrapFn()(convertFn(theme.text.message.header.info)),
306
- close: wrapAnsi16()(39)
472
+ close: wrapAnsi16()(39),
473
+ background: {
474
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.header.info)),
475
+ close: wrapAnsi16()(49)
476
+ }
307
477
  },
308
478
  debug: {
309
479
  open: wrapFn()(convertFn(theme.text.message.header.debug)),
310
- close: wrapAnsi16()(39)
480
+ close: wrapAnsi16()(39),
481
+ background: {
482
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.header.debug)),
483
+ close: wrapAnsi16()(49)
484
+ }
311
485
  },
312
486
  warning: {
313
487
  open: wrapFn()(convertFn(theme.text.message.header.warning)),
314
- close: wrapAnsi16()(39)
488
+ close: wrapAnsi16()(39),
489
+ background: {
490
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.header.warning)),
491
+ close: wrapAnsi16()(49)
492
+ }
315
493
  },
316
494
  danger: {
317
495
  open: wrapFn()(convertFn(theme.text.message.header.danger)),
318
- close: wrapAnsi16()(39)
496
+ close: wrapAnsi16()(39),
497
+ background: {
498
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.header.danger)),
499
+ close: wrapAnsi16()(49)
500
+ }
319
501
  },
320
502
  error: {
321
503
  open: wrapFn()(convertFn(theme.text.message.header.error)),
322
- close: wrapAnsi16()(39)
504
+ close: wrapAnsi16()(39),
505
+ background: {
506
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.header.error)),
507
+ close: wrapAnsi16()(49)
508
+ }
323
509
  }
324
510
  },
325
511
  footer: {
326
512
  help: {
327
513
  open: wrapFn()(convertFn(theme.text.message.footer.help)),
328
- close: wrapAnsi16()(39)
514
+ close: wrapAnsi16()(39),
515
+ background: {
516
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.footer.help)),
517
+ close: wrapAnsi16()(49)
518
+ }
329
519
  },
330
520
  success: {
331
521
  open: wrapFn()(convertFn(theme.text.message.footer.success)),
332
- close: wrapAnsi16()(39)
522
+ close: wrapAnsi16()(39),
523
+ background: {
524
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.footer.success)),
525
+ close: wrapAnsi16()(49)
526
+ }
333
527
  },
334
528
  info: {
335
529
  open: wrapFn()(convertFn(theme.text.message.footer.info)),
336
- close: wrapAnsi16()(39)
530
+ close: wrapAnsi16()(39),
531
+ background: {
532
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.footer.info)),
533
+ close: wrapAnsi16()(49)
534
+ }
337
535
  },
338
536
  debug: {
339
537
  open: wrapFn()(convertFn(theme.text.message.footer.debug)),
340
- close: wrapAnsi16()(39)
538
+ close: wrapAnsi16()(39),
539
+ background: {
540
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.footer.debug)),
541
+ close: wrapAnsi16()(49)
542
+ }
341
543
  },
342
544
  warning: {
343
545
  open: wrapFn()(convertFn(theme.text.message.footer.warning)),
344
- close: wrapAnsi16()(39)
546
+ close: wrapAnsi16()(39),
547
+ background: {
548
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.footer.warning)),
549
+ close: wrapAnsi16()(49)
550
+ }
345
551
  },
346
552
  danger: {
347
553
  open: wrapFn()(convertFn(theme.text.message.footer.danger)),
348
- close: wrapAnsi16()(39)
554
+ close: wrapAnsi16()(39),
555
+ background: {
556
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.footer.danger)),
557
+ close: wrapAnsi16()(49)
558
+ }
349
559
  },
350
560
  error: {
351
561
  open: wrapFn()(convertFn(theme.text.message.footer.error)),
352
- close: wrapAnsi16()(39)
562
+ close: wrapAnsi16()(39),
563
+ background: {
564
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.message.footer.error)),
565
+ close: wrapAnsi16()(49)
566
+ }
353
567
  }
354
568
  }
355
569
  },
356
570
  usage: {
357
571
  bin: {
358
572
  open: wrapFn()(convertFn(theme.text.usage.bin)),
359
- close: wrapAnsi16()(39)
573
+ close: wrapAnsi16()(39),
574
+ background: {
575
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.usage.bin)),
576
+ close: wrapAnsi16()(49)
577
+ }
360
578
  },
361
579
  command: {
362
580
  open: wrapFn()(convertFn(theme.text.usage.command)),
363
- close: wrapAnsi16()(39)
581
+ close: wrapAnsi16()(39),
582
+ background: {
583
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.usage.command)),
584
+ close: wrapAnsi16()(49)
585
+ }
364
586
  },
365
587
  dynamic: {
366
588
  open: wrapFn()(convertFn(theme.text.usage.dynamic)),
367
- close: wrapAnsi16()(39)
589
+ close: wrapAnsi16()(39),
590
+ background: {
591
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.usage.dynamic)),
592
+ close: wrapAnsi16()(49)
593
+ }
368
594
  },
369
595
  options: {
370
596
  open: wrapFn()(convertFn(theme.text.usage.options)),
371
- close: wrapAnsi16()(39)
597
+ close: wrapAnsi16()(39),
598
+ background: {
599
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.usage.options)),
600
+ close: wrapAnsi16()(49)
601
+ }
372
602
  },
373
603
  args: {
374
604
  open: wrapFn()(convertFn(theme.text.usage.args)),
375
- close: wrapAnsi16()(39)
605
+ close: wrapAnsi16()(39),
606
+ background: {
607
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.usage.args)),
608
+ close: wrapAnsi16()(49)
609
+ }
376
610
  },
377
611
  description: {
378
612
  open: wrapFn()(convertFn(theme.text.usage.description)),
379
- close: wrapAnsi16()(39)
613
+ close: wrapAnsi16()(39),
614
+ background: {
615
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.usage.description)),
616
+ close: wrapAnsi16()(49)
617
+ }
380
618
  }
381
619
  },
382
620
  prompt: {
383
621
  icon: {
384
622
  active: {
385
623
  open: wrapFn()(convertFn(theme.text.prompt.icon.active)),
386
- close: wrapAnsi16()(39)
624
+ close: wrapAnsi16()(39),
625
+ background: {
626
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.icon.active)),
627
+ close: wrapAnsi16()(49)
628
+ }
387
629
  },
388
630
  warning: {
389
631
  open: wrapFn()(convertFn(theme.text.prompt.icon.warning)),
390
- close: wrapAnsi16()(39)
632
+ close: wrapAnsi16()(39),
633
+ background: {
634
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.icon.warning)),
635
+ close: wrapAnsi16()(49)
636
+ }
391
637
  },
392
638
  error: {
393
639
  open: wrapFn()(convertFn(theme.text.prompt.icon.error)),
394
- close: wrapAnsi16()(39)
640
+ close: wrapAnsi16()(39),
641
+ background: {
642
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.icon.error)),
643
+ close: wrapAnsi16()(49)
644
+ }
395
645
  },
396
646
  submitted: {
397
647
  open: wrapFn()(convertFn(theme.text.prompt.icon.submitted)),
398
- close: wrapAnsi16()(39)
648
+ close: wrapAnsi16()(39),
649
+ background: {
650
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.icon.submitted)),
651
+ close: wrapAnsi16()(49)
652
+ }
399
653
  },
400
654
  cancelled: {
401
655
  open: wrapFn()(convertFn(theme.text.prompt.icon.cancelled)),
402
- close: wrapAnsi16()(39)
656
+ close: wrapAnsi16()(39),
657
+ background: {
658
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.icon.cancelled)),
659
+ close: wrapAnsi16()(49)
660
+ }
403
661
  },
404
662
  disabled: {
405
663
  open: wrapFn()(convertFn(theme.text.prompt.icon.disabled)),
406
- close: wrapAnsi16()(39)
664
+ close: wrapAnsi16()(39),
665
+ background: {
666
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.icon.disabled)),
667
+ close: wrapAnsi16()(49)
668
+ }
407
669
  }
408
670
  },
409
671
  message: {
410
672
  active: {
411
673
  open: wrapFn()(convertFn(theme.text.prompt.message.active)),
412
- close: wrapAnsi16()(39)
674
+ close: wrapAnsi16()(39),
675
+ background: {
676
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.message.active)),
677
+ close: wrapAnsi16()(49)
678
+ }
413
679
  },
414
680
  warning: {
415
681
  open: wrapFn()(convertFn(theme.text.prompt.message.warning)),
416
- close: wrapAnsi16()(39)
682
+ close: wrapAnsi16()(39),
683
+ background: {
684
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.message.warning)),
685
+ close: wrapAnsi16()(49)
686
+ }
417
687
  },
418
688
  error: {
419
689
  open: wrapFn()(convertFn(theme.text.prompt.message.error)),
420
- close: wrapAnsi16()(39)
690
+ close: wrapAnsi16()(39),
691
+ background: {
692
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.message.error)),
693
+ close: wrapAnsi16()(49)
694
+ }
421
695
  },
422
696
  submitted: {
423
697
  open: wrapFn()(convertFn(theme.text.prompt.message.submitted)),
424
- close: wrapAnsi16()(39)
698
+ close: wrapAnsi16()(39),
699
+ background: {
700
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.message.submitted)),
701
+ close: wrapAnsi16()(49)
702
+ }
425
703
  },
426
704
  cancelled: {
427
705
  open: wrapFn()(convertFn(theme.text.prompt.message.cancelled)),
428
- close: wrapAnsi16()(39)
706
+ close: wrapAnsi16()(39),
707
+ background: {
708
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.message.cancelled)),
709
+ close: wrapAnsi16()(49)
710
+ }
429
711
  },
430
712
  disabled: {
431
713
  open: wrapFn()(convertFn(theme.text.prompt.message.disabled)),
432
- close: wrapAnsi16()(39)
714
+ close: wrapAnsi16()(39),
715
+ background: {
716
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.message.disabled)),
717
+ close: wrapAnsi16()(49)
718
+ }
433
719
  }
434
720
  },
435
721
  input: {
436
722
  active: {
437
723
  open: wrapFn()(convertFn(theme.text.prompt.input.active)),
438
- close: wrapAnsi16()(39)
724
+ close: wrapAnsi16()(39),
725
+ background: {
726
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.active)),
727
+ close: wrapAnsi16()(49)
728
+ }
439
729
  },
440
730
  inactive: {
441
731
  open: wrapFn()(convertFn(theme.text.prompt.input.inactive)),
442
- close: wrapAnsi16()(39)
732
+ close: wrapAnsi16()(39),
733
+ background: {
734
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.inactive)),
735
+ close: wrapAnsi16()(49)
736
+ }
443
737
  },
444
738
  warning: {
445
739
  open: wrapFn()(convertFn(theme.text.prompt.input.warning)),
446
- close: wrapAnsi16()(39)
740
+ close: wrapAnsi16()(39),
741
+ background: {
742
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.warning)),
743
+ close: wrapAnsi16()(49)
744
+ }
447
745
  },
448
746
  error: {
449
747
  open: wrapFn()(convertFn(theme.text.prompt.input.error)),
450
- close: wrapAnsi16()(39)
748
+ close: wrapAnsi16()(39),
749
+ background: {
750
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.error)),
751
+ close: wrapAnsi16()(49)
752
+ }
451
753
  },
452
754
  submitted: {
453
755
  open: wrapFn()(convertFn(theme.text.prompt.input.submitted)),
454
- close: wrapAnsi16()(39)
756
+ close: wrapAnsi16()(39),
757
+ background: {
758
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.submitted)),
759
+ close: wrapAnsi16()(49)
760
+ }
455
761
  },
456
762
  cancelled: {
457
763
  open: wrapFn()(convertFn(theme.text.prompt.input.cancelled)),
458
- close: wrapAnsi16()(39)
764
+ close: wrapAnsi16()(39),
765
+ background: {
766
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.cancelled)),
767
+ close: wrapAnsi16()(49)
768
+ }
459
769
  },
460
770
  disabled: {
461
771
  open: wrapFn()(convertFn(theme.text.prompt.input.disabled)),
462
- close: wrapAnsi16()(39)
772
+ close: wrapAnsi16()(39),
773
+ background: {
774
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.disabled)),
775
+ close: wrapAnsi16()(49)
776
+ }
463
777
  },
464
778
  placeholder: {
465
779
  open: wrapFn()(convertFn(theme.text.prompt.input.placeholder)),
466
- close: wrapAnsi16()(39)
780
+ close: wrapAnsi16()(39),
781
+ background: {
782
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.input.placeholder)),
783
+ close: wrapAnsi16()(49)
784
+ }
467
785
  }
468
786
  },
469
787
  description: {
470
788
  active: {
471
789
  open: wrapFn()(convertFn(theme.text.prompt.description.active)),
472
- close: wrapAnsi16()(39)
790
+ close: wrapAnsi16()(39),
791
+ background: {
792
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.description.active)),
793
+ close: wrapAnsi16()(49)
794
+ }
473
795
  },
474
796
  inactive: {
475
797
  open: wrapFn()(convertFn(theme.text.prompt.description.inactive)),
476
- close: wrapAnsi16()(39)
798
+ close: wrapAnsi16()(39),
799
+ background: {
800
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.description.inactive)),
801
+ close: wrapAnsi16()(49)
802
+ }
477
803
  },
478
804
  warning: {
479
805
  open: wrapFn()(convertFn(theme.text.prompt.description.warning)),
480
- close: wrapAnsi16()(39)
806
+ close: wrapAnsi16()(39),
807
+ background: {
808
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.description.warning)),
809
+ close: wrapAnsi16()(49)
810
+ }
481
811
  },
482
812
  error: {
483
813
  open: wrapFn()(convertFn(theme.text.prompt.description.error)),
484
- close: wrapAnsi16()(39)
814
+ close: wrapAnsi16()(39),
815
+ background: {
816
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.description.error)),
817
+ close: wrapAnsi16()(49)
818
+ }
485
819
  },
486
820
  submitted: {
487
821
  open: wrapFn()(convertFn(theme.text.prompt.description.submitted)),
488
- close: wrapAnsi16()(39)
822
+ close: wrapAnsi16()(39),
823
+ background: {
824
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.description.submitted)),
825
+ close: wrapAnsi16()(49)
826
+ }
489
827
  },
490
828
  cancelled: {
491
829
  open: wrapFn()(convertFn(theme.text.prompt.description.cancelled)),
492
- close: wrapAnsi16()(39)
830
+ close: wrapAnsi16()(39),
831
+ background: {
832
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.description.cancelled)),
833
+ close: wrapAnsi16()(49)
834
+ }
493
835
  },
494
836
  disabled: {
495
837
  open: wrapFn()(convertFn(theme.text.prompt.description.disabled)),
496
- close: wrapAnsi16()(39)
838
+ close: wrapAnsi16()(39),
839
+ background: {
840
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.prompt.description.disabled)),
841
+ close: wrapAnsi16()(49)
842
+ }
497
843
  }
498
844
  }
499
845
  },
@@ -501,55 +847,121 @@ function buildThemeAnsiStyles(theme, wrapFn, convertFn) {
501
847
  icon: {
502
848
  active: {
503
849
  open: wrapFn()(convertFn(theme.text.spinner.icon.active)),
504
- close: wrapAnsi16()(39)
850
+ close: wrapAnsi16()(39),
851
+ background: {
852
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.icon.active)),
853
+ close: wrapAnsi16()(49)
854
+ }
505
855
  },
506
856
  warning: {
507
857
  open: wrapFn()(convertFn(theme.text.spinner.icon.warning)),
508
- close: wrapAnsi16()(39)
858
+ close: wrapAnsi16()(39),
859
+ background: {
860
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.icon.warning)),
861
+ close: wrapAnsi16()(49)
862
+ }
509
863
  },
510
864
  error: {
511
865
  open: wrapFn()(convertFn(theme.text.spinner.icon.error)),
512
- close: wrapAnsi16()(39)
866
+ close: wrapAnsi16()(39),
867
+ background: {
868
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.icon.error)),
869
+ close: wrapAnsi16()(49)
870
+ }
513
871
  },
514
872
  success: {
515
873
  open: wrapFn()(convertFn(theme.text.spinner.icon.success)),
516
- close: wrapAnsi16()(39)
874
+ close: wrapAnsi16()(39),
875
+ background: {
876
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.icon.success)),
877
+ close: wrapAnsi16()(49)
878
+ }
517
879
  },
518
880
  info: {
519
881
  open: wrapFn()(convertFn(theme.text.spinner.icon.info)),
520
- close: wrapAnsi16()(39)
882
+ close: wrapAnsi16()(39),
883
+ background: {
884
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.icon.info)),
885
+ close: wrapAnsi16()(49)
886
+ }
521
887
  },
522
888
  help: {
523
889
  open: wrapFn()(convertFn(theme.text.spinner.icon.help)),
524
- close: wrapAnsi16()(39)
890
+ close: wrapAnsi16()(39),
891
+ background: {
892
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.icon.help)),
893
+ close: wrapAnsi16()(49)
894
+ }
525
895
  }
526
896
  },
527
897
  message: {
528
898
  active: {
529
899
  open: wrapFn()(convertFn(theme.text.spinner.message.active)),
530
- close: wrapAnsi16()(39)
900
+ close: wrapAnsi16()(39),
901
+ background: {
902
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.message.active)),
903
+ close: wrapAnsi16()(49)
904
+ }
531
905
  },
532
906
  warning: {
533
907
  open: wrapFn()(convertFn(theme.text.spinner.message.warning)),
534
- close: wrapAnsi16()(39)
908
+ close: wrapAnsi16()(39),
909
+ background: {
910
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.message.warning)),
911
+ close: wrapAnsi16()(49)
912
+ }
535
913
  },
536
914
  error: {
537
915
  open: wrapFn()(convertFn(theme.text.spinner.message.error)),
538
- close: wrapAnsi16()(39)
916
+ close: wrapAnsi16()(39),
917
+ background: {
918
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.message.error)),
919
+ close: wrapAnsi16()(49)
920
+ }
539
921
  },
540
922
  success: {
541
923
  open: wrapFn()(convertFn(theme.text.spinner.message.success)),
542
- close: wrapAnsi16()(39)
924
+ close: wrapAnsi16()(39),
925
+ background: {
926
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.message.success)),
927
+ close: wrapAnsi16()(49)
928
+ }
543
929
  },
544
930
  info: {
545
931
  open: wrapFn()(convertFn(theme.text.spinner.message.info)),
546
- close: wrapAnsi16()(39)
932
+ close: wrapAnsi16()(39),
933
+ background: {
934
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.message.info)),
935
+ close: wrapAnsi16()(49)
936
+ }
547
937
  },
548
938
  help: {
549
939
  open: wrapFn()(convertFn(theme.text.spinner.message.help)),
550
- close: wrapAnsi16()(39)
940
+ close: wrapAnsi16()(39),
941
+ background: {
942
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.spinner.message.help)),
943
+ close: wrapAnsi16()(49)
944
+ }
551
945
  }
552
946
  }
947
+ },
948
+ tags: {
949
+ $default: {
950
+ open: wrapFn()(convertFn(theme.text.tags.$default || "")),
951
+ close: wrapAnsi16()(39),
952
+ background: {
953
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.text.tags.$default || "")),
954
+ close: wrapAnsi16()(49)
955
+ }
956
+ },
957
+ ...Object.fromEntries(Object.entries(theme.text.tags).map(([tag, value]) => [camelCase(tag), {
958
+ open: wrapFn()(convertFn(value)),
959
+ close: wrapAnsi16()(39),
960
+ background: {
961
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(value)),
962
+ close: wrapAnsi16()(49)
963
+ }
964
+ }]))
553
965
  }
554
966
  },
555
967
  border: {
@@ -557,29 +969,53 @@ function buildThemeAnsiStyles(theme, wrapFn, convertFn) {
557
969
  divider: {
558
970
  primary: {
559
971
  open: wrapFn()(convertFn(theme.border.banner.divider.primary)),
560
- close: wrapAnsi16()(39)
972
+ close: wrapAnsi16()(39),
973
+ background: {
974
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.banner.divider.primary)),
975
+ close: wrapAnsi16()(49)
976
+ }
561
977
  },
562
978
  secondary: {
563
979
  open: wrapFn()(convertFn(theme.border.banner.divider.secondary)),
564
- close: wrapAnsi16()(39)
980
+ close: wrapAnsi16()(39),
981
+ background: {
982
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.banner.divider.secondary)),
983
+ close: wrapAnsi16()(49)
984
+ }
565
985
  },
566
986
  tertiary: {
567
987
  open: wrapFn()(convertFn(theme.border.banner.divider.tertiary)),
568
- close: wrapAnsi16()(39)
988
+ close: wrapAnsi16()(39),
989
+ background: {
990
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.banner.divider.tertiary)),
991
+ close: wrapAnsi16()(49)
992
+ }
569
993
  }
570
994
  },
571
995
  outline: {
572
996
  primary: {
573
997
  open: wrapFn()(convertFn(theme.border.banner.outline.primary)),
574
- close: wrapAnsi16()(39)
998
+ close: wrapAnsi16()(39),
999
+ background: {
1000
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.banner.outline.primary)),
1001
+ close: wrapAnsi16()(49)
1002
+ }
575
1003
  },
576
1004
  secondary: {
577
1005
  open: wrapFn()(convertFn(theme.border.banner.outline.secondary)),
578
- close: wrapAnsi16()(39)
1006
+ close: wrapAnsi16()(39),
1007
+ background: {
1008
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.banner.outline.secondary)),
1009
+ close: wrapAnsi16()(49)
1010
+ }
579
1011
  },
580
1012
  tertiary: {
581
1013
  open: wrapFn()(convertFn(theme.border.banner.outline.tertiary)),
582
- close: wrapAnsi16()(39)
1014
+ close: wrapAnsi16()(39),
1015
+ background: {
1016
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.banner.outline.tertiary)),
1017
+ close: wrapAnsi16()(49)
1018
+ }
583
1019
  }
584
1020
  }
585
1021
  },
@@ -587,29 +1023,53 @@ function buildThemeAnsiStyles(theme, wrapFn, convertFn) {
587
1023
  divider: {
588
1024
  primary: {
589
1025
  open: wrapFn()(convertFn(theme.border.app.divider.primary)),
590
- close: wrapAnsi16()(39)
1026
+ close: wrapAnsi16()(39),
1027
+ background: {
1028
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.app.divider.primary)),
1029
+ close: wrapAnsi16()(49)
1030
+ }
591
1031
  },
592
1032
  secondary: {
593
1033
  open: wrapFn()(convertFn(theme.border.app.divider.secondary)),
594
- close: wrapAnsi16()(39)
1034
+ close: wrapAnsi16()(39),
1035
+ background: {
1036
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.app.divider.secondary)),
1037
+ close: wrapAnsi16()(49)
1038
+ }
595
1039
  },
596
1040
  tertiary: {
597
1041
  open: wrapFn()(convertFn(theme.border.app.divider.tertiary)),
598
- close: wrapAnsi16()(39)
1042
+ close: wrapAnsi16()(39),
1043
+ background: {
1044
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.app.divider.tertiary)),
1045
+ close: wrapAnsi16()(49)
1046
+ }
599
1047
  }
600
1048
  },
601
1049
  table: {
602
1050
  primary: {
603
1051
  open: wrapFn()(convertFn(theme.border.app.table.primary)),
604
- close: wrapAnsi16()(39)
1052
+ close: wrapAnsi16()(39),
1053
+ background: {
1054
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.app.table.primary)),
1055
+ close: wrapAnsi16()(49)
1056
+ }
605
1057
  },
606
1058
  secondary: {
607
1059
  open: wrapFn()(convertFn(theme.border.app.table.secondary)),
608
- close: wrapAnsi16()(39)
1060
+ close: wrapAnsi16()(39),
1061
+ background: {
1062
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.app.table.secondary)),
1063
+ close: wrapAnsi16()(49)
1064
+ }
609
1065
  },
610
1066
  tertiary: {
611
1067
  open: wrapFn()(convertFn(theme.border.app.table.tertiary)),
612
- close: wrapAnsi16()(39)
1068
+ close: wrapAnsi16()(39),
1069
+ background: {
1070
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.app.table.tertiary)),
1071
+ close: wrapAnsi16()(49)
1072
+ }
613
1073
  }
614
1074
  }
615
1075
  },
@@ -617,61 +1077,117 @@ function buildThemeAnsiStyles(theme, wrapFn, convertFn) {
617
1077
  divider: {
618
1078
  help: {
619
1079
  open: wrapFn()(convertFn(theme.border.message.divider.help)),
620
- close: wrapAnsi16()(39)
1080
+ close: wrapAnsi16()(39),
1081
+ background: {
1082
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.divider.help)),
1083
+ close: wrapAnsi16()(49)
1084
+ }
621
1085
  },
622
1086
  success: {
623
1087
  open: wrapFn()(convertFn(theme.border.message.divider.success)),
624
- close: wrapAnsi16()(39)
1088
+ close: wrapAnsi16()(39),
1089
+ background: {
1090
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.divider.success)),
1091
+ close: wrapAnsi16()(49)
1092
+ }
625
1093
  },
626
1094
  info: {
627
1095
  open: wrapFn()(convertFn(theme.border.message.divider.info)),
628
- close: wrapAnsi16()(39)
1096
+ close: wrapAnsi16()(39),
1097
+ background: {
1098
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.divider.info)),
1099
+ close: wrapAnsi16()(49)
1100
+ }
629
1101
  },
630
1102
  debug: {
631
1103
  open: wrapFn()(convertFn(theme.border.message.divider.debug)),
632
- close: wrapAnsi16()(39)
1104
+ close: wrapAnsi16()(39),
1105
+ background: {
1106
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.divider.debug)),
1107
+ close: wrapAnsi16()(49)
1108
+ }
633
1109
  },
634
1110
  warning: {
635
1111
  open: wrapFn()(convertFn(theme.border.message.divider.warning)),
636
- close: wrapAnsi16()(39)
1112
+ close: wrapAnsi16()(39),
1113
+ background: {
1114
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.divider.warning)),
1115
+ close: wrapAnsi16()(49)
1116
+ }
637
1117
  },
638
1118
  danger: {
639
1119
  open: wrapFn()(convertFn(theme.border.message.divider.danger)),
640
- close: wrapAnsi16()(39)
1120
+ close: wrapAnsi16()(39),
1121
+ background: {
1122
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.divider.danger)),
1123
+ close: wrapAnsi16()(49)
1124
+ }
641
1125
  },
642
1126
  error: {
643
1127
  open: wrapFn()(convertFn(theme.border.message.divider.error)),
644
- close: wrapAnsi16()(39)
1128
+ close: wrapAnsi16()(39),
1129
+ background: {
1130
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.divider.error)),
1131
+ close: wrapAnsi16()(49)
1132
+ }
645
1133
  }
646
1134
  },
647
1135
  outline: {
648
1136
  help: {
649
1137
  open: wrapFn()(convertFn(theme.border.message.outline.help)),
650
- close: wrapAnsi16()(39)
1138
+ close: wrapAnsi16()(39),
1139
+ background: {
1140
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.outline.help)),
1141
+ close: wrapAnsi16()(49)
1142
+ }
651
1143
  },
652
1144
  success: {
653
1145
  open: wrapFn()(convertFn(theme.border.message.outline.success)),
654
- close: wrapAnsi16()(39)
1146
+ close: wrapAnsi16()(39),
1147
+ background: {
1148
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.outline.success)),
1149
+ close: wrapAnsi16()(49)
1150
+ }
655
1151
  },
656
1152
  info: {
657
1153
  open: wrapFn()(convertFn(theme.border.message.outline.info)),
658
- close: wrapAnsi16()(39)
1154
+ close: wrapAnsi16()(39),
1155
+ background: {
1156
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.outline.info)),
1157
+ close: wrapAnsi16()(49)
1158
+ }
659
1159
  },
660
1160
  debug: {
661
1161
  open: wrapFn()(convertFn(theme.border.message.outline.debug)),
662
- close: wrapAnsi16()(39)
1162
+ close: wrapAnsi16()(39),
1163
+ background: {
1164
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.outline.debug)),
1165
+ close: wrapAnsi16()(49)
1166
+ }
663
1167
  },
664
1168
  warning: {
665
1169
  open: wrapFn()(convertFn(theme.border.message.outline.warning)),
666
- close: wrapAnsi16()(39)
1170
+ close: wrapAnsi16()(39),
1171
+ background: {
1172
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.outline.warning)),
1173
+ close: wrapAnsi16()(49)
1174
+ }
667
1175
  },
668
1176
  danger: {
669
1177
  open: wrapFn()(convertFn(theme.border.message.outline.danger)),
670
- close: wrapAnsi16()(39)
1178
+ close: wrapAnsi16()(39),
1179
+ background: {
1180
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.outline.danger)),
1181
+ close: wrapAnsi16()(49)
1182
+ }
671
1183
  },
672
1184
  error: {
673
1185
  open: wrapFn()(convertFn(theme.border.message.outline.error)),
674
- close: wrapAnsi16()(39)
1186
+ close: wrapAnsi16()(39),
1187
+ background: {
1188
+ open: wrapFn(ANSI_BACKGROUND_OFFSET)(convertFn(theme.border.message.outline.error)),
1189
+ close: wrapAnsi16()(49)
1190
+ }
675
1191
  }
676
1192
  }
677
1193
  }
@@ -693,43 +1209,79 @@ function getAnsiStyles(theme) {
693
1209
  for (const [key, value] of Object.entries(modifiers)) {
694
1210
  output.ansi16[key] = {
695
1211
  open: wrapAnsi16()(value[0]),
696
- close: wrapAnsi16()(value[1])
1212
+ close: wrapAnsi16()(value[1]),
1213
+ background: {
1214
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1215
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1216
+ }
697
1217
  };
698
1218
  output.ansi256[key] = {
699
1219
  open: wrapAnsi16()(value[0]),
700
- close: wrapAnsi16()(value[1])
1220
+ close: wrapAnsi16()(value[1]),
1221
+ background: {
1222
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1223
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1224
+ }
701
1225
  };
702
1226
  output.ansi16m[key] = {
703
1227
  open: wrapAnsi16()(value[0]),
704
- close: wrapAnsi16()(value[1])
1228
+ close: wrapAnsi16()(value[1]),
1229
+ background: {
1230
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1231
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1232
+ }
705
1233
  };
706
1234
  }
707
1235
  for (const [key, value] of Object.entries(colors)) {
708
1236
  output.ansi16[key] = {
709
1237
  open: wrapAnsi16()(value[0]),
710
- close: wrapAnsi16()(value[1])
1238
+ close: wrapAnsi16()(value[1]),
1239
+ background: {
1240
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1241
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1242
+ }
711
1243
  };
712
1244
  output.ansi256[key] = {
713
1245
  open: wrapAnsi16()(value[0]),
714
- close: wrapAnsi16()(value[1])
1246
+ close: wrapAnsi16()(value[1]),
1247
+ background: {
1248
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1249
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1250
+ }
715
1251
  };
716
1252
  output.ansi16m[key] = {
717
1253
  open: wrapAnsi16()(value[0]),
718
- close: wrapAnsi16()(value[1])
1254
+ close: wrapAnsi16()(value[1]),
1255
+ background: {
1256
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1257
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1258
+ }
719
1259
  };
720
1260
  }
721
1261
  for (const [key, value] of Object.entries(bgColors)) {
722
1262
  output.ansi16[key] = {
723
1263
  open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
724
- close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1264
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1]),
1265
+ background: {
1266
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1267
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1268
+ }
725
1269
  };
726
1270
  output.ansi256[key] = {
727
1271
  open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
728
- close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1272
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1]),
1273
+ background: {
1274
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1275
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1276
+ }
729
1277
  };
730
1278
  output.ansi16m[key] = {
731
1279
  open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
732
- close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1280
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1]),
1281
+ background: {
1282
+ open: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[0]),
1283
+ close: wrapAnsi16(ANSI_BACKGROUND_OFFSET)(value[1])
1284
+ }
733
1285
  };
734
1286
  }
735
1287
  output.ansi16.theme = buildThemeAnsiStyles(theme, wrapAnsi16, hexToAnsi);