Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Keep patch/hash-sensitive files stable across OSes
*.patch text eol=lf
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ A **Pagination Table** & **Scroll List** component suite for [CRUD operation][1]

1. [Spinner](https://mobx-restful-shadcn.idea2.app/r/spinner.json)
2. [Loading](https://mobx-restful-shadcn.idea2.app/r/loading.json)
3. [Badge Bar](https://mobx-restful-shadcn.idea2.app/r/badge-bar.json)
4. [Badge Input](https://mobx-restful-shadcn.idea2.app/r/badge-input.json)
5. [Image Preview](https://mobx-restful-shadcn.idea2.app/r/image-preview.json)
6. [File Preview](https://mobx-restful-shadcn.idea2.app/r/file-preview.json)
7. [File Picker](https://mobx-restful-shadcn.idea2.app/r/file-picker.json)
8. [File Uploader](https://mobx-restful-shadcn.idea2.app/r/file-uploader.json)
9. [Form Field](https://mobx-restful-shadcn.idea2.app/r/form-field.json)
10. [Range Input](https://mobx-restful-shadcn.idea2.app/r/range-input.json)
11. [Array Field](https://mobx-restful-shadcn.idea2.app/r/array-field.json)
12. [REST Form](https://mobx-restful-shadcn.idea2.app/r/rest-form.json)
13. [REST Form Modal](https://mobx-restful-shadcn.idea2.app/r/rest-form-modal.json)
14. [Pager](https://mobx-restful-shadcn.idea2.app/r/pager.json)
15. [REST Table](https://mobx-restful-shadcn.idea2.app/r/rest-table.json)
16. [Scroll Boundary](https://mobx-restful-shadcn.idea2.app/r/scroll-boundary.json)
17. [Scroll List](https://mobx-restful-shadcn.idea2.app/r/scroll-list.json)
18. [Searchable Input](https://mobx-restful-shadcn.idea2.app/r/searchable-input.json)
19. [Editor](https://mobx-restful-shadcn.idea2.app/r/editor.json)
3. [Type Writer](https://mobx-restful-shadcn.idea2.app/r/type-writer.json)
4. [Copy Overlay](https://mobx-restful-shadcn.idea2.app/r/copy-overlay.json)
5. [Command Line](https://mobx-restful-shadcn.idea2.app/r/command-line.json)
6. [Badge Bar](https://mobx-restful-shadcn.idea2.app/r/badge-bar.json)
7. [Badge Input](https://mobx-restful-shadcn.idea2.app/r/badge-input.json)
8. [Image Preview](https://mobx-restful-shadcn.idea2.app/r/image-preview.json)
9. [File Preview](https://mobx-restful-shadcn.idea2.app/r/file-preview.json)
10. [File Picker](https://mobx-restful-shadcn.idea2.app/r/file-picker.json)
11. [File Uploader](https://mobx-restful-shadcn.idea2.app/r/file-uploader.json)
12. [Form Field](https://mobx-restful-shadcn.idea2.app/r/form-field.json)
13. [Range Input](https://mobx-restful-shadcn.idea2.app/r/range-input.json)
14. [Array Field](https://mobx-restful-shadcn.idea2.app/r/array-field.json)
15. [REST Form](https://mobx-restful-shadcn.idea2.app/r/rest-form.json)
16. [REST Form Modal](https://mobx-restful-shadcn.idea2.app/r/rest-form-modal.json)
17. [Pager](https://mobx-restful-shadcn.idea2.app/r/pager.json)
18. [REST Table](https://mobx-restful-shadcn.idea2.app/r/rest-table.json)
19. [Scroll Boundary](https://mobx-restful-shadcn.idea2.app/r/scroll-boundary.json)
20. [Scroll List](https://mobx-restful-shadcn.idea2.app/r/scroll-list.json)
21. [Searchable Input](https://mobx-restful-shadcn.idea2.app/r/searchable-input.json)
22. [Editor](https://mobx-restful-shadcn.idea2.app/r/editor.json)

## Installation

Expand Down Expand Up @@ -90,13 +93,15 @@ module.exports = {
{
"scripts": {
"install": "shadcn-helper install",
"dev": "next dev",
"dev": "next dev --webpack",
"build": "next build --webpack",
"start": "next start"
},
}
}
```

[ ] Turbopack may be supported after https://github.com/vercel/next.js/pull/94274 merged

###### Vercel

Build command should be `npm run install && npm run build`.
Expand Down
6 changes: 6 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@
@apply bg-background text-foreground;
}
}

/*
* ShadcnX CLI sets up the source rule for Tailwind CSS to include Git ignored components.
* Don't modify this rule if you are not a Tailwind CSS expert.
*/
@source "../components/ui/**/*.{js,jsx,ts,tsx,mdx,vue,svelte}";
24 changes: 24 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ComponentCard } from "@/components/example/component-card";
import { ArrayFieldExample } from "@/registry/new-york/blocks/array-field/example";
import { BadgeBarExample } from "@/registry/new-york/blocks/badge-bar/example";
import { BadgeInputExample } from "@/registry/new-york/blocks/badge-input/example";
import { CommandLineExample } from "@/registry/new-york/blocks/command-line/example";
import { CopyOverlayExample } from "@/registry/new-york/blocks/copy-overlay/example";
import { EditorExample } from "@/registry/new-york/blocks/editor/example";
import { FilePickerExample } from "@/registry/new-york/blocks/file-picker/example";
import { FilePreviewExample } from "@/registry/new-york/blocks/file-preview/example";
Expand All @@ -14,6 +16,7 @@ import { RestTableExample } from "@/registry/new-york/blocks/rest-table/example"
import { ScrollBoundaryExample } from "@/registry/new-york/blocks/scroll-boundary/example";
import { ScrollListExample } from "@/registry/new-york/blocks/scroll-list/example";
import { SpinnerExample } from "@/registry/new-york/blocks/spinner/example";
import { TypeWriterExample } from "@/registry/new-york/blocks/type-writer/example";

export default function Home() {
return (
Expand All @@ -34,6 +37,27 @@ export default function Home() {
<SpinnerExample />
</ComponentCard>

<ComponentCard
name="type-writer"
description="A Typewriter Text component with Interval-based Character Rendering."
>
<TypeWriterExample />
</ComponentCard>

<ComponentCard
name="copy-overlay"
description="A Copy-to-Clipboard overlay component that captures click interactions from its parent area."
>
<CopyOverlayExample />
</ComponentCard>

<ComponentCard
name="command-line"
description="A Command Line prompt component with Typing Animation & Click-to-Copy behavior."
>
<CommandLineExample />
</ComponentCard>

<ComponentCard
name="loading"
description="A full-screen loading overlay component with spinner and customizable message."
Expand Down
26 changes: 0 additions & 26 deletions babel.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions components/example/component-card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FC, PropsWithChildren } from "react";

import { CommandLine } from "@/registry/new-york/blocks/command-line";
import { OpenInV0Button } from "./open-in-v0-button";

export type ComponentCardProps = PropsWithChildren<{
Expand All @@ -19,6 +20,9 @@ export const ComponentCard: FC<ComponentCardProps> = ({
<h2 className="text-sm text-muted-foreground sm:pl-3">{description}</h2>
<OpenInV0Button name={name} className="w-fit" />
</div>
<CommandLine className="w-full">
{`npx shadcn-helper add @mobx-restful-shadcn/${name}`}
</CommandLine>
<div className={`flex items-center justify-center ${minHeight} relative`}>
{children}
</div>
Expand Down
27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "mobx-restful-shadcn",
"version": "1.7.2",
"version": "1.8.0",
"private": true,
"scripts": {
"prepare": "husky",
"install": "shadcn-helper install",
"test": "lint-staged && git add .",
"registry:build": "shadcn build",
"dev": "next dev",
"dev": "next dev --webpack",
"build": "npm run registry:build && next build --webpack",
"start": "next start"
},
Expand All @@ -16,37 +16,34 @@
"clsx": "^2.1.1",
"edkit": "^1.2.7",
"lodash.debounce": "^4.0.8",
"lucide-react": "^1.21.0",
"lucide-react": "^1.23.0",
"mobx": "^6.16.1",
"mobx-i18n": "^0.7.2",
"mobx-i18n": "^0.7.5",
"mobx-react": "^9.2.2",
"mobx-react-helper": "^0.5.1",
"mobx-restful": "^2.1.4",
"next": "^16.2.9",
"radix-ui": "^1.6.0",
"next": "^16.2.10",
"radix-ui": "^1.6.1",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"tailwind-merge": "^3.6.0",
"tw-animate-css": "^1.4.0",
"web-utility": "^4.6.6"
"web-utility": "^4.7.2"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.29.7",
"@babel/plugin-transform-typescript": "^7.29.7",
"@babel/preset-react": "^7.29.7",
"@biomejs/biome": "^2.5.1",
"@biomejs/biome": "^2.5.2",
"@octokit/openapi-types": "^27.0.0",
"@tailwindcss/postcss": "^4.3.1",
"@tailwindcss/postcss": "^4.3.2",
"@types/lodash.debounce": "^4.0.9",
"@types/node": "^24.13.2",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"husky": "^9.1.7",
"lint-staged": "^17.0.8",
"mobx-github": "^0.6.2",
"shadcn": "^4.11.0",
"shadcn-helper": "^0.5.6",
"tailwindcss": "^4.3.1",
"shadcn": "^4.13.0",
"shadcn-helper": "^0.5.9",
"tailwindcss": "^4.3.2",
"typescript": "~5.9.3"
},
"lint-staged": {
Expand Down
44 changes: 44 additions & 0 deletions patches/next@16.2.10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/dist/build/swc/options.js b/dist/build/swc/options.js
index 8da2935285177960b5ae8b89070979d720ad15af..6ef9ed8f5594a750a57a8058d052824ae5a33000 100644
--- a/dist/build/swc/options.js
+++ b/dist/build/swc/options.js
@@ -57,7 +57,8 @@ function getParserOptions({ filename, jsConfig, ...rest }) {
...rest,
syntax: hasTsSyntax ? 'typescript' : 'ecmascript',
dynamicImport: true,
- decorators: enableDecorators,
+ // Always parse decorators so TC39 syntax works without experimentalDecorators.
+ decorators: true,
// Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags.
[hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile,
importAssertions: true
@@ -102,6 +103,7 @@ function getBaseSWCOptions({ filename, jest, development, hasReactRefresh, globa
} : {},
legacyDecorator: enableDecorators,
decoratorMetadata: emitDecoratorMetadata,
+ decoratorVersion: '2022-03',
useDefineForClassFields: useDefineForClassFields,
react: {
importSource: (jsConfig == null ? void 0 : (_jsConfig_compilerOptions4 = jsConfig.compilerOptions) == null ? void 0 : _jsConfig_compilerOptions4.jsxImportSource) ?? ((compilerOptions == null ? void 0 : compilerOptions.emotion) && !isReactServerLayer ? '@emotion/react' : 'react'),
diff --git a/dist/esm/build/swc/options.js b/dist/esm/build/swc/options.js
index 6d5922e81ec99e3f89028bcad957492994b02d77..d25cf9575771d1fccc301e36545f3387101da3ef 100644
--- a/dist/esm/build/swc/options.js
+++ b/dist/esm/build/swc/options.js
@@ -26,7 +26,8 @@ export function getParserOptions({ filename, jsConfig, ...rest }) {
...rest,
syntax: hasTsSyntax ? 'typescript' : 'ecmascript',
dynamicImport: true,
- decorators: enableDecorators,
+ // Always parse decorators so TC39 syntax works without experimentalDecorators.
+ decorators: true,
// Exclude regular TypeScript files from React transformation to prevent e.g. generic parameters and angle-bracket type assertion from being interpreted as JSX tags.
[hasTsSyntax ? 'tsx' : 'jsx']: !isTSFile,
importAssertions: true
@@ -71,6 +72,7 @@ function getBaseSWCOptions({ filename, jest, development, hasReactRefresh, globa
} : {},
legacyDecorator: enableDecorators,
decoratorMetadata: emitDecoratorMetadata,
+ decoratorVersion: '2022-03',
useDefineForClassFields: useDefineForClassFields,
react: {
importSource: (jsConfig == null ? void 0 : (_jsConfig_compilerOptions4 = jsConfig.compilerOptions) == null ? void 0 : _jsConfig_compilerOptions4.jsxImportSource) ?? ((compilerOptions == null ? void 0 : compilerOptions.emotion) && !isReactServerLayer ? '@emotion/react' : 'react'),
Loading