@chayns-components/typewriter 5.0.0-beta.56 → 5.0.0-beta.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,15 @@
1
1
  import { FC, ReactElement } from 'react';
2
+ export declare enum TypewriterSpeed {
3
+ Slow = 40,
4
+ Medium = 30,
5
+ Fast = 20
6
+ }
2
7
  export type TypewriterProps = {
3
8
  /**
4
9
  * The text to type
5
10
  */
6
11
  children: ReactElement | string;
12
+ speed?: TypewriterSpeed;
7
13
  };
8
14
  declare const Typewriter: FC<TypewriterProps>;
9
15
  export default Typewriter;
@@ -3,16 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.default = exports.TypewriterSpeed = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _server = require("react-dom/server");
9
9
  var _Typewriter = require("./Typewriter.styles");
10
10
  var _utils = require("./utils");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ let TypewriterSpeed;
14
+ exports.TypewriterSpeed = TypewriterSpeed;
15
+ (function (TypewriterSpeed) {
16
+ TypewriterSpeed[TypewriterSpeed["Slow"] = 40] = "Slow";
17
+ TypewriterSpeed[TypewriterSpeed["Medium"] = 30] = "Medium";
18
+ TypewriterSpeed[TypewriterSpeed["Fast"] = 20] = "Fast";
19
+ })(TypewriterSpeed || (exports.TypewriterSpeed = TypewriterSpeed = {}));
13
20
  const Typewriter = _ref => {
14
21
  let {
15
- children
22
+ children,
23
+ speed = TypewriterSpeed.Medium
16
24
  } = _ref;
17
25
  const [shownCharCount, setShownCharCount] = (0, _react.useState)(0);
18
26
  const [shouldStopAnimation, setShouldStopAnimation] = (0, _react.useState)(false);
@@ -35,12 +43,12 @@ const Typewriter = _ref => {
35
43
  }
36
44
  return nextState;
37
45
  });
38
- }, 35);
46
+ }, speed);
39
47
  }
40
48
  return () => {
41
49
  window.clearInterval(interval);
42
50
  };
43
- }, [shouldStopAnimation, textContent.length]);
51
+ }, [shouldStopAnimation, speed, textContent.length]);
44
52
  const shownText = (0, _react.useMemo)(() => (0, _utils.getSubTextFromHTML)(textContent, shownCharCount), [shownCharCount, textContent]);
