react-responsive-tools 2.6.2 → 2.6.3
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.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TBreakpoint, TVerticalBreakpoint } from './interfaces/TBreakpoint';
|
|
2
2
|
import { TBreakpoints, TVerticalBreakpoints } from './interfaces/TBreakpoints';
|
|
3
|
+
import { HORIZONTAL_BREAKPOINTS, VERTICAL_BREAKPOINTS } from './breakpoints.config';
|
|
3
4
|
import { useBreakpointBetween, useBreakpoint } from './hooks/useBreakpoint.js';
|
|
4
5
|
import { useVBreakpoint } from './hooks/useVBreakpoint.js';
|
|
5
6
|
export type { TBreakpoints, TBreakpoint, TVerticalBreakpoint, TVerticalBreakpoints, };
|
|
6
|
-
export { useBreakpointBetween, useBreakpoint, useVBreakpoint, };
|
|
7
|
+
export { useBreakpointBetween, useBreakpoint, useVBreakpoint, VERTICAL_BREAKPOINTS, HORIZONTAL_BREAKPOINTS, };
|
|
7
8
|
export * from './components/horizontal.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { HORIZONTAL_BREAKPOINTS, VERTICAL_BREAKPOINTS } from './breakpoints.config';
|
|
1
2
|
import { useBreakpointBetween, useBreakpoint } from './hooks/useBreakpoint.js';
|
|
2
3
|
import { useVBreakpoint } from './hooks/useVBreakpoint.js';
|
|
3
|
-
export { useBreakpointBetween, useBreakpoint, useVBreakpoint, };
|
|
4
|
+
export { useBreakpointBetween, useBreakpoint, useVBreakpoint, VERTICAL_BREAKPOINTS, HORIZONTAL_BREAKPOINTS, };
|
|
4
5
|
export * from './components/horizontal.js';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export type TVerticalBreakpoint = keyof typeof VERTICAL_BREAKPOINTS;
|
|
1
|
+
export type TBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'lt' | 'ltm' | 'ltl' | 'xl' | 'xxl' | 'qxl';
|
|
2
|
+
export type TVerticalBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"fs";import r from"path";import{fileURLToPath as t}from"url";import{HORIZONTAL_BREAKPOINTS as o,VERTICAL_BREAKPOINTS as n}from"../breakpoints.config.js";const i=t(import.meta.url),p=r.dirname(i),s=(e,r)=>`export type ${r} =\n${Object.keys(e).map((e=>` | '${e}'`)).join("\n")}\n`,a=`\n${s(o,"TBreakpoint")}\n\n${s(n,"TVerticalBreakpoint")}\n`;e.writeFileSync(r.resolve(p,"../interfaces/TBreakpoint.d.ts"),a.trim()),console.log("TBreakpoint.ts file has been generated successfully.");
|
package/package.json
CHANGED
package/reinit.sh
CHANGED
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
fi
|
|
48
48
|
|
|
49
49
|
# Run generateTBreakpoint.mjs from dist/scripts
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
echo "Running generateTBreakpoint.mjs from package..."
|
|
51
|
+
node "$SCRIPT_DIR/generateTBreakpoint.mjs"
|
|
52
52
|
|
|
53
53
|
if [ $? -ne 0 ]; then
|
|
54
54
|
echo "Error occurred while running generateTBreakpoint.mjs"
|