New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@arwes/text

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arwes/text - npm Package Compare versions

Comparing version 1.0.0-next.3 to 1.0.0-next.4

6

build/cjs/transitionTextDecipher/transitionTextDecipher.js

@@ -10,3 +10,3 @@ "use strict";

const transitionTextDecipher = (props) => {
const { rootElement, contentElement, duration, isEntering = true, easing = 'linear' } = props;
const { rootElement, contentElement, duration, easing = 'linear', isEntering = true } = props;
const cloneElement = contentElement.cloneNode(true);

@@ -43,4 +43,4 @@ Object.assign(cloneElement.style, {

easing,
isEntering,
onChange: progress => {
direction: isEntering ? 'normal' : 'reverse',
onUpdate: progress => {
// When entering, the animation decipher characters over time.

@@ -47,0 +47,0 @@ // When exiting, the animation will cipher characters over time.

@@ -9,3 +9,3 @@ "use strict";

const transitionTextSequence = (props) => {
const { rootElement, contentElement, duration, isEntering, easing } = props;
const { rootElement, contentElement, duration, easing = 'linear', isEntering = true } = props;
const cloneElement = contentElement.cloneNode(true);

@@ -53,4 +53,4 @@ Object.assign(cloneElement.style, {

easing,
isEntering,
onChange: progress => {
direction: isEntering ? 'normal' : 'reverse',
onUpdate: progress => {
const newLength = Math.round(progress * length);

@@ -57,0 +57,0 @@ (0, index_2.setTextNodesContent)(textNodes, texts, newLength);

@@ -1,4 +0,4 @@

import { Animation } from '@arwes/animated';
import { type Animation } from '@arwes/animated';
import type { TextTransitionProps } from '../types';
declare const transitionTextDecipher: (props: TextTransitionProps) => Animation;
export { transitionTextDecipher };

@@ -7,3 +7,3 @@ import { randomizeList } from '@arwes/tools';

const transitionTextDecipher = (props) => {
const { rootElement, contentElement, duration, isEntering = true, easing = 'linear' } = props;
const { rootElement, contentElement, duration, easing = 'linear', isEntering = true } = props;
const cloneElement = contentElement.cloneNode(true);

@@ -40,4 +40,4 @@ Object.assign(cloneElement.style, {

easing,
isEntering,
onChange: progress => {
direction: isEntering ? 'normal' : 'reverse',
onUpdate: progress => {
// When entering, the animation decipher characters over time.

@@ -44,0 +44,0 @@ // When exiting, the animation will cipher characters over time.

@@ -1,4 +0,4 @@

import { Animation } from '@arwes/animated';
import { type Animation } from '@arwes/animated';
import type { TextTransitionProps } from '../types';
declare const transitionTextSequence: (props: TextTransitionProps) => Animation;
export { transitionTextSequence };

@@ -6,3 +6,3 @@ import { animate } from 'motion';

const transitionTextSequence = (props) => {
const { rootElement, contentElement, duration, isEntering, easing } = props;
const { rootElement, contentElement, duration, easing = 'linear', isEntering = true } = props;
const cloneElement = contentElement.cloneNode(true);

@@ -50,4 +50,4 @@ Object.assign(cloneElement.style, {

easing,
isEntering,
onChange: progress => {
direction: isEntering ? 'normal' : 'reverse',
onUpdate: progress => {
const newLength = Math.round(progress * length);

@@ -54,0 +54,0 @@ setTextNodesContent(textNodes, texts, newLength);

@@ -1,2 +0,2 @@

import { easing } from '@arwes/animated';
import { type easing } from '@arwes/animated';
export type TextTransitionManager = 'sequence' | 'decipher';

@@ -3,0 +3,0 @@ export interface TextTransitionProps {

@@ -54,3 +54,3 @@ declare module '@arwes/text/getTransitionTextDuration/getTransitionTextDuration' {

declare module '@arwes/text/transitionTextDecipher/transitionTextDecipher' {
import { Animation } from '@arwes/animated';
import { type Animation } from '@arwes/animated';
import type { TextTransitionProps } from '@arwes/text/types';

@@ -66,3 +66,3 @@ const transitionTextDecipher: (props: TextTransitionProps) => Animation;

declare module '@arwes/text/transitionTextSequence/transitionTextSequence' {
import { Animation } from '@arwes/animated';
import { type Animation } from '@arwes/animated';
import type { TextTransitionProps } from '@arwes/text/types';

@@ -74,3 +74,3 @@ const transitionTextSequence: (props: TextTransitionProps) => Animation;

declare module '@arwes/text/types' {
import { easing } from '@arwes/animated';
import { type easing } from '@arwes/animated';
export type TextTransitionManager = 'sequence' | 'decipher';

@@ -77,0 +77,0 @@ export interface TextTransitionProps {

@@ -196,3 +196,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

const transitionTextDecipher = (props) => {
const { rootElement, contentElement, duration, isEntering = true, easing = 'linear' } = props;
const { rootElement, contentElement, duration, easing = 'linear', isEntering = true } = props;
const cloneElement = contentElement.cloneNode(true);

@@ -229,4 +229,4 @@ Object.assign(cloneElement.style, {

easing,
isEntering,
onChange: progress => {
direction: isEntering ? 'normal' : 'reverse',
onUpdate: progress => {
// When entering, the animation decipher characters over time.

@@ -289,3 +289,3 @@ // When exiting, the animation will cipher characters over time.

const transitionTextSequence = (props) => {
const { rootElement, contentElement, duration, isEntering, easing } = props;
const { rootElement, contentElement, duration, easing = 'linear', isEntering = true } = props;
const cloneElement = contentElement.cloneNode(true);

@@ -333,4 +333,4 @@ Object.assign(cloneElement.style, {

easing,
isEntering,
onChange: progress => {
direction: isEntering ? 'normal' : 'reverse',
onUpdate: progress => {
const newLength = Math.round(progress * length);

@@ -337,0 +337,0 @@ (0, index_2.setTextNodesContent)(textNodes, texts, newLength);

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.arwes=t():(e.arwes=e.arwes||{},e.arwes.umd=t())}(self,(()=>(()=>{var e={52:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransitionTextDuration=void 0,t.getTransitionTextDuration=e=>{const{length:t,maxDuration:n=4,cps:r=400}=e,o=1e3/r*t/1e3;return Math.min(o,n)}},140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(52),t)},368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(163);r.__exportStar(n(513),t),r.__exportStar(n(377),t),r.__exportStar(n(313),t),r.__exportStar(n(140),t)},829:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(455),t)},455:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTextNodesContent=void 0,t.setTextNodesContent=(e,t,n)=>{let r=0;for(let o=0;o<e.length;o++){const i=e[o],a=t[o],c=r+a.length;if(c<=n)i.textContent!==a&&(i.textContent=a);else if(r<=n){const e=n-r,t=a.substring(0,e);i.textContent!==t&&(i.textContent=t)}else""!==i.textContent&&(i.textContent="");r=c}}},90:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(151),t)},151:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walkTextNodes=void 0;const n=(e,t)=>{Array.from(e.childNodes).forEach((e=>{e.nodeType===Node.TEXT_NODE?t(e):e.nodeType===Node.ELEMENT_NODE&&n(e,t)}))};t.walkTextNodes=n},313:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(145),t)},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transitionTextDecipher=void 0;const r=n(954),o=n(29),i=n(90),a=n(829),c="abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ>!·$%&/()=?¿≤|@#";t.transitionTextDecipher=e=>{const{rootElement:t,contentElement:n,duration:l,isEntering:s=!0,easing:u="linear"}=e,f=n.cloneNode(!0);Object.assign(f.style,{position:"absolute",left:0,right:0,top:0,bottom:0,visibility:"visible",opacity:1});const p=[],d=[];(0,i.walkTextNodes)(f,(e=>{p.push(e),d.push(e.textContent||"")}));const y=d.join("").length,b=(0,r.randomizeList)(Array(y).fill(null).map(((e,t)=>t))),h={};t.appendChild(f),n.style.visibility="hidden";const _=()=>{n.style.visibility=s?"visible":"hidden",f.remove()};return(0,o.createAnimation)({duration:l,easing:u,isEntering:s,onChange:e=>{const t=Math.round(y*e);for(let e=0;e<y;e++)h[b[e]]=e<t;const n=d.map((e=>e.split("").map(((e,t)=>" "===e?" ":h[t]?e:c[Math.round(Math.random()*(c.length-1))])).join("")));(0,a.setTextNodesContent)(p,n,y)},onCancel:_,onComplete:_})}},377:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(309),t)},309:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transitionTextSequence=void 0;const r=n(383),o=n(29),i=n(90),a=n(829);t.transitionTextSequence=e=>{const{rootElement:t,contentElement:n,duration:c,isEntering:l,easing:s}=e,u=n.cloneNode(!0);Object.assign(u.style,{position:"absolute",left:0,right:0,top:0,bottom:0,visibility:"visible",opacity:1});const f=document.createElement("span");f.innerHTML="&#9614;",Object.assign(f.style,{position:"relative",display:"inline-block",width:0,height:0,lineHeight:"0",color:"inherit"});const p=[],d=[];(0,i.walkTextNodes)(u,(e=>{p.push(e),d.push(e.textContent||""),l&&(e.textContent="")}));const y=d.join("").length;t.appendChild(u),u.appendChild(f),n.style.visibility="hidden";const b=(0,r.animate)(f,{color:["transparent","inherit","transparent"]},{duration:.1,easing:"steps(2, end)",repeat:1/0}),h=()=>{n.style.visibility=l?"visible":"hidden",u.remove(),b.cancel()};return(0,o.createAnimation)({duration:c,easing:s,isEntering:l,onChange:e=>{const t=Math.round(e*y);(0,a.setTextNodesContent)(p,d,t)},onComplete:h,onCancel:h})}},513:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>g,__asyncGenerator:()=>m,__asyncValues:()=>x,__await:()=>w,__awaiter:()=>u,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>C,__classPrivateFieldSet:()=>E,__createBinding:()=>p,__decorate:()=>c,__exportStar:()=>d,__extends:()=>o,__generator:()=>f,__importDefault:()=>S,__importStar:()=>P,__makeTemplateObject:()=>O,__metadata:()=>s,__param:()=>l,__read:()=>b,__rest:()=>a,__spread:()=>h,__spreadArray:()=>v,__spreadArrays:()=>_,__values:()=>y});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function c(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}l((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}var p=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function d(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||p(t,e,n)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function _(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r}function v(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||c(e,t)}))})}function c(e,t){try{(n=o[e](t)).value instanceof w?Promise.resolve(n.value.v).then(l,s):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function l(e){c("next",e)}function s(e){c("throw",e)}function u(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function g(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function P(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return j(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function E(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function C(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},29:e=>{e.exports=window.arwes.animated},954:e=>{e.exports=window.arwes.tools},383:e=>{e.exports=window.motion}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(368)})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.arwes=t():(e.arwes=e.arwes||{},e.arwes.umd=t())}(self,(()=>(()=>{var e={52:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransitionTextDuration=void 0,t.getTransitionTextDuration=e=>{const{length:t,maxDuration:n=4,cps:r=400}=e,o=1e3/r*t/1e3;return Math.min(o,n)}},140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(52),t)},368:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(163);r.__exportStar(n(513),t),r.__exportStar(n(377),t),r.__exportStar(n(313),t),r.__exportStar(n(140),t)},829:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(455),t)},455:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setTextNodesContent=void 0,t.setTextNodesContent=(e,t,n)=>{let r=0;for(let o=0;o<e.length;o++){const i=e[o],a=t[o],c=r+a.length;if(c<=n)i.textContent!==a&&(i.textContent=a);else if(r<=n){const e=n-r,t=a.substring(0,e);i.textContent!==t&&(i.textContent=t)}else""!==i.textContent&&(i.textContent="");r=c}}},90:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(151),t)},151:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walkTextNodes=void 0;const n=(e,t)=>{Array.from(e.childNodes).forEach((e=>{e.nodeType===Node.TEXT_NODE?t(e):e.nodeType===Node.ELEMENT_NODE&&n(e,t)}))};t.walkTextNodes=n},313:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(145),t)},145:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transitionTextDecipher=void 0;const r=n(954),o=n(29),i=n(90),a=n(829),c="abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ>!·$%&/()=?¿≤|@#";t.transitionTextDecipher=e=>{const{rootElement:t,contentElement:n,duration:l,easing:s="linear",isEntering:u=!0}=e,f=n.cloneNode(!0);Object.assign(f.style,{position:"absolute",left:0,right:0,top:0,bottom:0,visibility:"visible",opacity:1});const p=[],d=[];(0,i.walkTextNodes)(f,(e=>{p.push(e),d.push(e.textContent||"")}));const y=d.join("").length,b=(0,r.randomizeList)(Array(y).fill(null).map(((e,t)=>t))),_={};t.appendChild(f),n.style.visibility="hidden";const h=()=>{n.style.visibility=u?"visible":"hidden",f.remove()};return(0,o.createAnimation)({duration:l,easing:s,direction:u?"normal":"reverse",onUpdate:e=>{const t=Math.round(y*e);for(let e=0;e<y;e++)_[b[e]]=e<t;const n=d.map((e=>e.split("").map(((e,t)=>" "===e?" ":_[t]?e:c[Math.round(Math.random()*(c.length-1))])).join("")));(0,a.setTextNodesContent)(p,n,y)},onCancel:h,onComplete:h})}},377:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(163).__exportStar(n(309),t)},309:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transitionTextSequence=void 0;const r=n(383),o=n(29),i=n(90),a=n(829);t.transitionTextSequence=e=>{const{rootElement:t,contentElement:n,duration:c,easing:l="linear",isEntering:s=!0}=e,u=n.cloneNode(!0);Object.assign(u.style,{position:"absolute",left:0,right:0,top:0,bottom:0,visibility:"visible",opacity:1});const f=document.createElement("span");f.innerHTML="&#9614;",Object.assign(f.style,{position:"relative",display:"inline-block",width:0,height:0,lineHeight:"0",color:"inherit"});const p=[],d=[];(0,i.walkTextNodes)(u,(e=>{p.push(e),d.push(e.textContent||""),s&&(e.textContent="")}));const y=d.join("").length;t.appendChild(u),u.appendChild(f),n.style.visibility="hidden";const b=(0,r.animate)(f,{color:["transparent","inherit","transparent"]},{duration:.1,easing:"steps(2, end)",repeat:1/0}),_=()=>{n.style.visibility=s?"visible":"hidden",u.remove(),b.cancel()};return(0,o.createAnimation)({duration:c,easing:l,direction:s?"normal":"reverse",onUpdate:e=>{const t=Math.round(e*y);(0,a.setTextNodesContent)(p,d,t)},onComplete:_,onCancel:_})}},513:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>x,__asyncGenerator:()=>m,__asyncValues:()=>g,__await:()=>w,__awaiter:()=>u,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>C,__classPrivateFieldSet:()=>E,__createBinding:()=>p,__decorate:()=>c,__exportStar:()=>d,__extends:()=>o,__generator:()=>f,__importDefault:()=>S,__importStar:()=>P,__makeTemplateObject:()=>O,__metadata:()=>s,__param:()=>l,__read:()=>b,__rest:()=>a,__spread:()=>_,__spreadArray:()=>v,__spreadArrays:()=>h,__values:()=>y});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function c(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}l((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}var p=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function d(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||p(t,e,n)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function h(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,c=i.length;a<c;a++,o++)r[o]=i[a];return r}function v(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||c(e,t)}))})}function c(e,t){try{(n=o[e](t)).value instanceof w?Promise.resolve(n.value.v).then(l,s):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function l(e){c("next",e)}function s(e){c("throw",e)}function u(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function x(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function P(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return j(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function E(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function C(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},29:e=>{e.exports=window.arwes.animated},954:e=>{e.exports=window.arwes.tools},383:e=>{e.exports=window.motion}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(368)})()));
{
"name": "@arwes/text",
"version": "1.0.0-next.3",
"version": "1.0.0-next.4",
"publishConfig": {

@@ -44,4 +44,4 @@ "access": "public"

"peerDependencies": {
"@arwes/animated": "^1.0.0-next.2",
"@arwes/tools": "^1.0.0-next.2",
"@arwes/animated": "^1.0.0-next.3",
"@arwes/tools": "^1.0.0-next.3",
"motion": "10"

@@ -60,3 +60,3 @@ },

},
"gitHead": "20ce1a26d6f4fd360d54a99dc172c5b24bef070e"
"gitHead": "9ca9ad7a93ddf448f854f272caa6316a03c96e36"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc