@printwithsynergy/artwork-pdf-editor 0.1.6 → 0.3.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.
Files changed (249) hide show
  1. package/LICENSE +62 -0
  2. package/README.md +63 -2
  3. package/dist/components/AccessibilityHintsPanel.d.ts +142 -0
  4. package/dist/components/AccessibilityHintsPanel.d.ts.map +1 -0
  5. package/dist/components/AccessibilityHintsPanel.js +158 -0
  6. package/dist/components/AccessibilityHintsPanel.js.map +1 -0
  7. package/dist/components/AnnotationOverlay.d.ts +142 -0
  8. package/dist/components/AnnotationOverlay.d.ts.map +1 -0
  9. package/dist/components/AnnotationOverlay.js +141 -0
  10. package/dist/components/AnnotationOverlay.js.map +1 -0
  11. package/dist/components/AnnotationsSidebar.d.ts +98 -0
  12. package/dist/components/AnnotationsSidebar.d.ts.map +1 -0
  13. package/dist/components/AnnotationsSidebar.js +100 -0
  14. package/dist/components/AnnotationsSidebar.js.map +1 -0
  15. package/dist/components/BarcodeGeneratorPanel.d.ts +58 -0
  16. package/dist/components/BarcodeGeneratorPanel.d.ts.map +1 -0
  17. package/dist/components/BarcodeGeneratorPanel.js +91 -0
  18. package/dist/components/BarcodeGeneratorPanel.js.map +1 -0
  19. package/dist/components/BraillePanel.d.ts +99 -0
  20. package/dist/components/BraillePanel.d.ts.map +1 -0
  21. package/dist/components/BraillePanel.js +221 -0
  22. package/dist/components/BraillePanel.js.map +1 -0
  23. package/dist/components/BrandAssetsPanel.d.ts +130 -0
  24. package/dist/components/BrandAssetsPanel.d.ts.map +1 -0
  25. package/dist/components/BrandAssetsPanel.js +125 -0
  26. package/dist/components/BrandAssetsPanel.js.map +1 -0
  27. package/dist/components/BrandConsistencyPanel.d.ts +140 -0
  28. package/dist/components/BrandConsistencyPanel.d.ts.map +1 -0
  29. package/dist/components/BrandConsistencyPanel.js +158 -0
  30. package/dist/components/BrandConsistencyPanel.js.map +1 -0
  31. package/dist/components/ComplianceFindingsPanel.d.ts +62 -0
  32. package/dist/components/ComplianceFindingsPanel.d.ts.map +1 -0
  33. package/dist/components/ComplianceFindingsPanel.js +118 -0
  34. package/dist/components/ComplianceFindingsPanel.js.map +1 -0
  35. package/dist/components/DesignSuggestionsPanel.d.ts +148 -0
  36. package/dist/components/DesignSuggestionsPanel.d.ts.map +1 -0
  37. package/dist/components/DesignSuggestionsPanel.js +154 -0
  38. package/dist/components/DesignSuggestionsPanel.js.map +1 -0
  39. package/dist/components/DielineParametersPanel.d.ts +62 -0
  40. package/dist/components/DielineParametersPanel.d.ts.map +1 -0
  41. package/dist/components/DielineParametersPanel.js +170 -0
  42. package/dist/components/DielineParametersPanel.js.map +1 -0
  43. package/dist/components/DielinePreview.d.ts +150 -0
  44. package/dist/components/DielinePreview.d.ts.map +1 -0
  45. package/dist/components/DielinePreview.js +146 -0
  46. package/dist/components/DielinePreview.js.map +1 -0
  47. package/dist/components/EditorApp.d.ts +39 -5
  48. package/dist/components/EditorApp.d.ts.map +1 -1
  49. package/dist/components/EditorApp.js +110 -5
  50. package/dist/components/EditorApp.js.map +1 -1
  51. package/dist/components/EditorCanvas.d.ts +51 -2
  52. package/dist/components/EditorCanvas.d.ts.map +1 -1
  53. package/dist/components/EditorCanvas.js +117 -48
  54. package/dist/components/EditorCanvas.js.map +1 -1
  55. package/dist/components/EmailNotifyPanel.d.ts +165 -0
  56. package/dist/components/EmailNotifyPanel.d.ts.map +1 -0
  57. package/dist/components/EmailNotifyPanel.js +211 -0
  58. package/dist/components/EmailNotifyPanel.js.map +1 -0
  59. package/dist/components/FileDropZone.d.ts +9 -1
  60. package/dist/components/FileDropZone.d.ts.map +1 -1
  61. package/dist/components/FileDropZone.js +53 -5
  62. package/dist/components/FileDropZone.js.map +1 -1
  63. package/dist/components/FoldEditorPanel.d.ts +68 -0
  64. package/dist/components/FoldEditorPanel.d.ts.map +1 -0
  65. package/dist/components/FoldEditorPanel.js +65 -0
  66. package/dist/components/FoldEditorPanel.js.map +1 -0
  67. package/dist/components/FoldPreviewOverlay.d.ts +48 -0
  68. package/dist/components/FoldPreviewOverlay.d.ts.map +1 -0
  69. package/dist/components/FoldPreviewOverlay.js +182 -0
  70. package/dist/components/FoldPreviewOverlay.js.map +1 -0
  71. package/dist/components/Gs1DigitalLinkPanel.d.ts +103 -0
  72. package/dist/components/Gs1DigitalLinkPanel.d.ts.map +1 -0
  73. package/dist/components/Gs1DigitalLinkPanel.js +199 -0
  74. package/dist/components/Gs1DigitalLinkPanel.js.map +1 -0
  75. package/dist/components/HistoryPanel.d.ts +39 -0
  76. package/dist/components/HistoryPanel.d.ts.map +1 -0
  77. package/dist/components/HistoryPanel.js +72 -0
  78. package/dist/components/HistoryPanel.js.map +1 -0
  79. package/dist/components/IccSoftProofOverlay.d.ts +67 -0
  80. package/dist/components/IccSoftProofOverlay.d.ts.map +1 -0
  81. package/dist/components/IccSoftProofOverlay.js +119 -0
  82. package/dist/components/IccSoftProofOverlay.js.map +1 -0
  83. package/dist/components/ImposePanel.d.ts +71 -0
  84. package/dist/components/ImposePanel.d.ts.map +1 -0
  85. package/dist/components/ImposePanel.js +127 -0
  86. package/dist/components/ImposePanel.js.map +1 -0
  87. package/dist/components/InksPanel.d.ts +61 -0
  88. package/dist/components/InksPanel.d.ts.map +1 -0
  89. package/dist/components/InksPanel.js +84 -0
  90. package/dist/components/InksPanel.js.map +1 -0
  91. package/dist/components/JobSetupPanel.d.ts +118 -0
  92. package/dist/components/JobSetupPanel.d.ts.map +1 -0
  93. package/dist/components/JobSetupPanel.js +169 -0
  94. package/dist/components/JobSetupPanel.js.map +1 -0
  95. package/dist/components/LayersPanel.d.ts.map +1 -1
  96. package/dist/components/LayersPanel.js +1 -0
  97. package/dist/components/LayersPanel.js.map +1 -1
  98. package/dist/components/MarkLibraryPanel.d.ts +131 -0
  99. package/dist/components/MarkLibraryPanel.d.ts.map +1 -0
  100. package/dist/components/MarkLibraryPanel.js +184 -0
  101. package/dist/components/MarkLibraryPanel.js.map +1 -0
  102. package/dist/components/MisEstimateButton.d.ts +73 -0
  103. package/dist/components/MisEstimateButton.d.ts.map +1 -0
  104. package/dist/components/MisEstimateButton.js +57 -0
  105. package/dist/components/MisEstimateButton.js.map +1 -0
  106. package/dist/components/NutritionPanel.d.ts +118 -0
  107. package/dist/components/NutritionPanel.d.ts.map +1 -0
  108. package/dist/components/NutritionPanel.js +169 -0
  109. package/dist/components/NutritionPanel.js.map +1 -0
  110. package/dist/components/PageNavigator.d.ts +26 -0
  111. package/dist/components/PageNavigator.d.ts.map +1 -0
  112. package/dist/components/PageNavigator.js +96 -0
  113. package/dist/components/PageNavigator.js.map +1 -0
  114. package/dist/components/PaletteManager.d.ts +32 -0
  115. package/dist/components/PaletteManager.d.ts.map +1 -0
  116. package/dist/components/PaletteManager.js +89 -0
  117. package/dist/components/PaletteManager.js.map +1 -0
  118. package/dist/components/PaletteToSpotPanel.d.ts +122 -0
  119. package/dist/components/PaletteToSpotPanel.d.ts.map +1 -0
  120. package/dist/components/PaletteToSpotPanel.js +160 -0
  121. package/dist/components/PaletteToSpotPanel.js.map +1 -0
  122. package/dist/components/PreflightAutoFixPanel.d.ts +110 -0
  123. package/dist/components/PreflightAutoFixPanel.d.ts.map +1 -0
  124. package/dist/components/PreflightAutoFixPanel.js +119 -0
  125. package/dist/components/PreflightAutoFixPanel.js.map +1 -0
  126. package/dist/components/PreflightDiffPanel.d.ts +127 -0
  127. package/dist/components/PreflightDiffPanel.d.ts.map +1 -0
  128. package/dist/components/PreflightDiffPanel.js +0 -0
  129. package/dist/components/PreflightDiffPanel.js.map +1 -0
  130. package/dist/components/ProcessRulesPanel.d.ts +81 -0
  131. package/dist/components/ProcessRulesPanel.d.ts.map +1 -0
  132. package/dist/components/ProcessRulesPanel.js +143 -0
  133. package/dist/components/ProcessRulesPanel.js.map +1 -0
  134. package/dist/components/SlackNotifyPanel.d.ts +139 -0
  135. package/dist/components/SlackNotifyPanel.d.ts.map +1 -0
  136. package/dist/components/SlackNotifyPanel.js +133 -0
  137. package/dist/components/SlackNotifyPanel.js.map +1 -0
  138. package/dist/components/SmartSpotMatchPanel.d.ts +143 -0
  139. package/dist/components/SmartSpotMatchPanel.d.ts.map +1 -0
  140. package/dist/components/SmartSpotMatchPanel.js +159 -0
  141. package/dist/components/SmartSpotMatchPanel.js.map +1 -0
  142. package/dist/components/SwatchesPicker.d.ts +83 -0
  143. package/dist/components/SwatchesPicker.d.ts.map +1 -0
  144. package/dist/components/SwatchesPicker.js +151 -0
  145. package/dist/components/SwatchesPicker.js.map +1 -0
  146. package/dist/components/TacOverlay.d.ts +47 -0
  147. package/dist/components/TacOverlay.d.ts.map +1 -0
  148. package/dist/components/TacOverlay.js +116 -0
  149. package/dist/components/TacOverlay.js.map +1 -0
  150. package/dist/components/TrapEditorPanel.d.ts +52 -0
  151. package/dist/components/TrapEditorPanel.d.ts.map +1 -0
  152. package/dist/components/TrapEditorPanel.js +64 -0
  153. package/dist/components/TrapEditorPanel.js.map +1 -0
  154. package/dist/components/TrapPreviewOverlay.d.ts +64 -0
  155. package/dist/components/TrapPreviewOverlay.d.ts.map +1 -0
  156. package/dist/components/TrapPreviewOverlay.js +120 -0
  157. package/dist/components/TrapPreviewOverlay.js.map +1 -0
  158. package/dist/components/VariantMatrixPanel.d.ts +61 -0
  159. package/dist/components/VariantMatrixPanel.d.ts.map +1 -0
  160. package/dist/components/VariantMatrixPanel.js +97 -0
  161. package/dist/components/VariantMatrixPanel.js.map +1 -0
  162. package/dist/components/VariantMatrixVersionPanel.d.ts +122 -0
  163. package/dist/components/VariantMatrixVersionPanel.d.ts.map +1 -0
  164. package/dist/components/VariantMatrixVersionPanel.js +162 -0
  165. package/dist/components/VariantMatrixVersionPanel.js.map +1 -0
  166. package/dist/components/WebhookNotifyPanel.d.ts +160 -0
  167. package/dist/components/WebhookNotifyPanel.d.ts.map +1 -0
  168. package/dist/components/WebhookNotifyPanel.js +100 -0
  169. package/dist/components/WebhookNotifyPanel.js.map +1 -0
  170. package/dist/components/WhiteUnderbasePanel.d.ts +107 -0
  171. package/dist/components/WhiteUnderbasePanel.d.ts.map +1 -0
  172. package/dist/components/WhiteUnderbasePanel.js +104 -0
  173. package/dist/components/WhiteUnderbasePanel.js.map +1 -0
  174. package/dist/data/dielines.json +35 -0
  175. package/dist/hooks/useEditorMode.d.ts +25 -5
  176. package/dist/hooks/useEditorMode.d.ts.map +1 -1
  177. package/dist/hooks/useEditorMode.js +18 -5
  178. package/dist/hooks/useEditorMode.js.map +1 -1
  179. package/dist/index.d.ts +49 -2
  180. package/dist/index.d.ts.map +1 -1
  181. package/dist/index.js +49 -2
  182. package/dist/index.js.map +1 -1
  183. package/dist/lens/dieline-overlay.d.ts +25 -0
  184. package/dist/lens/dieline-overlay.d.ts.map +1 -0
  185. package/dist/lens/dieline-overlay.js +50 -0
  186. package/dist/lens/dieline-overlay.js.map +1 -0
  187. package/dist/lens/index.d.ts +27 -0
  188. package/dist/lens/index.d.ts.map +1 -0
  189. package/dist/lens/index.js +28 -0
  190. package/dist/lens/index.js.map +1 -0
  191. package/dist/lens/preflight-findings.d.ts +21 -0
  192. package/dist/lens/preflight-findings.d.ts.map +1 -0
  193. package/dist/lens/preflight-findings.js +82 -0
  194. package/dist/lens/preflight-findings.js.map +1 -0
  195. package/dist/lib/barcode-scan.d.ts +154 -0
  196. package/dist/lib/barcode-scan.d.ts.map +1 -0
  197. package/dist/lib/barcode-scan.js +152 -0
  198. package/dist/lib/barcode-scan.js.map +1 -0
  199. package/dist/lib/color-math.d.ts +76 -0
  200. package/dist/lib/color-math.d.ts.map +1 -0
  201. package/dist/lib/color-math.js +96 -0
  202. package/dist/lib/color-math.js.map +1 -0
  203. package/dist/lib/dieline-template.d.ts +169 -0
  204. package/dist/lib/dieline-template.d.ts.map +1 -1
  205. package/dist/lib/dieline-template.js +229 -1
  206. package/dist/lib/dieline-template.js.map +1 -1
  207. package/dist/lib/editor-config.d.ts +384 -1
  208. package/dist/lib/editor-config.d.ts.map +1 -1
  209. package/dist/lib/editor-config.js +89 -2
  210. package/dist/lib/editor-config.js.map +1 -1
  211. package/dist/lib/fold-geometry.d.ts +144 -0
  212. package/dist/lib/fold-geometry.d.ts.map +1 -0
  213. package/dist/lib/fold-geometry.js +138 -0
  214. package/dist/lib/fold-geometry.js.map +1 -0
  215. package/dist/lib/merge-tokens.d.ts +81 -0
  216. package/dist/lib/merge-tokens.d.ts.map +1 -0
  217. package/dist/lib/merge-tokens.js +88 -0
  218. package/dist/lib/merge-tokens.js.map +1 -0
  219. package/dist/lib/palette-registry.d.ts +40 -0
  220. package/dist/lib/palette-registry.d.ts.map +1 -0
  221. package/dist/lib/palette-registry.js +49 -0
  222. package/dist/lib/palette-registry.js.map +1 -0
  223. package/dist/lib/panel-anchor.d.ts +101 -0
  224. package/dist/lib/panel-anchor.d.ts.map +1 -0
  225. package/dist/lib/panel-anchor.js +68 -0
  226. package/dist/lib/panel-anchor.js.map +1 -0
  227. package/dist/lib/preflight/checks.d.ts.map +1 -1
  228. package/dist/lib/preflight/checks.js +71 -0
  229. package/dist/lib/preflight/checks.js.map +1 -1
  230. package/dist/lib/preflight/types.d.ts.map +1 -1
  231. package/dist/lib/preflight/types.js +11 -0
  232. package/dist/lib/preflight/types.js.map +1 -1
  233. package/dist/lib/rasterize.d.ts +93 -0
  234. package/dist/lib/rasterize.d.ts.map +1 -0
  235. package/dist/lib/rasterize.js +117 -0
  236. package/dist/lib/rasterize.js.map +1 -0
  237. package/dist/lib/separations-registry.d.ts +99 -0
  238. package/dist/lib/separations-registry.d.ts.map +1 -0
  239. package/dist/lib/separations-registry.js +59 -0
  240. package/dist/lib/separations-registry.js.map +1 -0
  241. package/dist/lib/unwired.d.ts +29 -0
  242. package/dist/lib/unwired.d.ts.map +1 -0
  243. package/dist/lib/unwired.js +58 -0
  244. package/dist/lib/unwired.js.map +1 -0
  245. package/package.json +29 -11
  246. package/dist/components/SeparationsPanel.d.ts +0 -9
  247. package/dist/components/SeparationsPanel.d.ts.map +0 -1
  248. package/dist/components/SeparationsPanel.js +0 -168
  249. package/dist/components/SeparationsPanel.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -15,9 +15,56 @@ export { EditorApp, type EditorAppProps } from "./components/EditorApp";
