@chayns-components/typewriter 5.0.0-beta.48
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.
- package/LICENSE +21 -0
- package/lib/components/typewriter/Typewriter.d.ts +9 -0
- package/lib/components/typewriter/Typewriter.js +45 -0
- package/lib/components/typewriter/Typewriter.js.map +1 -0
- package/lib/components/typewriter/Typewriter.styles.d.ts +8 -0
- package/lib/components/typewriter/Typewriter.styles.js +33 -0
- package/lib/components/typewriter/Typewriter.styles.js.map +1 -0
- package/lib/components/typewriter/utils.d.ts +1 -0
- package/lib/components/typewriter/utils.js +44 -0
- package/lib/components/typewriter/utils.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Tobit Laboratories AG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _Typewriter = require("./Typewriter.styles");
|
|
9
|
+
var _utils = require("./utils");
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
const Typewriter = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children
|
|
15
|
+
} = _ref;
|
|
16
|
+
const [shownCharCount, setShownCharCount] = (0, _react.useState)(0);
|
|
17
|
+
const shownText = (0, _react.useMemo)(() => (0, _utils.getSubTextFromHTML)(children, shownCharCount), [children, shownCharCount]);
|
|
18
|
+
(0, _react.useEffect)(() => {
|
|
19
|
+
setShownCharCount(0);
|
|
20
|
+
const interval = window.setInterval(() => {
|
|
21
|
+
setShownCharCount(prevState => {
|
|
22
|
+
const nextState = prevState + 1;
|
|
23
|
+
if (nextState === children.length) {
|
|
24
|
+
window.clearInterval(interval);
|
|
25
|
+
}
|
|
26
|
+
return nextState;
|
|
27
|
+
});
|
|
28
|
+
}, 25);
|
|
29
|
+
return () => {
|
|
30
|
+
window.clearInterval(interval);
|
|
31
|
+
};
|
|
32
|
+
}, [children.length]);
|
|
33
|
+
const isAnimatingText = shownCharCount !== children.length;
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_Typewriter.StyledTypewriter, null, /*#__PURE__*/_react.default.createElement(_Typewriter.StyledTypewriterText, {
|
|
35
|
+
shouldUseAbsolutePosition: isAnimatingText
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
37
|
+
dangerouslySetInnerHTML: {
|
|
38
|
+
__html: shownText
|
|
39
|
+
}
|
|
40
|
+
}), /*#__PURE__*/_react.default.createElement(_Typewriter.StyledTypewriterCursor, null)), isAnimatingText && /*#__PURE__*/_react.default.createElement(_Typewriter.StyledTypewriterPseudoText, null, children));
|
|
41
|
+
};
|
|
42
|
+
Typewriter.displayName = 'Typewriter';
|
|
43
|
+
var _default = Typewriter;
|
|
44
|
+
exports.default = _default;
|
|
45
|
+
//# sourceMappingURL=Typewriter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typewriter.js","names":["Typewriter","children","shownCharCount","setShownCharCount","useState","shownText","useMemo","getSubTextFromHTML","useEffect","interval","window","setInterval","prevState","nextState","length","clearInterval","isAnimatingText","__html","displayName"],"sources":["../../../src/components/typewriter/Typewriter.tsx"],"sourcesContent":["import React, { FC, useEffect, useMemo, useState } from 'react';\nimport {\n StyledTypewriter,\n StyledTypewriterCursor,\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: string;\n};\n\nconst Typewriter: FC<TypewriterProps> = ({ children }) => {\n const [shownCharCount, setShownCharCount] = useState(0);\n\n const shownText = useMemo(\n () => getSubTextFromHTML(children, shownCharCount),\n [children, shownCharCount]\n );\n\n useEffect(() => {\n setShownCharCount(0);\n\n const interval = window.setInterval(() => {\n setShownCharCount((prevState) => {\n const nextState = prevState + 1;\n\n if (nextState === children.length) {\n window.clearInterval(interval);\n }\n\n return nextState;\n });\n }, 25);\n\n return () => {\n window.clearInterval(interval);\n };\n }, [children.length]);\n\n const isAnimatingText = shownCharCount !== children.length;\n\n return (\n <StyledTypewriter>\n <StyledTypewriterText shouldUseAbsolutePosition={isAnimatingText}>\n <span dangerouslySetInnerHTML={{ __html: shownText }} />\n <StyledTypewriterCursor />\n </StyledTypewriterText>\n {isAnimatingText && <StyledTypewriterPseudoText>{children}</StyledTypewriterPseudoText>}\n </StyledTypewriter>\n );\n};\n\nTypewriter.displayName = 'Typewriter';\n\nexport default Typewriter;\n"],"mappings":";;;;;;AAAA;AACA;AAMA;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;EAEvD,MAAMC,SAAS,GAAG,IAAAC,cAAO,EACrB,MAAM,IAAAC,yBAAkB,EAACN,QAAQ,EAAEC,cAAc,CAAC,EAClD,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAC7B;EAED,IAAAM,gBAAS,EAAC,MAAM;IACZL,iBAAiB,CAAC,CAAC,CAAC;IAEpB,MAAMM,QAAQ,GAAGC,MAAM,CAACC,WAAW,CAAC,MAAM;MACtCR,iBAAiB,CAAES,SAAS,IAAK;QAC7B,MAAMC,SAAS,GAAGD,SAAS,GAAG,CAAC;QAE/B,IAAIC,SAAS,KAAKZ,QAAQ,CAACa,MAAM,EAAE;UAC/BJ,MAAM,CAACK,aAAa,CAACN,QAAQ,CAAC;QAClC;QAEA,OAAOI,SAAS;MACpB,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC;IAEN,OAAO,MAAM;MACTH,MAAM,CAACK,aAAa,CAACN,QAAQ,CAAC;IAClC,CAAC;EACL,CAAC,EAAE,CAACR,QAAQ,CAACa,MAAM,CAAC,CAAC;EAErB,MAAME,eAAe,GAAGd,cAAc,KAAKD,QAAQ,CAACa,MAAM;EAE1D,oBACI,6BAAC,4BAAgB,qBACb,6BAAC,gCAAoB;IAAC,yBAAyB,EAAEE;EAAgB,gBAC7D;IAAM,uBAAuB,EAAE;MAAEC,MAAM,EAAEZ;IAAU;EAAE,EAAG,eACxD,6BAAC,kCAAsB,OAAG,CACP,EACtBW,eAAe,iBAAI,6BAAC,sCAA0B,QAAEf,QAAQ,CAA8B,CACxE;AAE3B,CAAC;AAEDD,UAAU,CAACkB,WAAW,GAAG,YAAY;AAAC,eAEvBlB,UAAU;AAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const StyledTypewriter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const StyledTypewriterCursor: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
|
+
export declare const StyledTypewriterPseudoText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
type StyledTypewriterTextProps = {
|
|
5
|
+
shouldUseAbsolutePosition: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const StyledTypewriterText: import("styled-components").StyledComponent<"div", any, StyledTypewriterTextProps, never>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledTypewriterText = exports.StyledTypewriterPseudoText = exports.StyledTypewriterCursor = exports.StyledTypewriter = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
const StyledTypewriter = _styledComponents.default.div`
|
|
10
|
+
position: relative;
|
|
11
|
+
`;
|
|
12
|
+
exports.StyledTypewriter = StyledTypewriter;
|
|
13
|
+
const StyledTypewriterCursor = _styledComponents.default.span`
|
|
14
|
+
height: 1em;
|
|
15
|
+
width: 1em;
|
|
16
|
+
`;
|
|
17
|
+
exports.StyledTypewriterCursor = StyledTypewriterCursor;
|
|
18
|
+
const StyledTypewriterPseudoText = _styledComponents.default.div`
|
|
19
|
+
opacity: 0;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
user-select: none;
|
|
22
|
+
`;
|
|
23
|
+
exports.StyledTypewriterPseudoText = StyledTypewriterPseudoText;
|
|
24
|
+
const StyledTypewriterText = _styledComponents.default.div`
|
|
25
|
+
position: ${_ref => {
|
|
26
|
+
let {
|
|
27
|
+
shouldUseAbsolutePosition
|
|
28
|
+
} = _ref;
|
|
29
|
+
return shouldUseAbsolutePosition ? 'absolute' : 'relative';
|
|
30
|
+
}};
|
|
31
|
+
`;
|
|
32
|
+
exports.StyledTypewriterText = StyledTypewriterText;
|
|
33
|
+
//# sourceMappingURL=Typewriter.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typewriter.styles.js","names":["StyledTypewriter","styled","div","StyledTypewriterCursor","span","StyledTypewriterPseudoText","StyledTypewriterText","shouldUseAbsolutePosition"],"sources":["../../../src/components/typewriter/Typewriter.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledTypewriter = styled.div`\n position: relative;\n`;\n\nexport const StyledTypewriterCursor = styled.span`\n height: 1em;\n width: 1em;\n`;\n\nexport const StyledTypewriterPseudoText = styled.div`\n opacity: 0;\n pointer-events: none;\n user-select: none;\n`;\n\ntype StyledTypewriterTextProps = {\n shouldUseAbsolutePosition: boolean;\n};\n\nexport const StyledTypewriterText = styled.div<StyledTypewriterTextProps>`\n position: ${({ shouldUseAbsolutePosition }) =>\n shouldUseAbsolutePosition ? 'absolute' : 'relative'};\n`;\n"],"mappings":";;;;;;AAAA;AAAuC;AAEhC,MAAMA,gBAAgB,GAAGC,yBAAM,CAACC,GAAI;AAC3C;AACA,CAAC;AAAC;AAEK,MAAMC,sBAAsB,GAAGF,yBAAM,CAACG,IAAK;AAClD;AACA;AACA,CAAC;AAAC;AAEK,MAAMC,0BAA0B,GAAGJ,yBAAM,CAACC,GAAI;AACrD;AACA;AACA;AACA,CAAC;AAAC;AAMK,MAAMI,oBAAoB,GAAGL,yBAAM,CAACC,GAA+B;AAC1E,gBAAgB;EAAA,IAAC;IAAEK;EAA0B,CAAC;EAAA,OACtCA,yBAAyB,GAAG,UAAU,GAAG,UAAU;AAAA,CAAC;AAC5D,CAAC;AAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getSubTextFromHTML: (html: string, length: number) => string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSubTextFromHTML = void 0;
|
|
7
|
+
const getSubTextFromHTML = (html, length) => {
|
|
8
|
+
const div = document.createElement('div');
|
|
9
|
+
div.innerHTML = html;
|
|
10
|
+
let text = '';
|
|
11
|
+
let currLength = 0;
|
|
12
|
+
const traverse = node => {
|
|
13
|
+
if (node.nodeType === 3 && typeof node.textContent === 'string') {
|
|
14
|
+
const nodeText = node.textContent;
|
|
15
|
+
if (currLength + nodeText.length <= length) {
|
|
16
|
+
text += nodeText;
|
|
17
|
+
currLength += nodeText.length;
|
|
18
|
+
} else {
|
|
19
|
+
text += nodeText.substring(0, length - currLength);
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
} else if (node.nodeType === 1) {
|
|
23
|
+
const nodeName = node.nodeName.toLowerCase();
|
|
24
|
+
text += `<${nodeName}>`;
|
|
25
|
+
for (let i = 0; i < node.childNodes.length; i++) {
|
|
26
|
+
const childNode = node.childNodes[i];
|
|
27
|
+
if (childNode && !traverse(childNode)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
text += `</${nodeName}>`;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
};
|
|
35
|
+
for (let i = 0; i < div.childNodes.length; i++) {
|
|
36
|
+
const childNode = div.childNodes[i];
|
|
37
|
+
if (childNode && !traverse(childNode)) {
|
|
38
|
+
return text;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return text;
|
|
42
|
+
};
|
|
43
|
+
exports.getSubTextFromHTML = getSubTextFromHTML;
|
|
44
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":["getSubTextFromHTML","html","length","div","document","createElement","innerHTML","text","currLength","traverse","node","nodeType","textContent","nodeText","substring","nodeName","toLowerCase","i","childNodes","childNode"],"sources":["../../../src/components/typewriter/utils.ts"],"sourcesContent":["export const getSubTextFromHTML = (html: string, length: number): string => {\n const div = document.createElement('div');\n\n div.innerHTML = html;\n\n let text = '';\n let currLength = 0;\n\n const traverse = (node: Node): boolean => {\n if (node.nodeType === 3 && typeof node.textContent === 'string') {\n const nodeText = node.textContent;\n\n if (currLength + nodeText.length <= length) {\n text += nodeText;\n currLength += nodeText.length;\n } else {\n text += nodeText.substring(0, length - currLength);\n\n return false;\n }\n } else if (node.nodeType === 1) {\n const nodeName = node.nodeName.toLowerCase();\n\n text += `<${nodeName}>`;\n\n for (let i = 0; i < node.childNodes.length; i++) {\n const childNode = node.childNodes[i];\n\n if (childNode && !traverse(childNode)) {\n return false;\n }\n }\n\n text += `</${nodeName}>`;\n }\n\n return true;\n };\n\n for (let i = 0; i < div.childNodes.length; i++) {\n const childNode = div.childNodes[i];\n\n if (childNode && !traverse(childNode)) {\n return text;\n }\n }\n\n return text;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,kBAAkB,GAAG,CAACC,IAAY,EAAEC,MAAc,KAAa;EACxE,MAAMC,GAAG,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAEzCF,GAAG,CAACG,SAAS,GAAGL,IAAI;EAEpB,IAAIM,IAAI,GAAG,EAAE;EACb,IAAIC,UAAU,GAAG,CAAC;EAElB,MAAMC,QAAQ,GAAIC,IAAU,IAAc;IACtC,IAAIA,IAAI,CAACC,QAAQ,KAAK,CAAC,IAAI,OAAOD,IAAI,CAACE,WAAW,KAAK,QAAQ,EAAE;MAC7D,MAAMC,QAAQ,GAAGH,IAAI,CAACE,WAAW;MAEjC,IAAIJ,UAAU,GAAGK,QAAQ,CAACX,MAAM,IAAIA,MAAM,EAAE;QACxCK,IAAI,IAAIM,QAAQ;QAChBL,UAAU,IAAIK,QAAQ,CAACX,MAAM;MACjC,CAAC,MAAM;QACHK,IAAI,IAAIM,QAAQ,CAACC,SAAS,CAAC,CAAC,EAAEZ,MAAM,GAAGM,UAAU,CAAC;QAElD,OAAO,KAAK;MAChB;IACJ,CAAC,MAAM,IAAIE,IAAI,CAACC,QAAQ,KAAK,CAAC,EAAE;MAC5B,MAAMI,QAAQ,GAAGL,IAAI,CAACK,QAAQ,CAACC,WAAW,EAAE;MAE5CT,IAAI,IAAK,IAAGQ,QAAS,GAAE;MAEvB,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,IAAI,CAACQ,UAAU,CAAChB,MAAM,EAAEe,CAAC,EAAE,EAAE;QAC7C,MAAME,SAAS,GAAGT,IAAI,CAACQ,UAAU,CAACD,CAAC,CAAC;QAEpC,IAAIE,SAAS,IAAI,CAACV,QAAQ,CAACU,SAAS,CAAC,EAAE;UACnC,OAAO,KAAK;QAChB;MACJ;MAEAZ,IAAI,IAAK,KAAIQ,QAAS,GAAE;IAC5B;IAEA,OAAO,IAAI;EACf,CAAC;EAED,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGd,GAAG,CAACe,UAAU,CAAChB,MAAM,EAAEe,CAAC,EAAE,EAAE;IAC5C,MAAME,SAAS,GAAGhB,GAAG,CAACe,UAAU,CAACD,CAAC,CAAC;IAEnC,IAAIE,SAAS,IAAI,CAACV,QAAQ,CAACU,SAAS,CAAC,EAAE;MACnC,OAAOZ,IAAI;IACf;EACJ;EAEA,OAAOA,IAAI;AACf,CAAC;AAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Typewriter } from './components/typewriter/Typewriter';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Typewriter", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Typewriter.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _Typewriter = _interopRequireDefault(require("./components/typewriter/Typewriter"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chayns-components/typewriter",
|
|
3
|
+
"version": "5.0.0-beta.48",
|
|
4
|
+
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"chayns",
|
|
7
|
+
"react",
|
|
8
|
+
"components"
|
|
9
|
+
],
|
|
10
|
+
"author": "Tobit.Software",
|
|
11
|
+
"homepage": "https://github.com/TobitSoftware/chayns-components/tree/main/packages/typewriter#readme",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"main": "lib/index.js",
|
|
14
|
+
"types": "lib/index.d.ts",
|
|
15
|
+
"directories": {
|
|
16
|
+
"lib": "lib",
|
|
17
|
+
"test": "__tests__"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/TobitSoftware/chayns-components.git"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "npm run build:js && npm run build:types",
|
|
28
|
+
"build:js": "babel src --out-dir lib --extensions=.ts,.tsx --source-maps --ignore=src/stories",
|
|
29
|
+
"build:types": "tsc",
|
|
30
|
+
"prepublishOnly": "npm run build"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/TobitSoftware/chayns-components/issues"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@babel/cli": "^7.20.7",
|
|
37
|
+
"@babel/core": "^7.20.12",
|
|
38
|
+
"@babel/preset-env": "^7.20.2",
|
|
39
|
+
"@babel/preset-react": "^7.18.6",
|
|
40
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
41
|
+
"@types/react": "^17.0.53",
|
|
42
|
+
"@types/react-dom": "^17.0.18",
|
|
43
|
+
"@types/styled-components": "^5.1.26",
|
|
44
|
+
"@types/uuid": "^9.0.0",
|
|
45
|
+
"babel-loader": "^8.3.0",
|
|
46
|
+
"lerna": "^4.0.0",
|
|
47
|
+
"react": "^17.0.2",
|
|
48
|
+
"react-dom": "^17.0.2",
|
|
49
|
+
"typescript": "^4.9.4"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@chayns/colors": "^2.0.0",
|
|
53
|
+
"clsx": "^1.2.1",
|
|
54
|
+
"framer-motion": "^6.5.1",
|
|
55
|
+
"styled-components": "^5.3.6",
|
|
56
|
+
"uuid": "^9.0.0"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"react": ">=16.14.0",
|
|
60
|
+
"react-dom": ">=16.14.0"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
65
|
+
"gitHead": "fc6c1986b98d2ebe01a4e485f443c241d330fdb5"
|
|
66
|
+
}
|