@dreamcommerce/aurora 3.1.25-2 → 3.1.25

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.
Files changed (29) hide show
  1. package/build/index.css +1 -1
  2. package/package.json +1 -1
  3. package/build/esm/packages/aurora/src/components/resizable/components/resizable_container.d.ts +0 -3
  4. package/build/esm/packages/aurora/src/components/resizable/components/resizable_container.js +0 -11
  5. package/build/esm/packages/aurora/src/components/resizable/components/resizable_container.js.map +0 -1
  6. package/build/esm/packages/aurora/src/components/resizable/components/resizable_handle.d.ts +0 -9
  7. package/build/esm/packages/aurora/src/components/resizable/components/resizable_handle.js +0 -19
  8. package/build/esm/packages/aurora/src/components/resizable/components/resizable_handle.js.map +0 -1
  9. package/build/esm/packages/aurora/src/components/resizable/components/resizable_pure.d.ts +0 -3
  10. package/build/esm/packages/aurora/src/components/resizable/components/resizable_pure.js +0 -12
  11. package/build/esm/packages/aurora/src/components/resizable/components/resizable_pure.js.map +0 -1
  12. package/build/esm/packages/aurora/src/components/resizable/hooks/use_resizable.d.ts +0 -7
  13. package/build/esm/packages/aurora/src/components/resizable/hooks/use_resizable.js +0 -68
  14. package/build/esm/packages/aurora/src/components/resizable/hooks/use_resizable.js.map +0 -1
  15. package/build/esm/packages/aurora/src/components/resizable/hooks/use_resizable_context.d.ts +0 -2
  16. package/build/esm/packages/aurora/src/components/resizable/hooks/use_resizable_context.js +0 -11
  17. package/build/esm/packages/aurora/src/components/resizable/hooks/use_resizable_context.js.map +0 -1
  18. package/build/esm/packages/aurora/src/components/resizable/resizable.d.ts +0 -3
  19. package/build/esm/packages/aurora/src/components/resizable/resizable.js +0 -16
  20. package/build/esm/packages/aurora/src/components/resizable/resizable.js.map +0 -1
  21. package/build/esm/packages/aurora/src/components/resizable/resizable_container_constants.d.ts +0 -10
  22. package/build/esm/packages/aurora/src/components/resizable/resizable_container_constants.js +0 -11
  23. package/build/esm/packages/aurora/src/components/resizable/resizable_container_constants.js.map +0 -1
  24. package/build/esm/packages/aurora/src/components/resizable/resizable_context.d.ts +0 -3
  25. package/build/esm/packages/aurora/src/components/resizable/resizable_context.js +0 -8
  26. package/build/esm/packages/aurora/src/components/resizable/resizable_context.js.map +0 -1
  27. package/build/esm/packages/aurora/src/components/resizable/resizable_utils.d.ts +0 -5
  28. package/build/esm/packages/aurora/src/components/resizable/resizable_utils.js +0 -23
  29. package/build/esm/packages/aurora/src/components/resizable/resizable_utils.js.map +0 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "3.1.25-2",
5
+ "version": "3.1.25",
6
6
  "description": "aurora",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { IResizableContainerProps } from '../resizable_container_types';
