# Path: yaspin/api.py
# def yaspin(*args, **kwargs):
#     """Display spinner in stdout.
# 
#     Can be used as a context manager or as a function decorator.
# 
#     Arguments:
#         spinner (base_spinner.Spinner, optional): Spinner object to use.
#         text (str, optional): Text to show along with spinner.
#         color (str, optional): Spinner color.
#         on_color (str, optional): Color highlight for the spinner.
#         attrs (list, optional): Color attributes for the spinner.
#         reversal (bool, optional): Reverse spin direction.
#         side (str, optional): Place spinner to the right or left end
#             of the text string.
#         sigmap (dict, optional): Maps POSIX signals to their respective
#             handlers.
#         timer (bool, optional): Prints a timer showing the elapsed time.
# 
#     Returns:
#         core.Yaspin: instance of the Yaspin class.
# 
#     Raises:
#         ValueError: If unsupported ``color`` is specified.
#         ValueError: If unsupported ``on_color`` is specified.
#         ValueError: If unsupported color attribute in ``attrs``
#             is specified.
#         ValueError: If trying to register handler for SIGKILL signal.
#         ValueError: If unsupported ``side`` is specified.
# 
#     Available text colors:
#         red, green, yellow, blue, magenta, cyan, white.
# 
#     Available text highlights:
#         on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan,
#         on_white, on_grey.
# 
#     Available attributes:
#         bold, dark, underline, blink, reverse, concealed.
# 
#     Example::
# 
#         # Use as a context manager
#         with yaspin():
#             some_operations()
# 
#         # Context manager with text
#         with yaspin(text="Processing..."):
#             some_operations()
# 
#         # Context manager with custom sequence
#         with yaspin(Spinner('-\\|/', 150)):
#             some_operations()
# 
#         # As decorator
#         @yaspin(text="Loading...")
#         def foo():
#             time.sleep(5)
# 
#         foo()
# 
#     """
#     return Yaspin(*args, **kwargs)
# 
# Path: yaspin/constants.py
# COLOR_MAP = {
#     # name: type
#     "blink": "attrs",
#     "bold": "attrs",
#     "concealed": "attrs",
#     "dark": "attrs",
#     "reverse": "attrs",
#     "underline": "attrs",
#     "blue": "color",
#     "cyan": "color",
#     "green": "color",
#     "magenta": "color",
#     "red": "color",
#     "white": "color",
#     "yellow": "color",
#     "on_blue": "on_color",
#     "on_cyan": "on_color",
#     "on_green": "on_color",
#     "on_grey": "on_color",
#     "on_magenta": "on_color",
#     "on_red": "on_color",
#     "on_white": "on_color",
#     "on_yellow": "on_color",
# }
# 
# Path: yaspin/spinners.py
# SPINNERS_DATA = pkgutil.get_data(__name__, "data/spinners.json").decode("utf-8")
# def _hook(dct):


import random
import time
from yaspin import yaspin
from yaspin.constants import COLOR_MAP
from yaspin.spinners import Spinners
"""
examples.demo
~~~~~~~~~~~~~

Yaspin features demonstration.
"""




COLORS = (k for k, v in COLOR_MAP.items() if v == "color")

# Path: yaspin/api.py
# def yaspin(*args, **kwargs):
#     """Display spinner in stdout.
# 
#     Can be used as a context manager or as a function decorator.
# 
#     Arguments:
#         spinner (base_spinner.Spinner, optional): Spinner object to use.
#         text (str, optional): Text to show along with spinner.
#         color (str, optional): Spinner color.
#         on_color (str, optional): Color highlight for the spinner.
#         attrs (list, optional): Color attributes for the spinner.
#         reversal (bool, optional): Reverse spin direction.
#         side (str, optional): Place spinner to the right or left end
#             of the text string.
#         sigmap (dict, optional): Maps POSIX signals to their respective
#             handlers.
#         timer (bool, optional): Prints a timer showing the elapsed time.
# 
#     Returns:
#         core.Yaspin: instance of the Yaspin class.
# 
#     Raises:
#         ValueError: If unsupported ``color`` is specified.
#         ValueError: If unsupported ``on_color`` is specified.
#         ValueError: If unsupported color attribute in ``attrs``
#             is specified.
#         ValueError: If trying to register handler for SIGKILL signal.
#         ValueError: If unsupported ``side`` is specified.
# 
#     Available text colors:
#         red, green, yellow, blue, magenta, cyan, white.
# 
#     Available text highlights:
#         on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan,
#         on_white, on_grey.
# 
#     Available attributes:
#         bold, dark, underline, blink, reverse, concealed.
# 
#     Example::
# 
#         # Use as a context manager
#         with yaspin():
#             some_operations()
# 
#         # Context manager with text
#         with yaspin(text="Processing..."):
#             some_operations()
# 
#         # Context manager with custom sequence
#         with yaspin(Spinner('-\\|/', 150)):
#             some_operations()
# 
#         # As decorator
#         @yaspin(text="Loading...")
#         def foo():
#             time.sleep(5)
# 
#         foo()
# 
#     """
#     return Yaspin(*args, **kwargs)
# 
# Path: yaspin/constants.py
# COLOR_MAP = {
#     # name: type
#     "blink": "attrs",
#     "bold": "attrs",
#     "concealed": "attrs",
#     "dark": "attrs",
#     "reverse": "attrs",
#     "underline": "attrs",
#     "blue": "color",
#     "cyan": "color",
#     "green": "color",
#     "magenta": "color",
#     "red": "color",
#     "white": "color",
#     "yellow": "color",
#     "on_blue": "on_color",
#     "on_cyan": "on_color",
#     "on_green": "on_color",
#     "on_grey": "on_color",
#     "on_magenta": "on_color",
#     "on_red": "on_color",
#     "on_white": "on_color",
#     "on_yellow": "on_color",
# }
# 
# Path: yaspin/spinners.py
# SPINNERS_DATA = pkgutil.get_data(__name__, "data/spinners.json").decode("utf-8")
# def _hook(dct):


# Path: examples/demo.py
import random
import time
from yaspin import yaspin
from yaspin.constants import COLOR_MAP
from yaspin.spinners import Spinners

"""
examples.demo
~~~~~~~~~~~~~

Yaspin features demonstration.
"""




COLORS = (k for k, v in COLOR_MAP.items() if v == "color")

HIGHLIGHTS = (k for k, v in COLOR_MAP.items() if v == "on_color")