qrdx 0.0.50 → 0.0.52
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 +212 -8
- package/dist/angular.js +252 -0
- package/dist/angular.js.map +1 -0
- package/dist/angular.mjs +226 -0
- package/dist/angular.mjs.map +1 -0
- package/dist/core.js +31 -0
- package/dist/core.js.map +1 -0
- package/dist/core.mjs +31 -0
- package/dist/core.mjs.map +1 -0
- package/dist/element-define.browser.mjs +2 -0
- package/dist/element-define.browser.mjs.map +1 -0
- package/dist/element-define.js +2 -0
- package/dist/element-define.js.map +1 -0
- package/dist/element-define.mjs +2 -0
- package/dist/element-define.mjs.map +1 -0
- package/dist/element.browser.mjs +91 -0
- package/dist/element.browser.mjs.map +1 -0
- package/dist/element.js +2 -0
- package/dist/element.js.map +1 -0
- package/dist/element.mjs +2 -0
- package/dist/element.mjs.map +1 -0
- 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/node.js +2 -5
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +2 -5
- package/dist/node.mjs.map +1 -1
- package/dist/preact.js +2 -0
- package/dist/preact.js.map +1 -0
- package/dist/preact.mjs +2 -0
- package/dist/preact.mjs.map +1 -0
- 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/solid.js +2 -0
- package/dist/solid.js.map +1 -0
- package/dist/solid.mjs +2 -0
- package/dist/solid.mjs.map +1 -0
- package/dist/src/angular.d.ts +94 -0
- package/dist/src/api.d.ts +8 -2
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/art.d.ts +4 -3
- package/dist/src/art.d.ts.map +1 -1
- package/dist/src/body-patterns.d.ts +3 -2
- package/dist/src/body-patterns.d.ts.map +1 -1
- package/dist/src/core.d.ts +5 -0
- package/dist/src/core.d.ts.map +1 -0
- package/dist/src/corner-dot.d.ts +3 -2
- package/dist/src/corner-dot.d.ts.map +1 -1
- package/dist/src/element-define.d.ts +3 -0
- package/dist/src/element-define.d.ts.map +1 -0
- package/dist/src/element.d.ts +150 -0
- package/dist/src/element.d.ts.map +1 -0
- package/dist/src/engine.d.ts +44 -0
- package/dist/src/engine.d.ts.map +1 -0
- package/dist/src/export.d.ts +5 -0
- package/dist/src/export.d.ts.map +1 -0
- package/dist/src/frame-spec.d.ts +22 -4
- package/dist/src/frame-spec.d.ts.map +1 -1
- package/dist/src/frame-text.d.ts +19 -0
- package/dist/src/frame-text.d.ts.map +1 -0
- package/dist/src/frame.d.ts +18 -11
- package/dist/src/frame.d.ts.map +1 -1
- package/dist/src/frames/builtin.d.ts +53 -5
- package/dist/src/frames/builtin.d.ts.map +1 -1
- package/dist/src/frames/catalogue/all.d.ts.map +1 -1
- package/dist/src/frames/catalogue/automotive.d.ts +5 -0
- package/dist/src/frames/catalogue/automotive.d.ts.map +1 -0
- package/dist/src/frames/catalogue/beauty-wellness.d.ts +5 -0
- package/dist/src/frames/catalogue/beauty-wellness.d.ts.map +1 -0
- package/dist/src/frames/catalogue/business.d.ts.map +1 -1
- package/dist/src/frames/catalogue/call-to-action.d.ts.map +1 -1
- package/dist/src/frames/catalogue/counts.d.ts +15 -10
- package/dist/src/frames/catalogue/counts.d.ts.map +1 -1
- package/dist/src/frames/catalogue/events.d.ts.map +1 -1
- package/dist/src/frames/catalogue/food-drink.d.ts.map +1 -1
- package/dist/src/frames/catalogue/health-learning.d.ts.map +1 -1
- package/dist/src/frames/catalogue/holidays.d.ts.map +1 -1
- package/dist/src/frames/catalogue/index.d.ts.map +1 -1
- package/dist/src/frames/catalogue/nonprofit.d.ts +5 -0
- package/dist/src/frames/catalogue/nonprofit.d.ts.map +1 -0
- package/dist/src/frames/catalogue/places.d.ts.map +1 -1
- package/dist/src/frames/catalogue/real-estate.d.ts +5 -0
- package/dist/src/frames/catalogue/real-estate.d.ts.map +1 -0
- package/dist/src/frames/catalogue/seasons.d.ts.map +1 -1
- package/dist/src/frames/catalogue/shopping.d.ts.map +1 -1
- package/dist/src/frames/catalogue/sports-fitness.d.ts +5 -0
- package/dist/src/frames/catalogue/sports-fitness.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/index.d.ts +3 -38
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/jsx/index.d.ts +2 -0
- package/dist/src/jsx/index.d.ts.map +1 -0
- package/dist/src/jsx/jsx-dev-runtime.d.ts +5 -0
- package/dist/src/jsx/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/src/jsx/jsx-runtime.d.ts +30 -0
- package/dist/src/jsx/jsx-runtime.d.ts.map +1 -0
- package/dist/src/jsx/runtime.d.ts +73 -0
- package/dist/src/jsx/runtime.d.ts.map +1 -0
- package/dist/src/logo.d.ts +3 -2
- package/dist/src/logo.d.ts.map +1 -1
- package/dist/src/node.d.ts.map +1 -1
- package/dist/src/plain.d.ts +31 -0
- package/dist/src/plain.d.ts.map +1 -0
- package/dist/src/preact.d.ts +29 -0
- package/dist/src/preact.d.ts.map +1 -0
- package/dist/src/qr-code-canvas.d.ts +1 -1
- package/dist/src/qr-code-canvas.d.ts.map +1 -1
- package/dist/src/qr-code-props.d.ts +22 -0
- package/dist/src/qr-code-props.d.ts.map +1 -0
- package/dist/src/qr-code-svg.d.ts +10 -0
- package/dist/src/qr-code-svg.d.ts.map +1 -0
- package/dist/src/qr-code.d.ts +2 -10
- package/dist/src/qr-code.d.ts.map +1 -1
- package/dist/src/react-elements.d.ts +3 -0
- package/dist/src/react-elements.d.ts.map +1 -0
- package/dist/src/render/attributes.d.ts +33 -0
- package/dist/src/render/attributes.d.ts.map +1 -0
- package/dist/src/render/dom.d.ts +8 -0
- package/dist/src/render/dom.d.ts.map +1 -0
- package/dist/src/render/hyperscript.d.ts +10 -0
- package/dist/src/render/hyperscript.d.ts.map +1 -0
- package/dist/src/render/string.d.ts +8 -0
- package/dist/src/render/string.d.ts.map +1 -0
- package/dist/src/scan-score.d.ts +4 -3
- package/dist/src/scan-score.d.ts.map +1 -1
- package/dist/src/solid.d.ts +21 -0
- package/dist/src/solid.d.ts.map +1 -0
- package/dist/src/svg.d.ts +14 -0
- package/dist/src/svg.d.ts.map +1 -0
- package/dist/src/template/arrow.d.ts +1 -0
- package/dist/src/template/arrow.d.ts.map +1 -1
- package/dist/src/template/default.d.ts +1 -0
- package/dist/src/template/default.d.ts.map +1 -1
- package/dist/src/template/dot-ring-layout.d.ts +44 -0
- package/dist/src/template/dot-ring-layout.d.ts.map +1 -0
- package/dist/src/template/dot-ring.d.ts +41 -0
- package/dist/src/template/dot-ring.d.ts.map +1 -0
- package/dist/src/template/halloween.d.ts +1 -0
- package/dist/src/template/halloween.d.ts.map +1 -1
- package/dist/src/template/index.d.ts +1 -0
- package/dist/src/template/index.d.ts.map +1 -1
- package/dist/src/template/square-border.d.ts +1 -0
- package/dist/src/template/square-border.d.ts.map +1 -1
- package/dist/src/template/standard-box.d.ts +1 -0
- package/dist/src/template/standard-box.d.ts.map +1 -1
- package/dist/src/template/striked-box.d.ts +1 -0
- package/dist/src/template/striked-box.d.ts.map +1 -1
- package/dist/src/template-placement.d.ts +8 -0
- package/dist/src/template-placement.d.ts.map +1 -0
- package/dist/src/templates.d.ts.map +1 -1
- package/dist/src/utils.d.ts +9 -3
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/vanilla-api.d.ts +47 -0
- package/dist/src/vanilla-api.d.ts.map +1 -0
- package/dist/src/vanilla-browser.d.ts +4 -0
- package/dist/src/vanilla-browser.d.ts.map +1 -0
- package/dist/src/vanilla.d.ts +4 -0
- package/dist/src/vanilla.d.ts.map +1 -0
- package/dist/src/vue.d.ts +56 -0
- package/dist/src/vue.d.ts.map +1 -0
- package/dist/types/frame-spec.d.ts +149 -14
- package/dist/types/frame-spec.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.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/public.d.ts +3 -0
- package/dist/types/public.d.ts.map +1 -0
- package/dist/types/qr.d.ts +43 -7
- package/dist/types/qr.d.ts.map +1 -1
- package/dist/types/react.d.ts +5 -0
- package/dist/types/react.d.ts.map +1 -0
- package/dist/types/template.d.ts +7 -1
- package/dist/types/template.d.ts.map +1 -1
- package/dist/vanilla.browser.mjs +92 -0
- package/dist/vanilla.browser.mjs.map +1 -0
- package/dist/vanilla.js +2 -0
- package/dist/vanilla.js.map +1 -0
- package/dist/vanilla.mjs +2 -0
- package/dist/vanilla.mjs.map +1 -0
- package/dist/vue.js +2 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +2 -0
- package/dist/vue.mjs.map +1 -0
- package/package.json +130 -8
- package/src/angular.ts +218 -0
- package/src/api.tsx +16 -140
- package/src/art.tsx +18 -16
- package/src/body-patterns.tsx +5 -3
- package/src/core.ts +13 -0
- package/src/corner-dot.tsx +4 -2
- package/src/download.tsx +1 -1
- package/src/element-define.ts +9 -0
- package/src/element.ts +608 -0
- package/src/engine.ts +181 -0
- package/src/export.ts +212 -0
- package/src/frame-spec.ts +314 -54
- package/src/frame-text.ts +111 -0
- package/src/frame.tsx +24 -286
- package/src/frames/builtin/badge.json +108 -0
- package/src/frames/builtin/banner-bottom.json +2 -1
- package/src/frames/builtin/banner-top-bottom.json +72 -0
- package/src/frames/builtin/banner-top.json +59 -0
- package/src/frames/builtin/border.json +62 -0
- package/src/frames/builtin/chat-bubble.json +54 -0
- package/src/frames/builtin/circle.json +2 -1
- package/src/frames/builtin/envelope.json +81 -0
- package/src/frames/builtin/focus.json +88 -0
- package/src/frames/builtin/gradient-border.json +76 -0
- package/src/frames/builtin/menu-card.json +108 -0
- package/src/frames/builtin/phone.json +75 -0
- package/src/frames/builtin/polaroid.json +56 -0
- package/src/frames/builtin/rounded-border.json +8 -4
- package/src/frames/builtin/speech-bubble-top.json +76 -0
- package/src/frames/builtin/speech-bubble.json +76 -0
- package/src/frames/builtin/sticker.json +78 -0
- package/src/frames/builtin/tag.json +55 -0
- package/src/frames/builtin.ts +181 -12
- package/src/frames/catalogue/all.ts +1190 -0
- package/src/frames/catalogue/automotive.ts +63 -0
- package/src/frames/catalogue/beauty-wellness.ts +61 -0
- package/src/frames/catalogue/business.ts +68 -0
- package/src/frames/catalogue/call-to-action.ts +60 -0
- package/src/frames/catalogue/counts.ts +15 -10
- package/src/frames/catalogue/events.ts +90 -0
- package/src/frames/catalogue/food-drink.ts +78 -0
- package/src/frames/catalogue/health-learning.ts +62 -14
- package/src/frames/catalogue/holidays.ts +336 -0
- package/src/frames/catalogue/index.ts +5173 -16
- package/src/frames/catalogue/nonprofit.ts +65 -0
- package/src/frames/catalogue/places.ts +92 -18
- package/src/frames/catalogue/real-estate.ts +79 -0
- package/src/frames/catalogue/seasons.ts +64 -0
- package/src/frames/catalogue/shopping.ts +68 -0
- package/src/frames/catalogue/sports-fitness.ts +81 -0
- package/src/frames/catalogue/tags.ts +738 -0
- package/src/frames/collections.ts +5 -0
- package/src/frames/official/add-engraving.json +90 -0
- package/src/frames/official/add-to-calendar.json +98 -0
- package/src/frames/official/adopt-me.json +72 -0
- package/src/frames/official/africa-day.json +110 -0
- package/src/frames/official/aftercare-guide.json +98 -0
- package/src/frames/official/alterations.json +142 -0
- package/src/frames/official/annual-report.json +85 -0
- package/src/frames/official/aquarium-feeding.json +113 -0
- package/src/frames/official/archery-lesson.json +106 -0
- package/src/frames/official/arrival-guide.json +71 -0
- package/src/frames/official/art-class.json +137 -0
- package/src/frames/official/ask-a-stylist.json +112 -0
- package/src/frames/official/assembly-guide.json +93 -0
- package/src/frames/official/autumn-apple-picking.json +81 -0
- package/src/frames/official/autumn-mushroom.json +72 -0
- package/src/frames/official/autumn-pumpkin-patch.json +83 -0
- package/src/frames/official/avurudu-pot.json +87 -0
- package/src/frames/official/badminton-session.json +104 -0
- package/src/frames/official/bake-sale.json +158 -0
- package/src/frames/official/bakery-board.json +80 -0
- package/src/frames/official/barber-booking.json +64 -0
- package/src/frames/official/bath-ritual.json +70 -0
- package/src/frames/official/bathroom-showroom.json +113 -0
- package/src/frames/official/battery-check.json +95 -0
- package/src/frames/official/beach-conditions.json +113 -0
- package/src/frames/official/beach-info-sticker.json +81 -0
- package/src/frames/official/beach-lifeguard.json +71 -0
- package/src/frames/official/beauty-rewards.json +81 -0
- package/src/frames/official/become-a-member.json +79 -0
- package/src/frames/official/bike-service.json +113 -0
- package/src/frames/official/blood-donor-drop.json +87 -0
- package/src/frames/official/blood-donor-sticker.json +94 -0
- package/src/frames/official/book-a-call.json +105 -0
- package/src/frames/official/book-a-cleaning.json +92 -0
- package/src/frames/official/book-a-consultation.json +101 -0
- package/src/frames/official/book-a-court.json +74 -0
- package/src/frames/official/book-a-facial.json +108 -0
- package/src/frames/official/book-a-massage.json +80 -0
- package/src/frames/official/book-a-vaccine.json +88 -0
- package/src/frames/official/book-day-arch.json +71 -0
- package/src/frames/official/book-day-list.json +114 -0
- package/src/frames/official/book-this-room.json +80 -0
- package/src/frames/official/boxing-class.json +81 -0
- package/src/frames/official/brewery-tour.json +89 -0
- package/src/frames/official/bridal-beauty.json +80 -0
- package/src/frames/official/brunch-menu.json +79 -0
- package/src/frames/official/bubble-tea.json +81 -0
- package/src/frames/official/bulk-orders.json +108 -0
- package/src/frames/official/burger-order.json +80 -0
- package/src/frames/official/call-a-server.json +115 -0
- package/src/frames/official/camp-check-in.json +74 -0
- package/src/frames/official/camp-fire-rules.json +114 -0
- package/src/frames/official/camp-map.json +85 -0
- package/src/frames/official/car-detailing.json +102 -0
- package/src/frames/official/car-details.json +90 -0
- package/src/frames/official/car-for-sale.json +74 -0
- package/src/frames/official/car-service.json +92 -0
- package/src/frames/official/carnival-mask.json +76 -0
- package/src/frames/official/carnival-pass.json +85 -0
- package/src/frames/official/carnival-plume.json +71 -0
- package/src/frames/official/carpool.json +79 -0
- package/src/frames/official/catering-order.json +79 -0
- package/src/frames/official/charging-prices.json +105 -0
- package/src/frames/official/charity-shop.json +75 -0
- package/src/frames/official/check-symptoms.json +80 -0
- package/src/frames/official/cheese-pairing.json +91 -0
- package/src/frames/official/chess-club.json +64 -0
- package/src/frames/official/chess-lessons.json +83 -0
- package/src/frames/official/childrens-day-carp.json +114 -0
- package/src/frames/official/childrens-day-sticker.json +88 -0
- package/src/frames/official/choose-your-plan.json +113 -0
- package/src/frames/official/choose-your-wash.json +86 -0
- package/src/frames/official/chuseok-gift-tag.json +59 -0
- package/src/frames/official/chuseok-moon.json +99 -0
- package/src/frames/official/chuseok-songpyeon.json +114 -0
- package/src/frames/official/clean-beauty.json +94 -0
- package/src/frames/official/click-and-collect.json +85 -0
- package/src/frames/official/clock-in.json +101 -0
- package/src/frames/official/club-fees.json +94 -0
- package/src/frames/official/coach-sign-up.json +108 -0
- package/src/frames/official/community-notices.json +107 -0
- package/src/frames/official/compare-specs.json +112 -0
- package/src/frames/official/consultation-form.json +120 -0
- package/src/frames/official/continued-online.json +81 -0
- package/src/frames/official/cookie-box.json +88 -0
- package/src/frames/official/cooking-class.json +89 -0
- package/src/frames/official/cowork-desk.json +82 -0
- package/src/frames/official/cowork-meeting-room.json +107 -0
- package/src/frames/official/coworking-pass.json +89 -0
- package/src/frames/official/cricket-club.json +158 -0
- package/src/frames/official/cupcake-order.json +108 -0
- package/src/frames/official/damage-report.json +114 -0
- package/src/frames/official/dashboard-lights.json +106 -0
- package/src/frames/official/delivery-instructions.json +98 -0
- package/src/frames/official/diy-how-to.json +87 -0
- package/src/frames/official/donate-coats.json +74 -0
- package/src/frames/official/donate-food.json +80 -0
- package/src/frames/official/donation-jar.json +101 -0
- package/src/frames/official/donut-shop.json +94 -0
- package/src/frames/official/dragon-boat-race.json +83 -0
- package/src/frames/official/dragon-boat-ticket.json +98 -0
- package/src/frames/official/dragon-boat-zongzi.json +81 -0
- package/src/frames/official/dress-fitting.json +64 -0
- package/src/frames/official/driving-lessons.json +110 -0
- package/src/frames/official/dumpling-house.json +82 -0
- package/src/frames/official/durga-puja-lotus.json +114 -0
- package/src/frames/official/dussehra-seal.json +187 -0
- package/src/frames/official/earth-day-globe.json +77 -0
- package/src/frames/official/earth-day-pledge.json +66 -0
- package/src/frames/official/earth-day-recycle.json +109 -0
- package/src/frames/official/enkutatash-daisy.json +87 -0
- package/src/frames/official/enkutatash-seal.json +179 -0
- package/src/frames/official/environment-day.json +83 -0
- package/src/frames/official/event-anniversary.json +107 -0
- package/src/frames/official/event-awards.json +93 -0
- package/src/frames/official/event-baby-gifts.json +113 -0
- package/src/frames/official/event-baby-shower.json +70 -0
- package/src/frames/official/event-birth-announcement.json +71 -0
- package/src/frames/official/event-book-fair.json +142 -0
- package/src/frames/official/event-booth.json +98 -0
- package/src/frames/official/event-craft-fair.json +96 -0
- package/src/frames/official/event-cupcake.json +81 -0
- package/src/frames/official/event-engagement.json +116 -0
- package/src/frames/official/event-film-festival.json +92 -0
- package/src/frames/official/event-food-festival.json +108 -0
- package/src/frames/official/event-fun-run.json +107 -0
- package/src/frames/official/event-gala.json +121 -0
- package/src/frames/official/event-game-night.json +97 -0
- package/src/frames/official/event-grad-diploma.json +126 -0
- package/src/frames/official/event-grad-party.json +108 -0
- package/src/frames/official/event-grad-seal.json +186 -0
- package/src/frames/official/event-grad-stream.json +94 -0
- package/src/frames/official/event-guest-book.json +121 -0
- package/src/frames/official/event-hackathon.json +82 -0
- package/src/frames/official/event-keynote.json +74 -0
- package/src/frames/official/event-match-lineup.json +66 -0
- package/src/frames/official/event-meetup.json +86 -0
- package/src/frames/official/event-memorial.json +124 -0
- package/src/frames/official/event-milestone.json +168 -0
- package/src/frames/official/event-night-market.json +88 -0
- package/src/frames/official/event-open-mic.json +94 -0
- package/src/frames/official/event-party-hat.json +74 -0
- package/src/frames/official/event-prom.json +82 -0
- package/src/frames/official/event-quince.json +70 -0
- package/src/frames/official/event-retirement.json +92 -0
- package/src/frames/official/event-reunion.json +98 -0
- package/src/frames/official/event-runner-tracker.json +101 -0
- package/src/frames/official/event-season-ticket.json +89 -0
- package/src/frames/official/event-session-feedback.json +89 -0
- package/src/frames/official/event-setlist.json +70 -0
- package/src/frames/official/event-short-films.json +113 -0
- package/src/frames/official/event-slides.json +85 -0
- package/src/frames/official/event-speaker-qa.json +112 -0
- package/src/frames/official/event-talent-show.json +130 -0
- package/src/frames/official/event-tour-merch.json +63 -0
- package/src/frames/official/event-tournament.json +98 -0
- package/src/frames/official/event-trivia.json +79 -0
- package/src/frames/official/event-workshop.json +127 -0
- package/src/frames/official/eye-exam.json +70 -0
- package/src/frames/official/eyewear-try-on.json +99 -0
- package/src/frames/official/fan-club.json +152 -0
- package/src/frames/official/farm-stand.json +109 -0
- package/src/frames/official/farmers-market.json +74 -0
- package/src/frames/official/festa-della-repubblica.json +100 -0
- package/src/frames/official/festa-junina-bonfire.json +81 -0
- package/src/frames/official/festa-junina-corn.json +72 -0
- package/src/frames/official/festa-junina-flags.json +110 -0
- package/src/frames/official/fiestas-patrias-chile.json +76 -0
- package/src/frames/official/find-a-charger.json +107 -0
- package/src/frames/official/find-a-doctor.json +85 -0
- package/src/frames/official/find-it-in-store.json +101 -0
- package/src/frames/official/find-our-office.json +80 -0
- package/src/frames/official/first-aid-guide.json +109 -0
- package/src/frames/official/fish-market.json +113 -0
- package/src/frames/official/fitness-challenge.json +1 -1
- package/src/frames/official/fitness-equipment.json +1 -1
- package/src/frames/official/fitness-kettlebell.json +1 -1
- package/src/frames/official/fitness-schedule.json +1 -1
- package/src/frames/official/fitness-test.json +94 -0
- package/src/frames/official/fitness-timer.json +1 -1
- package/src/frames/official/fitness-trial.json +1 -1
- package/src/frames/official/fitness-yoga.json +1 -1
- package/src/frames/official/food-day-wheat.json +109 -0
- package/src/frames/official/food-support.json +102 -0
- package/src/frames/official/food-truck-location.json +80 -0
- package/src/frames/official/freedom-day-south-africa.json +109 -0
- package/src/frames/official/furnished-rental.json +101 -0
- package/src/frames/official/game-night.json +79 -0
- package/src/frames/official/ganesh-marigold.json +71 -0
- package/src/frames/official/ganesh-modak.json +81 -0
- package/src/frames/official/ganesh-pandal.json +109 -0
- package/src/frames/official/garden-design.json +70 -0
- package/src/frames/official/garden-plant-label.json +98 -0
- package/src/frames/official/garden-plot.json +74 -0
- package/src/frames/official/german-unity-day.json +100 -0
- package/src/frames/official/get-a-quote.json +113 -0
- package/src/frames/official/get-it-delivered.json +82 -0
- package/src/frames/official/get-started-rocket.json +80 -0
- package/src/frames/official/get-the-brochure.json +116 -0
- package/src/frames/official/gift-ideas.json +86 -0
- package/src/frames/official/gift-message.json +85 -0
- package/src/frames/official/give-blood.json +88 -0
- package/src/frames/official/giving-jar.json +89 -0
- package/src/frames/official/golf-scorecard.json +120 -0
- package/src/frames/official/grand-opening.json +158 -0
- package/src/frames/official/green-ribbon.json +123 -0
- package/src/frames/official/grill-menu.json +92 -0
- package/src/frames/official/gudi-padwa.json +81 -0
- package/src/frames/official/hanami-arch.json +71 -0
- package/src/frames/official/hanami-picnic.json +90 -0
- package/src/frames/official/hanami-sakura.json +81 -0
- package/src/frames/official/hand-washing.json +106 -0
- package/src/frames/official/handyman.json +130 -0
- package/src/frames/official/hari-raya-haji.json +122 -0
- package/src/frames/official/hari-raya-ketupat.json +81 -0
- package/src/frames/official/hari-raya-open-house.json +114 -0
- package/src/frames/official/hari-raya-pelita.json +77 -0
- package/src/frames/official/harvest-basket.json +87 -0
- package/src/frames/official/harvest-corn.json +115 -0
- package/src/frames/official/harvest-hay.json +89 -0
- package/src/frames/official/harvest-market.json +109 -0
- package/src/frames/official/hear-it-spoken.json +86 -0
- package/src/frames/official/hijri-new-year-stamp.json +77 -0
- package/src/frames/official/hijri-new-year.json +122 -0
- package/src/frames/official/historic-marker.json +176 -0
- package/src/frames/official/home-valuation.json +87 -0
- package/src/frames/official/homework-help.json +79 -0
- package/src/frames/official/hostel-check-in.json +113 -0
- package/src/frames/official/hostel-house-rules.json +136 -0
- package/src/frames/official/hostel-local-tips.json +86 -0
- package/src/frames/official/hot-shave.json +121 -0
- package/src/frames/official/house-rules.json +121 -0
- package/src/frames/official/how-it-works.json +98 -0
- package/src/frames/official/how-to-apply.json +93 -0
- package/src/frames/official/impact-report.json +90 -0
- package/src/frames/official/independence-argentina.json +105 -0
- package/src/frames/official/independence-bangladesh.json +64 -0
- package/src/frames/official/independence-colombia.json +108 -0
- package/src/frames/official/independence-ghana.json +105 -0
- package/src/frames/official/independence-indonesia.json +92 -0
- package/src/frames/official/independence-nigeria.json +100 -0
- package/src/frames/official/independence-pakistan.json +95 -0
- package/src/frames/official/independence-peru.json +100 -0
- package/src/frames/official/independence-poland.json +92 -0
- package/src/frames/official/independence-ukraine.json +92 -0
- package/src/frames/official/intake-forms.json +114 -0
- package/src/frames/official/inti-raymi-sun.json +183 -0
- package/src/frames/official/jamhuri-day.json +116 -0
- package/src/frames/official/janmashtami-feather.json +77 -0
- package/src/frames/official/janmashtami-flute.json +81 -0
- package/src/frames/official/join-a-league.json +94 -0
- package/src/frames/official/join-the-cleanup.json +110 -0
- package/src/frames/official/join-the-waitlist.json +102 -0
- package/src/frames/official/join-the-webinar.json +108 -0
- package/src/frames/official/juice-bar.json +70 -0
- package/src/frames/official/juneteenth-seal.json +187 -0
- package/src/frames/official/juneteenth-star.json +81 -0
- package/src/frames/official/kids-haircuts.json +75 -0
- package/src/frames/official/kids-menu.json +107 -0
- package/src/frames/official/kindness-day.json +109 -0
- package/src/frames/official/kings-day-crown.json +88 -0
- package/src/frames/official/kwanzaa-bands.json +100 -0
- package/src/frames/official/kwanzaa-harvest.json +77 -0
- package/src/frames/official/kwanzaa-kinara.json +81 -0
- package/src/frames/official/lantern-festival-riddles.json +77 -0
- package/src/frames/official/lantern-festival-tangyuan.json +122 -0
- package/src/frames/official/large-print.json +80 -0
- package/src/frames/official/lash-bar.json +86 -0
- package/src/frames/official/last-chance.json +94 -0
- package/src/frames/official/late-night-menu.json +77 -0
- package/src/frames/official/learn-the-signs.json +107 -0
- package/src/frames/official/library-card.json +90 -0
- package/src/frames/official/library-catalog.json +120 -0
- package/src/frames/official/library-ebooks.json +107 -0
- package/src/frames/official/library-hours.json +107 -0
- package/src/frames/official/live-scores.json +101 -0
- package/src/frames/official/lohri-bonfire.json +81 -0
- package/src/frames/official/lohri-dhol.json +114 -0
- package/src/frames/official/lost-and-found.json +85 -0
- package/src/frames/official/lost-pet-tag.json +84 -0
- package/src/frames/official/loy-krathong-float.json +88 -0
- package/src/frames/official/loy-krathong-moon.json +96 -0
- package/src/frames/official/loy-krathong-program.json +128 -0
- package/src/frames/official/make-a-claim.json +74 -0
- package/src/frames/official/makeup-artist.json +94 -0
- package/src/frames/official/mardi-gras-seal.json +183 -0
- package/src/frames/official/marina-welcome.json +172 -0
- package/src/frames/official/maslenitsa-pancakes.json +81 -0
- package/src/frames/official/maslenitsa-sun.json +183 -0
- package/src/frames/official/math-practice.json +136 -0
- package/src/frames/official/meal-plan.json +121 -0
- package/src/frames/official/meet-the-maker.json +91 -0
- package/src/frames/official/meet-the-team.json +82 -0
- package/src/frames/official/membership-card.json +108 -0
- package/src/frames/official/mid-autumn-gift.json +105 -0
- package/src/frames/official/mid-autumn-lantern-walk.json +96 -0
- package/src/frames/official/mid-autumn-mooncake.json +81 -0
- package/src/frames/official/mid-autumn-rabbit.json +77 -0
- package/src/frames/official/mid-autumn-seal.json +178 -0
- package/src/frames/official/monsoon-boots.json +88 -0
- package/src/frames/official/monsoon-chai.json +82 -0
- package/src/frames/official/monsoon-cloud.json +114 -0
- package/src/frames/official/monsoon-paper-boat.json +71 -0
- package/src/frames/official/monsoon-umbrella.json +81 -0
- package/src/frames/official/mortgage-calculator.json +94 -0
- package/src/frames/official/moving-checklist.json +108 -0
- package/src/frames/official/muertos-marigold.json +87 -0
- package/src/frames/official/muertos-ofrenda.json +129 -0
- package/src/frames/official/muertos-pan.json +78 -0
- package/src/frames/official/muertos-papel-picado.json +120 -0
- package/src/frames/official/muertos-seal.json +185 -0
- package/src/frames/official/museum-artist-note.json +124 -0
- package/src/frames/official/museum-exhibit-label.json +106 -0
- package/src/frames/official/museum-gallery-map.json +99 -0
- package/src/frames/official/museum-ticket.json +86 -0
- package/src/frames/official/music-lessons.json +64 -0
- package/src/frames/official/nail-studio.json +70 -0
- package/src/frames/official/national-day-belgium.json +100 -0
- package/src/frames/official/national-day-singapore.json +120 -0
- package/src/frames/official/navratri-dandiya.json +88 -0
- package/src/frames/official/navratri-garba-pass.json +90 -0
- package/src/frames/official/navratri-lamp.json +72 -0
- package/src/frames/official/neighborhood-guide.json +98 -0
- package/src/frames/official/nowruz-goldfish.json +71 -0
- package/src/frames/official/nowruz-party.json +90 -0
- package/src/frames/official/nowruz-sabzeh.json +81 -0
- package/src/frames/official/nowruz-seal.json +187 -0
- package/src/frames/official/nutrition-facts.json +98 -0
- package/src/frames/official/obon-lantern.json +81 -0
- package/src/frames/official/obon-sign.json +109 -0
- package/src/frames/official/ocean-day-waves.json +114 -0
- package/src/frames/official/onam-boat-race.json +83 -0
- package/src/frames/official/onam-kasavu.json +122 -0
- package/src/frames/official/onam-pookalam.json +175 -0
- package/src/frames/official/onam-sadya.json +114 -0
- package/src/frames/official/online-class.json +82 -0
- package/src/frames/official/open-an-account.json +88 -0
- package/src/frames/official/open-house-sign-in.json +104 -0
- package/src/frames/official/orthodox-christmas-candle.json +71 -0
- package/src/frames/official/orthodox-christmas-star.json +76 -0
- package/src/frames/official/orthodox-easter-arch.json +77 -0
- package/src/frames/official/orthodox-easter-pysanka.json +87 -0
- package/src/frames/official/orthodox-easter-seal.json +185 -0
- package/src/frames/official/pancake-day.json +114 -0
- package/src/frames/official/parcel-room.json +98 -0
- package/src/frames/official/parent-meeting.json +108 -0
- package/src/frames/official/park-bench-walks.json +121 -0
- package/src/frames/official/park-dog-rules.json +88 -0
- package/src/frames/official/park-map.json +92 -0
- package/src/frames/official/park-playground.json +64 -0
- package/src/frames/official/park-report.json +118 -0
- package/src/frames/official/parking-find-car.json +89 -0
- package/src/frames/official/parking-permit.json +74 -0
- package/src/frames/official/pay-at-the-pump.json +108 -0
- package/src/frames/official/pay-for-parking.json +89 -0
- package/src/frames/official/pay-it-forward.json +102 -0
- package/src/frames/official/pay-your-rent.json +105 -0
- package/src/frames/official/peace-day-dove.json +66 -0
- package/src/frames/official/permission-form.json +120 -0
- package/src/frames/official/personal-trainer.json +76 -0
- package/src/frames/official/physio-exercises.json +86 -0
- package/src/frames/official/pick-your-own.json +158 -0
- package/src/frames/official/pink-ribbon-seal.json +180 -0
- package/src/frames/official/pink-ribbon.json +82 -0
- package/src/frames/official/plant-a-tree.json +88 -0
- package/src/frames/official/plant-based-menu.json +103 -0
- package/src/frames/official/plant-care.json +84 -0
- package/src/frames/official/podcast.json +107 -0
- package/src/frames/official/pohela-boishakh-mela.json +116 -0
- package/src/frames/official/pohela-boishakh.json +120 -0
- package/src/frames/official/polling-place.json +109 -0
- package/src/frames/official/pongal-offers.json +120 -0
- package/src/frames/official/pongal-pot.json +81 -0
- package/src/frames/official/pongal-sun.json +183 -0
- package/src/frames/official/pool-timetable.json +113 -0
- package/src/frames/official/portfolio-card.json +110 -0
- package/src/frames/official/posadas-candle.json +71 -0
- package/src/frames/official/posadas-pinata.json +114 -0
- package/src/frames/official/pre-order-bread.json +110 -0
- package/src/frames/official/press-kit.json +136 -0
- package/src/frames/official/price-list.json +111 -0
- package/src/frames/official/pride-flag.json +124 -0
- package/src/frames/official/pride-heart.json +83 -0
- package/src/frames/official/pride-rainbow.json +81 -0
- package/src/frames/official/privacy-notice.json +115 -0
- package/src/frames/official/property-floor-plan.json +1 -1
- package/src/frames/official/property-for-sale.json +1 -1
- package/src/frames/official/property-house-light.json +1 -1
- package/src/frames/official/property-house.json +1 -1
- package/src/frames/official/property-key.json +1 -1
- package/src/frames/official/property-open-house.json +1 -1
- package/src/frames/official/property-rent.json +1 -1
- package/src/frames/official/property-virtual-tour.json +1 -1
- package/src/frames/official/purim-mask.json +109 -0
- package/src/frames/official/purim-pastry.json +71 -0
- package/src/frames/official/puthandu-sun.json +101 -0
- package/src/frames/official/questions-cloud.json +65 -0
- package/src/frames/official/race-entry.json +90 -0
- package/src/frames/official/race-photos.json +93 -0
- package/src/frames/official/rakhi-envelope.json +75 -0
- package/src/frames/official/rakhi-gift-tag.json +59 -0
- package/src/frames/official/rakhi-thread.json +114 -0
- package/src/frames/official/ramadan-dates.json +81 -0
- package/src/frames/official/ramadan-suhoor.json +94 -0
- package/src/frames/official/rate-your-ride.json +103 -0
- package/src/frames/official/read-a-sample.json +108 -0
- package/src/frames/official/read-the-ebook.json +116 -0
- package/src/frames/official/read-the-faq.json +88 -0
- package/src/frames/official/read-the-reviews.json +110 -0
- package/src/frames/official/read-the-story.json +90 -0
- package/src/frames/official/read-the-transcript.json +142 -0
- package/src/frames/official/reading-challenge.json +97 -0
- package/src/frames/official/rebook-visit.json +86 -0
- package/src/frames/official/recipe-card.json +120 -0
- package/src/frames/official/red-ribbon.json +66 -0
- package/src/frames/official/refill-reminder.json +104 -0
- package/src/frames/official/register-interest.json +82 -0
- package/src/frames/official/register-to-vote.json +80 -0
- package/src/frames/official/renovation-quote.json +80 -0
- package/src/frames/official/rent-a-bike.json +95 -0
- package/src/frames/official/rent-this-item.json +95 -0
- package/src/frames/official/rental-car-guide.json +115 -0
- package/src/frames/official/report-a-problem.json +114 -0
- package/src/frames/official/report-a-repair.json +79 -0
- package/src/frames/official/report-a-street-issue.json +113 -0
- package/src/frames/official/republic-day-india-bands.json +120 -0
- package/src/frames/official/republic-day-india.json +182 -0
- package/src/frames/official/request-maintenance.json +74 -0
- package/src/frames/official/resident-portal.json +98 -0
- package/src/frames/official/restaurant-gift-card.json +94 -0
- package/src/frames/official/restock-alert.json +98 -0
- package/src/frames/official/restroom-feedback.json +86 -0
- package/src/frames/official/return-your-cup.json +130 -0
- package/src/frames/official/return-your-rental.json +113 -0
- package/src/frames/official/reyes-crown.json +78 -0
- package/src/frames/official/reyes-rosca.json +89 -0
- package/src/frames/official/ring-size.json +107 -0
- package/src/frames/official/roadside-help.json +92 -0
- package/src/frames/official/rosh-hashanah-apple.json +81 -0
- package/src/frames/official/rosh-hashanah-honey.json +71 -0
- package/src/frames/official/rosh-hashanah-shofar.json +128 -0
- package/src/frames/official/run-club.json +79 -0
- package/src/frames/official/safety-information.json +92 -0
- package/src/frames/official/salon-prices.json +92 -0
- package/src/frames/official/sankranti-kite.json +114 -0
- package/src/frames/official/sankranti-sky.json +98 -0
- package/src/frames/official/sankranti-sticker.json +90 -0
- package/src/frames/official/save-for-later.json +79 -0
- package/src/frames/official/scan-for-the-answer.json +86 -0
- package/src/frames/official/scan-for-the-checklist.json +108 -0
- package/src/frames/official/scan-for-the-latest.json +74 -0
- package/src/frames/official/scan-for-translations.json +108 -0
- package/src/frames/official/scan-here-arrow.json +76 -0
- package/src/frames/official/scan-here-post.json +89 -0
- package/src/frames/official/scan-me-banner.json +147 -0
- package/src/frames/official/scan-me-cloud.json +73 -0
- package/src/frames/official/scan-me-folded.json +74 -0
- package/src/frames/official/scan-me-stack.json +93 -0
- package/src/frames/official/scan-to-unlock.json +107 -0
- package/src/frames/official/scent-finder.json +94 -0
- package/src/frames/official/scholarships.json +108 -0
- package/src/frames/official/school-backpack.json +81 -0
- package/src/frames/official/school-bus-routes.json +83 -0
- package/src/frames/official/school-lunch-menu.json +81 -0
- package/src/frames/official/school-supply-list.json +80 -0
- package/src/frames/official/school-uniform.json +109 -0
- package/src/frames/official/school-welcome-apple.json +71 -0
- package/src/frames/official/science-fair.json +89 -0
- package/src/frames/official/season-schedule.json +66 -0
- package/src/frames/official/see-more-stack.json +91 -0
- package/src/frames/official/see-our-pitch.json +85 -0
- package/src/frames/official/see-the-full-list.json +107 -0
- package/src/frames/official/see-the-map.json +79 -0
- package/src/frames/official/send-flowers.json +93 -0
- package/src/frames/official/seollal-knot.json +122 -0
- package/src/frames/official/service-times.json +115 -0
- package/src/frames/official/shade-finder.json +113 -0
- package/src/frames/official/sham-el-nessim.json +81 -0
- package/src/frames/official/shoe-size-check.json +95 -0
- package/src/frames/official/shogatsu-kadomatsu.json +81 -0
- package/src/frames/official/sign-rider.json +1 -1
- package/src/frames/official/sign-the-agreement.json +120 -0
- package/src/frames/official/sign-the-petition.json +120 -0
- package/src/frames/official/site-hoarding.json +158 -0
- package/src/frames/official/site-induction.json +120 -0
- package/src/frames/official/size-guide.json +80 -0
- package/src/frames/official/skate-park-rules.json +109 -0
- package/src/frames/official/skincare-routine.json +85 -0
- package/src/frames/official/sofa-fabric.json +84 -0
- package/src/frames/official/songkran-bands.json +123 -0
- package/src/frames/official/songkran-bowl.json +81 -0
- package/src/frames/official/songkran-drop.json +90 -0
- package/src/frames/official/songkran-waves.json +96 -0
- package/src/frames/official/spa-gift.json +90 -0
- package/src/frames/official/spa-menu.json +124 -0
- package/src/frames/official/split-the-bill.json +77 -0
- package/src/frames/official/sponsor-a-pet.json +102 -0
- package/src/frames/official/sponsor-my-run.json +136 -0
- package/src/frames/official/sports-camp.json +142 -0
- package/src/frames/official/spring-cleaning.json +107 -0
- package/src/frames/official/spring-showers.json +71 -0
- package/src/frames/official/spring-watering-can.json +114 -0
- package/src/frames/official/staff-handbook.json +121 -0
- package/src/frames/official/staff-rota.json +112 -0
- package/src/frames/official/start-a-return.json +92 -0
- package/src/frames/official/start-charging.json +104 -0
- package/src/frames/official/start-here-arrow.json +79 -0
- package/src/frames/official/start-saving.json +74 -0
- package/src/frames/official/storage-units.json +79 -0
- package/src/frames/official/student-portal.json +80 -0
- package/src/frames/official/style-gallery.json +111 -0
- package/src/frames/official/summer-camp.json +90 -0
- package/src/frames/official/summer-pool.json +95 -0
- package/src/frames/official/summer-reading.json +81 -0
- package/src/frames/official/summer-sunglasses.json +114 -0
- package/src/frames/official/summer-watermelon.json +89 -0
- package/src/frames/official/sushi-menu.json +115 -0
- package/src/frames/official/swim-lessons.json +70 -0
- package/src/frames/official/tabaski.json +114 -0
- package/src/frames/official/table-tennis.json +116 -0
- package/src/frames/official/take-a-closer-look.json +94 -0
- package/src/frames/official/takeout-order.json +98 -0
- package/src/frames/official/talk-to-someone.json +115 -0
- package/src/frames/official/talk-to-the-agent.json +115 -0
- package/src/frames/official/tanabata-stars.json +170 -0
- package/src/frames/official/tanabata-wishes.json +114 -0
- package/src/frames/official/tea-menu.json +70 -0
- package/src/frames/official/tea-time.json +124 -0
- package/src/frames/official/teachers-day-apple.json +81 -0
- package/src/frames/official/teachers-day-note.json +109 -0
- package/src/frames/official/team-jersey.json +77 -0
- package/src/frames/official/team-kit.json +85 -0
- package/src/frames/official/tee-time.json +85 -0
- package/src/frames/official/tennis-court.json +94 -0
- package/src/frames/official/test-drive.json +88 -0
- package/src/frames/official/test-results.json +85 -0
- package/src/frames/official/tet-apricot.json +114 -0
- package/src/frames/official/tet-banh-chung.json +81 -0
- package/src/frames/official/tire-change.json +74 -0
- package/src/frames/official/town-hall.json +158 -0
- package/src/frames/official/toy-finder.json +81 -0
- package/src/frames/official/trace-your-coffee.json +87 -0
- package/src/frames/official/trade-it-in.json +97 -0
- package/src/frames/official/transit-bike-share.json +94 -0
- package/src/frames/official/transit-bus-arrivals.json +113 -0
- package/src/frames/official/transit-fare.json +97 -0
- package/src/frames/official/transit-ferry.json +88 -0
- package/src/frames/official/transit-next-trains.json +119 -0
- package/src/frames/official/transit-report.json +99 -0
- package/src/frames/official/transit-train-timetable.json +98 -0
- package/src/frames/official/try-the-demo.json +106 -0
- package/src/frames/official/ugadi-leaves.json +66 -0
- package/src/frames/official/unlock-this-car.json +82 -0
- package/src/frames/official/upload-receipts.json +108 -0
- package/src/frames/official/vaisakhi-bands.json +120 -0
- package/src/frames/official/vaisakhi-dhol.json +81 -0
- package/src/frames/official/vaisakhi-wheat.json +73 -0
- package/src/frames/official/validate-parking.json +91 -0
- package/src/frames/official/vehicle-history.json +106 -0
- package/src/frames/official/vesak-candle.json +122 -0
- package/src/frames/official/vesak-lantern.json +114 -0
- package/src/frames/official/vesak-lotus.json +71 -0
- package/src/frames/official/vesak-seal.json +179 -0
- package/src/frames/official/virtual-try-on.json +93 -0
- package/src/frames/official/visiting-hours.json +90 -0
- package/src/frames/official/visitor-info.json +78 -0
- package/src/frames/official/visitor-map.json +92 -0
- package/src/frames/official/visitor-sign-in.json +98 -0
- package/src/frames/official/visitor-town-map.json +108 -0
- package/src/frames/official/visitor-wildlife.json +70 -0
- package/src/frames/official/volunteer.json +74 -0
- package/src/frames/official/vote-for-us.json +103 -0
- package/src/frames/official/walk-in-queue.json +102 -0
- package/src/frames/official/wash-club.json +81 -0
- package/src/frames/official/watch-repair.json +115 -0
- package/src/frames/official/watch-the-experiment.json +93 -0
- package/src/frames/official/water-day-drop.json +81 -0
- package/src/frames/official/water-refill.json +95 -0
- package/src/frames/official/weekly-deals.json +107 -0
- package/src/frames/official/wellness-retreat.json +85 -0
- package/src/frames/official/whats-inside.json +91 -0
- package/src/frames/official/wholesale.json +85 -0
- package/src/frames/official/wifi-cafe-cup.json +81 -0
- package/src/frames/official/wifi-cowork.json +63 -0
- package/src/frames/official/wifi-hostel-board.json +80 -0
- package/src/frames/official/wifi-library.json +96 -0
- package/src/frames/official/wifi-reception.json +118 -0
- package/src/frames/official/wifi-rental.json +91 -0
- package/src/frames/official/wifi-venue.json +80 -0
- package/src/frames/official/wifi-waiting-room.json +89 -0
- package/src/frames/official/window-quote.json +121 -0
- package/src/frames/official/wine-pairings.json +142 -0
- package/src/frames/official/wine-staff-pick.json +100 -0
- package/src/frames/official/winery-tasting.json +94 -0
- package/src/frames/official/winter-lift-pass.json +90 -0
- package/src/frames/official/winter-sale.json +120 -0
- package/src/frames/official/winter-skating.json +71 -0
- package/src/frames/official/winter-snowman.json +81 -0
- package/src/frames/official/womens-day-mimosa.json +81 -0
- package/src/frames/official/womens-day-seal.json +179 -0
- package/src/frames/official/yalda-poem.json +122 -0
- package/src/frames/official/yalda-pomegranate.json +81 -0
- package/src/frames/official/yalda-watermelon.json +72 -0
- package/src/frames/official/yard-sign-coming-soon.json +115 -0
- package/src/frames/official/yard-sign-for-sale.json +150 -0
- package/src/frames/official/yard-sign-sold.json +162 -0
- package/src/frames/official/yard-sign-viewing.json +121 -0
- package/src/frames/official/yoga-day-lotus.json +81 -0
- package/src/frames/official/your-prescription.json +107 -0
- package/src/frames/official/youth-club.json +104 -0
- package/src/frames/official/zoo-animal-facts.json +109 -0
- package/src/frames/official-types.ts +6 -1
- package/src/frames/official.ts +4 -4
- package/src/index.tsx +6 -361
- package/src/jsx/index.ts +3 -0
- package/src/jsx/jsx-dev-runtime.ts +14 -0
- package/src/jsx/jsx-runtime.ts +34 -0
- package/src/jsx/runtime.ts +209 -0
- package/src/logo.tsx +5 -3
- package/src/node.ts +3 -3
- package/src/plain.tsx +194 -0
- package/src/preact.ts +80 -0
- package/src/qr-code-canvas.tsx +1 -1
- package/src/qr-code-props.ts +115 -0
- package/src/qr-code-svg.tsx +17 -0
- package/src/qr-code.tsx +34 -114
- package/src/react-elements.ts +13 -0
- package/src/render/attributes.ts +404 -0
- package/src/render/dom.ts +90 -0
- package/src/render/hyperscript.ts +66 -0
- package/src/render/string.ts +70 -0
- package/src/scan-score.ts +15 -8
- package/src/solid.ts +75 -0
- package/src/svg.ts +27 -0
- package/src/template/arrow.tsx +1 -0
- package/src/template/default.tsx +1 -0
- package/src/template/dot-ring-layout.ts +230 -0
- package/src/template/dot-ring.tsx +165 -0
- package/src/template/halloween.tsx +1 -0
- package/src/template/index.ts +1 -0
- package/src/template/square-border.tsx +1 -0
- package/src/template/standard-box.tsx +1 -0
- package/src/template/striked-box.tsx +1 -0
- package/src/template-placement.ts +149 -0
- package/src/templates.tsx +16 -1
- package/src/utils/print-shared.ts +1 -1
- package/src/utils.tsx +24 -23
- package/src/vanilla-api.ts +146 -0
- package/src/vanilla-browser.ts +11 -0
- package/src/vanilla.ts +10 -0
- package/src/vue.ts +220 -0
- package/types/frame-spec.ts +214 -10
- package/types/index.ts +4 -2
- package/types/public.ts +4 -0
- package/types/qr.ts +20 -6
- package/types/react.ts +8 -0
- package/types/template.ts +10 -3
- package/dist/src/frame-styles.d.ts +0 -50
- package/dist/src/frame-styles.d.ts.map +0 -1
- package/src/frame-styles.ts +0 -1095
package/src/frame-styles.ts
DELETED
|
@@ -1,1095 +0,0 @@
|
|
|
1
|
-
/** biome-ignore-all lint/style/noMagicNumbers: frame proportions */
|
|
2
|
-
// Layouts for the frame styles added after the original five. Each returns
|
|
3
|
-
// plain shapes (rects, polygons, path data) and labels, so the SVG, canvas,
|
|
4
|
-
// PDF and EPS outputs draw the same artwork. Colors are always opaque (tints
|
|
5
|
-
// are mixed, not layered with transparency) because EPS has no transparency.
|
|
6
|
-
import type { FrameStyle, QRFrame } from "../types";
|
|
7
|
-
import type {
|
|
8
|
-
FrameBox,
|
|
9
|
-
FrameLabel,
|
|
10
|
-
FrameLayout,
|
|
11
|
-
FramePath,
|
|
12
|
-
FramePolygon,
|
|
13
|
-
FrameRect,
|
|
14
|
-
} from "./frame";
|
|
15
|
-
import { circlePath, type Point, roundedRectPath } from "./shapes";
|
|
16
|
-
import { compact, roundTo } from "./utils/fmt";
|
|
17
|
-
import { parseColor } from "./utils/parse-color";
|
|
18
|
-
|
|
19
|
-
export const SHAPED_FRAME_STYLES = [
|
|
20
|
-
"banner-top-bottom",
|
|
21
|
-
"speech-bubble-top",
|
|
22
|
-
"chat-bubble",
|
|
23
|
-
"circle",
|
|
24
|
-
"polaroid",
|
|
25
|
-
"phone",
|
|
26
|
-
"ticket",
|
|
27
|
-
"badge",
|
|
28
|
-
"envelope",
|
|
29
|
-
"tag",
|
|
30
|
-
"menu-card",
|
|
31
|
-
"sticker",
|
|
32
|
-
"gradient-border",
|
|
33
|
-
"focus",
|
|
34
|
-
] as const satisfies readonly FrameStyle[];
|
|
35
|
-
|
|
36
|
-
export type ShapedFrameStyle = (typeof SHAPED_FRAME_STYLES)[number];
|
|
37
|
-
|
|
38
|
-
export function isShapedFrameStyle(
|
|
39
|
-
style: FrameStyle
|
|
40
|
-
): style is ShapedFrameStyle {
|
|
41
|
-
return (SHAPED_FRAME_STYLES as readonly string[]).includes(style);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** Default colors of "gradient-border" when `color` / `secondaryColor` are unset. */
|
|
45
|
-
export const GRADIENT_FRAME_DEFAULTS = { from: "#7c3aed", to: "#db2777" };
|
|
46
|
-
|
|
47
|
-
const WHITE = "#FFFFFF";
|
|
48
|
-
|
|
49
|
-
// ── Text measuring ────────────────────────────────────────────────────────
|
|
50
|
-
|
|
51
|
-
/** Rough em width of one character in a bold sans-serif. */
|
|
52
|
-
export function charEm(char: string): number {
|
|
53
|
-
if (char === " ") {
|
|
54
|
-
return 0.3;
|
|
55
|
-
}
|
|
56
|
-
if (/[MWmw@%]/.test(char)) {
|
|
57
|
-
return 0.92;
|
|
58
|
-
}
|
|
59
|
-
if (/[A-Z0-9#&]/.test(char)) {
|
|
60
|
-
return 0.72;
|
|
61
|
-
}
|
|
62
|
-
if (/[il.,:;!'|1]/.test(char)) {
|
|
63
|
-
return 0.32;
|
|
64
|
-
}
|
|
65
|
-
return 0.6;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Rough em widths for a bold sans-serif, used to fit labels without
|
|
69
|
-
// measuring text (measuring needs a DOM).
|
|
70
|
-
export function estimateTextEm(text: string): number {
|
|
71
|
-
let em = 0;
|
|
72
|
-
for (const char of text) {
|
|
73
|
-
em += charEm(char);
|
|
74
|
-
}
|
|
75
|
-
return Math.max(em, 1);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// ── Color ─────────────────────────────────────────────────────────────────
|
|
79
|
-
|
|
80
|
-
const hex = (value: number) =>
|
|
81
|
-
Math.round(Math.min(255, Math.max(0, value)))
|
|
82
|
-
.toString(16)
|
|
83
|
-
.padStart(2, "0");
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Opaque mix of two colors (`amount` 0 = `from`, 1 = `to`). Frames use solid
|
|
87
|
-
* tints instead of transparency, because EPS has no transparency.
|
|
88
|
-
*/
|
|
89
|
-
export function mixFrameColors(
|
|
90
|
-
from: string,
|
|
91
|
-
to: string,
|
|
92
|
-
amount: number
|
|
93
|
-
): string {
|
|
94
|
-
const a = parseColor(from) ?? { r: 0, g: 0, b: 0, a: 1 };
|
|
95
|
-
const b = parseColor(to) ?? { r: 255, g: 255, b: 255, a: 1 };
|
|
96
|
-
const t = Math.min(1, Math.max(0, amount));
|
|
97
|
-
return `#${hex(a.r + (b.r - a.r) * t)}${hex(a.g + (b.g - a.g) * t)}${hex(a.b + (b.b - a.b) * t)}`;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// ── Shape helpers ─────────────────────────────────────────────────────────
|
|
101
|
-
|
|
102
|
-
const box = (
|
|
103
|
-
x: number,
|
|
104
|
-
y: number,
|
|
105
|
-
width: number,
|
|
106
|
-
height: number,
|
|
107
|
-
radius = 0
|
|
108
|
-
): FrameBox => ({ x, y, width, height, radius });
|
|
109
|
-
|
|
110
|
-
const rect = (
|
|
111
|
-
x: number,
|
|
112
|
-
y: number,
|
|
113
|
-
width: number,
|
|
114
|
-
height: number,
|
|
115
|
-
radius: number,
|
|
116
|
-
fill: string
|
|
117
|
-
): FrameRect => ({ type: "rect", ...box(x, y, width, height, radius), fill });
|
|
118
|
-
|
|
119
|
-
const ring = (outer: FrameBox, hole: FrameBox, fill: string): FrameRect => ({
|
|
120
|
-
type: "rect",
|
|
121
|
-
...outer,
|
|
122
|
-
fill,
|
|
123
|
-
hole,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
const polygon = (points: Point[], fill: string): FramePolygon => ({
|
|
127
|
-
type: "polygon",
|
|
128
|
-
points,
|
|
129
|
-
fill,
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
const path = (
|
|
133
|
-
d: string,
|
|
134
|
-
fill: string,
|
|
135
|
-
fillRule: "nonzero" | "evenodd" = "nonzero"
|
|
136
|
-
): FramePath => ({ type: "path", d, fill, fillRule });
|
|
137
|
-
|
|
138
|
-
const present = (...labels: (FrameLabel | null)[]): FrameLabel[] =>
|
|
139
|
-
labels.filter((label): label is FrameLabel => label !== null);
|
|
140
|
-
|
|
141
|
-
// ── Layouts ───────────────────────────────────────────────────────────────
|
|
142
|
-
|
|
143
|
-
export interface FrameStyleContext {
|
|
144
|
-
/** Width of the QR code (margin included) */
|
|
145
|
-
size: number;
|
|
146
|
-
frame: QRFrame;
|
|
147
|
-
/** Frame color (`frame.color` or black) */
|
|
148
|
-
color: string;
|
|
149
|
-
/** Solid page color behind the code */
|
|
150
|
-
background: string;
|
|
151
|
-
text: string;
|
|
152
|
-
secondaryText: string;
|
|
153
|
-
gap: number;
|
|
154
|
-
border: number;
|
|
155
|
-
band: number;
|
|
156
|
-
fontScale: number;
|
|
157
|
-
/**
|
|
158
|
-
* Label fitted in a row: font from the row height, shrunk to `maxWidth`.
|
|
159
|
-
* `field` is the frame text it draws ("text" unless given).
|
|
160
|
-
*/
|
|
161
|
-
fitLabel: (
|
|
162
|
-
text: string,
|
|
163
|
-
centerX: number,
|
|
164
|
-
centerY: number,
|
|
165
|
-
rowHeight: number,
|
|
166
|
-
maxWidth: number,
|
|
167
|
-
color: string,
|
|
168
|
-
field?: "text" | "secondaryText"
|
|
169
|
-
) => FrameLabel | null;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
type Layout = (ctx: FrameStyleContext) => FrameLayout;
|
|
173
|
-
|
|
174
|
-
const bannerTopBottom: Layout = (ctx) => {
|
|
175
|
-
const { size, gap, border, band, color, background, frame, fitLabel } = ctx;
|
|
176
|
-
const width = size + 2 * (border + gap);
|
|
177
|
-
const innerWidth = width - 2 * border;
|
|
178
|
-
const innerHeight = size + 2 * gap;
|
|
179
|
-
const height = band + innerHeight + band;
|
|
180
|
-
const labelWidth = innerWidth - 2 * gap;
|
|
181
|
-
const textColor = frame.textColor || WHITE;
|
|
182
|
-
return {
|
|
183
|
-
width,
|
|
184
|
-
height,
|
|
185
|
-
qrX: border + gap,
|
|
186
|
-
qrY: band + gap,
|
|
187
|
-
qrSize: size,
|
|
188
|
-
shapes: [
|
|
189
|
-
rect(border, band, innerWidth, innerHeight, 0, background),
|
|
190
|
-
ring(
|
|
191
|
-
box(0, 0, width, height),
|
|
192
|
-
box(border, band, innerWidth, innerHeight),
|
|
193
|
-
color
|
|
194
|
-
),
|
|
195
|
-
],
|
|
196
|
-
label: fitLabel(ctx.text, width / 2, band / 2, band, labelWidth, textColor),
|
|
197
|
-
extraLabels: present(
|
|
198
|
-
fitLabel(
|
|
199
|
-
ctx.secondaryText,
|
|
200
|
-
width / 2,
|
|
201
|
-
band + innerHeight + band / 2,
|
|
202
|
-
band,
|
|
203
|
-
labelWidth,
|
|
204
|
-
textColor,
|
|
205
|
-
"secondaryText"
|
|
206
|
-
)
|
|
207
|
-
),
|
|
208
|
-
squareEdges: true,
|
|
209
|
-
color,
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
const speechBubbleTop: Layout = (ctx) => {
|
|
214
|
-
const { size, gap, border, band, color, background, frame, fitLabel } = ctx;
|
|
215
|
-
const width = size + 2 * (border + gap);
|
|
216
|
-
const innerWidth = width - 2 * border;
|
|
217
|
-
const radius = size * 0.07;
|
|
218
|
-
const innerRadius = Math.max(radius - border, 0);
|
|
219
|
-
const spacing = size * 0.025;
|
|
220
|
-
const pointer = size * 0.08;
|
|
221
|
-
const cardY = band + pointer + spacing;
|
|
222
|
-
return {
|
|
223
|
-
width,
|
|
224
|
-
height: cardY + width,
|
|
225
|
-
qrX: border + gap,
|
|
226
|
-
qrY: cardY + border + gap,
|
|
227
|
-
qrSize: size,
|
|
228
|
-
shapes: [
|
|
229
|
-
rect(0, 0, width, band, band / 2, color),
|
|
230
|
-
polygon(
|
|
231
|
-
[
|
|
232
|
-
// Base dips into the pill so no hairline shows between them
|
|
233
|
-
[width / 2 - pointer, band - pointer / 2],
|
|
234
|
-
[width / 2 + pointer, band - pointer / 2],
|
|
235
|
-
[width / 2, band + pointer],
|
|
236
|
-
],
|
|
237
|
-
color
|
|
238
|
-
),
|
|
239
|
-
rect(
|
|
240
|
-
border,
|
|
241
|
-
cardY + border,
|
|
242
|
-
innerWidth,
|
|
243
|
-
innerWidth,
|
|
244
|
-
innerRadius,
|
|
245
|
-
background
|
|
246
|
-
),
|
|
247
|
-
ring(
|
|
248
|
-
box(0, cardY, width, width, radius),
|
|
249
|
-
box(border, cardY + border, innerWidth, innerWidth, innerRadius),
|
|
250
|
-
color
|
|
251
|
-
),
|
|
252
|
-
],
|
|
253
|
-
label: fitLabel(
|
|
254
|
-
ctx.text,
|
|
255
|
-
width / 2,
|
|
256
|
-
band / 2,
|
|
257
|
-
band,
|
|
258
|
-
innerWidth - 2 * gap,
|
|
259
|
-
frame.textColor || WHITE
|
|
260
|
-
),
|
|
261
|
-
squareEdges: false,
|
|
262
|
-
color,
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
const chatBubble: Layout = (ctx) => {
|
|
267
|
-
const { size, gap, border, color, background, frame, fitLabel } = ctx;
|
|
268
|
-
const width = size + 2 * (border + gap);
|
|
269
|
-
const innerWidth = width - 2 * border;
|
|
270
|
-
const radius = size * 0.12;
|
|
271
|
-
const windowHeight = size + 2 * gap;
|
|
272
|
-
const row = ctx.text ? size * 0.2 : border;
|
|
273
|
-
const bubbleHeight = border + windowHeight + row;
|
|
274
|
-
const tail = size * 0.13;
|
|
275
|
-
const top = bubbleHeight - size * 0.02;
|
|
276
|
-
return {
|
|
277
|
-
width,
|
|
278
|
-
height: bubbleHeight + tail,
|
|
279
|
-
qrX: border + gap,
|
|
280
|
-
qrY: border + gap,
|
|
281
|
-
qrSize: size,
|
|
282
|
-
shapes: [
|
|
283
|
-
rect(0, 0, width, bubbleHeight, radius, color),
|
|
284
|
-
path(
|
|
285
|
-
compact`M${width * 0.13} ${top}L${width * 0.05} ${bubbleHeight + tail}` +
|
|
286
|
-
compact`Q${width * 0.16} ${bubbleHeight + tail * 0.45} ${width * 0.32} ${top}Z`,
|
|
287
|
-
color
|
|
288
|
-
),
|
|
289
|
-
rect(
|
|
290
|
-
border,
|
|
291
|
-
border,
|
|
292
|
-
innerWidth,
|
|
293
|
-
windowHeight,
|
|
294
|
-
Math.max(radius - border, 0),
|
|
295
|
-
background
|
|
296
|
-
),
|
|
297
|
-
],
|
|
298
|
-
label: fitLabel(
|
|
299
|
-
ctx.text,
|
|
300
|
-
width / 2,
|
|
301
|
-
border + windowHeight + row / 2,
|
|
302
|
-
row,
|
|
303
|
-
innerWidth - 2 * gap,
|
|
304
|
-
frame.textColor || WHITE
|
|
305
|
-
),
|
|
306
|
-
squareEdges: false,
|
|
307
|
-
color,
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Letters of `text` set along a circle of `radius` around (cx, cy): over the
|
|
313
|
-
* top reading clockwise, or along the bottom reading left to right, upright.
|
|
314
|
-
*/
|
|
315
|
-
export function arcLabels(
|
|
316
|
-
text: string,
|
|
317
|
-
cx: number,
|
|
318
|
-
cy: number,
|
|
319
|
-
radius: number,
|
|
320
|
-
fontSize: number,
|
|
321
|
-
where: "top" | "bottom",
|
|
322
|
-
color: string,
|
|
323
|
-
/** The frame text the letters draw (FrameLabel.field) */
|
|
324
|
-
field: string
|
|
325
|
-
): FrameLabel[] {
|
|
326
|
-
const chars = [...text];
|
|
327
|
-
const spacing = fontSize * 0.08;
|
|
328
|
-
const widths = chars.map((char) => charEm(char) * fontSize);
|
|
329
|
-
const total =
|
|
330
|
-
widths.reduce((sum, width) => sum + width, 0) +
|
|
331
|
-
spacing * Math.max(0, chars.length - 1);
|
|
332
|
-
// Center the capitals on `radius`: the baseline sits half a cap height in
|
|
333
|
-
// from the outside of the glyphs.
|
|
334
|
-
const baseline =
|
|
335
|
-
where === "top" ? radius - fontSize * 0.35 : radius + fontSize * 0.35;
|
|
336
|
-
const labels: FrameLabel[] = [];
|
|
337
|
-
let offset = 0;
|
|
338
|
-
chars.forEach((char, index) => {
|
|
339
|
-
const width = widths[index] as number;
|
|
340
|
-
const along = (offset + width / 2) / baseline;
|
|
341
|
-
offset += width + spacing;
|
|
342
|
-
if (char.trim() === "") {
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
const angle =
|
|
346
|
-
where === "top"
|
|
347
|
-
? -Math.PI / 2 - total / 2 / baseline + along
|
|
348
|
-
: Math.PI / 2 + total / 2 / baseline - along;
|
|
349
|
-
labels.push({
|
|
350
|
-
text: char,
|
|
351
|
-
x: cx + baseline * Math.cos(angle),
|
|
352
|
-
y: cy + baseline * Math.sin(angle),
|
|
353
|
-
fontSize,
|
|
354
|
-
maxWidth: fontSize * 2,
|
|
355
|
-
color,
|
|
356
|
-
rotate: (angle * 180) / Math.PI + (where === "top" ? 90 : -90),
|
|
357
|
-
field,
|
|
358
|
-
});
|
|
359
|
-
});
|
|
360
|
-
return labels;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
const circle: Layout = (ctx) => {
|
|
364
|
-
const { size, gap, color, background, frame, fontScale } = ctx;
|
|
365
|
-
// Light disc that clears the code's corners by most of a frame gap
|
|
366
|
-
const inner = size * Math.SQRT1_2 + gap * 0.9;
|
|
367
|
-
const thickness = size * 0.21;
|
|
368
|
-
const outer = inner + thickness;
|
|
369
|
-
const middle = inner + thickness / 2;
|
|
370
|
-
const center = outer;
|
|
371
|
-
const textColor = frame.textColor || WHITE;
|
|
372
|
-
// Each label may use up to 140° of the ring
|
|
373
|
-
const arc = middle * ((140 * Math.PI) / 180);
|
|
374
|
-
const fontFor = (text: string) =>
|
|
375
|
-
Math.min(
|
|
376
|
-
thickness * 0.5 * fontScale,
|
|
377
|
-
arc / (estimateTextEm(text) + 0.08 * text.length)
|
|
378
|
-
);
|
|
379
|
-
const top = ctx.text
|
|
380
|
-
? arcLabels(
|
|
381
|
-
ctx.text,
|
|
382
|
-
center,
|
|
383
|
-
center,
|
|
384
|
-
middle,
|
|
385
|
-
fontFor(ctx.text),
|
|
386
|
-
"top",
|
|
387
|
-
textColor,
|
|
388
|
-
"text"
|
|
389
|
-
)
|
|
390
|
-
: [];
|
|
391
|
-
const bottom = ctx.secondaryText
|
|
392
|
-
? arcLabels(
|
|
393
|
-
ctx.secondaryText,
|
|
394
|
-
center,
|
|
395
|
-
center,
|
|
396
|
-
middle,
|
|
397
|
-
fontFor(ctx.secondaryText),
|
|
398
|
-
"bottom",
|
|
399
|
-
textColor,
|
|
400
|
-
"secondaryText"
|
|
401
|
-
)
|
|
402
|
-
: [];
|
|
403
|
-
const dot = thickness * 0.07;
|
|
404
|
-
return {
|
|
405
|
-
width: 2 * outer,
|
|
406
|
-
height: 2 * outer,
|
|
407
|
-
qrX: center - size / 2,
|
|
408
|
-
qrY: center - size / 2,
|
|
409
|
-
qrSize: size,
|
|
410
|
-
shapes: [
|
|
411
|
-
path(circlePath(center, center, inner), background),
|
|
412
|
-
path(
|
|
413
|
-
circlePath(center, center, outer) + circlePath(center, center, inner),
|
|
414
|
-
color,
|
|
415
|
-
"evenodd"
|
|
416
|
-
),
|
|
417
|
-
path(
|
|
418
|
-
circlePath(center - middle, center, dot) +
|
|
419
|
-
circlePath(center + middle, center, dot),
|
|
420
|
-
textColor
|
|
421
|
-
),
|
|
422
|
-
],
|
|
423
|
-
label: null,
|
|
424
|
-
extraLabels: [...top, ...bottom],
|
|
425
|
-
squareEdges: false,
|
|
426
|
-
color,
|
|
427
|
-
};
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
const polaroid: Layout = (ctx) => {
|
|
431
|
-
const { size, gap, color, background, frame, fitLabel } = ctx;
|
|
432
|
-
const side = size * 0.07;
|
|
433
|
-
const photo = size + 2 * gap;
|
|
434
|
-
const bottom = size * 0.3;
|
|
435
|
-
const shadow = size * 0.025;
|
|
436
|
-
const cardWidth = photo + 2 * side;
|
|
437
|
-
const cardHeight = side + photo + bottom;
|
|
438
|
-
const radius = size * 0.015;
|
|
439
|
-
return {
|
|
440
|
-
width: cardWidth + shadow,
|
|
441
|
-
height: cardHeight + shadow,
|
|
442
|
-
qrX: side + gap,
|
|
443
|
-
qrY: side + gap,
|
|
444
|
-
qrSize: size,
|
|
445
|
-
shapes: [
|
|
446
|
-
rect(
|
|
447
|
-
shadow,
|
|
448
|
-
shadow,
|
|
449
|
-
cardWidth,
|
|
450
|
-
cardHeight,
|
|
451
|
-
radius,
|
|
452
|
-
mixFrameColors(color, WHITE, 0.72)
|
|
453
|
-
),
|
|
454
|
-
rect(0, 0, cardWidth, cardHeight, radius, color),
|
|
455
|
-
rect(side, side, photo, photo, 0, background),
|
|
456
|
-
],
|
|
457
|
-
label: fitLabel(
|
|
458
|
-
ctx.text,
|
|
459
|
-
cardWidth / 2,
|
|
460
|
-
side + photo + bottom / 2,
|
|
461
|
-
bottom * 0.8,
|
|
462
|
-
photo - 2 * gap,
|
|
463
|
-
frame.textColor || WHITE
|
|
464
|
-
),
|
|
465
|
-
squareEdges: false,
|
|
466
|
-
color,
|
|
467
|
-
};
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
const phone: Layout = (ctx) => {
|
|
471
|
-
const { size, gap, color, background, frame, fitLabel } = ctx;
|
|
472
|
-
const side = size * 0.05;
|
|
473
|
-
const topBezel = size * 0.17;
|
|
474
|
-
const bottomBezel = size * 0.15;
|
|
475
|
-
const row = ctx.text ? size * 0.17 : 0;
|
|
476
|
-
const screenWidth = size + 2 * gap;
|
|
477
|
-
const screenHeight = gap + size + (ctx.text ? gap * 0.5 + row : gap);
|
|
478
|
-
const width = screenWidth + 2 * side;
|
|
479
|
-
const height = topBezel + screenHeight + bottomBezel;
|
|
480
|
-
const speaker = size * 0.036;
|
|
481
|
-
const homeBar = size * 0.03;
|
|
482
|
-
return {
|
|
483
|
-
width,
|
|
484
|
-
height,
|
|
485
|
-
qrX: side + gap,
|
|
486
|
-
qrY: topBezel + gap,
|
|
487
|
-
qrSize: size,
|
|
488
|
-
shapes: [
|
|
489
|
-
rect(0, 0, width, height, size * 0.17, color),
|
|
490
|
-
rect(side, topBezel, screenWidth, screenHeight, size * 0.06, background),
|
|
491
|
-
rect(
|
|
492
|
-
width / 2 - size * 0.11,
|
|
493
|
-
topBezel / 2 - speaker / 2,
|
|
494
|
-
size * 0.22,
|
|
495
|
-
speaker,
|
|
496
|
-
speaker / 2,
|
|
497
|
-
background
|
|
498
|
-
),
|
|
499
|
-
rect(
|
|
500
|
-
width / 2 - size * 0.15,
|
|
501
|
-
topBezel + screenHeight + bottomBezel / 2 - homeBar / 2,
|
|
502
|
-
size * 0.3,
|
|
503
|
-
homeBar,
|
|
504
|
-
homeBar / 2,
|
|
505
|
-
background
|
|
506
|
-
),
|
|
507
|
-
],
|
|
508
|
-
label: fitLabel(
|
|
509
|
-
ctx.text,
|
|
510
|
-
width / 2,
|
|
511
|
-
topBezel + gap + size + gap * 0.5 + row / 2,
|
|
512
|
-
row,
|
|
513
|
-
screenWidth - 2 * gap,
|
|
514
|
-
frame.textColor || color
|
|
515
|
-
),
|
|
516
|
-
squareEdges: false,
|
|
517
|
-
color,
|
|
518
|
-
};
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
const ticket: Layout = (ctx) => {
|
|
522
|
-
const { size, gap, band, color, background, frame, fitLabel } = ctx;
|
|
523
|
-
const side = size * 0.05;
|
|
524
|
-
const windowWidth = size + 2 * gap;
|
|
525
|
-
const width = windowWidth + 2 * side;
|
|
526
|
-
// Rounded first: the notches are half circles from perforation − notch to
|
|
527
|
-
// perforation + notch, which must be exactly twice their radius apart
|
|
528
|
-
const perforation = roundTo(side + windowWidth + side * 1.2);
|
|
529
|
-
const height = perforation + band;
|
|
530
|
-
const notch = roundTo(size * 0.055);
|
|
531
|
-
const r = size * 0.04;
|
|
532
|
-
const body =
|
|
533
|
-
compact`M${r} 0H${width - r}A${r} ${r} 0 0 1 ${width} ${r}` +
|
|
534
|
-
compact`V${perforation - notch}A${notch} ${notch} 0 0 0 ${width} ${perforation + notch}` +
|
|
535
|
-
compact`V${height - r}A${r} ${r} 0 0 1 ${width - r} ${height}` +
|
|
536
|
-
compact`H${r}A${r} ${r} 0 0 1 0 ${height - r}` +
|
|
537
|
-
compact`V${perforation + notch}A${notch} ${notch} 0 0 0 0 ${perforation - notch}` +
|
|
538
|
-
compact`V${r}A${r} ${r} 0 0 1 ${r} 0Z`;
|
|
539
|
-
const dashes: string[] = [];
|
|
540
|
-
const dash = size * 0.03;
|
|
541
|
-
const dashGap = size * 0.022;
|
|
542
|
-
const thickness = size * 0.012;
|
|
543
|
-
for (
|
|
544
|
-
let x = notch + dashGap;
|
|
545
|
-
x + dash <= width - notch - dashGap / 2;
|
|
546
|
-
x += dash + dashGap
|
|
547
|
-
) {
|
|
548
|
-
dashes.push(
|
|
549
|
-
roundedRectPath(x, perforation - thickness / 2, dash, thickness)
|
|
550
|
-
);
|
|
551
|
-
}
|
|
552
|
-
return {
|
|
553
|
-
width,
|
|
554
|
-
height,
|
|
555
|
-
qrX: side + gap,
|
|
556
|
-
qrY: side + gap,
|
|
557
|
-
qrSize: size,
|
|
558
|
-
shapes: [
|
|
559
|
-
path(body, color),
|
|
560
|
-
rect(side, side, windowWidth, windowWidth, size * 0.02, background),
|
|
561
|
-
path(dashes.join(""), background),
|
|
562
|
-
],
|
|
563
|
-
label: fitLabel(
|
|
564
|
-
ctx.text,
|
|
565
|
-
width / 2,
|
|
566
|
-
perforation + band / 2,
|
|
567
|
-
band,
|
|
568
|
-
windowWidth - 2 * gap,
|
|
569
|
-
frame.textColor || WHITE
|
|
570
|
-
),
|
|
571
|
-
squareEdges: false,
|
|
572
|
-
color,
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
const badge: Layout = (ctx) => {
|
|
577
|
-
const { size, gap, border, band, color, background, frame, fitLabel } = ctx;
|
|
578
|
-
const extend = size * 0.18;
|
|
579
|
-
const fold = size * 0.05;
|
|
580
|
-
const cardWidth = size + 2 * (border + gap);
|
|
581
|
-
const radius = size * 0.06;
|
|
582
|
-
const innerRadius = Math.max(radius - border, 0);
|
|
583
|
-
const width = cardWidth + 2 * extend;
|
|
584
|
-
const ribbonY = cardWidth - border;
|
|
585
|
-
const frontX = extend * 0.5;
|
|
586
|
-
const tailY = ribbonY + fold;
|
|
587
|
-
const tailX = frontX + fold * 2;
|
|
588
|
-
const notch = extend * 0.28;
|
|
589
|
-
const tail = mixFrameColors(color, "#000000", 0.28);
|
|
590
|
-
const crease = mixFrameColors(color, "#000000", 0.5);
|
|
591
|
-
return {
|
|
592
|
-
width,
|
|
593
|
-
height: tailY + band,
|
|
594
|
-
qrX: extend + border + gap,
|
|
595
|
-
qrY: border + gap,
|
|
596
|
-
qrSize: size,
|
|
597
|
-
shapes: [
|
|
598
|
-
polygon(
|
|
599
|
-
[
|
|
600
|
-
[0, tailY],
|
|
601
|
-
[tailX, tailY],
|
|
602
|
-
[tailX, tailY + band],
|
|
603
|
-
[0, tailY + band],
|
|
604
|
-
[notch, tailY + band / 2],
|
|
605
|
-
],
|
|
606
|
-
tail
|
|
607
|
-
),
|
|
608
|
-
polygon(
|
|
609
|
-
[
|
|
610
|
-
[width, tailY],
|
|
611
|
-
[width - notch, tailY + band / 2],
|
|
612
|
-
[width, tailY + band],
|
|
613
|
-
[width - tailX, tailY + band],
|
|
614
|
-
[width - tailX, tailY],
|
|
615
|
-
],
|
|
616
|
-
tail
|
|
617
|
-
),
|
|
618
|
-
polygon(
|
|
619
|
-
[
|
|
620
|
-
[frontX, ribbonY + band],
|
|
621
|
-
[frontX + fold * 1.6, ribbonY + band + fold],
|
|
622
|
-
[frontX, ribbonY + band + fold],
|
|
623
|
-
],
|
|
624
|
-
crease
|
|
625
|
-
),
|
|
626
|
-
polygon(
|
|
627
|
-
[
|
|
628
|
-
[width - frontX, ribbonY + band],
|
|
629
|
-
[width - frontX, ribbonY + band + fold],
|
|
630
|
-
[width - frontX - fold * 1.6, ribbonY + band + fold],
|
|
631
|
-
],
|
|
632
|
-
crease
|
|
633
|
-
),
|
|
634
|
-
rect(
|
|
635
|
-
extend + border,
|
|
636
|
-
border,
|
|
637
|
-
cardWidth - 2 * border,
|
|
638
|
-
cardWidth - 2 * border,
|
|
639
|
-
innerRadius,
|
|
640
|
-
background
|
|
641
|
-
),
|
|
642
|
-
ring(
|
|
643
|
-
box(extend, 0, cardWidth, cardWidth, radius),
|
|
644
|
-
box(
|
|
645
|
-
extend + border,
|
|
646
|
-
border,
|
|
647
|
-
cardWidth - 2 * border,
|
|
648
|
-
cardWidth - 2 * border,
|
|
649
|
-
innerRadius
|
|
650
|
-
),
|
|
651
|
-
color
|
|
652
|
-
),
|
|
653
|
-
rect(frontX, ribbonY, width - 2 * frontX, band, 0, color),
|
|
654
|
-
],
|
|
655
|
-
label: fitLabel(
|
|
656
|
-
ctx.text,
|
|
657
|
-
width / 2,
|
|
658
|
-
ribbonY + band / 2,
|
|
659
|
-
band,
|
|
660
|
-
width - 2 * frontX - 2 * gap,
|
|
661
|
-
frame.textColor || WHITE
|
|
662
|
-
),
|
|
663
|
-
squareEdges: false,
|
|
664
|
-
color,
|
|
665
|
-
};
|
|
666
|
-
};
|
|
667
|
-
|
|
668
|
-
const envelope: Layout = (ctx) => {
|
|
669
|
-
const { size, gap, band, color, background, frame, fitLabel } = ctx;
|
|
670
|
-
const side = size * 0.08;
|
|
671
|
-
const letterWidth = size + 2 * gap;
|
|
672
|
-
const width = letterWidth + 2 * side;
|
|
673
|
-
const letterY = size * 0.05;
|
|
674
|
-
const pocketY = letterY + gap + size + gap * 0.6;
|
|
675
|
-
const dip = size * 0.14;
|
|
676
|
-
const height = pocketY + dip + band + size * 0.02;
|
|
677
|
-
const backY = letterY + size * 0.32;
|
|
678
|
-
const outline = size * 0.012;
|
|
679
|
-
const letterHeight = pocketY + dip - letterY;
|
|
680
|
-
return {
|
|
681
|
-
width,
|
|
682
|
-
height,
|
|
683
|
-
qrX: side + gap,
|
|
684
|
-
qrY: letterY + gap,
|
|
685
|
-
qrSize: size,
|
|
686
|
-
shapes: [
|
|
687
|
-
rect(
|
|
688
|
-
0,
|
|
689
|
-
backY,
|
|
690
|
-
width,
|
|
691
|
-
height - backY,
|
|
692
|
-
0,
|
|
693
|
-
mixFrameColors(color, WHITE, 0.45)
|
|
694
|
-
),
|
|
695
|
-
polygon(
|
|
696
|
-
[
|
|
697
|
-
[0, backY],
|
|
698
|
-
[width / 2, 0],
|
|
699
|
-
[width, backY],
|
|
700
|
-
],
|
|
701
|
-
mixFrameColors(color, WHITE, 0.25)
|
|
702
|
-
),
|
|
703
|
-
rect(side, letterY, letterWidth, letterHeight, 0, background),
|
|
704
|
-
ring(
|
|
705
|
-
box(
|
|
706
|
-
side - outline,
|
|
707
|
-
letterY - outline,
|
|
708
|
-
letterWidth + 2 * outline,
|
|
709
|
-
letterHeight + outline
|
|
710
|
-
),
|
|
711
|
-
box(side, letterY, letterWidth, letterHeight),
|
|
712
|
-
color
|
|
713
|
-
),
|
|
714
|
-
polygon(
|
|
715
|
-
[
|
|
716
|
-
[0, pocketY],
|
|
717
|
-
[width / 2, pocketY + dip],
|
|
718
|
-
[width, pocketY],
|
|
719
|
-
[width, height],
|
|
720
|
-
[0, height],
|
|
721
|
-
],
|
|
722
|
-
color
|
|
723
|
-
),
|
|
724
|
-
],
|
|
725
|
-
label: fitLabel(
|
|
726
|
-
ctx.text,
|
|
727
|
-
width / 2,
|
|
728
|
-
pocketY + dip + band / 2,
|
|
729
|
-
band,
|
|
730
|
-
letterWidth - 2 * gap,
|
|
731
|
-
frame.textColor || WHITE
|
|
732
|
-
),
|
|
733
|
-
squareEdges: false,
|
|
734
|
-
color,
|
|
735
|
-
};
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
const tag: Layout = (ctx) => {
|
|
739
|
-
const { size, gap, band, color, background, frame, fitLabel } = ctx;
|
|
740
|
-
const side = size * 0.06;
|
|
741
|
-
const windowWidth = size + 2 * gap;
|
|
742
|
-
const width = windowWidth + 2 * side;
|
|
743
|
-
const top = size * 0.24;
|
|
744
|
-
const hole = size * 0.04;
|
|
745
|
-
const holeY = top * 0.48;
|
|
746
|
-
const chamfer = size * 0.14;
|
|
747
|
-
const row = ctx.text ? band : side;
|
|
748
|
-
const height = top + windowWidth + row;
|
|
749
|
-
const r = size * 0.04;
|
|
750
|
-
const body =
|
|
751
|
-
compact`M${chamfer} 0H${width - chamfer}L${width} ${chamfer}` +
|
|
752
|
-
compact`V${height - r}A${r} ${r} 0 0 1 ${width - r} ${height}` +
|
|
753
|
-
compact`H${r}A${r} ${r} 0 0 1 0 ${height - r}V${chamfer}Z` +
|
|
754
|
-
circlePath(width / 2, holeY, hole);
|
|
755
|
-
return {
|
|
756
|
-
width,
|
|
757
|
-
height,
|
|
758
|
-
qrX: side + gap,
|
|
759
|
-
qrY: top + gap,
|
|
760
|
-
qrSize: size,
|
|
761
|
-
shapes: [
|
|
762
|
-
path(body, color, "evenodd"),
|
|
763
|
-
path(
|
|
764
|
-
circlePath(width / 2, holeY, hole * 1.7) +
|
|
765
|
-
circlePath(width / 2, holeY, hole),
|
|
766
|
-
mixFrameColors(color, WHITE, 0.35),
|
|
767
|
-
"evenodd"
|
|
768
|
-
),
|
|
769
|
-
rect(side, top, windowWidth, windowWidth, size * 0.02, background),
|
|
770
|
-
],
|
|
771
|
-
label: fitLabel(
|
|
772
|
-
ctx.text,
|
|
773
|
-
width / 2,
|
|
774
|
-
top + windowWidth + row / 2,
|
|
775
|
-
row,
|
|
776
|
-
windowWidth - 2 * gap,
|
|
777
|
-
frame.textColor || WHITE
|
|
778
|
-
),
|
|
779
|
-
squareEdges: false,
|
|
780
|
-
color,
|
|
781
|
-
};
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
const menuCard: Layout = (ctx) => {
|
|
785
|
-
const { size, color, background, frame, fitLabel } = ctx;
|
|
786
|
-
const pad = size * 0.13;
|
|
787
|
-
const header = ctx.text ? size * 0.26 : pad;
|
|
788
|
-
const footer = ctx.secondaryText ? size * 0.2 : pad;
|
|
789
|
-
const width = size + 2 * pad;
|
|
790
|
-
const height = header + size + footer;
|
|
791
|
-
const radius = size * 0.03;
|
|
792
|
-
const rule = size * 0.022;
|
|
793
|
-
const inset = size * 0.045;
|
|
794
|
-
const hairline = size * 0.008;
|
|
795
|
-
const textColor = frame.textColor || color;
|
|
796
|
-
const shapes: FrameLayout["shapes"] = [
|
|
797
|
-
rect(0, 0, width, height, radius, background),
|
|
798
|
-
ring(
|
|
799
|
-
box(0, 0, width, height, radius),
|
|
800
|
-
box(
|
|
801
|
-
rule,
|
|
802
|
-
rule,
|
|
803
|
-
width - 2 * rule,
|
|
804
|
-
height - 2 * rule,
|
|
805
|
-
Math.max(radius - rule, 0)
|
|
806
|
-
),
|
|
807
|
-
color
|
|
808
|
-
),
|
|
809
|
-
ring(
|
|
810
|
-
box(inset, inset, width - 2 * inset, height - 2 * inset),
|
|
811
|
-
box(
|
|
812
|
-
inset + hairline,
|
|
813
|
-
inset + hairline,
|
|
814
|
-
width - 2 * (inset + hairline),
|
|
815
|
-
height - 2 * (inset + hairline)
|
|
816
|
-
),
|
|
817
|
-
color
|
|
818
|
-
),
|
|
819
|
-
];
|
|
820
|
-
if (ctx.text) {
|
|
821
|
-
const y = header - size * 0.075;
|
|
822
|
-
const diamond = size * 0.022;
|
|
823
|
-
shapes.push(
|
|
824
|
-
rect(width * 0.3, y - hairline / 2, width * 0.4, hairline, 0, color),
|
|
825
|
-
polygon(
|
|
826
|
-
[
|
|
827
|
-
[width / 2, y - diamond],
|
|
828
|
-
[width / 2 + diamond, y],
|
|
829
|
-
[width / 2, y + diamond],
|
|
830
|
-
[width / 2 - diamond, y],
|
|
831
|
-
],
|
|
832
|
-
color
|
|
833
|
-
)
|
|
834
|
-
);
|
|
835
|
-
}
|
|
836
|
-
return {
|
|
837
|
-
width,
|
|
838
|
-
height,
|
|
839
|
-
qrX: pad,
|
|
840
|
-
qrY: header,
|
|
841
|
-
qrSize: size,
|
|
842
|
-
shapes,
|
|
843
|
-
label: fitLabel(
|
|
844
|
-
ctx.text,
|
|
845
|
-
width / 2,
|
|
846
|
-
size * 0.115,
|
|
847
|
-
size * 0.17,
|
|
848
|
-
width - 2 * pad,
|
|
849
|
-
textColor
|
|
850
|
-
),
|
|
851
|
-
extraLabels: present(
|
|
852
|
-
fitLabel(
|
|
853
|
-
ctx.secondaryText,
|
|
854
|
-
width / 2,
|
|
855
|
-
header + size + footer * 0.45,
|
|
856
|
-
footer * 0.8,
|
|
857
|
-
width - 2 * pad,
|
|
858
|
-
textColor,
|
|
859
|
-
"secondaryText"
|
|
860
|
-
)
|
|
861
|
-
),
|
|
862
|
-
squareEdges: false,
|
|
863
|
-
color,
|
|
864
|
-
};
|
|
865
|
-
};
|
|
866
|
-
|
|
867
|
-
const sticker: Layout = (ctx) => {
|
|
868
|
-
const { size, gap, color, background, frame, fitLabel } = ctx;
|
|
869
|
-
const cut = size * 0.025;
|
|
870
|
-
const thick = size * 0.07;
|
|
871
|
-
const shadow = size * 0.03;
|
|
872
|
-
const radius = size * 0.13;
|
|
873
|
-
const row = ctx.text ? size * 0.17 : 0;
|
|
874
|
-
// A wider light gap than other frames: the thick dark rim sits close to
|
|
875
|
-
// the finder corners otherwise
|
|
876
|
-
const inset = gap * 1.25;
|
|
877
|
-
const face = size + 2 * inset;
|
|
878
|
-
const bodyWidth = face + 2 * thick;
|
|
879
|
-
const bodyHeight = face + 2 * thick + row;
|
|
880
|
-
const outerWidth = bodyWidth + 2 * cut;
|
|
881
|
-
const outerHeight = bodyHeight + 2 * cut;
|
|
882
|
-
return {
|
|
883
|
-
width: outerWidth + shadow,
|
|
884
|
-
height: outerHeight + shadow,
|
|
885
|
-
qrX: cut + thick + inset,
|
|
886
|
-
qrY: cut + thick + inset,
|
|
887
|
-
qrSize: size,
|
|
888
|
-
shapes: [
|
|
889
|
-
rect(
|
|
890
|
-
shadow,
|
|
891
|
-
shadow,
|
|
892
|
-
outerWidth,
|
|
893
|
-
outerHeight,
|
|
894
|
-
radius + cut,
|
|
895
|
-
mixFrameColors(color, WHITE, 0.7)
|
|
896
|
-
),
|
|
897
|
-
rect(0, 0, outerWidth, outerHeight, radius + cut, WHITE),
|
|
898
|
-
rect(cut, cut, bodyWidth, bodyHeight, radius, color),
|
|
899
|
-
rect(cut + thick, cut + thick, face, face, size * 0.04, background),
|
|
900
|
-
],
|
|
901
|
-
label: fitLabel(
|
|
902
|
-
ctx.text,
|
|
903
|
-
cut + bodyWidth / 2,
|
|
904
|
-
cut + thick + face + (thick + row) / 2,
|
|
905
|
-
thick + row,
|
|
906
|
-
face - 2 * gap,
|
|
907
|
-
frame.textColor || WHITE
|
|
908
|
-
),
|
|
909
|
-
squareEdges: false,
|
|
910
|
-
color,
|
|
911
|
-
};
|
|
912
|
-
};
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* Distance from the top edge of a rounded rect (x0..x0+width, corner radius
|
|
916
|
-
* r) down to its outline at `x`.
|
|
917
|
-
*/
|
|
918
|
-
function edgeInset(x: number, x0: number, width: number, r: number): number {
|
|
919
|
-
const dx =
|
|
920
|
-
x < x0 + r ? x0 + r - x : x > x0 + width - r ? x - (x0 + width - r) : 0;
|
|
921
|
-
return r - Math.sqrt(Math.max(0, r * r - Math.min(dx, r) ** 2));
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* A rounded ring split into thin vertical strips, each a solid color stepped
|
|
926
|
-
* from `from` to `to`, so the gradient looks the same in every output.
|
|
927
|
-
*/
|
|
928
|
-
function gradientRing(
|
|
929
|
-
width: number,
|
|
930
|
-
height: number,
|
|
931
|
-
radius: number,
|
|
932
|
-
border: number,
|
|
933
|
-
from: string,
|
|
934
|
-
to: string,
|
|
935
|
-
steps = 48
|
|
936
|
-
): FramePolygon[] {
|
|
937
|
-
const innerRadius = Math.max(radius - border, 0);
|
|
938
|
-
const innerWidth = width - 2 * border;
|
|
939
|
-
const cuts = new Set<number>([border, width - border]);
|
|
940
|
-
for (let i = 0; i <= steps; i++) {
|
|
941
|
-
cuts.add((width * i) / steps);
|
|
942
|
-
}
|
|
943
|
-
const xs = [...cuts].sort((a, b) => a - b);
|
|
944
|
-
// Overlap neighbours slightly so no anti-aliasing seam shows
|
|
945
|
-
const overlap = width * 0.002;
|
|
946
|
-
const samples = 5;
|
|
947
|
-
const outerTop = (x: number) => edgeInset(x, 0, width, radius);
|
|
948
|
-
const innerTop = (x: number) =>
|
|
949
|
-
border + edgeInset(x, border, innerWidth, innerRadius);
|
|
950
|
-
const strips: FramePolygon[] = [];
|
|
951
|
-
for (let i = 0; i + 1 < xs.length; i++) {
|
|
952
|
-
const a = xs[i] as number;
|
|
953
|
-
const b = Math.min(
|
|
954
|
-
width,
|
|
955
|
-
(xs[i + 1] as number) + (i + 2 < xs.length ? overlap : 0)
|
|
956
|
-
);
|
|
957
|
-
const fill = mixFrameColors(from, to, (a + b) / 2 / width);
|
|
958
|
-
const along = (reverse: boolean) =>
|
|
959
|
-
Array.from({ length: samples }, (_, k) => {
|
|
960
|
-
const t = k / (samples - 1);
|
|
961
|
-
return reverse ? b + (a - b) * t : a + (b - a) * t;
|
|
962
|
-
});
|
|
963
|
-
const middle =
|
|
964
|
-
a >= border - 1e-9 && (xs[i + 1] as number) <= width - border + 1e-9;
|
|
965
|
-
if (middle) {
|
|
966
|
-
strips.push(
|
|
967
|
-
polygon(
|
|
968
|
-
[
|
|
969
|
-
...along(false).map((x): Point => [x, outerTop(x)]),
|
|
970
|
-
...along(true).map((x): Point => [x, innerTop(x)]),
|
|
971
|
-
],
|
|
972
|
-
fill
|
|
973
|
-
),
|
|
974
|
-
polygon(
|
|
975
|
-
[
|
|
976
|
-
...along(false).map((x): Point => [x, height - innerTop(x)]),
|
|
977
|
-
...along(true).map((x): Point => [x, height - outerTop(x)]),
|
|
978
|
-
],
|
|
979
|
-
fill
|
|
980
|
-
)
|
|
981
|
-
);
|
|
982
|
-
} else {
|
|
983
|
-
strips.push(
|
|
984
|
-
polygon(
|
|
985
|
-
[
|
|
986
|
-
...along(false).map((x): Point => [x, outerTop(x)]),
|
|
987
|
-
...along(true).map((x): Point => [x, height - outerTop(x)]),
|
|
988
|
-
],
|
|
989
|
-
fill
|
|
990
|
-
)
|
|
991
|
-
);
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
return strips;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
const gradientBorder: Layout = (ctx) => {
|
|
998
|
-
const { size, gap, background, frame, fitLabel } = ctx;
|
|
999
|
-
const from = frame.color || GRADIENT_FRAME_DEFAULTS.from;
|
|
1000
|
-
const to = frame.secondaryColor || GRADIENT_FRAME_DEFAULTS.to;
|
|
1001
|
-
const border = size * 0.05;
|
|
1002
|
-
const width = size + 2 * (border + gap);
|
|
1003
|
-
const row = ctx.text ? size * 0.18 : 0;
|
|
1004
|
-
const innerHeight = size + (ctx.text ? gap + row : 2 * gap);
|
|
1005
|
-
const height = innerHeight + 2 * border;
|
|
1006
|
-
const radius = size * 0.1;
|
|
1007
|
-
return {
|
|
1008
|
-
width,
|
|
1009
|
-
height,
|
|
1010
|
-
qrX: border + gap,
|
|
1011
|
-
qrY: border + gap,
|
|
1012
|
-
qrSize: size,
|
|
1013
|
-
shapes: [
|
|
1014
|
-
rect(
|
|
1015
|
-
border,
|
|
1016
|
-
border,
|
|
1017
|
-
width - 2 * border,
|
|
1018
|
-
innerHeight,
|
|
1019
|
-
radius - border,
|
|
1020
|
-
background
|
|
1021
|
-
),
|
|
1022
|
-
...gradientRing(width, height, radius, border, from, to),
|
|
1023
|
-
],
|
|
1024
|
-
label: fitLabel(
|
|
1025
|
-
ctx.text,
|
|
1026
|
-
width / 2,
|
|
1027
|
-
border + gap + size + row / 2,
|
|
1028
|
-
row,
|
|
1029
|
-
width - 2 * border - 2 * gap,
|
|
1030
|
-
frame.textColor || mixFrameColors(from, to, 0.5)
|
|
1031
|
-
),
|
|
1032
|
-
squareEdges: false,
|
|
1033
|
-
color: from,
|
|
1034
|
-
};
|
|
1035
|
-
};
|
|
1036
|
-
|
|
1037
|
-
/** Focus: four corner brackets around the code, the label underneath. */
|
|
1038
|
-
const focus: Layout = (ctx) => {
|
|
1039
|
-
const { size, gap, color, background, frame, fitLabel } = ctx;
|
|
1040
|
-
const thick = size * 0.035;
|
|
1041
|
-
const arm = size * 0.2;
|
|
1042
|
-
const width = size + 2 * (gap + thick);
|
|
1043
|
-
const row = ctx.text ? size * 0.2 : 0;
|
|
1044
|
-
const box = width;
|
|
1045
|
-
const height = box + row;
|
|
1046
|
-
const bracket = (x: number, y: number, dx: number, dy: number): Point[] => [
|
|
1047
|
-
[x, y],
|
|
1048
|
-
[x + dx * arm, y],
|
|
1049
|
-
[x + dx * arm, y + dy * thick],
|
|
1050
|
-
[x + dx * thick, y + dy * thick],
|
|
1051
|
-
[x + dx * thick, y + dy * arm],
|
|
1052
|
-
[x, y + dy * arm],
|
|
1053
|
-
];
|
|
1054
|
-
return {
|
|
1055
|
-
width,
|
|
1056
|
-
height,
|
|
1057
|
-
qrX: thick + gap,
|
|
1058
|
-
qrY: thick + gap,
|
|
1059
|
-
qrSize: size,
|
|
1060
|
-
shapes: [
|
|
1061
|
-
rect(0, 0, width, height, 0, background),
|
|
1062
|
-
polygon(bracket(0, 0, 1, 1), color),
|
|
1063
|
-
polygon(bracket(box, 0, -1, 1), color),
|
|
1064
|
-
polygon(bracket(box, box, -1, -1), color),
|
|
1065
|
-
polygon(bracket(0, box, 1, -1), color),
|
|
1066
|
-
],
|
|
1067
|
-
label: fitLabel(
|
|
1068
|
-
ctx.text,
|
|
1069
|
-
width / 2,
|
|
1070
|
-
box + row * 0.4,
|
|
1071
|
-
row,
|
|
1072
|
-
width - 2 * gap,
|
|
1073
|
-
frame.textColor || color
|
|
1074
|
-
),
|
|
1075
|
-
squareEdges: false,
|
|
1076
|
-
color,
|
|
1077
|
-
};
|
|
1078
|
-
};
|
|
1079
|
-
|
|
1080
|
-
export const SHAPED_FRAMES: Record<ShapedFrameStyle, Layout> = {
|
|
1081
|
-
"banner-top-bottom": bannerTopBottom,
|
|
1082
|
-
"speech-bubble-top": speechBubbleTop,
|
|
1083
|
-
"chat-bubble": chatBubble,
|
|
1084
|
-
circle,
|
|
1085
|
-
polaroid,
|
|
1086
|
-
phone,
|
|
1087
|
-
ticket,
|
|
1088
|
-
badge,
|
|
1089
|
-
envelope,
|
|
1090
|
-
tag,
|
|
1091
|
-
"menu-card": menuCard,
|
|
1092
|
-
sticker,
|
|
1093
|
-
"gradient-border": gradientBorder,
|
|
1094
|
-
focus,
|
|
1095
|
-
};
|