@xwadex/fesd-next 0.3.0 → 0.3.2

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/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # your-ui-package
2
+
3
+ React UI 元件套件。
4
+
5
+ ## 安裝
6
+
7
+ ```bash
8
+ npm install your-ui-package
9
+ ```
10
+
11
+ ## 使用
12
+
13
+ ```tsx
14
+ import { MyComponent } from 'your-ui-package';
15
+
16
+ export default function App() {
17
+ return <MyComponent />;
18
+ }
19
+ ```
20
+
21
+ ## 內容
22
+
23
+ - `MyComponent`:簡單的 React 元件
24
+ - `useHooks`:自訂 hook
25
+ - `someUtil`:工具函式
26
+ - 共用型別
@@ -0,0 +1 @@
1
+ export declare const MyComponent: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import styles from './MyComponent.module.scss';
3
+ export const MyComponent = () => (_jsx("div", { className: styles.container, children: "Hello World" }));
@@ -0,0 +1,3 @@
1
+ .container {
2
+ color: red;
3
+ }
@@ -0,0 +1 @@
1
+ export declare const useHooks: () => string;
@@ -0,0 +1,3 @@
1
+ export const useHooks = () => {
2
+ return 'This is a hook placeholder';
3
+ };
@@ -0,0 +1,4 @@
1
+ export * from './components/myComponents/MyComponent';
2
+ export * from './hooks/useHooks';
3
+ export * from './utils/someUtil';
4
+ export * from './types/common';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './components/myComponents/MyComponent';
2
+ export * from './hooks/useHooks';
3
+ export * from './utils/someUtil';
4
+ export * from './types/common';
@@ -0,0 +1,4 @@
1
+ export type CommonType = {
2
+ id: string;
3
+ name: string;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const someUtil: () => string;
@@ -0,0 +1,3 @@
1
+ export const someUtil = () => {
2
+ return 'Utility function';
3
+ };
package/package.json CHANGED
@@ -1,26 +1,40 @@
1
1
  {
2
2
  "name": "@xwadex/fesd-next",
3
- "version": "0.3.0",
4
- "main": "index.js",
5
- "module": "index.js",
6
- "types": "index.d.ts",
7
- "files": [
8
- "./"
9
- ],
3
+ "version": "0.3.2",
4
+ "private": false,
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
10
7
  "exports": {
11
8
  ".": {
12
- "types": "./index.d.ts",
13
- "import": "./index.js"
14
- },
15
- "./types": "./types/index.d.ts",
16
- "./styles/*": "./styles/*"
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "scripts": {
17
+ "clean": "rm -rf dist",
18
+ "build": "npm run clean && tsc --project tsconfig.json && node copy-scss.js",
19
+ "prepare": "npm run build"
20
+ },
21
+ "dependencies": {
22
+ "react": "^19.0.0",
23
+ "react-dom": "^19.0.0",
24
+ "next": "15.3.3"
25
+ },
26
+ "devDependencies": {
27
+ "typescript": "^5",
28
+ "@types/node": "^20",
29
+ "@types/react": "^19",
30
+ "@types/react-dom": "^19",
31
+ "eslint": "^9",
32
+ "eslint-config-next": "15.3.3",
33
+ "@eslint/eslintrc": "^3",
34
+ "sass": "^1.75.0"
17
35
  },
18
36
  "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"
37
+ "react": ">=18",
38
+ "react-dom": ">=18"
25
39
  }
26
40
  }
@@ -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
- }
File without changes