qrdx 0.0.54 → 0.0.55

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 (113) hide show
  1. package/README.md +1 -1
  2. package/dist/core.js +7 -7
  3. package/dist/core.js.map +1 -1
  4. package/dist/core.mjs +7 -7
  5. package/dist/core.mjs.map +1 -1
  6. package/dist/element.browser.mjs +6 -67
  7. package/dist/element.browser.mjs.map +1 -1
  8. package/dist/index.js +7 -7
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +7 -7
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/qr-code-canvas.js +1 -1
  13. package/dist/qr-code-canvas.js.map +1 -1
  14. package/dist/qr-code-canvas.mjs +1 -1
  15. package/dist/qr-code-canvas.mjs.map +1 -1
  16. package/dist/schemas.js +2 -0
  17. package/dist/schemas.js.map +1 -0
  18. package/dist/schemas.mjs +2 -0
  19. package/dist/schemas.mjs.map +1 -0
  20. package/dist/src/art.d.ts +1 -1
  21. package/dist/src/art.d.ts.map +1 -1
  22. package/dist/src/engine.d.ts +2 -1
  23. package/dist/src/engine.d.ts.map +1 -1
  24. package/dist/src/eps.d.ts.map +1 -1
  25. package/dist/src/frame-import.d.ts +1 -1
  26. package/dist/src/frame-import.d.ts.map +1 -1
  27. package/dist/src/frame-spec.d.ts +5 -4
  28. package/dist/src/frame-spec.d.ts.map +1 -1
  29. package/dist/src/frame.d.ts +1 -1
  30. package/dist/src/frame.d.ts.map +1 -1
  31. package/dist/src/frames/builtin.d.ts +1 -1
  32. package/dist/src/frames/builtin.d.ts.map +1 -1
  33. package/dist/src/qr-outline.d.ts +1 -2
  34. package/dist/src/qr-outline.d.ts.map +1 -1
  35. package/dist/src/qr-shape.d.ts +1 -1
  36. package/dist/src/qr-shape.d.ts.map +1 -1
  37. package/dist/src/silhouette.d.ts +1 -2
  38. package/dist/src/silhouette.d.ts.map +1 -1
  39. package/dist/src/template/dot-ring-layout.d.ts +26 -3
  40. package/dist/src/template/dot-ring-layout.d.ts.map +1 -1
  41. package/dist/src/template/dot-ring.d.ts +22 -4
  42. package/dist/src/template/dot-ring.d.ts.map +1 -1
  43. package/dist/src/utils.d.ts +1 -1
  44. package/dist/src/utils.d.ts.map +1 -1
  45. package/dist/types/art.d.ts +1 -18
  46. package/dist/types/art.d.ts.map +1 -1
  47. package/dist/types/color-helpers.d.ts +26 -0
  48. package/dist/types/color-helpers.d.ts.map +1 -0
  49. package/dist/types/color.d.ts +1 -24
  50. package/dist/types/color.d.ts.map +1 -1
  51. package/dist/types/constants.d.ts +97 -0
  52. package/dist/types/constants.d.ts.map +1 -0
  53. package/dist/types/corner-dot.d.ts +2 -12
  54. package/dist/types/corner-dot.d.ts.map +1 -1
  55. package/dist/types/corner-eye.d.ts +2 -11
  56. package/dist/types/corner-eye.d.ts.map +1 -1
  57. package/dist/types/frame-spec-parse.d.ts +21 -0
  58. package/dist/types/frame-spec-parse.d.ts.map +1 -0
  59. package/dist/types/frame-spec-rules.d.ts +95 -0
  60. package/dist/types/frame-spec-rules.d.ts.map +1 -0
  61. package/dist/types/frame-spec.d.ts +2 -83
  62. package/dist/types/frame-spec.d.ts.map +1 -1
  63. package/dist/types/frame.d.ts +1 -8
  64. package/dist/types/frame.d.ts.map +1 -1
  65. package/dist/types/image-pattern.d.ts +1 -1
  66. package/dist/types/image-pattern.d.ts.map +1 -1
  67. package/dist/types/index.d.ts +3 -22
  68. package/dist/types/index.d.ts.map +1 -1
  69. package/dist/types/index.js +2 -2
  70. package/dist/types/index.js.map +1 -1
  71. package/dist/types/index.mjs +2 -2
  72. package/dist/types/index.mjs.map +1 -1
  73. package/dist/types/plain.d.ts +17 -0
  74. package/dist/types/plain.d.ts.map +1 -0
  75. package/dist/types/qr.d.ts +2 -46
  76. package/dist/types/qr.d.ts.map +1 -1
  77. package/dist/types/schemas.d.ts +12 -0
  78. package/dist/types/schemas.d.ts.map +1 -0
  79. package/dist/vanilla.browser.mjs +28 -28
  80. package/dist/vanilla.browser.mjs.map +1 -1
  81. package/package.json +1 -1
  82. package/src/art.tsx +3 -6
  83. package/src/body-patterns.tsx +1 -1
  84. package/src/engine.ts +53 -1
  85. package/src/eps.ts +6 -1
  86. package/src/frame-import.ts +7 -6
  87. package/src/frame-spec.ts +17 -23
  88. package/src/frame.tsx +3 -2
  89. package/src/frames/builtin.ts +2 -5
  90. package/src/helpers.ts +1 -1
  91. package/src/qr-outline.ts +2 -2
  92. package/src/qr-shape.ts +2 -5
  93. package/src/scan-score.ts +2 -2
  94. package/src/silhouette.ts +2 -2
  95. package/src/template/dot-ring-layout.ts +281 -15
  96. package/src/template/dot-ring.tsx +27 -8
  97. package/src/utils/print-shared.ts +1 -1
  98. package/src/utils.tsx +6 -5
  99. package/types/art.ts +10 -20
  100. package/types/color-helpers.ts +132 -0
  101. package/types/color.ts +9 -122
  102. package/types/constants.ts +222 -0
  103. package/types/corner-dot.ts +8 -40
  104. package/types/corner-eye.ts +2 -31
  105. package/types/frame-spec-parse.ts +683 -0
  106. package/types/frame-spec-rules.ts +645 -0
  107. package/types/frame-spec.ts +38 -635
  108. package/types/frame.ts +14 -34
  109. package/types/image-pattern.ts +2 -26
  110. package/types/index.ts +6 -162
  111. package/types/plain.ts +117 -0
  112. package/types/qr.ts +29 -51
  113. package/types/schemas.ts +62 -0
