Add SAM Smart Select and AI Inpaint tools to miniPaint

New features:
- Smart Select tool: Click to select objects using SAM (Segment Anything)
- AI Inpaint tool: Edit selected regions with text prompts

Changes:
- frontend/src/js/tools/smart_select.js: SAM-powered selection tool
- frontend/src/js/tools/ai_inpaint.js: AI inpainting with prompt dialog
- frontend/src/js/services/api.js: API service for backend communication
- frontend/src/js/config.js: Register new tools
- frontend/src/css/layout.css: Tool icon styles
- frontend/images/icons/: SVG icons for new tools
- backend/app/routers/tools.py: New base64 API endpoints
- frontend/Dockerfile: Updated for miniPaint build
- frontend/nginx.conf: Added /api prefix proxy
This commit is contained in:
Claude
2026-01-26 17:34:20 +00:00
parent d009a2c0f0
commit bf83ecc8ad
10 changed files with 816 additions and 5 deletions
+8 -5
View File
@@ -3,22 +3,25 @@ FROM node:20-alpine as build
WORKDIR /app
# Copy package files
COPY package.json ./
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
RUN npm ci
# Copy source
COPY . .
# Build app
# Build webpack bundle
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built files
COPY --from=build /app/dist /usr/share/nginx/html
# Copy all static files needed by miniPaint
COPY --from=build /app/index.html /usr/share/nginx/html/
COPY --from=build /app/dist /usr/share/nginx/html/dist
COPY --from=build /app/images /usr/share/nginx/html/images
COPY --from=build /app/src/css /usr/share/nginx/html/src/css
# Copy nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf