"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/animations/wipe.ts
var wipe_exports = {};
__export(wipe_exports, {
  default: () => wipe_default,
  wipe: () => wipe
});
module.exports = __toCommonJS(wipe_exports);

// 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;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  wipe
});