15
15
  export type { CanvasObj } from "./components/EditorCanvas";
16
16
  export { TopBar, ArtworkPdfLogo, type TopBarProps, type TopBarButton } from "./components/TopBar";
17
17
  export { MobileToolDrawer, type MobileToolDrawerProps } from "./components/MobileToolDrawer";
18
+ export { HistoryPanel, type HistoryPanelProps } from "./components/HistoryPanel";
19
+ export { DielineParametersPanel, type DielineParameters, type DielineParametersPanelProps, } from "./components/DielineParametersPanel";
20
+ export { computeDielinePreviewLayout, DielinePreview, type DielinePreviewFoldConfig, type DielinePreviewFoldEdge, type DielinePreviewLaidOutHinge, type DielinePreviewLaidOutPanel, type DielinePreviewLayout, type DielinePreviewPanel, type DielinePreviewPanelMetadata, type DielinePreviewProps, } from "./components/DielinePreview";
21
+ export { TacOverlay, type TacOverlayProps } from "./components/TacOverlay";
22
+ export { TrapPreviewOverlay, type TrapPreviewFn, type TrapPreviewOperation, type TrapPreviewOverlayProps, } from "./components/TrapPreviewOverlay";
23
+ export { TrapEditorPanel, type TrapEditorPanelProps, type TrapEditorValue, } from "./components/TrapEditorPanel";
24
+ export { ImposePanel, type ImposePanelPreset, type ImposePanelProps, type ImposePanelValue, } from "./components/ImposePanel";
25
+ export { FoldPreviewOverlay, type FoldPreviewOverlayProps, } from "./components/FoldPreviewOverlay";
26
+ export { FoldEditorPanel, type FoldEditorEdge, type FoldEditorPanelProps, type FoldEditorPanelValue, } from "./components/FoldEditorPanel";
27
+ export { VariantMatrixPanel, type VariantMatrixPanelProps, type VariantMatrixPanelValue, type VariantMatrixPanelVariant, } from "./components/VariantMatrixPanel";
28
+ export { diffVariantMatrices, resolveSnapshot, type VariantMatrixDiffResult, type VariantMatrixModifiedVariant, type VariantMatrixSnapshot, VariantMatrixVersionPanel, type VariantMatrixVersionPanelProps, } from "./components/VariantMatrixVersionPanel";
29
+ export { filterMarks, groupMarksByCategory, MARK_CATEGORY_ORDER, type MarkCategory, MarkLibraryPanel, type MarkLibraryEntry, type MarkLibraryFilter, type MarkLibraryGroup, type MarkLibraryLoaderFn, type MarkLibraryPanelProps, } from "./components/MarkLibraryPanel";
30
+ export { composeSlackMessage, SLACK_NOTIFICATION_EVENT_LABELS, type SlackNotificationContext, type SlackNotificationEventKind, type SlackNotificationPayload, SlackNotifyPanel, type SlackNotifyFn, type SlackNotifyPanelProps, } from "./components/SlackNotifyPanel";
31
+ export { findingKey, indexFixSetsByFinding, PreflightAutoFixPanel, type PreflightAutoFixPanelProps, type PreflightFixLoaderFn, type PreflightFixSet, type PreflightFixSuggestion, } from "./components/PreflightAutoFixPanel";
32
+ export { type DeltaEQuality, deltaEQuality, formatDeltaE, isQueryReady, SmartSpotMatchPanel, type SmartSpotMatchPanelProps, type SpotMatch, type SpotMatchLoaderFn, type SpotMatchQuery, sortMatchesByDeltaE, } from "./components/SmartSpotMatchPanel";
33
+ export { DESIGN_SUGGESTION_CATEGORY_ORDER, DesignSuggestionsPanel, type DesignSuggestion, type DesignSuggestionCategory, type DesignSuggestionFilter, type DesignSuggestionGroup, type DesignSuggestionLoaderFn, type DesignSuggestionsPanelProps, filterDesignSuggestions, groupDesignSuggestionsByCategory, } from "./components/DesignSuggestionsPanel";
34
+ export { AnnotationsSidebar, type AnnotationsSidebarFilter, type AnnotationsSidebarProps, type AnnotationStatusFilter, filterAnnotationsForSidebar, sortAnnotationsByDate, } from "./components/AnnotationsSidebar";
35
+ export { BRAND_CONSISTENCY_SEVERITY_ORDER, BrandConsistencyPanel, type BrandConsistencyFilter, type BrandConsistencyFinding, type BrandConsistencyGroup, type BrandConsistencyLoaderFn, type BrandConsistencyPanelProps, type BrandConsistencySeverity, filterBrandConsistencyFindings, groupBrandConsistencyFindingsBySeverity, } from "./components/BrandConsistencyPanel";
36
+ export { composeWebhookEvent, WEBHOOK_NOTIFICATION_EVENT_LABELS, type WebhookNotificationContext, type WebhookNotificationEvent, type WebhookNotificationEventKind, type WebhookNotifyFn, WebhookNotifyPanel, type WebhookNotifyPanelProps, } from "./components/WebhookNotifyPanel";
37
+ export { composeEmailMessage, EMAIL_NOTIFICATION_EVENT_LABELS, type EmailNotificationContext, type EmailNotificationEventKind, type EmailNotificationPayload, EmailNotifyPanel, type EmailNotifyFn, type EmailNotifyPanelProps, parseEmailList, } from "./components/EmailNotifyPanel";
38
+ export { ACCESSIBILITY_SEVERITY_ORDER, AccessibilityHintsPanel, type AccessibilityCategory, type AccessibilityFilter, type AccessibilityFinding, type AccessibilityGroup, type AccessibilityHintsLoaderFn, type AccessibilityHintsPanelProps, type AccessibilitySeverity, filterAccessibilityFindings, groupAccessibilityFindingsBySeverity, } from "./components/AccessibilityHintsPanel";
39
+ export { type PaletteColor, type PaletteCoverageSummary, PaletteToSpotPanel, type PaletteToSpotPanelProps, type PaletteToSpotRow, type SpotCommitFn, summarizePaletteCoverage, } from "./components/PaletteToSpotPanel";
40
+ export { buildFoldScene, type FoldHingeAxis, type FoldPanelQuad, type FoldSceneSpec, } from "./lib/fold-geometry";
41
+ export { PaletteManager, type PaletteManagerProps } from "./components/PaletteManager";
42
+ export { SwatchesPicker, type SwatchesPickerProps, type Spot, type SpotSearchFn, type SpotLibrary, } from "./components/SwatchesPicker";
43
+ export { InksPanel, type Ink, type InksLoaderFn, type InksPanelProps, } from "./components/InksPanel";
44
+ export { DEFAULT_WHITE_UNDERBASE_SPEC, validateWhiteUnderbaseSpec, WhiteUnderbasePanel, type WhiteUnderbaseGeneratorFn, type WhiteUnderbasePanelProps, type WhiteUnderbaseResult, type WhiteUnderbaseSpec, } from "./components/WhiteUnderbasePanel";
45
+ export { ComplianceFindingsPanel, type ComplianceFinding, type ComplianceFindingsPanelProps, type ComplianceLoaderFn, } from "./components/ComplianceFindingsPanel";
46
+ export { groupRulesByProcess, ProcessRulesPanel, type ProcessRule, type ProcessRuleGroup, type ProcessRulesLoaderFn, type ProcessRulesPanelProps, } from "./components/ProcessRulesPanel";
47
+ export { diffPreflightFindings, PreflightDiffPanel, type PreflightDiffPanelProps, type PreflightDiffResult, type PreflightFinding, type PreflightSnapshotInput, resolveBaselineSnapshot, } from "./components/PreflightDiffPanel";
48
+ export { BRAND_ASSET_KIND_ORDER, BrandAssetsPanel, type BrandAsset, type BrandAssetFilter, type BrandAssetGroup, type BrandAssetKind, type BrandAssetsPanelProps, filterBrandAssets, groupBrandAssetsByKind, } from "./components/BrandAssetsPanel";
49
+ export { AnnotationOverlay, type AnnotationBaseInput, type AnnotationOverlayAnnotation, type AnnotationOverlayProps, type AreaAnnotationInput, describeAnnotation, isPointInsideAnnotation, type PointAnnotationInput, type TextAnnotationInput, visibleAnnotations, } from "./components/AnnotationOverlay";
50
+ export { IccSoftProofOverlay, type IccSoftProofLoaderFn, type IccSoftProofOverlayProps, type IccSoftProofResult, type SoftProofIntent, } from "./components/IccSoftProofOverlay";
51
+ export { BarcodeGeneratorPanel, type BarcodeGeneratorPanelProps, type BarcodeRenderFn, type BarcodeRenderResult, } from "./components/BarcodeGeneratorPanel";
52
+ export { composeGs1DigitalLink, DEFAULT_GS1_DOMAIN, Gs1DigitalLinkPanel, isValidGs1Ai17, type Gs1AiEntry, type Gs1DigitalLinkPanelProps, type Gs1DigitalLinkResult, } from "./components/Gs1DigitalLinkPanel";
53
+ export { composeNutritionFacts, FDA_DAILY_VALUES, NutritionPanel, type NutritionFacts, type NutritionPanelProps, type NutritionPanelSpec, type NutritionRow, } from "./components/NutritionPanel";
54
+ export { BraillePanel, composeBraille, MARBURG_MEDIUM, type BrailleCell, type BrailleComposeResult, type BraillePanelProps, } from "./components/BraillePanel";
55
+ export { extractMergeTokens, mergeAllRows, mergeRow, validateMergeManifest, type MergeRow, type MergeValidationResult, } from "./lib/merge-tokens";
56
+ export { JobSetupPanel, type JobSetupPanelProps, type JobSetupValue, type PreflightContext, preflightContextOf, type PrintProcess, type SubstrateClass, type SubstrateFinish, } from "./components/JobSetupPanel";
57
+ export { MisEstimateButton, type MisEstimateButtonProps, type MisEstimateManifest, type MisSubmitFn, } from "./components/MisEstimateButton";
18
58
  export { useIsMobile } from "./hooks/useIsMobile";
