@xwadex/fesd-next 0.2.9 → 0.3.1

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.
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
9
+ import React, { useEffect, useState } from 'react';
10
+ import { usePathname } from 'next/navigation';
11
+ export var Demo = function Demo(_ref) {
12
+ var title = _ref.title;
13
+ var pathname = usePathname();
14
+ var _useState = useState(title),
15
+ _useState2 = _slicedToArray(_useState, 1),
16
+ state = _useState2[0];
17
+ useEffect(function () {
18
+ console.log("pathname", pathname);
19
+ }, [pathname]);
20
+ return /*#__PURE__*/React.createElement("div", {
21
+ className: "test"
22
+ }, "Demo:", state, ", ", pathname);
23
+ };
@@ -0,0 +1 @@
1
+ export { Demo } from "./Demo";
@@ -0,0 +1 @@
1
+ export { usePrevious } from "./usePrevState";
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+
3
+ import { useEffect, useRef } from 'react';
4
+ export var usePrevious = function usePrevious(value) {
5
+ var ref = useRef(null);
6
+ useEffect(function () {
7
+ ref.current = value;
8
+ }, [value]);
9
+ return ref.current;
10
+ };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { usePrevious as usePrevState } from './hooks/usePrevState';
2
+ import { Demo } from './components/Demo';
3
+ export { usePrevState, Demo };
@@ -0,0 +1,3 @@
1
+ .test {
2
+ background-color: #ff0000;
3
+ }
@@ -0,0 +1 @@
1
+ @forward "Demo";
@@ -0,0 +1 @@
1
+ @forward "components";
@@ -0,0 +1,3 @@
1
+ .test {
2
+ background-color: #ff0000;
3
+ }
@@ -0,0 +1 @@
1
+ @forward "Demo";
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface PropsType {
3
+ title: string;
4
+ }
5
+ export declare const Demo: React.FC<PropsType>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export { Demo } from "./Demo";
@@ -0,0 +1 @@
1
+ export { usePrevious } from "./usePrevState";
@@ -0,0 +1,3 @@
1
+ type UsePrevious<T> = T | null;
2
+ export declare const usePrevious: <T>(value: T) => UsePrevious<T>;
3
+ export {};
@@ -0,0 +1,3 @@
1
+ import { usePrevious as usePrevState } from './hooks/usePrevState';
2
+ import { Demo as Demo } from './components/Demo';
3
+ export { usePrevState, Demo };
package/package.json CHANGED
@@ -1,26 +1,45 @@
1
1
  {
2
2
  "name": "@xwadex/fesd-next",
3
- "version": "0.2.9",
4
- "main": "index.js",
5
- "module": "index.js",
6
- "types": "index.d.ts",
3
+ "version": "0.3.1",
4
+ "private": false,
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/types/index.d.ts",
7
8
  "files": [
8
- "./"
9
+ "dist"
9
10
  ],
11
+ "scripts": {
12
+ "publish:patch": "pnpm version patch",
13
+ "publish:push": "git add . && git commit -m 'Patch Package Version' && git push",
14
+ "publish:npm": "pnpm publish:patch && pnpm publish:push && pnpm publish --access=public"
15
+ },
10
16
  "exports": {
11
17
  ".": {
12
- "types": "./index.d.ts",
13
- "import": "./index.js"
18
+ "import": "./dist/index.js",
19
+ "require": "./dist/index.js",
20
+ "types": "./dist/types/index.d.ts"
21
+ },
22
+ "./components": {
23
+ "import": "./dist/components/index.js",
24
+ "require": "./dist/components/index.js",
25
+ "types": "./dist/types/components/index.d.ts"
14
26
  },
15
- "./types": "./types/index.d.ts",
16
- "./styles/*": "./styles/*"
27
+ "./hooks": {
28
+ "import": "./dist/hooks/index.js",
29
+ "require": "./dist/hooks/index.js",
30
+ "types": "./dist/types/hooks/index.d.ts"
31
+ },
32
+ "./styles/*": "./dist/styles/*"
17
33
  },
18
34
  "peerDependencies": {
19
- "react": "19.0",
20
- "react-dom": "19.0",
21
- "next": "15.2.2",
22
- "@types/react": "^19.0.6",
23
- "@types/react-dom": "^19.0.1",
24
- "sass": "^1.83.0"
35
+ "next": ">=15",
36
+ "react": ">=18",
37
+ "react-dom": ">=18",
38
+ "framer-motion": ">=12.0.0",
39
+ "react-icons": ">=5.2.1",
40
+ "tua-body-scroll-lock": ">=1.5.1"
41
+ },
42
+ "devDependencies": {
43
+ "@types/body-scroll-lock": ">=3.1.2"
25
44
  }
26
45
  }
