Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8a9f3fd
feat: add periodic statements playground
jaymantri Sep 17, 2026
f726adc
fix: make demo path aliases portable
jaymantri Sep 17, 2026
c5d4189
docs: embed periodic statements playground
jaymantri Sep 17, 2026
58cad6f
feat(statements): match Cards playground structure
jaymantri Sep 18, 2026
6b96bc2
test(statements): lock chrome and browser parity
jaymantri Sep 18, 2026
a600c5c
fix(docs): route Statements preview embeds
jaymantri Sep 18, 2026
1856f5c
fix(statements): mark period data as platform-owned
jaymantri Sep 18, 2026
89e2fea
fix(docs): point statements embed at grid-statements-demo
jaymantri Sep 18, 2026
0e88008
docs: move statements playground under Cards
jaymantri Sep 18, 2026
f38cab6
feat(statements): add accessible brand controls
jaymantri Sep 18, 2026
8c25b97
feat(statements): add iPhone mail previews
jaymantri Sep 18, 2026
d0102ed
fix(statements): isolate API refresh triggers
jaymantri Sep 18, 2026
b5a83c9
feat(statements): export PDF and standalone HTML
jaymantri Sep 18, 2026
15b55d4
fix(statements): complete playground polish audit
jaymantri Sep 18, 2026
8bb4eaa
fix(statements): render iPhone Duo in landscape
jaymantri Sep 18, 2026
31c1871
test(statements): lock Duo landscape ratios
jaymantri Sep 18, 2026
e970003
fix(statements): use neutral Duo safe area
jaymantri Sep 18, 2026
acda512
fix(statements): restore Duo outer display
jaymantri Sep 18, 2026
f8ad1ec
fix(statements): keep Duo open and landscape
jaymantri Sep 18, 2026
e1a5704
fix(statements): enforce Duo outer device
jaymantri Sep 18, 2026
5394b92
fix(statements): render API entries after mount
jaymantri Sep 18, 2026
4ca38d5
fix(statements): open the iPhone Duo in landscape
jaymantri Sep 18, 2026
5f7844a
feat(statements): add closed-period lifecycle
jaymantri Sep 18, 2026
83457e6
fix(statements): close final audit gaps
jaymantri Sep 18, 2026
ab6fbae
refactor(statements): polish configure and preview shells
jaymantri Sep 19, 2026
ff4bfd1
fix(statements): unify closed-period presentation
jaymantri Sep 19, 2026
d2feb18
fix(statements): scale live share previews
jaymantri Sep 19, 2026
7e6938c
test(statements): audit fourth polish behavior
jaymantri Sep 19, 2026
e96a955
chore(statements): keep behavior audit executable
jaymantri Sep 19, 2026
4cad8c6
fix(statements): close fourth-polish audit findings
jaymantri Sep 19, 2026
d6d4e78
feat(statements): finish export and preview polish
jaymantri Sep 21, 2026
df9d1d3
fix(statements): close fifth-polish audit findings
jaymantri Sep 21, 2026
14fed1a
fix(statements): close fifth-polish review findings
jaymantri Sep 21, 2026
440bbfe
fix(statements): contain Wallet glass toggle
jaymantri Sep 21, 2026
dc6c855
fix(statements): keep export actions reachable on short viewports
jaymantri Sep 21, 2026
3a1dff7
fix(statements): make export sheet accessible
jaymantri Sep 21, 2026
5a10eee
docs(statements): document CLI deploys until Git relink
jaymantri Sep 22, 2026
8a88b85
fix(statements): complete sixth polish pass
jaymantri Sep 22, 2026
0e3f2e3
fix(statements): complete seventh polish pass
jaymantri Sep 22, 2026
5f68a1d
test(statements): capture settled export sheet
jaymantri Sep 22, 2026
c77bfc1
test(statements): handle reduced-motion capture
jaymantri Sep 22, 2026
5a3b0ca
test(statements): wait for export opacity
jaymantri Sep 22, 2026
97c35b4
fix(statements): render masthead title in primary text
jaymantri Sep 22, 2026
fc6cc05
Polish statement selection and desktop preview
jaymantri Sep 22, 2026
fb9cae7
Restructure statement desktop shell
jaymantri Sep 22, 2026
4354e81
Polish statement surfaces and footer hierarchy
jaymantri Sep 22, 2026
d641fb1
Polish statement chrome, surfaces, and API rail copy
jaymantri Sep 22, 2026
238be55
Fix desktop sunken-surface visual audit
jaymantri Sep 22, 2026
38a77ea
Require sunken chrome in the desktop visual audit
jaymantri Sep 22, 2026
dd21ed6
Fix desktop surface audit contract
jaymantri Sep 22, 2026
7d0e89d
Keep desktop chrome on the primary surface
jaymantri Sep 22, 2026
843d35c
Pin Cards API rail copy and sunken chrome in audits.
jaymantri Sep 22, 2026
7a5be9e
docs(cards): add periodic statements guide
jaymantri Sep 22, 2026
46dd776
docs(cards): scope statements guide to shipped behavior
jaymantri Sep 22, 2026
b45defc
docs(cards): add Statements sidebar group
jaymantri Sep 22, 2026
ab8b389
docs(cards): hold periodic statements guide
jaymantri Sep 22, 2026
e64f73b
fix(statements): drop uploaded logos from share links
jaymantri Sep 23, 2026
c7b5e46
chore(statements): thermos review fixes
jaymantri Sep 23, 2026
194e855
chore(statements): scope PR to the playground
jaymantri Sep 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/grid-statements-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
.next/
out/
.vercel/
*.tsbuildinfo
next-env.d.ts
.env*.local
.DS_Store
73 changes: 73 additions & 0 deletions components/grid-statements-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Grid Statements Playground

