Typings for the preset emphasis animation effects that come with the library's emphasis bank.

interface LibraryPresetEmphasisEffects {
    ~highlight: {
        defaultConfig: {
            cssClasses: {
                toAddOnStart: ["webchalk-highlightable"];
            };
        };
        effectCompositionFrequency: "on-every-play";
        immutableConfig: {
            composite: "replace";
        };
        composeEffect(color?: string): {
            backwardKeyframesGenerator: (() => ({
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing: string;
                offset?: undefined;
            } | {
                --webchalk-highlight-color?: undefined;
                backgroundPositionX: string;
                easing?: undefined;
                offset: number;
            } | {
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing?: undefined;
                offset?: undefined;
            })[]);
            forwardKeyframesGenerator: (() => ({
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing: string;
                offset?: undefined;
            } | {
                --webchalk-highlight-color?: undefined;
                backgroundPositionX: string;
                easing?: undefined;
                offset: number;
            } | {
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing?: undefined;
                offset?: undefined;
            })[]);
        };
    };
    ~un-highlight: {
        defaultConfig: {
            cssClasses: {
                toRemoveOnFinish: ["webchalk-highlightable"];
            };
        };
        effectCompositionFrequency: "on-every-play";
        immutableConfig: {
            composite: "replace";
        };
        composeEffect(): {
            forwardKeyframesGenerator: (() => {
                backgroundPositionX: string;
            }[]);
        };
    };
}

Properties

~highlight: {
    defaultConfig: {
        cssClasses: {
            toAddOnStart: ["webchalk-highlightable"];
        };
    };
    effectCompositionFrequency: "on-every-play";
    immutableConfig: {
        composite: "replace";
    };
    composeEffect(color?: string): {
        backwardKeyframesGenerator: (() => ({
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing: string;
            offset?: undefined;
        } | {
            --webchalk-highlight-color?: undefined;
            backgroundPositionX: string;
            easing?: undefined;
            offset: number;
        } | {
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing?: undefined;
            offset?: undefined;
        })[]);
        forwardKeyframesGenerator: (() => ({
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing: string;
            offset?: undefined;
        } | {
            --webchalk-highlight-color?: undefined;
            backgroundPositionX: string;
            easing?: undefined;
            offset: number;
        } | {
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing?: undefined;
            offset?: undefined;
        })[]);
    };
} = ...

Element is highlighted in the specified color.

Type declaration

  • defaultConfig: {
        cssClasses: {
            toAddOnStart: ["webchalk-highlightable"];
        };
    }
    • ReadonlycssClasses: {
          toAddOnStart: ["webchalk-highlightable"];
      }
      • ReadonlytoAddOnStart: ["webchalk-highlightable"]
  • effectCompositionFrequency: "on-every-play"
  • immutableConfig: {
        composite: "replace";
    }
    • Readonlycomposite: "replace"
  • composeEffect:function
    • Parameters

      • color: string = 'default'

        color to use for the highlight

      Returns {
          backwardKeyframesGenerator: (() => ({
              --webchalk-highlight-color: string;
              backgroundPositionX?: undefined;
              easing: string;
              offset?: undefined;
          } | {
              --webchalk-highlight-color?: undefined;
              backgroundPositionX: string;
              easing?: undefined;
              offset: number;
          } | {
              --webchalk-highlight-color: string;
              backgroundPositionX?: undefined;
              easing?: undefined;
              offset?: undefined;
          })[]);
          forwardKeyframesGenerator: (() => ({
              --webchalk-highlight-color: string;
              backgroundPositionX?: undefined;
              easing: string;
              offset?: undefined;
          } | {
              --webchalk-highlight-color?: undefined;
              backgroundPositionX: string;
              easing?: undefined;
              offset: number;
          } | {
              --webchalk-highlight-color: string;
              backgroundPositionX?: undefined;
              easing?: undefined;
              offset?: undefined;
          })[]);
      }

      • backwardKeyframesGenerator: (() => ({
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing: string;
            offset?: undefined;
        } | {
            --webchalk-highlight-color?: undefined;
            backgroundPositionX: string;
            easing?: undefined;
            offset: number;
        } | {
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing?: undefined;
            offset?: undefined;
        })[])
          • (): ({
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing: string;
                offset?: undefined;
            } | {
                --webchalk-highlight-color?: undefined;
                backgroundPositionX: string;
                easing?: undefined;
                offset: number;
            } | {
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing?: undefined;
                offset?: undefined;
            })[]
          • Returns ({
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing: string;
                offset?: undefined;
            } | {
                --webchalk-highlight-color?: undefined;
                backgroundPositionX: string;
                easing?: undefined;
                offset: number;
            } | {
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing?: undefined;
                offset?: undefined;
            })[]

      • forwardKeyframesGenerator: (() => ({
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing: string;
            offset?: undefined;
        } | {
            --webchalk-highlight-color?: undefined;
            backgroundPositionX: string;
            easing?: undefined;
            offset: number;
        } | {
            --webchalk-highlight-color: string;
            backgroundPositionX?: undefined;
            easing?: undefined;
            offset?: undefined;
        })[])
          • (): ({
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing: string;
                offset?: undefined;
            } | {
                --webchalk-highlight-color?: undefined;
                backgroundPositionX: string;
                easing?: undefined;
                offset: number;
            } | {
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing?: undefined;
                offset?: undefined;
            })[]
          • Returns ({
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing: string;
                offset?: undefined;
            } | {
                --webchalk-highlight-color?: undefined;
                backgroundPositionX: string;
                easing?: undefined;
                offset: number;
            } | {
                --webchalk-highlight-color: string;
                backgroundPositionX?: undefined;
                easing?: undefined;
                offset?: undefined;
            })[]

~un-highlight: {
    defaultConfig: {
        cssClasses: {
            toRemoveOnFinish: ["webchalk-highlightable"];
        };
    };
    effectCompositionFrequency: "on-every-play";
    immutableConfig: {
        composite: "replace";
    };
    composeEffect(): {
        forwardKeyframesGenerator: (() => {
            backgroundPositionX: string;
        }[]);
    };
} = ...

Element is unhighlighted.

Type declaration

  • defaultConfig: {
        cssClasses: {
            toRemoveOnFinish: ["webchalk-highlightable"];
        };
    }
    • ReadonlycssClasses: {
          toRemoveOnFinish: ["webchalk-highlightable"];
      }
      • ReadonlytoRemoveOnFinish: ["webchalk-highlightable"]
  • effectCompositionFrequency: "on-every-play"
  • immutableConfig: {
        composite: "replace";
    }
    • Readonlycomposite: "replace"
  • composeEffect:function
    • Returns {
          forwardKeyframesGenerator: (() => {
              backgroundPositionX: string;
          }[]);
      }

      • ReadonlyforwardKeyframesGenerator: (() => {
            backgroundPositionX: string;
        }[])
          • (): {
                backgroundPositionX: string;
            }[]
          • Returns {
                backgroundPositionX: string;
            }[]