@@ -1,3 +0,0 @@
1
- import type { PropsType } from "../types";
2
- declare const MyClientComponent: React.FC<PropsType>;
3
- export default MyClientComponent;
@@ -1,13 +0,0 @@
1
- "use client";
2
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
- import { useEffect, useState } from "react";
4
- import styles from "../styles/clients/MyClientComponent.module.scss";
5
- const MyClientComponent = ({ name }) => {
6
- const [state, setstate] = useState(0);
7
- useEffect(() => {
8
- console.log('hello!');
9
- }, []);
10
- return _jsxs("div", { className: styles.root, children: ["This is the component, name :", _jsxs("span", { children: [name !== null && name !== void 0 ? name : "empty", "13249849994984898"] }), _jsx("span", { children: state }), _jsx("button", { onClick: () => setstate(prev => prev + 1), children: "+" })] });
11
- };
12
- MyClientComponent.displayName = "MyClientComponent";
13
- export default MyClientComponent;
@@ -1,3 +0,0 @@
1
- import type { PropsType } from "../types";
2
- declare const MyClientComponent2: React.FC<PropsType>;
3
- export default MyClientComponent2;
@@ -1,12 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useEffect, useState } from "react";
4
- const MyClientComponent2 = ({ name }) => {
5
- const [state, setstate] = useState(0);
6
- useEffect(() => {
7
- console.log('hello!');
8
- }, []);
9
- return _jsxs("div", { children: ["This is the component, name :", _jsx("span", { children: name !== null && name !== void 0 ? name : "empty" }), _jsx("span", { children: state }), _jsx("button", { onClick: () => setstate(prev => prev + 1), children: "+" })] });
10
- };
11
- MyClientComponent2.displayName = "MyClientComponent2";
12
- export default MyClientComponent2;
@@ -1,2 +0,0 @@
1
- export { default as MyClientComponent } from "./MyClientComponent";
2
- export { default as MyClientComponent2 } from "./MyClientComponent2";
package/clients/index.js DELETED
@@ -1,2 +0,0 @@
1
- export { default as MyClientComponent } from "./MyClientComponent";
2
- export { default as MyClientComponent2 } from "./MyClientComponent2";
package/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./servers";
2
- export * from "./clients";
package/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "./servers";
2
- export * from "./clients";
@@ -1 +0,0 @@
1
- export declare function MyComponent(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export function MyComponent() {
3
- return _jsx("div", { children: "This is the component" });
4
- }
@@ -1 +0,0 @@
1
- export * from "./MyComponent";
package/servers/index.js DELETED
@@ -1 +0,0 @@
1
- export * from "./MyComponent";
@@ -1,3 +0,0 @@
1
- .root {
2
- color: #ff0000;
3
- }
@@ -1,3 +0,0 @@
1
- .root {
2
- color: #ff0000;
3
- }
package/types/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export interface PropsType {
2
- name?: string;
3
- classstyles?: {
4
- [key: string]: string;
5
- };
6
- }
package/types/index.js DELETED
@@ -1 +0,0 @@
1
- export {};