3
- export declare const ResizableContainer: React.FC<IResizableContainerProps>;
@@ -1,11 +0,0 @@
1
- import { ResizableHandle } from '@auroraComponents/resizable/components/resizable_handle';
2
- import React from 'react';
3
- import '../resizable_container_types';
4
- export const ResizableContainer = ({ className, style, variant, handleHoverSpacePx, handleResizing, children }) => {
5
- return (React.createElement("div", { className: `aurora-flex aurora-relative ${className}`, style: style },
6
- variant === 'horizontal' ? (React.createElement(React.Fragment, null,
7
- React.createElement(ResizableHandle, { position: "left", hoverGutterSizePx: handleHoverSpacePx, onMouseDown: (e) => handleResizing(e, 'left') }),
8
- React.createElement(ResizableHandle, { position: "right", hoverGutterSizePx: handleHoverSpacePx, onMouseDown: (e) => handleResizing(e, 'right') }))) : (React.createElement(ResizableHandle, { position: variant, hoverGutterSizePx: handleHoverSpacePx, onMouseDown: (e) => handleResizing(e, variant) })),
9
- React.createElement("div", { className: "aurora-flex-1" }, children)));
10
- };
11
- //# sourceMappingURL=resizable_container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable_container.js","sourceRoot":"","sources":["../../../../../../../../src/components/resizable/components/resizable_container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yDAAyD,CAAC;AAC1F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAyC,8BAA8B,CAAC;AAExE,MAAM,CAAC,MAAM,kBAAkB,GAAuC,CAAC,EACnE,SAAS,EACT,KAAK,EACL,OAAO,EACP,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACX,EAAE,EAAE;IACD,OAAO,CACH,6BAAK,SAAS,EAAE,+BAA+B,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK;QACnE,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,CACxB;YACI,oBAAC,eAAe,IAAC,QAAQ,EAAC,MAAM,EAAC,iBAAiB,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAI;YACzH,oBAAC,eAAe,IAAC,QAAQ,EAAC,OAAO,EAAC,iBAAiB,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,OAAO,CAAC,GAAI,CAC5H,CACN,CAAC,CAAC,CAAC,CACA,oBAAC,eAAe,IAAC,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,OAAO,CAAC,GAAI,CAChI;QACD,6BAAK,SAAS,EAAC,eAAe,IAAE,QAAQ,CAAO,CAC7C,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface IResizableHandleProps {
3
- position: 'left' | 'right';
4
- hoverGutterSizePx?: number;
5
- className?: string;
6
- onMouseDown: (e: React.MouseEvent) => void;
7
- }
8
- export declare const ResizableHandle: React.FC<IResizableHandleProps>;
9
- export {};
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { cn } from '@auroraUtilities/cn';
3
- import { RESIZABLE_CONTAINER_RESIZER_CLASS } from '@auroraComponents/resizable/resizable_container_constants';
4
- import { useResizableContext } from '../hooks/use_resizable_context';
5
- export const ResizableHandle = ({ position, hoverGutterSizePx = 8, className, onMouseDown }) => {
6
- const { isResizing } = useResizableContext();
7
- return (React.createElement("div", { className: cn(`${RESIZABLE_CONTAINER_RESIZER_CLASS} ${className} aurora-absolute aurora-top-0 aurora-bottom-0 aurora-cursor-col-resize aurora-transition-opacity aurora-duration-200 aurora-z-[99999] aurora-opacity-0 hover:aurora-opacity-100`, {
8
- 'aurora-opacity-100': isResizing
9
- }), style: {
10
- paddingLeft: `${hoverGutterSizePx}px`,
11
- paddingRight: `${hoverGutterSizePx}px`,
12
- left: position === 'left' ? `-${hoverGutterSizePx}px` : '',
13
- right: position === 'right' ? `-${hoverGutterSizePx}px` : ''
14
- }, onMouseDown: onMouseDown },
15
- React.createElement("div", { className: cn('aurora-w-[2px] aurora-h-full aurora-bg-primary', {
16
- 'aurora-bg-primary-hover': isResizing
17
- }) })));
18
- };
19
- //# sourceMappingURL=resizable_handle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable_handle.js","sourceRoot":"","sources":["../../../../../../../../src/components/resizable/components/resizable_handle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,iCAAiC,EAAE,MAAM,2DAA2D,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AASrE,MAAM,CAAC,MAAM,eAAe,GAAoC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,GAAG,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE;IAC5H,MAAM,EAAE,UAAU,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAE7C,OAAO,CACH,6BACI,SAAS,EAAE,EAAE,CACT,GAAG,iCAAiC,IAAI,SAAS,iLAAiL,EAClO;YACI,oBAAoB,EAAE,UAAU;SACnC,CACJ,EACD,KAAK,EAAE;YACH,WAAW,EAAE,GAAG,iBAAiB,IAAI;YACrC,YAAY,EAAE,GAAG,iBAAiB,IAAI;YACtC,IAAI,EAAE,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,iBAAiB,IAAI,CAAC,CAAC,CAAC,EAAE;YAC1D,KAAK,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,iBAAiB,IAAI,CAAC,CAAC,CAAC,EAAE;SAC/D,EACD,WAAW,EAAE,WAAW;QAExB,6BACI,SAAS,EAAE,EAAE,CAAC,gDAAgD,EAAE;gBAC5D,yBAAyB,EAAE,UAAU;aACxC,CAAC,GACJ,CACA,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { IResizablePureProps } from "../resizable_container_types";
3
- export declare const ResizablePure: React.FC<IResizablePureProps>;
@@ -1,12 +0,0 @@
1
- import React, { useEffect } from 'react';
2
- import '@auroraComponents/resizable/resizable_container_types';
3
- import { ResizableContainer } from '@auroraComponents/resizable/components/resizable_container';
4
- import { useResizableContext } from '../hooks/use_resizable_context';
5
- export const ResizablePure = ({ children, variant = 'left', handleHoverSpacePx, widthConfig, onResize, className }) => {
6
- const { currentWidth, handleResizing, isResizing } = useResizableContext();
7
- useEffect(() => {
8
- onResize?.(currentWidth, isResizing);
9
- }, [currentWidth, isResizing, onResize]);
10
- return (React.createElement(ResizableContainer, { className: className || '', style: { width: currentWidth, minWidth: widthConfig.min, maxWidth: widthConfig.max }, variant: variant, handleHoverSpacePx: handleHoverSpacePx, handleResizing: handleResizing }, children));
11
- };
12
- //# sourceMappingURL=resizable_pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable_pure.js","sourceRoot":"","sources":["../../../../../../../../src/components/resizable/components/resizable_pure.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAoC,uDAAuD,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,MAAM,CAAC,MAAM,aAAa,GAAkC,CAAC,EACzD,QAAQ,EACR,OAAO,GAAG,MAAM,EAChB,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,SAAS,EACZ,EAAE,EAAE;IACD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAE3E,SAAS,CAAC,GAAG,EAAE;QACX,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACzC,CAAC,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEzC,OAAO,CACH,oBAAC,kBAAkB,IACf,SAAS,EAAE,SAAS,IAAI,EAAE,EAC1B,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,CAAC,GAAG,EAAE,EACpF,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,IAE7B,QAAQ,CACQ,CACxB,CAAC;AACN,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { TContainerWidthConfig, TResizerVariant, TResizingDirection } from '../resizable_container_types';
2
- declare const useResizable: (name: string, variant: TResizerVariant, widthConfig: TContainerWidthConfig) => {
3
- isResizing: boolean;
4
- currentWidth: number;
5
- handleResizing: (e: React.MouseEvent, direction: TResizingDirection) => void;
6
- };
7
- export default useResizable;
@@ -1,68 +0,0 @@
1
- import { useCallback, useEffect, useRef, useState } from 'react';
2
- import { RESIZING_DIRECTIONS } from '../resizable_container_constants';
3
- import '../resizable_container_types';
4
- import { getInitialWidth, saveWidthToStorage, removeEventListeners, addEventListeners } from '../resizable_utils';
5
- const useResizable = (name, variant, widthConfig) => {
6
- const storageKey = `sve_resizable_${name}_width`;
7
- const [isResizing, setIsResizing] = useState(false);
8
- const isResizingRef = useRef(false);
9
- const resizingDirection = useRef(RESIZING_DIRECTIONS.left);
10
- const initialMouseX = useRef(0);
11
- const initialWidth = useRef(0);
12
- const [width, setWidth] = useState(() => {
13
- return getInitialWidth(storageKey, widthConfig);
14
- });
15
- const widthRef = useRef(width);
16
- const handleMouseMove = useCallback((e) => {
17
- if (!isResizingRef.current)
18
- return;
19
- const direction = variant === 'horizontal' ? resizingDirection.current : variant;
20
- const newWidth = calculateNewWidth(e.clientX, direction, widthConfig, initialMouseX.current, initialWidth.current);
21
- widthRef.current = newWidth;
22
- setWidth(newWidth);
23
- }, []);
24
- const handleMouseUp = useCallback(() => {
25
- if (!isResizingRef.current)
26
- return;
27
- isResizingRef.current = false;
28
- setIsResizing(false);
29
- removeEventListeners({
30
- mousemove: handleMouseMove,
31
- mouseup: handleMouseUp
32
- });
33
- saveWidthToStorage(storageKey, widthRef.current);
34
- }, []);
35
- const handleResizing = useCallback((e, direction) => {
36
- e.preventDefault();
37
- isResizingRef.current = true;
38
- setIsResizing(true);
39
- resizingDirection.current = direction;
40
- initialMouseX.current = e.clientX;
41
- initialWidth.current = widthRef.current;
42
- addEventListeners({
43
- mousemove: handleMouseMove,
44
- mouseup: handleMouseUp
45
- });
46
- }, []);
47
- const calculateNewWidth = (clientX, direction, widthConfig, initialMouseX, initialWidth) => {
48
- const { min, max } = widthConfig;
49
- const mouseDelta = clientX - initialMouseX;
50
- const newWidth = direction === RESIZING_DIRECTIONS.left ? initialWidth - mouseDelta : initialWidth + mouseDelta;
51
- return Math.min(Math.max(newWidth, min), max);
52
- };
53
- useEffect(() => {
54
- return () => {
55
- removeEventListeners({
56
- mousemove: handleMouseMove,
57
- mouseup: handleMouseUp
58
- });
59
- };
60
- }, []);
61
- return {
62
- isResizing,
63
- currentWidth: width,
64
- handleResizing
65
- };
66
- };
67
- export default useResizable;
68
- //# sourceMappingURL=use_resizable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use_resizable.js","sourceRoot":"","sources":["../../../../../../../../src/components/resizable/hooks/use_resizable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAA2E,8BAA8B,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAElH,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,OAAwB,EAAE,WAAkC,EAAE,EAAE;IAChG,MAAM,UAAU,GAAG,iBAAiB,IAAI,QAAQ,CAAC;IACjD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,iBAAiB,GAAG,MAAM,CAAqB,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/E,MAAM,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE;QACpC,OAAO,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE/B,MAAM,eAAe,GAAG,WAAW,CAAC,CAAC,CAAa,EAAE,EAAE;QAClD,IAAI,CAAC,aAAa,CAAC,OAAO;YAAE,OAAO;QAEn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tB,OAAe,EACf,SAA6B,EAC7B,WAAkC,EAClC,aAAqB,EACrB,YAAoB,EACd,EAAE;QACR,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,WAAW,CAAC;QACjC,MAAM,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;QAE3C,MAAM,QAAQ,GAAG,SAAS,KAAK,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,GAAG,UAAU,CAAC;QAEhH,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACX,OAAO,GAAG,EAAE;YACR,oBAAoB,CAAC;gBACjB,SAAS,EAAE,eAAe;gBAC1B,OAAO,EAAE,aAAa;aACzB,CAAC,CAAC;QACP,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACH,UAAU;QACV,YAAY,EAAE,KAAK;QACnB,cAAc;KACjB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,2 +0,0 @@
1
- import { IResizableContextProps } from '../resizable_container_types';
2
- export declare function useResizableContext(): IResizableContextProps;
@@ -1,11 +0,0 @@
1
- import { useContext } from 'react';
2
- import '../resizable_container_types';
3
- import { ResizableContext } from '../resizable_context';
4
- export function useResizableContext() {
5
- const context = useContext(ResizableContext);
6
- if (Object.keys(context).length === 0 && context.constructor === Object) {
7
- throw new Error(`Resizable component cannot be rendered outside the ResizableProvider component`);
8
- }
9
- return context;
10
- }
11
- //# sourceMappingURL=use_resizable_context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use_resizable_context.js","sourceRoot":"","sources":["../../../../../../../../src/components/resizable/hooks/use_resizable_context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAuC,8BAA8B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,mBAAmB;IAC/B,MAAM,OAAO,GAA2B,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAErE,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,WAAW,KAAK,MAAM,EAAE;QACrE,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAC;KACrG;IACD,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { IResizableProps } from "./resizable_container_types";
3
- export declare const Resizable: React.FC<IResizableProps>;
@@ -1,16 +0,0 @@
1
- import React, { useMemo } from 'react';
2
- import '@auroraComponents/resizable/resizable_container_types';
3
- import useResizable from './hooks/use_resizable';
4
- import { ResizableContext } from './resizable_context';
5
- import { ResizablePure } from './components/resizable_pure';
6
- export const Resizable = ({ name, children, variant = 'left', handleHoverSpacePx, widthConfig, onResize, className }) => {
7
- const { isResizing, currentWidth, handleResizing } = useResizable(name, variant, widthConfig);
8
- const contextVal = useMemo(() => ({
9
- isResizing,
10
- currentWidth,
11
- handleResizing
12
- }), [isResizing, currentWidth, handleResizing]);
13
- return (React.createElement(ResizableContext.Provider, { value: contextVal },
14
- React.createElement(ResizablePure, { className: className || '', variant: variant, handleHoverSpacePx: handleHoverSpacePx, widthConfig: widthConfig, onResize: onResize }, children)));
15
- };
16
- //# sourceMappingURL=resizable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable.js","sourceRoot":"","sources":["../../../../../../../src/components/resizable/resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAgC,uDAAuD,CAAC;AAExF,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,CAAC,MAAM,SAAS,GAA8B,CAAC,EACjD,IAAI,EACJ,QAAQ,EACR,OAAO,GAAG,MAAM,EAChB,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,SAAS,EACZ,EAAE,EAAE;IACD,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAE9F,MAAM,UAAU,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,CAAC;QACH,UAAU;QACV,YAAY;QACZ,cAAc;KACjB,CAAC,EACF,CAAC,UAAU,EAAE,YAAY,EAAE,cAAc,CAAC,CAC7C,CAAC;IAEF,OAAO,CACH,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU;QACxC,oBAAC,aAAa,IACV,SAAS,EAAE,SAAS,IAAI,EAAE,EAC1B,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,IAEjB,QAAQ,CACG,CACQ,CAC/B,CAAC;AACN,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- export declare const RESIZE_HANDLE_VARIANTS: {
2
- readonly left: "left";
3
- readonly right: "right";
4
- readonly horizontal: "horizontal";
5
- };
6
- export declare const RESIZING_DIRECTIONS: {
7
- readonly left: "left";
8
- readonly right: "right";
9
- };
10
- export declare const RESIZABLE_CONTAINER_RESIZER_CLASS = "js__resizable-container-resizer";
@@ -1,11 +0,0 @@
1
- export const RESIZE_HANDLE_VARIANTS = {
2
- left: 'left',
3
- right: 'right',
4
- horizontal: 'horizontal'
5
- };
6
- export const RESIZING_DIRECTIONS = {
7
- left: 'left',
8
- right: 'right'
9
- };
10
- export const RESIZABLE_CONTAINER_RESIZER_CLASS = 'js__resizable-container-resizer';
11
- //# sourceMappingURL=resizable_container_constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable_container_constants.js","sourceRoot":"","sources":["../../../../../../../src/components/resizable/resizable_container_constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,YAAY;CAClB,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,iCAAiC,GAAG,iCAAiC,CAAC"}
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IResizableContextProps } from './resizable_container_types';
3
- export declare const ResizableContext: import("react").Context<IResizableContextProps>;
@@ -1,8 +0,0 @@
1
- import { createContext } from 'react';
2
- import './resizable_container_types';
3
- export const ResizableContext = createContext({
4
- isResizing: false,
5
- currentWidth: 0,
6
- handleResizing: () => { }
7
- });
8
- //# sourceMappingURL=resizable_context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable_context.js","sourceRoot":"","sources":["../../../../../../../src/components/resizable/resizable_context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAuC,6BAA6B,CAAC;AAErE,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAyB;IAClE,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,CAAC;IACf,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;CAC3B,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { TContainerWidthConfig } from './resizable_container_types';
2
- export declare const getInitialWidth: (name: string, widthConfig: TContainerWidthConfig) => number;
3
- export declare const saveWidthToStorage: (name: string, width: number) => void;
4
- export declare const addEventListeners: (events: Record<string, EventListener>) => void;
5
- export declare const removeEventListeners: (events: Record<string, EventListener>) => void;
@@ -1,23 +0,0 @@
1
- import './resizable_container_types';
2
- export const getInitialWidth = (name, widthConfig) => {
3
- if (typeof window === 'undefined' || typeof localStorage === 'undefined')
4
- return widthConfig.default;
5
- const saved = localStorage.getItem(name);
6
- return saved ? Number(saved) : widthConfig.default;
7
- };
8
- export const saveWidthToStorage = (name, width) => {
9
- if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') {
10
- localStorage.setItem(name, width.toString());
11
- }
12
- };
13
- export const addEventListeners = (events) => {
14
- Object.entries(events).forEach(([eventType, handler]) => {
15
- document.addEventListener(eventType, handler);
16
- });
17
- };
18
- export const removeEventListeners = (events) => {
19
- Object.entries(events).forEach(([eventType, handler]) => {
20
- document.removeEventListener(eventType, handler);
21
- });
22
- };
23
- //# sourceMappingURL=resizable_utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resizable_utils.js","sourceRoot":"","sources":["../../../../../../../src/components/resizable/resizable_utils.ts"],"names":[],"mappings":"AAAA,OAAsC,6BAA6B,CAAC;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,WAAkC,EAAU,EAAE;IACxF,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,YAAY,KAAK,WAAW;QAAE,OAAO,WAAW,CAAC,OAAO,CAAC;IACrG,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,KAAa,EAAQ,EAAE;IACpE,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;QACtE,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,C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