@cutting/svg 4.45.3 → 4.46.0
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/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@cutting/svg:build: cache hit, replaying output
|
|
1
|
+
@cutting/svg:build: cache hit, replaying output 9413d5a038e790a3
|
|
2
2
|
@cutting/svg:build:
|
|
3
|
-
@cutting/svg:build: > @cutting/svg@4.
|
|
3
|
+
@cutting/svg:build: > @cutting/svg@4.46.0 build /home/runner/work/cuttingedge/cuttingedge/packages/svg
|
|
4
4
|
@cutting/svg:build: > NODE_ENV=production devtools rollup
|
|
5
5
|
@cutting/svg:build:
|
|
6
6
|
@cutting/svg:build: DEBUG using tsconfig.dist.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @cutting/svg
|
|
2
2
|
|
|
3
|
+
## 4.46.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 22f71e166: upgrade all dependencies
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [22f71e166]
|
|
12
|
+
- @cutting/use-get-parent-size@1.20.0
|
|
13
|
+
- @cutting/util@4.52.0
|
|
14
|
+
|
|
3
15
|
## 4.45.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg.cjs.development.js","sources":["../../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../../src/components/Group/Group.tsx","../../src/components/Line/Line.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { PreserveAspectRatio } from '../../types/types';\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface ResponsiveSVGProps {\n width: number;\n height: number;\n origin?: Point;\n preserveAspectRatio?: PreserveAspectRatio;\n innerRef?: Ref<SVGSVGElement>;\n className?: string;\n hide?: boolean;\n children: ReactNode;\n}\n\nexport function ResponsiveSVG({\n height,\n width,\n children,\n origin = { x: 0, y: 0 },\n preserveAspectRatio = 'xMaxYMid meet',\n innerRef,\n className,\n}: ResponsiveSVGProps): JSX.Element {\n const aspect = width / height;\n\n const adjustedHeight = Math.ceil(width / aspect);\n\n return (\n <div\n data-selector=\"cutting-svg-container\"\n style={{\n position: 'relative',\n overflow: 'visible',\n height: '1px',\n }}\n >\n <svg\n style={{ overflow: 'visible' }}\n className={className}\n preserveAspectRatio={preserveAspectRatio}\n viewBox={`${origin.x} ${origin.y} ${width} ${adjustedHeight}`}\n ref={innerRef}\n >\n {children}\n </svg>\n </div>\n );\n}\n","import type { CSSProperties, PropsWithChildren, RefObject } from 'react';\nimport { useEffect } from 'react';\nimport type { UseParentSizeOptions } from '@cutting/use-get-parent-size';\nimport { useParentSize } from '@cutting/use-get-parent-size';\nimport type { ResponsiveSVGProps } from '../ResponsiveSVG/ResponsiveSVG';\nimport { ResponsiveSVG } from '../ResponsiveSVG/ResponsiveSVG';\n\ntype Align = 'none' | 'center';\n\nexport type ParentsizeSVGProps<E extends HTMLElement = HTMLElement> = {\n parentRef: RefObject<E>;\n style?: CSSProperties;\n align?: Align;\n scale?: number;\n options?: Partial<UseParentSizeOptions>;\n} & Partial<Omit<ResponsiveSVGProps, 'innerRef' | 'height' | 'height'>>;\n\nexport const DefaultStyle: CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: '0%',\n overflow: 'hidden',\n} as const;\n\nexport function ParentsizeSVG<E extends HTMLElement>({\n parentRef,\n children,\n style = DefaultStyle,\n scale = 1,\n align = 'none',\n options: { debounceDelay = 50, ...optionsRest } = {},\n ...rest\n}: PropsWithChildren<ParentsizeSVGProps<E>>): JSX.Element | null {\n const { width, height } = useParentSize(parentRef, { debounceDelay, ...optionsRest });\n\n useEffect(() => {\n if (!parentRef.current) {\n return;\n }\n\n for (const [key, value] of Object.entries(style)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parentRef.current.style[key as any] = value;\n }\n }, [parentRef, style]);\n\n const transform =\n align === 'center'\n ? `translate(${width / 2},${height / 2 - 20}) scale(${scale})`\n : `translate(0,0) scale(${scale})`;\n\n return (\n <ResponsiveSVG width={width} height={height} {...rest}>\n <g transform={transform}>{children}</g>\n </ResponsiveSVG>\n );\n}\n","import cx from 'classnames';\n\ntype GroupOnlyProps = {\n /** Top offset applied to `<g/>`. */\n y?: number;\n /** Left offset applied to `<g/>`. */\n x?: number;\n /** Override `x` and `y` to provide the entire `transform` string. */\n transform?: string;\n className?: string;\n children?: React.ReactNode;\n innerRef?: React.Ref<SVGGElement>;\n};\n\ntype GroupProps = GroupOnlyProps & Omit<React.SVGProps<SVGGElement>, keyof GroupOnlyProps>;\n\nexport function Group({\n y = 0,\n x = 0,\n transform,\n className,\n children,\n innerRef,\n ...restProps\n}: GroupProps): JSX.Element {\n return (\n <g\n ref={innerRef}\n className={cx('visx-group', className)}\n transform={transform || `translate(${x}, ${y})`}\n {...restProps}\n >\n {children}\n </g>\n );\n}\n","import cx from 'classnames';\nimport type { AddSVGProps, Point } from '../../types/types';\n\nexport type LineProps = {\n className?: string;\n innerRef?: React.Ref<SVGLineElement>;\n fill?: string;\n /** Starting x,y point of the line. */\n from?: Point;\n /** Ending x,y point of the line. */\n to?: Point;\n};\n\nexport function Line({\n from = { x: 0, y: 0 },\n to = { x: 1, y: 1 },\n fill = 'transparent',\n className,\n innerRef,\n ...restProps\n}: AddSVGProps<LineProps, SVGLineElement>): JSX.Element {\n const isRectilinear = from.x === to.x || from.y === to.y;\n\n return (\n <line\n ref={innerRef}\n className={cx('visx-line', className)}\n x1={from.x}\n y1={from.y}\n x2={to.x}\n y2={to.y}\n fill={fill}\n shapeRendering={isRectilinear ? 'crispEdges' : 'auto'}\n {...restProps}\n />\n );\n}\n"],"names":["ResponsiveSVG","height","width","children","origin","x","y","preserveAspectRatio","innerRef","className","aspect","adjustedHeight","Math","ceil","_jsx","style","position","overflow","viewBox","ref","DefaultStyle","display","flexDirection","flexGrow","flexShrink","flexBasis","ParentsizeSVG","parentRef","scale","align","options","debounceDelay","optionsRest","_excluded","rest","_objectWithoutProperties","useParentSize","_objectSpread","useEffect","current","key","value","Object","entries","transform","Group","restProps","cx","Line","from","to","fill","isRectilinear","x1","y1","x2","y2","shapeRendering"],"mappings":";;;;;;;;;;;;;;;;;AAmBgB,SAAAA,aAAA,CAQK,IAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"svg.cjs.development.js","sources":["../../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../../src/components/Group/Group.tsx","../../src/components/Line/Line.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { PreserveAspectRatio } from '../../types/types';\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface ResponsiveSVGProps {\n width: number;\n height: number;\n origin?: Point;\n preserveAspectRatio?: PreserveAspectRatio;\n innerRef?: Ref<SVGSVGElement>;\n className?: string;\n hide?: boolean;\n children: ReactNode;\n}\n\nexport function ResponsiveSVG({\n height,\n width,\n children,\n origin = { x: 0, y: 0 },\n preserveAspectRatio = 'xMaxYMid meet',\n innerRef,\n className,\n}: ResponsiveSVGProps): JSX.Element {\n const aspect = width / height;\n\n const adjustedHeight = Math.ceil(width / aspect);\n\n return (\n <div\n data-selector=\"cutting-svg-container\"\n style={{\n position: 'relative',\n overflow: 'visible',\n height: '1px',\n }}\n >\n <svg\n style={{ overflow: 'visible' }}\n className={className}\n preserveAspectRatio={preserveAspectRatio}\n viewBox={`${origin.x} ${origin.y} ${width} ${adjustedHeight}`}\n ref={innerRef}\n >\n {children}\n </svg>\n </div>\n );\n}\n","import type { CSSProperties, PropsWithChildren, RefObject } from 'react';\nimport { useEffect } from 'react';\nimport type { UseParentSizeOptions } from '@cutting/use-get-parent-size';\nimport { useParentSize } from '@cutting/use-get-parent-size';\nimport type { ResponsiveSVGProps } from '../ResponsiveSVG/ResponsiveSVG';\nimport { ResponsiveSVG } from '../ResponsiveSVG/ResponsiveSVG';\n\ntype Align = 'none' | 'center';\n\nexport type ParentsizeSVGProps<E extends HTMLElement = HTMLElement> = {\n parentRef: RefObject<E>;\n style?: CSSProperties;\n align?: Align;\n scale?: number;\n options?: Partial<UseParentSizeOptions>;\n} & Partial<Omit<ResponsiveSVGProps, 'innerRef' | 'height' | 'height'>>;\n\nexport const DefaultStyle: CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: '0%',\n overflow: 'hidden',\n} as const;\n\nexport function ParentsizeSVG<E extends HTMLElement>({\n parentRef,\n children,\n style = DefaultStyle,\n scale = 1,\n align = 'none',\n options: { debounceDelay = 50, ...optionsRest } = {},\n ...rest\n}: PropsWithChildren<ParentsizeSVGProps<E>>): JSX.Element | null {\n const { width, height } = useParentSize(parentRef, { debounceDelay, ...optionsRest });\n\n useEffect(() => {\n if (!parentRef.current) {\n return;\n }\n\n for (const [key, value] of Object.entries(style)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parentRef.current.style[key as any] = value;\n }\n }, [parentRef, style]);\n\n const transform =\n align === 'center'\n ? `translate(${width / 2},${height / 2 - 20}) scale(${scale})`\n : `translate(0,0) scale(${scale})`;\n\n return (\n <ResponsiveSVG width={width} height={height} {...rest}>\n <g transform={transform}>{children}</g>\n </ResponsiveSVG>\n );\n}\n","import cx from 'classnames';\n\ntype GroupOnlyProps = {\n /** Top offset applied to `<g/>`. */\n y?: number;\n /** Left offset applied to `<g/>`. */\n x?: number;\n /** Override `x` and `y` to provide the entire `transform` string. */\n transform?: string;\n className?: string;\n children?: React.ReactNode;\n innerRef?: React.Ref<SVGGElement>;\n};\n\ntype GroupProps = GroupOnlyProps & Omit<React.SVGProps<SVGGElement>, keyof GroupOnlyProps>;\n\nexport function Group({\n y = 0,\n x = 0,\n transform,\n className,\n children,\n innerRef,\n ...restProps\n}: GroupProps): JSX.Element {\n return (\n <g\n ref={innerRef}\n className={cx('visx-group', className)}\n transform={transform || `translate(${x}, ${y})`}\n {...restProps}\n >\n {children}\n </g>\n );\n}\n","import cx from 'classnames';\nimport type { AddSVGProps, Point } from '../../types/types';\n\nexport type LineProps = {\n className?: string;\n innerRef?: React.Ref<SVGLineElement>;\n fill?: string;\n /** Starting x,y point of the line. */\n from?: Point;\n /** Ending x,y point of the line. */\n to?: Point;\n};\n\nexport function Line({\n from = { x: 0, y: 0 },\n to = { x: 1, y: 1 },\n fill = 'transparent',\n className,\n innerRef,\n ...restProps\n}: AddSVGProps<LineProps, SVGLineElement>): JSX.Element {\n const isRectilinear = from.x === to.x || from.y === to.y;\n\n return (\n <line\n ref={innerRef}\n className={cx('visx-line', className)}\n x1={from.x}\n y1={from.y}\n x2={to.x}\n y2={to.y}\n fill={fill}\n shapeRendering={isRectilinear ? 'crispEdges' : 'auto'}\n {...restProps}\n />\n );\n}\n"],"names":["ResponsiveSVG","height","width","children","origin","x","y","preserveAspectRatio","innerRef","className","aspect","adjustedHeight","Math","ceil","_jsx","style","position","overflow","viewBox","ref","DefaultStyle","display","flexDirection","flexGrow","flexShrink","flexBasis","ParentsizeSVG","parentRef","scale","align","options","debounceDelay","optionsRest","_excluded","rest","_objectWithoutProperties","useParentSize","_objectSpread","useEffect","current","key","value","Object","entries","transform","Group","restProps","cx","Line","from","to","fill","isRectilinear","x1","y1","x2","y2","shapeRendering"],"mappings":";;;;;;;;;;;;;;;;;AAmBgB,SAAAA,aAAA,CAQK,IAAA,EAAA;EAAA,IARS;IAC5BC,MAD4B;IAE5BC,KAF4B;IAG5BC,QAH4B;AAI5BC,IAAAA,MAAM,GAAG;AAAEC,MAAAA,CAAC,EAAE,CAAL;AAAQC,MAAAA,CAAC,EAAE,CAAA;KAJQ;AAK5BC,IAAAA,mBAAmB,GAAG,eALM;IAM5BC,QAN4B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AAC5C,CAAL,KAAW6C,EAAE,CAAC7C,CAAd,IAAmB4C,IAAI,CAAC3C,CAAL,KAAW4C,EAAE,CAAC5C,CAAvD,CAAA;EAEA,OACEQ,cACE,CAAA,MAAA,EAAAuB,iCAAA,CAAA;AAAAlB,IAAAA,GAAG,EAAEX,QAAL;AACAC,IAAAA,SAAS,EAAEsC,sBAAE,CAAC,WAAD,EAActC,SAAd,CADb;IAEA4C,EAAE,EAAEJ,IAAI,CAAC5C,CAFT;IAGAiD,EAAE,EAAEL,IAAI,CAAC3C,CAHT;IAIAiD,EAAE,EAAEL,EAAE,CAAC7C,CAJP;IAKAmD,EAAE,EAAEN,EAAE,CAAC5C,CALP;AAMA6C,IAAAA,IAAI,EAAEA,IANN;AAOAM,IAAAA,cAAc,EAAEL,aAAa,GAAG,YAAH,GAAkB,MAAA;AAP/C,GAAA,EAQIN,SARJ,CAFJ,CAAA,CAAA;AAaD;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg.cjs.production.min.js","sources":["../../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../../src/components/Group/Group.tsx","../../src/components/Line/Line.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { PreserveAspectRatio } from '../../types/types';\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface ResponsiveSVGProps {\n width: number;\n height: number;\n origin?: Point;\n preserveAspectRatio?: PreserveAspectRatio;\n innerRef?: Ref<SVGSVGElement>;\n className?: string;\n hide?: boolean;\n children: ReactNode;\n}\n\nexport function ResponsiveSVG({\n height,\n width,\n children,\n origin = { x: 0, y: 0 },\n preserveAspectRatio = 'xMaxYMid meet',\n innerRef,\n className,\n}: ResponsiveSVGProps): JSX.Element {\n const aspect = width / height;\n\n const adjustedHeight = Math.ceil(width / aspect);\n\n return (\n <div\n data-selector=\"cutting-svg-container\"\n style={{\n position: 'relative',\n overflow: 'visible',\n height: '1px',\n }}\n >\n <svg\n style={{ overflow: 'visible' }}\n className={className}\n preserveAspectRatio={preserveAspectRatio}\n viewBox={`${origin.x} ${origin.y} ${width} ${adjustedHeight}`}\n ref={innerRef}\n >\n {children}\n </svg>\n </div>\n );\n}\n","import type { CSSProperties, PropsWithChildren, RefObject } from 'react';\nimport { useEffect } from 'react';\nimport type { UseParentSizeOptions } from '@cutting/use-get-parent-size';\nimport { useParentSize } from '@cutting/use-get-parent-size';\nimport type { ResponsiveSVGProps } from '../ResponsiveSVG/ResponsiveSVG';\nimport { ResponsiveSVG } from '../ResponsiveSVG/ResponsiveSVG';\n\ntype Align = 'none' | 'center';\n\nexport type ParentsizeSVGProps<E extends HTMLElement = HTMLElement> = {\n parentRef: RefObject<E>;\n style?: CSSProperties;\n align?: Align;\n scale?: number;\n options?: Partial<UseParentSizeOptions>;\n} & Partial<Omit<ResponsiveSVGProps, 'innerRef' | 'height' | 'height'>>;\n\nexport const DefaultStyle: CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: '0%',\n overflow: 'hidden',\n} as const;\n\nexport function ParentsizeSVG<E extends HTMLElement>({\n parentRef,\n children,\n style = DefaultStyle,\n scale = 1,\n align = 'none',\n options: { debounceDelay = 50, ...optionsRest } = {},\n ...rest\n}: PropsWithChildren<ParentsizeSVGProps<E>>): JSX.Element | null {\n const { width, height } = useParentSize(parentRef, { debounceDelay, ...optionsRest });\n\n useEffect(() => {\n if (!parentRef.current) {\n return;\n }\n\n for (const [key, value] of Object.entries(style)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parentRef.current.style[key as any] = value;\n }\n }, [parentRef, style]);\n\n const transform =\n align === 'center'\n ? `translate(${width / 2},${height / 2 - 20}) scale(${scale})`\n : `translate(0,0) scale(${scale})`;\n\n return (\n <ResponsiveSVG width={width} height={height} {...rest}>\n <g transform={transform}>{children}</g>\n </ResponsiveSVG>\n );\n}\n","import cx from 'classnames';\n\ntype GroupOnlyProps = {\n /** Top offset applied to `<g/>`. */\n y?: number;\n /** Left offset applied to `<g/>`. */\n x?: number;\n /** Override `x` and `y` to provide the entire `transform` string. */\n transform?: string;\n className?: string;\n children?: React.ReactNode;\n innerRef?: React.Ref<SVGGElement>;\n};\n\ntype GroupProps = GroupOnlyProps & Omit<React.SVGProps<SVGGElement>, keyof GroupOnlyProps>;\n\nexport function Group({\n y = 0,\n x = 0,\n transform,\n className,\n children,\n innerRef,\n ...restProps\n}: GroupProps): JSX.Element {\n return (\n <g\n ref={innerRef}\n className={cx('visx-group', className)}\n transform={transform || `translate(${x}, ${y})`}\n {...restProps}\n >\n {children}\n </g>\n );\n}\n","import cx from 'classnames';\nimport type { AddSVGProps, Point } from '../../types/types';\n\nexport type LineProps = {\n className?: string;\n innerRef?: React.Ref<SVGLineElement>;\n fill?: string;\n /** Starting x,y point of the line. */\n from?: Point;\n /** Ending x,y point of the line. */\n to?: Point;\n};\n\nexport function Line({\n from = { x: 0, y: 0 },\n to = { x: 1, y: 1 },\n fill = 'transparent',\n className,\n innerRef,\n ...restProps\n}: AddSVGProps<LineProps, SVGLineElement>): JSX.Element {\n const isRectilinear = from.x === to.x || from.y === to.y;\n\n return (\n <line\n ref={innerRef}\n className={cx('visx-line', className)}\n x1={from.x}\n y1={from.y}\n x2={to.x}\n y2={to.y}\n fill={fill}\n shapeRendering={isRectilinear ? 'crispEdges' : 'auto'}\n {...restProps}\n />\n );\n}\n"],"names":["ResponsiveSVG","_ref","height","width","children","origin","x","y","preserveAspectRatio","innerRef","className","adjustedHeight","Math","ceil","_jsx","style","position","overflow","viewBox","
|
|
1
|
+
{"version":3,"file":"svg.cjs.production.min.js","sources":["../../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../../src/components/Group/Group.tsx","../../src/components/Line/Line.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { PreserveAspectRatio } from '../../types/types';\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface ResponsiveSVGProps {\n width: number;\n height: number;\n origin?: Point;\n preserveAspectRatio?: PreserveAspectRatio;\n innerRef?: Ref<SVGSVGElement>;\n className?: string;\n hide?: boolean;\n children: ReactNode;\n}\n\nexport function ResponsiveSVG({\n height,\n width,\n children,\n origin = { x: 0, y: 0 },\n preserveAspectRatio = 'xMaxYMid meet',\n innerRef,\n className,\n}: ResponsiveSVGProps): JSX.Element {\n const aspect = width / height;\n\n const adjustedHeight = Math.ceil(width / aspect);\n\n return (\n <div\n data-selector=\"cutting-svg-container\"\n style={{\n position: 'relative',\n overflow: 'visible',\n height: '1px',\n }}\n >\n <svg\n style={{ overflow: 'visible' }}\n className={className}\n preserveAspectRatio={preserveAspectRatio}\n viewBox={`${origin.x} ${origin.y} ${width} ${adjustedHeight}`}\n ref={innerRef}\n >\n {children}\n </svg>\n </div>\n );\n}\n","import type { CSSProperties, PropsWithChildren, RefObject } from 'react';\nimport { useEffect } from 'react';\nimport type { UseParentSizeOptions } from '@cutting/use-get-parent-size';\nimport { useParentSize } from '@cutting/use-get-parent-size';\nimport type { ResponsiveSVGProps } from '../ResponsiveSVG/ResponsiveSVG';\nimport { ResponsiveSVG } from '../ResponsiveSVG/ResponsiveSVG';\n\ntype Align = 'none' | 'center';\n\nexport type ParentsizeSVGProps<E extends HTMLElement = HTMLElement> = {\n parentRef: RefObject<E>;\n style?: CSSProperties;\n align?: Align;\n scale?: number;\n options?: Partial<UseParentSizeOptions>;\n} & Partial<Omit<ResponsiveSVGProps, 'innerRef' | 'height' | 'height'>>;\n\nexport const DefaultStyle: CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: '0%',\n overflow: 'hidden',\n} as const;\n\nexport function ParentsizeSVG<E extends HTMLElement>({\n parentRef,\n children,\n style = DefaultStyle,\n scale = 1,\n align = 'none',\n options: { debounceDelay = 50, ...optionsRest } = {},\n ...rest\n}: PropsWithChildren<ParentsizeSVGProps<E>>): JSX.Element | null {\n const { width, height } = useParentSize(parentRef, { debounceDelay, ...optionsRest });\n\n useEffect(() => {\n if (!parentRef.current) {\n return;\n }\n\n for (const [key, value] of Object.entries(style)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parentRef.current.style[key as any] = value;\n }\n }, [parentRef, style]);\n\n const transform =\n align === 'center'\n ? `translate(${width / 2},${height / 2 - 20}) scale(${scale})`\n : `translate(0,0) scale(${scale})`;\n\n return (\n <ResponsiveSVG width={width} height={height} {...rest}>\n <g transform={transform}>{children}</g>\n </ResponsiveSVG>\n );\n}\n","import cx from 'classnames';\n\ntype GroupOnlyProps = {\n /** Top offset applied to `<g/>`. */\n y?: number;\n /** Left offset applied to `<g/>`. */\n x?: number;\n /** Override `x` and `y` to provide the entire `transform` string. */\n transform?: string;\n className?: string;\n children?: React.ReactNode;\n innerRef?: React.Ref<SVGGElement>;\n};\n\ntype GroupProps = GroupOnlyProps & Omit<React.SVGProps<SVGGElement>, keyof GroupOnlyProps>;\n\nexport function Group({\n y = 0,\n x = 0,\n transform,\n className,\n children,\n innerRef,\n ...restProps\n}: GroupProps): JSX.Element {\n return (\n <g\n ref={innerRef}\n className={cx('visx-group', className)}\n transform={transform || `translate(${x}, ${y})`}\n {...restProps}\n >\n {children}\n </g>\n );\n}\n","import cx from 'classnames';\nimport type { AddSVGProps, Point } from '../../types/types';\n\nexport type LineProps = {\n className?: string;\n innerRef?: React.Ref<SVGLineElement>;\n fill?: string;\n /** Starting x,y point of the line. */\n from?: Point;\n /** Ending x,y point of the line. */\n to?: Point;\n};\n\nexport function Line({\n from = { x: 0, y: 0 },\n to = { x: 1, y: 1 },\n fill = 'transparent',\n className,\n innerRef,\n ...restProps\n}: AddSVGProps<LineProps, SVGLineElement>): JSX.Element {\n const isRectilinear = from.x === to.x || from.y === to.y;\n\n return (\n <line\n ref={innerRef}\n className={cx('visx-line', className)}\n x1={from.x}\n y1={from.y}\n x2={to.x}\n y2={to.y}\n fill={fill}\n shapeRendering={isRectilinear ? 'crispEdges' : 'auto'}\n {...restProps}\n />\n );\n}\n"],"names":["ResponsiveSVG","_ref","height","width","children","origin","x","y","preserveAspectRatio","innerRef","className","adjustedHeight","Math","ceil","_jsx","style","position","overflow","viewBox","ref","DefaultStyle","display","flexDirection","flexGrow","flexShrink","flexBasis","transform","restProps","_objectWithoutProperties","_excluded","_objectSpread","cx","from","to","fill","isRectilinear","jsx","x1","y1","x2","y2","shapeRendering","parentRef","scale","align","options","debounceDelay","optionsRest","rest","_excluded2","useParentSize","useEffect","current","key","value","Object","entries","concat"],"mappings":"sXAmBgB,SAAAA,EAQKC,GAAA,IARSC,OAC5BA,EAD4BC,MAE5BA,EAF4BC,SAG5BA,EAH4BC,OAI5BA,EAAS,CAAEC,EAAG,EAAGC,EAAG,GAJQC,oBAK5BA,EAAsB,gBALMC,SAM5BA,EAN4BC,UAO5BA,GACmBT,EACnB,MAEMU,EAAiBC,KAAKC,KAAKV,GAFlBA,EAAQD,IAIvB,OACEY,EAAAA,IAAA,MAAA,CAAA,gBACgB,wBACdC,MAAO,CACLC,SAAU,WACVC,SAAU,UACVf,OAAQ,OACTE,SAEDU,aACEC,MAAO,CAAEE,SAAU,WACnBP,UAAWA,EACXF,oBAAqBA,EACrBU,QAAYb,GAAAA,OAAAA,EAAOC,EAAKD,KAAAA,OAAAA,EAAOE,EAAKJ,KAAAA,OAAAA,EAASQ,KAAAA,OAAAA,GAC7CQ,IAAKV,EAAQL,SAEZA,6FC/BIgB,EAA8B,CACzCC,QAAS,OACTC,cAAe,SACfC,SAAU,EACVC,WAAY,EACZC,UAAW,KACXR,SAAU,gICPN,SAQOhB,GAAA,IARSM,EACpBA,EAAI,EADgBD,EAEpBA,EAAI,EAFgBoB,UAGpBA,EAHoBhB,UAIpBA,EAJoBN,SAKpBA,EALoBK,SAMpBA,GAEWR,EADR0B,EACQC,EAAA,QAAA3B,EAAA4B,GACX,OACEf,MAAA,IAAAgB,EAAA,QAA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AAI,sBAAayC,EADxD,KAAA,wBAAAc,OAE4Bd,EAH9B,KAKA,OACE7B,MAACd,uBAAcG,MAAOA,EAAOD,OAAQA,GAAY8C,OAAI5C,SACnDU,EAAGsB,IAAA,IAAA,CAAAV,UAAWA,WAAYtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.6.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/scheduler/tracing.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/react/jsx-runtime.d.ts","../src/types/types.ts","../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../node_modules/@cutting/use-get-parent-size/node_modules/@types/react/index.d.ts","../node_modules/@cutting/use-get-parent-size/dist/esm/useParentSize/types.d.ts","../node_modules/@cutting/use-get-parent-size/dist/esm/useParentSize/useParentSize.d.ts","../node_modules/@cutting/use-get-parent-size/dist/esm/index.d.ts","../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../node_modules/classnames/index.d.ts","../src/components/Group/Group.tsx","../src/components/Line/Line.tsx","../src/index.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/webpack-env/index.d.ts","../node_modules/@cutting/useful-types/global.d.ts","../node_modules/@cutting/use-get-parent-size/node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","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":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"99856c03c8c3158a466ab51bfe9322e864a325632a03eee5f396ec57401ab8ac","affectsGlobalScope":true},"af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9","fdc2fb7650d20725b5071c5ab1f88167aa7fed7d5bcdfd7587e0ebe7098bde81","1296a5ce9e4c670487d9a95d3b89d726918ec1075bdacc2abdc15178e9e3ee3e",{"version":"99856c03c8c3158a466ab51bfe9322e864a325632a03eee5f396ec57401ab8ac","affectsGlobalScope":true},"5be5cef57c4f2ed975d5c25b0f80c90743d30a81070130c72950c97ff07dd081","a07f5f79ed2f1890657db5a8c58221cb9f83d7f0609cb4ea888af4161c061592","c69a59e3e36c8e6ccfbf742458a188e2a929015ed6718d430419401353bc9fc3","6d46dc874cb5d3eb8eff45cd960740ea4ab82cb181d4364b39e4f7256c5d8373","d153cbce75b7e1621eda0a4148748f44edd71ff44cc5351bac1c7787da4d5b05","c72b9978350f95cdb683c82a639306adf59962a9b0df225fb34bc6f564db8916","556899aeccc161beaef2eb2da06268b3a40b62ddb533ff840838865ad5a33094","b6c3dfc96aa0449be1e1fcfc75d0636360a897f060993846b62ade1584fbe3c7","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"712ba0d43b44d144dfd01593f61af6e2e21cfae83e834d297643e7973e55ed61","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","98a3ebfa494b46265634a73459050befba5da8fdc6ca0ef9b7269421780f4ff3","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"b8aca9d0c81abb02bec9b7621983ae65bde71da6727580070602bd2500a9ce2a","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"5d0a9ea09d990b5788f867f1c79d4878f86f7384cb7dab38eecbf22f9efd063d","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"4cd4cff679c9b3d9239fd7bf70293ca4594583767526916af8e5d5a47d0219c7","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","103d70bfbeb3cd3a3f26d1705bf986322d8738c2c143f38ebb743b1e228d7444","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8",{"version":"3a1e422f919c70fca66e94dc641ad8d9732b3d2533ac047b8a9aaca9eea3aa10","affectsGlobalScope":true},{"version":"bcaa86fe5b4017046d3ea6ccd8f06e4a65f15ebf6d8b5dc320c0efdcaf08a61a","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"esModuleInterop":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"outDir":"./esm","removeComments":false,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"fileIdsList":[[99],[56,99],[59,99],[60,65,99],[61,71,72,79,88,98,99],[61,62,71,79,99],[63,99],[64,65,72,80,99],[65,88,95,99],[66,68,71,79,99],[67,99],[68,69,99],[70,71,99],[71,99],[71,72,73,88,98,99],[71,72,73,88,99],[74,79,88,98,99],[71,72,74,75,79,88,95,98,99],[74,76,88,95,98,99],[56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105],[71,77,99],[78,98,99],[68,71,79,88,99],[80,99],[81,99],[59,82,99],[83,97,99,103],[84,99],[85,99],[71,86,99],[86,87,99,101],[71,88,89,90,99],[88,90,99],[88,89,99],[91,99],[92,99],[71,93,94,99],[93,94,99],[65,79,88,95,99],[96,99],[79,97,99],[60,74,85,98,99],[65,99],[88,99,100],[99,101],[99,102],[60,65,71,73,82,88,98,99,101,103],[88,99,104],[40,41,42,99],[43,99],[48,49,99],[43,48,99],[41,42,99,109],[44,52,99],[44,45,52,99],[43,44,46,50,99],[43,44,45,99],[44,45,46,51,53,54,99],[44,99]],"referencedMap":[[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[56,2],[57,2],[59,3],[60,4],[61,5],[62,6],[63,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,12],[70,13],[71,14],[72,15],[73,16],[58,1],[105,1],[74,17],[75,18],[76,19],[106,20],[77,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[90,33],[89,34],[91,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[41,1],[40,1],[43,49],[44,50],[42,1],[107,1],[50,51],[48,50],[49,52],[47,53],[108,1],[52,1],[53,54],[54,55],[51,56],[46,57],[55,58],[45,59]],"exportedModulesMap":[[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[56,2],[57,2],[59,3],[60,4],[61,5],[62,6],[63,7],[64,8],[65,9],[66,10],[67,11],[68,12],[69,12],[70,13],[71,14],[72,15],[73,16],[58,1],[105,1],[74,17],[75,18],[76,19],[106,20],[77,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[90,33],[89,34],[91,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[41,1],[40,1],[43,49],[44,50],[42,1],[107,1],[50,51],[48,50],[49,52],[47,53],[108,1],[52,1],[53,54],[54,55],[51,56],[46,57],[55,58],[45,59]],"semanticDiagnosticsPerFile":[8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,38,34,35,36,37,1,39,56,57,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,58,105,74,75,76,106,77,78,79,80,81,82,83,84,85,86,87,88,90,89,91,92,93,94,95,96,97,98,99,100,101,102,103,104,41,40,43,44,42,107,50,48,49,47,108,52,53,54,51,46,55,45]},"version":"4.6.3"}
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@4.7.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/@types/react/global.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/scheduler/tracing.d.ts","../node_modules/@types/react/index.d.ts","../node_modules/@types/react/jsx-runtime.d.ts","../src/types/types.ts","../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../node_modules/@cutting/use-get-parent-size/node_modules/@types/react/index.d.ts","../node_modules/@cutting/use-get-parent-size/dist/esm/useParentSize/types.d.ts","../node_modules/@cutting/use-get-parent-size/dist/esm/useParentSize/useParentSize.d.ts","../node_modules/@cutting/use-get-parent-size/dist/esm/index.d.ts","../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../node_modules/classnames/index.d.ts","../src/components/Group/Group.tsx","../src/components/Line/Line.tsx","../src/index.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/webpack-env/index.d.ts","../node_modules/@cutting/useful-types/global.d.ts","../node_modules/@cutting/use-get-parent-size/node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","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":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"e7e7eec1dd67134d37fc1f14d19b45de9cff9bdde6cb3961b7de2a277df48029","affectsGlobalScope":true},"af7fd2870746deed40e130fc0a3966de74e8f52a97ec114d0fbb35876ab05ca9",{"version":"fdc2fb7650d20725b5071c5ab1f88167aa7fed7d5bcdfd7587e0ebe7098bde81","signature":"959e2ef70bc5df87567f36fe46af3f1aa7dfe5c4924337becbb80a9d91fa7a0e"},{"version":"1296a5ce9e4c670487d9a95d3b89d726918ec1075bdacc2abdc15178e9e3ee3e","signature":"cfb670fe86a93086e635a4003e5fb3f472cfe19d35b88c0fa2d6e0d08103ae8f"},{"version":"e7e7eec1dd67134d37fc1f14d19b45de9cff9bdde6cb3961b7de2a277df48029","affectsGlobalScope":true},"5be5cef57c4f2ed975d5c25b0f80c90743d30a81070130c72950c97ff07dd081","a07f5f79ed2f1890657db5a8c58221cb9f83d7f0609cb4ea888af4161c061592","c69a59e3e36c8e6ccfbf742458a188e2a929015ed6718d430419401353bc9fc3",{"version":"6d46dc874cb5d3eb8eff45cd960740ea4ab82cb181d4364b39e4f7256c5d8373","signature":"df9df6f6337ba34ed7893c3d22891677b4c30d315d1fecdb33dc3d2fbcf3bbd0"},"d153cbce75b7e1621eda0a4148748f44edd71ff44cc5351bac1c7787da4d5b05",{"version":"c72b9978350f95cdb683c82a639306adf59962a9b0df225fb34bc6f564db8916","signature":"748084edc9b2cd8f3ce4bb4b51c3198a9658b1846d40ecee0d04be5a7b65eaf3"},{"version":"556899aeccc161beaef2eb2da06268b3a40b62ddb533ff840838865ad5a33094","signature":"88a16163f49d837b55101c13530a1dc38ab21069d8fb9fafa740f6bacbfa17fa"},"b6c3dfc96aa0449be1e1fcfc75d0636360a897f060993846b62ade1584fbe3c7","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"e5979905796fe2740d85fbaf4f11f42b7ee1851421afe750823220813421b1af",{"version":"fcdcb42da18dd98dc286b1876dd425791772036012ae61263c011a76b13a190f","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5b30f550565fd0a7524282c81c27fe8534099e2cd26170ca80852308f07ae68d","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","d97cd8a4a42f557fc62271369ed0461c8e50d47b7f9c8ad0b5462f53306f6060","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"58df92fa3b18e84865bb0d2fe4b9d2d5bcb9952d4548c871f10ef02702b386f8","52f38aecbb24bebde0b7a0203a686902fc6be930bd0cdb80f482441e4f56fd7d","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","063f53ff674228c190efa19dd9448bcbd540acdbb48a928f4cf3a1b9f9478e43","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"963fe86b2ebd07a34b92b52c6532ab45ec5ccda218a6c477de354fcad2aae0cb","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"9f8dd3922db205bc8a362a6b18078708fd699185b11648522159cbf3743561b5","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","821dcb2b571bf698841d8ec25fde9d5f615ef3958957227962602f9dbfa8d800","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"f234fa210fdce190f851211bccf105301f62736fe9d536aed1abc1639967fdec","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","103d70bfbeb3cd3a3f26d1705bf986322d8738c2c143f38ebb743b1e228d7444","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"aee3379fb20741a337a779530cc3e608aba5f34776511033d1d2db7ca45c4193",{"version":"3a6de361cea25e21054d8f8a8e35c5c0df730982f9b9fb613a6e9029e54071e5","affectsGlobalScope":true},{"version":"bcaa86fe5b4017046d3ea6ccd8f06e4a65f15ebf6d8b5dc320c0efdcaf08a61a","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"esModuleInterop":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"outDir":"./esm","removeComments":false,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"fileIdsList":[[101],[58,101],[61,101],[62,67,101],[63,73,74,81,90,100,101],[63,64,73,81,101],[65,101],[66,67,74,82,101],[67,90,97,101],[68,70,73,81,101],[69,101],[70,71,101],[72,73,101],[73,101],[73,74,75,90,100,101],[73,74,75,90,93,101],[101,105],[76,81,90,100,101],[73,74,76,77,81,90,97,100,101],[76,78,90,97,100,101],[58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],[73,79,101],[80,100,101],[70,73,81,90,101],[82,101],[83,101],[61,84,101],[85,99,101,105],[86,101],[87,101],[73,88,101],[88,89,101,103],[73,90,91,92,101],[90,92,101],[90,91,101],[93,101],[94,101],[73,95,96,101],[95,96,101],[67,81,90,97,101],[98,101],[81,99,101],[62,76,87,100,101],[67,101],[90,101,102],[101,103],[101,104],[62,67,73,75,84,90,100,101,103,105],[90,101,106],[50,51,101],[45,101],[45,50,101],[43,44,101,111],[42,43,44,101],[46,54,101],[46,47,54,101],[45,46,48,52,101],[45,46,47,101],[46,47,48,53,55,56,101],[46,101],[47],[45,48,52],[45,47]],"referencedMap":[[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[58,2],[59,2],[61,3],[62,4],[63,5],[64,6],[65,7],[66,8],[67,9],[68,10],[69,11],[70,12],[71,12],[72,13],[73,14],[74,15],[75,16],[60,17],[107,1],[76,18],[77,19],[78,20],[108,21],[79,22],[80,23],[81,24],[82,25],[83,26],[84,27],[85,28],[86,29],[87,30],[88,31],[89,32],[90,33],[92,34],[91,35],[93,36],[94,37],[95,38],[96,39],[97,40],[98,41],[99,42],[100,43],[101,44],[102,45],[103,46],[104,47],[105,48],[106,49],[43,1],[44,1],[109,1],[52,50],[50,51],[51,52],[49,53],[110,1],[42,1],[45,54],[46,51],[54,1],[55,55],[56,56],[53,57],[48,58],[57,59],[47,60]],"exportedModulesMap":[[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[58,2],[59,2],[61,3],[62,4],[63,5],[64,6],[65,7],[66,8],[67,9],[68,10],[69,11],[70,12],[71,12],[72,13],[73,14],[74,15],[75,16],[60,17],[107,1],[76,18],[77,19],[78,20],[108,21],[79,22],[80,23],[81,24],[82,25],[83,26],[84,27],[85,28],[86,29],[87,30],[88,31],[89,32],[90,33],[92,34],[91,35],[93,36],[94,37],[95,38],[96,39],[97,40],[98,41],[99,42],[100,43],[101,44],[102,45],[103,46],[104,47],[105,48],[106,49],[43,1],[44,1],[109,1],[52,50],[50,51],[51,52],[49,53],[110,1],[42,1],[45,54],[46,51],[54,1],[56,61],[53,62],[48,63],[57,59]],"semanticDiagnosticsPerFile":[8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,1,41,58,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,60,107,76,77,78,108,79,80,81,82,83,84,85,86,87,88,89,90,92,91,93,94,95,96,97,98,99,100,101,102,103,104,105,106,43,44,109,52,50,51,49,110,42,45,46,54,55,56,53,48,57,47]},"version":"4.7.3"}
|
package/dist/umd/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../../src/components/Group/Group.tsx","../../src/components/Line/Line.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { PreserveAspectRatio } from '../../types/types';\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface ResponsiveSVGProps {\n width: number;\n height: number;\n origin?: Point;\n preserveAspectRatio?: PreserveAspectRatio;\n innerRef?: Ref<SVGSVGElement>;\n className?: string;\n hide?: boolean;\n children: ReactNode;\n}\n\nexport function ResponsiveSVG({\n height,\n width,\n children,\n origin = { x: 0, y: 0 },\n preserveAspectRatio = 'xMaxYMid meet',\n innerRef,\n className,\n}: ResponsiveSVGProps): JSX.Element {\n const aspect = width / height;\n\n const adjustedHeight = Math.ceil(width / aspect);\n\n return (\n <div\n data-selector=\"cutting-svg-container\"\n style={{\n position: 'relative',\n overflow: 'visible',\n height: '1px',\n }}\n >\n <svg\n style={{ overflow: 'visible' }}\n className={className}\n preserveAspectRatio={preserveAspectRatio}\n viewBox={`${origin.x} ${origin.y} ${width} ${adjustedHeight}`}\n ref={innerRef}\n >\n {children}\n </svg>\n </div>\n );\n}\n","import type { CSSProperties, PropsWithChildren, RefObject } from 'react';\nimport { useEffect } from 'react';\nimport type { UseParentSizeOptions } from '@cutting/use-get-parent-size';\nimport { useParentSize } from '@cutting/use-get-parent-size';\nimport type { ResponsiveSVGProps } from '../ResponsiveSVG/ResponsiveSVG';\nimport { ResponsiveSVG } from '../ResponsiveSVG/ResponsiveSVG';\n\ntype Align = 'none' | 'center';\n\nexport type ParentsizeSVGProps<E extends HTMLElement = HTMLElement> = {\n parentRef: RefObject<E>;\n style?: CSSProperties;\n align?: Align;\n scale?: number;\n options?: Partial<UseParentSizeOptions>;\n} & Partial<Omit<ResponsiveSVGProps, 'innerRef' | 'height' | 'height'>>;\n\nexport const DefaultStyle: CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: '0%',\n overflow: 'hidden',\n} as const;\n\nexport function ParentsizeSVG<E extends HTMLElement>({\n parentRef,\n children,\n style = DefaultStyle,\n scale = 1,\n align = 'none',\n options: { debounceDelay = 50, ...optionsRest } = {},\n ...rest\n}: PropsWithChildren<ParentsizeSVGProps<E>>): JSX.Element | null {\n const { width, height } = useParentSize(parentRef, { debounceDelay, ...optionsRest });\n\n useEffect(() => {\n if (!parentRef.current) {\n return;\n }\n\n for (const [key, value] of Object.entries(style)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parentRef.current.style[key as any] = value;\n }\n }, [parentRef, style]);\n\n const transform =\n align === 'center'\n ? `translate(${width / 2},${height / 2 - 20}) scale(${scale})`\n : `translate(0,0) scale(${scale})`;\n\n return (\n <ResponsiveSVG width={width} height={height} {...rest}>\n <g transform={transform}>{children}</g>\n </ResponsiveSVG>\n );\n}\n","import cx from 'classnames';\n\ntype GroupOnlyProps = {\n /** Top offset applied to `<g/>`. */\n y?: number;\n /** Left offset applied to `<g/>`. */\n x?: number;\n /** Override `x` and `y` to provide the entire `transform` string. */\n transform?: string;\n className?: string;\n children?: React.ReactNode;\n innerRef?: React.Ref<SVGGElement>;\n};\n\ntype GroupProps = GroupOnlyProps & Omit<React.SVGProps<SVGGElement>, keyof GroupOnlyProps>;\n\nexport function Group({\n y = 0,\n x = 0,\n transform,\n className,\n children,\n innerRef,\n ...restProps\n}: GroupProps): JSX.Element {\n return (\n <g\n ref={innerRef}\n className={cx('visx-group', className)}\n transform={transform || `translate(${x}, ${y})`}\n {...restProps}\n >\n {children}\n </g>\n );\n}\n","import cx from 'classnames';\nimport type { AddSVGProps, Point } from '../../types/types';\n\nexport type LineProps = {\n className?: string;\n innerRef?: React.Ref<SVGLineElement>;\n fill?: string;\n /** Starting x,y point of the line. */\n from?: Point;\n /** Ending x,y point of the line. */\n to?: Point;\n};\n\nexport function Line({\n from = { x: 0, y: 0 },\n to = { x: 1, y: 1 },\n fill = 'transparent',\n className,\n innerRef,\n ...restProps\n}: AddSVGProps<LineProps, SVGLineElement>): JSX.Element {\n const isRectilinear = from.x === to.x || from.y === to.y;\n\n return (\n <line\n ref={innerRef}\n className={cx('visx-line', className)}\n x1={from.x}\n y1={from.y}\n x2={to.x}\n y2={to.y}\n fill={fill}\n shapeRendering={isRectilinear ? 'crispEdges' : 'auto'}\n {...restProps}\n />\n );\n}\n"],"names":["ResponsiveSVG","_ref","height","width","children","origin","x","y","preserveAspectRatio","innerRef","className","adjustedHeight","Math","ceil","_jsx","style","position","overflow","viewBox","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/ResponsiveSVG/ResponsiveSVG.tsx","../../src/components/ParentsizeSVG/ParentsizeSVG.tsx","../../src/components/Group/Group.tsx","../../src/components/Line/Line.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport type { PreserveAspectRatio } from '../../types/types';\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface ResponsiveSVGProps {\n width: number;\n height: number;\n origin?: Point;\n preserveAspectRatio?: PreserveAspectRatio;\n innerRef?: Ref<SVGSVGElement>;\n className?: string;\n hide?: boolean;\n children: ReactNode;\n}\n\nexport function ResponsiveSVG({\n height,\n width,\n children,\n origin = { x: 0, y: 0 },\n preserveAspectRatio = 'xMaxYMid meet',\n innerRef,\n className,\n}: ResponsiveSVGProps): JSX.Element {\n const aspect = width / height;\n\n const adjustedHeight = Math.ceil(width / aspect);\n\n return (\n <div\n data-selector=\"cutting-svg-container\"\n style={{\n position: 'relative',\n overflow: 'visible',\n height: '1px',\n }}\n >\n <svg\n style={{ overflow: 'visible' }}\n className={className}\n preserveAspectRatio={preserveAspectRatio}\n viewBox={`${origin.x} ${origin.y} ${width} ${adjustedHeight}`}\n ref={innerRef}\n >\n {children}\n </svg>\n </div>\n );\n}\n","import type { CSSProperties, PropsWithChildren, RefObject } from 'react';\nimport { useEffect } from 'react';\nimport type { UseParentSizeOptions } from '@cutting/use-get-parent-size';\nimport { useParentSize } from '@cutting/use-get-parent-size';\nimport type { ResponsiveSVGProps } from '../ResponsiveSVG/ResponsiveSVG';\nimport { ResponsiveSVG } from '../ResponsiveSVG/ResponsiveSVG';\n\ntype Align = 'none' | 'center';\n\nexport type ParentsizeSVGProps<E extends HTMLElement = HTMLElement> = {\n parentRef: RefObject<E>;\n style?: CSSProperties;\n align?: Align;\n scale?: number;\n options?: Partial<UseParentSizeOptions>;\n} & Partial<Omit<ResponsiveSVGProps, 'innerRef' | 'height' | 'height'>>;\n\nexport const DefaultStyle: CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: '0%',\n overflow: 'hidden',\n} as const;\n\nexport function ParentsizeSVG<E extends HTMLElement>({\n parentRef,\n children,\n style = DefaultStyle,\n scale = 1,\n align = 'none',\n options: { debounceDelay = 50, ...optionsRest } = {},\n ...rest\n}: PropsWithChildren<ParentsizeSVGProps<E>>): JSX.Element | null {\n const { width, height } = useParentSize(parentRef, { debounceDelay, ...optionsRest });\n\n useEffect(() => {\n if (!parentRef.current) {\n return;\n }\n\n for (const [key, value] of Object.entries(style)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parentRef.current.style[key as any] = value;\n }\n }, [parentRef, style]);\n\n const transform =\n align === 'center'\n ? `translate(${width / 2},${height / 2 - 20}) scale(${scale})`\n : `translate(0,0) scale(${scale})`;\n\n return (\n <ResponsiveSVG width={width} height={height} {...rest}>\n <g transform={transform}>{children}</g>\n </ResponsiveSVG>\n );\n}\n","import cx from 'classnames';\n\ntype GroupOnlyProps = {\n /** Top offset applied to `<g/>`. */\n y?: number;\n /** Left offset applied to `<g/>`. */\n x?: number;\n /** Override `x` and `y` to provide the entire `transform` string. */\n transform?: string;\n className?: string;\n children?: React.ReactNode;\n innerRef?: React.Ref<SVGGElement>;\n};\n\ntype GroupProps = GroupOnlyProps & Omit<React.SVGProps<SVGGElement>, keyof GroupOnlyProps>;\n\nexport function Group({\n y = 0,\n x = 0,\n transform,\n className,\n children,\n innerRef,\n ...restProps\n}: GroupProps): JSX.Element {\n return (\n <g\n ref={innerRef}\n className={cx('visx-group', className)}\n transform={transform || `translate(${x}, ${y})`}\n {...restProps}\n >\n {children}\n </g>\n );\n}\n","import cx from 'classnames';\nimport type { AddSVGProps, Point } from '../../types/types';\n\nexport type LineProps = {\n className?: string;\n innerRef?: React.Ref<SVGLineElement>;\n fill?: string;\n /** Starting x,y point of the line. */\n from?: Point;\n /** Ending x,y point of the line. */\n to?: Point;\n};\n\nexport function Line({\n from = { x: 0, y: 0 },\n to = { x: 1, y: 1 },\n fill = 'transparent',\n className,\n innerRef,\n ...restProps\n}: AddSVGProps<LineProps, SVGLineElement>): JSX.Element {\n const isRectilinear = from.x === to.x || from.y === to.y;\n\n return (\n <line\n ref={innerRef}\n className={cx('visx-line', className)}\n x1={from.x}\n y1={from.y}\n x2={to.x}\n y2={to.y}\n fill={fill}\n shapeRendering={isRectilinear ? 'crispEdges' : 'auto'}\n {...restProps}\n />\n );\n}\n"],"names":["ResponsiveSVG","_ref","height","width","children","origin","x","y","preserveAspectRatio","innerRef","className","adjustedHeight","Math","ceil","_jsx","style","position","overflow","viewBox","ref","DefaultStyle","display","flexDirection","flexGrow","flexShrink","flexBasis","transform","restProps","_objectWithoutProperties","_excluded","_objectSpread","cx","from","to","fill","isRectilinear","jsx","x1","y1","x2","y2","shapeRendering","parentRef","scale","align","options","debounceDelay","optionsRest","rest","_excluded2","useParentSize","useEffect","current","key","value","Object","entries","concat"],"mappings":"6xBAmBgB,SAAAA,EAQKC,GAAA,IARSC,OAC5BA,EAD4BC,MAE5BA,EAF4BC,SAG5BA,EAH4BC,OAI5BA,EAAS,CAAEC,EAAG,EAAGC,EAAG,GAJQC,oBAK5BA,EAAsB,gBALMC,SAM5BA,EAN4BC,UAO5BA,GACmBT,EACnB,MAEMU,EAAiBC,KAAKC,KAAKV,GAFlBA,EAAQD,IAIvB,OACEY,EAAAA,IAAA,MAAA,CAAA,gBACgB,wBACdC,MAAO,CACLC,SAAU,WACVC,SAAU,UACVf,OAAQ,OACTE,SAEDU,aACEC,MAAO,CAAEE,SAAU,WACnBP,UAAWA,EACXF,oBAAqBA,EACrBU,QAAYb,GAAAA,OAAAA,EAAOC,EAAKD,KAAAA,OAAAA,EAAOE,EAAKJ,KAAAA,OAAAA,EAASQ,KAAAA,OAAAA,GAC7CQ,IAAKV,EAAQL,SAEZA,6FC/BIgB,EAA8B,CACzCC,QAAS,OACTC,cAAe,SACfC,SAAU,EACVC,WAAY,EACZC,UAAW,KACXR,SAAU,0HCPN,SAQOhB,GAAA,IARSM,EACpBA,EAAI,EADgBD,EAEpBA,EAAI,EAFgBoB,UAGpBA,EAHoBhB,UAIpBA,EAJoBN,SAKpBA,EALoBK,SAMpBA,GAEWR,EADR0B,EACQC,EAAA,QAAA3B,EAAA4B,GACX,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OACiBtD,EAAQ,cAAKD,EAAS,EAAI,sBAAayC,EADxD,KAAA,wBAAAc,OAE4Bd,EAH9B,KAKA,OACE7B,MAACd,uBAAcG,MAAOA,EAAOD,OAAQA,GAAY8C,OAAI5C,SACnDU,EAAGsB,IAAA,IAAA,CAAAV,UAAWA,WAAYtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cutting/svg",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.46.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dagda1/cuttingedge.git"
|
|
@@ -15,28 +15,30 @@
|
|
|
15
15
|
"types": "dist/esm/index.d.ts",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cutting/use-get-parent-size": "1.
|
|
19
|
-
"@cutting/util": "4.
|
|
18
|
+
"@cutting/use-get-parent-size": "1.20.0",
|
|
19
|
+
"@cutting/util": "4.52.0",
|
|
20
20
|
"classnames": "^2.3.1",
|
|
21
21
|
"resize-observer-polyfill": "^1.5.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@babel/runtime": "7.
|
|
25
|
-
"@cutting/component-library": "5.
|
|
26
|
-
"@cutting/devtools": "4.
|
|
27
|
-
"@cutting/eslint-config": "4.
|
|
28
|
-
"@cutting/tsconfig": "4.
|
|
24
|
+
"@babel/runtime": "7.18.3",
|
|
25
|
+
"@cutting/component-library": "5.27.0",
|
|
26
|
+
"@cutting/devtools": "4.55.0",
|
|
27
|
+
"@cutting/eslint-config": "4.41.0",
|
|
28
|
+
"@cutting/tsconfig": "4.38.0",
|
|
29
29
|
"@cutting/useful-types": "4.36.1",
|
|
30
|
-
"@jest/globals": "
|
|
30
|
+
"@jest/globals": "28.1.0",
|
|
31
31
|
"@testing-library/jest-dom": "5.16.4",
|
|
32
|
-
"@testing-library/react": "^13.0
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@vanilla-extract/
|
|
36
|
-
"
|
|
32
|
+
"@testing-library/react": "^13.3.0",
|
|
33
|
+
"@types/react": "18.0.11",
|
|
34
|
+
"@types/react-dom": "18.0.5",
|
|
35
|
+
"@vanilla-extract/babel-plugin": "1.1.6",
|
|
36
|
+
"@vanilla-extract/css": "^1.7.1",
|
|
37
|
+
"@vanilla-extract/sprinkles": "1.4.1",
|
|
38
|
+
"eslint": "8.17.0",
|
|
37
39
|
"react": "18.1.0",
|
|
38
40
|
"react-dom": "18.1.0",
|
|
39
|
-
"typescript": "4.
|
|
41
|
+
"typescript": "4.7.3"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
42
44
|
"react": ">= 18.x.x",
|
|
@@ -63,6 +65,5 @@
|
|
|
63
65
|
"start": "PORT=8888 NODE_ENV=development devtools devserver-start",
|
|
64
66
|
"test": "NODE_ENV=test devtools test",
|
|
65
67
|
"test:ci": "CI=true pnpm test"
|
|
66
|
-
}
|
|
67
|
-
"readme": "# @cutting/svg - reusable svg components for SVG documents\n[](https://www.npmjs.com/package/@cutting/svg)\n[](https://github.com/prettier/prettier)\n\n## install \n\n```sh\npnpm add @cutting/svg\n\n# or\n\nnpm install @cutting/svg\n```\n\n## ParentsizeSVG\n\nA react component that will resize and scale to the dimensions of the supplied react [ref object](https://reactjs.org/docs/refs-and-the-dom.html).\n\n\n\nThe `ParentsizeSVG` component takes an `parentRef` prop that should point to a valid HTML DOM element.\n\n## usage\n\n```ts\nimport { useRef } from 'react';\nimport { ParentsizeSVG } from '@cutting/svg';\n\nexport function App(): JSX.Element {\n const ref = useRef<HTMLDivElement>(null);\n\n return (\n <div className={styles.container} ref={ref}>\n <ParentsizeSVG ref={ref}>\n <rect\n x=\"20%\"\n y=\"20%\"\n width={'50%'}\n height={'50%'}\n rx=\"20\"\n style={{ fill: '#ff0000', stroke: '#000000', strokeWidth: '2px' }}\n />\n </ParentsizeSVG>\n </div>\n );\n};\n```"
|
|
68
|
+
}
|
|
68
69
|
}
|