lines-overlay 0.1.20 → 0.1.21
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/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +668 -1
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +631 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +11 -11
- package/{components → src/components}/config-button.tsx +1 -1
- package/{lines-overlay.tsx → src/lines-overlay.tsx} +1 -1
- package/tsconfig.json +2 -2
- package/tsup.config.ts +17 -0
- package/dist/components/config-button.d.ts +0 -6
- package/dist/components/config-button.js +0 -51
- package/dist/components/config-options.d.ts +0 -2
- package/dist/components/config-options.js +0 -101
- package/dist/components/data.d.ts +0 -25
- package/dist/components/data.js +0 -28
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.js +0 -3
- package/dist/components/move-lines-button.d.ts +0 -4
- package/dist/components/move-lines-button.js +0 -44
- package/dist/lines-overlay.d.ts +0 -1
- package/dist/lines-overlay.js +0 -65
- package/dist/types.d.ts +0 -3
- package/dist/types.js +0 -1
- package/dist/ui/button.d.ts +0 -22
- package/dist/ui/button.js +0 -93
- package/dist/ui/buttons-wrapper.d.ts +0 -8
- package/dist/ui/buttons-wrapper.js +0 -13
- package/dist/ui/index.d.ts +0 -3
- package/dist/ui/index.js +0 -3
- package/dist/ui/lucide-icon.d.ts +0 -34
- package/dist/ui/lucide-icon.js +0 -37
- package/dist/ui/separator.d.ts +0 -6
- package/dist/ui/separator.js +0 -28
- package/index.css +0 -0
- /package/{comandos.txt → src/comandos.txt} +0 -0
- /package/{components → src/components}/config-options.tsx +0 -0
- /package/{components → src/components}/data.ts +0 -0
- /package/{components → src/components}/index.ts +0 -0
- /package/{components → src/components}/move-lines-button.tsx +0 -0
- /package/{index.ts → src/index.ts} +0 -0
- /package/{ui → src/ui}/button.tsx +0 -0
- /package/{ui → src/ui}/buttons-wrapper.tsx +0 -0
- /package/{ui → src/ui}/index.ts +0 -0
- /package/{ui → src/ui}/lucide-icon.tsx +0 -0
- /package/{ui → src/ui}/separator.tsx +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/lines-overlay.tsx","../src/components/move-lines-button.tsx","../src/ui/button.tsx","../src/ui/lucide-icon.tsx","../src/ui/separator.tsx","../src/components/config-button.tsx","../src/components/data.ts","../src/components/config-options.tsx"],"sourcesContent":["export { RowGrid } from \"./lines-overlay\";\n","import { Eye } from \"lucide-react\";\r\nimport { useEffect, useRef, useState } from \"react\";\r\nimport {\r\n ConfigButton,\r\n ConfigOptions,\r\n MoveLinesButton,\r\n} from \"./components/index\";\r\nimport { StateSetter } from \"../types\";\r\nimport { Button, Icon } from \"./ui\";\r\n\r\ntype Props = {\r\n setShow: StateSetter<boolean>;\r\n show: boolean;\r\n};\r\n\r\nconst css = {\r\n overlay: {\r\n position: 'fixed' as const,\r\n top: 100,\r\n left: 0,\r\n width: '100%',\r\n pointerEvents: 'none' as const,\r\n display: 'flex',\r\n justifyContent: 'center',\r\n zIndex: 9998,\r\n },\r\n grid: {\r\n width: '100%',\r\n },\r\n triggerButton: {\r\n position: 'fixed' as const,\r\n bottom: 8,\r\n right: 8,\r\n zIndex: 9999,\r\n fontSize: '0.75rem',\r\n backgroundColor: 'rgba(255,255,255,0.66)',\r\n },\r\n} as const;\r\n\r\nfunction RowGridCore({ show, setShow }: Props) {\r\n const containerRef = useRef<HTMLDivElement>(null);\r\n\r\n const [lines, setLines] = useState(12);\r\n const [gap, setGap] = useState(24);\r\n const [opacity, setOpacity] = useState(0.3);\r\n const [color, setColor] = useState(\"#d71212\");\r\n const [showConfig, setShowConfig] = useState(false);\r\n\r\n // Toggle por tecla\r\n useEffect(() => {\r\n const handler = (e: KeyboardEvent) => {\r\n if (e.ctrlKey && e.key === \";\") {\r\n setShow((v) => !v);\r\n }\r\n };\r\n window.addEventListener(\"keydown\", handler);\r\n return () => window.removeEventListener(\"keydown\", handler);\r\n }, []);\r\n\r\n if (!show) return null;\r\n\r\n const height = lines * gap;\r\n\r\n return (\r\n <div>\r\n <div\r\n ref={containerRef}\r\n style={{ ...css.overlay, height }}\r\n >\r\n {/* linhas */}\r\n <div\r\n style={{\r\n ...css.grid,\r\n height,\r\n backgroundImage: `repeating-linear-gradient(\r\n to bottom,\r\n ${color},\r\n ${color} 1px,\r\n transparent 1px,\r\n transparent ${gap}px\r\n )`,\r\n opacity,\r\n }}\r\n />\r\n {/* Move */}\r\n <MoveLinesButton targetRef={containerRef} />\r\n </div>\r\n {/* Config */}\r\n <ConfigButton\r\n setShow={setShow}\r\n onToggleConfig={() => setShowConfig((v) => !v)}\r\n open={showConfig}\r\n />\r\n {showConfig && (\r\n <ConfigOptions\r\n lines={lines}\r\n gap={gap}\r\n opacity={opacity}\r\n color={color}\r\n setLines={setLines}\r\n setGap={setGap}\r\n setOpacity={setOpacity}\r\n setColor={setColor}\r\n />\r\n )}\r\n </div>\r\n );\r\n}\r\n\r\nexport function RowGrid() {\r\n const [show, setShow] = useState(false);\r\n\r\n return (\r\n <>\r\n <Button\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n style={{ ...css.triggerButton, visibility: show ? 'hidden' : 'visible' }}\r\n onClick={() => setShow((v) => !v)}\r\n >\r\n Mostrar linhas\r\n <Icon Icon={Eye} />\r\n </Button>\r\n\r\n <RowGridCore setShow={setShow} show={show} />\r\n </>\r\n );\r\n}\r\n","import { Move } from 'lucide-react';\nimport { useRef, type MouseEvent as ReactMouseEvent, type RefObject } from 'react';\nimport { Button, Icon } from '../ui';\n\nconst css = {\n wrapper: {\n position: 'absolute' as const,\n left: '50%',\n top: '44%',\n transform: 'translate(-50%, -50%)',\n pointerEvents: 'auto',\n },\n button: {\n borderRadius: 9999,\n backgroundColor: 'rgba(255,255,255,0.75)',\n backdropFilter: 'blur(2px)',\n },\n} as const;\n\r\nexport function MoveLinesButton({ targetRef }: { targetRef: RefObject<HTMLDivElement | null> }) {\n const dragging = useRef(false);\r\n const last = useRef({ x: 0, y: 0 });\r\n\r\n function onMouseDown(e: ReactMouseEvent<HTMLButtonElement>) {\n dragging.current = true;\r\n last.current = { x: e.clientX, y: e.clientY };\r\n document.addEventListener('mousemove', onMove);\r\n document.addEventListener('mouseup', onUp);\r\n }\r\n\r\n function onMove(e: MouseEvent) {\r\n if (!dragging.current || !targetRef.current) return;\r\n\r\n const dx = e.clientX - last.current.x;\r\n const dy = e.clientY - last.current.y;\r\n\r\n const el = targetRef.current;\r\n\r\n el.style.left = `${el.offsetLeft + dx}px`;\r\n el.style.top = `${el.offsetTop + dy}px`;\r\n\r\n last.current = { x: e.clientX, y: e.clientY };\r\n }\r\n\r\n function onUp() {\r\n dragging.current = false;\r\n document.removeEventListener('mousemove', onMove);\r\n document.removeEventListener('mouseup', onUp);\r\n }\r\n\r\n return (\r\n <div style={css.wrapper}>\n <Button\r\n size=\"icon-sm\"\r\n data-black\r\n variant=\"ghost\"\r\n onMouseDown={onMouseDown}\r\n style={css.button}>\n <Icon Icon={Move} size=\"lg\" strokeWidth=\"thin\" />\r\n </Button>\r\n </div>\r\n );\r\n}\r\n","import * as React from 'react';\r\n\r\ntype ButtonVariant = 'default' | 'ghost' | 'transparent';\r\ntype ButtonSize = 'default' | 'sm' | 'icon-sm';\r\n\r\nconst styles = {\r\n base: {\r\n width: 'auto',\r\n display: 'inline-flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n gap: 8,\r\n borderRadius: 6,\r\n position: 'relative',\r\n outline: 'none',\r\n userSelect: 'none',\r\n } satisfies React.CSSProperties,\r\n\r\n variants: {\r\n default: {\r\n backgroundColor: '#0ea5e9',\r\n color: '#ffffff',\r\n },\r\n ghost: {\r\n backgroundColor: 'transparent',\r\n color: '#111827',\r\n border: '1px solid #e5e7eb',\r\n },\r\n transparent: {\r\n backgroundColor: 'transparent',\r\n color: '#0ea5e9',\r\n },\r\n } satisfies Record<ButtonVariant, React.CSSProperties>,\r\n\r\n sizes: {\r\n default: {\r\n minHeight: 40,\r\n paddingInline: 12,\r\n paddingBlock: 12 * 0.73438 / 0.93,\r\n },\r\n sm: {\r\n minHeight: 36,\r\n paddingInline: 12,\r\n paddingBlock: 10,\r\n },\r\n 'icon-sm': {\r\n width: 32,\r\n height: 32,\r\n padding: 0,\r\n },\r\n } satisfies Record<ButtonSize, React.CSSProperties>,\r\n\r\n selected: {\r\n border: '2px solid #60a5fa',\r\n color: '#0ea5e9',\r\n backgroundColor: 'rgba(59,130,246,0.08)',\r\n } satisfies React.CSSProperties,\r\n\r\n closeButton: {\r\n borderRadius: 9999,\r\n color: '#0f172a',\r\n } satisfies React.CSSProperties,\r\n};\r\n\r\n\r\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\r\n asChild?: boolean;\r\n selected?: boolean;\r\n disabled?: boolean;\r\n closeButton?: boolean;\r\n variant?: ButtonVariant;\r\n size?: ButtonSize;\r\n}\r\n\r\ntype ResolveButtonStyleParams = {\r\n variant: ButtonVariant;\r\n size: ButtonSize;\r\n selected?: boolean;\r\n disabled?: boolean;\r\n closeButton?: boolean;\r\n style?: React.CSSProperties;\r\n};\r\n\r\nexport function resolveButtonStyles({\r\n variant,\r\n size,\r\n selected,\r\n disabled,\r\n closeButton,\r\n style,\r\n}: ResolveButtonStyleParams): React.CSSProperties {\r\n return {\r\n ...styles.base,\r\n ...styles.variants[variant],\r\n ...styles.sizes[size],\r\n ...(disabled && { opacity: 0.6, cursor: 'not-allowed' }),\r\n ...(selected && styles.selected),\r\n ...(closeButton && styles.closeButton),\r\n ...style,\r\n };\r\n}\r\n\r\ntype SlotProps = React.HTMLAttributes<HTMLElement> & {\r\n children?: React.ReactNode;\r\n};\r\n\r\nconst Slot = React.forwardRef<HTMLElement, SlotProps>(\r\n ({ children, className, style, ...slotProps }, ref) => {\r\n if (!children || !React.isValidElement(children)) {\r\n return null;\r\n }\r\n\r\n const child = children as React.ReactElement<any>;\r\n const mergedClassName = [className, child.props.className].filter(Boolean).join(' ');\r\n const mergedStyle = { ...style, ...child.props.style };\r\n\r\n return React.cloneElement(child, {\r\n ...slotProps,\r\n ...child.props,\r\n className: mergedClassName || undefined,\r\n style: mergedStyle,\r\n ref,\r\n });\r\n },\r\n);\r\n\r\n\r\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\r\n (\r\n {\r\n className,\r\n variant = 'default',\r\n size = 'default',\r\n asChild = false,\r\n selected = false,\r\n disabled = false,\r\n closeButton = false,\r\n style,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const Comp = asChild ? Slot : 'button';\r\n\r\n return (\r\n <Comp\r\n ref={ref}\r\n className={className}\r\n disabled={disabled}\r\n style={resolveButtonStyles({\r\n variant,\r\n size,\r\n selected,\r\n disabled,\r\n closeButton,\r\n style,\r\n })}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\n","import type { LucideIcon as LucideIconType, LucideProps } from 'lucide-react';\r\n\r\ntype StrokeWidthValue = keyof typeof weights;\r\nconst weights = {\r\n thin: 2.25,\r\n light: 2.35,\r\n normal: 2.65,\r\n semibold: 2.75,\r\n bold: 2.85,\r\n extrabold: 3,\r\n};\r\n\r\ntype SizeValue = keyof typeof iconSizes;\r\n\r\nconst iconSizes = {\r\n xs: '0.937em',\r\n sm: '0.968em',\r\n base: '1em',\r\n md: '1.033em',\r\n lg: '1.067em',\r\n xl: '1.138em',\r\n '2xl': '1.215em',\r\n '3xl': '1.296em',\r\n h6: '1.067em',\r\n h5: '1.138em',\r\n h4: '1.215em',\r\n h3: '1.296em',\r\n h2: '1.383em',\r\n h1: '1.4757em',\r\n};\r\n\r\nconst css = {\r\n wrapper: {\r\n height: '0.75rem',\r\n display: 'inline-flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n overflow: 'visible' as const,\r\n },\r\n} as const;\r\n\r\ninterface IconProps extends Omit<LucideProps, 'size' | 'strokeWidth'> {\r\n Icon: LucideIconType;\r\n size?: SizeValue | string;\r\n strokeWidth?: StrokeWidthValue | string;\r\n}\r\n\r\nexport const Icon = ({ Icon, size, className, strokeWidth, fill }: IconProps) => {\r\n return (\r\n <div data-icon style={css.wrapper}>\r\n <Icon\r\n size={iconSizes[size as SizeValue] || size || '1.067em'}\r\n strokeWidth={weights[strokeWidth as StrokeWidthValue] || strokeWidth || 2.6}\r\n className={className}\r\n fill={fill || 'none'}\r\n />\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\nconst css = {\r\n base: {\r\n flexShrink: 0,\r\n backgroundColor: '#e5e7eb',\r\n },\r\n horizontal: {\r\n height: 1,\r\n width: '100%',\r\n },\r\n vertical: {\r\n height: '100%',\r\n width: 1,\r\n },\r\n} as const;\r\n\r\ntype SeparatorProps = React.HTMLAttributes<HTMLDivElement> & {\r\n orientation?: 'horizontal' | 'vertical';\r\n decorative?: boolean;\r\n};\r\n\r\nconst Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(\r\n ({ className, orientation = 'horizontal', decorative = true, style, ...props }, ref) => {\r\n const dimensionStyle = orientation === 'horizontal' ? css.horizontal : css.vertical;\r\n\r\n const ariaProps = decorative\r\n ? { role: 'none' as const }\r\n : {\r\n role: 'separator' as const,\r\n 'aria-orientation': orientation,\r\n };\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n style={{ ...css.base, ...dimensionStyle, ...style }}\r\n className={className}\r\n {...ariaProps}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\nSeparator.displayName = 'Separator';\r\n\r\nexport { Separator };\r\n","import { ChevronDown, ChevronUp, X } from 'lucide-react';\nimport { MouseEvent } from 'react';\nimport { StateSetter } from '../../types';\nimport { Button, Icon, Separator } from '../ui/index';\n\nconst css = {\n container: {\n position: 'fixed',\n bottom: 8,\n right: 8,\n zIndex: 9999,\n pointerEvents: 'auto',\n height: 40,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'rgba(148,163,184,0.8)',\n backgroundColor: 'rgba(255,255,255,0.70)',\n boxShadow: '0 1px 3px rgba(15,23,42,0.2)',\n display: 'flex',\n alignItems: 'center',\n paddingLeft: 14,\n paddingRight: 4,\n },\n label: {\n fontWeight: 500,\n fontSize: '0.8125rem',\n letterSpacing: '0.03em',\n paddingRight: 8,\n },\n buttonsRow: {\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n gap: 4,\n },\n closeIcon: {\n color: '#dc2626',\n },\n} as const;\n\nexport function ConfigButton({\n onToggleConfig,\n open,\n setShow,\n}: {\n open: boolean;\n onToggleConfig: () => void;\n setShow: StateSetter<boolean>;\n}) {\n const handleClick = (e: MouseEvent<HTMLButtonElement>, item: number) => {\n if (item === 1) {\n onToggleConfig();\n } else {\n e.stopPropagation();\n setShow((v) => !v);\n }\n };\n\n return (\n <div style={css.container}>\n <span style={css.label}>\n Configurar\n </span>\n\n <div style={css.buttonsRow}>\n {[1, 2, 3].map((item) =>\n item !== 2 ? (\n <Button\n variant={'transparent'}\n size=\"icon-sm\"\n data-black\n key={item}\n onClick={(e) => {\n handleClick(e, item);\n }}>\n {item === 1 ? (\n <Icon Icon={open ? ChevronDown : ChevronUp} size={'xl'} strokeWidth=\"light\" />\n ) : (\n <Icon Icon={X} size=\"sm\" strokeWidth=\"light\" className={undefined} />\n )}\n </Button>\n ) : (\n <Separator orientation=\"vertical\" />\n ),\n )}\n </div>\n </div>\n );\n}\n","export type FieldBinding = {\r\n value: number;\r\n set: (v: number) => void;\r\n};\r\n\r\nexport type ConfigOptionsProps = {\r\n lines: number;\r\n gap: number;\r\n opacity: number;\r\n color: string;\r\n setLines: (v: number) => void;\r\n setGap: (v: number) => void;\r\n setOpacity: (v: number) => void;\r\n setColor: (v: string) => void;\r\n};\r\n\r\nexport type NumberFieldConfig = {\r\n key: 'lines' | 'gap' | 'opacity';\r\n label: string;\r\n step?: number;\r\n quick: number[];\r\n};\r\n\r\nexport const NUMBER_FIELDS: NumberFieldConfig[] = [\r\n {\r\n key: 'lines',\r\n label: 'Linhas',\r\n quick: [2, 4, 8, 12],\r\n step: 4,\r\n },\r\n {\r\n key: 'gap',\r\n label: 'Gap',\r\n quick: [16, 24, 32, 40, 44],\r\n step: 4,\r\n },\r\n {\r\n key: 'opacity',\r\n label: 'Opacidade',\r\n quick: [0.2, 0.3, 0.5, 0.7],\r\n step: 0.05,\r\n },\r\n];\r\n\r\nexport const colorOptions = [\r\n { name: 'Azul', value: '#2563eb' },\r\n { name: 'Amarelo', value: '#eab308' },\r\n { name: 'Verde', value: '#16a34a' },\r\n { name: 'Roxo', value: '#7c3aed' },\r\n { name: 'Violeta', value: '#9333ea' },\r\n { name: 'Violeta', value: '#d71212' },\r\n];\r\n","import { Button } from '../ui';\r\nimport { ConfigOptionsProps, NUMBER_FIELDS, colorOptions } from './data';\r\n\r\nconst css = {\r\n container: {\r\n position: 'fixed',\r\n bottom: 52,\r\n right: 8,\r\n zIndex: 1000,\r\n pointerEvents: 'auto',\r\n fontSize: '0.875rem',\r\n backgroundColor: 'rgba(255,255,255,0.94)',\r\n backdropFilter: 'blur(4px)',\r\n boxShadow: '0 4px 6px rgba(15,23,42,0.12)',\r\n borderWidth: 1,\r\n borderStyle: 'solid',\r\n borderColor: 'rgba(148,163,184,0.5)',\r\n paddingInline: 12,\r\n paddingBlock: 8,\r\n width: 'auto',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: 8,\r\n },\r\n fieldRow: {\r\n width: '100%',\r\n borderBottomWidth: 1,\r\n borderBottomStyle: 'solid',\r\n borderBottomColor: 'rgba(148,163,184,0.4)',\r\n paddingBottom: 12,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: 4,\r\n },\r\n wrapper: {\r\n display: 'flex',\r\n alignItems: 'flex-end',\r\n gap: 8,\r\n borderRadius: 6,\r\n },\r\n inputWrapper: {\r\n width: 104,\r\n },\r\n label: {\r\n display: 'block',\r\n fontSize: '0.75rem',\r\n fontWeight: 500,\r\n marginBottom: 4,\r\n },\r\n numberInput: {\r\n width: '100%',\r\n height: 32,\r\n borderRadius: 6,\r\n borderWidth: 1,\r\n borderStyle: 'solid',\r\n borderColor: '#e5e7eb',\r\n paddingInline: 8,\r\n fontSize: '0.875rem',\r\n },\r\n quickRow: {\r\n display: 'flex',\r\n gap: 5,\r\n marginTop: 4,\r\n },\r\n quickButton: {\r\n fontWeight: 500,\r\n fontSize: '0.875rem',\r\n },\r\n colorSection: {\r\n marginTop: 8,\r\n },\r\n colorLabel: {\r\n display: 'block',\r\n fontSize: '0.75rem',\r\n fontWeight: 500,\r\n marginBottom: 4,\r\n },\r\n colorRow: {\r\n display: 'flex',\r\n gap: 8,\r\n },\r\n colorDot: {\r\n display: 'block',\r\n width: '80%',\r\n height: '80%',\r\n borderRadius: 9999,\r\n },\r\n} as const;\r\n\r\nexport function ConfigOptions(props: ConfigOptionsProps) {\r\n const fieldBindings = {\r\n lines: { value: props.lines, set: props.setLines },\r\n gap: { value: props.gap, set: props.setGap },\r\n opacity: { value: props.opacity, set: props.setOpacity },\r\n };\r\n\r\n return (\r\n <div style={css.container}>\r\n {NUMBER_FIELDS.map((field) => {\r\n const binding = fieldBindings[field.key];\r\n\r\n return (\r\n <div style={css.fieldRow} key={field.key}>\r\n <div style={css.wrapper}>\r\n <div style={css.inputWrapper}>\r\n <label style={css.label}>{field.label}</label>\r\n <input\r\n style={css.numberInput}\r\n type=\"number\"\r\n step={field.step}\r\n value={binding.value}\r\n onChange={(e) => binding.set(+e.target.value)}\r\n />\r\n </div>\r\n <div style={css.quickRow}>\r\n {field.quick.map((v) => {\r\n return (\r\n <Button\r\n selected={binding.value === v}\r\n key={v}\r\n data-option\r\n variant=\"ghost\"\r\n size=\"icon-sm\"\r\n style={css.quickButton}\r\n onClick={() => binding.set(v)}>\r\n {v}\r\n </Button>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n })}\r\n\r\n <div style={css.colorSection}>\r\n <span style={css.colorLabel}>Cor</span>\r\n <div style={css.colorRow}>\r\n {colorOptions.map((c) => (\r\n <Button\r\n key={c.value}\r\n variant=\"ghost\"\r\n size=\"icon-sm\"\r\n title={c.name}\r\n onClick={() => props.setColor(c.value)}>\r\n <span style={{ ...css.colorDot, backgroundColor: c.value }} />\r\n </Button>\r\n ))}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,uBAAoB;AACpB,IAAAC,gBAA4C;;;ACD5C,0BAAqB;AACrB,mBAA2E;;;ACD3E,YAAuB;AAiJjB;AA5IN,IAAM,SAAS;AAAA,EACb,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,KAAK;AAAA,IACL,cAAc;AAAA,IACd,UAAU;AAAA,IACV,SAAS;AAAA,IACT,YAAY;AAAA,EACd;AAAA,EAEA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,iBAAiB;AAAA,MACjB,OAAO;AAAA,IACT;AAAA,IACA,OAAO;AAAA,MACL,iBAAiB;AAAA,MACjB,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,iBAAiB;AAAA,MACjB,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,IACL,SAAS;AAAA,MACP,WAAW;AAAA,MACX,eAAe;AAAA,MACf,cAAc,KAAK,UAAU;AAAA,IAC/B;AAAA,IACA,IAAI;AAAA,MACF,WAAW;AAAA,MACX,eAAe;AAAA,MACf,cAAc;AAAA,IAChB;AAAA,IACA,WAAW;AAAA,MACT,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,iBAAiB;AAAA,EACnB;AAAA,EAEA,aAAa;AAAA,IACX,cAAc;AAAA,IACd,OAAO;AAAA,EACT;AACF;AAqBO,SAAS,oBAAoB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AAAA,QACR,OAAO,EAAE,GAAGA,KAAI,eAAe,YAAY,OAAO,WAAW,UAAU;AAAA,QACvE,SAAS,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;AAAA,QACjC;AAAA;AAAA,UAEC,6CAAC,QAAK,MAAM,0BAAK;AAAA;AAAA;AAAA,IACnB;AAAA,IAEA,6CAAC,eAAY,SAAkB,MAAY;AAAA,KAC7C;AAEJ;","names":["import_lucide_react","import_react","import_jsx_runtime","Icon","React","import_jsx_runtime","css","import_jsx_runtime","css","import_lucide_react","import_jsx_runtime","css","import_jsx_runtime","css","import_jsx_runtime","css"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
// src/lines-overlay.tsx
|
|
2
|
+
import { Eye } from "lucide-react";
|
|
3
|
+
import { useEffect, useRef as useRef2, useState } from "react";
|
|
4
|
+
|
|
5
|
+
// src/components/move-lines-button.tsx
|
|
6
|
+
import { Move } from "lucide-react";
|
|
7
|
+
import { useRef } from "react";
|
|
8
|
+
|
|
9
|
+
// src/ui/button.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var styles = {
|
|
13
|
+
base: {
|
|
14
|
+
width: "auto",
|
|
15
|
+
display: "inline-flex",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
gap: 8,
|
|
19
|
+
borderRadius: 6,
|
|
20
|
+
position: "relative",
|
|
21
|
+
outline: "none",
|
|
22
|
+
userSelect: "none"
|
|
23
|
+
},
|
|
24
|
+
variants: {
|
|
25
|
+
default: {
|
|
26
|
+
backgroundColor: "#0ea5e9",
|
|
27
|
+
color: "#ffffff"
|
|
28
|
+
},
|
|
29
|
+
ghost: {
|
|
30
|
+
backgroundColor: "transparent",
|
|
31
|
+
color: "#111827",
|
|
32
|
+
border: "1px solid #e5e7eb"
|
|
33
|
+
},
|
|
34
|
+
transparent: {
|
|
35
|
+
backgroundColor: "transparent",
|
|
36
|
+
color: "#0ea5e9"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
sizes: {
|
|
40
|
+
default: {
|
|
41
|
+
minHeight: 40,
|
|
42
|
+
paddingInline: 12,
|
|
43
|
+
paddingBlock: 12 * 0.73438 / 0.93
|
|
44
|
+
},
|
|
45
|
+
sm: {
|
|
46
|
+
minHeight: 36,
|
|
47
|
+
paddingInline: 12,
|
|
48
|
+
paddingBlock: 10
|
|
49
|
+
},
|
|
50
|
+
"icon-sm": {
|
|
51
|
+
width: 32,
|
|
52
|
+
height: 32,
|
|
53
|
+
padding: 0
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
selected: {
|
|
57
|
+
border: "2px solid #60a5fa",
|
|
58
|
+
color: "#0ea5e9",
|
|
59
|
+
backgroundColor: "rgba(59,130,246,0.08)"
|
|
60
|
+
},
|
|
61
|
+
closeButton: {
|
|
62
|
+
borderRadius: 9999,
|
|
63
|
+
color: "#0f172a"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
function resolveButtonStyles({
|
|
67
|
+
variant,
|
|
68
|
+
size,
|
|
69
|
+
selected,
|
|
70
|
+
disabled,
|
|
71
|
+
closeButton,
|
|
72
|
+
style
|
|
73
|
+
}) {
|
|
74
|
+
return {
|
|
75
|
+
...styles.base,
|
|
76
|
+
...styles.variants[variant],
|
|
77
|
+
...styles.sizes[size],
|
|
78
|
+
...disabled && { opacity: 0.6, cursor: "not-allowed" },
|
|
79
|
+
...selected && styles.selected,
|
|
80
|
+
...closeButton && styles.closeButton,
|
|
81
|
+
...style
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
var Slot = React.forwardRef(
|
|
85
|
+
({ children, className, style, ...slotProps }, ref) => {
|
|
86
|
+
if (!children || !React.isValidElement(children)) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
const child = children;
|
|
90
|
+
const mergedClassName = [className, child.props.className].filter(Boolean).join(" ");
|
|
91
|
+
const mergedStyle = { ...style, ...child.props.style };
|
|
92
|
+
return React.cloneElement(child, {
|
|
93
|
+
...slotProps,
|
|
94
|
+
...child.props,
|
|
95
|
+
className: mergedClassName || void 0,
|
|
96
|
+
style: mergedStyle,
|
|
97
|
+
ref
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
var Button = React.forwardRef(
|
|
102
|
+
({
|
|
103
|
+
className,
|
|
104
|
+
variant = "default",
|
|
105
|
+
size = "default",
|
|
106
|
+
asChild = false,
|
|
107
|
+
selected = false,
|
|
108
|
+
disabled = false,
|
|
109
|
+
closeButton = false,
|
|
110
|
+
style,
|
|
111
|
+
...props
|
|
112
|
+
}, ref) => {
|
|
113
|
+
const Comp = asChild ? Slot : "button";
|
|
114
|
+
return /* @__PURE__ */ jsx(
|
|
115
|
+
Comp,
|
|
116
|
+
{
|
|
117
|
+
ref,
|
|
118
|
+
className,
|
|
119
|
+
disabled,
|
|
120
|
+
style: resolveButtonStyles({
|
|
121
|
+
variant,
|
|
122
|
+
size,
|
|
123
|
+
selected,
|
|
124
|
+
disabled,
|
|
125
|
+
closeButton,
|
|
126
|
+
style
|
|
127
|
+
}),
|
|
128
|
+
...props
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
// src/ui/lucide-icon.tsx
|
|
135
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
136
|
+
var weights = {
|
|
137
|
+
thin: 2.25,
|
|
138
|
+
light: 2.35,
|
|
139
|
+
normal: 2.65,
|
|
140
|
+
semibold: 2.75,
|
|
141
|
+
bold: 2.85,
|
|
142
|
+
extrabold: 3
|
|
143
|
+
};
|
|
144
|
+
var iconSizes = {
|
|
145
|
+
xs: "0.937em",
|
|
146
|
+
sm: "0.968em",
|
|
147
|
+
base: "1em",
|
|
148
|
+
md: "1.033em",
|
|
149
|
+
lg: "1.067em",
|
|
150
|
+
xl: "1.138em",
|
|
151
|
+
"2xl": "1.215em",
|
|
152
|
+
"3xl": "1.296em",
|
|
153
|
+
h6: "1.067em",
|
|
154
|
+
h5: "1.138em",
|
|
155
|
+
h4: "1.215em",
|
|
156
|
+
h3: "1.296em",
|
|
157
|
+
h2: "1.383em",
|
|
158
|
+
h1: "1.4757em"
|
|
159
|
+
};
|
|
160
|
+
var css = {
|
|
161
|
+
wrapper: {
|
|
162
|
+
height: "0.75rem",
|
|
163
|
+
display: "inline-flex",
|
|
164
|
+
justifyContent: "center",
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
overflow: "visible"
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
var Icon = ({ Icon: Icon2, size, className, strokeWidth, fill }) => {
|
|
170
|
+
return /* @__PURE__ */ jsx2("div", { "data-icon": true, style: css.wrapper, children: /* @__PURE__ */ jsx2(
|
|
171
|
+
Icon2,
|
|
172
|
+
{
|
|
173
|
+
size: iconSizes[size] || size || "1.067em",
|
|
174
|
+
strokeWidth: weights[strokeWidth] || strokeWidth || 2.6,
|
|
175
|
+
className,
|
|
176
|
+
fill: fill || "none"
|
|
177
|
+
}
|
|
178
|
+
) });
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// src/ui/separator.tsx
|
|
182
|
+
import * as React2 from "react";
|
|
183
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
184
|
+
var css2 = {
|
|
185
|
+
base: {
|
|
186
|
+
flexShrink: 0,
|
|
187
|
+
backgroundColor: "#e5e7eb"
|
|
188
|
+
},
|
|
189
|
+
horizontal: {
|
|
190
|
+
height: 1,
|
|
191
|
+
width: "100%"
|
|
192
|
+
},
|
|
193
|
+
vertical: {
|
|
194
|
+
height: "100%",
|
|
195
|
+
width: 1
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
var Separator = React2.forwardRef(
|
|
199
|
+
({ className, orientation = "horizontal", decorative = true, style, ...props }, ref) => {
|
|
200
|
+
const dimensionStyle = orientation === "horizontal" ? css2.horizontal : css2.vertical;
|
|
201
|
+
const ariaProps = decorative ? { role: "none" } : {
|
|
202
|
+
role: "separator",
|
|
203
|
+
"aria-orientation": orientation
|
|
204
|
+
};
|
|
205
|
+
return /* @__PURE__ */ jsx3(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
ref,
|
|
209
|
+
style: { ...css2.base, ...dimensionStyle, ...style },
|
|
210
|
+
className,
|
|
211
|
+
...ariaProps,
|
|
212
|
+
...props
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
Separator.displayName = "Separator";
|
|
218
|
+
|
|
219
|
+
// src/components/move-lines-button.tsx
|
|
220
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
221
|
+
var css3 = {
|
|
222
|
+
wrapper: {
|
|
223
|
+
position: "absolute",
|
|
224
|
+
left: "50%",
|
|
225
|
+
top: "44%",
|
|
226
|
+
transform: "translate(-50%, -50%)",
|
|
227
|
+
pointerEvents: "auto"
|
|
228
|
+
},
|
|
229
|
+
button: {
|
|
230
|
+
borderRadius: 9999,
|
|
231
|
+
backgroundColor: "rgba(255,255,255,0.75)",
|
|
232
|
+
backdropFilter: "blur(2px)"
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
function MoveLinesButton({ targetRef }) {
|
|
236
|
+
const dragging = useRef(false);
|
|
237
|
+
const last = useRef({ x: 0, y: 0 });
|
|
238
|
+
function onMouseDown(e) {
|
|
239
|
+
dragging.current = true;
|
|
240
|
+
last.current = { x: e.clientX, y: e.clientY };
|
|
241
|
+
document.addEventListener("mousemove", onMove);
|
|
242
|
+
document.addEventListener("mouseup", onUp);
|
|
243
|
+
}
|
|
244
|
+
function onMove(e) {
|
|
245
|
+
if (!dragging.current || !targetRef.current) return;
|
|
246
|
+
const dx = e.clientX - last.current.x;
|
|
247
|
+
const dy = e.clientY - last.current.y;
|
|
248
|
+
const el = targetRef.current;
|
|
249
|
+
el.style.left = `${el.offsetLeft + dx}px`;
|
|
250
|
+
el.style.top = `${el.offsetTop + dy}px`;
|
|
251
|
+
last.current = { x: e.clientX, y: e.clientY };
|
|
252
|
+
}
|
|
253
|
+
function onUp() {
|
|
254
|
+
dragging.current = false;
|
|
255
|
+
document.removeEventListener("mousemove", onMove);
|
|
256
|
+
document.removeEventListener("mouseup", onUp);
|
|
257
|
+
}
|
|
258
|
+
return /* @__PURE__ */ jsx4("div", { style: css3.wrapper, children: /* @__PURE__ */ jsx4(
|
|
259
|
+
Button,
|
|
260
|
+
{
|
|
261
|
+
size: "icon-sm",
|
|
262
|
+
"data-black": true,
|
|
263
|
+
variant: "ghost",
|
|
264
|
+
onMouseDown,
|
|
265
|
+
style: css3.button,
|
|
266
|
+
children: /* @__PURE__ */ jsx4(Icon, { Icon: Move, size: "lg", strokeWidth: "thin" })
|
|
267
|
+
}
|
|
268
|
+
) });
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// src/components/config-button.tsx
|
|
272
|
+
import { ChevronDown, ChevronUp, X } from "lucide-react";
|
|
273
|
+
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
274
|
+
var css4 = {
|
|
275
|
+
container: {
|
|
276
|
+
position: "fixed",
|
|
277
|
+
bottom: 8,
|
|
278
|
+
right: 8,
|
|
279
|
+
zIndex: 9999,
|
|
280
|
+
pointerEvents: "auto",
|
|
281
|
+
height: 40,
|
|
282
|
+
borderWidth: 1,
|
|
283
|
+
borderStyle: "solid",
|
|
284
|
+
borderColor: "rgba(148,163,184,0.8)",
|
|
285
|
+
backgroundColor: "rgba(255,255,255,0.70)",
|
|
286
|
+
boxShadow: "0 1px 3px rgba(15,23,42,0.2)",
|
|
287
|
+
display: "flex",
|
|
288
|
+
alignItems: "center",
|
|
289
|
+
paddingLeft: 14,
|
|
290
|
+
paddingRight: 4
|
|
291
|
+
},
|
|
292
|
+
label: {
|
|
293
|
+
fontWeight: 500,
|
|
294
|
+
fontSize: "0.8125rem",
|
|
295
|
+
letterSpacing: "0.03em",
|
|
296
|
+
paddingRight: 8
|
|
297
|
+
},
|
|
298
|
+
buttonsRow: {
|
|
299
|
+
height: "100%",
|
|
300
|
+
display: "flex",
|
|
301
|
+
alignItems: "center",
|
|
302
|
+
gap: 4
|
|
303
|
+
},
|
|
304
|
+
closeIcon: {
|
|
305
|
+
color: "#dc2626"
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
function ConfigButton({
|
|
309
|
+
onToggleConfig,
|
|
310
|
+
open,
|
|
311
|
+
setShow
|
|
312
|
+
}) {
|
|
313
|
+
const handleClick = (e, item) => {
|
|
314
|
+
if (item === 1) {
|
|
315
|
+
onToggleConfig();
|
|
316
|
+
} else {
|
|
317
|
+
e.stopPropagation();
|
|
318
|
+
setShow((v) => !v);
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
return /* @__PURE__ */ jsxs("div", { style: css4.container, children: [
|
|
322
|
+
/* @__PURE__ */ jsx5("span", { style: css4.label, children: "Configurar" }),
|
|
323
|
+
/* @__PURE__ */ jsx5("div", { style: css4.buttonsRow, children: [1, 2, 3].map(
|
|
324
|
+
(item) => item !== 2 ? /* @__PURE__ */ jsx5(
|
|
325
|
+
Button,
|
|
326
|
+
{
|
|
327
|
+
variant: "transparent",
|
|
328
|
+
size: "icon-sm",
|
|
329
|
+
"data-black": true,
|
|
330
|
+
onClick: (e) => {
|
|
331
|
+
handleClick(e, item);
|
|
332
|
+
},
|
|
333
|
+
children: item === 1 ? /* @__PURE__ */ jsx5(Icon, { Icon: open ? ChevronDown : ChevronUp, size: "xl", strokeWidth: "light" }) : /* @__PURE__ */ jsx5(Icon, { Icon: X, size: "sm", strokeWidth: "light", className: void 0 })
|
|
334
|
+
},
|
|
335
|
+
item
|
|
336
|
+
) : /* @__PURE__ */ jsx5(Separator, { orientation: "vertical" })
|
|
337
|
+
) })
|
|
338
|
+
] });
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// src/components/data.ts
|
|
342
|
+
var NUMBER_FIELDS = [
|
|
343
|
+
{
|
|
344
|
+
key: "lines",
|
|
345
|
+
label: "Linhas",
|
|
346
|
+
quick: [2, 4, 8, 12],
|
|
347
|
+
step: 4
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
key: "gap",
|
|
351
|
+
label: "Gap",
|
|
352
|
+
quick: [16, 24, 32, 40, 44],
|
|
353
|
+
step: 4
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
key: "opacity",
|
|
357
|
+
label: "Opacidade",
|
|
358
|
+
quick: [0.2, 0.3, 0.5, 0.7],
|
|
359
|
+
step: 0.05
|
|
360
|
+
}
|
|
361
|
+
];
|
|
362
|
+
var colorOptions = [
|
|
363
|
+
{ name: "Azul", value: "#2563eb" },
|
|
364
|
+
{ name: "Amarelo", value: "#eab308" },
|
|
365
|
+
{ name: "Verde", value: "#16a34a" },
|
|
366
|
+
{ name: "Roxo", value: "#7c3aed" },
|
|
367
|
+
{ name: "Violeta", value: "#9333ea" },
|
|
368
|
+
{ name: "Violeta", value: "#d71212" }
|
|
369
|
+
];
|
|
370
|
+
|
|
371
|
+
// src/components/config-options.tsx
|
|
372
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
373
|
+
var css5 = {
|
|
374
|
+
container: {
|
|
375
|
+
position: "fixed",
|
|
376
|
+
bottom: 52,
|
|
377
|
+
right: 8,
|
|
378
|
+
zIndex: 1e3,
|
|
379
|
+
pointerEvents: "auto",
|
|
380
|
+
fontSize: "0.875rem",
|
|
381
|
+
backgroundColor: "rgba(255,255,255,0.94)",
|
|
382
|
+
backdropFilter: "blur(4px)",
|
|
383
|
+
boxShadow: "0 4px 6px rgba(15,23,42,0.12)",
|
|
384
|
+
borderWidth: 1,
|
|
385
|
+
borderStyle: "solid",
|
|
386
|
+
borderColor: "rgba(148,163,184,0.5)",
|
|
387
|
+
paddingInline: 12,
|
|
388
|
+
paddingBlock: 8,
|
|
389
|
+
width: "auto",
|
|
390
|
+
display: "flex",
|
|
391
|
+
flexDirection: "column",
|
|
392
|
+
gap: 8
|
|
393
|
+
},
|
|
394
|
+
fieldRow: {
|
|
395
|
+
width: "100%",
|
|
396
|
+
borderBottomWidth: 1,
|
|
397
|
+
borderBottomStyle: "solid",
|
|
398
|
+
borderBottomColor: "rgba(148,163,184,0.4)",
|
|
399
|
+
paddingBottom: 12,
|
|
400
|
+
display: "flex",
|
|
401
|
+
flexDirection: "column",
|
|
402
|
+
gap: 4
|
|
403
|
+
},
|
|
404
|
+
wrapper: {
|
|
405
|
+
display: "flex",
|
|
406
|
+
alignItems: "flex-end",
|
|
407
|
+
gap: 8,
|
|
408
|
+
borderRadius: 6
|
|
409
|
+
},
|
|
410
|
+
inputWrapper: {
|
|
411
|
+
width: 104
|
|
412
|
+
},
|
|
413
|
+
label: {
|
|
414
|
+
display: "block",
|
|
415
|
+
fontSize: "0.75rem",
|
|
416
|
+
fontWeight: 500,
|
|
417
|
+
marginBottom: 4
|
|
418
|
+
},
|
|
419
|
+
numberInput: {
|
|
420
|
+
width: "100%",
|
|
421
|
+
height: 32,
|
|
422
|
+
borderRadius: 6,
|
|
423
|
+
borderWidth: 1,
|
|
424
|
+
borderStyle: "solid",
|
|
425
|
+
borderColor: "#e5e7eb",
|
|
426
|
+
paddingInline: 8,
|
|
427
|
+
fontSize: "0.875rem"
|
|
428
|
+
},
|
|
429
|
+
quickRow: {
|
|
430
|
+
display: "flex",
|
|
431
|
+
gap: 5,
|
|
432
|
+
marginTop: 4
|
|
433
|
+
},
|
|
434
|
+
quickButton: {
|
|
435
|
+
fontWeight: 500,
|
|
436
|
+
fontSize: "0.875rem"
|
|
437
|
+
},
|
|
438
|
+
colorSection: {
|
|
439
|
+
marginTop: 8
|
|
440
|
+
},
|
|
441
|
+
colorLabel: {
|
|
442
|
+
display: "block",
|
|
443
|
+
fontSize: "0.75rem",
|
|
444
|
+
fontWeight: 500,
|
|
445
|
+
marginBottom: 4
|
|
446
|
+
},
|
|
447
|
+
colorRow: {
|
|
448
|
+
display: "flex",
|
|
449
|
+
gap: 8
|
|
450
|
+
},
|
|
451
|
+
colorDot: {
|
|
452
|
+
display: "block",
|
|
453
|
+
width: "80%",
|
|
454
|
+
height: "80%",
|
|
455
|
+
borderRadius: 9999
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
function ConfigOptions(props) {
|
|
459
|
+
const fieldBindings = {
|
|
460
|
+
lines: { value: props.lines, set: props.setLines },
|
|
461
|
+
gap: { value: props.gap, set: props.setGap },
|
|
462
|
+
opacity: { value: props.opacity, set: props.setOpacity }
|
|
463
|
+
};
|
|
464
|
+
return /* @__PURE__ */ jsxs2("div", { style: css5.container, children: [
|
|
465
|
+
NUMBER_FIELDS.map((field) => {
|
|
466
|
+
const binding = fieldBindings[field.key];
|
|
467
|
+
return /* @__PURE__ */ jsx6("div", { style: css5.fieldRow, children: /* @__PURE__ */ jsxs2("div", { style: css5.wrapper, children: [
|
|
468
|
+
/* @__PURE__ */ jsxs2("div", { style: css5.inputWrapper, children: [
|
|
469
|
+
/* @__PURE__ */ jsx6("label", { style: css5.label, children: field.label }),
|
|
470
|
+
/* @__PURE__ */ jsx6(
|
|
471
|
+
"input",
|
|
472
|
+
{
|
|
473
|
+
style: css5.numberInput,
|
|
474
|
+
type: "number",
|
|
475
|
+
step: field.step,
|
|
476
|
+
value: binding.value,
|
|
477
|
+
onChange: (e) => binding.set(+e.target.value)
|
|
478
|
+
}
|
|
479
|
+
)
|
|
480
|
+
] }),
|
|
481
|
+
/* @__PURE__ */ jsx6("div", { style: css5.quickRow, children: field.quick.map((v) => {
|
|
482
|
+
return /* @__PURE__ */ jsx6(
|
|
483
|
+
Button,
|
|
484
|
+
{
|
|
485
|
+
selected: binding.value === v,
|
|
486
|
+
"data-option": true,
|
|
487
|
+
variant: "ghost",
|
|
488
|
+
size: "icon-sm",
|
|
489
|
+
style: css5.quickButton,
|
|
490
|
+
onClick: () => binding.set(v),
|
|
491
|
+
children: v
|
|
492
|
+
},
|
|
493
|
+
v
|
|
494
|
+
);
|
|
495
|
+
}) })
|
|
496
|
+
] }) }, field.key);
|
|
497
|
+
}),
|
|
498
|
+
/* @__PURE__ */ jsxs2("div", { style: css5.colorSection, children: [
|
|
499
|
+
/* @__PURE__ */ jsx6("span", { style: css5.colorLabel, children: "Cor" }),
|
|
500
|
+
/* @__PURE__ */ jsx6("div", { style: css5.colorRow, children: colorOptions.map((c) => /* @__PURE__ */ jsx6(
|
|
501
|
+
Button,
|
|
502
|
+
{
|
|
503
|
+
variant: "ghost",
|
|
504
|
+
size: "icon-sm",
|
|
505
|
+
title: c.name,
|
|
506
|
+
onClick: () => props.setColor(c.value),
|
|
507
|
+
children: /* @__PURE__ */ jsx6("span", { style: { ...css5.colorDot, backgroundColor: c.value } })
|
|
508
|
+
},
|
|
509
|
+
c.value
|
|
510
|
+
)) })
|
|
511
|
+
] })
|
|
512
|
+
] });
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
// src/lines-overlay.tsx
|
|
516
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
517
|
+
var css6 = {
|
|
518
|
+
overlay: {
|
|
519
|
+
position: "fixed",
|
|
520
|
+
top: 100,
|
|
521
|
+
left: 0,
|
|
522
|
+
width: "100%",
|
|
523
|
+
pointerEvents: "none",
|
|
524
|
+
display: "flex",
|
|
525
|
+
justifyContent: "center",
|
|
526
|
+
zIndex: 9998
|
|
527
|
+
},
|
|
528
|
+
grid: {
|
|
529
|
+
width: "100%"
|
|
530
|
+
},
|
|
531
|
+
triggerButton: {
|
|
532
|
+
position: "fixed",
|
|
533
|
+
bottom: 8,
|
|
534
|
+
right: 8,
|
|
535
|
+
zIndex: 9999,
|
|
536
|
+
fontSize: "0.75rem",
|
|
537
|
+
backgroundColor: "rgba(255,255,255,0.66)"
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
function RowGridCore({ show, setShow }) {
|
|
541
|
+
const containerRef = useRef2(null);
|
|
542
|
+
const [lines, setLines] = useState(12);
|
|
543
|
+
const [gap, setGap] = useState(24);
|
|
544
|
+
const [opacity, setOpacity] = useState(0.3);
|
|
545
|
+
const [color, setColor] = useState("#d71212");
|
|
546
|
+
const [showConfig, setShowConfig] = useState(false);
|
|
547
|
+
useEffect(() => {
|
|
548
|
+
const handler = (e) => {
|
|
549
|
+
if (e.ctrlKey && e.key === ";") {
|
|
550
|
+
setShow((v) => !v);
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
window.addEventListener("keydown", handler);
|
|
554
|
+
return () => window.removeEventListener("keydown", handler);
|
|
555
|
+
}, []);
|
|
556
|
+
if (!show) return null;
|
|
557
|
+
const height = lines * gap;
|
|
558
|
+
return /* @__PURE__ */ jsxs3("div", { children: [
|
|
559
|
+
/* @__PURE__ */ jsxs3(
|
|
560
|
+
"div",
|
|
561
|
+
{
|
|
562
|
+
ref: containerRef,
|
|
563
|
+
style: { ...css6.overlay, height },
|
|
564
|
+
children: [
|
|
565
|
+
/* @__PURE__ */ jsx7(
|
|
566
|
+
"div",
|
|
567
|
+
{
|
|
568
|
+
style: {
|
|
569
|
+
...css6.grid,
|
|
570
|
+
height,
|
|
571
|
+
backgroundImage: `repeating-linear-gradient(
|
|
572
|
+
to bottom,
|
|
573
|
+
${color},
|
|
574
|
+
${color} 1px,
|
|
575
|
+
transparent 1px,
|
|
576
|
+
transparent ${gap}px
|
|
577
|
+
)`,
|
|
578
|
+
opacity
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
),
|
|
582
|
+
/* @__PURE__ */ jsx7(MoveLinesButton, { targetRef: containerRef })
|
|
583
|
+
]
|
|
584
|
+
}
|
|
585
|
+
),
|
|
586
|
+
/* @__PURE__ */ jsx7(
|
|
587
|
+
ConfigButton,
|
|
588
|
+
{
|
|
589
|
+
setShow,
|
|
590
|
+
onToggleConfig: () => setShowConfig((v) => !v),
|
|
591
|
+
open: showConfig
|
|
592
|
+
}
|
|
593
|
+
),
|
|
594
|
+
showConfig && /* @__PURE__ */ jsx7(
|
|
595
|
+
ConfigOptions,
|
|
596
|
+
{
|
|
597
|
+
lines,
|
|
598
|
+
gap,
|
|
599
|
+
opacity,
|
|
600
|
+
color,
|
|
601
|
+
setLines,
|
|
602
|
+
setGap,
|
|
603
|
+
setOpacity,
|
|
604
|
+
setColor
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
] });
|
|
608
|
+
}
|
|
609
|
+
function RowGrid() {
|
|
610
|
+
const [show, setShow] = useState(false);
|
|
611
|
+
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
612
|
+
/* @__PURE__ */ jsxs3(
|
|
613
|
+
Button,
|
|
614
|
+
{
|
|
615
|
+
size: "sm",
|
|
616
|
+
variant: "ghost",
|
|
617
|
+
style: { ...css6.triggerButton, visibility: show ? "hidden" : "visible" },
|
|
618
|
+
onClick: () => setShow((v) => !v),
|
|
619
|
+
children: [
|
|
620
|
+
"Mostrar linhas",
|
|
621
|
+
/* @__PURE__ */ jsx7(Icon, { Icon: Eye })
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
),
|
|
625
|
+
/* @__PURE__ */ jsx7(RowGridCore, { setShow, show })
|
|
626
|
+
] });
|
|
627
|
+
}
|
|
628
|
+
export {
|
|
629
|
+
RowGrid
|
|
630
|
+
};
|
|
631
|
+
//# sourceMappingURL=index.mjs.map
|