@nodeblocks/frontend-list-users-block 0.0.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/dist/lib.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ import { DefaultBlocks, DefaultOptions } from './blocks';
2
+ /**
3
+ * Sets the blocks by merging default blocks with custom blocks provided by the children function.
4
+ *
5
+ * @param defaultBlocks - The default blocks to be used.
6
+ * @param children - An optional function that returns custom blocks and arguments.
7
+ * @param args - Additional unknown arguments.
8
+ * @returns An object containing the merged blocks and additional arguments.
9
+ */
10
+ type ChildrenProps = {
11
+ defaultBlocks: DefaultBlocks;
12
+ };
13
+ export declare function setBlocks<TDefaultBlocks extends DefaultBlocks, TDefaultOptions extends DefaultOptions>(defaultBlocks: TDefaultBlocks, defaultOptions: TDefaultOptions, children?: (props: ChildrenProps) => DefaultOptions & {
14
+ blocks: {
15
+ [x: string]: any;
16
+ };
17
+ }): {
18
+ blocks: {
19
+ [k: string]: any;
20
+ };
21
+ };
22
+ type ClassName = string | ClassName[] | undefined | null;
23
+ /**
24
+ * Utility function to join class names together, ignoring undefined or nil values.
25
+ * @param classes - The class names to join.
26
+ * @returns The joined class names.
27
+ */
28
+ export declare function classNames(...classes: ClassName[]): string;
29
+ export {};
30
+ //# sourceMappingURL=lib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD;;;;;;;GAOG;AAGH,KAAK,aAAa,GAAG;IACnB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,wBAAgB,SAAS,CACvB,cAAc,SAAS,aAAa,EACpC,eAAe,SAAS,cAAc,EAEtC,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,eAAe,EAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,cAAc,GAAG;IACpD,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC9B;;;;EAiBF;AAED,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAE1D"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@nodeblocks/frontend-list-users-block",
3
+ "version": "0.0.2",
4
+ "main": "dist/index.cjs.js",
5
+ "module": "dist/index.esm.js",
6
+ "browser": "dist/index.iife.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist/",
10
+ "dist/index.css"
11
+ ],
12
+ "scripts": {
13
+ "build": "rollup -c",
14
+ "watch": "rollup -c --watch"
15
+ },
16
+ "peerDependencies": {
17
+ "react": "^18.3.1",
18
+ "react-dom": "^18.0.0"
19
+ },
20
+ "devDependencies": {
21
+ "@rollup/plugin-commonjs": "^28.0.1",
22
+ "@rollup/plugin-json": "^6.1.0",
23
+ "@rollup/plugin-node-resolve": "^15.3.0",
24
+ "@rollup/plugin-typescript": "^12.1.1",
25
+ "@types/react": "^18.3.12",
26
+ "@types/react-dom": "^18.3.1",
27
+ "rollup": "^4.28.0",
28
+ "rollup-plugin-peer-deps-external": "^2.2.4",
29
+ "rollup-plugin-postcss": "^4.0.2",
30
+ "rollup-plugin-serve": "^1.1.1",
31
+ "tslib": "^2.8.1",
32
+ "typescript": "^5.7.2"
33
+ },
34
+ "dependencies": {
35
+ "@basaldev/blocks-frontend-framework": "^3.0.0-rc.9",
36
+ "@fontsource/material-symbols-outlined": "^5.2.5",
37
+ "@tanstack/react-table": "^8.21.2"
38
+ }
39
+ }
package/readme.md ADDED
@@ -0,0 +1,57 @@
1
+ ## ๐Ÿš€ Nodeblocks Frontend Starter Kit
2
+
3
+ Welcome to the Nodeblocks Frontend Starter Kit! ๐ŸŽ‰ This kit is designed to make building frontend libraries in React super easy, helping you streamline your development workflow with minimal fuss. Let's dive in! ๐Ÿคฟ
4
+
5
+ ### โœจ Features
6
+ - **๐Ÿš€ Bundling with Rollup:** Get a clean, minimalistic approach to bundling your JavaScript files for smoother frontend development.
7
+ - **๐Ÿ’™ TypeScript Support:** We've included a pre-configured `tsconfig.json` to ensure your TypeScript setup is strict, efficient, and ready to go.
8
+ - **โš™๏ธ Peer Dependencies:** Keep bundle sizes lean with React and React DOM set as peer dependencies.
9
+ - **๐ŸŽจ CSS Support:** Easily import and process CSS files, giving you more control over your styles.
10
+
11
+ ### ๐Ÿ› ๏ธ How to Use
12
+ 1. **Clone this repository** ๐ŸŒ€:
13
+ ```bash
14
+ git clone <repository-url>
15
+ cd <repository-directory>
16
+ ```
17
+
18
+ 2. **Install dependencies** ๐Ÿ“ฆ:
19
+ ```bash
20
+ npm install
21
+ ```
22
+
23
+ 3. **Start development** ๐Ÿ› ๏ธ:
24
+ ```bash
25
+ npm run watch
26
+ ```
27
+
28
+ 4. **Build for production** ๐Ÿ—๏ธ:
29
+ ```bash
30
+ npm run build
31
+ ```
32
+
33
+ ### ๐Ÿงช How to Test
34
+
35
+ The `test` folder contains examples that demonstrate how to use the libraries you create with this starter kit. These examples show compatibility with various bundlers, such as:
36
+
37
+ - **Create React App** (Webpack)
38
+ - **Vite** โšก
39
+ - **Rollup** (itself) (Coming soon) ๐Ÿ”„
40
+ - **Parcel** (Coming soon) ๐Ÿ“ฆ
41
+
42
+ This ensures Nodeblocks libraries integrate seamlessly with different workflows. ๐Ÿ› ๏ธโœจ
43
+
44
+ **Before running each project make sure you run `npm link`:**
45
+
46
+ 1. In the root of this project:
47
+ ```bash
48
+ npm link
49
+ ```
50
+ 2. In the test project you want to run:
51
+ ```bash
52
+ npm i
53
+ npm link @basaldev/frontend-starter-kit
54
+ ```
55
+ (Note that in real life your library would not be called frontend-starter-kit.)
56
+
57
+ 3. Then you can follow your usual workflow either with **Create React App** (`npm start`) or with Vite (`npm run dev`). This will give you a development environment where whenever you change your library it will be available in your test project.