package/README.md CHANGED
@@ -395,7 +395,7 @@ SVG draws an image fill as a `<pattern>`, and PDF embeds the picture once. EPS r
395
395
 
396
396
  Built-in `templateId` values: `default`, `Arrow`, `StandardBox`, `SquareBorder`, `StrikedBox`, `Halloween`, `DotRing` (case-sensitive). `getTemplateIds()`, `getAllTemplates()` and `getTemplate(id)` list them at runtime.
397
397
 
398
- `DotRing` is a round code: the code in a disc of dots (a different set for every link, the same for the same link) inside a dark ring with text along it. Its settings go in `customProps` (`DotRingProps`): `customText`, `textPosition` (`"top"` or `"bottom"`), `textRotation`, `textColor`, `fontFamily`, `fontWeight`, `fontSize`, `fontLetterSpacing`, `outerCircleColor` (the ring), and `strokeWidth` and `strokeColor` (both edges of the ring; `innerStrokeWidth`, `innerStrokeColor`, `outerStrokeWidth` and `outerStrokeColor` for one edge). The text is SVG text: PDF and EPS print it in Helvetica Bold, and `getQRAsPNG` needs a font on the machine, as frame labels do.
398
+ `DotRing` is a round code: the code in a disc of dots (a different set for every link, the same for the same link) inside a dark ring with text along it. Its settings go in `customProps` (`DotRingProps`): `customText`, `textFill` (`"repeat"` repeats the text round the whole ring), `textPosition` (`"top"` or `"bottom"`), `textRotation`, `textColor`, `fontFamily`, `fontWeight`, `fontSize`, `fontLetterSpacing`, `outerCircleColor` (the ring), and `strokeWidth` and `strokeColor` (both edges of the ring; `innerStrokeWidth`, `innerStrokeColor`, `outerStrokeWidth` and `outerStrokeColor` for one edge). Text too long for the ring gets tighter spacing, then a smaller font (down to half the default), so it never runs into its own start. Past that, a repeated phrase keeps as many whole copies as fit, and other text is cut after the last whole word and ends with "…". The text is SVG text: PDF and EPS print it in Helvetica Bold, and `getQRAsPNG` needs a font on the machine, as frame labels do.
399
399
 
400
400
  A custom template wraps the QR content (a 300×300 SVG) in your own SVG:
401
401