@xwadex/fesd-next 0.1.31-bata → 0.1.34-bata

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 (44) hide show
  1. package/dist/components/Demo.js +22 -0
  2. package/dist/components/index.js +1 -0
  3. package/dist/hooks/index.js +1 -0
  4. package/dist/hooks/usePrevState.js +10 -0
  5. package/dist/index.js +3 -0
  6. package/package.json +22 -16
  7. package/dist/cjs/components/Demo.js +0 -15
  8. package/dist/cjs/components/Demo.js.map +0 -1
  9. package/dist/cjs/components/Demo.jsx +0 -13
  10. package/dist/cjs/components/Demo.jsx.map +0 -1
  11. package/dist/cjs/components/index.js +0 -6
  12. package/dist/cjs/components/index.js.map +0 -1
  13. package/dist/cjs/hooks/index.js +0 -6
  14. package/dist/cjs/hooks/index.js.map +0 -1
  15. package/dist/cjs/hooks/usePrevState.js +0 -14
  16. package/dist/cjs/hooks/usePrevState.js.map +0 -1
  17. package/dist/cjs/hooks/usePrevState.jsx +0 -14
  18. package/dist/cjs/hooks/usePrevState.jsx.map +0 -1
  19. package/dist/cjs/index.js +0 -8
  20. package/dist/cjs/index.js.map +0 -1
  21. package/dist/esm/components/Demo.d.ts +0 -4
  22. package/dist/esm/components/Demo.js +0 -11
  23. package/dist/esm/components/Demo.js.map +0 -1
  24. package/dist/esm/components/Demo.jsx +0 -9
  25. package/dist/esm/components/Demo.jsx.map +0 -1
  26. package/dist/esm/components/index.d.ts +0 -1
  27. package/dist/esm/components/index.js +0 -2
  28. package/dist/esm/components/index.js.map +0 -1
  29. package/dist/esm/hooks/index.d.ts +0 -1
  30. package/dist/esm/hooks/index.js +0 -2
  31. package/dist/esm/hooks/index.js.map +0 -1
  32. package/dist/esm/hooks/usePrevState.d.ts +0 -3
  33. package/dist/esm/hooks/usePrevState.js +0 -10
  34. package/dist/esm/hooks/usePrevState.js.map +0 -1
  35. package/dist/esm/hooks/usePrevState.jsx +0 -10
  36. package/dist/esm/hooks/usePrevState.jsx.map +0 -1
  37. package/dist/esm/index.d.ts +0 -3
  38. package/dist/esm/index.js +0 -4
  39. package/dist/esm/index.js.map +0 -1
  40. /package/dist/{cjs → types}/components/Demo.d.ts +0 -0
  41. /package/dist/{cjs → types}/components/index.d.ts +0 -0
  42. /package/dist/{cjs → types}/hooks/index.d.ts +0 -0
  43. /package/dist/{cjs → types}/hooks/usePrevState.d.ts +0 -0
  44. /package/dist/{cjs → types}/index.d.ts +0 -0
@@ -0,0 +1,22 @@
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 { usePathname } from 'next/navigation';
10
+ import React, { useEffect, useState } from 'react';
11
+ export 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(React.Fragment, null, "Demo:", state, ", ", pathname);
21
+ }
22
+ ;
@@ -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 };
package/package.json CHANGED
@@ -1,32 +1,37 @@
1
1
  {
2
2
  "name": "@xwadex/fesd-next",
3
- "version": "0.1.31-bata",
3
+ "version": "0.1.34-bata",
4
4
  "private": false,
5
- "main": "./dist/cjs/index.js",
6
- "module": "./dist/esm/index.js",
7
- "types": "./dist/esm/index.d.ts",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/types/index.d.ts",
8
8
  "files": [
9
- "dist",
10
- "README.md"
9
+ "dist"
11
10
  ],
12
11
  "scripts": {
13
- "dev": "next dev --turbopack",
14
- "build": "npm run build:esm && npm run build:cjs",
15
- "build:esm": "tsc",
16
- "build:cjs": "tsc --module commonjs --outDir dist/cjs"
12
+ "dev": "next dev",
13
+ "build": "next build",
14
+ "start": "next start",
15
+ "build:package": "babel src/package -d dist --extensions '.ts,.tsx' && tsc --project tsconfig.package.json"
17
16
  },
18
17
  "exports": {
19
- ".": "./dist/cjs/index.js",
20
- "./components": "./dist/cjs/components/index.js",
21
- "./hooks": "./dist/cjs/hooks/index.js"
18
+ ".": "./dist/index.js",
19
+ "./components": "./dist/components/index.js",
20
+ "./hooks": "./dist/hooks/index.js"
21
+ },
22
+ "peerDependencies": {
23
+ "next": ">=15",
24
+ "react": ">=18",
25
+ "react-dom": ">=18"
22
26
  },
23
27
  "dependencies": {
24
- "next": "15.0.3",
25
- "react": "19.0.0-rc-66855b96-20241106",
26
- "react-dom": "19.0.0-rc-66855b96-20241106"
28
+ "next": "15.0.4-canary.12",
29
+ "react": "19.0.0-rc-380f5d67-20241113",
30
+ "react-dom": "19.0.0-rc-380f5d67-20241113"
27
31
  },
28
32
  "devDependencies": {
29
33
  "@babel/cli": "^7.25.9",
34
+ "@babel/core": "^7.26.0",
30
35
  "@babel/preset-env": "^7.26.0",
31
36
  "@babel/preset-react": "^7.25.9",
32
37
  "@babel/preset-typescript": "^7.26.0",
@@ -35,6 +40,7 @@
35
40
  "@types/react-dom": "^18",
36
41
  "eslint": "^8",
37
42
  "eslint-config-next": "15.0.3",
43
+ "tsup": "^8.3.5",
38
44
  "typescript": "^5.6.3"
39
45
  }
40
46
  }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Demo = Demo;