19
59
  export { type EditorMode, useEditorMode } from "./hooks/useEditorMode";
20
- export { type EditorConfig, DEFAULT_EDITOR_CONFIG, BASIC_MODE_OVERRIDES, PRO_MODE_OVERRIDES, resolveConfig, } from "./lib/editor-config";
21
- export { type DielineTemplate, TEMPLATES, getDefaultTemplate, getTemplateById, templateToInitialState, } from "./lib/dieline-template";
60
+ export { type EditorConfig, type FeatureKey, type PaletteId, DEFAULT_EDITOR_CONFIG, BASIC_MODE_OVERRIDES, PRO_MODE_OVERRIDES, resolveConfig, showFeature, isPanelVisible, } from "./lib/editor-config";
61
+ export { markUnwired, isUnwired } from "./lib/unwired";
62
+ export { type EditorDielinePanel, isPointInPanel, findPanelAt, getPanelById, resolveAnchorPanel, } from "./lib/panel-anchor";
63
+ export { type EditorSeparation, type RegisterSpotOptions, registerSpot, unregisterSpot, findSpotByColor, listSpots, } from "./lib/separations-registry";
64
+ export { hexToCmyk, parseHex, rgbToCmyk, tacPercent, } from "./lib/color-math";
65
+ export { rasterizeStage, sampleTACFromImageData, tacForHex, } from "./lib/rasterize";
66
+ export { type BarcodeDetection, type BarcodeFormat, type BarcodeValidation, ALL_BARCODE_FORMATS, scanBarcodes, validateBarcode, validateEAN13, validateGS1128, validateUPCA, } from "./lib/barcode-scan";
67
+ export { type PaletteRegistryEntry, PALETTE_REGISTRY, PALETTE_IDS, } from "./lib/palette-registry";
68
+ export { type DielineTemplate, type Page, type TemplateSet, TEMPLATES, TEMPLATE_SETS, dielineToPage, getDefaultTemplate, getTemplateById, getTemplateSetById, templateToInitialState, templateToPage, templatesToPages, templateSetToPages, } from "./lib/dieline-template";
22
69
  export { DEFAULT_BLEED_MM, parseBleed, formatBleed } from "./lib/bleed";
