@printwithsynergy/artwork-pdf-editor 0.2.0 → 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 (236) hide show
  1. package/LICENSE +62 -0
  2. package/dist/components/AccessibilityHintsPanel.d.ts +142 -0
  3. package/dist/components/AccessibilityHintsPanel.d.ts.map +1 -0
  4. package/dist/components/AccessibilityHintsPanel.js +158 -0
  5. package/dist/components/AccessibilityHintsPanel.js.map +1 -0
  6. package/dist/components/AnnotationOverlay.d.ts +142 -0
  7. package/dist/components/AnnotationOverlay.d.ts.map +1 -0
  8. package/dist/components/AnnotationOverlay.js +141 -0
  9. package/dist/components/AnnotationOverlay.js.map +1 -0
  10. package/dist/components/AnnotationsSidebar.d.ts +98 -0
  11. package/dist/components/AnnotationsSidebar.d.ts.map +1 -0
  12. package/dist/components/AnnotationsSidebar.js +100 -0
  13. package/dist/components/AnnotationsSidebar.js.map +1 -0
  14. package/dist/components/BarcodeGeneratorPanel.d.ts +58 -0
  15. package/dist/components/BarcodeGeneratorPanel.d.ts.map +1 -0
  16. package/dist/components/BarcodeGeneratorPanel.js +91 -0
  17. package/dist/components/BarcodeGeneratorPanel.js.map +1 -0
  18. package/dist/components/BraillePanel.d.ts +99 -0
  19. package/dist/components/BraillePanel.d.ts.map +1 -0
  20. package/dist/components/BraillePanel.js +221 -0
  21. package/dist/components/BraillePanel.js.map +1 -0
  22. package/dist/components/BrandAssetsPanel.d.ts +130 -0
  23. package/dist/components/BrandAssetsPanel.d.ts.map +1 -0
  24. package/dist/components/BrandAssetsPanel.js +125 -0
  25. package/dist/components/BrandAssetsPanel.js.map +1 -0
  26. package/dist/components/BrandConsistencyPanel.d.ts +140 -0
  27. package/dist/components/BrandConsistencyPanel.d.ts.map +1 -0
  28. package/dist/components/BrandConsistencyPanel.js +158 -0
  29. package/dist/components/BrandConsistencyPanel.js.map +1 -0
  30. package/dist/components/ComplianceFindingsPanel.d.ts +62 -0
  31. package/dist/components/ComplianceFindingsPanel.d.ts.map +1 -0
  32. package/dist/components/ComplianceFindingsPanel.js +118 -0
  33. package/dist/components/ComplianceFindingsPanel.js.map +1 -0
  34. package/dist/components/DesignSuggestionsPanel.d.ts +148 -0
  35. package/dist/components/DesignSuggestionsPanel.d.ts.map +1 -0
  36. package/dist/components/DesignSuggestionsPanel.js +154 -0
  37. package/dist/components/DesignSuggestionsPanel.js.map +1 -0
  38. package/dist/components/DielineParametersPanel.d.ts +62 -0
  39. package/dist/components/DielineParametersPanel.d.ts.map +1 -0
  40. package/dist/components/DielineParametersPanel.js +170 -0
  41. package/dist/components/DielineParametersPanel.js.map +1 -0
  42. package/dist/components/DielinePreview.d.ts +150 -0
  43. package/dist/components/DielinePreview.d.ts.map +1 -0
  44. package/dist/components/DielinePreview.js +146 -0
  45. package/dist/components/DielinePreview.js.map +1 -0
  46. package/dist/components/EditorApp.d.ts +18 -3
  47. package/dist/components/EditorApp.d.ts.map +1 -1
  48. package/dist/components/EditorApp.js +42 -7
  49. package/dist/components/EditorApp.js.map +1 -1
  50. package/dist/components/EditorCanvas.d.ts +31 -2
  51. package/dist/components/EditorCanvas.d.ts.map +1 -1
  52. package/dist/components/EditorCanvas.js +97 -16
  53. package/dist/components/EditorCanvas.js.map +1 -1
  54. package/dist/components/EmailNotifyPanel.d.ts +165 -0
  55. package/dist/components/EmailNotifyPanel.d.ts.map +1 -0
  56. package/dist/components/EmailNotifyPanel.js +211 -0
  57. package/dist/components/EmailNotifyPanel.js.map +1 -0
  58. package/dist/components/FileDropZone.d.ts +9 -1
  59. package/dist/components/FileDropZone.d.ts.map +1 -1
  60. package/dist/components/FileDropZone.js +53 -5
  61. package/dist/components/FileDropZone.js.map +1 -1
  62. package/dist/components/FoldEditorPanel.d.ts +68 -0
  63. package/dist/components/FoldEditorPanel.d.ts.map +1 -0
  64. package/dist/components/FoldEditorPanel.js +65 -0
  65. package/dist/components/FoldEditorPanel.js.map +1 -0
  66. package/dist/components/FoldPreviewOverlay.d.ts +48 -0
  67. package/dist/components/FoldPreviewOverlay.d.ts.map +1 -0
  68. package/dist/components/FoldPreviewOverlay.js +182 -0
  69. package/dist/components/FoldPreviewOverlay.js.map +1 -0
  70. package/dist/components/Gs1DigitalLinkPanel.d.ts +103 -0
  71. package/dist/components/Gs1DigitalLinkPanel.d.ts.map +1 -0
  72. package/dist/components/Gs1DigitalLinkPanel.js +199 -0
  73. package/dist/components/Gs1DigitalLinkPanel.js.map +1 -0
  74. package/dist/components/HistoryPanel.d.ts +39 -0
  75. package/dist/components/HistoryPanel.d.ts.map +1 -0
  76. package/dist/components/HistoryPanel.js +72 -0
  77. package/dist/components/HistoryPanel.js.map +1 -0
  78. package/dist/components/IccSoftProofOverlay.d.ts +67 -0
  79. package/dist/components/IccSoftProofOverlay.d.ts.map +1 -0
  80. package/dist/components/IccSoftProofOverlay.js +119 -0
  81. package/dist/components/IccSoftProofOverlay.js.map +1 -0
  82. package/dist/components/ImposePanel.d.ts +71 -0
  83. package/dist/components/ImposePanel.d.ts.map +1 -0
  84. package/dist/components/ImposePanel.js +127 -0
  85. package/dist/components/ImposePanel.js.map +1 -0
  86. package/dist/components/InksPanel.d.ts +61 -0
  87. package/dist/components/InksPanel.d.ts.map +1 -0
  88. package/dist/components/InksPanel.js +84 -0
  89. package/dist/components/InksPanel.js.map +1 -0
  90. package/dist/components/JobSetupPanel.d.ts +118 -0
  91. package/dist/components/JobSetupPanel.d.ts.map +1 -0
  92. package/dist/components/JobSetupPanel.js +169 -0
  93. package/dist/components/JobSetupPanel.js.map +1 -0
  94. package/dist/components/LayersPanel.d.ts.map +1 -1
  95. package/dist/components/LayersPanel.js +1 -0
  96. package/dist/components/LayersPanel.js.map +1 -1
  97. package/dist/components/MarkLibraryPanel.d.ts +131 -0
  98. package/dist/components/MarkLibraryPanel.d.ts.map +1 -0
  99. package/dist/components/MarkLibraryPanel.js +184 -0
  100. package/dist/components/MarkLibraryPanel.js.map +1 -0
  101. package/dist/components/MisEstimateButton.d.ts +73 -0
  102. package/dist/components/MisEstimateButton.d.ts.map +1 -0
  103. package/dist/components/MisEstimateButton.js +57 -0
  104. package/dist/components/MisEstimateButton.js.map +1 -0
  105. package/dist/components/NutritionPanel.d.ts +118 -0
  106. package/dist/components/NutritionPanel.d.ts.map +1 -0
  107. package/dist/components/NutritionPanel.js +169 -0
  108. package/dist/components/NutritionPanel.js.map +1 -0
  109. package/dist/components/PageNavigator.d.ts.map +1 -1
  110. package/dist/components/PageNavigator.js +6 -1
  111. package/dist/components/PageNavigator.js.map +1 -1
  112. package/dist/components/PaletteManager.d.ts +32 -0
  113. package/dist/components/PaletteManager.d.ts.map +1 -0
  114. package/dist/components/PaletteManager.js +89 -0
  115. package/dist/components/PaletteManager.js.map +1 -0
  116. package/dist/components/PaletteToSpotPanel.d.ts +122 -0
  117. package/dist/components/PaletteToSpotPanel.d.ts.map +1 -0
  118. package/dist/components/PaletteToSpotPanel.js +160 -0
  119. package/dist/components/PaletteToSpotPanel.js.map +1 -0
  120. package/dist/components/PreflightAutoFixPanel.d.ts +110 -0
  121. package/dist/components/PreflightAutoFixPanel.d.ts.map +1 -0
  122. package/dist/components/PreflightAutoFixPanel.js +119 -0
  123. package/dist/components/PreflightAutoFixPanel.js.map +1 -0
  124. package/dist/components/PreflightDiffPanel.d.ts +127 -0
  125. package/dist/components/PreflightDiffPanel.d.ts.map +1 -0
  126. package/dist/components/PreflightDiffPanel.js +0 -0
  127. package/dist/components/PreflightDiffPanel.js.map +1 -0
  128. package/dist/components/ProcessRulesPanel.d.ts +81 -0
  129. package/dist/components/ProcessRulesPanel.d.ts.map +1 -0
  130. package/dist/components/ProcessRulesPanel.js +143 -0
  131. package/dist/components/ProcessRulesPanel.js.map +1 -0
  132. package/dist/components/SlackNotifyPanel.d.ts +139 -0
  133. package/dist/components/SlackNotifyPanel.d.ts.map +1 -0
  134. package/dist/components/SlackNotifyPanel.js +133 -0
  135. package/dist/components/SlackNotifyPanel.js.map +1 -0
  136. package/dist/components/SmartSpotMatchPanel.d.ts +143 -0
  137. package/dist/components/SmartSpotMatchPanel.d.ts.map +1 -0
  138. package/dist/components/SmartSpotMatchPanel.js +159 -0
  139. package/dist/components/SmartSpotMatchPanel.js.map +1 -0
  140. package/dist/components/SwatchesPicker.d.ts +83 -0
  141. package/dist/components/SwatchesPicker.d.ts.map +1 -0
  142. package/dist/components/SwatchesPicker.js +151 -0
  143. package/dist/components/SwatchesPicker.js.map +1 -0
  144. package/dist/components/TacOverlay.d.ts +47 -0
  145. package/dist/components/TacOverlay.d.ts.map +1 -0
  146. package/dist/components/TacOverlay.js +116 -0
  147. package/dist/components/TacOverlay.js.map +1 -0
  148. package/dist/components/TrapEditorPanel.d.ts +52 -0
  149. package/dist/components/TrapEditorPanel.d.ts.map +1 -0
  150. package/dist/components/TrapEditorPanel.js +64 -0
  151. package/dist/components/TrapEditorPanel.js.map +1 -0
  152. package/dist/components/TrapPreviewOverlay.d.ts +64 -0
  153. package/dist/components/TrapPreviewOverlay.d.ts.map +1 -0
  154. package/dist/components/TrapPreviewOverlay.js +120 -0
  155. package/dist/components/TrapPreviewOverlay.js.map +1 -0
  156. package/dist/components/VariantMatrixPanel.d.ts +61 -0
  157. package/dist/components/VariantMatrixPanel.d.ts.map +1 -0
  158. package/dist/components/VariantMatrixPanel.js +97 -0
  159. package/dist/components/VariantMatrixPanel.js.map +1 -0
  160. package/dist/components/VariantMatrixVersionPanel.d.ts +122 -0
  161. package/dist/components/VariantMatrixVersionPanel.d.ts.map +1 -0
  162. package/dist/components/VariantMatrixVersionPanel.js +162 -0
  163. package/dist/components/VariantMatrixVersionPanel.js.map +1 -0
  164. package/dist/components/WebhookNotifyPanel.d.ts +160 -0
  165. package/dist/components/WebhookNotifyPanel.d.ts.map +1 -0
  166. package/dist/components/WebhookNotifyPanel.js +100 -0
  167. package/dist/components/WebhookNotifyPanel.js.map +1 -0
  168. package/dist/components/WhiteUnderbasePanel.d.ts +107 -0
  169. package/dist/components/WhiteUnderbasePanel.d.ts.map +1 -0
  170. package/dist/components/WhiteUnderbasePanel.js +104 -0
  171. package/dist/components/WhiteUnderbasePanel.js.map +1 -0
  172. package/dist/hooks/useEditorMode.d.ts +25 -5
  173. package/dist/hooks/useEditorMode.d.ts.map +1 -1
  174. package/dist/hooks/useEditorMode.js +18 -5
  175. package/dist/hooks/useEditorMode.js.map +1 -1
  176. package/dist/index.d.ts +49 -2
  177. package/dist/index.d.ts.map +1 -1
  178. package/dist/index.js +49 -2
  179. package/dist/index.js.map +1 -1
  180. package/dist/lens/preflight-findings.d.ts.map +1 -1
  181. package/dist/lens/preflight-findings.js.map +1 -1
  182. package/dist/lib/barcode-scan.d.ts +154 -0
  183. package/dist/lib/barcode-scan.d.ts.map +1 -0
  184. package/dist/lib/barcode-scan.js +152 -0
  185. package/dist/lib/barcode-scan.js.map +1 -0
  186. package/dist/lib/color-math.d.ts +76 -0
  187. package/dist/lib/color-math.d.ts.map +1 -0
  188. package/dist/lib/color-math.js +96 -0
  189. package/dist/lib/color-math.js.map +1 -0
  190. package/dist/lib/dieline-template.d.ts +87 -0
  191. package/dist/lib/dieline-template.d.ts.map +1 -1
  192. package/dist/lib/dieline-template.js +163 -0
  193. package/dist/lib/dieline-template.js.map +1 -1
  194. package/dist/lib/editor-config.d.ts +384 -0
  195. package/dist/lib/editor-config.d.ts.map +1 -1
  196. package/dist/lib/editor-config.js +89 -0
  197. package/dist/lib/editor-config.js.map +1 -1
  198. package/dist/lib/fold-geometry.d.ts +144 -0
  199. package/dist/lib/fold-geometry.d.ts.map +1 -0
  200. package/dist/lib/fold-geometry.js +138 -0
  201. package/dist/lib/fold-geometry.js.map +1 -0
  202. package/dist/lib/merge-tokens.d.ts +81 -0
  203. package/dist/lib/merge-tokens.d.ts.map +1 -0
  204. package/dist/lib/merge-tokens.js +88 -0
  205. package/dist/lib/merge-tokens.js.map +1 -0
  206. package/dist/lib/palette-registry.d.ts +40 -0
  207. package/dist/lib/palette-registry.d.ts.map +1 -0
  208. package/dist/lib/palette-registry.js +49 -0
  209. package/dist/lib/palette-registry.js.map +1 -0
  210. package/dist/lib/panel-anchor.d.ts +101 -0
  211. package/dist/lib/panel-anchor.d.ts.map +1 -0
  212. package/dist/lib/panel-anchor.js +68 -0
  213. package/dist/lib/panel-anchor.js.map +1 -0
  214. package/dist/lib/preflight/checks.d.ts.map +1 -1
  215. package/dist/lib/preflight/checks.js +71 -0
  216. package/dist/lib/preflight/checks.js.map +1 -1
  217. package/dist/lib/preflight/types.d.ts.map +1 -1
  218. package/dist/lib/preflight/types.js +11 -0
  219. package/dist/lib/preflight/types.js.map +1 -1
  220. package/dist/lib/rasterize.d.ts +93 -0
  221. package/dist/lib/rasterize.d.ts.map +1 -0
  222. package/dist/lib/rasterize.js +117 -0
  223. package/dist/lib/rasterize.js.map +1 -0
  224. package/dist/lib/separations-registry.d.ts +99 -0
  225. package/dist/lib/separations-registry.d.ts.map +1 -0
  226. package/dist/lib/separations-registry.js +59 -0
  227. package/dist/lib/separations-registry.js.map +1 -0
  228. package/dist/lib/unwired.d.ts +29 -0
  229. package/dist/lib/unwired.d.ts.map +1 -0
  230. package/dist/lib/unwired.js +58 -0
  231. package/dist/lib/unwired.js.map +1 -0
  232. package/package.json +20 -11
  233. package/dist/components/SeparationsPanel.d.ts +0 -9
  234. package/dist/components/SeparationsPanel.d.ts.map +0 -1
  235. package/dist/components/SeparationsPanel.js +0 -168
  236. package/dist/components/SeparationsPanel.js.map +0 -1
