Gerador de etiqueta ZPL raster (canvas, dithering, mídia e margens)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
No ZPL or printer-raster code exists in this repo yet, so start from the package export map to see where a ./print subpath would attach, then read the referenced AC implementation paths (apps/web/src/lib/canvas-to-zpl-image.ts:22-26 for the zpl-image/DPI setup, :55-60 for mmToDots, :86-103 for the ^MT/^MN/^GFA assembly) to understand the target behaviour. Treat the five acceptance boxes as the test plan: dot conversion, media flags, explicit no-CORS error, one shared raster for preview and ZPL, and monotonic black-pixel counts across thresholds. The rasterizer must be injected rather than tied to Konva, which is the main design decision to settle before writing code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Versão: @codeatlasdev/ui 4.6.0 · código lido em main (950628f2) · classe: lacuna (migração do AC)
Problema
O AC depende deste comportamento hoje e a lib não o oferece. Sem ele, a migração perde qualidade no desktop, no mobile ou no PWA.
O que a lib já oferece (para não duplicar) e o que falta
(leitura de origin/main) sem ZPL nem raster de impressora. ./code é CodeSnippet (syntax highlight), não impressão.
Referência no AC
Caminhos do repo AC (repo privado, só caminho):
apps/web/src/lib/canvas-to-zpl-image.ts:22-26 (zpl-image, DPI 203, PIXEL_RATIO), :55-60 (mmToDots), :86-103 (buildZpl com ^MTT/^MTD, ^MNY/^MNM/^MNN, ^GFA), :213 (black: 50, notrim); components/label-editor/label-preview-panel.tsx:18-19 (captureCanvasAsPng); routes/_app/etiquetas.placas.editor.$id.tsx (export JPEG em pixelRatio).
Defeitos do AC (verificados por leitura do código): (leitura) ver F-06.
Proposta
subpath ./print com toZplRaster(canvas, { widthMm, heightMm, dpi: 203, media: 'gap'|'black_mark'|'continuous', method: 'thermal_transfer'|'direct_thermal', threshold: 50 }) e previewLabel(canvas), injetando o rasterizador (não acoplar Konva).
Critério de aceite (testável)
- Para 100 mm × 50 mm a 203 dpi,
mmToDots(100)= 799 emmToDots(50)= 400. -
media: 'gap'gera^MNY;media: 'black_mark'gera^MNM;media: 'continuous'gera^MNN. - Canvas com imagem de origem sem CORS lança erro explícito ("imagem sem CORS") e não produz ZPL vazio.
- Preview PNG e ZPL vêm do mesmo raster (mesmo hash de bytes).
-
threshold50 e 200 mudam o número de pixels pretos de forma monotônica.
Mãe: #1089
- Ngôn ngữ chính
- TypeScript
- Star
- 6
- Fork
- 3
- Merge trung bình
- 5 giờ 21 phút
- Pull request đã merge (30 ngày)
- 378
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codeatlasdev/ui
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
codeatlasdev/ui#1340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:a11y area:components bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
codeatlasdev/ui#1336 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
codeatlasdev/ui#1329 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
codeatlasdev/ui#1292 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:components enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
codeatlasdev/ui#1198 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codeatlasdev/ui
Issue tương tự
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
sandbox-quantum/switch#2163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automated issue report
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/dashboard kind/bug QA/dev-automation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug pydanty:is-working
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pydantic/pydantic-ai#13939 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
self-host
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
funmusicplace/mirlo#2625 ·
Maintainer thường phản hồi trong vòng 1 ngày