23
70
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","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AAK,kBAAkB,EACvB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,SAAS,GACV,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,cAAc,EACd,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,SAAS,EACT,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -15,9 +15,56 @@
15
15
  export { EditorApp } from "./components/EditorApp";
16
16
  export { TopBar, ArtworkPdfLogo } from "./components/TopBar";
17
17
  export { MobileToolDrawer } from "./components/MobileToolDrawer";
18
+ export { HistoryPanel } from "./components/HistoryPanel";
19
+ export { DielineParametersPanel, } from "./components/DielineParametersPanel";
20
+ export { computeDielinePreviewLayout, DielinePreview, } from "./components/DielinePreview";
21
+ export { TacOverlay } from "./components/TacOverlay";
22
+ export { TrapPreviewOverlay, } from "./components/TrapPreviewOverlay";
23
+ export { TrapEditorPanel, } from "./components/TrapEditorPanel";
24
+ export { ImposePanel, } from "./components/ImposePanel";
25
+ export { FoldPreviewOverlay, } from "./components/FoldPreviewOverlay";
26
+ export { FoldEditorPanel, } from "./components/FoldEditorPanel";
27
+ export { VariantMatrixPanel, } from "./components/VariantMatrixPanel";
28
+ export { diffVariantMatrices, resolveSnapshot, VariantMatrixVersionPanel, } from "./components/VariantMatrixVersionPanel";
29
+ export { filterMarks, groupMarksByCategory, MARK_CATEGORY_ORDER, MarkLibraryPanel, } from "./components/MarkLibraryPanel";
30
+ export { composeSlackMessage, SLACK_NOTIFICATION_EVENT_LABELS, SlackNotifyPanel, } from "./components/SlackNotifyPanel";
31
+ export { findingKey, indexFixSetsByFinding, PreflightAutoFixPanel, } from "./components/PreflightAutoFixPanel";
32
+ export { deltaEQuality, formatDeltaE, isQueryReady, SmartSpotMatchPanel, sortMatchesByDeltaE, } from "./components/SmartSpotMatchPanel";
33
+ export { DESIGN_SUGGESTION_CATEGORY_ORDER, DesignSuggestionsPanel, filterDesignSuggestions, groupDesignSuggestionsByCategory, } from "./components/DesignSuggestionsPanel";
34
+ export { AnnotationsSidebar, filterAnnotationsForSidebar, sortAnnotationsByDate, } from "./components/AnnotationsSidebar";
35
+ export { BRAND_CONSISTENCY_SEVERITY_ORDER, BrandConsistencyPanel, filterBrandConsistencyFindings, groupBrandConsistencyFindingsBySeverity, } from "./components/BrandConsistencyPanel";
36
+ export { composeWebhookEvent, WEBHOOK_NOTIFICATION_EVENT_LABELS, WebhookNotifyPanel, } from "./components/WebhookNotifyPanel";
37
+ export { composeEmailMessage, EMAIL_NOTIFICATION_EVENT_LABELS, EmailNotifyPanel, parseEmailList, } from "./components/EmailNotifyPanel";
38
+ export { ACCESSIBILITY_SEVERITY_ORDER, AccessibilityHintsPanel, filterAccessibilityFindings, groupAccessibilityFindingsBySeverity, } from "./components/AccessibilityHintsPanel";
39
+ export { PaletteToSpotPanel, summarizePaletteCoverage, } from "./components/PaletteToSpotPanel";
40
+ export { buildFoldScene, } from "./lib/fold-geometry";
41
+ export { PaletteManager } from "./components/PaletteManager";
42
+ export { SwatchesPicker, } from "./components/SwatchesPicker";
43
+ export { InksPanel, } from "./components/InksPanel";
44
+ export { DEFAULT_WHITE_UNDERBASE_SPEC, validateWhiteUnderbaseSpec, WhiteUnderbasePanel, } from "./components/WhiteUnderbasePanel";
45
+ export { ComplianceFindingsPanel, } from "./components/ComplianceFindingsPanel";
46
+ export { groupRulesByProcess, ProcessRulesPanel, } from "./components/ProcessRulesPanel";
47
+ export { diffPreflightFindings, PreflightDiffPanel, resolveBaselineSnapshot, } from "./components/PreflightDiffPanel";
48
+ export { BRAND_ASSET_KIND_ORDER, BrandAssetsPanel, filterBrandAssets, groupBrandAssetsByKind, } from "./components/BrandAssetsPanel";
49
+ export { AnnotationOverlay, describeAnnotation, isPointInsideAnnotation, visibleAnnotations, } from "./components/AnnotationOverlay";
50
+ export { IccSoftProofOverlay, } from "./components/IccSoftProofOverlay";
51
+ export { BarcodeGeneratorPanel, } from "./components/BarcodeGeneratorPanel";
52
+ export { composeGs1DigitalLink, DEFAULT_GS1_DOMAIN, Gs1DigitalLinkPanel, isValidGs1Ai17, } from "./components/Gs1DigitalLinkPanel";
53
+ export { composeNutritionFacts, FDA_DAILY_VALUES, NutritionPanel, } from "./components/NutritionPanel";
54
+ export { BraillePanel, composeBraille, MARBURG_MEDIUM, } from "./components/BraillePanel";
55
+ export { extractMergeTokens, mergeAllRows, mergeRow, validateMergeManifest, } from "./lib/merge-tokens";
56
+ export { JobSetupPanel, preflightContextOf, } from "./components/JobSetupPanel";
57
+ export { MisEstimateButton, } from "./components/MisEstimateButton";
18
58
  export { useIsMobile } from "./hooks/useIsMobile";