@@ -0,0 +1,104 @@
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
+ import { useCallback, useState } from "react";
5
+ /**
6
+ * Default spec values — sensible for the most common case
7
+ * (white-ink underbase on dark substrate, no choke).
8
+ *
9
+ * @public
10
+ */
11
+ export const DEFAULT_WHITE_UNDERBASE_SPEC = {
12
+ separationName: "White",
13
+ opacity: 1,
14
+ chokeMm: 0,
15
+ knockoutMode: "solid",
16
+ };
17
+ /**
18
+ * Pure helper — validates a spec. Returns the first error message
19
+ * encountered or `null` when the spec is valid. Hosts can call this
20
+ * to disable the "Generate" button preemptively. Pure function.
21
+ *
22
+ * @public
23
+ */
24
+ export function validateWhiteUnderbaseSpec(spec) {
25
+ // Defensive against partial-spec merges that leave fields undefined
26
+ // (Partial<WhiteUnderbaseSpec> lets a host pass `{ separationName:
27
+ // undefined }`, which would otherwise throw on `.trim()`).
28
+ const name = spec.separationName ?? "";
29
+ if (!name.trim())
30
+ return "Separation name is required.";
31
+ if (!Number.isFinite(spec.opacity) || spec.opacity < 0 || spec.opacity > 1) {
32
+ return "Opacity must be between 0 and 1.";
33
+ }
34
+ if (!Number.isFinite(spec.chokeMm))
35
+ return "Choke must be a number.";
36
+ if (spec.chokeMm < 0)
37
+ return "Choke can't be negative.";
38
+ if (spec.chokeMm > 5)
39
+ return "Choke above 5 mm is implausibly large; double-check.";
40
+ return null;
41
+ }
42
+ /**
43
+ * Stateful panel — exposes inputs for every {@link WhiteUnderbaseSpec}
44
+ * field, dispatches the generator, and surfaces the result chip /
45
+ * inline error. Handles loading, validation, and success states.
46
+ *
47
+ * @public
48
+ */
49
+ export function WhiteUnderbasePanel({ initialSpec, generator, onGenerated, }) {
50
+ const [spec, setSpec] = useState(() => {
51
+ // Field-wise merge — skip undefined values in initialSpec so hosts
52
+ // passing `{ separationName: undefined }` don't clobber the
53
+ // defaults and leave required fields unset.
54
+ const merged = { ...DEFAULT_WHITE_UNDERBASE_SPEC };
55
+ if (!initialSpec)
56
+ return merged;
57
+ for (const key of Object.keys(initialSpec)) {
58
+ const value = initialSpec[key];
59
+ if (value !== undefined) {
60
+ // biome-ignore lint/suspicious/noExplicitAny: dynamic keyed assignment
61
+ merged[key] = value;
62
+ }
63
+ }
64
+ return merged;
65
+ });
66
+ const [status, setStatus] = useState("idle");
67
+ const [result, setResult] = useState(null);
68
+ const [errorMsg, setErrorMsg] = useState(null);
69
+ const validationError = validateWhiteUnderbaseSpec(spec);
70
+ const canGenerate = !!generator && status !== "loading" && !validationError;
71
+ const generate = useCallback(async () => {
72
+ if (!generator)
73
+ return;
74
+ setStatus("loading");
75
+ setErrorMsg(null);
76
+ try {
77
+ const next = await generator(spec);
78
+ setResult(next);
79
+ setStatus("done");
80
+ onGenerated?.(next);
81
+ }
82
+ catch (err) {
83
+ const msg = err instanceof Error ? err.message : "Generation failed.";
84
+ setErrorMsg(msg);
85
+ setStatus("error");
86
+ }
87
+ }, [generator, spec, onGenerated]);
88
+ const update = (key, value) => {
89
+ setSpec((prev) => ({ ...prev, [key]: value }));
90
+ };
91
+ return (_jsxs("div", { "data-testid": "white-underbase-panel", style: { padding: "0.5rem" }, children: [_jsx("header", { style: { marginBottom: "0.5rem" }, children: _jsx("h3", { style: { margin: 0, fontSize: "0.875rem" }, children: "White underbase" }) }), _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.375rem" }, children: [_jsxs("label", { style: { fontSize: "0.75rem", display: "flex", flexDirection: "column" }, children: [_jsx("span", { style: { color: "#595959", marginBottom: "0.125rem" }, children: "Separation name" }), _jsx("input", { type: "text", value: spec.separationName, onChange: (e) => update("separationName", e.target.value), disabled: !generator, style: { fontSize: "0.8125rem", padding: "0.25rem 0.375rem" } })] }), _jsxs("label", { style: { fontSize: "0.75rem", display: "flex", flexDirection: "column" }, children: [_jsxs("span", { style: { color: "#595959", marginBottom: "0.125rem" }, children: ["Opacity (", spec.opacity.toFixed(2), ")"] }), _jsx("input", { type: "range", min: 0, max: 1, step: 0.05, value: spec.opacity, onChange: (e) => {
92
+ const next = Number(e.target.value);
93
+ if (Number.isFinite(next))
94
+ update("opacity", next);
95
+ }, disabled: !generator })] }), _jsxs("label", { style: { fontSize: "0.75rem", display: "flex", flexDirection: "column" }, children: [_jsx("span", { style: { color: "#595959", marginBottom: "0.125rem" }, children: "Choke (mm)" }), _jsx("input", { type: "number", min: 0, max: 5, step: 0.05, value: spec.chokeMm, onChange: (e) => {
96
+ // Empty number input → "" → NaN, which would bypass
97
+ // validation and slip through to the generator. Treat a
98
+ // cleared field as 0 (the no-choke default).
99
+ const next = e.target.value === "" ? 0 : Number(e.target.value);
100
+ if (Number.isFinite(next))
101
+ update("chokeMm", next);
102
+ }, disabled: !generator, style: { fontSize: "0.8125rem", padding: "0.25rem 0.375rem" } })] }), _jsxs("label", { style: { fontSize: "0.75rem", display: "flex", flexDirection: "column" }, children: [_jsx("span", { style: { color: "#595959", marginBottom: "0.125rem" }, children: "Knockout mode" }), _jsxs("select", { value: spec.knockoutMode, onChange: (e) => update("knockoutMode", e.target.value), disabled: !generator, style: { fontSize: "0.8125rem", padding: "0.25rem 0.375rem" }, children: [_jsx("option", { value: "solid", children: "solid \u2014 full coverage" }), _jsx("option", { value: "subtract-cmyk", children: "subtract-cmyk \u2014 scale by ink density" })] })] })] }), validationError && (_jsx("div", { role: "alert", style: { marginTop: "0.5rem", fontSize: "0.75rem", color: "#a60" }, children: validationError })), _jsxs("div", { style: { marginTop: "0.5rem", display: "flex", alignItems: "center", gap: "0.5rem" }, children: [_jsx("button", { type: "button", onClick: generate, disabled: !canGenerate, style: { fontSize: "0.75rem", padding: "0.25rem 0.625rem" }, children: status === "loading" ? "Generating…" : "Generate" }), status === "done" && result && (_jsxs("span", { style: { fontSize: "0.75rem", color: "#595959" }, children: [result.separationName, " \u00B7 ", result.coveragePct.toFixed(1), "% coverage"] })), status === "error" && errorMsg && (_jsx("span", { role: "alert", style: { fontSize: "0.75rem", color: "#a00" }, children: errorMsg }))] })] }));
103
+ }
104
+ //# sourceMappingURL=WhiteUnderbasePanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhiteUnderbasePanel.js","sourceRoot":"","sources":["../../src/components/WhiteUnderbasePanel.tsx"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,YAAY,CAAC;;AAwBb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA0B9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA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AE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,aACnD,MAAM,CAAC,cAAc,cAAK,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,kBACnD,CACR,EACA,MAAM,KAAK,OAAO,IAAI,QAAQ,IAAI,CACjC,eAAM,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAC7D,QAAQ,GACJ,CACR,IACG,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,11 +1,31 @@
1
+ /**
2
+ * Editor UI complexity tier. `"basic"` strips advanced controls and
3
+ * is the touch/mobile default; `"pro"` shows the full toolset.
4
+ * Resolved via {@link useEditorMode}.
5
+ *
6
+ * @public
7
+ */
1
8
  export type EditorMode = "basic" | "pro";
