@loopr-ai/craft 0.0.0

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,38 @@
1
+ # Loopr Craft
2
+
3
+ A component library for LooprAI products. Based out of Material UI.
4
+
5
+ ## Expanding the ESLint configuration
6
+
7
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
8
+
9
+ - Configure the top-level `parserOptions` property like this:
10
+
11
+ ```js
12
+ parserOptions: {
13
+ ecmaVersion: 'latest',
14
+ sourceType: 'module',
15
+ project: ['./tsconfig.json', './tsconfig.node.json'],
16
+ tsconfigRootDir: __dirname,
17
+ },
18
+ ```
19
+
20
+ - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
21
+ - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
22
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
23
+
24
+ ## Component Library
25
+
26
+ Ref: [Creating a Component Library Fast🚀(using Vite's library mode)](https://dev.to/receter/how-to-create-a-react-component-library-using-vites-library-mode-4lma)
27
+
28
+ ### Commands
29
+ 1. Build the library: `npm run build-lib`
30
+
31
+
32
+ ## Usage
33
+ This needs to be built and published to a package manager (npm, yarn, etc) eventually.
34
+ For now, it can be used as a local dependency. by following these steps:
35
+ 1. Build the library: `npm run build-lib`
36
+ 2. follow the steps in [Use npm pack to test your packages locally](https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e)
37
+
38
+ **More Info: TBD**
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export interface ButtonProps extends React.HtmlHTMLAttributes<HTMLButtonElement> {
3
+ }
4
+ declare const _default: React.NamedExoticComponent<ButtonProps>;
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import e from "react";
3
+ const m = ({ children: t, ...o }) => /* @__PURE__ */ r("button", { ...o, children: t }), u = e.memo(m);
4
+ export {
5
+ u as default
6
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export interface InputProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
3
+ }
4
+ declare const _default: React.NamedExoticComponent<InputProps>;
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import m from "react";
3
+ const n = ({ children: t, type: o = "text", ...e }) => /* @__PURE__ */ r("input", { type: o, ...e, children: t }), s = m.memo(n);
4
+ export {
5
+ s as default
6
+ };
package/dist/main.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import Button from "./components/cell/Button";
2
+ import Input from "./components/cell/Input";
3
+ export { Button, Input };
package/dist/main.js ADDED
@@ -0,0 +1,6 @@
1
+ import { default as a } from "./components/cell/Button/index.js";
2
+ import { default as f } from "./components/cell/Input/index.js";
3
+ export {
4
+ a as Button,
5
+ f as Input
6
+ };
@@ -0,0 +1 @@
1
+
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@loopr-ai/craft",
3
+ "version": "0.0.0",
4
+ "description": "Component library based out of Matetial UI customized to support Loopr AI products",
5
+ "homepage": "https://loopr.ai",
6
+ "author": {
7
+ "name": "Loopr AI",
8
+ "url": "https://loopr.ai"
9
+ },
10
+ "type": "module",
11
+ "main": "dist/main.js",
12
+ "types": "dist/main.d.ts",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "scripts": {
17
+ "dev": "vite",
18
+ "build": "tsc && vite build",
19
+ "build-lib": "tsc --p ./tsconfig-build.json && vite build",
20
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
21
+ "preview": "vite preview",
22
+ "prepublishOnly": "npm run build-lib"
23
+ },
24
+ "peerDependencies": {
25
+ "react": "^18.2.0",
26
+ "react-dom": "^18.2.0"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^20.5.7",
30
+ "@types/react": "^18.2.15",
31
+ "@types/react-dom": "^18.2.7",
32
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
33
+ "@typescript-eslint/parser": "^6.0.0",
34
+ "@vitejs/plugin-react": "^4.0.3",
35
+ "eslint": "^8.45.0",
36
+ "eslint-plugin-react-hooks": "^4.6.0",
37
+ "eslint-plugin-react-refresh": "^0.4.3",
38
+ "glob": "^10.3.4",
39
+ "typescript": "^5.0.2",
40
+ "vite": "^4.4.5",
41
+ "vite-plugin-dts": "^3.5.3",
42
+ "vite-plugin-lib-inject-css": "^1.2.1"
43
+ },
44
+ "sideEffects": [
45
+ "**/*.css"
46
+ ],
47
+ "volta": {
48
+ "node": "20.4.0"
49
+ }
50
+ }