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