From be8a8ab518ec08b768d8dd313fcc343fe53f8936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=5F?= Date: Tue, 28 Jun 2022 18:15:42 +0200 Subject: [PATCH] Fix dts and aad dts maps --- dist/@types/components/Cursor.d.ts | 1 + dist/@types/components/Cursor.d.ts.map | 1 + dist/@types/components/Parent.d.ts | 1 + dist/@types/components/Parent.d.ts.map | 1 + dist/@types/components/Tag/Attr/Attr.d.ts | 3 +- dist/@types/components/Tag/Attr/Attr.d.ts.map | 1 + dist/@types/components/Tag/Attr/AttrList.d.ts | 3 +- .../components/Tag/Attr/AttrList.d.ts.map | 1 + dist/@types/components/Tag/Closing.d.ts | 3 +- dist/@types/components/Tag/Closing.d.ts.map | 1 + dist/@types/components/Tag/Opening.d.ts | 3 +- dist/@types/components/Tag/Opening.d.ts.map | 1 + dist/@types/components/Tag/Tag.d.ts | 6 ++-- dist/@types/components/Tag/Tag.d.ts.map | 1 + dist/@types/components/Tag/index.d.ts | 1 + dist/@types/components/Tag/index.d.ts.map | 1 + dist/@types/components/Text.d.ts | 3 +- dist/@types/components/Text.d.ts.map | 1 + dist/@types/components/types.d.ts | 17 +++++++++++ dist/@types/components/types.d.ts.map | 1 + dist/@types/hooks/useHand.d.ts | 1 + dist/@types/hooks/useHand.d.ts.map | 1 + dist/@types/hooks/usePencil.d.ts | 1 + dist/@types/hooks/usePencil.d.ts.map | 1 + dist/@types/index.d.ts | 4 +-- dist/@types/index.d.ts.map | 1 + dist/@types/style/index.style.d.ts | 1 + dist/@types/style/index.style.d.ts.map | 1 + dist/@types/style/theme.style.d.ts | 1 + dist/@types/style/theme.style.d.ts.map | 1 + dist/@types/types.d.ts | 16 ---------- dist/@types/utils.d.ts | 1 + dist/@types/utils.d.ts.map | 1 + dist/react-html-writer.cjs.js | 10 +++---- dist/react-html-writer.es.js | 3 -- dist/tsconfig.tsbuildinfo | 2 +- lib/components/Cursor.tsx | 2 +- lib/components/Parent.tsx | 2 +- lib/components/Tag/Attr/Attr.tsx | 6 ++-- lib/components/Tag/Attr/AttrList.tsx | 4 +-- lib/components/Tag/Closing.tsx | 4 +-- lib/components/Tag/Opening.tsx | 6 ++-- lib/components/Tag/Tag.tsx | 11 ++++--- lib/components/Text.tsx | 9 ++---- lib/components/types.ts | 19 ++++++++++++ lib/hooks/usePencil.tsx | 2 +- lib/index.ts | 3 +- lib/styled-components.d.ts | 1 + lib/types.ts | 19 ------------ package-lock.json | 30 +++++++------------ package.json | 6 ++-- test/demo/main.tsx | 4 +-- tsconfig.json | 6 ++-- 53 files changed, 123 insertions(+), 108 deletions(-) create mode 100644 dist/@types/components/Cursor.d.ts.map create mode 100644 dist/@types/components/Parent.d.ts.map create mode 100644 dist/@types/components/Tag/Attr/Attr.d.ts.map create mode 100644 dist/@types/components/Tag/Attr/AttrList.d.ts.map create mode 100644 dist/@types/components/Tag/Closing.d.ts.map create mode 100644 dist/@types/components/Tag/Opening.d.ts.map create mode 100644 dist/@types/components/Tag/Tag.d.ts.map create mode 100644 dist/@types/components/Tag/index.d.ts.map create mode 100644 dist/@types/components/Text.d.ts.map create mode 100644 dist/@types/components/types.d.ts.map create mode 100644 dist/@types/hooks/useHand.d.ts.map create mode 100644 dist/@types/hooks/usePencil.d.ts.map create mode 100644 dist/@types/index.d.ts.map create mode 100644 dist/@types/style/index.style.d.ts.map create mode 100644 dist/@types/style/theme.style.d.ts.map delete mode 100644 dist/@types/types.d.ts create mode 100644 dist/@types/utils.d.ts.map delete mode 100644 lib/types.ts diff --git a/dist/@types/components/Cursor.d.ts b/dist/@types/components/Cursor.d.ts index c0a14cb..49335f1 100644 --- a/dist/@types/components/Cursor.d.ts +++ b/dist/@types/components/Cursor.d.ts @@ -5,3 +5,4 @@ interface CursorProps { } export default function Cursor({ blinkDeps, display }: CursorProps): JSX.Element; export {}; +//# sourceMappingURL=Cursor.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Cursor.d.ts.map b/dist/@types/components/Cursor.d.ts.map new file mode 100644 index 0000000..8c8c169 --- /dev/null +++ b/dist/@types/components/Cursor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Cursor.d.ts","sourceRoot":"","sources":["../../../lib/components/Cursor.tsx"],"names":[],"mappings":";AAGA,UAAU,WAAW;IACpB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,WAAW,eAgBjE"} \ No newline at end of file diff --git a/dist/@types/components/Parent.d.ts b/dist/@types/components/Parent.d.ts index 1b8e39a..2236e9a 100644 --- a/dist/@types/components/Parent.d.ts +++ b/dist/@types/components/Parent.d.ts @@ -7,3 +7,4 @@ interface ParentProps { } export default function Parent({ isChild, theme, children }: ParentProps): JSX.Element; export {}; +//# sourceMappingURL=Parent.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Parent.d.ts.map b/dist/@types/components/Parent.d.ts.map new file mode 100644 index 0000000..4214425 --- /dev/null +++ b/dist/@types/components/Parent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Parent.d.ts","sourceRoot":"","sources":["../../../lib/components/Parent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAiB,MAAM,mBAAmB,CAAA;AAExD,UAAU,WAAW;IACpB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,eAEvE"} \ No newline at end of file diff --git a/dist/@types/components/Tag/Attr/Attr.d.ts b/dist/@types/components/Tag/Attr/Attr.d.ts index d0aab0b..c6332fa 100644 --- a/dist/@types/components/Tag/Attr/Attr.d.ts +++ b/dist/@types/components/Tag/Attr/Attr.d.ts @@ -1,5 +1,5 @@ /// -import { PencilEvents } from '@lib/hooks/usePencil'; +import { PencilEvents } from '../../../hooks/usePencil'; interface AttrProps extends PencilEvents { content: Record<'key' | 'symbol' | 'quote1' | 'value' | 'quote2', string>; shouldWrite: boolean; @@ -7,3 +7,4 @@ interface AttrProps extends PencilEvents { } export default function Attr({ content, shouldWrite, shouldClean, onStart, onEnd }: AttrProps): JSX.Element; export {}; +//# sourceMappingURL=Attr.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Tag/Attr/Attr.d.ts.map b/dist/@types/components/Tag/Attr/Attr.d.ts.map new file mode 100644 index 0000000..f955ba9 --- /dev/null +++ b/dist/@types/components/Tag/Attr/Attr.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Attr.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Tag/Attr/Attr.tsx"],"names":[],"mappings":";AACA,OAAkB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AASlE,UAAU,SAAU,SAAQ,YAAY;IACvC,OAAO,EAAE,MAAM,CAAC,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,eAqB5F"} \ No newline at end of file diff --git a/dist/@types/components/Tag/Attr/AttrList.d.ts b/dist/@types/components/Tag/Attr/AttrList.d.ts index b50fed8..ed331c7 100644 --- a/dist/@types/components/Tag/Attr/AttrList.d.ts +++ b/dist/@types/components/Tag/Attr/AttrList.d.ts @@ -1,5 +1,5 @@ /// -import { ContainerEvents } from '@lib/hooks/usePencil'; +import { ContainerEvents } from '../../../hooks/usePencil'; interface AttrListProps extends ContainerEvents { attr: Tobj; shouldWrite: boolean; @@ -7,3 +7,4 @@ interface AttrListProps extends ContainerEvents { } export default function AttrList({ attr, shouldWrite, shouldClean, onEnd }: AttrListProps): JSX.Element; export {}; +//# sourceMappingURL=AttrList.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Tag/Attr/AttrList.d.ts.map b/dist/@types/components/Tag/Attr/AttrList.d.ts.map new file mode 100644 index 0000000..3241aa6 --- /dev/null +++ b/dist/@types/components/Tag/Attr/AttrList.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AttrList.d.ts","sourceRoot":"","sources":["../../../../../lib/components/Tag/Attr/AttrList.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAG1D,UAAU,aAAc,SAAQ,eAAe;IAC9C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAClB,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,aAAa,eAyBxF"} \ No newline at end of file diff --git a/dist/@types/components/Tag/Closing.d.ts b/dist/@types/components/Tag/Closing.d.ts index f93231e..e76d11c 100644 --- a/dist/@types/components/Tag/Closing.d.ts +++ b/dist/@types/components/Tag/Closing.d.ts @@ -1,5 +1,5 @@ /// -import { ContainerEvents } from '@lib/hooks/usePencil'; +import { ContainerEvents } from '../../hooks/usePencil'; interface ClosingProps { name: string; shouldWrite: boolean; @@ -8,3 +8,4 @@ interface ClosingProps { } export default function Opening({ name, shouldWrite, shouldClean, shouldDisplayCursor, onEnd }: ClosingProps & ContainerEvents): JSX.Element; export {}; +//# sourceMappingURL=Closing.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Tag/Closing.d.ts.map b/dist/@types/components/Tag/Closing.d.ts.map new file mode 100644 index 0000000..80db79f --- /dev/null +++ b/dist/@types/components/Tag/Closing.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Closing.d.ts","sourceRoot":"","sources":["../../../../lib/components/Tag/Closing.tsx"],"names":[],"mappings":";AACA,OAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAIlE,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;IAC7B,mBAAmB,EAAE,OAAO,CAAA;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,YAAY,GAAG,eAAe,eA4B7H"} \ No newline at end of file diff --git a/dist/@types/components/Tag/Opening.d.ts b/dist/@types/components/Tag/Opening.d.ts index 637791a..da6ab67 100644 --- a/dist/@types/components/Tag/Opening.d.ts +++ b/dist/@types/components/Tag/Opening.d.ts @@ -1,5 +1,5 @@ /// -import { ContainerEvents } from '@lib/hooks/usePencil'; +import { ContainerEvents } from '../../hooks/usePencil'; interface OpeningProps { name: string; attr: obj; @@ -10,3 +10,4 @@ interface OpeningProps { } export default function Opening({ name, attr, shouldWrite, shouldClean, shouldDisplayCursor, isIndented, onEnd }: OpeningProps & ContainerEvents): JSX.Element; export {}; +//# sourceMappingURL=Opening.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Tag/Opening.d.ts.map b/dist/@types/components/Tag/Opening.d.ts.map new file mode 100644 index 0000000..f167fa1 --- /dev/null +++ b/dist/@types/components/Tag/Opening.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Opening.d.ts","sourceRoot":"","sources":["../../../../lib/components/Tag/Opening.tsx"],"names":[],"mappings":";AAEA,OAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAKlE,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,GAAG,CAAA;IACT,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;IAC7B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,YAAY,GAAG,eAAe,eAqC/I"} \ No newline at end of file diff --git a/dist/@types/components/Tag/Tag.d.ts b/dist/@types/components/Tag/Tag.d.ts index 0aef561..9b9caca 100644 --- a/dist/@types/components/Tag/Tag.d.ts +++ b/dist/@types/components/Tag/Tag.d.ts @@ -1,7 +1,6 @@ import React from 'react'; -import { ContainerEvents } from '@lib/hooks/usePencil'; -import { PrimaryComponent } from '../types'; -import { HTMLWriterTheme } from '@lib/types'; +import { ContainerEvents } from '../../hooks/usePencil'; +import { PrimaryComponent, HTMLWriterTheme } from '../../components/types'; interface TagPropsCore { name: string; attr?: Tobj; @@ -12,3 +11,4 @@ interface TagPropsCore { declare type TagProps = TagPropsCore & PrimaryComponent & ContainerEvents; export default function Tag({ name, open, attr, loop, theme, shouldWrite, shouldClean, isChild, isIndented, children, onEnd }: TagProps): JSX.Element; export {}; +//# sourceMappingURL=Tag.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Tag/Tag.d.ts.map b/dist/@types/components/Tag/Tag.d.ts.map new file mode 100644 index 0000000..158cadb --- /dev/null +++ b/dist/@types/components/Tag/Tag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../lib/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAKlD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAG1E,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACnB,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,aAAK,QAAQ,GAAG,YAAY,GAAG,gBAAgB,GAAG,eAAe,CAAA;AAgBjE,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAS,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,QAAQ,eAuE3I"} \ No newline at end of file diff --git a/dist/@types/components/Tag/index.d.ts b/dist/@types/components/Tag/index.d.ts index ce84349..83eb2a0 100644 --- a/dist/@types/components/Tag/index.d.ts +++ b/dist/@types/components/Tag/index.d.ts @@ -1,2 +1,3 @@ export { default as Tag } from './Tag'; export * from './Tag'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Tag/index.d.ts.map b/dist/@types/components/Tag/index.d.ts.map new file mode 100644 index 0000000..80a37d0 --- /dev/null +++ b/dist/@types/components/Tag/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/Tag/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAA;AACtC,cAAc,OAAO,CAAA"} \ No newline at end of file diff --git a/dist/@types/components/Text.d.ts b/dist/@types/components/Text.d.ts index 25d93b8..8fc05b8 100644 --- a/dist/@types/components/Text.d.ts +++ b/dist/@types/components/Text.d.ts @@ -1,5 +1,5 @@ import React from 'react'; -import { ContainerEvents } from '@lib/hooks/usePencil'; +import { ContainerEvents } from '../hooks/usePencil'; import { PrimaryComponent } from './types'; interface StringPropsCore { text: string; @@ -8,3 +8,4 @@ interface StringPropsCore { declare type StringProps = StringPropsCore & PrimaryComponent & ContainerEvents; export default function Text({ text, style, shouldWrite, shouldClean, isChild, isIndented, loop, onEnd }: StringProps): JSX.Element; export {}; +//# sourceMappingURL=Text.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/Text.d.ts.map b/dist/@types/components/Text.d.ts.map new file mode 100644 index 0000000..39e878a --- /dev/null +++ b/dist/@types/components/Text.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../lib/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAClD,OAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAI/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC3B;AAED,aAAK,WAAW,GAAG,eAAe,GAAG,gBAAgB,GAAG,eAAe,CAAA;AAEvE,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,WAAW,eAoCpH"} \ No newline at end of file diff --git a/dist/@types/components/types.d.ts b/dist/@types/components/types.d.ts index 43a45ad..e1ec611 100644 --- a/dist/@types/components/types.d.ts +++ b/dist/@types/components/types.d.ts @@ -1,3 +1,19 @@ +import type { CSSProperties as ReactCSSProperties } from 'react'; +export interface HTMLWriterTheme { + cursorColor?: ReactCSSProperties['color']; + textColor?: ReactCSSProperties['color']; + tagHookColor?: ReactCSSProperties['color']; + tagNameColor?: ReactCSSProperties['color']; + attrNameColor?: ReactCSSProperties['color']; + attrSymbolColor?: ReactCSSProperties['color']; + attrQuoteColor?: ReactCSSProperties['color']; + attrValueColor?: ReactCSSProperties['color']; + selectColor?: ReactCSSProperties['color']; + selectBackgroundColor?: ReactCSSProperties['backgroundColor']; + fontSize?: ReactCSSProperties['fontSize']; + tagTabsize?: ReactCSSProperties['marginLeft']; + fontFamily?: ReactCSSProperties['fontFamily']; +} export interface PrimaryComponent { shouldWrite?: boolean; shouldClean?: boolean | number; @@ -5,3 +21,4 @@ export interface PrimaryComponent { isIndented?: boolean; loop?: boolean | number; } +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/dist/@types/components/types.d.ts.map b/dist/@types/components/types.d.ts.map new file mode 100644 index 0000000..e847f54 --- /dev/null +++ b/dist/@types/components/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAEhE,MAAM,WAAW,eAAe;IAC/B,WAAW,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACzC,SAAS,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACvC,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC1C,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC1C,aAAa,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC3C,eAAe,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC7C,cAAc,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC5C,cAAc,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAC5C,WAAW,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACzC,qBAAqB,CAAC,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;IAE7D,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAA;IACzC,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;IAC7C,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAA;CAC7C;AAED,MAAM,WAAW,gBAAgB;IAChC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CACvB"} \ No newline at end of file diff --git a/dist/@types/hooks/useHand.d.ts b/dist/@types/hooks/useHand.d.ts index d3f362e..d600584 100644 --- a/dist/@types/hooks/useHand.d.ts +++ b/dist/@types/hooks/useHand.d.ts @@ -10,3 +10,4 @@ export default function useHand(init: number, max: number, e?: Exclude boolean)) => void; reset: () => void; }; +//# sourceMappingURL=useHand.d.ts.map \ No newline at end of file diff --git a/dist/@types/hooks/useHand.d.ts.map b/dist/@types/hooks/useHand.d.ts.map new file mode 100644 index 0000000..1cb83d9 --- /dev/null +++ b/dist/@types/hooks/useHand.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useHand.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useHand.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,eAAe,EAAE,SAAS,CAAC;;;;;;kDAmBnD,MAAM,QAAQ,MAAM,KAAK,OAAO;gDAMjC,MAAM,QAAQ,MAAM,KAAK,OAAO;;EAW7E"} \ No newline at end of file diff --git a/dist/@types/hooks/usePencil.d.ts b/dist/@types/hooks/usePencil.d.ts index 01614b8..fda35f4 100644 --- a/dist/@types/hooks/usePencil.d.ts +++ b/dist/@types/hooks/usePencil.d.ts @@ -32,3 +32,4 @@ export default function usePencil>(content: T, e?: Pencil isPaused: boolean; }; export {}; +//# sourceMappingURL=usePencil.d.ts.map \ No newline at end of file diff --git a/dist/@types/hooks/usePencil.d.ts.map b/dist/@types/hooks/usePencil.d.ts.map new file mode 100644 index 0000000..794b241 --- /dev/null +++ b/dist/@types/hooks/usePencil.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"usePencil.d.ts","sourceRoot":"","sources":["../../../lib/hooks/usePencil.tsx"],"names":[],"mappings":"AAGA,aAAK,YAAY,GAAG;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,WAAW,eAAe;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;CACZ;AAED,MAAM,WAAW,YAAY;IAC5B,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAA;IAC9C,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAA;IAC9C,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAA;IAC5C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;CACZ;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY;;;;;;;;;;;;;;EA0FrF"} \ No newline at end of file diff --git a/dist/@types/index.d.ts b/dist/@types/index.d.ts index 71e12fb..64f3d7a 100644 --- a/dist/@types/index.d.ts +++ b/dist/@types/index.d.ts @@ -1,4 +1,4 @@ -export { default as Tag } from './components/Tag/Tag'; -export * from './components/Tag/Tag'; +export * from './components/Tag'; export { default as Text } from './components/Text'; export * from './components/Text'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/@types/index.d.ts.map b/dist/@types/index.d.ts.map new file mode 100644 index 0000000..d96db27 --- /dev/null +++ b/dist/@types/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAEhC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACnD,cAAc,mBAAmB,CAAA"} \ No newline at end of file diff --git a/dist/@types/style/index.style.d.ts b/dist/@types/style/index.style.d.ts index 788ab2b..a72fc81 100644 --- a/dist/@types/style/index.style.d.ts +++ b/dist/@types/style/index.style.d.ts @@ -12,3 +12,4 @@ export declare const TextContainer: import("styled-components").StyledComponent< export declare const CursorContainer: import("styled-components").StyledComponent<"span", any, { blink: boolean; }, never>; +//# sourceMappingURL=index.style.d.ts.map \ No newline at end of file diff --git a/dist/@types/style/index.style.d.ts.map b/dist/@types/style/index.style.d.ts.map new file mode 100644 index 0000000..77b916c --- /dev/null +++ b/dist/@types/style/index.style.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.style.d.ts","sourceRoot":"","sources":["../../../lib/style/index.style.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY;YAAwB,OAAO;gBAAc,OAAO;SAoB5E,CAAA;AAED,eAAO,MAAM,IAAI,qEAEhB,CAAA;AAED,eAAO,MAAM,IAAI,qEAEhB,CAAA;AAED,eAAO,MAAM,QAAQ,qEAEpB,CAAA;AAED,eAAO,MAAM,UAAU,qEAEtB,CAAA;AAED,eAAO,MAAM,SAAS,qEAErB,CAAA;AAED,eAAO,MAAM,SAAS,qEAErB,CAAA;AAED,eAAO,MAAM,aAAa,oEAGzB,CAAA;AAED,eAAO,MAAM,eAAe;WAAwB,OAAO;SAO1D,CAAA"} \ No newline at end of file diff --git a/dist/@types/style/theme.style.d.ts b/dist/@types/style/theme.style.d.ts index 5345c89..d567bc4 100644 --- a/dist/@types/style/theme.style.d.ts +++ b/dist/@types/style/theme.style.d.ts @@ -14,3 +14,4 @@ declare const defaultTheme: { fontFamily: string; }; export default defaultTheme; +//# sourceMappingURL=theme.style.d.ts.map \ No newline at end of file diff --git a/dist/@types/style/theme.style.d.ts.map b/dist/@types/style/theme.style.d.ts.map new file mode 100644 index 0000000..e2c9975 --- /dev/null +++ b/dist/@types/style/theme.style.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"theme.style.d.ts","sourceRoot":"","sources":["../../../lib/style/theme.style.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;CAejB,CAAA;AAED,eAAe,YAAY,CAAA"} \ No newline at end of file diff --git a/dist/@types/types.d.ts b/dist/@types/types.d.ts deleted file mode 100644 index 0719097..0000000 --- a/dist/@types/types.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { CSSProperties as ReactCSSProperties } from 'react'; -export interface HTMLWriterTheme { - cursorColor?: ReactCSSProperties['color']; - textColor?: ReactCSSProperties['color']; - tagHookColor?: ReactCSSProperties['color']; - tagNameColor?: ReactCSSProperties['color']; - attrNameColor?: ReactCSSProperties['color']; - attrSymbolColor?: ReactCSSProperties['color']; - attrQuoteColor?: ReactCSSProperties['color']; - attrValueColor?: ReactCSSProperties['color']; - selectColor?: ReactCSSProperties['color']; - selectBackgroundColor?: ReactCSSProperties['backgroundColor']; - fontSize?: ReactCSSProperties['fontSize']; - tagTabsize?: ReactCSSProperties['marginLeft']; - fontFamily?: ReactCSSProperties['fontFamily']; -} diff --git a/dist/@types/utils.d.ts b/dist/@types/utils.d.ts index c0157cc..22069ea 100644 --- a/dist/@types/utils.d.ts +++ b/dist/@types/utils.d.ts @@ -1 +1,2 @@ export declare const rand: (start: number, end: number) => number; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/dist/@types/utils.d.ts.map b/dist/@types/utils.d.ts.map new file mode 100644 index 0000000..d235575 --- /dev/null +++ b/dist/@types/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,UAAW,MAAM,OAAO,MAAM,WAAsD,CAAA"} \ No newline at end of file diff --git a/dist/react-html-writer.cjs.js b/dist/react-html-writer.cjs.js index 2c9eda1..68db795 100644 --- a/dist/react-html-writer.cjs.js +++ b/dist/react-html-writer.cjs.js @@ -1,4 +1,4 @@ -"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var a=require("react"),S=require("styled-components");function j(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var l=j(a),C=j(S);const h=(t,e)=>Math.round(Math.random()*(e-t)+t);function O(t,e){const[n,c]=a.useState(Object.fromEntries(Object.keys(t).map(f=>[f,""]))),[{isRunning:d,isPaused:o},s]=a.useState({isRunning:!1,isPaused:!1}),m=a.useRef(t),u=a.useRef(),r=a.useRef(0),i=a.useRef({idx:0,keys:Object.keys(n),get key(){return this.keys[this.idx]}}),p=a.useCallback(()=>{var f;s(k=>({...k,isRunning:!1})),(f=e==null?void 0:e.onEnd)==null||f.call(e,i.current)},(e==null?void 0:e.deps)||[]),E=a.useCallback(f=>{var k,g,b;if(f===((k=m.current[i.current.key])==null?void 0:k.length)&&(i.current.idx++,f=0,r.current=0,((g=m.current[i.current.key])==null?void 0:g.length)===0)){s(H=>({...H,isRunning:!1,isPaused:!0})),(b=e==null?void 0:e.onPause)==null||b.call(e,i.current),r.current=f,clearTimeout(u.current);return}i.current.key?(c(H=>({...H,[i.current.key]:H[i.current.key]+m.current[i.current.key][f]})),u.current=setTimeout(E,h(50,270),f+1)):p()},(e==null?void 0:e.deps)||[]),y=a.useCallback(f=>{var k;i.current.key?(typeof f=="boolean"&&f?u.current=setTimeout(E,h(150,230),r.current):typeof f=="number"&&f>-1?u.current=setTimeout(E,f,r.current):E(r.current),s({isRunning:!0,isPaused:!1}),(k=e==null?void 0:e.onStart)==null||k.call(e,i.current)):p()},(e==null?void 0:e.deps)||[]),T=a.useCallback(()=>{var f;s(k=>({...k,isRunning:!1})),clearTimeout(u.current),(f=e==null?void 0:e.onPause)==null||f.call(e,i.current)},(e==null?void 0:e.deps)||[]),$=a.useCallback(()=>{clearTimeout(u.current);const f=Object.fromEntries(Object.keys(m.current).map(k=>[k,""]));r.current=0,i.current.idx=0,i.current.keys=Object.keys(f),s({isRunning:!1,isPaused:!1}),c(f)},(e==null?void 0:e.deps)||[]);return a.useEffect(()=>()=>{clearTimeout(u.current)},[]),{pencil:n,play:y,pause:T,clean:$,pencilTarget:i.current,isRunning:d,isPaused:o}}const v=S.css` +"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var a=require("react"),S=require("styled-components");function j(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var l=j(a),C=j(S);const h=(t,e)=>Math.round(Math.random()*(e-t)+t);function O(t,e){const[n,c]=a.useState(Object.fromEntries(Object.keys(t).map(f=>[f,""]))),[{isRunning:d,isPaused:o},s]=a.useState({isRunning:!1,isPaused:!1}),m=a.useRef(t),u=a.useRef(),r=a.useRef(0),i=a.useRef({idx:0,keys:Object.keys(n),get key(){return this.keys[this.idx]}}),p=a.useCallback(()=>{var f;s(k=>({...k,isRunning:!1})),(f=e==null?void 0:e.onEnd)==null||f.call(e,i.current)},(e==null?void 0:e.deps)||[]),y=a.useCallback(f=>{var k,g,b;if(f===((k=m.current[i.current.key])==null?void 0:k.length)&&(i.current.idx++,f=0,r.current=0,((g=m.current[i.current.key])==null?void 0:g.length)===0)){s(H=>({...H,isRunning:!1,isPaused:!0})),(b=e==null?void 0:e.onPause)==null||b.call(e,i.current),r.current=f,clearTimeout(u.current);return}i.current.key?(c(H=>({...H,[i.current.key]:H[i.current.key]+m.current[i.current.key][f]})),u.current=setTimeout(y,h(50,270),f+1)):p()},(e==null?void 0:e.deps)||[]),E=a.useCallback(f=>{var k;i.current.key?(typeof f=="boolean"&&f?u.current=setTimeout(y,h(150,230),r.current):typeof f=="number"&&f>-1?u.current=setTimeout(y,f,r.current):y(r.current),s({isRunning:!0,isPaused:!1}),(k=e==null?void 0:e.onStart)==null||k.call(e,i.current)):p()},(e==null?void 0:e.deps)||[]),T=a.useCallback(()=>{var f;s(k=>({...k,isRunning:!1})),clearTimeout(u.current),(f=e==null?void 0:e.onPause)==null||f.call(e,i.current)},(e==null?void 0:e.deps)||[]),$=a.useCallback(()=>{clearTimeout(u.current);const f=Object.fromEntries(Object.keys(m.current).map(k=>[k,""]));r.current=0,i.current.idx=0,i.current.keys=Object.keys(f),s({isRunning:!1,isPaused:!1}),c(f)},(e==null?void 0:e.deps)||[]);return a.useEffect(()=>()=>{clearTimeout(u.current)},[]),{pencil:n,play:E,pause:T,clean:$,pencilTarget:i.current,isRunning:d,isPaused:o}}const w=S.css` * { font-family: ${t=>t.theme.fontFamily} !important; font-size: ${t=>t.theme.fontSize} !important; @@ -17,7 +17,7 @@ opacity: 1; } `,F=C.default.div` - ${v} + ${w} display: flex; flex-wrap: wrap; @@ -36,7 +36,7 @@ } `,R=C.default.span` color: ${t=>t.theme.tagHookColor}; -`,w=C.default.span` +`,v=C.default.span` color: ${t=>t.theme.tagNameColor}; `,_=C.default.span` color: ${t=>t.theme.attrNameColor}; @@ -47,11 +47,11 @@ `,N=C.default.span` color: ${t=>t.theme.attrValueColor}; `,z=C.default.div` - ${v} + ${w} color: ${t=>t.theme.textColor}; `,M=C.default.span` border-left: solid ${t=>t.theme.cursorColor}; ${t=>t.blink&&S.css` animation: ${D} 0.5s linear infinite alternate; `} -`;function x({blinkDeps:t,display:e}){const[n,c]=a.useState(!1);return a.useEffect(()=>{const d=setTimeout(()=>c(!0),350);return()=>{clearTimeout(d),c(!1)}},[...t||[]]),l.default.createElement(M,{hidden:!e,blink:n},"\u200D")}function B({name:t,shouldWrite:e,shouldClean:n,shouldDisplayCursor:c,onEnd:d}){const{pencil:o,play:s,clean:m,isRunning:u,isPaused:r}=O({oHook:""},{onEnd:d});return a.useEffect(()=>{n&&m()},[n]),a.useEffect(()=>{e&&!u&&!r&&s()},[e,u,r]),l.default.createElement("div",null,l.default.createElement(R,null,o.oHook),l.default.createElement(w,null,o.name),l.default.createElement(R,null,o.cHook),l.default.createElement(x,{display:e||c,blinkDeps:[o]}))}function Q({content:t,shouldWrite:e,shouldClean:n,onStart:c,onEnd:d}){const{pencil:o,play:s,clean:m}=O(t,{onStart:c,onEnd:d});return a.useEffect(()=>{n&&m()},[n]),a.useEffect(()=>{e&&s()},[e]),l.default.createElement("span",null,l.default.createElement(_,null,o.key),l.default.createElement(q,null,o.symbol),l.default.createElement(P,null,o.quote1),l.default.createElement(N,null,o.value),l.default.createElement(P,null,o.quote2),l.default.createElement(x,{display:e,blinkDeps:[o]}))}function A(t,e,n){const c=a.useRef(t),[d,o]=a.useState(c.current),[s,m]=a.useState(!1);return a.useEffect(()=>{var u,r;(u=n==null?void 0:n.onChange)==null||u.call(n,d),!s&&d>=e&&(m(!0),(r=n==null?void 0:n.onEnd)==null||r.call(n))},[d,s,...(n==null?void 0:n.deps)||[]]),{hand:d,init:c.current,max:e,setHand:o,isFinished:s,incrementHand:(u=!0)=>o(r=>typeof u=="function"&&u(r,c.current)||typeof u!="function"&&u?r+1:r),derementHand:u=>o(r=>typeof u=="function"&&u(r,c.current)||typeof u!="function"&&u?r-1:r),reset:()=>{o(c.current),m(!1)}}}function V({attr:t,shouldWrite:e,shouldClean:n,onEnd:c}){const d=a.useRef(Object.entries(t)),{hand:o,setHand:s,incrementHand:m,reset:u}=A(-1,d.current.length,{onEnd:c});return a.useEffect(()=>{n&&u()},[n]),a.useEffect(()=>{e&&s(r=>r===-1?r+1:r)},[e]),l.default.createElement(l.default.Fragment,null,d.current.map(([r,i],p)=>l.default.createElement(Q,{key:p,content:{key:" "+r,symbol:"=",quote1:'"',value:i,quote2:'"'},shouldWrite:p===o,shouldClean:n,onEnd:m})))}function I({name:t,attr:e,shouldWrite:n,shouldClean:c,shouldDisplayCursor:d,isIndented:o,onEnd:s}){const[m,u]=a.useState(!1),{pencil:r,play:i,clean:p,isRunning:E,isPaused:y}=O({oHook:"<",name:t,attr:"",cHook:">"},{onPause(T){T.key==="attr"&&u(!0)},onEnd(){s==null||s(),u(!1)}});return a.useEffect(()=>{c&&p()},[c]),a.useEffect(()=>{n&&!E&&!y&&i(!o||h(500,600))},[n,E,y]),l.default.createElement("div",null,l.default.createElement(R,null,r.oHook),l.default.createElement(w,null,r.name),l.default.createElement(V,{attr:e,shouldWrite:m,shouldClean:c,onEnd:i}),l.default.createElement(R,null,r.cHook),l.default.createElement(x,{display:(n||d)&&!m,blinkDeps:[r]}))}const L={cursorColor:"white",textColor:"white",tagHookColor:"rgb(200, 200, 200)",tagNameColor:"#d34949",attrNameColor:"#8cd673",attrSymbolColor:"rgb(200, 200, 200)",attrQuoteColor:"#f9c962",attrValueColor:"#f9c962",selectColor:"white",selectBackgroundColor:"rgb(84, 95, 255)",fontSize:"20px",tagTabsize:"30px",fontFamily:"monospace"};function G({isChild:t,theme:e,children:n}){return t?l.default.createElement(l.default.Fragment,null,n):l.default.createElement(S.ThemeProvider,{theme:{...L,...e}},n)}const J=({isOpen:t,isSelected:e,children:n})=>l.default.createElement(F,{isOpen:t,isSelected:e},n);function K({name:t,open:e,attr:n={},loop:c,theme:d,shouldWrite:o,shouldClean:s,isChild:m,isIndented:u,children:r,onEnd:i}){const[p,E]=a.useState({isOpen:!1,isSelected:!1,loopCount:0}),{hand:y,init:T,isFinished:$,incrementHand:f,reset:k}=A(-1,l.default.Children.count(r)+2,{onChange(g){g===2&&e&&setTimeout(()=>E(b=>({...b,isOpen:!0})),h(230,330))},onEnd(){i==null||i(),!m&&(c||typeof c=="number"&&p.loopCount{E(g=>({...g,isSelected:!0})),setTimeout(()=>{E(g=>({isOpen:!1,isSelected:!1,loopCount:g.loopCount+1})),k(),setTimeout(f,500)},1e3)},2e3)},deps:[p.loopCount]});return a.useEffect(()=>{s&&(E(g=>({...g,isOpen:!1,isSelected:!1})),k())},[s]),a.useEffect(()=>{(!m||o)&&f((g,b)=>g===b)},[o]),l.default.createElement(G,{theme:d,isChild:m},l.default.createElement(J,{...p},l.default.createElement(I,{name:t,attr:n,shouldWrite:y===0,onEnd:f,shouldClean:s||p.loopCount,shouldDisplayCursor:!$&&o===void 0&&y===T,isIndented:u}),l.default.createElement("div",null,l.default.Children.map(r,(g,b)=>l.default.cloneElement(g,{shouldWrite:y===b+2,shouldClean:s||p.loopCount,onEnd:f,isChild:!0,isIndented:e&&b===0}))),l.default.createElement(B,{name:t,shouldWrite:y===1,shouldClean:s||p.loopCount,shouldDisplayCursor:$&&o===void 0,onEnd:f})))}function U({text:t,style:e,shouldWrite:n,shouldClean:c,isChild:d,isIndented:o,loop:s,onEnd:m}){const[u,r]=a.useState({isOpen:!1,isSelected:!1,loopCount:0}),{pencil:i,play:p,clean:E}=O({text:t},{onStart(y){console.log("vuuuuu")},onEnd(){m==null||m(),!d&&(s||typeof s=="number"&&u.loopCount{r(y=>({...y,isSelected:!0})),setTimeout(()=>r(y=>({...y,isSelected:!1,loopCount:y.loopCount+1})),1e3)},2e3)},deps:[u.loopCount]});return a.useEffect(()=>{c&&E()},[c]),a.useEffect(()=>{(!d||n)&&p(!o||h(500,600))},[n]),l.default.createElement(z,{style:e},l.default.createElement("span",null,i.text),l.default.createElement(x,{display:!!n||!d,blinkDeps:[i]}))}exports.Tag=K;exports.Text=U; +`;function x({blinkDeps:t,display:e}){const[n,c]=a.useState(!1);return a.useEffect(()=>{const d=setTimeout(()=>c(!0),350);return()=>{clearTimeout(d),c(!1)}},[...t||[]]),l.default.createElement(M,{hidden:!e,blink:n},"\u200D")}function B({name:t,shouldWrite:e,shouldClean:n,shouldDisplayCursor:c,onEnd:d}){const{pencil:o,play:s,clean:m,isRunning:u,isPaused:r}=O({oHook:""},{onEnd:d});return a.useEffect(()=>{n&&m()},[n]),a.useEffect(()=>{e&&!u&&!r&&s()},[e,u,r]),l.default.createElement("div",null,l.default.createElement(R,null,o.oHook),l.default.createElement(v,null,o.name),l.default.createElement(R,null,o.cHook),l.default.createElement(x,{display:e||c,blinkDeps:[o]}))}function Q({content:t,shouldWrite:e,shouldClean:n,onStart:c,onEnd:d}){const{pencil:o,play:s,clean:m}=O(t,{onStart:c,onEnd:d});return a.useEffect(()=>{n&&m()},[n]),a.useEffect(()=>{e&&s()},[e]),l.default.createElement("span",null,l.default.createElement(_,null,o.key),l.default.createElement(q,null,o.symbol),l.default.createElement(P,null,o.quote1),l.default.createElement(N,null,o.value),l.default.createElement(P,null,o.quote2),l.default.createElement(x,{display:e,blinkDeps:[o]}))}function A(t,e,n){const c=a.useRef(t),[d,o]=a.useState(c.current),[s,m]=a.useState(!1);return a.useEffect(()=>{var u,r;(u=n==null?void 0:n.onChange)==null||u.call(n,d),!s&&d>=e&&(m(!0),(r=n==null?void 0:n.onEnd)==null||r.call(n))},[d,s,...(n==null?void 0:n.deps)||[]]),{hand:d,init:c.current,max:e,setHand:o,isFinished:s,incrementHand:(u=!0)=>o(r=>typeof u=="function"&&u(r,c.current)||typeof u!="function"&&u?r+1:r),derementHand:u=>o(r=>typeof u=="function"&&u(r,c.current)||typeof u!="function"&&u?r-1:r),reset:()=>{o(c.current),m(!1)}}}function V({attr:t,shouldWrite:e,shouldClean:n,onEnd:c}){const d=a.useRef(Object.entries(t)),{hand:o,setHand:s,incrementHand:m,reset:u}=A(-1,d.current.length,{onEnd:c});return a.useEffect(()=>{n&&u()},[n]),a.useEffect(()=>{e&&s(r=>r===-1?r+1:r)},[e]),l.default.createElement(l.default.Fragment,null,d.current.map(([r,i],p)=>l.default.createElement(Q,{key:p,content:{key:" "+r,symbol:"=",quote1:'"',value:i,quote2:'"'},shouldWrite:p===o,shouldClean:n,onEnd:m})))}function I({name:t,attr:e,shouldWrite:n,shouldClean:c,shouldDisplayCursor:d,isIndented:o,onEnd:s}){const[m,u]=a.useState(!1),{pencil:r,play:i,clean:p,isRunning:y,isPaused:E}=O({oHook:"<",name:t,attr:"",cHook:">"},{onPause(T){T.key==="attr"&&u(!0)},onEnd(){s==null||s(),u(!1)}});return a.useEffect(()=>{c&&p()},[c]),a.useEffect(()=>{n&&!y&&!E&&i(!o||h(500,600))},[n,y,E]),l.default.createElement("div",null,l.default.createElement(R,null,r.oHook),l.default.createElement(v,null,r.name),l.default.createElement(V,{attr:e,shouldWrite:m,shouldClean:c,onEnd:i}),l.default.createElement(R,null,r.cHook),l.default.createElement(x,{display:(n||d)&&!m,blinkDeps:[r]}))}const L={cursorColor:"white",textColor:"white",tagHookColor:"rgb(200, 200, 200)",tagNameColor:"#d34949",attrNameColor:"#8cd673",attrSymbolColor:"rgb(200, 200, 200)",attrQuoteColor:"#f9c962",attrValueColor:"#f9c962",selectColor:"white",selectBackgroundColor:"rgb(84, 95, 255)",fontSize:"20px",tagTabsize:"30px",fontFamily:"monospace"};function G({isChild:t,theme:e,children:n}){return t?l.default.createElement(l.default.Fragment,null,n):l.default.createElement(S.ThemeProvider,{theme:{...L,...e}},n)}const J=({isOpen:t,isSelected:e,children:n})=>l.default.createElement(F,{isOpen:t,isSelected:e},n);function K({name:t,open:e,attr:n={},loop:c,theme:d,shouldWrite:o,shouldClean:s,isChild:m,isIndented:u,children:r,onEnd:i}){const[p,y]=a.useState({isOpen:!1,isSelected:!1,loopCount:0}),{hand:E,init:T,isFinished:$,incrementHand:f,reset:k}=A(-1,l.default.Children.count(r)+2,{onChange(g){g===2&&e&&setTimeout(()=>y(b=>({...b,isOpen:!0})),h(230,330))},onEnd(){i==null||i(),!m&&(c||typeof c=="number"&&p.loopCount{y(g=>({...g,isSelected:!0})),setTimeout(()=>{y(g=>({isOpen:!1,isSelected:!1,loopCount:g.loopCount+1})),k(),setTimeout(f,500)},1e3)},2e3)},deps:[p.loopCount]});return a.useEffect(()=>{s&&(y(g=>({...g,isOpen:!1,isSelected:!1})),k())},[s]),a.useEffect(()=>{(!m||o)&&f((g,b)=>g===b)},[o]),l.default.createElement(G,{theme:d,isChild:m},l.default.createElement(J,{...p},l.default.createElement(I,{name:t,attr:n,shouldWrite:E===0,onEnd:f,shouldClean:s||p.loopCount,shouldDisplayCursor:!$&&o===void 0&&E===T,isIndented:u}),l.default.createElement("div",null,l.default.Children.map(r,(g,b)=>l.default.cloneElement(g,{shouldWrite:E===b+2,shouldClean:s||p.loopCount,onEnd:f,isChild:!0,isIndented:e&&b===0}))),l.default.createElement(B,{name:t,shouldWrite:E===1,shouldClean:s||p.loopCount,shouldDisplayCursor:$&&o===void 0,onEnd:f})))}function U({text:t,style:e,shouldWrite:n,shouldClean:c,isChild:d,isIndented:o,loop:s,onEnd:m}){const[u,r]=a.useState({isOpen:!1,isSelected:!1,loopCount:0}),{pencil:i,play:p,clean:y}=O({text:t},{onEnd(){m==null||m(),!d&&(s||typeof s=="number"&&u.loopCount{r(E=>({...E,isSelected:!0})),setTimeout(()=>r(E=>({...E,isSelected:!1,loopCount:E.loopCount+1})),1e3)},2e3)},deps:[u.loopCount]});return a.useEffect(()=>{c&&y()},[c]),a.useEffect(()=>{(!d||n)&&p(!o||h(500,600))},[n]),l.default.createElement(z,{style:e},l.default.createElement("span",null,i.text),l.default.createElement(x,{display:!!n||!d,blinkDeps:[i]}))}exports.Tag=K;exports.Text=U; diff --git a/dist/react-html-writer.es.js b/dist/react-html-writer.es.js index 6885852..1851a87 100644 --- a/dist/react-html-writer.es.js +++ b/dist/react-html-writer.es.js @@ -381,9 +381,6 @@ function Text({ text, style, shouldWrite, shouldClean, isChild, isIndented, loop loopCount: 0 }); const { pencil, play, clean } = usePencil({ text }, { - onStart(pencilTarget) { - console.log("vuuuuu"); - }, onEnd() { onEnd == null ? void 0 : onEnd(); if (!isChild && (loop || typeof loop === "number" && state.loopCount < loop)) { diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 5ed0d56..b1953e9 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es5.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2016.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.esnext.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.dom.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.dom.iterable.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.scripthost.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.core.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.collection.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.generator.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.iterable.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.proxy.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.reflect.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.symbol.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2016.array.include.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.object.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.regexp.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.array.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.object.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.symbol.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.bigint.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.weakref.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.array.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.error.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.object.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.esnext.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.esnext.full.d.ts","../node_modules/vite/types/hmrpayload.d.ts","../node_modules/vite/types/customevent.d.ts","../node_modules/vite/types/hot.d.ts","../node_modules/vite/types/importmeta.d.ts","../node_modules/vite/client.d.ts","../lib/global.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/prop-types/index.d.ts","../node_modules/@types/scheduler/tracing.d.ts","../node_modules/@types/react/index.d.ts","../lib/utils.ts","../lib/hooks/usepencil.tsx","../node_modules/@types/hoist-non-react-statics/index.d.ts","../node_modules/@types/styled-components/index.d.ts","../lib/style/index.style.ts","../lib/components/cursor.tsx","../lib/components/tag/closing.tsx","../lib/components/tag/attr/attr.tsx","../lib/hooks/usehand.tsx","../lib/components/tag/attr/attrlist.tsx","../lib/components/tag/opening.tsx","../lib/components/types.ts","../lib/style/theme.style.ts","../lib/components/parent.tsx","../lib/types.ts","../lib/components/tag/tag.tsx","../lib/components/text.tsx","../lib/index.ts","../lib/styled-components.d.ts","../lib/components/tag/index.tsx","../node_modules/@types/react-dom/index.d.ts","../node_modules/@types/scheduler/index.d.ts"],"fileInfos":[{"version":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","2f93dda35dafec68ec217c9ce67f0f4fbbbb030c055ac312641565ad60dd7e26","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"dbb73d4d99be496175cb432c74c2615f78c76f4272f1d83cba11ee0ed6dbddf0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"d96fa8a56871904776165ceb8e00bd56127e1a017bb2664cae76223b5f815141","774044ef136a0988fcf57b36fd0985caa98fe385b5f9ee68a1731b7340b6aff4","a0b0a059575ca62004fb85797f078a0a1d044da2d5c29993f11e7ce08a1ed3b4","6527fbb9e589f6c5b3e6f45d240284d044d5530205dd7662b4a514a3bad427ce",{"version":"f62613ebe5136a0ed8c8828bdbe5c717aff2c9fed072c99d457cad4a70215070","affectsGlobalScope":true},{"version":"a5189085a767ea0ba85994cd7551ebefc7564c670b67d2de4be1f44d1a85d462","affectsGlobalScope":true},{"version":"0d5091ea937069495e74673c3663620e05fa1e9e77ed4cd14454edca352470a5","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"ba7617784f6b9aeac5e20c5eea869bbc3ef31b905f59c796b0fd401dae17c111","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"0bca3a2542a695559b16feba84fffa590ec45eb64f2bbe0ee5e303f7bade01b1","affectsGlobalScope":true},"e9c80da0afb80ade40d801b9e11c07be2ab0de83db2562186ab6fbe3f7e6a16e","6f801bb0a589fd839fb5e42e503cbb5fb2c7a2ab0e7c4ea0a847d8075736ced9","bfe1b52cf71aea9bf8815810cc5d9490fa9617313e3d3c2ee3809a28b80d0bb4",{"version":"a3bf3c1ad131df7a2b36c881232cf822c602396a88be8e3e3ece60e76e6fe8ee","affectsGlobalScope":true},"f917767a42448d6ba5c2ffe41ee16d478b8c54aac73d5a46420c1081a7888905","ceca044179d52e269cf11b02471b104919100af802d99b1987325394df4bf7af","db7cd75ab2c93600060f05442c2cf3a9892fef86d0c6bea0af6e219dfa481b0d","cd48df6629f6c9284b4bc13612b95564f209f7912e09f5220afb3610de3f3140","a65d4c13a7140c5bdac4f2a52afe7cbfcdc2ece3c0068523bbb232cdd320c222","42835c28b7635e2c83b9adc5bf39edc25039638dbc73c184361ca323f6e34720","4c2761f3ff1d57e93d0f1a3e102c1fc7db0a378263198a9a822eccd1b0ddeca4","750ee349153beb00608c1e00ac8bfcb3b9c43280ba187675ba25821f5e04f370","28b503dbbe0c972ecc0358864d714cc91813ebdc3371aaf5712337e57407bce5","3f45667ff1c28d0c98c68085218ecad5310933702a8642f5f7b58878933dd4ba","1245d9a087fb320d50a0b4720386bf28ce0a65705c408528aac0948d72636f94","fdd8a1b55ed265a84e11bb0cc070e877f171cce75844ce8551da632d2893c210","2b7687e92230d7deae08499382d8b90c058d8c7c1cd1b921834b0b881cab3014","5e22939a304aa061cfafd593ced69d2f29dfe2b0311dced64b2e8e8283caf721","cc55dbcf9b22afa2e0a748f07a0374919ddaa8de4fb2c69dc31c3e9e2c3cb2fe","b00fd831b801563bfb56f98b99ef0c620bbb380ef74b7de1dbe284c3093ed1ba","e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57"],"options":{"composite":true,"declaration":true,"declarationDir":"./@types","emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":99,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"fileIdsList":[[59,60],[59,60,65,70],[59,60,65,69,78,84],[59,60,65,67,70,71],[59,60,65,67,73,74],[59,60,81],[59,60,65,66,67,70,71,75],[59,60,65,66,67,70,72,74,76,77,79,80],[59,60,65,66,67,70,71,77],[59],[59,60,65,67],[59,60,65,66],[59,60,81,82],[59,60,69,84],[59,60,65],[59,60,61,62,63,64],[59,60,62,65,68],[58,60],[55,59,60],[56,59,60],[57,59,60]],"referencedMap":[[11,1],[12,1],[16,1],[15,1],[2,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[3,1],[4,1],[28,1],[25,1],[26,1],[27,1],[29,1],[30,1],[31,1],[5,1],[32,1],[33,1],[34,1],[35,1],[6,1],[36,1],[37,1],[38,1],[39,1],[7,1],[44,1],[40,1],[41,1],[42,1],[43,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[1,1],[10,1],[54,1],[53,1],[14,1],[13,1],[71,2],[79,3],[73,4],[75,5],[72,4],[85,6],[76,7],[81,8],[82,9],[77,1],[60,10],[74,11],[67,12],[83,13],[70,14],[78,1],[84,14],[80,15],[66,1],[68,15],[63,1],[86,15],[61,1],[65,16],[87,1],[64,1],[69,17],[62,1],[59,18],[56,19],[55,1],[57,20],[58,21]],"exportedModulesMap":[[11,1],[12,1],[16,1],[15,1],[2,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[3,1],[4,1],[28,1],[25,1],[26,1],[27,1],[29,1],[30,1],[31,1],[5,1],[32,1],[33,1],[34,1],[35,1],[6,1],[36,1],[37,1],[38,1],[39,1],[7,1],[44,1],[40,1],[41,1],[42,1],[43,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[1,1],[10,1],[54,1],[53,1],[14,1],[13,1],[71,2],[79,3],[73,4],[75,5],[72,4],[85,6],[76,7],[81,8],[82,9],[77,1],[60,10],[74,11],[67,12],[83,13],[70,14],[78,1],[84,14],[80,15],[66,1],[68,15],[63,1],[86,15],[61,1],[65,16],[87,1],[64,1],[69,17],[62,1],[59,18],[56,19],[55,1],[57,20],[58,21]],"semanticDiagnosticsPerFile":[11,12,16,15,2,17,18,19,20,21,22,23,24,3,4,28,25,26,27,29,30,31,5,32,33,34,35,6,36,37,38,39,7,44,40,41,42,43,8,48,45,46,47,49,9,50,51,52,1,10,54,53,14,13,71,79,73,75,72,85,76,81,82,77,60,74,67,83,70,78,84,80,66,68,63,86,61,65,87,64,69,62,59,56,55,57,58]},"version":"4.6.3"} \ No newline at end of file +{"program":{"fileNames":["c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es5.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2016.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.esnext.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.dom.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.dom.iterable.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.scripthost.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.core.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.collection.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.generator.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.iterable.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.proxy.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.reflect.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.symbol.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2016.array.include.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.object.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2018.regexp.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.array.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.object.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2019.symbol.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.bigint.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2020.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.promise.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.weakref.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2021.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.array.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.error.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.object.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.es2022.string.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.esnext.intl.d.ts","c:/users/loloc/appdata/roaming/npm/node_modules/typescript/lib/lib.esnext.full.d.ts","../node_modules/vite/types/hmrpayload.d.ts","../node_modules/vite/types/customevent.d.ts","../node_modules/vite/types/hot.d.ts","../node_modules/vite/types/importmeta.d.ts","../node_modules/vite/client.d.ts","../lib/global.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/prop-types/index.d.ts","../node_modules/@types/scheduler/tracing.d.ts","../node_modules/@types/react/index.d.ts","../lib/utils.ts","../lib/hooks/usepencil.tsx","../node_modules/@types/hoist-non-react-statics/index.d.ts","../node_modules/@types/styled-components/index.d.ts","../lib/style/index.style.ts","../lib/components/cursor.tsx","../lib/components/tag/closing.tsx","../lib/components/tag/attr/attr.tsx","../lib/hooks/usehand.tsx","../lib/components/tag/attr/attrlist.tsx","../lib/components/tag/opening.tsx","../lib/components/types.ts","../lib/style/theme.style.ts","../lib/components/parent.tsx","../lib/components/tag/tag.tsx","../lib/components/tag/index.tsx","../lib/components/text.tsx","../lib/index.ts","../lib/styled-components.d.ts","../node_modules/@types/scheduler/index.d.ts"],"fileInfos":[{"version":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","2f93dda35dafec68ec217c9ce67f0f4fbbbb030c055ac312641565ad60dd7e26","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"dbb73d4d99be496175cb432c74c2615f78c76f4272f1d83cba11ee0ed6dbddf0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"d96fa8a56871904776165ceb8e00bd56127e1a017bb2664cae76223b5f815141","774044ef136a0988fcf57b36fd0985caa98fe385b5f9ee68a1731b7340b6aff4","a0b0a059575ca62004fb85797f078a0a1d044da2d5c29993f11e7ce08a1ed3b4","6527fbb9e589f6c5b3e6f45d240284d044d5530205dd7662b4a514a3bad427ce",{"version":"f62613ebe5136a0ed8c8828bdbe5c717aff2c9fed072c99d457cad4a70215070","affectsGlobalScope":true},{"version":"a5189085a767ea0ba85994cd7551ebefc7564c670b67d2de4be1f44d1a85d462","affectsGlobalScope":true},{"version":"0d5091ea937069495e74673c3663620e05fa1e9e77ed4cd14454edca352470a5","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"ba7617784f6b9aeac5e20c5eea869bbc3ef31b905f59c796b0fd401dae17c111","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"0bca3a2542a695559b16feba84fffa590ec45eb64f2bbe0ee5e303f7bade01b1","affectsGlobalScope":true},"e9c80da0afb80ade40d801b9e11c07be2ab0de83db2562186ab6fbe3f7e6a16e","263b87bef463a8e563dd0b4033a416f738495dd1ee0a7ad946ea05529a947a0d","bfe1b52cf71aea9bf8815810cc5d9490fa9617313e3d3c2ee3809a28b80d0bb4",{"version":"a3bf3c1ad131df7a2b36c881232cf822c602396a88be8e3e3ece60e76e6fe8ee","affectsGlobalScope":true},"f917767a42448d6ba5c2ffe41ee16d478b8c54aac73d5a46420c1081a7888905","15f05ef7d4542a45acc3a5a3f1a07518f9c64a7d42e4c147d7f9992782ae4eb4","03131beb3afdaf0d285d3e64a0668c56b75246398a0847f5222d7ab247ad357f","208c06560b04683de3eaff65627d14f6b057ce7a393ee0e85b311e070cc93ab0","a65d4c13a7140c5bdac4f2a52afe7cbfcdc2ece3c0068523bbb232cdd320c222","def29c35de47b97e15bef68437d3f03c2c6cefb9054a6e91aa858179381f7f38","d970483150bda1b403eadac5ead4f88f9b357013a639b312b3c9db85486976c9","de0fd82dd2cc0c88d204c64f1b43c866651d3178276b51a887267ba909022c14","28b503dbbe0c972ecc0358864d714cc91813ebdc3371aaf5712337e57407bce5","f5ec1f7ace62a02f26453daa8f0ab36f5b9884f03ae396b1b687f9c2e3075572","5fc7d4ea7ed54d1b3d71b91dd6a7fdbc08393d2738890bf29a1ce5d27d9b7265","b00fd831b801563bfb56f98b99ef0c620bbb380ef74b7de1dbe284c3093ed1ba","d18c5a8a48960d1b663f5751588be51bf5c829e47a18f652a3c677821f8aa3a1","dc70b5cbb3c3722a909dfe0ded0a885314fe2e383a9b80fb9e1336f60c1a2073","d38238f205191366ab1217f0ad95d747dce9376c5a135e8b6ada03de5bac4681","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57"],"options":{"composite":true,"declaration":true,"declarationDir":"./@types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":1,"module":99,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"fileIdsList":[[59,60],[59,60,65,70],[59,60,65,69,78,84],[59,60,65,67,70,71],[59,60,65,67,73,74],[59,60,80],[59,60,65,66,67,70,71,75],[59,60,65,66,67,70,72,74,76,77,79],[59,60,65,66,67,70,71,77],[59,60,65],[59],[59,60,65,67],[59,60,65,66],[59,60,81,82],[59,60,69,84],[59,60,69,77,84],[59,60,61,62,63,64],[59,60,62,65,68],[58,60],[55,59,60],[56,59,60],[57,59,60]],"referencedMap":[[11,1],[12,1],[16,1],[15,1],[2,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[3,1],[4,1],[28,1],[25,1],[26,1],[27,1],[29,1],[30,1],[31,1],[5,1],[32,1],[33,1],[34,1],[35,1],[6,1],[36,1],[37,1],[38,1],[39,1],[7,1],[44,1],[40,1],[41,1],[42,1],[43,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[1,1],[10,1],[54,1],[53,1],[14,1],[13,1],[71,2],[79,3],[73,4],[75,5],[72,4],[81,6],[76,7],[80,8],[82,9],[77,10],[60,11],[74,12],[67,13],[83,14],[70,15],[78,1],[84,16],[66,1],[68,10],[63,1],[61,1],[65,17],[85,1],[64,1],[69,18],[62,1],[59,19],[56,20],[55,1],[57,21],[58,22]],"exportedModulesMap":[[11,1],[12,1],[16,1],[15,1],[2,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[3,1],[4,1],[28,1],[25,1],[26,1],[27,1],[29,1],[30,1],[31,1],[5,1],[32,1],[33,1],[34,1],[35,1],[6,1],[36,1],[37,1],[38,1],[39,1],[7,1],[44,1],[40,1],[41,1],[42,1],[43,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[1,1],[10,1],[54,1],[53,1],[14,1],[13,1],[71,2],[79,3],[73,4],[75,5],[72,4],[81,6],[76,7],[80,8],[82,9],[77,10],[60,11],[74,12],[67,13],[83,14],[70,15],[78,1],[84,16],[66,1],[68,10],[63,1],[61,1],[65,17],[85,1],[64,1],[69,18],[62,1],[59,19],[56,20],[55,1],[57,21],[58,22]],"semanticDiagnosticsPerFile":[11,12,16,15,2,17,18,19,20,21,22,23,24,3,4,28,25,26,27,29,30,31,5,32,33,34,35,6,36,37,38,39,7,44,40,41,42,43,8,48,45,46,47,49,9,50,51,52,1,10,54,53,14,13,71,79,73,75,72,81,76,80,82,77,60,74,67,83,70,78,84,66,68,63,61,65,85,64,69,62,59,56,55,57,58]},"version":"4.6.3"} \ No newline at end of file diff --git a/lib/components/Cursor.tsx b/lib/components/Cursor.tsx index 4f11737..910f31e 100644 --- a/lib/components/Cursor.tsx +++ b/lib/components/Cursor.tsx @@ -1,5 +1,5 @@ -import { CursorContainer } from '@lib/style/index.style' import React, { useEffect, useState } from 'react' +import { CursorContainer } from '../style/index.style' interface CursorProps { blinkDeps?: any[] diff --git a/lib/components/Parent.tsx b/lib/components/Parent.tsx index ef2dbd2..683415f 100644 --- a/lib/components/Parent.tsx +++ b/lib/components/Parent.tsx @@ -1,4 +1,4 @@ -import defaultTheme from '@lib/style/theme.style' +import defaultTheme from '../style/theme.style' import React from 'react' import { Theme, ThemeProvider } from 'styled-components' diff --git a/lib/components/Tag/Attr/Attr.tsx b/lib/components/Tag/Attr/Attr.tsx index 5bb9bae..cd43868 100644 --- a/lib/components/Tag/Attr/Attr.tsx +++ b/lib/components/Tag/Attr/Attr.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react' -import usePencil, { PencilEvents } from '@lib/hooks/usePencil' -import Cursor from '@lib/components/Cursor' -import { AttrName, AttrQuote, AttrSymbol, AttrValue } from '@lib/style/index.style' +import usePencil, { PencilEvents } from '../../../hooks/usePencil' +import Cursor from '../../../components/Cursor' +import { AttrName, AttrQuote, AttrSymbol, AttrValue } from '../../../style/index.style' type PencilContent = { key: string diff --git a/lib/components/Tag/Attr/AttrList.tsx b/lib/components/Tag/Attr/AttrList.tsx index 8443dcc..9c04fdb 100644 --- a/lib/components/Tag/Attr/AttrList.tsx +++ b/lib/components/Tag/Attr/AttrList.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react' import Attr from './Attr' -import { ContainerEvents } from '@lib/hooks/usePencil' -import useHand from '@lib/hooks/useHand' +import { ContainerEvents } from '../../../hooks/usePencil' +import useHand from '../../../hooks/useHand' interface AttrListProps extends ContainerEvents { attr: Tobj diff --git a/lib/components/Tag/Closing.tsx b/lib/components/Tag/Closing.tsx index 2660354..872e206 100644 --- a/lib/components/Tag/Closing.tsx +++ b/lib/components/Tag/Closing.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react' -import usePencil, { ContainerEvents } from '@lib/hooks/usePencil' +import usePencil, { ContainerEvents } from '../../hooks/usePencil' import Cursor from '../Cursor' -import { Hook, Name } from '@lib/style/index.style' +import { Hook, Name } from '../../style/index.style' interface ClosingProps { name: string diff --git a/lib/components/Tag/Opening.tsx b/lib/components/Tag/Opening.tsx index b80e5af..6198af2 100644 --- a/lib/components/Tag/Opening.tsx +++ b/lib/components/Tag/Opening.tsx @@ -1,9 +1,9 @@ import React, { useEffect, useState } from 'react' import AttrList from './Attr/AttrList' -import usePencil, { ContainerEvents } from '@lib/hooks/usePencil' -import { Hook, Name } from '@lib/style/index.style' +import usePencil, { ContainerEvents } from '../../hooks/usePencil' +import { Hook, Name } from '../../style/index.style' import Cursor from '../Cursor' -import { rand } from '@lib/utils' +import { rand } from '../../utils' interface OpeningProps { name: string diff --git a/lib/components/Tag/Tag.tsx b/lib/components/Tag/Tag.tsx index f95fc32..ff4be72 100644 --- a/lib/components/Tag/Tag.tsx +++ b/lib/components/Tag/Tag.tsx @@ -1,13 +1,12 @@ import React, { useEffect, useState } from 'react' import Closing from './Closing' import Opening from './Opening' -import { TagContainer } from '@lib/style/index.style' -import useHand from '@lib/hooks/useHand' -import { ContainerEvents } from '@lib/hooks/usePencil' -import { rand } from '@lib/utils' -import { PrimaryComponent } from '../types' +import { TagContainer } from '../../style/index.style' +import useHand from '../../hooks/useHand' +import { ContainerEvents } from '../../hooks/usePencil' +import { rand } from '../../utils' +import { PrimaryComponent, HTMLWriterTheme } from '../../components/types' import Parent from '../Parent' -import { HTMLWriterTheme } from '@lib/types' interface TagPropsCore { name: string diff --git a/lib/components/Text.tsx b/lib/components/Text.tsx index 230fb50..035990a 100644 --- a/lib/components/Text.tsx +++ b/lib/components/Text.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useState } from 'react' -import usePencil, { ContainerEvents } from '@lib/hooks/usePencil' +import usePencil, { ContainerEvents } from '../hooks/usePencil' import Cursor from './Cursor' -import { TextContainer } from '@lib/style/index.style' -import { rand } from '@lib/utils' +import { TextContainer } from '../style/index.style' +import { rand } from '../utils' import { PrimaryComponent } from './types' interface StringPropsCore { @@ -21,9 +21,6 @@ export default function Text({ text, style, shouldWrite, shouldClean, isChild, i const { pencil, play, clean } = usePencil( { text }, { - onStart(pencilTarget) { - console.log('vuuuuu') - }, onEnd() { onEnd?.() if (!isChild && (loop || (typeof loop === 'number' && state.loopCount < loop))) { diff --git a/lib/components/types.ts b/lib/components/types.ts index 460d18b..8131b2d 100644 --- a/lib/components/types.ts +++ b/lib/components/types.ts @@ -1,3 +1,22 @@ +import type { CSSProperties as ReactCSSProperties } from 'react' + +export interface HTMLWriterTheme { + cursorColor?: ReactCSSProperties['color'] + textColor?: ReactCSSProperties['color'] + tagHookColor?: ReactCSSProperties['color'] + tagNameColor?: ReactCSSProperties['color'] + attrNameColor?: ReactCSSProperties['color'] + attrSymbolColor?: ReactCSSProperties['color'] + attrQuoteColor?: ReactCSSProperties['color'] + attrValueColor?: ReactCSSProperties['color'] + selectColor?: ReactCSSProperties['color'] + selectBackgroundColor?: ReactCSSProperties['backgroundColor'] + + fontSize?: ReactCSSProperties['fontSize'] + tagTabsize?: ReactCSSProperties['marginLeft'] + fontFamily?: ReactCSSProperties['fontFamily'] +} + export interface PrimaryComponent { shouldWrite?: boolean shouldClean?: boolean | number diff --git a/lib/hooks/usePencil.tsx b/lib/hooks/usePencil.tsx index 9a4e90e..f565051 100644 --- a/lib/hooks/usePencil.tsx +++ b/lib/hooks/usePencil.tsx @@ -1,4 +1,4 @@ -import { rand } from '@lib/utils' +import { rand } from '../utils' import { useCallback, useEffect, useRef, useState } from 'react' type pencilTarget = { diff --git a/lib/index.ts b/lib/index.ts index c289788..5ab19b4 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,5 +1,4 @@ -export { default as Tag } from './components/Tag/Tag' -export * from './components/Tag/Tag' +export * from './components/Tag' export { default as Text } from './components/Text' export * from './components/Text' diff --git a/lib/styled-components.d.ts b/lib/styled-components.d.ts index 49e49b2..86dc958 100644 --- a/lib/styled-components.d.ts +++ b/lib/styled-components.d.ts @@ -1,4 +1,5 @@ import 'styled-components' +import { HTMLWriterTheme } from './components/types' declare module 'styled-components' { export interface Theme extends HTMLWriterTheme {} diff --git a/lib/types.ts b/lib/types.ts deleted file mode 100644 index 5d02858..0000000 --- a/lib/types.ts +++ /dev/null @@ -1,19 +0,0 @@ -// import 'styled-components' -import type { CSSProperties as ReactCSSProperties } from 'react' - -export interface HTMLWriterTheme { - cursorColor?: ReactCSSProperties['color'] - textColor?: ReactCSSProperties['color'] - tagHookColor?: ReactCSSProperties['color'] - tagNameColor?: ReactCSSProperties['color'] - attrNameColor?: ReactCSSProperties['color'] - attrSymbolColor?: ReactCSSProperties['color'] - attrQuoteColor?: ReactCSSProperties['color'] - attrValueColor?: ReactCSSProperties['color'] - selectColor?: ReactCSSProperties['color'] - selectBackgroundColor?: ReactCSSProperties['backgroundColor'] - - fontSize?: ReactCSSProperties['fontSize'] - tagTabsize?: ReactCSSProperties['marginLeft'] - fontFamily?: ReactCSSProperties['fontFamily'] -} diff --git a/package-lock.json b/package-lock.json index 0f6c1cf..e9d38ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "react-html-writer", - "version": "3.0.0", + "version": "3.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-html-writer", - "version": "3.0.0", + "version": "3.1.0", "license": "MIT", "devDependencies": { + "@types/react-dom": "^18.0.5", "styled-components": "^5.3.5", "vite": "^2.9.13" }, "peerDependencies": { "@types/react": "^18.0.14", - "@types/react-dom": "^18.0.5", "@types/styled-components": "^5.1.25", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -288,14 +288,12 @@ "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "peer": true + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "node_modules/@types/react": { "version": "18.0.14", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.14.tgz", "integrity": "sha512-x4gGuASSiWmo0xjDLpm5mPb52syZHJx02VKbqUKdLmKtAwIh63XClGsiTI1K6DO5q7ox4xAsQrU+Gl3+gGXF9Q==", - "peer": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -306,7 +304,7 @@ "version": "18.0.5", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.5.tgz", "integrity": "sha512-OWPWTUrY/NIrjsAPkAk1wW9LZeIjSvkXRhclsFO8CZcZGCOg2G0YZy4ft+rOyYxy8B7ui5iZzi9OkDebZ7/QSA==", - "peer": true, + "dev": true, "dependencies": { "@types/react": "*" } @@ -314,8 +312,7 @@ "node_modules/@types/scheduler": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "peer": true + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "node_modules/@types/styled-components": { "version": "5.1.25", @@ -429,8 +426,7 @@ "node_modules/csstype": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "peer": true + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "node_modules/debug": { "version": "4.3.4", @@ -1385,14 +1381,12 @@ "@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "peer": true + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "@types/react": { "version": "18.0.14", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.14.tgz", "integrity": "sha512-x4gGuASSiWmo0xjDLpm5mPb52syZHJx02VKbqUKdLmKtAwIh63XClGsiTI1K6DO5q7ox4xAsQrU+Gl3+gGXF9Q==", - "peer": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1403,7 +1397,7 @@ "version": "18.0.5", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.5.tgz", "integrity": "sha512-OWPWTUrY/NIrjsAPkAk1wW9LZeIjSvkXRhclsFO8CZcZGCOg2G0YZy4ft+rOyYxy8B7ui5iZzi9OkDebZ7/QSA==", - "peer": true, + "dev": true, "requires": { "@types/react": "*" } @@ -1411,8 +1405,7 @@ "@types/scheduler": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "peer": true + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" }, "@types/styled-components": { "version": "5.1.25", @@ -1513,8 +1506,7 @@ "csstype": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "peer": true + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" }, "debug": { "version": "4.3.4", diff --git a/package.json b/package.json index 9950ac8..178cfc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-html-writer", - "version": "3.0.1", + "version": "3.1.0", "description": "Some react components to animate HTML code writing.", "main": "./dist/react-html-writer.umd.js", "module": "./dist/react-html-writer.es.js", @@ -39,8 +39,8 @@ }, "homepage": "https://github.com/RoikkuTo/react-html-writer#readme", "devDependencies": { - "vite": "^2.9.13", - "styled-components": "^5.3.5" + "styled-components": "^5.3.5", + "vite": "^2.9.13" }, "peerDependencies": { "@types/react": "^18.0.14", diff --git a/test/demo/main.tsx b/test/demo/main.tsx index 3638616..6ccb0a7 100644 --- a/test/demo/main.tsx +++ b/test/demo/main.tsx @@ -1,7 +1,7 @@ import React from 'react' import { createRoot } from 'react-dom/client' -// import { Tag, Text } from '@lib/index' -import { Tag, Text } from '../../dist/react-html-writer.es' +import { Tag, Text } from '@lib/index' +// import { Tag, Text } from '../../dist/react-html-writer.es' import './style.css' diff --git a/tsconfig.json b/tsconfig.json index 45651b0..1e6fcb2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ /* Language and Environment */ "target": "esnext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - "jsx": "react" /* Specify what JSX code is generated. */, + "jsx": "preserve" /* Specify what JSX code is generated. */, // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ @@ -49,7 +49,7 @@ /* Emit */ "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */, - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "declarationMap": true /* Create sourcemaps for d.ts files. */, "emitDeclarationOnly": true /* Only output d.ts files and not JavaScript files. */, "sourceMap": true /* Create source map files for emitted JavaScript files. */, // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ @@ -101,7 +101,7 @@ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + // "skipDefaultLibCheck": true /* Skip type checking .d.ts files that are included with TypeScript. */, "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, "exclude": ["node_modules", "**/node_modules", "**/old", "trash", "**/trash"]