@the-captain-america/core 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 ADDED
@@ -0,0 +1,74 @@
1
+ # @the-captain-america/core
2
+
3
+ Shared Cornerstone package for external applications and internal workspaces.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @the-captain-america/core
9
+ ```
10
+
11
+ Peer dependencies expected by the package:
12
+
13
+ ```bash
14
+ npm install react react-dom react-redux @reduxjs/toolkit styled-components date-fns ramda prop-types
15
+ ```
16
+
17
+ ## Root package usage
18
+
19
+ Import shared primitives, common components, hooks, features, and styles from the root package:
20
+
21
+ ```jsx
22
+ import {
23
+ Button,
24
+ Flex,
25
+ Heading,
26
+ Text,
27
+ Payday,
28
+ } from '@the-captain-america/core'
29
+ ```
30
+
31
+ ## Standalone Payday usage
32
+
33
+ Use the dedicated Payday bundle when you want to mount Payday inside another website without wiring the store yourself:
34
+
35
+ ```jsx
36
+ import Payday from '@the-captain-america/core/payday'
37
+
38
+ export default function App() {
39
+ return <Payday />
40
+ }
41
+ ```
42
+
43
+ If the host site needs direct access to the Payday store, actions, or selectors:
44
+
45
+ ```jsx
46
+ import {
47
+ Payday,
48
+ createPaydayStore,
49
+ paydayActions,
50
+ paydaySelector,
51
+ } from '@the-captain-america/core/payday'
52
+ import { Provider } from 'react-redux'
53
+
54
+ const store = createPaydayStore()
55
+
56
+ export default function App() {
57
+ return (
58
+ <Provider store={store}>
59
+ <Payday />
60
+ </Provider>
61
+ )
62
+ }
63
+ ```
64
+
65
+ ## Payday integration note
66
+
67
+ The current Payday feature loads and mutates finance data via `/finances` API routes. The host application needs to expose compatible endpoints or provide a custom network layer before production rollout.
68
+
69
+ ## Publishing
70
+
71
+ 1. Create the `@the-captain-america/core` package on npm under the `@the-captain-america` scope.
72
+ 2. Add an `NPM_TOKEN` repository secret in GitHub with publish access to that package.
73
+ 3. Run the `Publish Core Package` GitHub Actions workflow, or publish a GitHub release to trigger it.
74
+ 4. Consume the package from the Payday website with `npm install @the-captain-america/core`.
@@ -0,0 +1 @@
1
+ var e={n:r=>{var n=r&&r.__esModule?()=>r.default:()=>r;return e.d(n,{a:n}),n},d:(r,n)=>{for(var o in n)e.o(n,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:n[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{Button:()=>u});const n=require("react");var o=e.n(n);const t=require("styled-components");var c,a,d,l=e.n(t)().button(c||(a=["\n background-color: #007bff;\n color: white;\n padding: 10px 20px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n\n &:hover {\n background-color: #0056b3;\n }\n"],d||(d=a.slice(0)),c=Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(d)}})))),u=function(e){var r=e.children,n=e.onClick;return o().createElement(l,{onClick:n},r)};module.exports=r;
@@ -0,0 +1 @@
1
+ var e={n:r=>{var n=r&&r.__esModule?()=>r.default:()=>r;return e.d(n,{a:n}),n},d:(r,n)=>{for(var o in n)e.o(n,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:n[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};const r=require("react");var n=e.n(r);const o=require("styled-components");var t,c,a,d=e.n(o)().button(t||(c=["\n background-color: #007bff;\n color: white;\n padding: 10px 20px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n\n &:hover {\n background-color: #0056b3;\n }\n"],a||(a=c.slice(0)),t=Object.freeze(Object.defineProperties(c,{raw:{value:Object.freeze(a)}})))),i=function(e){var r=e.children,o=e.onClick;return n().createElement(d,{onClick:o},r)};export{i as Button};
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@the-captain-america/core",
3
+ "version": "1.1.0",
4
+ "main": "dist/index.cjs.js",
5
+ "module": "dist/index.esm.js",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/index.esm.js",
9
+ "require": "./dist/index.cjs.js"
10
+ },
11
+ "./package.json": "./package.json"
12
+ },
13
+ "license": "ISC",
14
+ "description": "A library for building Cornerstone applications.",
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "registry": "https://registry.npmjs.org/"
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "scripts": {
23
+ "clean": "rm -rf dist",
24
+ "help": "node scripts/help.js",
25
+ "versions": "bash scripts/package-versions.sh",
26
+ "test": "jest --config jest.config.js --maxWorkers=50%",
27
+ "test:ci": "jest --config jest.config.js --runInBand --ci",
28
+ "build": "yarn run clean && webpack --config webpack.config.js",
29
+ "build:watch": "webpack --config webpack.config.js --watch",
30
+ "dev": "cross-env GENERATE_SOURCEMAP=true webpack serve --config webpack.config.js --mode development",
31
+ "verify-release": "bash ../../scripts/verify-core-release.sh",
32
+ "pack:dry-run": "npm pack --dry-run"
33
+ },
34
+ "dependencies": {
35
+ "@babel/cli": "^7.21.0",
36
+ "@babel/core": "^7.21.0",
37
+ "@babel/preset-env": "^7.20.0"
38
+ },
39
+ "peerDependencies": {
40
+ "@hello-pangea/dnd": "^18.0.1",
41
+ "date-fns": "^2.27.0",
42
+ "prettier": "^3",
43
+ "prop-types": "15.8.1",
44
+ "ramda": "0.28.0",
45
+ "react": "^19.1.0",
46
+ "react-dom": "^19.1.0",
47
+ "react-redux": "^8.0.5",
48
+ "react-router-dom": "^6.1.1",
49
+ "styled-components": "^6.1.17"
50
+ },
51
+ "devDependencies": {
52
+ "@testing-library/jest-dom": "^6.6.3",
53
+ "@testing-library/react": "^16.3.0",
54
+ "@cornerstone/builder": "^1.0.2",
55
+ "babel-jest": "^29.6.1",
56
+ "babel-plugin-module-resolver": "^5.0.0",
57
+ "babel-plugin-root-import": "6.6.0",
58
+ "babel-plugin-styled-components": "^2.0.7",
59
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
60
+ "cross-env": "^7.0.3",
61
+ "jest": "^29.6.1",
62
+ "jest-circus": "^29.6.1",
63
+ "jest-environment-jsdom": "^29.7.0",
64
+ "jest-fetch-mock": "^3.0.3",
65
+ "jest-resolve": "^29.6.1",
66
+ "jest-watch-typeahead": "0.6.1",
67
+ "jspdf": "^4.0.0",
68
+ "react-test-renderer": "^19.1.0",
69
+ "redux-mock-store": "^1.5.4",
70
+ "webpack": "^5.24.3",
71
+ "webpack-cli": "^4.5.0",
72
+ "webpack-stats-plugin": "^1.1.3"
73
+ }
74
+ }