// src/utils/stream-animation.ts
var BUILTIN_PLUGINS = [
  {
    name: "typewriter",
    containerClass: "persona-stream-typewriter",
    wrap: "char",
    useCaret: true
  },
  {
    name: "pop-bubble",
    bubbleClass: "persona-stream-pop",
    wrap: "none"
  },
  {
    name: "letter-rise",
    containerClass: "persona-stream-letter-rise",
    wrap: "char"
  },
  {
    name: "word-fade",
    containerClass: "persona-stream-word-fade",
    wrap: "word"
  }
];
var globalRegistry = /* @__PURE__ */ new Map();
for (const plugin of BUILTIN_PLUGINS) globalRegistry.set(plugin.name, plugin);
var registerStreamAnimationPlugin = (plugin) => {
  globalRegistry.set(plugin.name, plugin);
};

// src/animations/wipe.ts
var STYLES = `
@keyframes persona-stream-wipe {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to   { -webkit-mask-position: 0% 0;   mask-position: 0% 0;   }
}
[data-persona-root] .persona-stream-wipe .persona-stream-word {
  -webkit-mask-image: linear-gradient(
    90deg,
    black 0%,
    black 45%,
    transparent 55%,
    transparent 100%
  );
          mask-image: linear-gradient(
    90deg,
    black 0%,
    black 45%,
    transparent 55%,
    transparent 100%
  );
  -webkit-mask-size: 200% 100%;
          mask-size: 200% 100%;
  -webkit-mask-position: 100% 0;
          mask-position: 100% 0;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  animation: persona-stream-wipe calc(var(--persona-stream-step, 120ms) * 3)
    ease-out forwards;
}
@media (prefers-reduced-motion: reduce) {
  [data-persona-root] .persona-stream-wipe .persona-stream-word {
    animation: none !important;
    -webkit-mask-image: none !important;
            mask-image: none !important;
  }
}
`.trim();
var wipe = {
  name: "wipe",
  containerClass: "persona-stream-wipe",
  wrap: "word",
  styles: STYLES
};
registerStreamAnimationPlugin(wipe);
var wipe_default = wipe;
export {
  wipe_default as default,
  wipe
};