2
9
  /**
3
- * Resolves the editor mode with this precedence:
4
- * 1. Explicit user choice persisted in localStorage
5
- * 2. `prefer` prop (set by the page — e.g. demo passes "auto")
6
- * 3. Viewport heuristic: pro on >= 900 CSS px, basic otherwise
10
+ * Resolve the active editor mode and expose a setter that persists
11
+ * the choice across reloads.
12
+ *
13
+ * Precedence (later wins):
14
+ *
15
+ * 1. Explicit user choice persisted in `localStorage`
16
+ * (`"artworkpdf:editor-mode"`)
17
+ * 2. The `prefer` arg (typically threaded from the host page —
18
+ * `/demo` passes `"auto"` so the viewport heuristic picks)
19
+ * 3. Viewport heuristic: `"pro"` on wider viewports, `"basic"`
20
+ * on narrower ones
21
+ *
22
+ * `setMode(null)` clears the persisted preference and falls back to
23
+ * the heuristic; `isAuto` is true while no explicit choice is saved.
24
+ *
25
+ * SSR-safe: returns the resolved fallback until hydration completes,
26
+ * so the server render matches the first client paint.
7
27
  *
8
- * `setMode(null)` clears the saved preference and returns to auto.
28
+ * @public
9
29
  */
10
30
  export declare function useEditorMode(prefer?: EditorMode | "auto"): {
11
31
  mode: EditorMode;
@@ -1 +1 @@
1
- {"version":3,"file":"useEditorMode.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditorMode.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;AAIzC;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAE,UAAU,GAAG,MAAe,GAAG;IACnE,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB,CAqCA"}
1
+ {"version":3,"file":"useEditorMode.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditorMode.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;AAIzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAE,UAAU,GAAG,MAAe,GAAG;IACnE,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB,CAqCA"}
@@ -3,12 +3,25 @@
3
3
  import { useCallback, useEffect, useState } from "react";
4
4
  const STORAGE_KEY = "artworkpdf:editor-mode";
5
5
  /**
6
- * Resolves the editor mode with this precedence:
7
- * 1. Explicit user choice persisted in localStorage
8
- * 2. `prefer` prop (set by the page — e.g. demo passes "auto")
9
- * 3. Viewport heuristic: pro on >= 900 CSS px, basic otherwise
6
+ * Resolve the active editor mode and expose a setter that persists
7
+ * the choice across reloads.
10
8
  *
11
- * `setMode(null)` clears the saved preference and returns to auto.
9
+ * Precedence (later wins):
10
+ *
11
+ * 1. Explicit user choice persisted in `localStorage`
12
+ * (`"artworkpdf:editor-mode"`)
13
+ * 2. The `prefer` arg (typically threaded from the host page —
14
+ * `/demo` passes `"auto"` so the viewport heuristic picks)
15
+ * 3. Viewport heuristic: `"pro"` on wider viewports, `"basic"`
16
+ * on narrower ones
17
+ *
18
+ * `setMode(null)` clears the persisted preference and falls back to
19
+ * the heuristic; `isAuto` is true while no explicit choice is saved.
20
+ *
21
+ * SSR-safe: returns the resolved fallback until hydration completes,
22
+ * so the server render matches the first client paint.
23
+ *
24
+ * @public
12
25
  */
13
26
  export function useEditorMode(prefer = "auto") {
14
27
  const [stored, setStored] = useState(null);
@@ -1 +1 @@
1
- {"version":3,"file":"useEditorMode.js","sourceRoot":"","sources":["../../src/hooks/useEditorMode.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,YAAY,CAAC;AACb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIzD,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,SAA8B,MAAM;IAKhE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAoB,IAAI,CAAC,CAAC;IAC9D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC/D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YACrD,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,KAAK;gBAAE,SAAS,CAAC,GAAG,CAAC,CAAC;QACvD,CAAC;QAAC,MAAM,CAAC;YACP,8DAA8D;QAChE,CAAC;QAED,MAAM,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;QACnD,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,C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AC1D,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACtD,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,oEAAoE;IACpE,MAAM,IAAI,GAAe,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;IACvD,MAAM,QAAQ,GAAe,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAEpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,EAAE,CAAC;AACpD,CAAC"}
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, type Page, type TemplateSet, TEMPLATES, TEMPLATE_SETS, getDefaultTemplate, getTemplateById, getTemplateSetById, templateToInitialState, templateToPage, templatesToPages, templateSetToPages, } 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":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACL,KAAK,YAAY,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,IAAI,EACT,KAAK,WAAW,EACh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O,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, TEMPLATE_SETS, getDefaultTemplate, getTemplateById, getTemplateSetById, templateToInitialState, templateToPage, templatesToPages, templateSetToPages, } 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,kBAAkB,EAClB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIL,SAAS,EACT,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"}
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;AA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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"}
@@ -1 +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,CA8Hd"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"preflight-findings.js","sourceRoot":"","sources":["../../src/lens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AAE,QAAQ;wDAClB,aAAa,EAAE,QAAQ;wDACvB,aAAa,EAAE,WAAW;wDAC1B,KAAK,EAAE,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;wDACzD,UAAU,EAAE,GAAG;qDAChB,YAEA,KAAK,CAAC,QAAQ,GACV,EACP,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,YACvE,KAAK,CAAC,SAAS,GACX,EACN,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,CAC3B,gBAAM,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAChE,KAAK,CAAC,IAAI,IACR,CACR,IACG,EACN,cAAK,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,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":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,aAAa,EAK9C,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;6BACyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,MAAM,EAAE,aAAa,CAAC;IACtB;iCAC6B;IAC7B,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAE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