19
59
  export { useEditorMode } from "./hooks/useEditorMode";
20
- export { DEFAULT_EDITOR_CONFIG, BASIC_MODE_OVERRIDES, PRO_MODE_OVERRIDES, resolveConfig, } from "./lib/editor-config";
21
- export { TEMPLATES, getDefaultTemplate, getTemplateById, templateToInitialState, } from "./lib/dieline-template";
60
+ export { DEFAULT_EDITOR_CONFIG, BASIC_MODE_OVERRIDES, PRO_MODE_OVERRIDES, resolveConfig, showFeature, isPanelVisible, } from "./lib/editor-config";
61
+ export { markUnwired, isUnwired } from "./lib/unwired";
62
+ export { isPointInPanel, findPanelAt, getPanelById, resolveAnchorPanel, } from "./lib/panel-anchor";
63
+ export { registerSpot, unregisterSpot, findSpotByColor, listSpots, } from "./lib/separations-registry";
64
+ export { hexToCmyk, parseHex, rgbToCmyk, tacPercent, } from "./lib/color-math";
65
+ export { rasterizeStage, sampleTACFromImageData, tacForHex, } from "./lib/rasterize";
66
+ export { ALL_BARCODE_FORMATS, scanBarcodes, validateBarcode, validateEAN13, validateGS1128, validateUPCA, } from "./lib/barcode-scan";
67
+ export { PALETTE_REGISTRY, PALETTE_IDS, } from "./lib/palette-registry";
68
+ export { TEMPLATES, TEMPLATE_SETS, dielineToPage, getDefaultTemplate, getTemplateById, getTemplateSetById, templateToInitialState, templateToPage, templatesToPages, templateSetToPages, } from "./lib/dieline-template";
22
69
  export { DEFAULT_BLEED_MM, parseBleed, formatBleed } from "./lib/bleed";