5
- var tslib_1 = require("tslib");
6
- var react_1 = tslib_1.__importStar(require("react"));
7
- function Demo(_a) {
8
- var title = _a.title;
9
- var state = (0, react_1.useState)(title)[0];
10
- return (react_1.default.createElement(react_1.default.Fragment, null,
11
- "Demo:",
12
- state));
13
- }
14
- ;
15
- //# sourceMappingURL=Demo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Demo.js","sourceRoot":"","sources":["../../../src/fesd/components/Demo.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;AAEZ,oBAKC;;AAND,qDAAuC;AACvC,SAAgB,IAAI,CAAC,EAA4B;QAA1B,KAAK,WAAA;IACjB,IAAA,KAAK,GAAI,IAAA,gBAAQ,EAAC,KAAK,CAAC,GAAnB,CAAmB;IAE/B,OAAO,CAAC;;QAAQ,KAAK,CAAI,CAAC,CAAA;AAE9B,CAAC;AAAA,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Demo = Demo;
5
- var tslib_1 = require("tslib");
6
- var react_1 = tslib_1.__importStar(require("react"));
7
- function Demo(_a) {
8
- var title = _a.title;
9
- var state = (0, react_1.useState)(title)[0];
10
- return (<>Demo:{state}</>);
11
- }
12
- ;
13
- //# sourceMappingURL=Demo.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Demo.jsx","sourceRoot":"","sources":["../../../src/fesd/components/Demo.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;AAGZ,oBAKC;;AAPD,qDAAuC;AAEvC,SAAgB,IAAI,CAAC,EAA4B;QAA1B,KAAK,WAAA;IACjB,IAAA,KAAK,GAAI,IAAA,gBAAQ,EAAC,KAAK,CAAC,GAAnB,CAAmB;IAE/B,OAAO,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAE9B,CAAC;AAAA,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Demo = void 0;
4
- var Demo_1 = require("./Demo");
5
- Object.defineProperty(exports, "Demo", { enumerable: true, get: function () { return Demo_1.Demo; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fesd/components/index.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAArB,4FAAA,IAAI,OAAA"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usePrevious = void 0;
4
- var usePrevState_1 = require("./usePrevState");
5
- Object.defineProperty(exports, "usePrevious", { enumerable: true, get: function () { return usePrevState_1.usePrevious; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fesd/hooks/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,2GAAA,WAAW,OAAA"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- 'use client';
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.usePrevious = void 0;
5
- var react_1 = require("react");
6
- var usePrevious = function (value) {
7
- var ref = (0, react_1.useRef)(null);
8
- (0, react_1.useEffect)(function () {
9
- ref.current = value;
10
- }, [value]);
11
- return ref.current;
12
- };
13
- exports.usePrevious = usePrevious;
14
- //# sourceMappingURL=usePrevState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePrevState.js","sourceRoot":"","sources":["../../../src/fesd/hooks/usePrevState.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;AAEZ,+BAAyC;AAIlC,IAAM,WAAW,GAAG,UAAK,KAAQ;IACpC,IAAM,GAAG,GAAG,IAAA,cAAM,EAAW,IAAI,CAAC,CAAA;IAClC,IAAA,iBAAS,EAAC;QACN,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACvB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,GAAG,CAAC,OAAO,CAAA;AACtB,CAAC,CAAA;AAPY,QAAA,WAAW,eAOvB"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- 'use client';
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.usePrevious = void 0;
5
- var react_1 = require("react");
6
- var usePrevious = function (value) {
7
- var ref = (0, react_1.useRef)(null);
8
- (0, react_1.useEffect)(function () {
9
- ref.current = value;
10
- }, [value]);
11
- return ref.current;
12
- };
13
- exports.usePrevious = usePrevious;
14
- //# sourceMappingURL=usePrevState.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePrevState.jsx","sourceRoot":"","sources":["../../../src/fesd/hooks/usePrevState.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;AAEZ,+BAAyC;AAIlC,IAAM,WAAW,GAAG,UAAK,KAAQ;IACpC,IAAM,GAAG,GAAG,IAAA,cAAM,EAAW,IAAI,CAAC,CAAA;IAClC,IAAA,iBAAS,EAAC;QACN,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACvB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,GAAG,CAAC,OAAO,CAAA;AACtB,CAAC,CAAA;AAPY,QAAA,WAAW,eAOvB"}
package/dist/cjs/index.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Demo = exports.usePrevState = void 0;
4
- var usePrevState_1 = require("./hooks/usePrevState");
5
- Object.defineProperty(exports, "usePrevState", { enumerable: true, get: function () { return usePrevState_1.usePrevious; } });
6
- var Demo_1 = require("./components/Demo");
7
- Object.defineProperty(exports, "Demo", { enumerable: true, get: function () { return Demo_1.Demo; } });
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fesd/index.ts"],"names":[],"mappings":";;;AAAA,qDAAkE;AAGzD,6FAHe,0BAAY,OAGf;AAFrB,0CAAgD;AAEzB,qFAFN,WAAI,OAEM"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare function Demo({ title }: {
3
- title: string;
4
- }): React.JSX.Element;
@@ -1,11 +0,0 @@
1
- "use client";
2
- import React, { useState } from 'react';
3
- export function Demo(_a) {
4
- var title = _a.title;
5
- var state = useState(title)[0];
6
- return (React.createElement(React.Fragment, null,
7
- "Demo:",
8
- state));
9
- }
10
- ;
11
- //# sourceMappingURL=Demo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Demo.js","sourceRoot":"","sources":["../../../src/fesd/components/Demo.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AACZ,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,MAAM,UAAU,IAAI,CAAC,EAA4B;QAA1B,KAAK,WAAA;IACjB,IAAA,KAAK,GAAI,QAAQ,CAAC,KAAK,CAAC,GAAnB,CAAmB;IAE/B,OAAO,CAAC;;QAAQ,KAAK,CAAI,CAAC,CAAA;AAE9B,CAAC;AAAA,CAAC"}
@@ -1,9 +0,0 @@
1
- "use client";
2
- import React, { useState } from 'react';
3
- export function Demo(_a) {
4
- var title = _a.title;
5
- var state = useState(title)[0];
6
- return (<>Demo:{state}</>);
7
- }
8
- ;
9
- //# sourceMappingURL=Demo.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Demo.jsx","sourceRoot":"","sources":["../../../src/fesd/components/Demo.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AACZ,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,MAAM,UAAU,IAAI,CAAC,EAA4B;QAA1B,KAAK,WAAA;IACjB,IAAA,KAAK,GAAI,QAAQ,CAAC,KAAK,CAAC,GAAnB,CAAmB;IAE/B,OAAO,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAE9B,CAAC;AAAA,CAAC"}
@@ -1 +0,0 @@
1
- export { Demo } from "./Demo";
@@ -1,2 +0,0 @@
1
- export { Demo } from "./Demo";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fesd/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- export { usePrevious } from "./usePrevState";
@@ -1,2 +0,0 @@
1
- export { usePrevious } from "./usePrevState";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fesd/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,3 +0,0 @@
1
- type UsePrevious<T> = T | null;
2
- export declare const usePrevious: <T>(value: T) => UsePrevious<T>;
3
- export {};
@@ -1,10 +0,0 @@
1
- 'use client';
2
- import { useEffect, useRef } from 'react';
3
- export var usePrevious = function (value) {
4
- var ref = useRef(null);
5
- useEffect(function () {
6
- ref.current = value;
7
- }, [value]);
8
- return ref.current;
9
- };
10
- //# sourceMappingURL=usePrevState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePrevState.js","sourceRoot":"","sources":["../../../src/fesd/hooks/usePrevState.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAIzC,MAAM,CAAC,IAAM,WAAW,GAAG,UAAK,KAAQ;IACpC,IAAM,GAAG,GAAG,MAAM,CAAW,IAAI,CAAC,CAAA;IAClC,SAAS,CAAC;QACN,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACvB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,GAAG,CAAC,OAAO,CAAA;AACtB,CAAC,CAAA"}
@@ -1,10 +0,0 @@
1
- 'use client';
2
- import { useEffect, useRef } from 'react';
3
- export var usePrevious = function (value) {
4
- var ref = useRef(null);
5
- useEffect(function () {
6
- ref.current = value;
7
- }, [value]);
8
- return ref.current;
9
- };
10
- //# sourceMappingURL=usePrevState.jsx.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePrevState.jsx","sourceRoot":"","sources":["../../../src/fesd/hooks/usePrevState.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAIzC,MAAM,CAAC,IAAM,WAAW,GAAG,UAAK,KAAQ;IACpC,IAAM,GAAG,GAAG,MAAM,CAAW,IAAI,CAAC,CAAA;IAClC,SAAS,CAAC;QACN,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACvB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,OAAO,GAAG,CAAC,OAAO,CAAA;AACtB,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { usePrevious as usePrevState } from './hooks/usePrevState';
2
- import { Demo as Demo } from './components/Demo';
3
- export { usePrevState, Demo };
package/dist/esm/index.js DELETED
@@ -1,4 +0,0 @@
1
- import { usePrevious as usePrevState } from './hooks/usePrevState';
2
- import { Demo as Demo } from './components/Demo';
3
- export { usePrevState, Demo };
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fesd/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,CAAA"}
File without changes
File without changes
File without changes
File without changes
File without changes