react-ag-psd-psdtool 1.0.0 → 1.1.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 CHANGED
@@ -1,73 +1,5 @@
1
1
  # react-ag-psd-psdtool
2
2
 
3
- Zero-knowledge ***minimalistic*** template for creating a new npm package.
4
-
5
- ---
6
-
7
- **📘Docs Demo**: [https://34j.github.io/react-ag-psd-psdtool/](https://34j.github.io/react-ag-psd-psdtool/)
8
-
9
- **📦️NPM Package Demo**: [https://www.npmjs.com/package/react-ag-psd-psdtool](https://www.npmjs.com/package/react-ag-psd-psdtool)
10
-
11
- ---
12
-
13
- ## Features
14
-
15
- - The **proof** that the config is ***minimalistic*** is shown below.
16
- - The main reason (`☆`) of the slight complexity is the need to specify the project structure (`src`, `dist`, `test`).
17
-
18
- - 👾Github
19
- - [📦🚀semantic-release](https://github.com/semantic-release/semantic-release) & [Commitizen](https://github.com/search?q=commitizen): from [this article](https://zenn.dev/wakamsha/articles/learn-semantic-release)
20
- - [New Issue Templates](https://github.com/34j/react-ag-psd-psdtool/tree/main/.github/ISSUE_TEMPLATE): from [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template/tree/main/.github/ISSUE_TEMPLATE)
21
- - [💨GitHub Actions](https://github.com/34j/react-ag-psd-psdtool/tree/main/.github/workflows) + [📊Codecov](https://about.codecov.io/): npm version of [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template/blob/main/.github/workflows/ci.yml)
22
- - [🧱Renovate](https://docs.renovatebot.com/): inherits [config:best-practices](https://docs.renovatebot.com/presets-config/#configbest-practices)
23
- - [⚙TypeScript](https://www.typescriptlang.org/):`tsconfig.json`: inherits [@tsconfig/strictest](https://www.npmjs.com/package/@tsconfig/strictest): 4 lines for `☆`, [3 lines for ES types](https://youtu.be/H91aqUHn8sE?t=148)
24
- - ✨️Formatting
25
- - [⚠️pre-commit](https://pre-commit.com/) and [pre-commit.ci](https://pre-commit.ci/): from [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template/tree/main/.github/ISSUE_TEMPLATE) + [mirrors-eslint](https://github.com/pre-commit/mirrors-eslint) (⏪️[🐶Husky](https://github.com/typicode/husky) + [Lint Staged](https://github.com/okonet/lint-staged) for better CI support)
26
- - [ESLint](https://eslint.org/): inherits [@antfu/eslint-config](https://www.npmjs.com/package/@antfu/eslint-config)
27
- - 📦Packageing
28
- - [pnpm](https://pnpm.io/) (⏪️npm)
29
- - ⚠️ Testing
30
- - [⚡️Vitest](https://vitest.dev/) (⏪️[👢Jest](https://jestjs.io/)): several lines for browser testing (optional, can be removed if Node.js only)
31
- - 📖Documentation
32
- - [🌐GitHub Pages](https://pages.github.com/)
33
- - [📖TypeDoc](https://typedoc.org/): 2 lines for `☆` `P`
34
- - ❄Nix Support (Optional, only needed for Nix users)
35
- - [❄`nix develop --ignore-environment`](https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-develop): many lines for Playwright support (optional, can be removed if Node.js only)
36
-
37
- <details>
38
- <summary>Removed Features (to achieve minimalism)</summary>
39
-
40
- - Removed Commitizen integration and VS Code stuff (from [ryansonshine/typescript-npm-package-template](https://github.com/ryansonshine/typescript-npm-package-template)) because it's not maintained and complex. Commitizen can be still used (Semantic Release supports it natively).
41
- - Removed Prettier due to [@antfu/eslint-config's opinions](https://github.com/antfu/eslint-config?tab=readme-ov-file#prettier) and [mirrors-prettier](https://github.com/pre-commit/mirrors-prettier) being archived.
42
-
43
- </details>
44
-
45
- ## Quickstart
46
-
47
- 1. Click the "Use this template" button.
48
- 2. Replace `GITHUB_USER` and `REPO_NAME` using `sed`:
49
- ```bash
50
- GITHUB_USER="johnsmith"
51
- REPO_NAME="my-cool-package"
52
- sed -i.tmp "s/\([^@]\)34j/\1$GITHUB_USER/g; s/react-ag-psd-psdtool\|react-ag-psd-psdtool/$REPO_NAME/g;" package.json src/index.ts README.md
53
- sed -i.tmp 's/"version": "[0-9.]*"/"version": "0.0.0"/' package.json
54
- rm *.tmp
55
- rm src/*.tmp
56
- rm CHANGELOG.md
57
- ```
58
- 3. [Create](https://www.npmjs.com/settings/34j/tokens/) and add `NPM_TOKEN` to [`Settings/Secrets and variables/Actions/Repository secrets`](https://github.com/34j/react-ag-psd-psdtool/settings/secrets/actions).
59
- 4. [Create][codecov-url] and add `CODECOV_TOKEN` to [`Settings/Secrets and variables/Actions/Repository secrets`](https://github.com/34j/react-ag-psd-psdtool/settings/secrets/actions).
60
- 5. Install GitHub Apps, [pre-commit.ci **lite**](https://github.com/apps/pre-commit-ci-lite/installations/select_target) and [Codecov](https://github.com/apps/codecov/installations/select_target).
61
- 6. Install [pre-commit](https://pre-commit.com/) using [`uv`](https://github.com/astral-sh/uv) by `uv tool install pre-commit` and install hooks by `pre-commit install`.
62
- 7. Enable Github Pages and set `Source` to `GitHub Actions` from [`Settings/Pages/Build and deployment`](https://github.com/34j/react-ag-psd-psdtool/settings/pages)
63
- 8. Remove everything above `---`.
64
-
65
- > Inspired by [node-module-boilerplate](https://github.com/sindresorhus/node-module-boilerplate) and [typescript-npm-package-template](https://github.com/Atry/typescript-npm-package-template/tree/main), which is great but unnecessarily complex and poorly maintained.
66
-
67
- ---
68
-
69
- # react-ag-psd-psdtool
70
-
71
3
  [![npm package][npm-img]][npm-url]
72
4
  [![Build Status][build-img]][build-url]
73
5
  [![Downloads][downloads-img]][downloads-url]
@@ -0,0 +1,10 @@
1
+ import 'bootstrap';
2
+ import 'bootstrap/dist/css/bootstrap.min.css';
3
+ import 'bootstrap/dist/css/bootstrap.css';
4
+ interface PsdToolProps {
5
+ url?: string;
6
+ onLoad?: (schema: Record<string, unknown>) => void;
7
+ onChange?: (data: Record<string, unknown>) => void;
8
+ }
9
+ declare function PsdTool({ url, onLoad, onChange }: PsdToolProps): import("react/jsx-runtime").JSX.Element;
10
+ export default PsdTool;
@@ -1,9 +1,2 @@
1
- /**
2
- @module
3
- */
4
- import { mySubmodule } from './submodule';
5
- /**
6
- * Lorem ipsum.
7
- */
8
- export declare const myPackage: (taco?: string) => string;
9
- export { mySubmodule };
1
+ import PsdTool from './PsdTool.tsx';
2
+ export default PsdTool;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "react-ag-psd-psdtool",
3
3
  "type": "commonjs",
4
- "version": "1.0.0",
5
- "description": "Minimalistic npm package template with 📦🚀semantic-release + Commitizen, CodeCov, Renovate, pre-commit + EsLint (✗🐶Husky + Lint Staged), ⚡️Vitest (✗👢Jest), 📖TypeDoc + Github Pages support. Note that this is a generated sample package.",
4
+ "version": "1.1.0",
5
+ "description": "PSDTool-like React component using ag-psd-psdtool",
6
6
  "author": {
7
7
  "name": "34j"
8
8
  },
@@ -34,36 +34,64 @@
34
34
  "preinstall": "npx only-allow pnpm",
35
35
  "build": "tsc --project tsconfig.json",
36
36
  "lint": "eslint --fix",
37
- "typedoc": "typedoc",
37
+ "typedoc": "vite build && typedoc",
38
38
  "typedoc:watch": "typedoc --watch",
39
39
  "test:watch": "vitest --watch --coverage --coverage.include=src",
40
40
  "test": "vitest --coverage --coverage.include=src",
41
41
  "watch": "npm-run-all --race --parallel *:watch",
42
- "update": "npm-check-updates -u"
42
+ "update": "npm-check-updates -u",
43
+ "dev": "vite"
44
+ },
45
+ "dependencies": {
46
+ "@rjsf/core": "6.0.0-beta.17",
47
+ "@rjsf/react-bootstrap": "6.0.0-beta.10",
48
+ "@rjsf/utils": "6.0.0-beta.17",
49
+ "@rjsf/validator-ajv8": "6.0.0-beta.17",
50
+ "ag-psd": "^28.4.1",
51
+ "ag-psd-psdtool": "^1.1.4",
52
+ "bootstrap": "^5.3.8",
53
+ "react": "^19.2.0",
54
+ "react-bootstrap": "^2.10.10",
55
+ "react-code-blocks": "^0.1.6",
56
+ "react-dom": "^19.2.0",
57
+ "react-dropzone": "^14.3.8",
58
+ "react-icons": "^5.5.0"
43
59
  },
44
60
  "devDependencies": {
45
- "@antfu/eslint-config": "5.3.0",
61
+ "@antfu/eslint-config": "6.1.0",
46
62
  "@semantic-release/changelog": "6.0.3",
47
63
  "@semantic-release/git": "10.0.1",
48
- "@tsconfig/strictest": "2.0.5",
49
- "@types/node": "22.18.1",
50
- "@typescript-eslint/eslint-plugin": "8.43.0",
51
- "@vitest/browser": "3.2.4",
52
- "@vitest/coverage-v8": "3.2.4",
53
- "eslint": "9.35.0",
64
+ "@tsconfig/strictest": "2.0.6",
65
+ "@types/node": "24.9.1",
66
+ "@types/react": "19.2.2",
67
+ "@types/react-dom": "19.2.2",
68
+ "@typescript-eslint/eslint-plugin": "8.46.2",
69
+ "@vitejs/plugin-react": "5.1.0",
70
+ "@vitest/browser": "4.0.3",
71
+ "@vitest/browser-playwright": "4.0.3",
72
+ "@vitest/coverage-v8": "4.0.3",
73
+ "eslint": "9.38.0",
54
74
  "npm-run-all2": "8.0.4",
55
- "playwright": "1.55.0",
56
- "semantic-release": "24.2.8",
57
- "typedoc": "0.28.12",
58
- "typescript": "5.9.2",
59
- "vitest": "3.2.4"
75
+ "playwright": "1.56.1",
76
+ "semantic-release": "25.0.1",
77
+ "typedoc": "0.28.14",
78
+ "typescript": "5.9.3",
79
+ "vite": "7.1.12",
80
+ "vitest": "4.0.3"
60
81
  },
61
82
  "typedocOptions": {
62
83
  "entryPoints": [
63
84
  "src"
64
85
  ],
65
86
  "tsconfig": "tsconfig.json",
66
- "headings": false
87
+ "headings": false,
88
+ "basePath": "./docs",
89
+ "outputs": [
90
+ {
91
+ "name": "html",
92
+ "path": "./docs/docs"
93
+ }
94
+ ]
67
95
  },
68
96
  "release": {
69
97
  "plugins": [
package/dist/src/index.js DELETED
@@ -1,13 +0,0 @@
1
- "use strict";
2
- /**
3
- @module
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.mySubmodule = exports.myPackage = void 0;
7
- const submodule_1 = require("./submodule");
8
- Object.defineProperty(exports, "mySubmodule", { enumerable: true, get: function () { return submodule_1.mySubmodule; } });
9
- /**
10
- * Lorem ipsum.
11
- */
12
- const myPackage = (taco = '') => `${taco} from my package`;
13
- exports.myPackage = myPackage;
@@ -1,4 +0,0 @@
1
- /**
2
- * Lorem ipsum.
3
- */
4
- export declare const mySubmodule: (taco?: string) => string;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mySubmodule = void 0;
4
- /**
5
- * Lorem ipsum.
6
- */
7
- const mySubmodule = (taco = '') => `${taco} from my submodule`;
8
- exports.mySubmodule = mySubmodule;