qrdx 0.0.57 → 0.0.58
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.
- package/README.md +22 -6
- package/dist/angular.js +33 -3
- package/dist/angular.js.map +1 -1
- package/dist/angular.mjs +33 -3
- package/dist/angular.mjs.map +1 -1
- package/dist/core.js +7 -7
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +7 -7
- package/dist/core.mjs.map +1 -1
- package/dist/element.browser.mjs +6 -6
- package/dist/element.browser.mjs.map +1 -1
- package/dist/element.js +1 -1
- package/dist/element.js.map +1 -1
- package/dist/element.mjs +1 -1
- package/dist/element.mjs.map +1 -1
- package/dist/frames-index.js +1 -1
- package/dist/frames-index.js.map +1 -1
- package/dist/frames-index.mjs +1 -1
- package/dist/frames-index.mjs.map +1 -1
- package/dist/frames-official.js +1 -1
- package/dist/frames-official.js.map +1 -1
- package/dist/frames-official.mjs +1 -1
- package/dist/frames-official.mjs.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/dist/qr-code-canvas.js +1 -1
- package/dist/qr-code-canvas.js.map +1 -1
- package/dist/qr-code-canvas.mjs +1 -1
- package/dist/qr-code-canvas.mjs.map +1 -1
- package/dist/schemas.js +1 -1
- package/dist/schemas.js.map +1 -1
- package/dist/schemas.mjs +1 -1
- package/dist/schemas.mjs.map +1 -1
- package/dist/src/angular.d.ts +9 -3
- package/dist/src/download.d.ts +32 -6
- package/dist/src/download.d.ts.map +1 -1
- package/dist/src/element.d.ts +10 -1
- package/dist/src/element.d.ts.map +1 -1
- package/dist/src/engine.d.ts +5 -2
- package/dist/src/engine.d.ts.map +1 -1
- package/dist/src/eps.d.ts.map +1 -1
- package/dist/src/export.d.ts.map +1 -1
- package/dist/src/frame.d.ts +24 -0
- package/dist/src/frame.d.ts.map +1 -1
- package/dist/src/frames/catalogue/all.d.ts.map +1 -1
- package/dist/src/frames/catalogue/batches.d.ts +6 -0
- package/dist/src/frames/catalogue/batches.d.ts.map +1 -0
- package/dist/src/frames/catalogue/call-to-action.d.ts.map +1 -1
- package/dist/src/frames/catalogue/counts.d.ts +4 -2
- package/dist/src/frames/catalogue/counts.d.ts.map +1 -1
- package/dist/src/frames/catalogue/index.d.ts.map +1 -1
- package/dist/src/frames/catalogue/objects.d.ts +5 -0
- package/dist/src/frames/catalogue/objects.d.ts.map +1 -0
- package/dist/src/frames/catalogue/playful.d.ts +5 -0
- package/dist/src/frames/catalogue/playful.d.ts.map +1 -0
- package/dist/src/frames/catalogue/tags.d.ts.map +1 -1
- package/dist/src/frames/collections.d.ts.map +1 -1
- package/dist/src/frames/official-types.d.ts +1 -1
- package/dist/src/frames/official-types.d.ts.map +1 -1
- package/dist/src/frames/official.d.ts.map +1 -1
- package/dist/src/gif.d.ts +40 -0
- package/dist/src/gif.d.ts.map +1 -0
- package/dist/src/helpers.d.ts +1 -1
- package/dist/src/helpers.d.ts.map +1 -1
- package/dist/src/ico.d.ts +11 -0
- package/dist/src/ico.d.ts.map +1 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/looks.d.ts +101 -0
- package/dist/src/looks.d.ts.map +1 -0
- package/dist/src/plain.d.ts.map +1 -1
- package/dist/src/print.d.ts.map +1 -1
- package/dist/src/qr-code-canvas.d.ts.map +1 -1
- package/dist/src/qr-code-props.d.ts.map +1 -1
- package/dist/src/qr-frame-svg.d.ts +10 -0
- package/dist/src/qr-frame-svg.d.ts.map +1 -0
- package/dist/src/scan-score.d.ts.map +1 -1
- package/dist/src/utils/gif.d.ts +61 -0
- package/dist/src/utils/gif.d.ts.map +1 -0
- package/dist/src/utils/ico.d.ts +30 -0
- package/dist/src/utils/ico.d.ts.map +1 -0
- package/dist/src/utils/parse-color.d.ts +1 -1
- package/dist/src/utils/parse-color.d.ts.map +1 -1
- package/dist/src/utils/print-shared.d.ts.map +1 -1
- package/dist/src/utils/svg-painter.d.ts +13 -0
- package/dist/src/utils/svg-painter.d.ts.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/vanilla-api.d.ts +2 -2
- package/dist/src/vanilla-api.d.ts.map +1 -1
- package/dist/src/vue.d.ts +1 -1
- package/dist/src/vue.d.ts.map +1 -1
- package/dist/types/constants.d.ts +41 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +2 -2
- package/dist/types/index.mjs.map +1 -1
- package/dist/types/plain.d.ts +2 -2
- package/dist/types/plain.d.ts.map +1 -1
- package/dist/types/qr.d.ts +399 -1
- package/dist/types/qr.d.ts.map +1 -1
- package/dist/types/react.d.ts +10 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +1 -1
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/vanilla.browser.mjs +34 -34
- package/dist/vanilla.browser.mjs.map +1 -1
- package/dist/vue.js +1 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +1 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +6 -2
- package/src/angular.ts +14 -2
- package/src/download.tsx +92 -7
- package/src/element.ts +16 -1
- package/src/engine.ts +22 -0
- package/src/eps.ts +8 -1
- package/src/export.ts +16 -0
- package/src/frame.tsx +51 -0
- package/src/frames/catalogue/all.ts +202 -0
- package/src/frames/catalogue/batches.ts +114 -0
- package/src/frames/catalogue/call-to-action.ts +58 -0
- package/src/frames/catalogue/counts.ts +4 -2
- package/src/frames/catalogue/index.ts +808 -0
- package/src/frames/catalogue/objects.ts +65 -0
- package/src/frames/catalogue/playful.ts +97 -0
- package/src/frames/catalogue/tags.ts +137 -0
- package/src/frames/collections.ts +2 -0
- package/src/frames/official/badge-bottom-light.json +91 -0
- package/src/frames/official/badge-bottom.json +79 -0
- package/src/frames/official/billboard-campaign.json +274 -0
- package/src/frames/official/billboard-light.json +287 -0
- package/src/frames/official/bookmark-light.json +88 -0
- package/src/frames/official/bookmark-strip.json +83 -0
- package/src/frames/official/border-medium.json +71 -0
- package/src/frames/official/border-thick.json +71 -0
- package/src/frames/official/border-thin.json +71 -0
- package/src/frames/official/bottle-label.json +136 -0
- package/src/frames/official/bottle-light.json +133 -0
- package/src/frames/official/camera-viewfinder.json +174 -0
- package/src/frames/official/cassette-tape.json +236 -0
- package/src/frames/official/cat-with-card-light.json +246 -0
- package/src/frames/official/cat-with-card.json +234 -0
- package/src/frames/official/cinema-marquee.json +537 -0
- package/src/frames/official/circle-viewfinder.json +87 -0
- package/src/frames/official/clapperboard-light.json +163 -0
- package/src/frames/official/clapperboard-scene.json +151 -0
- package/src/frames/official/comic-panel.json +386 -0
- package/src/frames/official/corner-tab-light.json +101 -0
- package/src/frames/official/corner-tab.json +89 -0
- package/src/frames/official/crystal-ball.json +105 -0
- package/src/frames/official/delivery-box-light.json +132 -0
- package/src/frames/official/delivery-box-track.json +132 -0
- package/src/frames/official/fish-tank.json +276 -0
- package/src/frames/official/flag-light.json +136 -0
- package/src/frames/official/flag-team.json +127 -0
- package/src/frames/official/floppy-disk.json +106 -0
- package/src/frames/official/flying-saucer.json +128 -0
- package/src/frames/official/gallery-frame.json +195 -0
- package/src/frames/official/globe-stand.json +136 -0
- package/src/frames/official/gumball-machine.json +451 -0
- package/src/frames/official/heart-light.json +59 -0
- package/src/frames/official/heart-scan.json +51 -0
- package/src/frames/official/hexagon-light.json +87 -0
- package/src/frames/official/hexagon-scan.json +72 -0
- package/src/frames/official/hot-air-balloon.json +132 -0
- package/src/frames/official/jigsaw-piece-light.json +68 -0
- package/src/frames/official/jigsaw-piece.json +60 -0
- package/src/frames/official/laptop-screen.json +137 -0
- package/src/frames/official/lighthouse-tower.json +132 -0
- package/src/frames/official/magnifying-glass.json +85 -0
- package/src/frames/official/mailbox-flag.json +112 -0
- package/src/frames/official/mailbox-light.json +120 -0
- package/src/frames/official/map-pin-light.json +76 -0
- package/src/frames/official/map-pin.json +58 -0
- package/src/frames/official/matchbox-drawer.json +170 -0
- package/src/frames/official/microwave-door.json +220 -0
- package/src/frames/official/milk-carton.json +129 -0
- package/src/frames/official/monitor-screen.json +111 -0
- package/src/frames/official/monster-mouth.json +180 -0
- package/src/frames/official/mug-light.json +138 -0
- package/src/frames/official/mug-refill.json +125 -0
- package/src/frames/official/museum-plaque-light.json +187 -0
- package/src/frames/official/museum-plaque.json +187 -0
- package/src/frames/official/music-player-light.json +151 -0
- package/src/frames/official/music-player.json +136 -0
- package/src/frames/official/octagon-light.json +126 -0
- package/src/frames/official/octagon-sign.json +120 -0
- package/src/frames/official/open-book.json +156 -0
- package/src/frames/official/parking-meter.json +107 -0
- package/src/frames/official/passport-stamp.json +132 -0
- package/src/frames/official/pizza-box.json +122 -0
- package/src/frames/official/polka-dot-border.json +502 -0
- package/src/frames/official/popcorn-bucket.json +305 -0
- package/src/frames/official/porthole.json +264 -0
- package/src/frames/official/raised-card-thin.json +111 -0
- package/src/frames/official/raised-card.json +99 -0
- package/src/frames/official/retro-radio.json +180 -0
- package/src/frames/official/ribbon-top-light.json +125 -0
- package/src/frames/official/ribbon-top.json +113 -0
- package/src/frames/official/robot-chest.json +197 -0
- package/src/frames/official/roll-up-banner-light.json +137 -0
- package/src/frames/official/roll-up-banner.json +125 -0
- package/src/frames/official/round-tag-light.json +86 -0
- package/src/frames/official/round-tag.json +79 -0
- package/src/frames/official/sailboat-sail.json +99 -0
- package/src/frames/official/scroll-story.json +184 -0
- package/src/frames/official/sketch-border.json +92 -0
- package/src/frames/official/sketch-circle.json +57 -0
- package/src/frames/official/snow-globe.json +170 -0
- package/src/frames/official/soda-can.json +160 -0
- package/src/frames/official/spin-rays.json +126 -0
- package/src/frames/official/spiral-notebook.json +476 -0
- package/src/frames/official/stage-curtains.json +303 -0
- package/src/frames/official/starburst-light.json +128 -0
- package/src/frames/official/starburst.json +118 -0
- package/src/frames/official/swirl-border.json +122 -0
- package/src/frames/official/tablet-screen.json +130 -0
- package/src/frames/official/text-frame.json +79 -0
- package/src/frames/official/toaster-toast.json +114 -0
- package/src/frames/official/train-window.json +176 -0
- package/src/frames/official/treasure-map.json +207 -0
- package/src/frames/official/tv-set.json +256 -0
- package/src/frames/official/vending-machine.json +218 -0
- package/src/frames/official/video-player.json +118 -0
- package/src/frames/official/video-tape.json +137 -0
- package/src/frames/official/vinyl-sleeve-light.json +139 -0
- package/src/frames/official/vinyl-sleeve.json +127 -0
- package/src/frames/official/washing-machine.json +146 -0
- package/src/frames/official-types.ts +3 -1
- package/src/frames/official.ts +4 -3
- package/src/gif.ts +188 -0
- package/src/helpers.ts +12 -0
- package/src/ico.ts +55 -0
- package/src/index.tsx +2 -0
- package/src/looks.ts +467 -0
- package/src/plain.tsx +6 -0
- package/src/print.ts +12 -0
- package/src/qr-code-canvas.tsx +23 -2
- package/src/qr-code-props.ts +22 -0
- package/src/qr-frame-svg.tsx +26 -0
- package/src/scan-score.ts +38 -6
- package/src/utils/gif.ts +632 -0
- package/src/utils/ico.ts +150 -0
- package/src/utils/parse-color.ts +163 -23
- package/src/utils/print-shared.ts +25 -1
- package/src/utils/svg-painter.ts +18 -0
- package/src/utils.tsx +136 -17
- package/src/vanilla-api.ts +2 -2
- package/src/vue.ts +7 -1
- package/types/constants.ts +47 -0
- package/types/plain.ts +19 -0
- package/types/qr.ts +98 -0
- package/types/react.ts +11 -1
- package/types/schemas.ts +5 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** How many official frames there are. */
|
|
2
|
-
export declare const OFFICIAL_FRAME_COUNT =
|
|
2
|
+
export declare const OFFICIAL_FRAME_COUNT = 1114;
|
|
3
3
|
/** Official frames per collection. */
|
|
4
4
|
export declare const OFFICIAL_FRAME_COUNTS: {
|
|
5
|
-
readonly "call-to-action":
|
|
5
|
+
readonly "call-to-action": 134;
|
|
6
6
|
readonly holidays: 283;
|
|
7
7
|
readonly seasons: 60;
|
|
8
8
|
readonly "food-drink": 71;
|
|
@@ -16,5 +16,7 @@ export declare const OFFICIAL_FRAME_COUNTS: {
|
|
|
16
16
|
readonly "sports-fitness": 36;
|
|
17
17
|
readonly business: 82;
|
|
18
18
|
readonly nonprofit: 28;
|
|
19
|
+
readonly objects: 28;
|
|
20
|
+
readonly playful: 44;
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=counts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"counts.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/counts.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAC1C,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,sCAAsC;AACtC,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"counts.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/counts.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAC1C,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,sCAAsC;AACtC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;CAiBxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,EAAE,SAAS,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,EAAE,SAAS,uBAAuB,EA+vSlE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/objects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA8BjD,uDAAuD;AACvD,QAAA,MAAM,MAAM,EA6BI,SAAS,aAAa,EAAE,CAAC;AAEzC,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playful.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/playful.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA8CjD,uDAAuD;AACvD,QAAA,MAAM,MAAM,EA6CI,SAAS,aAAa,EAAE,CAAC;AAEzC,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/tags.ts"],"names":[],"mappings":"AAGA,mDAAmD;AACnD,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../../src/frames/catalogue/tags.ts"],"names":[],"mappings":"AAGA,mDAAmD;AACnD,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAkwChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/frames/collections.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,0BAA0B,EAAE,SAAS;IAChD,EAAE,EAAE,uBAAuB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf,
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/frames/collections.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,eAAO,MAAM,0BAA0B,EAAE,SAAS;IAChD,EAAE,EAAE,uBAAuB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf,EAiBA,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FrameSpec } from "../../types/frame-spec";
|
|
2
2
|
/** Ids of the groups the official frames come in (see OFFICIAL_FRAME_COLLECTIONS). */
|
|
3
|
-
export type OfficialFrameCollection = "call-to-action" | "holidays" | "seasons" | "food-drink" | "shopping" | "beauty-wellness" | "events" | "places" | "real-estate" | "automotive" | "health-learning" | "sports-fitness" | "business" | "nonprofit";
|
|
3
|
+
export type OfficialFrameCollection = "call-to-action" | "holidays" | "seasons" | "food-drink" | "shopping" | "beauty-wellness" | "events" | "places" | "real-estate" | "automotive" | "health-learning" | "sports-fitness" | "business" | "nonprofit" | "objects" | "playful";
|
|
4
4
|
export interface OfficialFrame {
|
|
5
5
|
/** Stable id (also the file name). Never renamed or reused. */
|
|
6
6
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"official-types.d.ts","sourceRoot":"","sources":["../../../src/frames/official-types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,sFAAsF;AACtF,MAAM,MAAM,uBAAuB,GAC/B,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,YAAY,GACZ,UAAU,GACV,iBAAiB,GACjB,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,GAChB,UAAU,GACV,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"official-types.d.ts","sourceRoot":"","sources":["../../../src/frames/official-types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,sFAAsF;AACtF,MAAM,MAAM,uBAAuB,GAC/B,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,YAAY,GACZ,UAAU,GACV,iBAAiB,GACjB,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,GAChB,UAAU,GACV,WAAW,GACX,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;IAClC,UAAU,EAAE,uBAAuB,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,SAAS,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,iEAAiE;AACjE,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,uBAAuB,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"official.d.ts","sourceRoot":"","sources":["../../../src/frames/official.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"official.d.ts","sourceRoot":"","sources":["../../../src/frames/official.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,YAAY,EACV,aAAa,EACb,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,gDAAgD;AAChD,eAAO,MAAM,eAAe,qDAAsB,CAAC;AAEnD,+BAA+B;AAC/B,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,wDAE1C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { QRArtPixels } from "./art";
|
|
2
|
+
export { encodeGIF, encodeGIFFromRGBA, GIF_ALPHA_THRESHOLD, GIF_MAX_COLORS, GIF_MAX_DIMENSION, type IndexedImage, indexedToRGBA, isGIFFile, type QuantizedImage, quantizeRGBA, } from "./utils/gif";
|
|
3
|
+
/** The MIME type of a GIF. */
|
|
4
|
+
export declare const GIF_MIME = "image/gif";
|
|
5
|
+
/** Thrown when reducing a design to GIF's 256 colors would stop it scanning. */
|
|
6
|
+
export declare class GIFScanError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
export interface GIFResult {
|
|
10
|
+
file: Uint8Array;
|
|
11
|
+
/** Colors in the palette, the transparent one included */
|
|
12
|
+
colors: number;
|
|
13
|
+
/** True when every pixel kept its color and opacity exactly */
|
|
14
|
+
lossless: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Throws a GIFScanError when `reduced` (the GIF's pixels read back) no longer
|
|
18
|
+
* decodes to `expected` although `original` did. Both are laid over white
|
|
19
|
+
* first, as a scanner reads a see-through code on paper. A design that doesn't
|
|
20
|
+
* decode to begin with (the decoder is stricter than a phone for some styles)
|
|
21
|
+
* isn't blamed on GIF, and pixels that came through unchanged aren't decoded
|
|
22
|
+
* at all. Decoding takes `jsqr`, loaded here when it is needed; if it can't be
|
|
23
|
+
* loaded the GIF can't be checked, so it is refused rather than passed on. The
|
|
24
|
+
* server uses this too, with the pixels of the GIF sharp wrote.
|
|
25
|
+
*/
|
|
26
|
+
export declare function assertGIFStillScans(original: QRArtPixels, reduced: QRArtPixels, expected: string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* RGBA pixels (`width * height * 4` bytes, top row first) as a GIF. A pixel
|
|
29
|
+
* with alpha under 128 is the GIF's transparent color. When `expected` (the
|
|
30
|
+
* value the code encodes) is given and the colors had to be reduced, the
|
|
31
|
+
* result is scanned against the original and a GIFScanError is thrown if it
|
|
32
|
+
* no longer reads. Throws a RangeError for a bad size.
|
|
33
|
+
*/
|
|
34
|
+
export declare function pixelsToGIF(pixels: QRArtPixels, expected?: string): Promise<GIFResult>;
|
|
35
|
+
/**
|
|
36
|
+
* A canvas as a GIF, with a transparent background kept (see `pixelsToGIF`).
|
|
37
|
+
* Pass the code's value as `expected` to refuse a GIF that would not scan.
|
|
38
|
+
*/
|
|
39
|
+
export declare function canvasToGIF(canvas: HTMLCanvasElement, expected?: string): Promise<Blob>;
|
|
40
|
+
//# sourceMappingURL=gif.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gif.d.ts","sourceRoot":"","sources":["../../src/gif.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,KAAK,YAAY,EACjB,aAAa,EACb,SAAS,EACT,KAAK,cAAc,EACnB,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,8BAA8B;AAC9B,eAAO,MAAM,QAAQ,cAAc,CAAC;AAEpC,gFAAgF;AAChF,qBAAa,YAAa,SAAQ,KAAK;gBACzB,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,QAAQ,EAAE,OAAO,CAAC;CACnB;AA6CD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,WAAW,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,SAAS,CAAC,CAqBpB;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
package/dist/src/helpers.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ interface QRDataResult extends QRProps {
|
|
|
19
19
|
export declare function getLogoSizeLimit({ value, level, margin, shape, autoLevel, logoOptions, }: Pick<QRProps, "value" | "level" | "margin" | "shape" | "autoLevel"> & {
|
|
20
20
|
logoOptions?: LogoOptions;
|
|
21
21
|
}): number;
|
|
22
|
-
export declare function getQRData({ value, size, fgColor, bgColor, eyeColor, dotColor, bodyPattern, hideLogo, logo, logoOptions, margin, cornerEyePattern, cornerEyeDotPattern, level, templateId, frame, eyeColors, moduleScale, autoLevel, shape, }: QRDataProps): QRDataResult;
|
|
22
|
+
export declare function getQRData({ value, size, fgColor, bgColor, eyeColor, dotColor, bodyPattern, hideLogo, logo, logoOptions, margin, cornerEyePattern, cornerEyeDotPattern, level, templateId, frame, eyeColors, moduleScale, autoLevel, shape, eyeShapes, eyeGradient, bgRadius, backdrop, halo, shadow, }: QRDataProps): QRDataResult;
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAQhF,UAAU,WAAY,SAAQ,OAAO;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,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M,CAST;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,IAAW,EACX,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,UAAU,EACV,KAAK,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,MAAM,GACP,EAAE,WAAW,GAAG,YAAY,CAqC5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { encodeICO, ICO_MAX_DIMENSION, ICO_MIME, ICO_SIZES, type IcoImage, isICOFile, } from "./utils/ico";
|
|
2
|
+
/** A canvas as PNG file bytes. Throws where the browser can't write PNG. */
|
|
3
|
+
export declare function canvasToPNGBytes(canvas: HTMLCanvasElement): Uint8Array;
|
|
4
|
+
/**
|
|
5
|
+
* Canvases (each 1 to 256 px a side) as one ICO, an image for each, in the
|
|
6
|
+
* order given. A transparent background stays transparent.
|
|
7
|
+
*/
|
|
8
|
+
export declare function canvasesToICO(canvases: readonly HTMLCanvasElement[]): Blob;
|
|
9
|
+
/** One canvas (1 to 256 px a side) as an ICO with a single image. */
|
|
10
|
+
export declare function canvasToICO(canvas: HTMLCanvasElement): Blob;
|
|
11
|
+
//# sourceMappingURL=ico.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ico.d.ts","sourceRoot":"","sources":["../../src/ico.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,KAAK,QAAQ,EACb,SAAS,GACV,MAAM,aAAa,CAAC;AAIrB,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAWtE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI,CAY1E;AAED,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAE3D"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** biome-ignore-all lint/performance/noBarrelFile: false positive */
|
|
2
|
-
export type { QRCodePropsSVG, QRPropsCanvas, QRPropsSVG, } from "../types/react";
|
|
2
|
+
export type { QRCodePropsSVG, QRFrameSVGProps, QRPropsCanvas, QRPropsSVG, } from "../types/react";
|
|
3
3
|
export * from "./api";
|
|
4
4
|
export * from "./core";
|
|
5
5
|
export * from "./qr-code";
|
|
6
6
|
export { QRCodeCanvas } from "./qr-code-canvas";
|
|
7
7
|
export { QRCodeSVG } from "./qr-code-svg";
|
|
8
|
+
export { QRFrameSVG } from "./qr-frame-svg";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AAKrE,YAAY,EACV,cAAc,EACd,aAAa,EACb,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AAKrE,YAAY,EACV,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { CornerEyeDotPattern, CornerEyePattern, EyePosition, QRCodeShape, QRHalo, QRProps, QRShadow } from "../types";
|
|
2
|
+
import { type StylePairRisk } from "./scan-risk";
|
|
3
|
+
type EyeShapeProps = Pick<QRProps, "cornerEyePattern" | "cornerEyeDotPattern" | "eyeShapes">;
|
|
4
|
+
/**
|
|
5
|
+
* The frame (`outer`) and centre (`inner`) drawn at one eye: its own
|
|
6
|
+
* shapes from `eyeShapes`, else the code's `cornerEyePattern` and
|
|
7
|
+
* `cornerEyeDotPattern` (QRCodeSVG's defaults when neither is set).
|
|
8
|
+
*/
|
|
9
|
+
export declare function eyeShapeOf(props: EyeShapeProps, position: EyePosition): {
|
|
10
|
+
outer: CornerEyePattern;
|
|
11
|
+
inner: CornerEyeDotPattern;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The most fragile eye frame drawn on the code, per-eye shapes included:
|
|
15
|
+
* `curly` before `circle` before any other (the scan score warns about
|
|
16
|
+
* those two), so a code with one circle eye is judged by it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function weakestEyePattern(props: EyeShapeProps): CornerEyePattern;
|
|
19
|
+
/**
|
|
20
|
+
* `getStylePairRisk` across the three eyes: each eye's frame and centre
|
|
21
|
+
* (per-eye shapes included) is checked with the body, and the worst risk
|
|
22
|
+
* wins (a pair decoders miss before a shape that only warns). Null when
|
|
23
|
+
* every eye pairs well.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getEyeStyleRisk(props: Pick<QRProps, "bodyPattern"> & EyeShapeProps): StylePairRisk | null;
|
|
26
|
+
/**
|
|
27
|
+
* The background's corner radius as drawn, as a share of the code's width:
|
|
28
|
+
* `radius` capped at BG_RADIUS_MAX and by the quiet zone, so the arc never
|
|
29
|
+
* reaches the finder rows (at most BG_RADIUS_QUIET_RATIO × `margin`
|
|
30
|
+
* modules of the `modules + 2 × margin` across the artwork). 0 without a
|
|
31
|
+
* margin, and for a shaped code, which has its own outline.
|
|
32
|
+
*/
|
|
33
|
+
export declare function clampBgRadius(radius: number | undefined, modules: number, margin: number, shape?: QRCodeShape): number;
|
|
34
|
+
/**
|
|
35
|
+
* The largest `bgRadius` (share of the code's width) this code keeps its
|
|
36
|
+
* quiet zone with, for an editor's slider: 0 when the code has no margin
|
|
37
|
+
* or is shaped. The level is the one the renderer draws at: given the
|
|
38
|
+
* logo (`imageSettings`) and `autoLevel`, the logo is held to its budget
|
|
39
|
+
* first and the level resolved with it after, as createQRCodeTree does.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getBgRadiusLimit(props: Pick<QRProps, "value" | "level" | "margin" | "shape" | "size" | "autoLevel" | "imageSettings"> & {
|
|
42
|
+
isOGContext?: boolean;
|
|
43
|
+
}): number;
|
|
44
|
+
/**
|
|
45
|
+
* A color's alpha as it paints, 0 to 1: "none" and "transparent" paint
|
|
46
|
+
* nothing; hex, rgb()/rgba() and hsl()/hsla() (comma or space syntax,
|
|
47
|
+
* alpha as a number or a percentage) read their alpha. Anything else (a
|
|
48
|
+
* color name, or a value no renderer paints, which draws as the inherited
|
|
49
|
+
* fill) is opaque.
|
|
50
|
+
*/
|
|
51
|
+
export declare function colorAlpha(color: string | undefined): number;
|
|
52
|
+
/**
|
|
53
|
+
* True when something under the modules can show through the background:
|
|
54
|
+
* any alpha below 1 anywhere in its paint (the color, any gradient stop),
|
|
55
|
+
* or an image fill without an opaque underlay (the picture itself may be
|
|
56
|
+
* see-through, or faded by its opacity). No background is the default
|
|
57
|
+
* white.
|
|
58
|
+
*/
|
|
59
|
+
export declare function isSeeThroughBackground(bgColor: QRProps["bgColor"]): boolean;
|
|
60
|
+
export interface HaloRisk {
|
|
61
|
+
/** Which part of the design refuses it */
|
|
62
|
+
reason: "see-through" | "picture" | "dark-background" | "rim";
|
|
63
|
+
message: string;
|
|
64
|
+
fix: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Why a halo isn't drawn on this code, or null when it is (or there is
|
|
68
|
+
* none). A halo is drawn only where it was measured never to cost a decode
|
|
69
|
+
* (tests/halo-decode.test.ts): on an opaque background, in a rim at least
|
|
70
|
+
* as light as HALO_LIGHT_MIN and no lighter than any background color (the
|
|
71
|
+
* color, every gradient stop). A rim lighter than the background raises
|
|
72
|
+
* the light level around every dot, and decoders then misread light
|
|
73
|
+
* modules: at every width on a grey page under a see-through code, and
|
|
74
|
+
* with grey or colored dots on a light grey background (measured 21 Nov
|
|
75
|
+
* 2026, every dot shape, widths 0.1 to 0.5, 4, 6 and 9 px per module,
|
|
76
|
+
* four rasteriser and decoder pipelines). A see-through background shows
|
|
77
|
+
* whatever is under the code, and a picture its own tones, so neither
|
|
78
|
+
* takes a halo.
|
|
79
|
+
*/
|
|
80
|
+
export declare function getHaloRisk(props: Pick<QRProps, "halo" | "bgColor">): HaloRisk | null;
|
|
81
|
+
/**
|
|
82
|
+
* A halo with its defaults filled in, its width in range and its rim
|
|
83
|
+
* opaque; null without one, or when `code` is given and the halo is
|
|
84
|
+
* refused on it (getHaloRisk).
|
|
85
|
+
*/
|
|
86
|
+
export declare function resolveHalo(halo: QRHalo | undefined, code?: Pick<QRProps, "bgColor">): {
|
|
87
|
+
color: string;
|
|
88
|
+
width: number;
|
|
89
|
+
} | null;
|
|
90
|
+
/**
|
|
91
|
+
* A shadow with its defaults filled in and its shift and opacity in range;
|
|
92
|
+
* null without one, or when it wouldn't move (dx and dy both 0).
|
|
93
|
+
*/
|
|
94
|
+
export declare function resolveShadow(shadow: QRShadow | undefined): {
|
|
95
|
+
color: string;
|
|
96
|
+
opacity: number;
|
|
97
|
+
dx: number;
|
|
98
|
+
dy: number;
|
|
99
|
+
} | null;
|
|
100
|
+
export {};
|
|
101
|
+
//# sourceMappingUR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AAI,EAAE;QACJ,QAAQ,EAAE,aAAa,CAAC;QACxB,GAAG,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACvC,GAAG,IAAI,CAAC;CACV;AAED,mEAAmE;AACnE,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,WAAW,CAAC,CA4GtB;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAiC1D;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAEzE"}
|
package/dist/src/print.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../src/print.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../src/print.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AA4CxC,OAAO,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AACpC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED,uEAAuE;AACvE,MAAM,WAAW,WAAW;IAC1B,yDAAy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AAK,EAAE,OAAO,EACd,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GACnE,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr-code-canvas.d.ts","sourceRoot":"","sources":["../../src/qr-code-canvas.tsx"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,qEAAqE;AACrE,qEAAqE;AACrE,0FAA0F;AAI1F;;;;GAIG;AACH,OAAO,EAAE,KAAK,GAAG,EAA+B,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"qr-code-canvas.d.ts","sourceRoot":"","sources":["../../src/qr-code-canvas.tsx"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,qEAAqE;AACrE,qEAAqE;AACrE,0FAA0F;AAI1F;;;;GAIG;AACH,OAAO,EAAE,KAAK,GAAG,EAA+B,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAwBpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,eAiOhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr-code-props.d.ts","sourceRoot":"","sources":["../../src/qr-code-props.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,eAAe,EACf,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qDAAqD;AACrD,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"qr-code-props.d.ts","sourceRoot":"","sources":["../../src/qr-code-props.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,eAAe,EACf,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qDAAqD;AACrD,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC;AA2D1D,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAE3C,sDAAsD;AACtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAyBxD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,MAAM,GACb,YAAY,CAyEd;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAErE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { QRFrameSVGProps } from "../types/react";
|
|
3
|
+
/**
|
|
4
|
+
* A frame on its own, as a React component: `createFrameTree` drawn with
|
|
5
|
+
* React's elements, so its markup is the core's. The code's slot holds
|
|
6
|
+
* `slot` (a React element, placed and sized as the code would be) or is
|
|
7
|
+
* left empty. No hooks: it renders in React Server Components too.
|
|
8
|
+
*/
|
|
9
|
+
export declare function QRFrameSVG({ frame, size, bgColor, slot, ...svgProps }: QRFrameSVGProps): JSX.Element;
|
|
10
|
+
//# sourceMappingURL=qr-frame-svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qr-frame-svg.d.ts","sourceRoot":"","sources":["../../src/qr-frame-svg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,GAAG,QAAQ,EACZ,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAO/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-score.d.ts","sourceRoot":"","sources":["../../src/scan-score.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,OAAO,EAAE,MAAM,UAAU,CAAC;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"scan-score.d.ts","sourceRoot":"","sources":["../../src/scan-score.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,OAAO,EAAE,MAAM,UAAU,CAAC;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAyBzC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,+EAA+E;IAC/E,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WA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** biome-ignore-all lint/style/noMagicNumbers: GIF format constants and color maths */
|
|
2
|
+
/** biome-ignore-all lint/suspicious/noBitwiseOperators: LZW codes, packed fields and color keys */
|
|
3
|
+
/** Most colors a GIF palette holds. */
|
|
4
|
+
export declare const GIF_MAX_COLORS = 256;
|
|
5
|
+
/** Largest width or height written (the format allows 65 535). */
|
|
6
|
+
export declare const GIF_MAX_DIMENSION = 16384;
|
|
7
|
+
/** A pixel with less alpha than this is transparent; with this or more, opaque. */
|
|
8
|
+
export declare const GIF_ALPHA_THRESHOLD = 128;
|
|
9
|
+
/** An image as a palette and one palette index per pixel. */
|
|
10
|
+
export interface IndexedImage {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
/** Red, green, blue for each color, in that order: 3 bytes a color */
|
|
14
|
+
palette: Uint8Array;
|
|
15
|
+
/** One palette index per pixel, top row first */
|
|
16
|
+
indices: Uint8Array;
|
|
17
|
+
/** The palette index that is see-through, or null when nothing is */
|
|
18
|
+
transparentIndex: number | null;
|
|
19
|
+
}
|
|
20
|
+
export interface QuantizedImage extends IndexedImage {
|
|
21
|
+
/** How many palette entries are used (the transparent one included) */
|
|
22
|
+
colors: number;
|
|
23
|
+
/**
|
|
24
|
+
* True when every pixel keeps its color and its opacity exactly: the
|
|
25
|
+
* image had no more than 256 colors and no half-transparent pixel.
|
|
26
|
+
*/
|
|
27
|
+
lossless: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* RGBA pixels (as a canvas's getImageData or sharp's raw output returns them:
|
|
31
|
+
* `width * height * 4` bytes, top row first, not premultiplied) reduced to a
|
|
32
|
+
* GIF palette. A pixel with alpha under 128 becomes the one transparent
|
|
33
|
+
* color, and any other becomes opaque. The image's own colors are kept
|
|
34
|
+
* when they fit in 256 (255 plus the transparent one); otherwise a
|
|
35
|
+
* median-cut palette stands in for them. Throws a RangeError for a size
|
|
36
|
+
* outside 1 to GIF_MAX_DIMENSION, or pixels that don't match it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function quantizeRGBA(rgba: ArrayLike<number>, width: number, height: number): QuantizedImage;
|
|
39
|
+
/**
|
|
40
|
+
* An indexed image as a GIF89a file: one frame, a global color table, the
|
|
41
|
+
* transparent index (if any) in a graphic control extension, and LZW data.
|
|
42
|
+
* Throws a RangeError for a size outside 1 to GIF_MAX_DIMENSION, an empty or
|
|
43
|
+
* oversized palette, a transparent index outside it, or indices that don't
|
|
44
|
+
* match the size or point past the palette.
|
|
45
|
+
*/
|
|
46
|
+
export declare function encodeGIF(image: IndexedImage): Uint8Array;
|
|
47
|
+
/** Pixels as a GIF: the palette from `quantizeRGBA`, then `encodeGIF`. */
|
|
48
|
+
export declare function encodeGIFFromRGBA(rgba: ArrayLike<number>, width: number, height: number): {
|
|
49
|
+
file: Uint8Array;
|
|
50
|
+
image: QuantizedImage;
|
|
51
|
+
};
|
|
52
|
+
/** An indexed image back to RGBA (see-through pixels get alpha 0). */
|
|
53
|
+
export declare function indexedToRGBA(image: IndexedImage): Uint8ClampedArray;
|
|
54
|
+
/**
|
|
55
|
+
* True when `bytes` is a GIF this writer would make: the GIF89a header, a
|
|
56
|
+
* color table that fits the file, one image of the size the header gives with
|
|
57
|
+
* well-formed data blocks, and the trailer. Used to check a file before it is
|
|
58
|
+
* saved, so nothing else is handed out as a GIF.
|
|
59
|
+
*/
|
|
60
|
+
export declare function isGIFFile(bytes: Uint8Array): boolean;
|
|
61
|
+
//# sourceMappingURL=gif.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gif.d.ts","sourceRoot":"","sources":["../../../src/utils/gif.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,mGAAmG;AAYnG,uCAAuC;AACvC,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAcvC,6DAA6D;AAC7D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,OAAO,EAAE,UAAU,CAAC;IACpB,iDAAiD;IACjD,OAAO,EAAE,UAAU,CAAC;IACpB,qEAAqE;IACrE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EACvB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,cAAc,CA2FhB;AAkRD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,CA8DzD;AAED,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EACvB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,CAG7C;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,iBAAiB,CAYpE;AAID;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAqEpD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** biome-ignore-all lint/style/noMagicNumbers: ICO and PNG format constants */
|
|
2
|
+
/** The sizes a favicon holds: 16 and 32 px for tabs, 48 for Windows, 256 for large icons. */
|
|
3
|
+
export declare const ICO_SIZES: readonly number[];
|
|
4
|
+
/** The MIME type of an ICO (the one IANA registers; some servers send image/x-icon). */
|
|
5
|
+
export declare const ICO_MIME = "image/vnd.microsoft.icon";
|
|
6
|
+
/** Largest width or height an ICO image can have. */
|
|
7
|
+
export declare const ICO_MAX_DIMENSION = 256;
|
|
8
|
+
/** Most images one file can list (a 16-bit count; this keeps it sane). */
|
|
9
|
+
export declare const ICO_MAX_IMAGES = 64;
|
|
10
|
+
/** One image of an ICO: a PNG file and its size. */
|
|
11
|
+
export interface IcoImage {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
png: Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* PNG images (each a whole PNG file, 1 to 256 px a side, the size they say
|
|
18
|
+
* they are) as one ICO file, in the order given. Throws a RangeError for no
|
|
19
|
+
* images, too many, a size outside 1 to 256, or a file that isn't a PNG of the
|
|
20
|
+
* size stated: a mislabelled image would make a file readers reject.
|
|
21
|
+
*/
|
|
22
|
+
export declare function encodeICO(images: readonly IcoImage[]): Uint8Array;
|
|
23
|
+
/**
|
|
24
|
+
* True when `bytes` is an ICO this writer would make: the icon header, a
|
|
25
|
+
* directory whose entries fit the file, and a PNG of the stated size at each
|
|
26
|
+
* offset. Used to check a file before it is saved, so nothing else is handed
|
|
27
|
+
* out as an ICO.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isICOFile(bytes: Uint8Array): boolean;
|
|
30
|
+
//# sourceMappingURL=ico.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ico.d.ts","sourceRoot":"","sources":["../../../src/utils/ico.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAW/E,6FAA6F;AAC7F,eAAO,MAAM,SAAS,EAAE,SAAS,MAAM,EAAsB,CAAC;AAE9D,wFAAwF;AACxF,eAAO,MAAM,QAAQ,6BAA6B,CAAC;AAEnD,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,0EAA0E;AAC1E,eAAO,MAAM,cAAc,KAAK,CAAC;AAWjC,oDAAoD;AACpD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;CACjB;AAcD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,GAAG,UAAU,CAkDjE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAkCpD"}
|
|
@@ -8,7 +8,7 @@ export interface RGBAColor {
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Parses hex (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb()/rgba(), `transparent`
|
|
11
|
-
* and
|
|
11
|
+
* and the CSS color names. Returns null for anything else.
|
|
12
12
|
*/
|
|
13
13
|
export declare function parseColor(input: string | null | undefined): RGBAColor | null;
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-color.d.ts","sourceRoot":"","sources":["../../../src/utils/parse-color.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAI7D,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,oCAAoC;IACpC,CAAC,EAAE,MAAM,CAAC;CACX;
|
|
1
|
+
{"version":3,"file":"parse-color.d.ts","sourceRoot":"","sources":["../../../src/utils/parse-color.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAI7D,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,oCAAoC;IACpC,CAAC,EAAE,MAAM,CAAC;CACX;AA+KD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CA2D7E;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAc9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"print-shared.d.ts","sourceRoot":"","sources":["../../../src/utils/print-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"print-shared.d.ts","sourceRoot":"","sources":["../../../src/utils/print-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAmB3C,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3D,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,+EAA+E;AAC/E,wBAAsB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAQpE;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAqBhE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAef;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,QAO9D"}
|
|
@@ -7,6 +7,10 @@ export interface PaintState {
|
|
|
7
7
|
fillRule: string;
|
|
8
8
|
stroke: string;
|
|
9
9
|
strokeWidth: number;
|
|
10
|
+
/** Inherited `stroke-linejoin` (SVG's miter when unset) */
|
|
11
|
+
strokeLinejoin?: string;
|
|
12
|
+
/** Inherited `stroke-linecap` (SVG's butt when unset) */
|
|
13
|
+
strokeLinecap?: string;
|
|
10
14
|
fontSize: number;
|
|
11
15
|
fontWeight: string;
|
|
12
16
|
textAnchor: string;
|
|
@@ -20,6 +24,15 @@ export interface PaintState {
|
|
|
20
24
|
*/
|
|
21
25
|
opacity?: number;
|
|
22
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* A stroke's line join and cap as PDF and PostScript number them (0 miter
|
|
29
|
+
* or butt, 1 round, 2 bevel or square), for painters that draw SVG strokes.
|
|
30
|
+
* Both are 0 for SVG's defaults, which are also PDF's and PostScript's.
|
|
31
|
+
*/
|
|
32
|
+
export declare function lineStyleOf(state: PaintState): {
|
|
33
|
+
join: number;
|
|
34
|
+
cap: number;
|
|
35
|
+
};
|
|
23
36
|
export type PaintColor = RGBAColor | null;
|
|
24
37
|
/**
|
|
25
38
|
* A fill: a solid color (its `a` folds in fill-opacity and opacity), a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-painter.d.ts","sourceRoot":"","sources":["../../../src/utils/svg-painter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAGL,KAAK,MAAM,EAMX,KAAK,OAAO,EACZ,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAiBxB,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,8CAA8C;IAC9C,WAAW,CAAC,EA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OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GAAG,UAAU,CAkCb;AAED,wBAAgB,4BAA4B,CAC1C,uBAAuB,EAAE;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B,EACD,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM;;;;;EASf;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAgwB5D;AAOD,eAAO,MAAM,eAAe,SAOxB,CAAC;AAGL,eAAO,MAAM,QAAQ,GACnB,KAAK,MAAM,KACV;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAqBxC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAM9D,CAAC;AAcF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,EAAE,QAAQ,MAAM,KAAG,MAejE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAmBpD,CAAC"}
|
|
@@ -8,7 +8,7 @@ export interface QRCodeExportOptions {
|
|
|
8
8
|
quality?: number;
|
|
9
9
|
}
|
|
10
10
|
export interface QRCodeDownloadOptions extends QRCodeExportOptions {
|
|
11
|
-
/** "png" (default), "jpg", "webp", "bmp", "svg", "pdf" (needs jspdf) or "eps" */
|
|
11
|
+
/** "png" (default), "jpg", "webp", "bmp", "ico", "gif", "svg", "pdf" (needs jspdf) or "eps" */
|
|
12
12
|
format?: DownloadFormat;
|
|
13
13
|
/** File name; defaults to one with the format and pixel size */
|
|
14
14
|
filename?: string;
|
|
@@ -26,7 +26,7 @@ export interface QRCodeInstance {
|
|
|
26
26
|
update(options: Partial<QRSVGOptions>): void;
|
|
27
27
|
/** The code's SVG markup, as `toSVGString` writes it */
|
|
28
28
|
toSVGString(): string;
|
|
29
|
-
/** The code as a data URL: "png" (default), "jpg", "webp", "bmp", "svg", "pdf" or "eps" */
|
|
29
|
+
/** The code as a data URL: "png" (default), "jpg", "webp", "bmp", "ico", "gif", "svg", "pdf" or "eps" */
|
|
30
30
|
toDataURL(format?: DownloadFormat, options?: QRCodeExportOptions): Promise<string>;
|
|
31
31
|
/** Saves the code as a file (a PNG unless `format` says otherwise) */
|
|
32
32
|
download(options?: QRCodeDownloadOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vanilla-api.d.ts","sourceRoot":"","sources":["../../src/vanilla-api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAGL,KAAK,cAAc,EAKpB,MAAM,UAAU,CAAC;AAElB,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE
|
|
1
|
+
{"version":3,"file":"vanilla-api.d.ts","sourceRoot":"","sources":["../../src/vanilla-api.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAGL,KAAK,cAAc,EAKpB,MAAM,UAAU,CAAC;AAElB,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,+FAA+F;IAC/F,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,4DAA4D;IAC5D,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IACzC;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IAC7C,wDAAwD;IACxD,WAAW,IAAI,MAAM,CAAC;IACtB,yGAAyG;IACzG,SAAS,CACP,MAAM,CAAC,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,iEAAiE;IACjE,OAAO,IAAI,IAAI,CAAC;CACjB;AAOD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,OAAO,GAAG,MAAM,EAC3B,OAAO,EAAE,YAAY,GACpB,cAAc,CA0EhB"}
|
package/dist/src/vue.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export interface UseQRCodeReturn {
|
|
|
37
37
|
readonly options: ComputedRef<QRSVGOptions>;
|
|
38
38
|
/** The code's SVG markup, as `toSVGString` writes it; follows the props */
|
|
39
39
|
readonly svg: ComputedRef<string>;
|
|
40
|
-
/** The code as a data URL: "png" (default), "jpg", "webp", "bmp", "svg", "pdf" or "eps" */
|
|
40
|
+
/** The code as a data URL: "png" (default), "jpg", "webp", "bmp", "ico", "gif", "svg", "pdf" or "eps" */
|
|
41
41
|
toDataURL(format?: DownloadFormat, options?: QRCodeExportOptions): Promise<string>;
|
|
42
42
|
/** Saves the code as a file (a PNG unless `format` says otherwise) */
|
|
43
43
|
download(options?: QRCodeDownloadOptions): Promise<void>;
|
package/dist/src/vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAWxF,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,sBAAsB,EAI3B,KAAK,gBAAgB,EAKtB,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,KAAK,cAAc,EAGnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,YAAY,EAIlB,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEhF,cAAc,QAAQ,CAAC;AACvB,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEhF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAWxF,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,sBAAsB,EAI3B,KAAK,gBAAgB,EAKtB,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,KAAK,cAAc,EAGnB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,YAAY,EAIlB,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,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