45
53
  return /*#__PURE__*/_react.default.createElement(_Typewriter.StyledTypewriter, {
46
54
  onClick: handleClick
@@ -1 +1 @@
1
- {"version":3,"file":"Typewriter.js","names":["Typewriter","children","shownCharCount","setShownCharCount","useState","shouldStopAnimation","setShouldStopAnimation","textContent","React","isValidElement","renderToString","isAnimatingText","length","handleClick","useCallback","useEffect","interval","window","setInterval","prevState","nextState","clearInterval","shownText","useMemo","getSubTextFromHTML","__html","displayName"],"sources":["../../../src/components/typewriter/Typewriter.tsx"],"sourcesContent":["import React, { FC, ReactElement, useCallback, useEffect, useMemo, useState } from 'react';\nimport { renderToString } from 'react-dom/server';\nimport {\n StyledTypewriter,\n StyledTypewriterPseudoText,\n StyledTypewriterText,\n} from './Typewriter.styles';\nimport { getSubTextFromHTML } from './utils';\n\nexport type TypewriterProps = {\n /**\n * The text to type\n */\n children: ReactElement | string;\n};\n\nconst Typewriter: FC<TypewriterProps> = ({ children }) => {\n const [shownCharCount, setShownCharCount] = useState(0);\n const [shouldStopAnimation, setShouldStopAnimation] = useState(false);\n\n const textContent = React.isValidElement(children) ? renderToString(children) : children;\n\n const isAnimatingText = shownCharCount !== textContent.length;\n\n const handleClick = useCallback(() => {\n setShouldStopAnimation(true);\n }, []);\n\n useEffect(() => {\n let interval: number | undefined;\n\n if (shouldStopAnimation) {\n setShownCharCount(textContent.length);\n } else {\n setShownCharCount(0);\n\n interval = window.setInterval(() => {\n setShownCharCount((prevState) => {\n const nextState = prevState + 1;\n\n if (nextState === textContent.length) {\n window.clearInterval(interval);\n }\n\n return nextState;\n });\n }, 35);\n }\n\n return () => {\n window.clearInterval(interval);\n };\n }, [shouldStopAnimation, textContent.length]);\n\n const shownText = useMemo(\n () => getSubTextFromHTML(textContent, shownCharCount),\n [shownCharCount, textContent]\n );\n\n return (\n <StyledTypewriter onClick={handleClick}>\n <StyledTypewriterText\n dangerouslySetInnerHTML={{ __html: shownText }}\n isAnimatingText={isAnimatingText}\n />\n {isAnimatingText && <StyledTypewriterPseudoText>{children}</StyledTypewriterPseudoText>}\n </StyledTypewriter>\n );\n};\n\nTypewriter.displayName = 'Typewriter';\n\nexport default Typewriter;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAKA;AAA6C;AAAA;AAS7C,MAAMA,UAA+B,GAAG,QAAkB;EAAA,IAAjB;IAAEC;EAAS,CAAC;EACjD,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAC,CAAC,CAAC;EACvD,MAAM,CAACC,mBAAmB,EAAEC,sBAAsB,CAAC,GAAG,IAAAF,eAAQ,EAAC,KAAK,CAAC;EAErE,MAAMG,WAAW,GAAG,aAAAC,cAAK,CAACC,cAAc,CAACR,QAAQ,CAAC,GAAG,IAAAS,sBAAc,EAACT,QAAQ,CAAC,GAAGA,QAAQ;EAExF,MAAMU,eAAe,GAAGT,cAAc,KAAKK,WAAW,CAACK,MAAM;EAE7D,MAAMC,WAAW,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAClCR,sBAAsB,CAAC,IAAI,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAS,gBAAS,EAAC,MAAM;IACZ,IAAIC,QAA4B;IAEhC,IAAIX,mBAAmB,EAAE;MACrBF,iBAAiB,CAACI,WAAW,CAACK,MAAM,CAAC;IACzC,CAAC,MAAM;MACHT,iBAAiB,CAAC,CAAC,CAAC;MAEpBa,QAAQ,GAAGC,MAAM,CAACC,WAAW,CAAC,MAAM;QAChCf,iBAAiB,CAAEgB,SAAS,IAAK;UAC7B,MAAMC,SAAS,GAAGD,SAAS,GAAG,CAAC;UAE/B,IAAIC,SAAS,KAAKb,WAAW,CAACK,MAAM,EAAE;YAClCK,MAAM,CAACI,aAAa,CAACL,QAAQ,CAAC;UAClC;UAEA,OAAOI,SAAS;QACpB,CAAC,CAAC;MACN,CAAC,EAAE,EAAE,CAAC;IACV;IAEA,OAAO,MAAM;MACTH,MAAM,CAACI,aAAa,CAACL,QAAQ,CAAC;IAClC,CAAC;EACL,CAAC,EAAE,CAACX,mBAAmB,EAAEE,WAAW,CAACK,MAAM,CAAC,CAAC;EAE7C,MAAMU,SAAS,GAAG,IAAAC,cAAO,EACrB,MAAM,IAAAC,yBAAkB,EAACjB,WAAW,EAAEL,cAAc,CAAC,EACrD,CAACA,cAAc,EAAEK,WAAW,CAAC,CAChC;EAED,oBACI,6BAAC,4BAAgB;IAAC,OAAO,EAAEM;EAAY,gBACnC,6BAAC,gCAAoB;IACjB,uBAAuB,EAAE;MAAEY,MAAM,EAAEH;IAAU,CAAE;IAC/C,eAAe,EAAEX;EAAgB,EACnC,EACDA,eAAe,iBAAI,6BAAC,sCAA0B,QAAEV,QAAQ,CAA8B,CACxE;AAE3B,CAAC;AAEDD,UAAU,CAAC0B,WAAW,GAAG,YAAY;AAAC,eAEvB1B,UAAU;AAAA"}
1
+ {"version":3,"file":"Typewriter.js","names":["TypewriterSpeed","Typewriter","children","speed","Medium","shownCharCount","setShownCharCount","useState","shouldStopAnimation","setShouldStopAnimation","textContent","React","isValidElement","renderToString","isAnimatingText","length","handleClick","useCallback","useEffect","interval","window","setInterval","prevState","nextState","clearInterval","shownText","useMemo","getSubTextFromHTML","__html","displayName"],"sources":["../../../src/components/typewriter/Typewriter.tsx"],"sourcesContent":["import React, { FC, ReactElement, useCallback, useEffect, useMemo, useState } from 'react';\nimport { renderToString } from 'react-dom/server';\nimport {\n StyledTypewriter,\n StyledTypewriterPseudoText,\n StyledTypewriterText,\n} from './Typewriter.styles';\nimport { getSubTextFromHTML } from './utils';\n\nexport enum TypewriterSpeed {\n Slow = 40,\n Medium = 30,\n Fast = 20,\n}\n\nexport type TypewriterProps = {\n /**\n * The text to type\n */\n children: ReactElement | string;\n speed?: TypewriterSpeed;\n};\n\nconst Typewriter: FC<TypewriterProps> = ({ children, speed = TypewriterSpeed.Medium }) => {\n const [shownCharCount, setShownCharCount] = useState(0);\n const [shouldStopAnimation, setShouldStopAnimation] = useState(false);\n\n const textContent = React.isValidElement(children) ? renderToString(children) : children;\n\n const isAnimatingText = shownCharCount !== textContent.length;\n\n const handleClick = useCallback(() => {\n setShouldStopAnimation(true);\n }, []);\n\n useEffect(() => {\n let interval: number | undefined;\n\n if (shouldStopAnimation) {\n setShownCharCount(textContent.length);\n } else {\n setShownCharCount(0);\n\n interval = window.setInterval(() => {\n setShownCharCount((prevState) => {\n const nextState = prevState + 1;\n\n if (nextState === textContent.length) {\n window.clearInterval(interval);\n }\n\n return nextState;\n });\n }, speed);\n }\n\n return () => {\n window.clearInterval(interval);\n };\n }, [shouldStopAnimation, speed, textContent.length]);\n\n const shownText = useMemo(\n () => getSubTextFromHTML(textContent, shownCharCount),\n [shownCharCount, textContent]\n );\n\n return (\n <StyledTypewriter onClick={handleClick}>\n <StyledTypewriterText\n dangerouslySetInnerHTML={{ __html: shownText }}\n isAnimatingText={isAnimatingText}\n />\n {isAnimatingText && <StyledTypewriterPseudoText>{children}</StyledTypewriterPseudoText>}\n </StyledTypewriter>\n );\n};\n\nTypewriter.displayName = 'Typewriter';\n\nexport default Typewriter;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAKA;AAA6C;AAAA;AAAA,IAEjCA,eAAe;AAAA;AAAA,WAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;AAAA,GAAfA,eAAe,+BAAfA,eAAe;AAc3B,MAAMC,UAA+B,GAAG,QAAkD;EAAA,IAAjD;IAAEC,QAAQ;IAAEC,KAAK,GAAGH,eAAe,CAACI;EAAO,CAAC;EACjF,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAC,CAAC,CAAC;EACvD,MAAM,CAACC,mBAAmB,EAAEC,sBAAsB,CAAC,GAAG,IAAAF,eAAQ,EAAC,KAAK,CAAC;EAErE,MAAMG,WAAW,GAAG,aAAAC,cAAK,CAACC,cAAc,CAACV,QAAQ,CAAC,GAAG,IAAAW,sBAAc,EAACX,QAAQ,CAAC,GAAGA,QAAQ;EAExF,MAAMY,eAAe,GAAGT,cAAc,KAAKK,WAAW,CAACK,MAAM;EAE7D,MAAMC,WAAW,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAClCR,sBAAsB,CAAC,IAAI,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAS,gBAAS,EAAC,MAAM;IACZ,IAAIC,QAA4B;IAEhC,IAAIX,mBAAmB,EAAE;MACrBF,iBAAiB,CAACI,WAAW,CAACK,MAAM,CAAC;IACzC,CAAC,MAAM;MACHT,iBAAiB,CAAC,CAAC,CAAC;MAEpBa,QAAQ,GAAGC,MAAM,CAACC,WAAW,CAAC,MAAM;QAChCf,iBAAiB,CAAEgB,SAAS,IAAK;UAC7B,MAAMC,SAAS,GAAGD,SAAS,GAAG,CAAC;UAE/B,IAAIC,SAAS,KAAKb,WAAW,CAACK,MAAM,EAAE;YAClCK,MAAM,CAACI,aAAa,CAACL,QAAQ,CAAC;UAClC;UAEA,OAAOI,SAAS;QACpB,CAAC,CAAC;MACN,CAAC,EAAEpB,KAAK,CAAC;IACb;IAEA,OAAO,MAAM;MACTiB,MAAM,CAACI,aAAa,CAACL,QAAQ,CAAC;IAClC,CAAC;EACL,CAAC,EAAE,CAACX,mBAAmB,EAAEL,KAAK,EAAEO,WAAW,CAACK,MAAM,CAAC,CAAC;EAEpD,MAAMU,SAAS,GAAG,IAAAC,cAAO,EACrB,MAAM,IAAAC,yBAAkB,EAACjB,WAAW,EAAEL,cAAc,CAAC,EACrD,CAACA,cAAc,EAAEK,WAAW,CAAC,CAChC;EAED,oBACI,6BAAC,4BAAgB;IAAC,OAAO,EAAEM;EAAY,gBACnC,6BAAC,gCAAoB;IACjB,uBAAuB,EAAE;MAAEY,MAAM,EAAEH;IAAU,CAAE;IAC/C,eAAe,EAAEX;EAAgB,EACnC,EACDA,eAAe,iBAAI,6BAAC,sCAA0B,QAAEZ,QAAQ,CAA8B,CACxE;AAE3B,CAAC;AAEDD,UAAU,CAAC4B,WAAW,GAAG,YAAY;AAAC,eAEvB5B,UAAU;AAAA"}
@@ -8,6 +8,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
10
  const StyledTypewriter = _styledComponents.default.span`
11
+ display: flex;
11
12
  position: relative;
12
13
  `;
13
14
  exports.StyledTypewriter = StyledTypewriter;
@@ -35,6 +36,7 @@ const StyledTypewriterText = _styledComponents.default.span`
35
36
  } = _ref2;
36
37
  return isAnimatingText ? 'absolute' : 'relative';
37
38
  }};
39
+ width: 100%;
38
40
 
39
41
  ${_ref3 => {
40
42
  let {
@@ -1 +1 @@
1
- {"version":3,"file":"Typewriter.styles.js","names":["StyledTypewriter","styled","span","blinkAnimation","keyframes","StyledTypewriterPseudoText","StyledTypewriterText","theme","text","isAnimatingText","css"],"sources":["../../../src/components/typewriter/Typewriter.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport styled, { css, keyframes } from 'styled-components';\n\nexport const StyledTypewriter = styled.span`\n position: relative;\n`;\n\nconst blinkAnimation = keyframes`\n 100% {\n visibility: hidden;\n }\n`;\n\nexport const StyledTypewriterPseudoText = styled.span`\n opacity: 0;\n pointer-events: none;\n user-select: none;\n`;\n\ntype StyledTypewriterTextProps = WithTheme<{\n isAnimatingText: boolean;\n}>;\n\nexport const StyledTypewriterText = styled.span<StyledTypewriterTextProps>`\n color: ${({ theme }: StyledTypewriterTextProps) => theme.text};\n position: ${({ isAnimatingText }) => (isAnimatingText ? 'absolute' : 'relative')};\n\n ${({ isAnimatingText }) =>\n isAnimatingText &&\n css`\n &:after {\n animation: ${blinkAnimation} 1s steps(5, start) infinite;\n color: ${({ theme }: StyledTypewriterTextProps) => theme.text};\n content: '▋';\n margin-left: 0.25rem;\n opacity: 0.85;\n vertical-align: baseline;\n }\n `}\n`;\n"],"mappings":";;;;;;AACA;AAA2D;AAAA;AAEpD,MAAMA,gBAAgB,GAAGC,yBAAM,CAACC,IAAK;AAC5C;AACA,CAAC;AAAC;AAEF,MAAMC,cAAc,GAAG,IAAAC,2BAAS,CAAC;AACjC;AACA;AACA;AACA,CAAC;AAEM,MAAMC,0BAA0B,GAAGJ,yBAAM,CAACC,IAAK;AACtD;AACA;AACA;AACA,CAAC;AAAC;AAMK,MAAMI,oBAAoB,GAAGL,yBAAM,CAACC,IAAgC;AAC3E,aAAa;EAAA,IAAC;IAAEK;EAAiC,CAAC;EAAA,OAAKA,KAAK,CAACC,IAAI;AAAA,CAAC;AAClE,gBAAgB;EAAA,IAAC;IAAEC;EAAgB,CAAC;EAAA,OAAMA,eAAe,GAAG,UAAU,GAAG,UAAU;AAAA,CAAE;AACrF;AACA,MAAM;EAAA,IAAC;IAAEA;EAAgB,CAAC;EAAA,OAClBA,eAAe,IACf,IAAAC,qBAAG,CAAC;AACZ;AACA,6BAA6BP,cAAe;AAC5C,yBAAyB;IAAA,IAAC;MAAEI;IAAiC,CAAC;IAAA,OAAKA,KAAK,CAACC,IAAI;EAAA,CAAC;AAC9E;AACA;AACA;AACA;AACA;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAAC"}
1
+ {"version":3,"file":"Typewriter.styles.js","names":["StyledTypewriter","styled","span","blinkAnimation","keyframes","StyledTypewriterPseudoText","StyledTypewriterText","theme","text","isAnimatingText","css"],"sources":["../../../src/components/typewriter/Typewriter.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport styled, { css, keyframes } from 'styled-components';\n\nexport const StyledTypewriter = styled.span`\n display: flex;\n position: relative;\n`;\n\nconst blinkAnimation = keyframes`\n 100% {\n visibility: hidden;\n }\n`;\n\nexport const StyledTypewriterPseudoText = styled.span`\n opacity: 0;\n pointer-events: none;\n user-select: none;\n`;\n\ntype StyledTypewriterTextProps = WithTheme<{\n isAnimatingText: boolean;\n}>;\n\nexport const StyledTypewriterText = styled.span<StyledTypewriterTextProps>`\n color: ${({ theme }: StyledTypewriterTextProps) => theme.text};\n position: ${({ isAnimatingText }) => (isAnimatingText ? 'absolute' : 'relative')};\n width: 100%;\n\n ${({ isAnimatingText }) =>\n isAnimatingText &&\n css`\n &:after {\n animation: ${blinkAnimation} 1s steps(5, start) infinite;\n color: ${({ theme }: StyledTypewriterTextProps) => theme.text};\n content: '▋';\n margin-left: 0.25rem;\n opacity: 0.85;\n vertical-align: baseline;\n }\n `}\n`;\n"],"mappings":";;;;;;AACA;AAA2D;AAAA;AAEpD,MAAMA,gBAAgB,GAAGC,yBAAM,CAACC,IAAK;AAC5C;AACA;AACA,CAAC;AAAC;AAEF,MAAMC,cAAc,GAAG,IAAAC,2BAAS,CAAC;AACjC;AACA;AACA;AACA,CAAC;AAEM,MAAMC,0BAA0B,GAAGJ,yBAAM,CAACC,IAAK;AACtD;AACA;AACA;AACA,CAAC;AAAC;AAMK,MAAMI,oBAAoB,GAAGL,yBAAM,CAACC,IAAgC;AAC3E,aAAa;EAAA,IAAC;IAAEK;EAAiC,CAAC;EAAA,OAAKA,KAAK,CAACC,IAAI;AAAA,CAAC;AAClE,gBAAgB;EAAA,IAAC;IAAEC;EAAgB,CAAC;EAAA,OAAMA,eAAe,GAAG,UAAU,GAAG,UAAU;AAAA,CAAE;AACrF;AACA;AACA,MAAM;EAAA,IAAC;IAAEA;EAAgB,CAAC;EAAA,OAClBA,eAAe,IACf,IAAAC,qBAAG,CAAC;AACZ;AACA,6BAA6BP,cAAe;AAC5C,yBAAyB;IAAA,IAAC;MAAEI;IAAiC,CAAC;IAAA,OAAKA,KAAK,CAACC,IAAI;EAAA,CAAC;AAC9E;AACA;AACA;AACA;AACA;AACA,SAAS;AAAA,CAAC;AACV,CAAC;AAAC"}
package/lib/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { default as Typewriter } from './components/typewriter/Typewriter';
1
+ export { default as Typewriter, TypewriterSpeed } from './components/typewriter/Typewriter';
package/lib/index.js CHANGED
@@ -9,6 +9,13 @@ Object.defineProperty(exports, "Typewriter", {
9
9
  return _Typewriter.default;
10
10
  }
11
11
  });
12
- var _Typewriter = _interopRequireDefault(require("./components/typewriter/Typewriter"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ Object.defineProperty(exports, "TypewriterSpeed", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _Typewriter.TypewriterSpeed;
16
+ }
17
+ });
18
+ var _Typewriter = _interopRequireWildcard(require("./components/typewriter/Typewriter"));
19
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
21
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export { default as Typewriter } from './components/typewriter/Typewriter';\n"],"mappings":";;;;;;;;;;;AAAA;AAA2E"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export { default as Typewriter, TypewriterSpeed } from './components/typewriter/Typewriter';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAA4F;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/typewriter",
3
- "version": "5.0.0-beta.56",
3
+ "version": "5.0.0-beta.58",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "keywords": [
6
6
  "chayns",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "27baa90fb0accd997bb09e646697afcfd42bd0df"
66
+ "gitHead": "48cba9f91f62edccd3c2f42aee3fb4bb38a88bef"
67
67
  }