This demo builds consumer and commercial periodic statements. Grid supplies the customer,
account, and transaction data. The platform generates and stores each statement.

The playgrounds live in the repository's `components` directory. Cards forked Global Accounts
by copying its shared chrome. Statements re-forks the Cards modules to keep the same contract.

## Develop

```bash
npm install --ignore-scripts
npm run dev
```

The development server uses `http://localhost:4003`. Cards uses port 4002. Global Accounts uses
port 4000. These fixed ports let the docs embed each local app while you run `make mint`.

Use these URLs to test the embed theme:

```text
http://localhost:4003/?embed=true&theme=light
http://localhost:4003/?embed=true&theme=dark
```

## Keep the shared chrome equal

Run the parity check after you copy a Cards chrome change:

```bash
npm run check:chrome
```

The script compares every copied file by bytes. It permits only these product exceptions:

- `src/components/PlaygroundIntro/PlaygroundIntro.tsx` uses Statements product copy.
- `src/app/layout.tsx` uses Statements metadata and the Statements production URL. The pre-paint
embed, theme, layout, and navigation script stays equal.
- `src/app/page.module.scss` adds print-only rules that remove the playground chrome.
- `src/apps/shared/AppShell/AppShell.tsx` and `usePhoneFitScale.ts` accept a device preset.
The status bar styles, status icons, status clock, and squircle path stay equal to Cards.
The parity check protects the required device preset code from a direct copy.

Port shared fixes with `cp` from `components/grid-cards-demo` to the same path under
`components/grid-statements-demo`. Do not rewrite or approximate shared chrome.

## Deploy

Deploy to Vercel as the `grid-statements-demo` project. `vercel.json` sets an `ignoreCommand` so a
commit only triggers a build if it touches this directory. The docs page iframes the production
URL (`https://grid-statements-demo.vercel.app`). Mintlify preview branches iframe
`https://grid-statements-demo-git-<branch>-lightspark-team.vercel.app`. If a URL differs, update
`mintlify/snippets/cards/statements-demo-embed.mdx`. The docs page is
`mintlify/cards/statements.mdx` at `/cards/statements`.

Vercel limits a host label to 63 characters, so branch names for this project must be 22
characters or fewer (`grid-statements-demo-git-` and `-lightspark-team` use 41).

## Embed contract

- `?embed=true` sets `data-embed`.
- `?theme=light|dark` sets the initial theme.
- `?nav=<px>` supplies the docs sidebar width.
- The parent and iframe exchange `theme-sync`, `theme-request`, `nav-sync`, and `nav-request`.

## Data contract

`src/statement/types.ts` defines the statement model. `src/statement/fixtures.ts` derives rendered
rows and balances. `src/statement/api.ts` derives the API request and response samples from the
same activities.

The consumer sample includes an error-resolution notice and terminal location. The commercial
sample omits them.
64 changes: 64 additions & 0 deletions components/grid-statements-demo/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import * as sass from 'sass';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['@lightsparkdev/origin'],
typescript: {
// Origin is source-linked without its own node_modules,
// so its transitive type imports can't resolve from ../origin
ignoreBuildErrors: true,
},
sassOptions: {
implementation: sass,
importers: [new sass.NodePackageImporter(__dirname)],
includePaths: [
path.resolve(__dirname, 'node_modules'),
],
},
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Content-Security-Policy',
value: "frame-ancestors 'self' https://docs.lightspark.com https://*.lightspark.com https://*.mintlify.app https://*.mintlify.dev https://*.mintlify.site http://localhost:*",
},
],
},
];
},
webpack: (config) => {
// Ensure dependencies imported by the local Origin package
// resolve from this project's node_modules
config.resolve.modules = [
path.resolve(__dirname, 'node_modules'),
'node_modules',
];

// Origin only exports its main barrel — narrow imports for tree-shaken components.
config.resolve.alias = {
...config.resolve.alias,
'@lightsparkdev/origin/checkbox': path.resolve(
__dirname,
'node_modules/@lightsparkdev/origin/src/components/Checkbox/index.ts',
),
'@lightsparkdev/origin/badge': path.resolve(
__dirname,
'node_modules/@lightsparkdev/origin/src/components/Badge/index.ts',
),
'@lightsparkdev/origin/popover': path.resolve(
__dirname,
'node_modules/@lightsparkdev/origin/src/components/Popover/index.ts',
),
};

return config;
},
};

export default nextConfig;
Loading
Loading