23
70
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAuB,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAuC,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAA8B,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAmB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAEL,qBAAqB,EACrB,oBAAoB,EACpB,kBA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AO,EAGL,YAAY,EACZ,cAAc,EACd,eAAe,EACf,SAAS,GACV,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,cAAc,EACd,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,gBAAgB,EAChB,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,SAAS,EACT,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { OverlayPlugin } from "@printwithsynergy/lens-pdf";
2
+ import type { DielineTemplate } from "../lib/dieline-template";
3
+ /**
4
+ * Build a lens-pdf overlay plugin that renders the dieline trim + bleed
5
+ * lines over a rendered PDF. Mount via `register()` or pass into
6
+ * `<LensPDF plugins={...}>`.
7
+ *
8
+ * `pages` maps 1-indexed PDF page numbers to the dieline template +
9
+ * effective bleed used to render that page. The same artwork-pdf
10
+ * dieline-template helpers used during editing produce the values to
11
+ * pass here.
12
+ *
13
+ * @public
14
+ */
15
+ export declare function dielineOverlayPlugin(opts: {
16
+ pages: Record<number, {
17
+ template: DielineTemplate;
18
+ bleedMm: number;
19
+ }>;
20
+ /** Override the trim-line color. Defaults to artwork-pdf brand orange. */
21
+ trimColor?: string;
22
+ /** Override the bleed-line color. Defaults to lens-pdf cyan. */
23
+ bleedColor?: string;
24
+ }): OverlayPlugin;
25
+ //# sourceMappingURL=dieline-overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dieline-overlay.d.ts","sourceRoot":"","sources":["../../src/lens/dieline-overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAiB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAM/D;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,eAAe,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtE,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,aAAa,CA+DhB"}
@@ -0,0 +1,50 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ "use client";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ const MM_TO_PT = 2.83465;
5
+ const DIELINE_STROKE = "#fc5102";
6
+ const BLEED_STROKE = "#0ea5e9";
7
+ /**
8
+ * Build a lens-pdf overlay plugin that renders the dieline trim + bleed
9
+ * lines over a rendered PDF. Mount via `register()` or pass into
10
+ * `<LensPDF plugins={...}>`.
11
+ *
12
+ * `pages` maps 1-indexed PDF page numbers to the dieline template +
13
+ * effective bleed used to render that page. The same artwork-pdf
14
+ * dieline-template helpers used during editing produce the values to
15
+ * pass here.
16
+ *
17
+ * @public
18
+ */
19
+ export function dielineOverlayPlugin(opts) {
20
+ return {
21
+ id: "artworkpdf.overlay.dieline",
22
+ version: "1.0.0",
23
+ slot: "overlay.canvas",
24
+ mount(ctx) {
25
+ const entry = opts.pages[ctx.page];
26
+ if (!entry)
27
+ return null;
28
+ const { template, bleedMm } = entry;
29
+ const pageDims = ctx.document.pageDimensions[ctx.page - 1];
30
+ if (!pageDims)
31
+ return null;
32
+ const trimColor = opts.trimColor ?? DIELINE_STROKE;
33
+ const bleedColor = opts.bleedColor ?? BLEED_STROKE;
34
+ // Page = trim + 2 × bleed. Convert to PDF points using PDF dims.
35
+ // PDF point origin is bottom-left; lens-pdf overlay coordinates
36
+ // are top-left (CSS-style), so we mirror y to match.
37
+ const pageWidthPt = pageDims.width;
38
+ const pageHeightPt = pageDims.height;
39
+ const bleedPt = bleedMm * MM_TO_PT;
40
+ const trimWidthPt = template.trimBox.width * MM_TO_PT;
41
+ const trimHeightPt = template.trimBox.height * MM_TO_PT;
42
+ return (_jsxs("svg", { width: "100%", height: "100%", viewBox: `0 0 ${pageWidthPt} ${pageHeightPt}`, preserveAspectRatio: "none", style: {
43
+ position: "absolute",
44
+ inset: 0,
45
+ pointerEvents: "none",
46
+ }, "aria-hidden": true, children: [_jsx("title", { children: "Dieline overlay" }), _jsx("rect", { x: 0, y: 0, width: pageWidthPt, height: pageHeightPt, fill: "none", stroke: bleedColor, strokeWidth: 1, strokeDasharray: "6 4" }), _jsx("rect", { x: bleedPt, y: bleedPt, width: trimWidthPt, height: trimHeightPt, fill: "none", stroke: trimColor, strokeWidth: 1 })] }));
47
+ },
48
+ };
49
+ }
50
+ //# sourceMappingURL=dieline-overlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dieline-overlay.js","sourceRoot":"","sources":["../../src/lens/dieline-overlay.tsx"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,YAAY,CAAC;;AAIb,MAAM,QAAQ,GAAG,OAAO,CAAC;AACzB,MAAM,cAAc,GAAG,SAAS,CAAC;AACjC,MAAM,YAAY,GAAG,SAAS,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAMpC;IACC,OAAO;QACL,EAAE,EAAE,4BAA4B;QAChC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,gBAAgB;QACtB,KAAK,CAAC,GAAkB;YACtB,MAAM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AAe,EAAC,KAAK,GACrB,EAEF,eACE,CAAC,EAAE,OAAO,EACV,CAAC,EAAE,OAAO,EACV,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,CAAC,GACd,IACE,CACP,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * artwork-pdf plugins for `@printwithsynergy/lens-pdf`.
3
+ *
4
+ * Use this subpath only when you also have `lens-pdf` installed.
5
+ * Hosts that mount the editor without lens-pdf don't need this.
6
+ *
7
+ * Quick start:
8
+ *
9
+ * ```tsx
10
+ * import { LensPDF } from "@printwithsynergy/lens-pdf";
11
+ * import { dielineOverlayPlugin, preflightFindingsPlugin }
12
+ * from "@printwithsynergy/artwork-pdf-editor/lens";
13
+ *
14
+ * <LensPDF
15
+ * pdfUrl={blobUrl}
16
+ * plugins={[
17
+ * dielineOverlayPlugin({ pages: { 1: { template: tpl, bleedMm: 3.175 } } }),
18
+ * preflightFindingsPlugin({ report }),
19
+ * ]}
20
+ * />
21
+ * ```
22
+ *
23
+ * @packageDocumentation
24
+ */
25
+ export { dielineOverlayPlugin } from "./dieline-overlay";
26
+ export { preflightFindingsPlugin } from "./preflight-findings";
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lens/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,28 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ /**
3
+ * artwork-pdf plugins for `@printwithsynergy/lens-pdf`.
4
+ *
5
+ * Use this subpath only when you also have `lens-pdf` installed.
6
+ * Hosts that mount the editor without lens-pdf don't need this.
7
+ *
8
+ * Quick start:
9
+ *
10
+ * ```tsx
11
+ * import { LensPDF } from "@printwithsynergy/lens-pdf";
12
+ * import { dielineOverlayPlugin, preflightFindingsPlugin }
13
+ * from "@printwithsynergy/artwork-pdf-editor/lens";
14
+ *
15
+ * <LensPDF
16
+ * pdfUrl={blobUrl}
17
+ * plugins={[
18
+ * dielineOverlayPlugin({ pages: { 1: { template: tpl, bleedMm: 3.175 } } }),
19
+ * preflightFindingsPlugin({ report }),
20
+ * ]}
21
+ * />
22
+ * ```
23
+ *
24
+ * @packageDocumentation
25
+ */
26
+ export { dielineOverlayPlugin } from "./dieline-overlay";
27
+ export { preflightFindingsPlugin } from "./preflight-findings";
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lens/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { PanelPlugin } from "@printwithsynergy/lens-pdf";
2
+ import type { PreflightReport } from "../lib/preflight/types";
3
+ /**
4
+ * Build a lens-pdf panel plugin that surfaces an artwork-pdf
5
+ * `PreflightReport` in the right-hand panel. Reuses the same preflight
6
+ * types the editor's pre-render PreflightPanel consumed.
7
+ *
8
+ * Pass the latest report when registering (or via a closure that re-reads
9
+ * a host store). Each issue renders as a clickable row; in this first
10
+ * pass we just list them — wiring to canvas-highlight (an OverlayItem
11
+ * round-trip) comes in a follow-up.
12
+ *
13
+ * @public
14
+ */
15
+ export declare function preflightFindingsPlugin(opts: {
16
+ /** The artwork-pdf preflight report to display. */
17
+ report: PreflightReport | null;
18
+ /** Optional click handler. Receives the issue + 1-indexed page. */
19
+ onIssueClick?: (issue: PreflightReport["issues"][number]) => void;
20
+ }): PanelPlugin;
21
+ //# sourceMappingURL=preflight-findings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preflight-findings.d.ts","sourceRoot":"","sources":["../../src/lens/preflight-findings.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,4BAA4B,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAO9D;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,mDAAmD;IACnD,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,mEAAmE;IACnE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;CACnE,GAAG,WAAW,CAuHd"}
@@ -0,0 +1,82 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-or-later
2
+ "use client";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ const PANEL_BG = "#1a0f08";
5
+ const BORDER = "#3d1a00";
6
+ const BRAND = "#fc5102";
7
+ const MUTED = "#888";
8
+ /**
9
+ * Build a lens-pdf panel plugin that surfaces an artwork-pdf
10
+ * `PreflightReport` in the right-hand panel. Reuses the same preflight
11
+ * types the editor's pre-render PreflightPanel consumed.
12
+ *
13
+ * Pass the latest report when registering (or via a closure that re-reads
14
+ * a host store). Each issue renders as a clickable row; in this first
15
+ * pass we just list them — wiring to canvas-highlight (an OverlayItem
16
+ * round-trip) comes in a follow-up.
17
+ *
18
+ * @public
19
+ */
20
+ export function preflightFindingsPlugin(opts) {
21
+ return {
22
+ id: "artworkpdf.panel.preflight",
23
+ version: "1.0.0",
24
+ slot: "panel.right",
25
+ title: "Preflight",
26
+ order: 10,
27
+ mount(_ctx) {
28
+ const report = opts.report;
29
+ if (!report) {
30
+ return (_jsx("div", { style: {
31
+ padding: "0.75rem",
32
+ fontSize: "0.78rem",
33
+ color: MUTED,
34
+ background: PANEL_BG,
35
+ height: "100%",
36
+ }, children: "No preflight report attached to this document." }));
37
+ }
38
+ return (_jsxs("div", { style: {
39
+ background: PANEL_BG,
40
+ color: "#ddd",
41
+ height: "100%",
42
+ display: "flex",
43
+ flexDirection: "column",
44
+ fontSize: "0.8rem",
45
+ }, children: [_jsxs("header", { style: {
46
+ padding: "0.5rem 0.75rem",
47
+ borderBottom: `1px solid ${BORDER}`,
48
+ display: "flex",
49
+ alignItems: "center",
50
+ gap: "0.5rem",
51
+ }, children: [_jsx("span", { style: {
52
+ width: 8,
53
+ height: 8,
54
+ borderRadius: 4,
55
+ background: report.passed ? "#2e7d32" : "#b71c1c",
56
+ }, "aria-hidden": true }), _jsx("span", { style: { fontWeight: 600 }, children: report.passed ? "Passed" : "Issues found" }), _jsxs("span", { style: { marginLeft: "auto", color: MUTED, fontSize: "0.7rem" }, children: [report.issues.length, " issue", report.issues.length === 1 ? "" : "s"] })] }), _jsxs("ul", { style: {
57
+ flex: 1,
58
+ overflowY: "auto",
59
+ listStyle: "none",
60
+ margin: 0,
61
+ padding: 0,
62
+ }, children: [report.issues.length === 0 && (_jsx("li", { style: { padding: "0.75rem", color: MUTED }, children: "No issues." })), report.issues.map((issue, i) => (_jsx("li", { style: { borderBottom: `1px solid ${BORDER}` }, children: _jsxs("button", { type: "button", onClick: () => opts.onIssueClick?.(issue), style: {
63
+ width: "100%",
64
+ background: "transparent",
65
+ border: "none",
66
+ padding: "0.55rem 0.75rem",
67
+ textAlign: "left",
68
+ color: "#ddd",
69
+ cursor: opts.onIssueClick ? "pointer" : "default",
70
+ fontFamily: "inherit",
71
+ fontSize: "0.78rem",
72
+ }, children: [_jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [_jsx("span", { style: {
73
+ fontSize: "0.6rem",
74
+ letterSpacing: "0.08em",
75
+ textTransform: "uppercase",
76
+ color: issue.severity === "block" ? "#ef5350" : "#ffb74d",
77
+ fontWeight: 600,
78
+ }, children: issue.severity }), _jsx("span", { style: { color: BRAND, fontSize: "0.7rem", fontFamily: "monospace" }, children: issue.checkName }), issue.page !== undefined && (_jsxs("span", { style: { marginLeft: "auto", color: MUTED, fontSize: "0.7rem" }, children: ["p.", issue.page] }))] }), _jsx("div", { style: { marginTop: "0.2rem", lineHeight: 1.4 }, children: issue.message })] }) }, `${issue.checkName}-${i}`)))] })] }));
79
+ },
80
+ };
81
+ }
82
+ //# sourceMappingURL=preflight-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preflight-findings.js","sourceRoot":"","sources":["../../src/lens/preflight-findings.tsx"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,YAAY,CAAC;;AAIb,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,MAAM,MAAM,GAAG,SAAS,CAAC;AACzB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,KAAK,GAAG,MAAM,CAAC;AAErB;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAKvC;IACC,OAAO;QACL,EAAE,EAAE,4BAA4B;QAChC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,EAAE;QACT,KAAK,CAAC,IAAmB;YACvB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAC3B,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO,CACL,cACE,KAAK,EAAE;wBACL,OAAO,EAAE,SAAS;wBAClB,QAAQ,EAAE,SAAS;wBACnB,KAAK,EAAE,KAAK;wBACZ,UAAU,EAAE,QAAQ;wBACpB,MAAM,EAAE,MAAM;qBACf,+DAGG,CACP,CAAC;YACJ,CAAC;YAED,OAAO,CACL,eACE,KAAK,EAAE;oBACL,UAAU,EAAE,QAAQ;oBACpB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;oB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YAAG,KAAK,CAAC,OAAO,GAAO,IACpE,IAtCF,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,EAAE,CAuC7B,CACN,CAAC,IACC,IACD,CACP,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,154 @@
1
+ /**
2
+ * G2v — barcode detection + validation for the live editor and the
3
+ * file-upload preflight pass.
4
+ *
5
+ * Two responsibilities, intentionally separated:
6
+ *
7
+ * 1. **Validation** ({@link validateEAN13}, {@link validateUPCA},
8
+ * {@link validateGS1128}, {@link validateBarcode}) — pure
9
+ * check-digit / structural validators against the canonical
10
+ * specifications. No third-party dep; the standard mod-10 and
11
+ * AI-parsing algorithms are short and well-defined. These are
12
+ * what the `barcode_validation` preflight rule consults to flag
13
+ * malformed codes the user has already declared on the canvas
14
+ * (or that future G2g (Wave 3) will generate).
15
+ *
16
+ * 2. **Detection** ({@link scanBarcodes}) — visual scanning of a
17
+ * rasterized canvas / image to find barcodes the user pasted in
18
+ * or imported from artwork PDFs. The detector is currently a
19
+ * stub that always resolves to an empty array; a follow-up will
20
+ * add `jsqr` for QR codes (smallest footprint ~40 kB minified)
21
+ * and either `quagga2` (~200 kB, mature, EAN-13/UPC-A/Code-128)
22
+ * or `@undecaf/zbar-wasm` (~600 kB, more accurate) for linear
23
+ * barcodes after a perf+accuracy bake-off. Until then this
24
+ * module ships the type contract and validator surface so the
25
+ * preflight switch + rule defaults can land cleanly without
26
+ * pulling in a heavyweight dep on day one.
27
+ */
28
+ /**
29
+ * Barcode symbology / format. Listed are the formats covered by the
30
+ * `barcode_validation` rule. Other formats (Data Matrix, ITF-14,
31
+ * Code 39, …) can be added incrementally; each gets its own
32
+ * validator + entry in {@link validateBarcode}.
33
+ *
34
+ * @public
35
+ */
36
+ export type BarcodeFormat = "EAN-13" | "UPC-A" | "GS1-128" | "QR";
37
+ /**
38
+ * Canonical list of every {@link BarcodeFormat} the module supports.
39
+ * Exported so UI surfaces ({@link import("../components/BarcodeGeneratorPanel").BarcodeGeneratorPanel}
40
+ * default dropdown, host-supplied filters, contract tests) don't have
41
+ * to redeclare the list and drift out of sync when a new format is
42
+ * added to the union.
43
+ *
44
+ * @public
45
+ */
46
+ export declare const ALL_BARCODE_FORMATS: readonly BarcodeFormat[];
47
+ /**
48
+ * Result of detecting one barcode on a rasterized image.
49
+ *
50
+ * `bounds` and `confidence` are optional because different detectors
51
+ * surface them with different fidelity (jsQR returns a 4-corner
52
+ * polygon, zbar returns a rect, quagga returns both); callers should
53
+ * defensively check for `undefined`.
54
+ *
55
+ * @public
56
+ */
57
+ export type BarcodeDetection = {
58
+ /** The decoded payload, e.g. `"4006381333931"` for an EAN-13 or a
59
+ * URL for a QR code. */
60
+ code: string;
61
+ /** Detected symbology. */
62
+ format: BarcodeFormat;
63
+ /** Pixel-space bounding box on the source ImageData, if the
64
+ * detector reported one. */
65
+ bounds?: {
66
+ x: number;
67
+ y: number;
68
+ width: number;
69
+ height: number;
70
+ };
71
+ /** Detector confidence in `[0, 1]`, if reported. */
72
+ confidence?: number;
73
+ };
74
+ /**
75
+ * Result of validating one barcode against its format-specific spec.
76
+ *
77
+ * `reason` is populated only when `valid` is `false` — a short
78
+ * human-readable explanation suitable for surfacing in the
79
+ * preflight panel.
80
+ *
81
+ * @public
82
+ */
83
+ export type BarcodeValidation = {
84
+ valid: boolean;
85
+ reason?: string;
86
+ };
87
+ /**
88
+ * EAN-13 check-digit validation.
89
+ *
90
+ * EAN-13 is 13 digits; the 13th is a mod-10 checksum over the first
91
+ * 12 with alternating weights (1, 3, 1, 3, …). Returns `true` iff the
92
+ * input is exactly 13 ASCII digits and the checksum matches.
93
+ *
94
+ * @public
95
+ */
96
+ export declare function validateEAN13(code: string): boolean;
97
+ /**
98
+ * UPC-A check-digit validation.
99
+ *
100
+ * UPC-A is 12 digits; the 12th is a mod-10 checksum over the first
101
+ * 11 with weights (3, 1, 3, 1, …). Returns `true` iff the input is
102
+ * exactly 12 ASCII digits and the checksum matches.
103
+ *
104
+ * @public
105
+ */
106
+ export declare function validateUPCA(code: string): boolean;
107
+ /**
108
+ * GS1-128 structural validation.
109
+ *
110
+ * GS1-128 (formerly UCC/EAN-128) encodes structured data using
111
+ * Application Identifiers — each AI is 2–4 digits followed by a
112
+ * data field of AI-dependent length. A full validator would require
113
+ * the AI table; the shippable approximation here checks that:
114
+ *
115
+ * - The payload contains only printable ASCII (no control chars
116
+ * other than the `<GS>` `0x1D` separator used between
117
+ * variable-length data fields).
118
+ * - The payload starts with at least two digits (the first AI).
119
+ * - The payload is non-empty and ≤ 48 chars (real-world
120
+ * GS1-128 codes rarely exceed this).
121
+ *
122
+ * Returns `true` for plausibly-structured payloads. False positives
123
+ * are intentional — preflight is a sanity check, not a parser.
124
+ *
125
+ * @public
126
+ */
127
+ export declare function validateGS1128(code: string): boolean;
128
+ /**
129
+ * Format-aware validator that dispatches to the right per-format
130
+ * check. QR codes pass when the payload is non-empty (the symbol
131
+ * itself carries a Reed-Solomon checksum the detector already
132
+ * verified before emitting the {@link BarcodeDetection}).
133
+ *
134
+ * @public
135
+ */
136
+ export declare function validateBarcode(detection: BarcodeDetection): BarcodeValidation;
137
+ /**
138
+ * Visual barcode detection from a rasterized image.
139
+ *
140
+ * Currently a stub: returns an empty array regardless of input. The
141
+ * real implementation lands in a follow-up that adds a barcode
142
+ * detection library (likely `jsqr` for QR + `quagga2` for linear).
143
+ * Until then, callers see no false positives, and the
144
+ * {@link validateBarcode} surface stays usable for codes the user
145
+ * (or G2g, Wave 3) declares directly on the canvas.
146
+ *
147
+ * The async signature is forward-compatible — most barcode
148
+ * detectors are async (decoder workers, WASM init), so callers
149
+ * don't need to refactor when the real detector lands.
150
+ *
151
+ * @public
152
+ */
153
+ export declare function scanBarcodes(_imageData: ImageData): Promise<BarcodeDetection[]>;
154
+ //# sourceMappingURL=barcode-scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barcode-scan.d.ts","sourceRoot":"","sources":["../../src/lib/barcode-scan.ts"],"names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