@xwadex/fesd-next 0.1.22-bata → 0.1.24-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.
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function Demo(): React.JSX.Element;
@@ -0,0 +1,14 @@
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() {
8
+ var state = (0, react_1.useState)("0")[0];
9
+ return (react_1.default.createElement(react_1.default.Fragment, null,
10
+ "Demo:",
11
+ state));
12
+ }
13
+ ;
14
+ //# sourceMappingURL=Demo.js.map
@@ -0,0 +1 @@
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;IACT,IAAA,KAAK,GAAI,IAAA,gBAAQ,EAAC,GAAG,CAAC,GAAjB,CAAiB;IAE7B,OAAO,CAAC;;QAAQ,KAAK,CAAI,CAAC,CAAA;AAE9B,CAAC;AAAA,CAAC"}
@@ -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,14 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
1
+ import { usePrevious as usePrevState } from './hooks/usePrevState';
2
+ import { Demo as Demo } from './components/Demo';
3
+ export { usePrevState, Demo };
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function Demo(): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import React, { useState } from 'react';
3
+ export function Demo() {
4
+ var state = useState("0")[0];
5
+ return (React.createElement(React.Fragment, null,
6
+ "Demo:",
7
+ state));
8
+ }
9
+ ;
10
+ //# sourceMappingURL=Demo.js.map
@@ -0,0 +1 @@
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;IACT,IAAA,KAAK,GAAI,QAAQ,CAAC,GAAG,CAAC,GAAjB,CAAiB;IAE7B,OAAO,CAAC;;QAAQ,KAAK,CAAI,CAAC,CAAA;AAE9B,CAAC;AAAA,CAAC"}
@@ -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,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,3 @@
1
+ import { usePrevious as usePrevState } from './hooks/usePrevState';
2
+ import { Demo as Demo } from './components/Demo';
3
+ export { usePrevState, Demo };
@@ -0,0 +1,4 @@
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
@@ -0,0 +1 @@
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"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@xwadex/fesd-next",
3
- "version": "0.1.22-bata",
3
+ "version": "0.1.24-bata",
4
4
  "private": false,
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/esm/index.js",
7
+ "types": "./dist/esm/index.d.ts",
7
8
  "files": [
8
9
  "dist",
9
10
  "README.md"
10
11
  ],
11
12
  "scripts": {
12
13
  "dev": "next dev --turbopack",
13
- "build": "next build",
14
- "start": "next start",
15
- "lint": "next lint",
16
- "buildnpm": "tsc --declaration"
14
+ "build": "npm run build:esm && npm run build:cjs",
15
+ "build:esm": "tsc",
16
+ "build:cjs": "tsc --module commonjs --outDir dist/cjs"
17
17
  },
18
18
  "exports": {
19
19
  ".": "./dist/index.js",
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface TestProps {
3
- title: string;
4
- }
5
- declare const Test: React.FC<TestProps>;
6
- export default Test;
@@ -1,7 +0,0 @@
1
- "use client";
2
- import React from 'react';
3
- const Test = ({ title }) => {
4
- return <h1>{title}</h1>;
5
- };
6
- Test.displayName = "Test";
7
- export default Test;
@@ -1 +0,0 @@
1
- export { default } from "./Test";
@@ -1 +0,0 @@
1
- export { default } from "./Test";
@@ -1 +0,0 @@
1
- export { default as Test } from "./Test";
@@ -1 +0,0 @@
1
- export { default as Test } from "./Test";
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./components";
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- export * from "./components";